Need sample code for token swap using typescript sdk #228
-
Discord user IDNo response Describe your question in detail.Hi, i am new to aptos and i was not able to find code examples for token swap that uses aptos typescript sdk. What error, if any, are you getting?No response What have you tried or looked at? Or how can we reproduce the error?I searched aptos docs and google, but didn't find something helpful Which operating system are you using?Windows Which SDK or tool are you using? (if any)TypeScript SDK Describe your environment or tooling in detailNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This should help - #111 (check out the simulation section). The discussion above tells you how to get the quote for a swap, in order to execute the swap you can simply build, sign and submit (instead of simulating) the transaction. Here's the documentation on how you can do that. Some DEXs have their own SDK you can use too. |
Beta Was this translation helpful? Give feedback.
This should help - #111 (check out the simulation section).
The discussion above tells you how to get the quote for a swap, in order to execute the swap you can simply build, sign and submit (instead of simulating) the transaction. Here's the documentation on how you can do that.
Some DEXs have their own SDK you can use too.