fetchers

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binance

type Binance struct {
}

Binance is a Binance-Exchange trade_knife.Fetcher

func NewBinance

func NewBinance() *Binance

NewBinance returns a pointer to a fresh Binance trader.

func (*Binance) NewQuote

func (b *Binance) NewQuote(currency goex.CurrencyPair, market trade_knife.MarketType, interval trade_knife.Interval, openTime *time.Time) (*trade_knife.Quote, error)

NewQuote fetches quote from binance market.

func (*Binance) Refresh

func (b *Binance) Refresh(q *trade_knife.Quote) error

Refresh fetches all candles after last candle including itself.

func (*Binance) Sync

func (b *Binance) Sync(q *trade_knife.Quote, update trade_knife.CandleChannel) (err error)

Sync syncs quote with latest binance kline info.

type Okex

type Okex struct {
}

Okex is an Okay-Exchange trade_knife.Fetcher

func NewOkex

func NewOkex() *Okex

NewOkex returns a pointer to a fresh Okex trade_knife.Fetcher.

func (*Okex) NewQuote

func (ok *Okex) NewQuote(currency goex.CurrencyPair, market trade_knife.MarketType, interval trade_knife.Interval, openTime *time.Time) (*trade_knife.Quote, error)

NewQuote fetches quote from okex market.

func (*Okex) Refresh

func (ok *Okex) Refresh(q *trade_knife.Quote) error

Refresh fetches all candles after last candle including itself.

func (*Okex) Sync

func (ok *Okex) Sync(q *trade_knife.Quote, update trade_knife.CandleChannel) (err error)

Sync syncs quote with latest okex kline info.

Jump to

Keyboard shortcuts

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