Documentation
¶
Index ¶
- type OrderStatus
- func (o *OrderStatus) Action() orderconst.OrderAction
- func (o *OrderStatus) Copy() *OrderStatus
- func (o *OrderStatus) Expire() orderconst.OrderExpiry
- func (o *OrderStatus) OrderID() string
- func (o *OrderStatus) OrderType() orderconst.OrderType
- func (o *OrderStatus) Price() financial.Money
- func (o *OrderStatus) Quantity() int
- func (o *OrderStatus) Routing() orderconst.OrderExchange
- func (o *OrderStatus) SetAction(action orderconst.OrderAction)
- func (o *OrderStatus) SetExpire(expire orderconst.OrderExpiry)
- func (o *OrderStatus) SetOrderID(id string)
- func (o *OrderStatus) SetOrderType(orderType orderconst.OrderType)
- func (o *OrderStatus) SetPrice(price financial.Money)
- func (o *OrderStatus) SetQuantity(quantity int)
- func (o *OrderStatus) SetRouting(routing orderconst.OrderExchange)
- func (o *OrderStatus) SetStatus(newStatus string)
- func (o *OrderStatus) SetSymbol(symbol string)
- func (o *OrderStatus) Status() string
- func (o *OrderStatus) String() string
- func (o *OrderStatus) Symbol() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderStatus ¶
type OrderStatus struct {
// contains filtered or unexported fields
}
OrderStatus represents a order status received from brokerage firm
func New ¶
func New() *OrderStatus
New returns a pointer to a new OrderStatus. Default routing is "Auto"
func (*OrderStatus) Action ¶
func (o *OrderStatus) Action() orderconst.OrderAction
Action returns the order action
func (*OrderStatus) Copy ¶
func (o *OrderStatus) Copy() *OrderStatus
Copy will return a copy of the order status
func (*OrderStatus) Expire ¶
func (o *OrderStatus) Expire() orderconst.OrderExpiry
Expire returns the expiration type
func (*OrderStatus) OrderID ¶
func (o *OrderStatus) OrderID() string
OrderID returns the brokerage's order id
func (*OrderStatus) OrderType ¶
func (o *OrderStatus) OrderType() orderconst.OrderType
OrderType returns the order type
func (*OrderStatus) Price ¶
func (o *OrderStatus) Price() financial.Money
Price returns the order price
func (*OrderStatus) Quantity ¶
func (o *OrderStatus) Quantity() int
Quantity returns the number of contracts to trade
func (*OrderStatus) Routing ¶
func (o *OrderStatus) Routing() orderconst.OrderExchange
Routing returns the excahge to which orde is set to route to
func (*OrderStatus) SetAction ¶
func (o *OrderStatus) SetAction(action orderconst.OrderAction)
SetAction sets the action type on the order
func (*OrderStatus) SetExpire ¶
func (o *OrderStatus) SetExpire(expire orderconst.OrderExpiry)
SetExpire sets the expiration type on the order (GTC/Day)
func (*OrderStatus) SetOrderID ¶
func (o *OrderStatus) SetOrderID(id string)
SetOrderID sets the broker's order id
func (*OrderStatus) SetOrderType ¶
func (o *OrderStatus) SetOrderType(orderType orderconst.OrderType)
SetOrderType sets the type of order (limit,market,etc)
func (*OrderStatus) SetPrice ¶
func (o *OrderStatus) SetPrice(price financial.Money)
SetPrice set the price to execute the order at
func (*OrderStatus) SetQuantity ¶
func (o *OrderStatus) SetQuantity(quantity int)
SetQuantity sets the number of contracts to trade
func (*OrderStatus) SetRouting ¶
func (o *OrderStatus) SetRouting(routing orderconst.OrderExchange)
SetRouting sets the exchange to route the order to. Default is Auto
func (*OrderStatus) SetStatus ¶
func (o *OrderStatus) SetStatus(newStatus string)
func (*OrderStatus) SetSymbol ¶
func (o *OrderStatus) SetSymbol(symbol string)
SetSymbol sets the underlying symbol to trade
func (*OrderStatus) Status ¶
func (o *OrderStatus) Status() string
func (*OrderStatus) String ¶
func (o *OrderStatus) String() string
func (*OrderStatus) Symbol ¶
func (o *OrderStatus) Symbol() string
Symbol retuns the symbol to be traded