Package velox.api.layer1
Interface Layer1ApiTradingProvider
- All Superinterfaces:
Layer1ApiTradingListenable
- All Known Subinterfaces:
Layer1ApiProvider
- All Known Implementing Classes:
ExternalLiveBaseProvider,ExternalReaderBaseProvider,Layer1ApiDepthFreezer,Layer1ApiInjectorRelay,Layer1ApiRelay,Layer1ApiStrategiesEchoMessagesLayer
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
public interface Layer1ApiTradingProvider
extends Layer1ApiTradingListenable
Class implementing this should provide ability to work with orders
-
Method Summary
Modifier and TypeMethodDescriptionvoidsendOrder(OrderSendParameters orderSendParameters) Submit order with specified parameters.voidupdateOrder(OrderUpdateParameters orderUpdateParameters) Update order according to parameters.Methods inherited from interface velox.api.layer1.Layer1ApiTradingListenable
addListener, removeListener
-
Method Details
-
sendOrder
Submit order with specified parameters.Fire-and-forget: the result arrives asynchronously through
Layer1ApiTradingListener. Acceptance and later state changes come asLayer1ApiTradingListener.onOrderUpdated(velox.api.layer1.data.OrderInfoUpdate), a rejection as the same callback with statusOrderStatus.REJECTED, fills asLayer1ApiTradingListener.onOrderExecuted(velox.api.layer1.data.ExecutionInfo). Order types the connected platform does not support natively (OCO, OSO, brackets, trailing stops) are emulated by Bookmap layers below the caller, so the caller sees the same callbacks either way.- Parameters:
orderSendParameters- parameters
-
updateOrder
Update order according to parameters. The kind of update is determined by the concrete class of the argument: cancel, move, move to market or resize (see the subclasses ofOrderUpdateParameters). LikesendOrder(OrderSendParameters), the call returns immediately and the outcome is reported throughLayer1ApiTradingListener.onOrderUpdated(velox.api.layer1.data.OrderInfoUpdate).- Parameters:
orderUpdateParameters- parameters
-