Documentation ¶
Index ¶
- Constants
- func Precision(numStr string) int
- func RandomProxyUrl(proxyUrlListGroup ProxyUrlList) func(*http.Request) (*url.URL, error)
- type BinanceApi
- func (h *BinanceApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (h *BinanceApi) BoardTicker(trading string, settlement string) (board *models.Board, err error)
- func (h *BinanceApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (h *BinanceApi) FrozenCurrency() ([]string, error)
- func (h *BinanceApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *BinanceApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (h *BinanceApi) Rate(trading string, settlement string) (float64, error)
- func (h *BinanceApi) RateMap() (map[string]map[string]float64, error)
- func (h *BinanceApi) SetTransport(transport http.RoundTripper) error
- func (h *BinanceApi) Volume(trading string, settlement string) (float64, error)
- func (h *BinanceApi) VolumeMap() (map[string]map[string]float64, error)
- type BinanceTickResponse
- type BitflyerApi
- func (b *BitflyerApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (b *BitflyerApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (b *BitflyerApi) FrozenCurrency() ([]string, error)
- func (b *BitflyerApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *BitflyerApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (b *BitflyerApi) Rate(trading string, settlement string) (float64, error)
- func (b *BitflyerApi) RateMap() (map[string]map[string]float64, error)
- func (h *BitflyerApi) SetTransport(transport http.RoundTripper) error
- func (b *BitflyerApi) Volume(trading string, settlement string) (float64, error)
- func (b *BitflyerApi) VolumeMap() (map[string]map[string]float64, error)
- type CobinhoodApi
- func (h *CobinhoodApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (h *CobinhoodApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (h *CobinhoodApi) FrozenCurrency() ([]string, error)
- func (h *CobinhoodApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *CobinhoodApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (h *CobinhoodApi) Rate(trading string, settlement string) (float64, error)
- func (h *CobinhoodApi) RateMap() (map[string]map[string]float64, error)
- func (h *CobinhoodApi) SetTransport(transport http.RoundTripper) error
- func (h *CobinhoodApi) Volume(trading string, settlement string) (float64, error)
- func (h *CobinhoodApi) VolumeMap() (map[string]map[string]float64, error)
- type CobinhoodApiConfig
- type Currency
- type HitbtcApi
- func (h *HitbtcApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (h *HitbtcApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (h *HitbtcApi) FrozenCurrency() ([]string, error)
- func (h *HitbtcApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *HitbtcApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (h *HitbtcApi) Rate(trading string, settlement string) (float64, error)
- func (h *HitbtcApi) RateMap() (map[string]map[string]float64, error)
- func (h *HitbtcApi) SetTransport(transport http.RoundTripper) error
- func (h *HitbtcApi) Volume(trading string, settlement string) (float64, error)
- func (h *HitbtcApi) VolumeMap() (map[string]map[string]float64, error)
- type HitbtcApiConfig
- type HuobiApi
- func (h *HuobiApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (h *HuobiApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (h *HuobiApi) FrozenCurrency() ([]string, error)
- func (h *HuobiApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *HuobiApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (h *HuobiApi) Rate(trading string, settlement string) (float64, error)
- func (h *HuobiApi) RateMap() (map[string]map[string]float64, error)
- func (h *HuobiApi) SetTransport(transport http.RoundTripper) error
- func (h *HuobiApi) Volume(trading string, settlement string) (float64, error)
- func (h *HuobiApi) VolumeMap() (map[string]map[string]float64, error)
- type HuobiTickResponse
- type KucoinApi
- func (h *KucoinApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (h *KucoinApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (h *KucoinApi) FrozenCurrency() ([]string, error)
- func (h *KucoinApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *KucoinApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (h *KucoinApi) Rate(trading string, settlement string) (float64, error)
- func (h *KucoinApi) RateMap() (map[string]map[string]float64, error)
- func (h *KucoinApi) SetTransport(transport http.RoundTripper) error
- func (h *KucoinApi) Volume(trading string, settlement string) (float64, error)
- func (h *KucoinApi) VolumeMap() (map[string]map[string]float64, error)
- type KucoinTickResponse
- type LbankApi
- func (h *LbankApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (h *LbankApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (h *LbankApi) FrozenCurrency() ([]string, error)
- func (h *LbankApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *LbankApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (h *LbankApi) Rate(trading string, settlement string) (float64, error)
- func (h *LbankApi) RateMap() (map[string]map[string]float64, error)
- func (h *LbankApi) SetTransport(transport http.RoundTripper) error
- func (h *LbankApi) Volume(trading string, settlement string) (float64, error)
- func (h *LbankApi) VolumeMap() (map[string]map[string]float64, error)
- type LbankTickResponse
- type OkexApi
- func (h *OkexApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (h *OkexApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (h *OkexApi) FrozenCurrency() ([]string, error)
- func (h *OkexApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *OkexApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (h *OkexApi) Rate(trading string, settlement string) (float64, error)
- func (h *OkexApi) RateMap() (map[string]map[string]float64, error)
- func (h *OkexApi) SetTransport(transport http.RoundTripper) error
- func (h *OkexApi) Volume(trading string, settlement string) (float64, error)
- func (h *OkexApi) VolumeMap() (map[string]map[string]float64, error)
- type OkexTickResponse
- type P2pb2bApi
- func (h *P2pb2bApi) Board(trading string, settlement string) (board *models.Board, err error)
- func (h *P2pb2bApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (h *P2pb2bApi) FrozenCurrency() ([]string, error)
- func (h *P2pb2bApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (h *P2pb2bApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (h *P2pb2bApi) Rate(trading string, settlement string) (float64, error)
- func (h *P2pb2bApi) RateMap() (map[string]map[string]float64, error)
- func (h *P2pb2bApi) SetTransport(transport http.RoundTripper) error
- func (h *P2pb2bApi) Volume(trading string, settlement string) (float64, error)
- func (h *P2pb2bApi) VolumeMap() (map[string]map[string]float64, error)
- type P2pb2bApiConfig
- type PoloniexApi
- func (p *PoloniexApi) Board(trading string, settlement string) (*models.Board, error)
- func (p *PoloniexApi) CurrencyPairs() ([]models.CurrencyPair, error)
- func (p *PoloniexApi) FrozenCurrency() ([]string, error)
- func (h *PoloniexApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
- func (p *PoloniexApi) Precise(trading string, settlement string) (*models.Precisions, error)
- func (p *PoloniexApi) Rate(trading string, settlement string) (float64, error)
- func (p *PoloniexApi) RateMap() (map[string]map[string]float64, error)
- func (p *PoloniexApi) SetTransport(transport http.RoundTripper) error
- func (p *PoloniexApi) Volume(trading string, settlement string) (float64, error)
- func (p *PoloniexApi) VolumeMap() (map[string]map[string]float64, error)
- type ProxyUrlList
- type PublicClient
Constants ¶
View Source
const (
BINANCE_BASE_URL = "https://api.binance.com"
)
View Source
const (
BITFLYER_BASE_URL = "https://api.bitflyer.jp/v1"
)
View Source
const (
COBINHOOD_BASE_URL = "https://api.cobinhood.com"
)
View Source
const (
HITBTC_BASE_URL = "https://api.hitbtc.com/api/2"
)
View Source
const (
HUOBI_BASE_URL = "https://api.huobi.pro"
)
View Source
const (
KUCOIN_BASE_URL = "https://api.kucoin.com"
)
View Source
const (
LBANK_BASE_URL = "https://api.lbkex.com"
)
View Source
const (
OKEX_BASE_URL = "https://www.okex.com"
)
View Source
const (
P2PB2B_BASE_URL = "https://api.p2pb2b.io/api/v1"
)
View Source
const (
POLONIEX_BASE_URL = "https://poloniex.com"
)
Variables ¶
This section is empty.
Functions ¶
func RandomProxyUrl ¶
Types ¶
type BinanceApi ¶
type BinanceApi struct { BaseURL string RateCacheDuration time.Duration HttpClient *http.Client ShrimpyClient *unified.ShrimpyApiClient // contains filtered or unexported fields }
func NewBinancePublicApi ¶
func NewBinancePublicApi() (*BinanceApi, error)
func (*BinanceApi) BoardTicker ¶
func (h *BinanceApi) BoardTicker(trading string, settlement string) (board *models.Board, err error)
duplicated
func (*BinanceApi) CurrencyPairs ¶
func (h *BinanceApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*BinanceApi) FrozenCurrency ¶
func (h *BinanceApi) FrozenCurrency() ([]string, error)
func (*BinanceApi) OrderBookTickMap ¶
func (h *BinanceApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
func (*BinanceApi) Precise ¶
func (h *BinanceApi) Precise(trading string, settlement string) (*models.Precisions, error)
func (*BinanceApi) Rate ¶
func (h *BinanceApi) Rate(trading string, settlement string) (float64, error)
func (*BinanceApi) SetTransport ¶
func (h *BinanceApi) SetTransport(transport http.RoundTripper) error
type BinanceTickResponse ¶
type BitflyerApi ¶
type BitflyerApi struct { BaseURL string RateCacheDuration time.Duration HttpClient http.Client // contains filtered or unexported fields }
func NewBitflyerPublicApi ¶
func NewBitflyerPublicApi() (*BitflyerApi, error)
func (*BitflyerApi) CurrencyPairs ¶
func (b *BitflyerApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*BitflyerApi) FrozenCurrency ¶
func (b *BitflyerApi) FrozenCurrency() ([]string, error)
func (*BitflyerApi) OrderBookTickMap ¶
func (b *BitflyerApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
func (*BitflyerApi) Precise ¶
func (h *BitflyerApi) Precise(trading string, settlement string) (*models.Precisions, error)
func (*BitflyerApi) Rate ¶
func (b *BitflyerApi) Rate(trading string, settlement string) (float64, error)
func (*BitflyerApi) RateMap ¶
func (b *BitflyerApi) RateMap() (map[string]map[string]float64, error)
func (*BitflyerApi) SetTransport ¶
func (h *BitflyerApi) SetTransport(transport http.RoundTripper) error
type CobinhoodApi ¶
type CobinhoodApi struct { BaseURL string RateCacheDuration time.Duration CurrencyPairsCacheDuration time.Duration HttpClient http.Client // contains filtered or unexported fields }
func NewCobinhoodPublicApi ¶
func NewCobinhoodPublicApi() (*CobinhoodApi, error)
func (*CobinhoodApi) CurrencyPairs ¶
func (h *CobinhoodApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*CobinhoodApi) FrozenCurrency ¶
func (h *CobinhoodApi) FrozenCurrency() ([]string, error)
func (*CobinhoodApi) OrderBookTickMap ¶
func (h *CobinhoodApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
func (*CobinhoodApi) Precise ¶
func (h *CobinhoodApi) Precise(trading string, settlement string) (*models.Precisions, error)
func (*CobinhoodApi) Rate ¶
func (h *CobinhoodApi) Rate(trading string, settlement string) (float64, error)
func (*CobinhoodApi) RateMap ¶
func (h *CobinhoodApi) RateMap() (map[string]map[string]float64, error)
func (*CobinhoodApi) SetTransport ¶
func (h *CobinhoodApi) SetTransport(transport http.RoundTripper) error
type CobinhoodApiConfig ¶
type CobinhoodApiConfig struct { }
type HitbtcApi ¶
type HitbtcApi struct { BaseURL string RateCacheDuration time.Duration HttpClient *http.Client ShrimpyClient *unified.ShrimpyApiClient // contains filtered or unexported fields }
func NewHitbtcPublicApi ¶
func (*HitbtcApi) CurrencyPairs ¶
func (h *HitbtcApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*HitbtcApi) FrozenCurrency ¶
func (*HitbtcApi) OrderBookTickMap ¶
func (*HitbtcApi) SetTransport ¶
func (h *HitbtcApi) SetTransport(transport http.RoundTripper) error
type HitbtcApiConfig ¶
type HitbtcApiConfig struct { }
type HuobiApi ¶
type HuobiApi struct { BaseURL string RateCacheDuration time.Duration HttpClient *http.Client ShrimpyClient *unified.ShrimpyApiClient // contains filtered or unexported fields }
func NewHuobiPublicApi ¶
func (*HuobiApi) CurrencyPairs ¶
func (h *HuobiApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*HuobiApi) FrozenCurrency ¶
func (*HuobiApi) OrderBookTickMap ¶
func (*HuobiApi) SetTransport ¶
func (h *HuobiApi) SetTransport(transport http.RoundTripper) error
type HuobiTickResponse ¶
type KucoinApi ¶
type KucoinApi struct { BaseURL string RateCacheDuration time.Duration ShrimpyClient *unified.ShrimpyApiClient HttpClient *http.Client // contains filtered or unexported fields }
func NewKucoinPublicApi ¶
func (*KucoinApi) CurrencyPairs ¶
func (h *KucoinApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*KucoinApi) FrozenCurrency ¶
func (*KucoinApi) OrderBookTickMap ¶
func (*KucoinApi) SetTransport ¶
func (h *KucoinApi) SetTransport(transport http.RoundTripper) error
type KucoinTickResponse ¶
type LbankApi ¶
type LbankApi struct { BaseURL string RateCacheDuration time.Duration HttpClient *http.Client // contains filtered or unexported fields }
func NewLbankPublicApi ¶
func (*LbankApi) CurrencyPairs ¶
func (h *LbankApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*LbankApi) FrozenCurrency ¶
func (*LbankApi) OrderBookTickMap ¶
func (*LbankApi) SetTransport ¶
func (h *LbankApi) SetTransport(transport http.RoundTripper) error
type LbankTickResponse ¶
type OkexApi ¶
type OkexApi struct { BaseURL string RateCacheDuration time.Duration CurrencyPairsCacheDuration time.Duration HttpClient *http.Client ShrimpyClient *unified.ShrimpyApiClient // contains filtered or unexported fields }
func NewOkexPublicApi ¶
func (*OkexApi) CurrencyPairs ¶
func (h *OkexApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*OkexApi) FrozenCurrency ¶
func (*OkexApi) OrderBookTickMap ¶
func (*OkexApi) SetTransport ¶
func (h *OkexApi) SetTransport(transport http.RoundTripper) error
type OkexTickResponse ¶
type P2pb2bApi ¶
type P2pb2bApi struct { BaseURL string RateCacheDuration time.Duration HttpClient *http.Client // contains filtered or unexported fields }
func NewP2pb2bPublicApi ¶
func (*P2pb2bApi) CurrencyPairs ¶
func (h *P2pb2bApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*P2pb2bApi) FrozenCurrency ¶
func (*P2pb2bApi) OrderBookTickMap ¶
func (*P2pb2bApi) SetTransport ¶
func (h *P2pb2bApi) SetTransport(transport http.RoundTripper) error
type P2pb2bApiConfig ¶
type P2pb2bApiConfig struct { }
type PoloniexApi ¶
type PoloniexApi struct { BaseURL string RateCacheDuration time.Duration HttpClient http.Client ShrimpyClient *unified.ShrimpyApiClient // contains filtered or unexported fields }
func NewPoloniexPublicApi ¶
func NewPoloniexPublicApi() (*PoloniexApi, error)
func (*PoloniexApi) CurrencyPairs ¶
func (p *PoloniexApi) CurrencyPairs() ([]models.CurrencyPair, error)
func (*PoloniexApi) FrozenCurrency ¶
func (p *PoloniexApi) FrozenCurrency() ([]string, error)
func (*PoloniexApi) OrderBookTickMap ¶
func (h *PoloniexApi) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error)
func (*PoloniexApi) Precise ¶
func (p *PoloniexApi) Precise(trading string, settlement string) (*models.Precisions, error)
func (*PoloniexApi) Rate ¶
func (p *PoloniexApi) Rate(trading string, settlement string) (float64, error)
func (*PoloniexApi) RateMap ¶
func (p *PoloniexApi) RateMap() (map[string]map[string]float64, error)
func (*PoloniexApi) SetTransport ¶
func (p *PoloniexApi) SetTransport(transport http.RoundTripper) error
type ProxyUrlList ¶
type ProxyUrlList struct { BASE_URL string ListCacheDuration time.Duration // contains filtered or unexported fields }
func NewProxyUrlList ¶
func NewProxyUrlList(baseUrl string) ProxyUrlList
type PublicClient ¶
type PublicClient interface { // Volume(trading string, settlement string) (float64, error) CurrencyPairs() ([]models.CurrencyPair, error) // Rate(trading string, settlement string) (float64, error) // RateMap() (map[string]map[string]float64, error) // VolumeMap() (map[string]map[string]float64, error) OrderBookTickMap() (map[string]map[string]models.OrderBookTick, error) FrozenCurrency() ([]string, error) Board(trading string, settlement string) (*models.Board, error) Precise(trading string, settlement string) (*models.Precisions, error) SetTransport(transport http.RoundTripper) error }
func NewClient ¶
func NewClient(exchangeName string) (PublicClient, error)
func NewDefaultClient ¶
func NewDefaultClient(exchangeName string) PublicClient
Source Files ¶
Click to show internal directories.
Click to hide internal directories.