fetchers

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// BinanceName defines the Binance exchange name
	BinanceName = "Binance"
	// BitfinexName defines the Bitfinex exchange name
	BitfinexName = "Bitfinex"
	// CryptocomName defines the crypto.com exchange name
	CryptocomName = "Crypto.com"
	// GeminiName defines the Gemini exchange name
	GeminiName = "Gemini"
	// HitbtcName defines the HitBTC exchange name
	HitbtcName = "HitBTC"
	// HuobiName defines the Huobi exchange name
	HuobiName = "Huobi"
	// KrakenName defines the Kraken exchange name
	KrakenName = "Kraken"
	// OkexName defines the Okex exchange name
	OkexName = "Okex"
	// XExchangeName defines the XExchange name
	XExchangeName = "XExchange"
)

Variables

View Source
var ImplementedFetchers = map[string]struct{}{
	BinanceName:   {},
	BitfinexName:  {},
	CryptocomName: {},
	GeminiName:    {},
	HitbtcName:    {},
	HuobiName:     {},
	KrakenName:    {},
	OkexName:      {},
	XExchangeName: {},
}

ImplementedFetchers is the map of all implemented exchange fetchers

Functions

func NewPriceFetcher

func NewPriceFetcher(fetcherName string, responseGetter aggregator.ResponseGetter, graphqlGetter aggregator.GraphqlGetter, xExchangeTokensMap map[string]XExchangeTokensPair) (aggregator.PriceFetcher, error)

NewPriceFetcher returns a new price fetcher of the type provided

func StrToPositiveFloat64

func StrToPositiveFloat64(v string) (float64, error)

StrToPositiveFloat64 converts the provided string to its float64 representation

Types

type XExchangeTokensPair added in v1.2.5

type XExchangeTokensPair struct {
	Base  string
	Quote string
}

XExchangeTokensPair defines a base-quote pair of ids used by XExchange

Jump to

Keyboard shortcuts

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