models

package
v0.0.0-...-4058e4e Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CandleSummary

type CandleSummary struct {
	Symbol  string                  `json:"symbol"`
	Candles map[string]*CandlesData `json:"candlesticks"` // interval: []candle

}

func (*CandleSummary) String

func (c *CandleSummary) String() string

type CandlesData

type CandlesData struct {
	Candles    []*Candlestick
	CreateTime int64 `json:"create_time"`
	UpdateTime int64 `json:"update_time"`
}

type Candlestick

type Candlestick struct {
	OpenTime  int64  `json:"s,omitempty"`
	CloseTime int64  `json:"e,omitempty"`
	High      string `json:"h,omitempty"`
	Open      string `json:"o,omitempty"`
	Close     string `json:"c,omitempty"`
	Low       string `json:"l,omitempty"`
	Volume    string `json:"v,omitempty"`
}

CandleStick represents a single candlestick in a chart.

func (*Candlestick) String

func (cs *Candlestick) String() string

String returns the string representation of the object.

type Oscillator

type Oscillator struct {
	Symbol string            `json:"symbol"`
	Stoch  map[string]*Stoch `json:"stoch"`
}

func (*Oscillator) GetRSI

func (o *Oscillator) GetRSI(interval string) float64

func (*Oscillator) String

func (s *Oscillator) String() string

type Stoch

type Stoch struct {
	RSI float64 `json:"rsi"`
	K   float64 `json:"k"`
	D   float64 `json:"d"`
}

Jump to

Keyboard shortcuts

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