jon4hz / go-1inch

🦄 A Go wrapper for the 1Inch API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

please give more example

cdkagaya opened this issue · comments

Hi, thanks to your great work.
Could you write some more example such as how to use it to swap coins?

Regards,

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.

Thank you very much for this information.

You're welcome :)