Skip to main content

4. Calculate exchange recv

Calculate exchange recv

此接口用於根據數量計算可贖回的陣列。

POST
/openapi/order/calculate
請求
NameTypeRequiredDescription
exchange_modestringyes兌換模式(浮動比例 | 固定比例)
from_abbrstringyes幣名稱
from_chainstringyes鏈名稱
from_quantityfloatyes數量
to_addressarrayyes接收地址列表
to_abbrstringyes接收幣名稱
to_addressstringyes接收地址
to_chainstringyes接收鏈名稱
to_group_ratiofloatyes接收組比例
to_ratiofloatyes接收比例

請求

{
"exchange_mode": "float",
"from_abbr": "ARB",
"from_chain": "Arbitrum",
"from_quantity": 100,
"to_address": [
{
"to_abbr": "ETH",
"to_address": "****************",
"to_chain": "Arbitrum",
"to_group_ratio": 1,
"to_ratio": 1
}
]
}
響應
NameTypeDescription
codeint業務狀態碼
dataobjectData Objects
min_from_quantityfloatMinimum order quantity
toarrayReceiving Address list
group_quantityfloatNumber of groups
to_abbrstringReceive coin name
to_addressstringReceiving Address
to_chainstringReceiving chain name
to_group_ratiofloatReceiving group ratio
to_quantityfloatReceive quantity
to_ratiofloatReceiving ratio
msgstring業務消息

示例響應

{
"code": 0,
"msg": "success",
"data": {
"min_from_quantity": 7,
"to": [
{
"to_chain": "TRON",
"to_abbr": "TRX",
"to_ratio": 1,
"to_group_ratio": 1,
"to_address": "TLxozzoG3Vxy9AqDyiv9fcJZtbTYhAy2rQ",
"to_quantity": 3861.37545,
"group_quantity": 3861.37545
}
]
}
}