What does this endpoint do?

This is the endpoint where you can do the trade process. To do this, you must first request a quote using this endpoint. Once the quote is requested, you only need to complete the parameters, and the trade process will be executed.

It is important to note that for the quote to be accepted and the trade to be concluded, the quote sent in the payload must be valid in terms of both time expiration and sufficient balance to complete the currency exchange.

In this endpoint, two parameters are used: baseAccountId and quoteAccountId. These parameters represent the accounts involved in the trade. A single user can have multiple accounts, possibly in the same currency, so these parameters help specify the source and target accounts for the trade. Essentially, the trade structure follows this format:

OperationFrom | DebitTo | Credit
SellBaseAccountId | BaseCurrencyQuoteAccountId | QuoteCurrency
BuyQuoteAccountId | QuoteCurrencyBaseAccountId | BaseCurrency

However, these values can be reversed, allowing for different formats. While this doesn't significantly impact the operation itself, it is crucial to ensure that the account from which you are trading (From) has sufficient balance. Trades cannot be made from accounts with an insufficient balance.

Each client has two types of balances: the partner account balance (the amount of currency available in the account) and the user balance (the total amount across all of the client’s accounts), and the second parameter is specifically used for configurations within our internal ledger system, with the purpose of maintaining accurate records of the user's balance. This ensures that all transactions are properly tracked and the user's balance remains consistent across the system. Always ensure that you are trading from an account with sufficient balance.

For partners that do not have the configuration to maintain records of the user's balance, the taxId and taxIdCountry fields must still be filled with valid values. If you do not have specific values to use, you can input the following:

  • taxId: 32611536000130
  • taxIdCountry: BRA

It is important to note that the baseAccountId and quoteAccountId are optional parameters, designed primarily for clients who manage multiple accountIds for the same currency. These parameters allow users to specify the exact accounts they wish to trade from and to, offering flexibility and clarity in transactions involving multiple accounts within the same currency.

Language
Click Try It! to start a request and see the response here!