预付资产内部调剂 · 可换的方向与当前参考价
这一组端点换的是你自己的备付金,不是任何会员的钱。 会员之间的
兑换在 POST /v1/exchange/orders,两条线一分钱都不重叠。
为什么你会需要它
托管模型下「这一单吃你哪种预付资产」不由你决定 —— 判据是订单的
付款资产,也就是你的会员选了用什么付。会员今天用 USDT 付、明天
改用 USDC,你的两个预付池就一个见底一个躺着。见底那一侧的表现是
会员侧的 service_unavailable(一句不解释原因的「暂时不可用」)与
GET /v1/merchant/pending 上开始堆积的排队单。
在这一组之前,merchant.available 只有两个入口 —— 我方双人审批的
充值与你的提现,两条都不能在资产之间挪一分钱。
读这张表的四件事
- 按方向配。
USDT→USD与USD→USDT是两条独立记录:费率不必
对称,也可以只开一个。看到 A→B 在表里,不能推断 B→A 也在。
- ⚠
rate是参考价,不是锁价。 成交那一刻会重新算一遍(估值率
由我方定时刷新)。要防价格移动请在下单时带 min_to_amount ——
这条线没有锁价能力,带 quote_id 一律 400。
- ⚠
rate为空串 = 这一刻报不出价(估值率没刷出来),不是 0、
更不是免费。那一行现在下不了单,其余方向照常可读 —— 一个方向的
配置问题不该把整张价目表打掉,所以我方宁可给空串也不让端点 500。
- 金额是十进制串(位数补齐到对应资产的
ledger_scale),
「不限」写作数值零:min_amount: "0.000000" 表示没有起兑额。
daily_count_limit 是整数,0 同样是不限。
三个枚举,照着 switch:rate_mode ∈ oracle / fixed;
fee_mode ∈ none / percent / fixed / percent_plus_fixed;
fee_side ∈ from / to。
fee_side 同时决定 fee_fixed 用哪一侧的位数:from 用
ledger_scale_from,to 用 ledger_scale_to。
清单是我方价目表 ∩ 你的资产白名单(白名单一行都没有 = 不限制,
它是收紧手段不是开通手段)。不出参点差 —— rate 已经是生效价,
你要的是「我能换到多少」。
⚠ 这张表不判你的托管模型:没有预付池的主体(custody_model 不是
merchant_hosted)在这里照样看得到方向,但下单一律
product_not_available。先看 GET /v1/merchant 的 custody_model。
这张表不分页(next_cursor 恒为 null),cursor / limit 不生效。
响应
{
"data": [
{
"from_asset": "USDT",
"to_asset": "USDC",
"rate": "0.999500",
"rate_mode": "fixed",
"min_amount": "100.000000",
"max_amount": "200000.000000",
"daily_amount_limit": "500000.000000",
"daily_count_limit": 20,
"fee_mode": "percent",
"fee_side": "to",
"fee_bps": 15,
"fee_fixed": "0.000000",
"ledger_scale_from": 6,
"ledger_scale_to": 6
}
],
"next_cursor": null,
"has_more": false
}insufficient_scope 缺 merchant:readcurl -X GET 'https://api.zise.com/v1/merchant/conversion-pairs' \
-H 'x-auth-token: Bearer $TOKEN'const res = await fetch("https://api.zise.com/v1/merchant/conversion-pairs", {
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/conversion-pairs",
headers={
"x-auth-token": "Bearer $TOKEN",
},
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()req, _ := http.NewRequest("GET", "https://api.zise.com/v1/merchant/conversion-pairs",
nil)
req.Header.Set("x-auth-token", "Bearer $TOKEN")
res, err := http.DefaultClient.Do(req)
// 金额字段用 string 接,不要 float64HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.zise.com/v1/merchant/conversion-pairs"))
.header("x-auth-token", "Bearer $TOKEN")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
// 金额字段用 String / BigDecimal,不要 double$ch = curl_init('https://api.zise.com/v1/merchant/conversion-pairs');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-auth-token: Bearer $TOKEN',
],
]);
$res = curl_exec($ch);
// 金额用 bcmath / 字符串,不要 floatval
{
"data": [
{
"from_asset": "USDT",
"to_asset": "USDC",
"rate": "0.999500",
"rate_mode": "fixed",
"min_amount": "100.000000",
"max_amount": "200000.000000",
"daily_amount_limit": "500000.000000",
"daily_count_limit": 20,
"fee_mode": "percent",
"fee_side": "to",
"fee_bps": 15,
"fee_fixed": "0.000000",
"ledger_scale_from": 6,
"ledger_scale_to": 6
}
],
"next_cursor": null,
"has_more": false
}