You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a strange error, the buildTx method always returns the error "The rate has changed, please re-query the latest Price"
This error always occurs when exchanging stablecoins. In example: Network(Polygon), USDC/DAI
Also, if when initializing the class new ParaSwap(137, 'https://api.paraswap.io') with an address not on apiv5, then the same method with the same parameters was created successfully once, but then again the same error
Hi, i faced the same problem. when creating a transaction on the USDC/fUSDT pair in Fantom network. I tried sending a transaction via 'https://api.paraswap.io ' and https://apiv5.paraswap.io ' . How can i fix it?
You may need to add more slippage tolerance on your transaction parameters. Specifically, you should set the destAmount in buildTx to something lower than what is in the priceRoute, the lower you make it the less likely you are to see this error. For stablecoin->stablecoin swaps the rate shouldn't deviate much, so you don't need much slippage tolerance, but you still need something in case there are rounding/interpolation issues on our prices. It is normally recommended to deduct some % on the price you get from ParaSwap to handle slippage, but you could also fix some minimum price that you are willing to accept (may make more sense for swapping between USD stablecoins where you expect exchange rate close to 1). Hope that helps!
Hey!
I noticed a strange error, the buildTx method always returns the error "The rate has changed, please re-query the latest Price"
This error always occurs when exchanging stablecoins. In example: Network(Polygon), USDC/DAI
Also, if when initializing the class new ParaSwap(137, 'https://api.paraswap.io') with an address not on apiv5, then the same method with the same parameters was created successfully once, but then again the same error
Code example:
Response: error: "The rate has changed, please re-query the latest Price"
The text was updated successfully, but these errors were encountered: