adapters

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Intervals

func Intervals() []int64

Intervals represents every intervals supported by Binance API

func KLineToCandleStick

func KLineToCandleStick(k binance.Kline) (models.CandleStick, error)

KLineToCandleStick will convert KLine binance format for CandleStick

func KLinesToCandleSticks

func KLinesToCandleSticks(kl []*binance.Kline) ([]models.CandleStick, error)

KLinesToCandleSticks will transform a slice of binance format for CandleStick

func PeriodToInterval

func PeriodToInterval(period int64) (e string, err error)

PeriodToInterval converts an interval to its corresponding epoch

func TimeCandleStickToKLine

func TimeCandleStickToKLine(t time.Time) int64

TimeCandleStickToKLine will take the time from a candle and will convert it to Kline time

func TimeKLineToCandleStick

func TimeKLineToCandleStick(t int64) time.Time

TimeKLineToCandleStick will take the time from a kline and will convert it to candle time

Types

This section is empty.

Jump to

Keyboard shortcuts

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