Get Rate for a Token Pair
Get Price Route
GET
https://apiv5.paraswap.io/prices
This endpoint gets the optimal price and price route required to swap from one token to another.
Query Parameters
🧙Though srcDecimals and destDecimals are optional parameters it is highly recommended to add them while doing the pricing. This will allow you to get prices for all the tokens, including the ones which are also not listed by ParaSwap.
Swaps fees and Swap&Transfer (where the receiver is not the same as the sender) don't work when swapOnUniswap
, swapOnUniswapFork
, swapOnZeroXv2
, and swapOnZeroXv4
etc. contract methods are used.
If you would like to disable these methods you can do so by setting a whitelist for methods where Swap&Transfer is supportedincludeContractMethods=simpleSwap,multiSwap,megaSwap
Last updated