please give more example
cdkagaya opened this issue · comments
Felix Wang commented
Hi, thanks to your great work.
Could you write some more example such as how to use it to swap coins?
Regards,
jon4hz commented
Hey, the 1inch API cannot be used to swap coins. It is only used to fetch information.
If you want to swap coins using go, you can use the ethclient
from the go-ethereum repository. Also abigen
allows you to convert a contract ABI to a go package so you can directly use the functions from the router contract in your code.
Felix Wang commented
Thank you very much for this information.
jon4hz commented
You're welcome :)