Conversion
Convert from one fungible asset to another and settle transactions without ever taking assets out of custody.
Every request must contain common parameters
Trade Rate
POST
/v1/conversion/rate
Retrieves exchange rate between currencies.
Request Body
symbol*
String
Symbol of the pair to trade, for example, btc-usdt
side*
String
side of trade: buy or sell. buy: the price for buying the base currency. sell: the price for selling the quote currency.
{
"code": "200",
"data": {
"rate": "16078.8636472720095",
"symbol": "USDT-IDR",
"timeMills": 1678085017746,
"expiredMills": 1678085077746
},
"message": "success"
}
Get a Quote
POST
/v1/conversion/quote
Get a quote for currency conversion.
Request Body
symbol*
String
Symbol of the pair to trade, for example, btc-usdt
amount*
String
Amount of asset used to trade
currency*
String
The asset used to trade
side*
String
side of trade: buy or sell. buy: the price for buying the base currency. sell: the price for selling the quote currency.
xid*
String
External identifier, unique across all resources created under this account.
{
"code":"200",
"message":"success",
"data":
{
"quoteId":"2024102220000600011072223306",
"payCurrency":"USDT",
"payAmt":"100",
"settleCurrency":"ETH",
"settleAmt":"0.0375626384",
"feeCurrency":"ETH",
"feeAmt":"0.00003761",
"rate":"2659.5569",
"timeMills":1729581743749,
"expiredMills":1729582343749
}
}
Execute a trade
POST
/v1/conversion/execute
Execute a trade that has been previously quoted
Request Body
quoteId*
String
Quote ID
{
"code": "200",
"data": {
"orderNo": "12323",
"status": 22
},
"message": "success"
}
Last updated