Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SideTypeBuy SideType = "BUY" SideTypeSell SideType = "SELL" OrderTypeLimit OrderType = "LIMIT" OrderTypeMarket OrderType = "MARKET" OrderTypeLimitMaker OrderType = "LIMIT_MAKER" OrderTypeStopLoss OrderType = "STOP_LOSS" OrderTypeStopLossLimit OrderType = "STOP_LOSS_LIMIT" OrderTypeTakeProfit OrderType = "TAKE_PROFIT" OrderTypeTakeProfitLimit OrderType = "TAKE_PROFIT_LIMIT" OrderStatusTypeNew OrderStatusType = "NEW" OrderStatusTypePartiallyFilled OrderStatusType = "PARTIALLY_FILLED" OrderStatusTypeFilled OrderStatusType = "FILLED" OrderStatusTypeCanceled OrderStatusType = "CANCELED" OrderStatusTypePendingCancel OrderStatusType = "PENDING_CANCEL" OrderStatusTypeRejected OrderStatusType = "REJECTED" OrderStatusTypeExpired OrderStatusType = "EXPIRED" )
Functions ¶
func NumDecPlaces ¶
Types ¶
type Candle ¶
type Order ¶
type Order struct { ID int64 `db:"id" json:"id"` ExchangeID int64 `db:"exchange_id" json:"exchange_id"` Pair string `db:"pair" json:"pair"` Side SideType `db:"side" json:"side"` Type OrderType `db:"type" json:"type"` Status OrderStatusType `db:"status" json:"status"` Price float64 `db:"price" json:"price"` Quantity float64 `db:"quantity" json:"quantity"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` // OCO Orders only Stop *float64 `db:"stop" json:"stop"` GroupID *int64 `db:"group_id" json:"group_id"` // Internal use (Plot) RefPrice float64 `json:"-"` Profit float64 `json:"-"` Candle Candle `json:"-"` }
type OrderStatusType ¶
type OrderStatusType string
type PriorityQueue ¶
func NewPriorityQueue ¶
func NewPriorityQueue(data []Item) *PriorityQueue
func (*PriorityQueue) Len ¶
func (q *PriorityQueue) Len() int
func (*PriorityQueue) Peek ¶ added in v0.0.9
func (q *PriorityQueue) Peek() Item
func (*PriorityQueue) Pop ¶
func (q *PriorityQueue) Pop() Item
func (*PriorityQueue) Push ¶
func (q *PriorityQueue) Push(item Item)
type Settings ¶
type Settings struct { Pairs []string Telegram TelegramSettings }
type TelegramSettings ¶
Click to show internal directories.
Click to hide internal directories.