Documentation
¶
Index ¶
- type ClOrdIDGenerator
- type Execution
- type Order
- type OrderManager
- func (om *OrderManager) AssignNextClOrdID(order *Order) string
- func (om *OrderManager) Get(id int) (*Order, error)
- func (om *OrderManager) GetAll() []*Order
- func (om *OrderManager) GetAllExecutions() []*Execution
- func (om *OrderManager) GetByClOrdID(clOrdID string) (*Order, error)
- func (om *OrderManager) GetExecution(id int) (*Execution, error)
- func (om *OrderManager) Save(order *Order) error
- func (om *OrderManager) SaveExecution(exec *Execution) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClOrdIDGenerator ¶
type ClOrdIDGenerator interface {
Next() string
}
type Execution ¶
type Execution struct { ID int `json:"id"` Symbol string `json:"symbol"` Quantity string `json:"quantity"` Side enum.Side `json:"side"` Price string `json:"price"` Session string `json:"session_id"` }
Execution is the execution type
type Order ¶
type Order struct { ID int `json:"id"` SessionID quickfix.SessionID `json:"-"` ClOrdID string `json:"clord_id"` OrderID string `json:"order_id"` Symbol string `json:"symbol"` QuantityDecimal decimal.Decimal `json:"-"` Quantity string `json:"quantity"` Account string `json:"account"` Session string `json:"session_id"` Side enum.Side `json:"side"` OrdType enum.OrdType `json:"ord_type"` PriceDecimal decimal.Decimal `json:"-"` Price string `json:"price"` StopPriceDecimal decimal.Decimal `json:"-"` StopPrice string `json:"stop_price"` Closed string `json:"closed"` Open string `json:"open"` AvgPx string `json:"avg_px"` SecurityType enum.SecurityType `json:"security_type"` SecurityDesc string `json:"security_desc"` MaturityMonthYear string `json:"maturity_month_year"` MaturityDay int `json:"maturity_day"` PutOrCall enum.PutOrCall `json:"put_or_call"` StrikePrice string `json:"strike_price"` StrikePriceDecimal decimal.Decimal `json:"-"` }
Order is the order type
type OrderManager ¶
func NewOrderManager ¶
func NewOrderManager(idGen ClOrdIDGenerator) *OrderManager
func (*OrderManager) AssignNextClOrdID ¶
func (om *OrderManager) AssignNextClOrdID(order *Order) string
func (*OrderManager) GetAll ¶
func (om *OrderManager) GetAll() []*Order
func (*OrderManager) GetAllExecutions ¶
func (om *OrderManager) GetAllExecutions() []*Execution
func (*OrderManager) GetByClOrdID ¶
func (om *OrderManager) GetByClOrdID(clOrdID string) (*Order, error)
func (*OrderManager) GetExecution ¶
func (om *OrderManager) GetExecution(id int) (*Execution, error)
func (*OrderManager) Save ¶
func (om *OrderManager) Save(order *Order) error
func (*OrderManager) SaveExecution ¶
func (om *OrderManager) SaveExecution(exec *Execution) error
Click to show internal directories.
Click to hide internal directories.