Migration from v5.0 to v5.2

Following changes must be done to migrate from v5.0 to v5.2

Parameter change for /quote

Request

Renaming of parameter:
fromTokenAddress -> src
toTokenAddress -> dst

Added new parameter optional query params:

includeTokensInfo: boolean - Return fromToken and toToken info in response
includeProtocols: boolean - Return used swap protocols in response
includeGas: boolean - Return approximated gas in response

Response:

Renaming of parameter:
estimatedGas -> gas
toTokenAmount -> toAmount

Specialities:

By default only toAmount will be in the response. Additional parameter can be activated by additional parameters.

Parameter change for /swap

Request

Renaming of parameter:
fromTokenAddress -> src
toTokenAddress -> dst
fromAddress -> from
destReceiver -> receiver
referrerAddress -> referrer
compatibilityMode -> compatibility

Added new parameter optional query params:

includeTokensInfo: boolean - Return fromToken and toToken info in response
includeProtocols: boolean - Return used swap protocols in response
includeGas: boolean - Return approximated gas in response

Response:

Renaming of parameter:
toTokenAmount -> toAmount

Specialities:

By default only toAmount and tx will be in the response. Additional parameter can be activated by additional parameters.

Did you find what you need?