Execute a Conversion

The PUT /currency_conversions/{quoteId} method enables you to execute a conversion quote within the 20-second expiration limit. You use the value of the variable id returned by the request-quote call to submit the conversion to Bitso's Conversion Engine. After you submit a conversion, it starts executing asynchronously.

HTTP Request

Header Parameters

You must specify the following authorization parameters in your request:

ParameterDescriptionRequired
keySee the section, AuthorizationYes
signatureSee the section, AuthorizationYes
nonceSee the section, AuthorizationYes

Path Parameters

You must specify the following path parameter in your request:

ParameterDescriptionRequired
quoteIdIdentifies the quote you want to execute. The request-quote call returns it as id.Yes

Body Parameters

The endpoint does not require any body parameters. However, as shown below, you must send an empty JSON object in your request body. Otherwise, the service throws an error.

{}

JSON Response Payload

The endpoint returns a JSON object representing the executed conversion. This object includes the following fields:

Field NameDescriptionType
bookThe book to use.String
createdCreation epoch of the quote in milliseconds.Number
directionIndicates whether it is a buy or a sell.String
estimated slippageAn estimation of the difference between the expected execution rate and the actual execution rate.Object
expiresExpiration epoch of the quote in milliseconds.Number
from_amountNumber of funds you are willing to convert specified in the source currency.String
from_currencyTicker of the source currency.String
idThe quote's unique identifier.String
next_recurrent_eventsIndicates when the next conversions are to take place in milliseconds. Used when conversions are programmed in the Bitso app to occur at specific periods.Object
oidThe order ID.String
paddingThe fee users pay for the conversion.String
rateThe exchange rate Bitso offers for the conversion.String
rate_currencyTicker of the currency in which the conversion rate is expressed.String
statusThe conversion's state. Possible values: open, completed, and failed.String
to_amountNumber of funds you expect to receive as a product of the conversion specified in the target currency.String
to_currencyTicker of the target currency.String

The following response object exemplifies the JSON object returned:

{
   "success":true,
   "payload":{
      "id":"FNMNZDOj",
      "from_amount":"2000.00000000",
      "from_currency":"mxn",
      "to_amount":"107.23505969",
      "to_currency":"usd",
      "estimated_slippage":{
         "level":"normal",
         "message":"",
         "value":"0.00"
      },
      "created":1678483859671,
      "expires":1678483889671,
      "rate":"18.65",
      "rate_currency":"mxn",
      "padding":"0.008",
      "direction":"buy",
      "book":"btc_mxn",
      "status":"open",
      "oid":"FNMNZDOj",
      "next_recurrent_events":{
         "DAILY":1678570259671,
         "WEEKLY":1679088659671,
         "MONTHLY":1681158659671
      }
   }
}