cmc-proapi is an implementation of the CoinMarketCap API in Golang.
import "github.com/nikchis/cmc-proapi"
package main
import (
"fmt"
"github.com/nikchis/cmc-proapi"
)
const (
ApiKey = "YOUR_API_KEY"
)
func main() {
// cmcproapi client
cmc, _ := cmcproapi.New(ApiKey)
// get info about bitcoin
info, err := cmc.GetCurrencyInfoBySymbol("BTC")
if err != nil {
fmt.Printf("%+v\n", info)
}
}