coinpaprika-api-go-client

module
v2.4.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2019 License: MIT

README

Coinpaprika API Go Client

Build Status go-doc Go Report Card

Usage

This library provides convenient way to use coinpaprika.com API in Go.

Coinpaprika delivers full market data to the world of crypto: coin prices, volumes, market caps, ATHs, return rates and more.

Getting started

package main

import (
	"fmt"

	"github.com/coinpaprika/coinpaprika-api-go-client/coinpaprika"
)

func main() {
	paprikaClient := coinpaprika.NewClient(nil)

	tickers, err := paprikaClient.Tickers.List(nil)
	if err != nil {
		panic(err)
	}

	for _, t := range tickers {
		if t.Name == nil || t.Symbol == nil || t.Rank == nil {
			continue
		}

		fmt.Println("Name:", *t.Name)
		fmt.Println("Symbol:", *t.Symbol)
		fmt.Println("Rank:", *t.Rank)
		fmt.Println("----")
	}
}

Setting custom HTTP client

customClient := &http.Client{Timeout: 10 * time.Second}
paprikaClient := coinpaprika.NewClient(customClient)

Examples

Check out the ./examples directory.

Implementation status (API v1.4.3)

Global
  • Get market overview data
Coins
  • List coins
  • Get coin by ID
  • Get twitter timeline for coin
  • Get coin events by coin ID
  • Get exchanges by coin ID
  • Get markets by coin ID
  • Get latest OHLCV
  • Get historical OHLCV
People
  • Get people by ID
Tags
  • List tags
  • Get tag by ID
Tickers
  • Get tickers for all coins
  • Get ticker information for specific coin
  • Get historical tickers for specific coin
Exchanges
  • List exchanges
  • Get exchange by ID
  • List markets by exchange ID
  • Search tool

License

CoinpaprikaAPI is available under the MIT license. See the LICENSE file for more info.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL