orderstatus

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: 4 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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