Documentation ¶
Index ¶
- Variables
- func BinanceSymbol(pair string) string
- func Intervals() []period.Symbol
- func KLineTimeToTime(t int64) time.Time
- func KLineToCandlestick(k binance.Kline, p period.Symbol, now time.Time) (candlestick.Candlestick, error)
- func KLinesToCandlesticks(pair string, period period.Symbol, kl []*binance.Kline, now time.Time) (*candlestick.List, error)
- func PeriodToInterval(interval period.Symbol) (e string, err error)
- func TimeToKLineTime(t time.Time) int64
- func WrapError(err error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBinanceAdapter = errors.New("binance error") ErrUnknownPeriod = fmt.Errorf("%w: unknown period", ErrBinanceAdapter) )
Functions ¶
func BinanceSymbol ¶
func KLineTimeToTime ¶
KLineTimeToTime will take the time from a kline and will convert it to candle time
func KLineToCandlestick ¶
func KLineToCandlestick(k binance.Kline, p period.Symbol, now time.Time) (candlestick.Candlestick, error)
KLineToCandlestick will convert KLine binance format for Candlestick
func KLinesToCandlesticks ¶
func KLinesToCandlesticks(pair string, period period.Symbol, kl []*binance.Kline, now time.Time) (*candlestick.List, error)
KLinesToCandlesticks will transform a slice of binance format for Candlestick
func PeriodToInterval ¶
PeriodToInterval converts an interval to its corresponding epoch
func TimeToKLineTime ¶
TimeToKLineTime will take the time from a candle and will convert it to Kline time
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.