bybit

package
v0.0.0-...-a29a5a5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchInstruments

func FetchInstruments() []string

func GetFileNameByDate

func GetFileNameByDate(symbol string, t time.Time) string

func GetInstruments

func GetInstruments() []string

func HasData

func HasData(symbol string, dayIndex int64) bool

func Items

func Items(w http.ResponseWriter, r *http.Request)

func LoadData

func LoadData(symbol string, date time.Time, fileName string)

func LoadNext

func LoadNext()

func ParseDate

func ParseDate(value string) time.Time

func Start

func Start()

func Stop

func Stop()

func ThLoad

func ThLoad()

func ThUpdateInstruments

func ThUpdateInstruments()

func TimeByDayIndex

func TimeByDayIndex(dayIndex int64) time.Time

func UpdateInstruments

func UpdateInstruments()

Types

type Candle

type Candle struct {
	StartTime  time.Time
	OpenPrice  string
	HighPrice  string
	LowPrice   string
	ClosePrice string
	Volume     string
	Turnover   string
}

func GetCandles

func GetCandles(symbol string, startDT time.Time, endDT time.Time, interval string) []Candle

type GetCandlesResponse

type GetCandlesResponse struct {
	HeaderResponse
	Result GetCandlesResponseInt `json:"result"`
}

type GetCandlesResponseInt

type GetCandlesResponseInt struct {
	Symbol   string       `json:"symbol"`
	Category string       `json:"category"`
	List     []StringList `json:"list"`
}

type GetInstrumentsItem

type GetInstrumentsItem struct {
	Symbol string `json:"symbol"`
}

type GetInstrumentsResponse

type GetInstrumentsResponse struct {
	HeaderResponse
	Result GetInstrumentsResponseInt `json:"result"`
}

type GetInstrumentsResponseInt

type GetInstrumentsResponseInt struct {
	Category string               `json:"category"`
	List     []GetInstrumentsItem `json:"list"`
}

type HeaderResponse

type HeaderResponse struct {
	RetCode int    `json:"retCode"`
	RetMsg  string `json:"retMsg"`
}

type StringList

type StringList []string

Jump to

Keyboard shortcuts

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