Get users NFT balance

流量控制: 5 每 秒

摘要


HTTP 方法

GET

访问路径

/api/v3/user/nft/balances

功能

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

API 描述


HTTP头

字段 类型 必须 说明 举例
X-API-KEY string ApiKey "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ
6B6DQ6THZWbvrAGxzEdulXQvOKLrRW
ZLnN"

请求参数

字段 类型 必须 说明 举例
accountId integer AccountID 10001
nftDatas string 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 NFT token address "0xf7c9323511
86c3a9053f31
3eefa16209c0
18f7f1dba8aa
8ca7100400f7
c31085,0xc3a
9053f313eef7
c932351ca710
0400f7c186fa
16209c018f7f
1dba8aa83108
5"
tokenIds string The token slot ID in loopring DEX. "32768,32769,
32770"
offset integer Number of records to skip 12345
limit integer Number of records to return 20
nonZero boolean Hide 0 balance NFT token, default is true "20"

请求示例

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

响应字段

字段 类型 必须 说明 举例
totalNum integer field.totalNum.description 100
data List[Combined
Balance
]
NFT tokens balance info /

响应示例

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

状态码

状态码 描述
100000 Unknown error
104001 Empty ApiKey
104002 Invalid ApiKey
104003 Invalid Account ID

模型


CombinedBalance

model.Balance.description

字段 类型 必须 说明 举例
accountId integer field.Balance.accountId 10
tokenId integer field.Balance.tokenId 10
nftData string Users NFT token nftData "100"
tokenAddress string field.NftBalance.tokenAddress "100"
nftId string field.NftBalance.nftId "100"
total string field.Balance.totalAmount "100"
locked string field.Balance.frozenAmount "100"
pending Pending
Balance
field.Balance.pending "{withdraw:0, deposit:0}"

PendingBalance

Users pending balances

字段 类型 必须 说明 举例
withdraw string Withdrawal pending balance which means the token is in withdrawal state but not arrived L1 "100000000000
00"
deposit string Deposit pending balance which means the token is in deposit state but not arrived L2 "100000000000
00"

results matching ""

    No results matching ""