You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cointop/vendor/github.com/miguelmota/go-coinmarketcap/README.md

1.2 KiB

go-coinmarketcap

The Unofficial CoinMarketCap API client for Go.

License Build Status Go Report Card GoDoc

Documentation

https://godoc.org/github.com/miguelmota/go-coinmarketcap

Install

go get -u github.com/miguelmota/go-coinmarketcap

Getting started

package main

import (
	"fmt"
	"log"

	cmc "github.com/miguelmota/go-coinmarketcap"
)

func main() {
	coins, err := cmc.GetAllCoinData(0)
	if err != nil {
		log.Fatal(err)
	}

	for _, coin := range coins {
		fmt.Println(coin.Symbol, coin.PriceUSD)
	}
}

Examples

Check out the ./example directory and documentation.

License

MIT