Documentation ¶
Index ¶
- type Exchange
- func (e *Exchange) ExecuteOrder(o order.Event, data data.Handler, bot *engine.Engine) (*fill.Fill, error)
- func (e *Exchange) GetCurrencySettings(exch string, a asset.Item, cp currency.Pair) (Settings, error)
- func (e *Exchange) Reset()
- func (e *Exchange) SetExchangeAssetCurrencySettings(exch string, a asset.Item, cp currency.Pair, c *Settings)
- type ExecutionHandler
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exchange ¶
type Exchange struct {
CurrencySettings []Settings
}
Exchange contains all the currency settings
func (*Exchange) ExecuteOrder ¶
func (e *Exchange) ExecuteOrder(o order.Event, data data.Handler, bot *engine.Engine) (*fill.Fill, error)
ExecuteOrder assesses the portfolio manager's order event and if it passes validation will send an order to the exchange/fake order manager to be stored and raise a fill event
type ExecutionHandler ¶
type ExecutionHandler interface { SetExchangeAssetCurrencySettings(string, asset.Item, currency.Pair, *Settings) GetCurrencySettings(string, asset.Item, currency.Pair) (Settings, error) ExecuteOrder(order.Event, data.Handler, *engine.Engine) (*fill.Fill, error) Reset() }
ExecutionHandler interface dictates what functions are required to submit an order
type Settings ¶
type Settings struct { ExchangeName string UseRealOrders bool InitialFunds float64 CurrencyPair currency.Pair AssetType asset.Item ExchangeFee float64 MakerFee float64 TakerFee float64 BuySide config.MinMax SellSide config.MinMax Leverage config.Leverage MinimumSlippageRate float64 MaximumSlippageRate float64 Limits *gctorder.Limits CanUseExchangeLimits bool }
Settings allow the eventhandler to size an order within the limitations set by the config file
Click to show internal directories.
Click to hide internal directories.