description |
Subscribe to this topic to receive notifications about user balance update. |
- Topic name:
account
- ApiKey requred: Yes
This topic has an optional flag: v3
, which indicates the response is for v3 which has also include NFT info. if the flag is false or absent, the response is just like before.
Parameter | Note | Required |
---|
accountId | (Optional) not required as apiKey also link to an account | N |
v3 | (Optional) If it's a v3 sub which contains NFT info, default is false for compatible with previous sub topic | N |
{
"topic": {
"topic:": "account"
},
"ts":1584717910000,
"data": {
"accountId":1,
"totalAmount": "24439253519655",
"tokenId": 2,
"amountLocked": "0"
}
}
Notification
If v3 is true
:
Field | Type | Note | Required |
---|
topic | JSON | Topic and parameters | Y |
ts | integer | Notification timestamp (milliseconds) | Y |
data | BalanceV3 | User's new balances (NFT info included) | Y |
Otherwise:
Field | Type | Note | Required |
---|
topic | JSON | Topic and parameters | Y |
ts | integer | Notification timestamp (milliseconds) | Y |
data | Balance | User's new balances | Y |
Field | Type | Note | Required |
---|
accountId | integer | Account ID | Y |
tokenId | integer | Token ID | Y |
total | string | Total token balance | Y |
locked | string | Token balance locked by orders | Y |
nftId | string | (Optional)NFT ID if it's NFT token | N |
nftData | string | (Optional)NFT hash data if it's NFT token | N |
tokenAddress | string | (Optional)NFT token address if it's NFT token | N |
Field | Type | Note | Required |
---|
accountId | integer | Account ID | Y |
tokenId | integer | Token ID | Y |
totalAmount | string | Total token balance | Y |
amountLocked | string | Token balance locked by orders | Y |