Before you begin, it is highly recommended to review the Trade start page, as it explains some of the terms used here as well, in case you haven't seen it yet.

What does this endpoint do?

The objective of this endpoint is to allow users to request a quote for currency conversions. The generated quote has a predefined lifetime, within which it must be accepted for the conversion to be successful. If the time limit is exceeded, the quote will be rejected.

Upon using this endpoint, it returns the equivalent amount in the target currency for the specified value in the provided currency, as well as an identifier to be used in subsequent operations. This type of quote operation is known as Over-The-Counter (OTC).

In other words, the fromSize and toSize represent the comparative value between the two currencies being traded. If you want to determine the value of a known currency compared to an unknown (or secondary) currency, you can simply set one of the properties (either fromSize or toSize) to "1" and the other property to "0." This will prompt the system to return the current value of the secondary currency in comparison to the known one. For example, if you want to determine the exchange rate for a unit value of USDT/BTC, you would set the fromSize to "1" and the formCurrency to "USDT," while setting the toSize to "0" and the toCurrency to "BTC." In this case, the API response would return the equivalent value in BTC, which could be something like 60000 USDT (depending on the current exchange rate).

Here are some example use cases to better illustrate how to use this endpoint:

  • Case 1: You want to sell 49.67 USDT and buy Brazilian reais (BRL) to find out how much BRL will be traded. The payload could look like the following:
{
    "fromCurrency": "USDT",
    "toCurrency": "BRL",
    "fromSize": 49.67,
    "toSize": 0
}
  • Case 2: You want to buy 49.67 USDT based on the Brazilian reais (BRL) to know how much BRL will be traded. The payload could look like the following:
{
    "fromCurrency": "BRL",
    "toCurrency": "USDT",
    "fromSize": 0,
    "toSize": 49.67
}
  • Case 3: You want to sell USDT and buy the equivalent amount of 100.00 BRL, knowing how much USDT is required for the transaction. The payload could be as follows:
{
    "fromCurrency": "USDT",
    "toCurrency": "BRL",
    "fromSize": 0,
    "toSize": 100
}
  • Case 4: You want to buy USDT with the equivalent amount of 100.00 BRL. The payload could be as follows:
{
    "fromCurrency": "BRL",
    "toCurrency": "USDT",
    "fromSize": 100,
    "toSize": 0
}

It is important to note that the typical flow of this endpoint involves using the provided quote in the Make a Trade endpoint for currency conversion. However, this endpoint can also be used in other flows.

If you provide the optional parameters (taxId and taxIdCountry), they will be validated during the "Make a Trade" process to ensure they match those from the requested quote.

The response will include some parameters, each with the following meanings:

  • QuoteId: Id of the quote necessary to accept it
  • Price: Price of a unit of currency after fees applied
  • Size: Resulting amount of the operation
  • ExpireAt: Quote time expiration
Language
Click Try It! to start a request and see the response here!