Documentation
¶
Index ¶
- type Order
- func (o *Order) Action() orderconst.OrderAction
- func (o *Order) ActivatePrice() financial.Money
- func (o *Order) ClientOrderID() string
- func (o *Order) Copy() *Order
- func (o *Order) ExDay() orderconst.OrderInt8
- func (o *Order) ExMonth() orderconst.OrderInt8
- func (o *Order) ExYear() orderconst.OrderInt8
- func (o *Order) Expire() orderconst.OrderExpiry
- func (o *Order) OrderID() string
- func (o *Order) OrderType() orderconst.OrderType
- func (o *Order) Price() financial.Money
- func (o *Order) Quantity() int
- func (o *Order) Routing() orderconst.OrderExchange
- func (o *Order) SetAction(action orderconst.OrderAction)
- func (o *Order) SetActivatePrice(price financial.Money)
- func (o *Order) SetClientOrderID(id string)
- func (o *Order) SetExDay(exDay orderconst.OrderInt8)
- func (o *Order) SetExMonth(exMonth orderconst.OrderInt8)
- func (o *Order) SetExYear(exYear orderconst.OrderInt8)
- func (o *Order) SetExpire(expire orderconst.OrderExpiry)
- func (o *Order) SetOrderID(id string)
- func (o *Order) SetOrderType(orderType orderconst.OrderType)
- func (o *Order) SetPrice(price financial.Money)
- func (o *Order) SetQuantity(quantity int)
- func (o *Order) SetRouting(routing orderconst.OrderExchange)
- func (o *Order) SetSpecialInstructions(spInstructions orderconst.OrderSpecialInstructions)
- func (o *Order) SetSymbol(symbol string)
- func (o *Order) SpecialInstructions() orderconst.OrderSpecialInstructions
- func (o *Order) Symbol() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
Order represents an order to be sent to brokerage firm
func (*Order) Action ¶
func (o *Order) Action() orderconst.OrderAction
Action returns the order action
func (*Order) ActivatePrice ¶
ActivatePrice retuns the activation price
func (*Order) ClientOrderID ¶
ClientOrderID returns the client order id. This is a client created id
func (*Order) ExDay ¶
func (o *Order) ExDay() orderconst.OrderInt8
ExDay returns the day the order expires if order is GTC
func (*Order) ExMonth ¶
func (o *Order) ExMonth() orderconst.OrderInt8
ExMonth returns the month the order expires if order is GTC
func (*Order) ExYear ¶
func (o *Order) ExYear() orderconst.OrderInt8
ExYear returns the year the order expires if order is GTC
func (*Order) Expire ¶
func (o *Order) Expire() orderconst.OrderExpiry
Expire returns the expiration type
func (*Order) OrderType ¶
func (o *Order) OrderType() orderconst.OrderType
OrderType returns the order type
func (*Order) Routing ¶
func (o *Order) Routing() orderconst.OrderExchange
Routing returns the excahge to which orde is set to route to
func (*Order) SetAction ¶
func (o *Order) SetAction(action orderconst.OrderAction)
SetAction sets the action type on the order
func (*Order) SetActivatePrice ¶
SetActivatePrice sets the activation price on the order
func (*Order) SetClientOrderID ¶
SetClientOrderID sets the client order id
func (*Order) SetExDay ¶
func (o *Order) SetExDay(exDay orderconst.OrderInt8)
SetExDay sets the day the order expires if order is GTC
func (*Order) SetExMonth ¶
func (o *Order) SetExMonth(exMonth orderconst.OrderInt8)
SetExMonth sets the month the order expires if order is GTC
func (*Order) SetExYear ¶
func (o *Order) SetExYear(exYear orderconst.OrderInt8)
SetExYear sets the year the order expires if order is GTC
func (*Order) SetExpire ¶
func (o *Order) SetExpire(expire orderconst.OrderExpiry)
SetExpire sets the expiration type on the order (GTC/Day)
func (*Order) SetOrderID ¶
SetOrderID sets the broker's order id
func (*Order) SetOrderType ¶
func (o *Order) SetOrderType(orderType orderconst.OrderType)
SetOrderType sets the type of order (limit,market,etc)
func (*Order) SetQuantity ¶
SetQuantity sets the number of contracts to trade
func (*Order) SetRouting ¶
func (o *Order) SetRouting(routing orderconst.OrderExchange)
SetRouting sets the exchange to route the order to. Default is Auto
func (*Order) SetSpecialInstructions ¶
func (o *Order) SetSpecialInstructions(spInstructions orderconst.OrderSpecialInstructions)
SetSpecialInstructions set any special instructions on the order (ie fill or kill, all or none)
func (*Order) SpecialInstructions ¶
func (o *Order) SpecialInstructions() orderconst.OrderSpecialInstructions
SpecialInstructions returns any special instructions associated with the order (fill or kill, all or none)