User asset
Batch query all recently changed user assets under the merchant (by update time)
Query non-zero assets of all users under merchant, returns all data where updateTime > specified time.
POST
/
platformapi
/
chainup
/
open
/
ouser
/
batchQueryUserAccountsByUpdateTime
curl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/ouser/batchQueryUserAccountsByUpdateTime \
--header 'Content-Type: application/json' \
--data '"{\n // \"appKey\": \"xfnh_1637\",\n \"appKey\": \"demoex_2851\",\n\n \"sign\": \"{{sign}}\",\n \"updateTime\": 1747621247000\n}"'{
"code": "0",
"msg": "suc",
"data": {
"accounts": [
{
"uid": "32267458",
"showName": "BTC",
"balance": "0.000208",
"updateTime": "1747684953000",
"id": "1986154149",
"type": "20211127",
"coin": "BTC1658"
},
{
"uid": "32267458",
"showName": "USDT",
"balance": "77.35999698",
"updateTime": "1747684955000",
"id": "1986154108",
"type": "20211128",
"coin": "USDT1658"
},
{
"uid": "32267458",
"showName": "USDT",
"balance": "917.68086681035",
"updateTime": "1747684955000",
"id": "1985112859",
"type": "20111128",
"coin": "USDT1658"
},
{
"uid": "32241425",
"showName": "BTC",
"balance": "0.0000001857237467",
"updateTime": "1747703352000",
"id": "1934089710",
"type": "20111127",
"coin": "BTC1658"
},
{
"uid": "32241425",
"showName": "USDT",
"balance": "0.0047322138825488",
"updateTime": "1747703352000",
"id": "1934089711",
"type": "20111128",
"coin": "USDT1658"
},
{
"uid": "27439504",
"showName": "USDT",
"balance": "0",
"updateTime": "1747706231000",
"id": "1933063506",
"type": "20211128",
"coin": "USDT1658"
},
{
"uid": "32257848",
"showName": "USDT",
"balance": "151468.49153863153",
"updateTime": "1747706232000",
"id": "1934133335",
"type": "20111128",
"coin": "USDT1658"
},
{
"uid": "27439504",
"showName": "USDT",
"balance": "149555114.0139600009053943",
"updateTime": "1747712074000",
"id": "1933063224",
"type": "20111128",
"coin": "USDT1658"
},
{
"uid": "32257848",
"showName": "USDT",
"balance": "186894.11490767",
"updateTime": "1747712074000",
"id": "1934133336",
"type": "20211128",
"coin": "USDT1658"
},
{
"uid": "27439504",
"showName": "BTC",
"balance": "10095008.730246425",
"updateTime": "1747712075000",
"id": "1933205147",
"type": "20111127",
"coin": "BTC1658"
},
{
"uid": "27439504",
"showName": "BTC",
"balance": "0",
"updateTime": "1747712075000",
"id": "1933205148",
"type": "20211127",
"coin": "BTC1658"
},
{
"uid": "32257848",
"showName": "BTC",
"balance": "0.70201757596",
"updateTime": "1747712075000",
"id": "1934133346",
"type": "20111127",
"coin": "BTC1658"
},
{
"uid": "32257848",
"showName": "BTC",
"balance": "0.421404",
"updateTime": "1747712075000",
"id": "1934133347",
"type": "20211127",
"coin": "BTC1658"
}
]
}
}API Description
- Query assets of all users under merchant, returns all data where updateTime > specified time, sorted by updateTime in ascending order.
- The earliest updateTime allowed is 24 hours before the current timestamp.
- used with ”http://service.xxx.com/platformapi/chainup/open/ouser/batchQueryUserAccountsByStartId”, first pull the whole amount of data In the use of the interface data query incremental assets
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| appKey | string | Yes | Merchant appKey |
| sign | string | Yes | sign |
| updateTime | long | Yes | Update timestamp (milliseconds), earliest is 24 hours ago |
Request Example
cURL
curl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/ouser/batchQueryUserAccountsByUpdateTime \
--header 'Content-Type: application/json' \
--data '{
"appKey": "{your_app_key}",
"sign": "{sign}",
"updateTime": 1693497600000
}'
Response Parameters
| Name | Type | Description |
|---|---|---|
| id | string | Account ID |
| uid | string | User UID |
| balance | string | Asset balance |
| type | string | Account type |
| coin | string | Coin type |
| showName | string | Display name of coin |
| updateTime | string | Update time (milliseconds) |
Response Example
{
"code": "0",
"msg": "suc",
"data": {
"accounts": [
{
"uid": "24004287",
"showName": "BTC1",
"balance": "0.0915880941",
"updateTime": "1747622045000",
"id": "4005921647",
"type": "201101",
"coin": "BTC"
},
{
"uid": "23998236",
"showName": "USDT4",
"balance": "998825158.8059704902041369",
"updateTime": "1747625814000",
"id": "335306053",
"type": "201106",
"coin": "USDT"
},
{
"uid": "24005851",
"showName": "USDT4",
"balance": "8999.0000000014483515",
"updateTime": "1747625814000",
"id": "4005784890",
"type": "201106",
"coin": "USDT"
},
{
"uid": "24005851",
"showName": "DOGE",
"balance": "207488.14138893953",
"updateTime": "1747625814000",
"id": "4005784915",
"type": "2016002",
"coin": "DOGE"
},
{
"uid": "24005851",
"showName": "USDT4",
"balance": "0.0000000000000189",
"updateTime": "1747625814000",
"id": "4005821977",
"type": "202106",
"coin": "USDT"
},
{
"uid": "23998236",
"showName": "DOGE",
"balance": "9989877135.2712837511",
"updateTime": "1747625815000",
"id": "335306059",
"type": "2016002",
"coin": "DOGE"
},
{
"uid": "23998561",
"showName": "BTC1",
"balance": "85.961708603828",
"updateTime": "1748078529000",
"id": "335326383",
"type": "201101",
"coin": "BTC"
}
]
}
}
Account Type (type) Description:
type = 201 (User: Normal Balance)
type = 202 (User: Frozen)
type = 207 (Lockup Account)
type = 210 (OTC Merchant Margin Account)
type = 217 (User: OTC Normal Balance)
type = 218 (User: OTC Frozen)
type = 230 (User: Lockup token account V2)
type = 221 (User: Frozen token from Innovation trial zone subscription)
Body
application/json
appKey
string
requiredsign
string
requiredupdateTime
integer
requiredResponse
200 - application/json
code
string
requiredmsg
string
requireddata
object
requiredcurl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/ouser/batchQueryUserAccountsByUpdateTime \
--header 'Content-Type: application/json' \
--data '"{\n // \"appKey\": \"xfnh_1637\",\n \"appKey\": \"demoex_2851\",\n\n \"sign\": \"{{sign}}\",\n \"updateTime\": 1747621247000\n}"'{
"code": "0",
"msg": "suc",
"data": {
"accounts": [
{
"uid": "32267458",
"showName": "BTC",
"balance": "0.000208",
"updateTime": "1747684953000",
"id": "1986154149",
"type": "20211127",
"coin": "BTC1658"
},
{
"uid": "32267458",
"showName": "USDT",
"balance": "77.35999698",
"updateTime": "1747684955000",
"id": "1986154108",
"type": "20211128",
"coin": "USDT1658"
},
{
"uid": "32267458",
"showName": "USDT",
"balance": "917.68086681035",
"updateTime": "1747684955000",
"id": "1985112859",
"type": "20111128",
"coin": "USDT1658"
},
{
"uid": "32241425",
"showName": "BTC",
"balance": "0.0000001857237467",
"updateTime": "1747703352000",
"id": "1934089710",
"type": "20111127",
"coin": "BTC1658"
},
{
"uid": "32241425",
"showName": "USDT",
"balance": "0.0047322138825488",
"updateTime": "1747703352000",
"id": "1934089711",
"type": "20111128",
"coin": "USDT1658"
},
{
"uid": "27439504",
"showName": "USDT",
"balance": "0",
"updateTime": "1747706231000",
"id": "1933063506",
"type": "20211128",
"coin": "USDT1658"
},
{
"uid": "32257848",
"showName": "USDT",
"balance": "151468.49153863153",
"updateTime": "1747706232000",
"id": "1934133335",
"type": "20111128",
"coin": "USDT1658"
},
{
"uid": "27439504",
"showName": "USDT",
"balance": "149555114.0139600009053943",
"updateTime": "1747712074000",
"id": "1933063224",
"type": "20111128",
"coin": "USDT1658"
},
{
"uid": "32257848",
"showName": "USDT",
"balance": "186894.11490767",
"updateTime": "1747712074000",
"id": "1934133336",
"type": "20211128",
"coin": "USDT1658"
},
{
"uid": "27439504",
"showName": "BTC",
"balance": "10095008.730246425",
"updateTime": "1747712075000",
"id": "1933205147",
"type": "20111127",
"coin": "BTC1658"
},
{
"uid": "27439504",
"showName": "BTC",
"balance": "0",
"updateTime": "1747712075000",
"id": "1933205148",
"type": "20211127",
"coin": "BTC1658"
},
{
"uid": "32257848",
"showName": "BTC",
"balance": "0.70201757596",
"updateTime": "1747712075000",
"id": "1934133346",
"type": "20111127",
"coin": "BTC1658"
},
{
"uid": "32257848",
"showName": "BTC",
"balance": "0.421404",
"updateTime": "1747712075000",
"id": "1934133347",
"type": "20211127",
"coin": "BTC1658"
}
]
}
}