Get user token balance

Rate limit: 3 every second

API Overview


HTTP method

GET

Path

/api/v2/tokenBalances

Summary

Returns user's token balance on Ethereum mainnet (not token's balance on Loopring.io)

API description


HTTP Header

Field Type Required Description Example
X-API-KEY string Y ApiKey "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ
6B6DQ6THZWbvrAGxzEdulXQvOKLrRW
ZLnN"

Request parameters

Field Type Required Description Example
owner string Y Ethereum address "0x000000000000000000
00000000000000000000
00"
token string Y Token's ERC20 address "0x000000000000000000
00000000000000000000
00"

Request example

HTTP
CURL
GET https://api.loopring.io/api/v2/tokenBalances?owner=0x0000000000000000000000000000000000000000&token=0x0000000000000000000000000000000000000000 HTTP/1.1
Host: api.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
curl -H "X-API-KEY:sra1aavfa" https://api.loopring.io/api/v2/tokenBalances\?owner\=0x0000000000000000000000000000000000000000\&token\=0x0000000000000000000000000000000000000000

Response fields

Field Type Required Description Example
resultInfo ResultInfo Y Information returned by the API /
data List[string] N Balance in wei "['100000000000000000
0']"

Response example

{
    "resultInfo" : {
        "code" : 0,
        "message" : "SUCCESS"
    },
    "data" : ['1000000000000000000']
}

Status code

Value Description
100000 Unknown error
104205 Error in internal request
104208 Unknown error in Ethereum node

results matching ""

    No results matching ""