exchange

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListExchanges

func ListExchanges() []string

func NewBigOneClient

func NewBigOneClient(httpClient *http.Client) *bigOneClient

func NewBinanceClient

func NewBinanceClient(httpClient *http.Client) *binanceClient

func NewBitfinixClient

func NewBitfinixClient(httpClient *http.Client) *bitfinixClient

func NewBittrexClient

func NewBittrexClient(httpClient *http.Client) *bittrexClient

func NewCoinmarketcapClient

func NewCoinmarketcapClient(httpClient *http.Client) *coinMarketCapClient

I don't like returning a general type here, any other better way to use the factory pattern?

func NewGateClient

func NewGateClient(httpClient *http.Client) *gateClient

func NewHitBtcClient

func NewHitBtcClient(httpClient *http.Client) *hitBtcClient

func NewHuobiClient

func NewHuobiClient(httpClient *http.Client) *huobiClient

func NewOKExClient

func NewOKExClient(httpClient *http.Client) *okexClient

func NewPoloniexClient added in v0.2.0

func NewPoloniexClient(httpClient *http.Client) *poloniexClient

func NewZBClient

func NewZBClient(httpClient *http.Client) *zbClient

func NewkrakenClient added in v0.2.0

func NewkrakenClient(httpClient *http.Client) *krakenClient

Types

type ExchangeClient

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

func CreateExchangeClient

func CreateExchangeClient(exchangeName string, httpClient *http.Client) ExchangeClient

Factory method to create exchange client

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