资产
批量查询商户下所有近期变化的用户资产(按更新时间)
查询商户下所有用户资产(包括0),mtime>updateTime 的所有数据。
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"
}
]
}
}接口描述
- 查询商户下所有用户资产,更新时间 > updateTime 的所有数据,按 updateTime 正序返回。
- updateTime 最早为当前时间戳24小时前。
- 配合 ”http://service.xxx.com/platformapi/chainup/open/ouser/batchQueryUserAccountsByStartId”使用, 首先拉取全量数据 在使用本接口查询增量的资产数据
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| appKey | string | 是 | 商户 appKey |
| sign | string | 是 | sign |
| updateTime | long | 是 | 更新时间戳(毫秒),最早为24小时前 |
请求示例
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
}'
返回参数
| 字段名 | 类型 | 说明 |
|---|---|---|
| id | string | 账户ID |
| uid | string | 用户UID |
| balance | string | 资产余额 |
| type | string | 账户类型 |
| coin | string | 币种 |
| showName | string | 币种展示名 |
| updateTime | string | 更新时间(毫秒时间戳) |
返回示例
{
"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"
}
]
}
}
账户类型 type 说明:
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"
}
]
}
}