exchange

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register added in v0.6.0

func Register(p ExchangeClientProvider)

Types

type ExchangeClient

type ExchangeClient interface {
	GetName() string
	GetSymbolPrice(string) (*SymbolPrice, error)
}

func NewBigOneClient

func NewBigOneClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewBinanceClient

func NewBinanceClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewBitfinixClient

func NewBitfinixClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewBittrexClient

func NewBittrexClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewCoinBaseClient added in v0.5.0

func NewCoinBaseClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewCoinMarketCapClient added in v0.6.0

func NewCoinMarketCapClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewGateClient

func NewGateClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewHitBtcClient

func NewHitBtcClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewHuobiClient

func NewHuobiClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewKrakenClient added in v0.6.0

func NewKrakenClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewOKexClient added in v0.6.0

func NewOKexClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewPoloniexClient added in v0.2.0

func NewPoloniexClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

func NewZBClient

func NewZBClient(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

type ExchangeClientProvider added in v0.6.0

type ExchangeClientProvider func(queries map[string]*config.PriceQuery, httpClient *http.Client) ExchangeClient

type Registry added in v0.6.0

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry added in v0.6.0

func NewRegistry(cfg *config.Config, httpClient *http.Client) *Registry

func (*Registry) GetAllNames added in v0.6.0

func (r *Registry) GetAllNames() []string

func (*Registry) GetSymbolPrices added in v0.6.0

func (r *Registry) GetSymbolPrices(priceQueries []*config.PriceQuery) []*SymbolPrice

type SymbolPrice

type SymbolPrice struct {
	Symbol           string
	Price            string
	Source           string
	UpdateAt         time.Time
	PercentChange1h  float64
	PercentChange24h float64
}

Jump to

Keyboard shortcuts

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