Documentation ¶
Index ¶
- type Event
- type Order
- func (o *Order) GetAllocatedFunds() decimal.Decimal
- func (o *Order) GetAmount() decimal.Decimal
- func (o *Order) GetBuyLimit() decimal.Decimal
- func (o *Order) GetDirection() order.Side
- func (o *Order) GetID() string
- func (o *Order) GetLeverage() decimal.Decimal
- func (o *Order) GetSellLimit() decimal.Decimal
- func (o *Order) GetStatus() order.Status
- func (o *Order) IsLeveraged() bool
- func (o *Order) IsOrder() bool
- func (o *Order) Pair() currency.Pair
- func (o *Order) SetAmount(i decimal.Decimal)
- func (o *Order) SetDirection(s order.Side)
- func (o *Order) SetID(id string)
- func (o *Order) SetLeverage(l decimal.Decimal)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event interface { common.EventHandler common.Directioner GetBuyLimit() decimal.Decimal GetSellLimit() decimal.Decimal SetAmount(decimal.Decimal) GetAmount() decimal.Decimal IsOrder() bool GetStatus() order.Status SetID(id string) GetID() string IsLeveraged() bool GetAllocatedFunds() decimal.Decimal }
Event inherits common event interfaces along with extra functions related to handling orders
type Order ¶
type Order struct { event.Base ID string Direction order.Side Status order.Status Price decimal.Decimal Amount decimal.Decimal OrderType order.Type Leverage decimal.Decimal AllocatedFunds decimal.Decimal BuyLimit decimal.Decimal SellLimit decimal.Decimal }
Order contains all details for an order event
func (*Order) GetAllocatedFunds ¶
GetAllocatedFunds returns the amount of funds the portfolio manager has allocated to this potential position
func (*Order) GetBuyLimit ¶
GetBuyLimit returns the buy limit
func (*Order) GetDirection ¶
GetDirection returns the side of the order
func (*Order) GetLeverage ¶
GetLeverage returns leverage rate
func (*Order) GetSellLimit ¶
GetSellLimit returns the sell limit
func (*Order) IsLeveraged ¶
IsLeveraged returns if it is leveraged
func (*Order) SetDirection ¶
SetDirection sets the side of the order
func (*Order) SetLeverage ¶
SetLeverage sets leverage
Click to show internal directories.
Click to hide internal directories.