public class PythonMarketDataServiceStub extends PythonMarketDataService
objectMapper
Constructor and Description |
---|
PythonMarketDataServiceStub() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
findAdapterTypeBySecurity(SecurityVO security) |
SecurityVO |
findDefaultSecurity(java.util.List<? extends SecurityVO> inputSecuritiesVOs) |
SecurityVO |
findDefaultSecurity(java.lang.String baseCurrency,
java.lang.String transactionCurrency,
boolean reverse) |
java.util.List<SubscriptionVO> |
getSubscriptionsByStrategy(java.lang.String strategyName)
Gets all Subscriptions by the defined
strategyName . |
java.util.Set<java.lang.String> |
getSupportedAdapterTypes()
Returns all currently active data adapters.
|
boolean |
hasVol(long securityId)
Returns true if the corresponding Security is supposed to report volumes,e.g.:
Stocks: true
Forex: false
|
void |
initSubscriptions()
Initializes persistent subscriptions.
|
void |
initSubscriptions(java.lang.String adapterType)
Initializes persistent subscriptions for the specified adapter type.
|
boolean |
isSupportedAdapterType(java.lang.String adapterType)
Returns
true if the data adapter is supported. |
boolean |
isTickValid(java.lang.String tickJson)
Verifies if the tick is valid for the security associated with it.
|
java.lang.String |
normalizeTick(java.lang.String tickJson)
Normalize the tick value according to broker params multiplier if normaliseMarketData is enabled
|
void |
reconnect(java.lang.String adapterType)
Reconnect the adapter corresponding to the defined
adapterType |
void |
subscribe(java.lang.String strategyName,
long securityId)
Subscribes a Security for the defined Strategy.
|
void |
subscribe(java.lang.String strategyName,
long securityId,
java.lang.String adapterType)
Subscribes a Security for the defined Strategy and adapter type.
|
void |
subscribeToCurrency(StrategyVO strategy,
java.lang.String transactionCurrency)
Subscribes the Forex Security needed to convert transactionCurrency and basePortfolioCurrency.
|
void |
unsubscribe(java.lang.String strategyName,
long securityId)
Unsubscribes a Security for the defined Strategy.
|
void |
unsubscribe(java.lang.String strategyName,
long securityId,
java.lang.String adapterType)
Unsubscribes a Security for the defined Strategy and adapter type
|
serialize
public void initSubscriptions()
PythonMarketDataService
initSubscriptions
in class PythonMarketDataService
public void initSubscriptions(java.lang.String adapterType)
PythonMarketDataService
initSubscriptions
in class PythonMarketDataService
public void subscribe(java.lang.String strategyName, long securityId) throws UnknownAdapterException
PythonMarketDataService
UnknownAdapterException
.
If there are multiple market adapters, use PythonMarketDataService.subscribe(String, long, String)
subscribe
in class PythonMarketDataService
UnknownAdapterException
- if there are multiple active adapterspublic void subscribe(java.lang.String strategyName, long securityId, java.lang.String adapterType)
PythonMarketDataService
subscribe
in class PythonMarketDataService
public void subscribeToCurrency(StrategyVO strategy, java.lang.String transactionCurrency)
PythonMarketDataService
subscribeToCurrency
in class PythonMarketDataService
public void unsubscribe(java.lang.String strategyName, long securityId) throws UnknownAdapterException
PythonMarketDataService
UnknownAdapterException
.
If there are multiple market adapters, use PythonMarketDataService.unsubscribe(String, long, String)
unsubscribe
in class PythonMarketDataService
UnknownAdapterException
- if there are multiple active adapterspublic void unsubscribe(java.lang.String strategyName, long securityId, java.lang.String adapterType)
PythonMarketDataService
unsubscribe
in class PythonMarketDataService
public void reconnect(java.lang.String adapterType)
PythonMarketDataService
adapterType
reconnect
in class PythonMarketDataService
public java.util.List<SubscriptionVO> getSubscriptionsByStrategy(java.lang.String strategyName)
PythonMarketDataService
strategyName
. If corresponding Securities are
Combinations, all Components will be initialized as well. In additional all Properties are initializedgetSubscriptionsByStrategy
in class PythonMarketDataService
public java.util.Set<java.lang.String> getSupportedAdapterTypes()
PythonMarketDataService
getSupportedAdapterTypes
in class PythonMarketDataService
public boolean isSupportedAdapterType(java.lang.String adapterType)
PythonMarketDataService
true
if the data adapter is supported.isSupportedAdapterType
in class PythonMarketDataService
public boolean isTickValid(java.lang.String tickJson) throws java.io.IOException
PythonMarketDataService
isTickValid
in class PythonMarketDataService
java.io.IOException
public boolean hasVol(long securityId)
PythonMarketDataService
hasVol
in class PythonMarketDataService
public java.lang.String normalizeTick(java.lang.String tickJson) throws java.io.IOException
PythonMarketDataService
normalizeTick
in class PythonMarketDataService
java.io.IOException
public SecurityVO findDefaultSecurity(java.lang.String baseCurrency, java.lang.String transactionCurrency, boolean reverse)
findDefaultSecurity
in class PythonMarketDataService
public SecurityVO findDefaultSecurity(java.util.List<? extends SecurityVO> inputSecuritiesVOs)
findDefaultSecurity
in class PythonMarketDataService
public java.lang.String findAdapterTypeBySecurity(SecurityVO security)
findAdapterTypeBySecurity
in class PythonMarketDataService
security
- SecurityVO to find adapterType for