public class PythonMarketDataService
extends java.lang.Object
MarketDataService
from PythonStrategyService
.
Methods mirror delegated methods with small changes (no Optional, only VOs are used, not entities). Some are left out.Modifier and Type | Field and Description |
---|---|
protected ObjectMapper |
objectMapper |
Constructor and Description |
---|
PythonMarketDataService(MarketDataService marketDataService,
MarketDataSubscriptionInitializer marketDataSubscriptionInitializer,
GenericCacheFacade genericCacheFacade,
ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
java.util.List<SecurityVO> |
findSecuritiesByMarketScan(MarketScannerParametersDTO parameters,
long accountId) |
java.util.List<SubscriptionVO> |
getSubscriptionsByStrategy(java.lang.String strategyName)
Gets all Subscriptions by the defined
strategyName . |
void |
initSubscriptions()
Initializes subscriptions.
|
void |
pauseSimulationData() |
void |
resumeSimulationData() |
protected java.lang.String |
serialize(java.lang.Object object) |
void |
subscribe(java.lang.String strategyName,
long securityId)
Subscribes a Security for the defined Strategy.
|
void |
subscribe(java.lang.String strategyName,
long securityId,
long accountId)
Subscribes a Security for the defined Strategy and adapter type.
|
void |
subscribeToAggregatedOrderBook(java.lang.String strategyName,
java.lang.String symbol,
java.lang.Class<? extends Security> securityClass) |
void |
subscribeToCurrency(java.lang.String strategyName,
java.lang.String currency)
Subscribes the Forex Security needed to convert currency and basePortfolioCurrency.
|
void |
subscribeToOrderBook(java.lang.String strategyName,
long securityId) |
void |
subscribeToOrderBook(java.lang.String strategyName,
long securityId,
long accountId) |
void |
unsubscribe(java.lang.String strategyName,
long securityId)
Unsubscribes a Security for the defined Strategy.
|
void |
unsubscribe(java.lang.String strategyName,
long securityId,
long accountId)
Unsubscribes a Security for the defined Strategy and adapter type
|
void |
unsubscribeFromAggregatedOrderBook(java.lang.String strategy,
java.lang.String symbol,
java.lang.Class<? extends Security> securityClass) |
void |
unsubscribeFromOrderBook(java.lang.String strategy,
long securityId) |
void |
unsubscribeFromOrderBook(java.lang.String strategy,
long securityId,
long accountId) |
void |
unsubscribeFromOrderBooksOtherThan(java.lang.String strategyName,
long securityId,
long accountId) |
public PythonMarketDataService(MarketDataService marketDataService, MarketDataSubscriptionInitializer marketDataSubscriptionInitializer, GenericCacheFacade genericCacheFacade, ObjectMapper objectMapper)
protected java.lang.String serialize(java.lang.Object object)
public void initSubscriptions()
public void subscribe(java.lang.String strategyName, long securityId) throws ConnectorNotFoundException
ConnectorNotFoundException
.
If there are multiple market adapters, use subscribe(String, long, long)
ConnectorNotFoundException
- if there are multiple active adapterspublic void subscribe(java.lang.String strategyName, long securityId, long accountId)
public void subscribeToCurrency(java.lang.String strategyName, java.lang.String currency)
public void unsubscribe(java.lang.String strategyName, long securityId) throws ConnectorNotFoundException
ConnectorNotFoundException
.
If there are multiple market adapters, use unsubscribe(String, long, long)
ConnectorNotFoundException
- if there are multiple active adapterspublic void unsubscribe(java.lang.String strategyName, long securityId, long accountId)
public java.util.List<SubscriptionVO> getSubscriptionsByStrategy(java.lang.String strategyName)
strategyName
. If corresponding Securities are
Combinations, all Components will be initialized as well. In additional all Properties are initializedpublic java.util.List<SecurityVO> findSecuritiesByMarketScan(MarketScannerParametersDTO parameters, long accountId)
public void subscribeToOrderBook(java.lang.String strategyName, long securityId)
public void subscribeToOrderBook(java.lang.String strategyName, long securityId, long accountId)
public void subscribeToAggregatedOrderBook(java.lang.String strategyName, java.lang.String symbol, java.lang.Class<? extends Security> securityClass)
public void unsubscribeFromAggregatedOrderBook(java.lang.String strategy, java.lang.String symbol, java.lang.Class<? extends Security> securityClass)
public void unsubscribeFromOrderBook(java.lang.String strategy, long securityId)
public void unsubscribeFromOrderBook(java.lang.String strategy, long securityId, long accountId)
public void unsubscribeFromOrderBooksOtherThan(java.lang.String strategyName, long securityId, long accountId)
public void pauseSimulationData()
public void resumeSimulationData()