order

package
v0.0.0-...-48f5d39 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

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 New

func New() *Order

New returns a pointer to a new Order. Default routing is "Auto"

func (*Order) Action

func (o *Order) Action() orderconst.OrderAction

Action returns the order action

func (*Order) ActivatePrice

func (o *Order) ActivatePrice() financial.Money

ActivatePrice retuns the activation price

func (*Order) ClientOrderID

func (o *Order) ClientOrderID() string

ClientOrderID returns the client order id. This is a client created id

func (*Order) Copy

func (o *Order) Copy() *Order

Copy will return a copy of the Order structure

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) OrderID

func (o *Order) OrderID() string

OrderID returns the brokerage's order id

func (*Order) OrderType

func (o *Order) OrderType() orderconst.OrderType

OrderType returns the order type

func (*Order) Price

func (o *Order) Price() financial.Money

Price returns the order price

func (*Order) Quantity

func (o *Order) Quantity() int

Quantity returns the number of contracts to trade

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

func (o *Order) SetActivatePrice(price financial.Money)

SetActivatePrice sets the activation price on the order

func (*Order) SetClientOrderID

func (o *Order) SetClientOrderID(id string)

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

func (o *Order) SetOrderID(id string)

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) SetPrice

func (o *Order) SetPrice(price financial.Money)

SetPrice set the price to execute the order at

func (*Order) SetQuantity

func (o *Order) SetQuantity(quantity int)

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) SetSymbol

func (o *Order) SetSymbol(symbol string)

SetSymbol sets the underlying symbol to trade

func (*Order) SpecialInstructions

func (o *Order) SpecialInstructions() orderconst.OrderSpecialInstructions

SpecialInstructions returns any special instructions associated with the order (fill or kill, all or none)

func (*Order) Symbol

func (o *Order) Symbol() string

Symbol retuns the symbol to be traded

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL