GET
/v1/merchant/custody
托管核对(balanced=false = 有余额没有你的声明背书)
Scope
merchant:read
商户自身
逐资产比两个数:member_total(你的会员一共持有多少)与
custody(你声明托管了多少)。托管模型下这是你唯一能自查这件事的地方,
判据与我方内部那条不变量逐字相同。
balanced = false 意味着有一笔余额没有你的声明背书 —— 那是记账
事故或入侵信号,不是一个可以下次再看的差异。请当场停止发起新的入金
上报并联系我方。
⚠ member_total 不含卡内资金:卡里的钱物理上在发卡上游,
不在这条恒等式的口径里。看到「卡上有钱但这里对得平」是对的。
两个数都是定点整数串。这个端点不下发 ledger_scale ——
位数请从 GET /v1/assets 取并缓存。
单向的资产也会出现:只有会员余额没有声明、或只有声明没有会员余额时,
另一侧是 "0"。
响应
200OK
{
"data": [
{
"asset": "USDT",
"member_total": "9430000000",
"custody": "9430000000",
"balanced": true
},
{
"asset": "USD",
"member_total": "120000000",
"custody": "119000000",
"balanced": false
}
],
"next_cursor": null,
"has_more": false
}403
insufficient_scope 缺 merchant:read
调用样例
curl -X GET 'https://api.zise.com/v1/merchant/custody' \
-H 'authorization: Bearer $TOKEN' \
-H 'x-zise-merchant: $MERCHANT_ID'
const res = await fetch(
"https://api.zise.com/v1/merchant/custody",
{
method: "GET",
headers: {
"authorization": "Bearer $TOKEN",
"x-zise-merchant": "MERCHANT_ID"
},
},
);
// 金额一律按字符串读,不要 JSON.parse 成 number
const data = await res.json();
import requests
res = requests.get(
"https://api.zise.com/v1/merchant/custody",
headers={
"authorization": "Bearer $TOKEN",
"x-zise-merchant": "$MERCHANT_ID"
},
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()