Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jon4hz/go-1inch
🦄 A Go wrapper for the 1Inch API
https://github.com/jon4hz/go-1inch
1inch api-wrapper binance-smart-chain dex ethereum exchange-api polygon
Last synced: 9 days ago
JSON representation
🦄 A Go wrapper for the 1Inch API
- Host: GitHub
- URL: https://github.com/jon4hz/go-1inch
- Owner: jon4hz
- License: mit
- Created: 2021-06-03T00:50:04.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-27T00:22:49.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T20:06:00.514Z (5 months ago)
- Topics: 1inch, api-wrapper, binance-smart-chain, dex, ethereum, exchange-api, polygon
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 16
- Watchers: 4
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-1inch
A golang API wrapper for the 1inch API
## Getting started
[![testing](https://github.com/jon4hz/go-1inch/actions/workflows/testing.yml/badge.svg)](https://github.com/jon4hz/go-1inch/actions/workflows/testing.yml)
```go
package mainimport (
"context"
"fmt"
"log"go1inch "github.com/jon4hz/go-1inch"
)func main(){
// create a new client
client := go1inch.NewClient()// check the health status from the API pointing to the ethereum network
health, _, err := client.Healthcheck(context.Background(), go1inch.Eth)
if err != nil {
log.Fatal(err)
}fmt.Println(health)
}```
## Ressources
- [Official API Docs](https://docs.1inch.io/docs/aggregation-protocol/api/swagger/)
- [Go Docs](https://pkg.go.dev/github.com/jon4hz/go-1inch)