Package velox.api.layer1
Interface Layer1ApiDataListener
- All Known Subinterfaces:
Layer1ApiAdapter,Layer1ApiDataAdapter,Layer1ApiListener,OnlineValueCalculatorAdapter,StrategyUpdateGenerator
- All Known Implementing Classes:
Layer1ApiDepthFreezer,Layer1ApiInjectorRelay,Layer1ApiRelay,Layer1ApiStrategiesEchoMessagesLayer,Layer1ApiUpstreamRelay
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
public interface Layer1ApiDataListener
Listener for market data events: trades, market-by-price depth and market mode.
Prices are expressed in ticks, i.e. the real price divided by
InstrumentInfo.pips of the instrument reported in
Layer1ApiInstrumentListener.onInstrumentAdded(String, velox.api.layer1.data.InstrumentInfo).
-
Method Summary
Modifier and TypeMethodDescriptionvoidDepth data update.voidonMarketMode(String alias, MarketMode marketMode) Market mode update.voidTrade
-
Method Details
-
onTrade
Trade- Parameters:
alias- instrument aliasprice- price in the same units as in depth update (e.g. if pips=25 then price=1000 means 25000).size- trade sizetradeInfo- additional information about the trade, e.g. aggressor side and whether it is an OTC trade
-
onDepth
Depth data update. This is an absolute update, not a delta: the size becomes the total size at that price level. A size of 0 removes the level from the book. Bookmap sends the full initial book as a sequence of these calls afterLayer1ApiInstrumentListener.onInstrumentAdded(java.lang.String, velox.api.layer1.data.InstrumentInfo).- Parameters:
alias- instrument aliasisBid- true if it is for bids, false for asksprice- price where size changed, in tickssize- new total size at the level, 0 to remove the level
-
onMarketMode
Market mode update. Only sent when the mode changes, so most instruments receive it rarely or never.- Parameters:
alias- instrument aliasmarketMode- new mode
-