models

package
v0.0.0-...-95b083d Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Unlicense Imports: 2 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 Order

type Order struct {
	OrderId          string                   `json:"order_id,omitempty"`
	Symbol           string                   `json:"symbol,omitempty"`
	Side             futures.SideType         `json:"side,omitempty"`
	PositionSide     futures.PositionSideType `json:"position_side,omitempty"`
	OrderType        futures.OrderType        `json:"order_type,omitempty"`
	TimeInForce      futures.TimeInForceType  `json:"time_in_force,omitempty"`
	Quantity         string                   `json:"quantity,omitempty"`
	ReduceOnly       bool                     `json:"reduce_only,omitempty"`
	Price            string                   `json:"price,omitempty"`
	NewClientOrderId string                   `json:"new_client_order_id,omitempty"`
	StopPrice        string                   `json:"stop_price,omitempty"`
	WorkingType      futures.WorkingType      `json:"working_type,omitempty"`
	ActivationPrice  string                   `json:"activation_price,omitempty"`
	CallbackRate     string                   `json:"callback_rate,omitempty"`
	PriceProtect     bool                     `json:"price_protect,omitempty"`
	NewOrderRespType futures.NewOrderRespType `json:"new_order_resp_type,omitempty"`
	ClosePosition    bool                     `json:"close_position,omitempty"`
}

func (*Order) Parse

func (o *Order) Parse(val string) error

func (*Order) String

func (o *Order) String() string

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 Price

type Price struct {
	Quantity float64 `json:"quantity,omitempty"`
	Entry    float64 `json:"entry,omitempty"`
	Profit   float64 `json:"profit,omitempty"`
	Loss     float64 `json:"loss,omitemty"`
}

func (*Price) String

func (p *Price) String() string

type RetryMessage

type RetryMessage struct {
	Symbol   string
	Interval string
	Counter  *int
}

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