The Unofficial CoinMarketCap API client for Go.
Supports the CoinMarketCap Version 2 (V2) Public API
https://godoc.org/github.com/coincircle/go-coinmarketcap
go get -u github.com/coincircle/go-coinmarketcap
package main
import (
"fmt"
"log"
cmc "github.com/coincircle/go-coinmarketcap"
)
func main() {
tickers, err := cmc.Tickers(&cmc.TickersOptions{
Start: 0,
Limit: 100,
Convert: "USD",
})
if err != nil {
log.Fatal(err)
}
for _, ticker := range tickers {
fmt.Println(ticker.Symbol, ticker.Quotes["USD"].Price)
}
}
Check out the ./example
directory and documentation.
MIT