Documentation ¶ Index ¶ type Candle type Chart func NewChart(options ...Option) *Chart func (c *Chart) CandlesByPair(pair string) []Candle func (c *Chart) OnCandle(candle model.Candle) func (c *Chart) OnOrder(order model.Order) func (c *Chart) Start() error type Option func WithPort(port int) Option type Order Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Candle ¶ type Candle struct { Time time.Time `json:"time"` Open float64 `json:"open"` Close float64 `json:"close"` High float64 `json:"high"` Low float64 `json:"low"` Volume float64 `json:"volume"` Orders []Order `json:"orders"` } type Chart ¶ type Chart struct { sync.Mutex // contains filtered or unexported fields } func NewChart ¶ func NewChart(options ...Option) *Chart func (*Chart) CandlesByPair ¶ func (c *Chart) CandlesByPair(pair string) []Candle func (*Chart) OnCandle ¶ func (c *Chart) OnCandle(candle model.Candle) func (*Chart) OnOrder ¶ func (c *Chart) OnOrder(order model.Order) func (*Chart) Start ¶ func (c *Chart) Start() error type Option ¶ type Option func(*Chart) func WithPort ¶ func WithPort(port int) Option type Order ¶ type Order struct { ID int64 `json:"id"` Time time.Time `json:"time"` Price float64 `json:"price"` Quantity float64 `json:"quantity"` Type string `json:"type"` Side string `json:"side"` Profit float64 `json:"profit"` } Source Files ¶ View all Source files chart.go Click to show internal directories. Click to hide internal directories.