Swaps

How to swap one token for another using the Wallet API

Performing a token swap consists out of 4 steps:

Step 01: Retrieve the token pairs that are available for swapping.

page1 - Retrieve token pairs

Step 02: Retrieve the current exchange rate of the desired token pair.

page2 - Retrieve exchange rate

Step 03: Generate the transaction that will perform the swap

page3 - Build swap tx

Step 04: Execute the token swap, for this you will need to take the response from step 03 and launch transactions accordingly.

page4 - Execute swap

Last updated