Package deltix.qsrv.hf.blocks.l2
Interface Book<COOKIE>
-
- All Superinterfaces:
deltix.util.lang.CookieContainer<COOKIE>
,deltix.qsrv.hf.pub.InstrumentIdentity
- All Known Subinterfaces:
ConcurrentBook<COOKIE>
- All Known Implementing Classes:
DefaultBook
public interface Book<COOKIE> extends deltix.qsrv.hf.pub.InstrumentIdentity, deltix.util.lang.CookieContainer<COOKIE>
Represents current order book for specific contract (InstrumentIdentity.getSymbol()
) on specific exchange (getExchange()
).There are two ways to iterate an order book:
- Active - you explore both levels using
getSize(boolean)
andgetItem(int, boolean)
methods. - Passive - API walks you using
BookWalker
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description rtmath.containers.BinaryArray
getEntitlementId()
java.lang.CharSequence
getExchange()
long
getExchangeCode()
BookItem
getItem(int index, boolean ask)
long
getLastUpdateTimestamp()
Returns time of last updateint
getSize(boolean ask)
Returns number of order book items on specific side (bid or ask) of order bookboolean
hasEntitlementId()
void
walk(BookWalker walker)
Iterate current order book using provided callbackvoid
walk(BookWalker walker, boolean ask)
Iterate one side of order book using provided callbackvoid
walk(BookWalker walker, BookWalker.Direction direction)
Iterate current order book using provided callback
-
-
-
Method Detail
-
getLastUpdateTimestamp
long getLastUpdateTimestamp()
Returns time of last update- Returns:
- time in millis
-
hasEntitlementId
boolean hasEntitlementId()
- Returns:
- true if market data has data-access-control (DAC)
-
getEntitlementId
rtmath.containers.BinaryArray getEntitlementId()
- Returns:
- market data has data-access-control (DAC) token that was used to build this order book
-
getExchange
java.lang.CharSequence getExchange()
- Returns:
- Exchange or Liquidity Provider name that broadcasts this order book
-
getExchangeCode
long getExchangeCode()
- Returns:
- encoded exchange name of the exchange or liquidity provider that broadcasts this order book. See
ExchangeCodec
-
getSize
int getSize(boolean ask)
Returns number of order book items on specific side (bid or ask) of order book- Parameters:
ask
- specifies ask side of the book if true, otherwise bid side- Returns:
- number of order book items on specified side
-
getItem
BookItem getItem(int index, boolean ask)
- Returns:
- order book entry for specified depth and order book side
-
walk
void walk(BookWalker walker)
Iterate current order book using provided callback
-
walk
void walk(BookWalker walker, BookWalker.Direction direction)
Iterate current order book using provided callback
-
walk
void walk(BookWalker walker, boolean ask)
Iterate one side of order book using provided callback
-
-