Skip to main content

5. Place order

Place order

This interface is used to create an order. You can create an order with up to 5 receiving addresses.

POST
/openapi/order/place
Header
NameTypeRequiredDescription
Ref-CodestringnoReferral code for the affiliate program; including this field will earn you a share of the profits.

Header


{
Ref-Code: "UtZ***P9"
}

Request
NameTypeRequiredDescription
exchange_modestringyesExchange mode [ float | fixed ]
from_abbrstringyesCoin name
from_chainstringyesChain name
from_quantityfloatyesQuantity (minimum: 1e-8)
calc_idstringnoThe calc_id is valid for 30 seconds
to_addressarrayyesReceiving Address list
to_abbrstringyesReceive coin name
to_addressstringyesReceiving Address
to_chainstringyesReceiving chain name
to_ratiofloatyesThe percentage of received assets out of source assets (0-1) represents 0% - 100%.
If it's a 1-for-1 exchange, this parameter can be left blank and defaults to 1.

Request

{
"exchange_mode": "fixed",
"from_abbr": "ARB",
"from_chain": "Arbitrum",
"from_quantity": 100,
"calc_id": "c294e5e1-7fea-46d4-945f-b2e4aa695e4f"
"to_address": [
{
"to_abbr": "ETH",
"to_address": "************",
"to_chain": "Arbitrum",
"to_ratio": 1
}
]
}
Response
NameTypeDescription
codeintBusiness status code
dataobjectData Objects
addressstringWallet Address
order_nostringOrder number
query_codestringQuery code
msgstringBusiness message

Example Response

{
"code": 0,
"msg": "success",
"data": {
"order_no": "XUcQdnSg",
"address": "TXf94kgP9HuVHr1bRLmHaL1hVPbUYipDGh",
"query_code": "3XXNCL8PXZX6",
}
}