Get user exchange balances

Rate limit: 5 every second

API Overview


HTTP method

GET

Path

/api/v2/user/balances

Summary

Returns user's Ether and token balances on exchange.

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
accountId integer Y AccountID 1
tokens string N Balances "0,1"

Request example

HTTP
CURL
GET https://api.loopring.io/api/v2/user/balances?accountId=1&tokens=0,1 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/user/balances\?accountId\=1\&tokens\=0,1

Response fields

Field Type Required Description Example
resultInfo ResultInfo Y Information returned by the API /
data List[Balance] Y Asset information /

Response example

{
    "resultInfo" : {
        "code" : 0,
        "message" : "SUCCESS"
    },
    "data" : [
        {
            "accountId" : 10,
            "tokenId" : 10,
            "totalAmount" : "100",
            "amountLocked" : "100"
        }
    ]
}

Status code

Value Description
100000 Unknown error
104001 Empty ApiKey
104002 Invalid ApiKey
104003 Invalid Account ID

Model


Balance

Asset information

Field Type Required Description Example
accountId integer Y Account ID 10
tokenId integer Y Token ID 10
totalAmount string Y Amount of the asset "100"
amountLocked string Y Balance that has been locked by orders or pending withdrawals on exchange "100"

results matching ""

    No results matching ""