Package velox.api.layer1.data
Class InstrumentInfo.BuilderBase<T extends InstrumentInfo.BuilderBase<T>>
java.lang.Object
velox.api.layer1.data.InstrumentCoreInfo.BuilderBase<T>
velox.api.layer1.data.InstrumentInfo.BuilderBase<T>
- Direct Known Subclasses:
InstrumentInfo.Builder
- Enclosing class:
InstrumentInfo
public abstract static class InstrumentInfo.BuilderBase<T extends InstrumentInfo.BuilderBase<T>>
extends InstrumentCoreInfo.BuilderBase<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected intprotected Stringprotected booleanprotected booleanprotected booleanprotected booleanprotected doubleprotected doubleprotected Stringprotected Stringprotected doubleFields inherited from class velox.api.layer1.data.InstrumentCoreInfo.BuilderBase
exchange, symbol, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract InstrumentInfobuild()intdoubledoublegetPips()doublebooleanbooleanisCrypto()booleanbooleansetApiProtected(boolean apiProtected) If this flag is set to true, then all add-ons, except those marked withUnrestrictedDataannotation, will be blocked from receiving data from this instrumentsetCrypto(boolean crypto) Allows bookmap to distinguish crypto instruments from other types.setDataDelay(long dataDelay) Sets the data delay for the instrument.setDefaultLotSize(int defaultLotSize) setFieldsFrom(InstrumentInfo info) setFullDepth(boolean fullDepth) True if data provided for instrument is full depth datasetFullName(String fullName) Full instrument name on the platforms where it's available, null otherwisesetMultiplier(double multiplier) Similar to "tick value" in its meaning, with the only difference of being per price unit instead of per tick (can be computed as tick value divided bypips)setNbboSupported(boolean nbboSupported) If this flag is set to true, then this instrument supports NBBO data, and it is possible to create NBBO indicator for the instrumentsetPips(double pips) Also known as min tick, tick size or minimal price increment.setRecordingTag(String recordingTag) Used to distinguish local history with special modes on the per instrument basis (i.e.setRequestedSymbol(String requestedSymbol) Used to correctly handle "generic" instrument substitution.setSizeMultiplier(double sizeMultiplier) Used when size granularity is less than 1 (for most providers it's always 1, so you can ignore this field if only those are targeted).Methods inherited from class velox.api.layer1.data.InstrumentCoreInfo.BuilderBase
getExchange, getSymbol, getType, self, setExchange, setFieldsFrom, setSymbol, setType
-
Field Details
-
pips
protected double pips -
multiplier
protected double multiplier -
fullName
-
isFullDepth
protected boolean isFullDepth -
sizeMultiplier
protected double sizeMultiplier -
isCrypto
protected boolean isCrypto -
recordingTag
-
isApiProtected
protected boolean isApiProtected -
isNbboSupported
protected boolean isNbboSupported -
dataDelay
protected long dataDelay -
requestedSymbol
-
defaultLotSize
protected int defaultLotSize
-
-
Constructor Details
-
BuilderBase
public BuilderBase()
-
-
Method Details
-
build
- Specified by:
buildin classInstrumentCoreInfo.BuilderBase<T extends InstrumentInfo.BuilderBase<T>>
-
setFieldsFrom
-
getPips
public double getPips() -
setPips
Also known as min tick, tick size or minimal price increment. This allows bookmap to translate level numbers to price that is shown to the user and vice versa -
getMultiplier
public double getMultiplier() -
setMultiplier
Similar to "tick value" in its meaning, with the only difference of being per price unit instead of per tick (can be computed as tick value divided bypips)Specifically, this field tells bookmap the following: "how many dollars (or other currency units) will my P&L change if I have position of 1 and price moves 1 dollar (or other price unit) up"
-
getFullName
-
setFullName
Full instrument name on the platforms where it's available, null otherwise -
isFullDepth
public boolean isFullDepth() -
setFullDepth
True if data provided for instrument is full depth data -
getSizeMultiplier
public double getSizeMultiplier() -
setSizeMultiplier
Used when size granularity is less than 1 (for most providers it's always 1, so you can ignore this field if only those are targeted). This is only a visual thing, as all updates should still be performed in integer units. It was introduced mostly because of cryptocurrencies - since sizes are no longer integer values, you can premultiply all sizes by certain value and specify it in this field. E.g. 1000 will make bookmap display size of 1 as 0.001. -
isCrypto
public boolean isCrypto() -
setCrypto
Allows bookmap to distinguish crypto instruments from other types. If true - this instrument is a cryptocurrency or is based on cryptocurrencies in some way -
getRecordingTag
-
setRecordingTag
Used to distinguish local history with special modes on the per instrument basis (i.e. local history with delayed data vs live data) Provider should set this field to specify special mode of this instrument,"DELAYED" for example
Note: it is recommended to not set this field for LIVE instruments for backward compatibility of historical servers, i.e. so the historical server returned "live" data to the user with the old client -
isApiProtected
public boolean isApiProtected() -
setApiProtected
If this flag is set to true, then all add-ons, except those marked withUnrestrictedDataannotation, will be blocked from receiving data from this instrument -
setDataDelay
Sets the data delay for the instrument.- Parameters:
dataDelay- The data delay in nanoseconds.- Returns:
- A reference to this object (for method chaining).
-
getRequestedSymbol
-
setRequestedSymbol
Used to correctly handle "generic" instrument substitution. If your provider wants to subscribe to the instrument with a different symbol than you received in subscription request (for example you received "ES" and want to subscribe to "ESH4"), then you should set this field to the symbol which you received in request.- Parameters:
requestedSymbol- symbol that you received in subscription method.
-
isNbboSupported
public boolean isNbboSupported() -
setNbboSupported
If this flag is set to true, then this instrument supports NBBO data, and it is possible to create NBBO indicator for the instrument -
getDefaultLotSize
public int getDefaultLotSize() -
setDefaultLotSize
-