Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 804 Bytes

README.md

File metadata and controls

38 lines (26 loc) · 804 Bytes

go-1inch

A golang API wrapper for the 1inch API

Getting started

testing

package main

import (
    "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