Get users NFT balance

Rate limit: every seconds

API Overview


HTTP method

GET

Path

/api/v3/user/nft/balances

Summary

"Get users NFT balance, besides amount, it also includes tokenId and nftData"

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 10001
nftDatas string N The Loopring's NFT token data identifier which is a hash string of NFT token address and NFT_ID "0xf7c9323511
86c3a9053f31
3eefa16209c0
18f7f1dba8aa
8ca7100400f7
c31085,0xc3a
9053f313eef7
c932351ca710
0400f7c186fa
16209c018f7f
1dba8aa83108
5"
tokenAddrs string N NFT token address "0xf7c9323511
86c3a9053f31
3eefa16209c0
18f7f1dba8aa
8ca7100400f7
c31085,0xc3a
9053f313eef7
c932351ca710
0400f7c186fa
16209c018f7f
1dba8aa83108
5"
tokenIds string N The token slot ID in loopring DEX. "32768,32769,
32770"
offset integer N Number of records to skip 12345
limit integer N Number of records to return 20
nonZero boolean N Hide 0 balance NFT token, default is true "20"

Request example

HTTP
CURL
GET https://api3.loopring.io/api/v3/user/nft/balances?accountId=10001&nftDatas=0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085,0xc3a9053f313eef7c932351ca7100400f7c186fa16209c018f7f1dba8aa831085&tokenAddrs=0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085,0xc3a9053f313eef7c932351ca7100400f7c186fa16209c018f7f1dba8aa831085&tokenIds=32768,32769,32770&offset=12345&limit=20&nonZero=20 HTTP/1.1
Host: api3.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://api3.loopring.io/api/v3/user/nft/balances\?accountId\=10001\&nftDatas\=0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085,0xc3a9053f313eef7c932351ca7100400f7c186fa16209c018f7f1dba8aa831085\&tokenAddrs\=0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085,0xc3a9053f313eef7c932351ca7100400f7c186fa16209c018f7f1dba8aa831085\&tokenIds\=32768,32769,32770\&offset\=12345\&limit\=20\&nonZero\=20

Response fields

Field Type Required Description Example
totalNum integer Y field.totalNum.description 100
data List[Combined
Balance
]
Y NFT tokens balance info /

Response example

{
  "totalNum" : 100,
  "data" : [
    {
      "accountId" : 10,
      "tokenId" : 10,
      "nftData" : "100",
      "tokenAddress" : "100",
      "nftId" : "100",
      "total" : "100",
      "locked" : "100",
      "pending" : {
        "withdraw" : "10000000000000",
        "deposit" : "10000000000000"
      }
    }
  ]
}

Status code

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

Model


CombinedBalance

model.Balance.description

Field Type Required Description Example
accountId integer Y field.Balance.accountId 10
tokenId integer Y field.Balance.tokenId 10
nftData string N Users NFT token nftData "100"
tokenAddress string N field.NftBalance.tokenAddress "100"
nftId string N field.NftBalance.nftId "100"
total string Y field.Balance.totalAmount "100"
locked string Y field.Balance.frozenAmount "100"
pending Pending
Balance
Y field.Balance.pending "{withdraw:0, deposit:0}"

PendingBalance

Users pending balances

Field Type Required Description Example
withdraw string Y Withdrawal pending balance which means the token is in withdrawal state but not arrived L1 "100000000000
00"
deposit string Y Deposit pending balance which means the token is in deposit state but not arrived L2 "100000000000
00"

results matching ""

    No results matching ""