Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
V2
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmota committed May 7, 2018
1 parent 133767f commit e47e34d
Show file tree
Hide file tree
Showing 9 changed files with 433 additions and 231 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
[![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/coincircle/go-coinmarketcap/master/LICENSE.md) [![Build Status](https://travis-ci.org/coincircle/go-coinmarketcap.svg?branch=master)](https://travis-ci.org/coincircle/go-coinmarketcap) [![Go Report Card](https://goreportcard.com/badge/github.com/coincircle/go-coinmarketcap?)](https://goreportcard.com/report/github.com/coincircle/go-coinmarketcap) [![GoDoc](https://godoc.org/github.com/coincircle/go-coinmarketcap?status.svg)](https://godoc.org/github.com/coincircle/go-coinmarketcap)

Support the CoinMarketCap [V2](https://coinmarketcap.com/api/) Public API.

## Documentation

[https://godoc.org/github.com/coincircle/go-coinmarketcap](https://godoc.org/github.com/coincircle/go-coinmarketcap)
Expand All @@ -33,15 +35,20 @@ import (
)

func main() {
coins, err := cmc.GetAllCoinData(0)
coins, err := cmc.Tickers(&cmc.TickersOptions{
Start: 0,
Limit: 100,
Convert: "USD",
})
if err != nil {
log.Fatal(err)
}

for _, coin := range coins {
fmt.Println(coin.Symbol, coin.PriceUSD)
fmt.Println(coin.Symbol, coin.Quotes["USD"].Price)
}
}

```

## Examples
Expand Down
Loading

0 comments on commit e47e34d

Please sign in to comment.