Package velox.api.layer1.simplified
Interface Api
public interface Api
Allows communicating back to Bookmap.
-
Method Summary
Modifier and Type Method Description void
addBalanceListeners(BalanceListener balanceListener)
Manually add balance data listener when usingNoAutosubscription
void
addBarDataListeners(BarDataListener barDataListener)
Manually add bar data listener when usingNoAutosubscription
void
addBboDataListeners(BboListener bboListener)
Manually add bbo listener when usingNoAutosubscription
void
addDepthDataListeners(DepthDataListener depthDataListener)
Manually add depth data listener when usingNoAutosubscription
void
addHistoricalModeListeners(HistoricalModeListener historicalModeListener)
Manually add historicaL mode listener when usingNoAutosubscription
void
addIntervalListeners(IntervalListener intervalListener)
Manually add interval listener when usingNoAutosubscription
void
addMarketByOrderDepthDataListeners(MarketByOrderDepthDataListener marketByOrderDepthDataListener)
Manually add depth data listener when usingNoAutosubscription
void
addMultiInstrumentListeners(MultiInstrumentListener multiInstrumentListener)
Manually add multi-instrument data listener when usingNoAutosubscription
void
addOrdersListeners(OrdersListener ordersListener)
Manually add order listener when usingNoAutosubscription
void
addSnapshotEndListeners(SnapshotEndListener snapshotEndListener)
Manually add snapshot end listener when usingNoAutosubscription
void
addStatusListeners(PositionListener positionListener)
Manually add position listener when usingNoAutosubscription
void
addTimeListeners(TimeListener timeListener)
Manually add time listener when usingNoAutosubscription
void
addTradeDataListeners(TradeDataListener tradeDataListener)
Manually add trade data listener when usingNoAutosubscription
velox.api.layer1.Layer1ApiProvider
getProvider()
Allows advanced actions that require direct access to L1 stack.<T> T
getSettings(java.lang.Class<? extends T> settingsClass)
Retrieve earlier stored settingsdefault Indicator
registerIndicator(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType)
Similar toregisterIndicator(String, GraphType, double)
, assumes initialValue = NaN (no line until first update)default Indicator
registerIndicator(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType, double initialValue)
Register an indicator (line).Indicator
registerIndicator(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType, double initialValue, boolean showLineByDefault, boolean showWidgetByDefault)
Register an indicator (line).default IndicatorModifiable
registerIndicatorModifiable(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType)
default IndicatorModifiable
registerIndicatorModifiable(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType, double initialValue)
IndicatorModifiable
registerIndicatorModifiable(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType, double initialValue, boolean showLineByDefault, boolean showWidgetByDefault)
void
reload()
Request reloading the module.void
sendOrder(velox.api.layer1.data.OrderSendParameters orderSendParameters)
Submit order with specified parametersvoid
sendUserMessage(java.lang.Object data)
Allows communicating with other modules<T> void
setSettings(T settingsObject)
Store settings.void
unload()
Request unloading the module.void
updateOrder(velox.api.layer1.data.OrderUpdateParameters orderUpdateParameters)
Update order according to parameters
-
Method Details
-
registerIndicator
default Indicator registerIndicator(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType)Similar toregisterIndicator(String, GraphType, double)
, assumes initialValue = NaN (no line until first update)- Parameters:
name
- user-friendly name for an indicator. Must be unique within alias.graphType
- where to draw the indicator (bottom panel or main chart)- Returns:
- indicator object that can be used to manipulate the line
-
registerIndicatorModifiable
default IndicatorModifiable registerIndicatorModifiable(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType) -
registerIndicator
default Indicator registerIndicator(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType, double initialValue)Register an indicator (line).- Parameters:
name
- user-friendly name for an indicator. Must be unique within alias.graphType
- where to draw the indicator (bottom panel or main chart)initialValue
- initial value of the indicator. NaN means "no visible line".- Returns:
- indicator object that can be used to manipulate the line
-
registerIndicator
Indicator registerIndicator(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType, double initialValue, boolean showLineByDefault, boolean showWidgetByDefault)Register an indicator (line).- Parameters:
name
- user-friendly name for an indicator. Must be unique within alias.graphType
- where to draw the indicator (bottom panel or main chart)initialValue
- initial value of the indicator. NaN means "no visible line".showLineByDefault
- show indicator line by default. If false user has to manually enable the line before it's visibleshowWidgetByDefault
- show indicator widget by default. If false user has to manually enable the widget before it's visible- Returns:
- indicator object that can be used to manipulate the line
-
registerIndicatorModifiable
default IndicatorModifiable registerIndicatorModifiable(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType, double initialValue) -
registerIndicatorModifiable
IndicatorModifiable registerIndicatorModifiable(java.lang.String name, velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator.GraphType graphType, double initialValue, boolean showLineByDefault, boolean showWidgetByDefault) -
sendOrder
void sendOrder(velox.api.layer1.data.OrderSendParameters orderSendParameters)Submit order with specified parameters- Parameters:
orderSendParameters
- parameters
-
updateOrder
void updateOrder(velox.api.layer1.data.OrderUpdateParameters orderUpdateParameters)Update order according to parameters- Parameters:
orderUpdateParameters
- parameters
-
setSettings
<T> void setSettings(T settingsObject)Store settings.- Parameters:
settingsObject
- your settings object. Class must be annotated withStrategySettingsVersion
-
getSettings
<T> T getSettings(java.lang.Class<? extends T> settingsClass)Retrieve earlier stored settings- Parameters:
settingsClass
- class of your settings object. Must be annotated withStrategySettingsVersion
- Returns:
- settings object. If there is no compatible saved object for this
request, new object will be created with default constructor
Changing returned object will not change settings. You need to callsetSettings(Object)
for this
-
unload
void unload()Request unloading the module. This will lead to your module being unloaded for current alias. You could use it when error is detected and running module further makes no sense. You might still get few events before your requests gets processed. Note, that module will keep running for other aliases. -
reload
void reload()Request reloading the module. This will lead to your module being unloaded for current alias, then loaded back. Typical use case would be to apply settings changes. -
addTimeListeners
Manually add time listener when usingNoAutosubscription
-
addDepthDataListeners
Manually add depth data listener when usingNoAutosubscription
-
addMarketByOrderDepthDataListeners
void addMarketByOrderDepthDataListeners(MarketByOrderDepthDataListener marketByOrderDepthDataListener)Manually add depth data listener when usingNoAutosubscription
-
addSnapshotEndListeners
Manually add snapshot end listener when usingNoAutosubscription
-
addTradeDataListeners
Manually add trade data listener when usingNoAutosubscription
-
addIntervalListeners
Manually add interval listener when usingNoAutosubscription
-
addBarDataListeners
Manually add bar data listener when usingNoAutosubscription
-
addBboDataListeners
Manually add bbo listener when usingNoAutosubscription
-
addOrdersListeners
Manually add order listener when usingNoAutosubscription
-
addStatusListeners
Manually add position listener when usingNoAutosubscription
-
addBalanceListeners
Manually add balance data listener when usingNoAutosubscription
-
addHistoricalModeListeners
Manually add historicaL mode listener when usingNoAutosubscription
-
addMultiInstrumentListeners
Manually add multi-instrument data listener when usingNoAutosubscription
-
sendUserMessage
void sendUserMessage(java.lang.Object data)Allows communicating with other modules -
getProvider
velox.api.layer1.Layer1ApiProvider getProvider()Allows advanced actions that require direct access to L1 stack. Most indicators do not need it.
-