Skip to main content

Convert Trade

ConvertTradeCreate

POST /viewer/trade

Description

  • create convert trade
  • the generated API key needs to add scopes about order create

Request

Request Parameters

NameTypeRequireDescriptionExample
quote_idstringtruequote id"97611740-1ae5-4989-812d-2cb1566fd0f3"
account_typestringfalseaccount type,default FUND"FUND"
  • support http parameter transmission method: application/json
  • quote_id get from ConvertQuote interface
  • account_type should be one of FUND, SPOT, and ALL, and the default value is FUND
  • if you set account_type to ALL, the system will give priority to using funds in the FUND account, and if the account is not enough, the difference will be made up from the SPOT account

Response

Loading ....

GetConvertTrades

GET /viewer/trades

Description

  • get convert trade history
  • the generated API key needs to add scopes about trade read

Request

Request Parameters

NameTypeRequireDescriptionExample
page_tokenstringfalserequest page after this page token
limitnumberfalseDefault 100, Max 200
  • support two http parameter transmission methods: application/json and query params
  • page_token is the page number, which is based on decimal numbers and is encoded through base64.

Response

Loading ....

GetConvertTradeDetail

GET /viewer/trade

Description

  • get convert trade detail
  • the generated API key needs to add scopes about trade read

Request

Request Parameters

NameTypeRequireDescriptionExample
idnumberfalseEither id or quote_id is required11873
quote_idstringfalseEither id or quote_id is required"97611740-1ae5-4989-812d-2cb1566fd0f3"
  • support two http parameter transmission methods: application/json and query params
  • id and quote_id are mutually exclusive, only one of them can be passed on
  • quote_id get from ConvertQuote interface

Response

Loading ....