Z Zise Developers

托管核对(balanced=false = 有余额没有你的声明背书)

GET /v1/merchant/custody 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
}
403insufficient_scopemerchant:read
请求
curl -X GET 'https://api.zise.com/v1/merchant/custody' \
  -H 'x-auth-token: Bearer $TOKEN'
const res = await fetch("https://api.zise.com/v1/merchant/custody", {
  method: "GET",
  headers: {
    "x-auth-token": "Bearer $TOKEN",
  },
});
// 金额按字符串读,别让它变成 number
const data = await res.json();
import requests

res = requests.get(
    "https://api.zise.com/v1/merchant/custody",
    headers={
        "x-auth-token": "Bearer $TOKEN",
    },
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()
req, _ := http.NewRequest("GET", "https://api.zise.com/v1/merchant/custody",
    nil)
req.Header.Set("x-auth-token", "Bearer $TOKEN")
res, err := http.DefaultClient.Do(req)
// 金额字段用 string 接,不要 float64
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://api.zise.com/v1/merchant/custody"))
    .header("x-auth-token", "Bearer $TOKEN")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
// 金额字段用 String / BigDecimal,不要 double
$ch = curl_init('https://api.zise.com/v1/merchant/custody');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'x-auth-token: Bearer $TOKEN',
  ],
]);
$res = curl_exec($ch);
// 金额用 bcmath / 字符串,不要 floatval
200
{
  "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
}