WarpEngine Embedded Python Reactor
Build 39
|
The Gatea Data Capture Platform consumes and records real-time data from either the Gatea MD-Direct or Refinitiv TREP pub/sub platforms.
The Data Capture platform has an Embedded Python Interpreter that is a Reactor which drives real-time updates and data stream (Record) life-cycle events into Python, allowing you to add value to the data stream by:
The Embedded Python Reactor turns the Data Capture Platforom into a full Micro Service architecture. You may rapidly code up new services and publish to MD-Direct, TREP, or even a log file, for example
MicroService | Description |
---|---|
Block Trade | Publish all trades > $1 million to BLOCK.TRADE |
OPRA Trade Feed | Publish only OPRA trades with contract quote as appendage |
Vendor Compare | Publish BASIC.CMP showing % of time Nasdaq Basic quotes match the SIP |
Signal Gen | Publish SMA.BUY when short-term Simple Moving Average crosses above long-term SMA; Reverse for SMA.SELL |
Chart | Publish ( Open, High, Low, Close, Volume ) every minute to feed charting package |
The Embedded Python Reactor drives events into well-defined Python callback handlers in your application. There are 3 types of callbacks:
Reactor Callback | Description |
---|---|
Engine life-cycle | Load, Unload |
Record life-cycle | Initialize, Update Received, Publish Image, etc. |
Field updates | BID, ASK, TRDPRC_1 |
The Embedded Reactor requires you to register interest in a ticker list and optionally a Field List to receive real-time updates in Python. The Reactor will only drive events to those tickers and fields that you have registered.
In this manner, you may tweak the performance to your liking for example only receiving Trades from a tape.
All Reactor-driven callbacks are passed a Context as the 1st argument. You use the Context when accessing any functionthat query the Last Value Cache (LVC) or the current update being driven from the data capture platform.
Key concepts:
Concept | Description |
---|---|
Reactor Callbacks | Real-time events are driven by the Reactor into Python |
Registration | You explicitly register a ticker and/or field for callback into Python. |
Context | Supplied to all callbacks, allowing you to access internal data |
Unique Record ID | Supplied to all Record- or Field-level callbacks |