Get NFT Assets

EndPoint

GET /api/v3/user/nft/balances
​

Header

Field
Description
Example
X-API-KEY
ApiKey, can use a valid apiKey to get other address asset
"HlkcGxbqBeaF76j4rvPaOasyfPwnkQ6B6DQ6THZWbvrAGxzEdulXQvOKLrRWZLnN"

Request

​
Field
Description
Example
accountId
AccountID
1
nftDatas
(Optional) The Loopring's NFT token data identifier which is a hash string of NFT token address and NFT_ID, separated by ","
"0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085,0xc3a9053f313eef7c932351ca7100400f7c186fa16209c018f7f 1dba8aa831085"
tokenAddrs
(Optional) NFT token address, separated by ","
"0x8656920c85342d646E5286Cb841F90209272ABeb,0x8656920c85342d646E5286Cb841F90209272ABec"
tokenIds
(Optional) The token slot ID in loopring DEX, separated by ","
"32768,32769,32770"
offset
(Optional) Number of records to skip
10
limit
(Optional) Number of records to return.
Default is 20, max is 50
30
nonZero
(Optional) Hide 0 balance NFT token, default is true
true

Response

Field
Description
Example
totalNum
total number
100
data
​

Model

CombinedBalance

Field
Description
Example
accountId
AccountID
10110
tokenId
tokenId
32768
nftData
(Optional) Users NFT token nftData
"0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085"
tokenAddress
(Optional) token address
"0x8656920c85342d646E5286Cb841F90209272ABeb"
nftType
nft type
ERC1155 or ERC721
nftId
(Optional) nft id
"100"
total
total amount
"1000"
locked
frozen amount
"2"
pending
​pending balance​
"{withdraw:0, deposit:0}"
isCounterFactualNFT
is counterFactual NFT or not
true
deploymentStatus
tokenAddress deploy status
status in NOT_DEPLOYED, DEPLOYING, DEPLOYED

PendingBalance

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

Example

Header

X-API-KEY: bEef7a3Nzk7lgaHm85E0O1JO5ufu0iQ96p3bCmrsZz8TLGG83jTpPDYwcjUC0vlF

Request

https://uat2.loopring.io/api/v3/user/nft/balances?accountId=11329

Response

{
"totalNum": 1,
"data": [{
"accountId": 11329,
"tokenId": 32768,
"nftData": "0x20807f0870ed096cea763ec3db94f0e4a4cffdbe0ab09187ac9972c6fd6aaecb",
"tokenAddress": "0x486e3C172A444B3b7cB2fA91E8EBac37cb3E376C",
"nftId": "0x8473285a59562fe413e1dfc21050214d67c479f662dd40a6ebb50d419c024fdd",
"nftType": "ERC1155",
"total": "10",
"locked": "0",
"pending": {
"withdraw": "0",
"deposit": "0"
},
"deploymentStatus": "DEPLOYED",
"isCounterFactualNFT": true
}]
}

Copy link
On this page
EndPoint
Header
Request
Response
Model
CombinedBalance
PendingBalance
Example
Header
Request
Response