V4 to V5 Migration
ParaSwap Migration Document for changes from v4 to v5
Here are the important changes from ParaSwap API v4 to v5:
1. /prices
endpoint:
/prices
endpoint:Renamed Parameters:
(Note: only the parameter name has changed, the content remains the same).
X-Partner
(in Headers) →partner
(in query): partner/referrer string.from
→srcToken
(Source Token Address).to
→destToken
(Destination Token Address).fromDecimals
→srcDecimals
(Source Token Decimals).toDecimals
→destDecimals
(Destination Token Decimals)
Change in Response Body:
The response body of the /prices endpoint has changed to be uniform for all routing methods:
simpleSwap
,multiPath
, andmegaPath
prices responses. Please infer to this example to understand the response body structure.
Other Important changes:
The
spender
parameter in the response body has been changed to thetokenTransferProxy
parameter.Everywhere
from
andto
token-parameters are renamed tosrcToken
&destToken
.
2. /transactions
endpoint
/transactions
endpointAdded Parameters:
slippage
: Could be used instead of destAmount in SELL orders and srcAmount in BUY orders. It will automatically take the quote amount to be the optimal price minus slippage.partnerAddress
: Partner Address.partnerFeeBps
: Used together with Partner Address.Note: Instead of
X-partners
header orreferrer
parameter, usepartner
(if referrer string is available) orpartnerAddress
if partner address is available.
Removed Parameters:
useReduxToken
: REDUX token has been discontinued in v5.X-Partner
(in Headers).
Renamed Parameters:
fromDecimals
→srcDecimals
(Source Token Decimals).toDecimals
→destDecimals
(Destination Token Decimals)
Other Changes:
network
has become a required parameter in/transactions
endpoint.
Last updated