public class PythonStrategyService extends StrategyService implements PythonEsperSubscriber
PythonMarketDataService
Modifier and Type | Field and Description |
---|---|
protected boolean |
exitPhaseAlreadyActivated |
protected AlgoTraderToPythonInterface |
pythonInterface |
Constructor and Description |
---|
PythonStrategyService(int javaPort,
int pythonPort,
GenericCacheFacade genericCacheFacade,
ObjectMapper objectMapper,
java.util.function.Consumer<ReferenceDataUpdateEventVO> markerEventConsumer) |
getCommonConfig, getJsonTemplate, getSimulationResults, getStrategyName, getWeight, onLifecycleEvent, setAccountService, setCalendarService, setCombinationService, setCommonConfig, setEventDispatcher, setFutureService, setGenericEventsService, setHealthService, setHistoricalDataService, setJsonTemplate, setLookupService, setMarketDataCacheService, setMarketDataService, setMeasurementService, setOptionService, setOrderLookupService, setOrderService, setPortfolioService, setPositionService, setPropertyService, setRateLimitService, setReferenceDataService, setRfqService, setStrategyName, setSubscriptionService, setSupportedAdaptersService, setWeight
protected AlgoTraderToPythonInterface pythonInterface
protected volatile boolean exitPhaseAlreadyActivated
public PythonStrategyService(int javaPort, int pythonPort, GenericCacheFacade genericCacheFacade, ObjectMapper objectMapper, java.util.function.Consumer<ReferenceDataUpdateEventVO> markerEventConsumer)
public void ping()
public void setSubscribedEventHandlerMethods(java.util.Set<java.lang.String> subscribedCallbackMethods)
public void sendDisconnectingMessage()
public void connectToPythonStrategy()
public void onEsperSubscriberInvocation(java.lang.Object... args)
@Subscriber(className='pythonStrategyService#onEsperSubscriberInvocation')
Object or objects selected in the Esper statement are passed to on_generic_callback in Python StrategyService class.onEsperSubscriberInvocation
in interface PythonEsperSubscriber
protected void onInit(LifecycleEventVO event)
onInit
in class StrategyService
protected void onPrefeed(LifecycleEventVO event)
onPrefeed
in class StrategyService
public void onStart(LifecycleEventVO event)
onStart
in class StrategyService
protected void onExit(LifecycleEventVO event)
onExit
in class StrategyService
protected void onRunning(LifecycleEventVO event)
onRunning
in class StrategyService
public void onTick(TickVO tick)
onTick
in interface TickEventListener
onTick
in class StrategyService
public void onBar(BarVO bar)
onBar
in interface BarEventListener
onBar
in class StrategyService
public void onTrade(TradeVO tradeVO)
onTrade
in interface TradeEventListener
onTrade
in class StrategyService
public void onQuote(QuoteVO quoteVO)
onQuote
in interface QuoteEventListener
onQuote
in class StrategyService
public void onOrder(OrderVO order)
onOrder
in interface OrderEventListener
onOrder
in class StrategyService
public void onOrderStatus(OrderStatusVO orderStatus)
onOrderStatus
in interface OrderStatusEventListener
onOrderStatus
in class StrategyService
public void onOrderCompletion(OrderCompletionVO orderCompletion)
onOrderCompletion
in interface OrderCompletionEventListener
onOrderCompletion
in class StrategyService
public void onFill(FillVO fill)
onFill
in interface FillEventListener
onFill
in class StrategyService
public void onTransaction(TransactionVO transaction)
onTransaction
in interface TransactionEventListener
onTransaction
in class StrategyService
public void onPositionMutation(PositionMutationVO positionMutation)
onPositionMutation
in interface PositionEventListener
onPositionMutation
in class StrategyService
public void onSessionEvent(SessionEventVO event)
onSessionEvent
in interface SessionEventListener
onSessionEvent
in class StrategyService
public void onAccountEvent(AccountEventVO accountEvent)
onAccountEvent
in interface AccountEventListener
onAccountEvent
in class StrategyService
public void onCashBalance(CashBalanceVO cashBalance)
onCashBalance
in interface CashBalanceEventListener
onCashBalance
in class StrategyService
public void onReconciliationEvent(ReconciliationEventVO event)
onReconciliationEvent
in interface ReconciliationEventListener
onReconciliationEvent
in class StrategyService
public void onOrderRequestStatus(OrderRequestStatusEventVO event)
onOrderRequestStatus
in interface OrderRequestStatusEventListener
onOrderRequestStatus
in class StrategyService
public void onRfqQuote(QuoteVO quote)
onRfqQuote
in interface RfqListener
onRfqQuote
in class StrategyService
public void onOrderBook(OrderBookVO orderBook)
onOrderBook
in interface OrderBookEventListener
onOrderBook
in class StrategyService
public void onAggregatedOrderBookEvent(AggregatedOrderBookVO orderBook)
onAggregatedOrderBookEvent
in interface AggregatedOrderBookEventListener
onAggregatedOrderBookEvent
in class StrategyService
public void onGenericEvent(GenericEventVO event)
onGenericEvent
in interface GenericEventListener
onGenericEvent
in class StrategyService
public void onLogEvent(LogEventVO event)
onLogEvent
in interface LogEventListener
onLogEvent
in class StrategyService
public void onHealthStatusChanged(HealthStatusVO healthStatus)
onHealthStatusChanged
in interface HealthStatusListener
onHealthStatusChanged
in class StrategyService
public MarketDataService getMarketDataService()
getMarketDataService
in class StrategyService
public OrderService getOrderService()
getOrderService
in class StrategyService
public OrderLookupService getOrderLookupService()
getOrderLookupService
in class StrategyService
public PortfolioService getPortfolioService()
getPortfolioService
in class StrategyService
public LookupService getLookupService()
getLookupService
in class StrategyService
public ReferenceDataService getReferenceDataService()
getReferenceDataService
in class StrategyService
public CalendarService getCalendarService()
getCalendarService
in class StrategyService
public OptionService getOptionService()
getOptionService
in class StrategyService
public PropertyService getPropertyService()
getPropertyService
in class StrategyService
public CombinationService getCombinationService()
getCombinationService
in class StrategyService
public FutureService getFutureService()
getFutureService
in class StrategyService
public MarketDataCacheService getMarketDataCacheService()
getMarketDataCacheService
in class StrategyService
public MeasurementService getMeasurementService()
getMeasurementService
in class StrategyService
public HistoricalDataService getHistoricalDataService()
getHistoricalDataService
in class StrategyService
public RfqService getRfqService()
getRfqService
in class StrategyService
public EventDispatcher getEventDispatcher()
getEventDispatcher
in class StrategyService
public GenericEventsService getGenericEventsService()
getGenericEventsService
in class StrategyService
public SupportedAdaptersService getSupportedAdaptersService()
getSupportedAdaptersService
in class StrategyService
public HealthService getHealthService()
getHealthService
in class StrategyService
public Strategy getStrategy()
getStrategy
in class StrategyService
public PythonMarketDataService getPythonMarketDataService()
public PythonOrderLookupService getPythonOrderLookupService()
public PythonOrderService getPythonOrderService()
public PythonPortfolioService getPythonPortfolioService()
public PythonLookupService getPythonLookupService()
public PythonSupportedAdaptersService getPythonSupportedAdaptersService()
public PythonReferenceDataService getPythonReferenceDataService()
public PythonCalendarService getPythonCalendarService()
public PythonOptionService getPythonOptionService()
public PythonPropertyService getPythonPropertyService()
public PythonCombinationService getPythonCombinationService()
public PythonFutureService getPythonFutureService()
public PythonMarketDataCacheService getPythonMarketDataCacheService()
public PythonMeasurementService getPythonMeasurementService()
public PythonHistoricalDataService getPythonHistoricalDataService()
public PythonRfqService getPythonRfqService()
public PythonEventDispatcher getPythonEventDispatcher()
public PythonGenericEventsService getPythonGenericEventsService()
public PythonHealthService getPythonHealthService()
public void setEngine(Engine engine)
setEngine
in class StrategyService
public Engine getEngine()
getEngine
in class StrategyService
public AccountService getAccountService()
getAccountService
in class StrategyService
public PositionService getPositionService()
getPositionService
in class StrategyService
public SubscriptionService getSubscriptionService()
getSubscriptionService
in class StrategyService
public RateLimitService getRateLimitService()
getRateLimitService
in class StrategyService