Skip to navigation

Convert trade

Execute a convert trade using a quoteId obtained from the estimate-quote endpoint before the quote expires.

Authentication

OK-ACCESS-KEYstring
Your API key.
OK-ACCESS-SIGNstring

Base64-encoded HMAC-SHA256 signature of the prehash string.

OK-ACCESS-TIMESTAMPstring

ISO 8601 UTC timestamp, e.g. 2020-12-08T09:08:57.715Z.

OK-ACCESS-PASSPHRASEstring
The passphrase you set when creating the API key.

Request

This endpoint expects an object.
quoteIdstringRequired

Quote ID returned by the estimate-quote endpoint.

baseCcystringRequired

Base currency, e.g. BTC in BTC-USDT.

quoteCcystringRequired

Quote currency, e.g. USDT in BTC-USDT.

sideenumRequired

Trade side based on the base currency. buy: buy base currency; sell: sell base currency.

Allowed values:
szstringRequired
Quote amount. The amount should match the quote and must not exceed the maximum amount of the currency pair.
szCcystringRequired
Currency of the quote amount, must be either the base or quote currency.
clTReqIdstringOptional

Client-supplied order ID. A combination of case-sensitive alphanumerics, all numbers, or all letters of up to 32 characters.

tagstringOptional

Order tag. A combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters.

convertModeenumOptional

Convert mode. 0: standard convert (default); 1: large order convert for VIP.

Allowed values:

Response

Successful response
codestringOptional

Result code. 0 means success; any other value is an error code.

msgstringOptional
Error message. Empty on success.
datalist of objectsOptional