Documentation
¶
Index ¶
- type Event
- type Fill
- func (f *Fill) GetAmount() decimal.Decimal
- func (f *Fill) GetClosePrice() decimal.Decimal
- func (f *Fill) GetDirection() order.Side
- func (f *Fill) GetExchangeFee() decimal.Decimal
- func (f *Fill) GetOrder() *order.Detail
- func (f *Fill) GetPurchasePrice() decimal.Decimal
- func (f *Fill) GetSlippageRate() decimal.Decimal
- func (f *Fill) GetTotal() decimal.Decimal
- func (f *Fill) GetVolumeAdjustedPrice() decimal.Decimal
- func (f *Fill) SetAmount(i decimal.Decimal)
- func (f *Fill) SetDirection(s order.Side)
- func (f *Fill) SetExchangeFee(fee 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
SetAmount(decimal.Decimal)
GetAmount() decimal.Decimal
GetClosePrice() decimal.Decimal
GetVolumeAdjustedPrice() decimal.Decimal
GetSlippageRate() decimal.Decimal
GetPurchasePrice() decimal.Decimal
GetTotal() decimal.Decimal
GetExchangeFee() decimal.Decimal
SetExchangeFee(decimal.Decimal)
GetOrder() *order.Detail
}
Event holds all functions required to handle a fill event
type Fill ¶
type Fill struct {
event.Base
Direction order.Side `json:"side"`
Amount decimal.Decimal `json:"amount"`
ClosePrice decimal.Decimal `json:"close-price"`
VolumeAdjustedPrice decimal.Decimal `json:"volume-adjusted-price"`
PurchasePrice decimal.Decimal `json:"purchase-price"`
Total decimal.Decimal `json:"total"`
ExchangeFee decimal.Decimal `json:"exchange-fee"`
Slippage decimal.Decimal `json:"slippage"`
Order *order.Detail `json:"-"`
}
Fill is an event that details the events from placing an order
func (*Fill) GetClosePrice ¶
GetClosePrice returns the closing price
func (*Fill) GetDirection ¶
GetDirection returns the direction
func (*Fill) GetExchangeFee ¶
GetExchangeFee returns the exchange fee
func (*Fill) GetPurchasePrice ¶
GetPurchasePrice returns the purchase price
func (*Fill) GetSlippageRate ¶
GetSlippageRate returns the slippage rate
func (*Fill) GetVolumeAdjustedPrice ¶
GetVolumeAdjustedPrice returns the volume adjusted price
func (*Fill) SetDirection ¶
SetDirection sets the direction
func (*Fill) SetExchangeFee ¶
SetExchangeFee sets the exchange fee
Click to show internal directories.
Click to hide internal directories.