v1

latestOpenAPI 3.0.02026-07-14293257.6 KB
DeX Swap

Create Swap Session

This API is used to create DeX swap session for token swap transaction.

post/api/v1/sessions/swap

Request body

successURLstring

URL to redirect user after completing a transaction

cancelURLstring

URL to redirect user after cancelling a transaction

userEmailstring required

An existing user email needs to be provided when creating a transaction session

tokenInstring required

Symbol of token used for swap from

tokenOutstring required

Symbol of token used for swap to

slippagePercentagestring

Slippage tolerance percentage

amountnumber required

Amount of tokens to swap

chainstring required

Blockchain to which the transaction will be sent. See https://thirdfi.readme.io/reference/dexswap-overview#list-of-chains-we-supported for more information.

isNativeboolean

If true, native token will be used. If false, wrapped tokens (E.g. WETH) will be used. defaults to false

exactInboolean

If true, the exact amount entered will be considered as input token amount. If false, the entered amount will be considered as required output amount. Default to true

Response

Session is created.

statusCodenumber
messagestring
dataobject

Session object. See https://thirdfi.readme.io/reference/the-session-object for more information.