coinmarketcap

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 10 Imported by: 4

Documentation

Overview

Package coinmarketcap Coin Market Cap API client for Go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoinID

func CoinID(symbol string) (int, error)

CoinID gets the ID for the cryptocurrency

func CoinSlug

func CoinSlug(symbol string) (string, error)

CoinSlug gets the slug for the cryptocurrency

func CoinSymbol added in v0.1.5

func CoinSymbol(slug string) (string, error)

CoinSymbol gets the symbol for the cryptocurrency

func GlobalAltcoinMarketGraph

func GlobalAltcoinMarketGraph(options *GlobalAltcoinMarketGraphOptions) (*types.MarketGraph, error)

GlobalAltcoinMarketGraph gets graph data points of altcoin market

func GlobalMarket

func GlobalMarket(options *GlobalMarketOptions) (*types.GlobalMarket, error)

GlobalMarket gets information about the global market of the cryptocurrencies

func GlobalMarketGraph

func GlobalMarketGraph(options *GlobalMarketGraphOptions) (*types.MarketGraph, error)

GlobalMarketGraph get graph data points of global market

func Listings

func Listings() ([]*types.Listing, error)

Listings gets all coin listings

func Markets

func Markets(options *MarketsOptions) ([]*types.Market, error)

Markets get market data for a cryptocurrency

func Price

func Price(options *PriceOptions) (float64, error)

Price gets price of a cryptocurrency

func Ticker

func Ticker(options *TickerOptions) (*types.Ticker, error)

Ticker gets ticker information about a cryptocurrency

func TickerGraph

func TickerGraph(options *TickerGraphOptions) (*types.TickerGraph, error)

TickerGraph gets graph data points for a cryptocurrency

func Tickers

func Tickers(options *TickersOptions) ([]*types.Ticker, error)

Tickers gets ticker information on coins

Types

type GlobalAltcoinMarketGraphOptions

type GlobalAltcoinMarketGraphOptions struct {
	Start int64
	End   int64
}

GlobalAltcoinMarketGraphOptions options for global altcoin market graph method

type GlobalMarketGraphOptions

type GlobalMarketGraphOptions struct {
	Start int64
	End   int64
}

GlobalMarketGraphOptions options for global market graph method

type GlobalMarketOptions

type GlobalMarketOptions struct {
	Convert string
}

GlobalMarketOptions options for global data method

type Interface

type Interface interface {
	Listings() ([]*types.Listing, error)
	Tickers(options *TickersOptions) ([]*types.Ticker, error)
	Ticker(options *TickerOptions) (*types.Ticker, error)
	TickerGraph(options *TickerGraphOptions) (*types.TickerGraph, error)
	GlobalMarket(options *GlobalMarketOptions) (*types.GlobalMarket, error)
	GlobalMarketGraph(options *GlobalMarketGraphOptions) (*types.MarketGraph, error)
	GlobalAltcoinMarketGraph(options *GlobalAltcoinMarketGraphOptions) (*types.MarketGraph, error)
	Markets(options *MarketsOptions) ([]*types.Market, error)
	Price(options *PriceOptions) (float64, error)
	CoinID(symbol string) (int, error)
	CoinSlug(symbol string) (string, error)
	CoinSymbol(slug string) (string, error)
}

Interface interface

type MarketsOptions

type MarketsOptions struct {
	Symbol string
}

MarketsOptions options for markets method

type PriceOptions

type PriceOptions struct {
	Symbol  string
	Convert string
}

PriceOptions options for price method

type TickerGraphOptions

type TickerGraphOptions struct {
	Symbol string
	Start  int64
	End    int64
}

TickerGraphOptions options for ticker graph

type TickerOptions

type TickerOptions struct {
	Symbol  string
	Convert string
}

TickerOptions options for ticker method

type TickersOptions

type TickersOptions struct {
	Start   int
	Limit   int
	Convert string
	Sort    string
}

TickersOptions options for tickers method

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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