Skip to main content

The migration guide


This guide helps you migrate Exchange API from v1 to v2 smoothly and efficiently. Exchange API v2 is a faster, safer, and more flexible version of our API.

info

Rates and limits from the Exchange API v2 estimation methods are compatible only with Exchange API v2. You can use them only to create a transaction with the Exchange API v2 methods, such as createTransaction and createFixTransaction.


How to migrate

To migrate Exchange API from v1 to v2, follow these steps:

  1. Generate private and public keys.
  2. Switch the API authentication schema.
  3. Update the endpoint URL to https://api.criptointercambio.com/v2.
  4. Update your application to account for several breaking changes made in v2.

Updated methods

The following methods has several important updates and new parameters. For details, check the API reference.

MethodChangelog
createFixTransaction
  • Renamed amount to amountFrom.
  • amountExpectedTo value equals the difference between amountExpectedTo and networkFee.
  • Added request parameters:
    • fromAddress
    • fromExtraId
    • userMetadata
  • Removed response parameters:
    • apiExtraFee – retrieve using getTransactions.
    • exchangeFee – retrieve using getTransactions.
    • amountTo – always 0 since there can be no actual payout for a new transaction.
  • Added response parameters:
    • type
    • refundAddress
    • refundExtraId
    • networkFee
createTransaction
getExchangeAmount
  • Renamed amount to amountFrom.
  • result value equals the difference between amountTo and networkFee.
  • Added userMetadata request parameter
  • Added response parameters:
    • amountTo
    • Limits parameters (max, maxFrom, maxTo, min, minFrom, minTo).
Info
Retrieves limits only if the amountFrom value is within them.
getTransactions
  • Replaced dateFrom by since.
  • Added request parameters as additional filters:
    • status
    • payoutAddress
  • Added payTill response parameter.

Deprecated methods

The following methods are not actual in Exchange API v2.

Deprecated methodAlternative method
getPairsParams and getMinAmountgetFixRateForAmount and getExchangeAmount.
Ensure the transaction amount is within limits.
getFixRategetFixRateForAmount.
Ensure the transaction amount is within limits.