Conversion

Convert from one fungible asset to another and settle transactions without ever taking assets out of custody.

Demo code can be found at Github

Trade Rate

POST /v1/conversion/rate

Retrieves exchange rate between currencies.

Request Body

Name
Type
Description

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"
}
Code Example

Get a Quote

POST /v1/conversion/quote

Get a quote for currency conversion.

Request Body

Name
Type
Description

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.

Execute a trade

POST /v1/conversion/execute

Execute a trade that has been previously quoted

Request Body

Name
Type
Description

quoteId*

String

Quote ID

Last updated