Package velox.api.layer1
Interface Layer1ApiDataProvider
- All Superinterfaces:
Layer1ApiDataListenable
- All Known Subinterfaces:
Layer1ApiProvider
- All Known Implementing Classes:
ExternalLiveBaseProvider,ExternalReaderBaseProvider,Layer1ApiDepthFreezer,Layer1ApiInjectorRelay,Layer1ApiRelay,Layer1ApiStrategiesEchoMessagesLayer
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
public interface Layer1ApiDataProvider
extends Layer1ApiDataListenable
Class implementing this should provide trade/depth data to subscribers
-
Method Summary
Modifier and TypeMethodDescription@Nullable StringformatPrice(String alias, double price) Format price using platform capabilities if possible.Methods inherited from interface velox.api.layer1.Layer1ApiDataListenable
addListener, removeListener
-
Method Details
-
formatPrice
Format price using platform capabilities if possible. Layers forward this to the data adapter; when the adapter returns null Bookmap falls back to its default formatter based on the instrument's pips.- Parameters:
alias- instrument aliasprice- real price (not in ticks)- Returns:
- human-readable price, or null if this provider has no platform-specific formatting for the instrument
- Throws:
InstrumentNotDefinedException- if instrument was not subscribed to
-