Market data engine wrapper.
More...
|
def | __init__ (self, config, instrdb, cback=None) |
| create MarketData object param[in] config - configuration param[in] instrdb - InstrDB instance param[in] cback - events callback: "on_heartbeat" -> on_heartbeat - heartbeat received "on_book" -> on_book(Book) - book received "on_trade" -> on_trade(Trade) - trade received "on_quote" -> on_quote(Quote) - quote received "on_bar" -> on_bar(Bar) - bar received "on_indicator" -> on_indicator(Indicator) - indicator received "on_common_info" -> on_common_info(CommonInfo) - quote received "on_subscribe" -> on_subscribe(Instr, SubscriptionType) "on_subscribe_result" -> on_subscribe(Instr, SubscriptionType, error) "on_connected" -> on_connected() "on_disconnected" -> on_disconnected()
|
|
def | __del__ (self) |
|
def | ptr (self) |
|
def | start (self) |
| initializes connect to source of market data
|
|
def | stop (self) |
| stops processing of market data
|
|
def | subscribe (self, alias, mask, source=None) |
| subscribes to the market data of specific instrument More...
|
|
def | send (self, mdtype, data) |
|
def | get_feed_state (self, instr, source=None) |
|
def | get_book (self, instr) |
|
def | get_quote (self, instr) |
|
def | get_trade (self, instr) |
|
def | get_indicator (self, instr, indicator_type) |
|
def | get_common_info (self, instr) |
|
def | get_best_price (self, instr, best_price_type) |
|
Market data engine wrapper.
◆ get_best_price()
def xroad.mdata.MarketData.get_best_price |
( |
|
self, |
|
|
|
instr, |
|
|
|
best_price_type |
|
) |
| |
gets last best_price from mdata cache by instrument
:param instr - instrument instance
:param best_price_type - best_price type
◆ get_book()
def xroad.mdata.MarketData.get_book |
( |
|
self, |
|
|
|
instr |
|
) |
| |
gets last book from mdata cache by instrument
:param instr - instrument inctance
◆ get_common_info()
def xroad.mdata.MarketData.get_common_info |
( |
|
self, |
|
|
|
instr |
|
) |
| |
gets common_info from mdata cache by instrument
:param instr - instrument instance
◆ get_indicator()
def xroad.mdata.MarketData.get_indicator |
( |
|
self, |
|
|
|
instr, |
|
|
|
indicator_type |
|
) |
| |
gets last indicator from mdata cache by instrument
:param instr - instrument instance
:param indicator_type - indicator type
◆ get_quote()
def xroad.mdata.MarketData.get_quote |
( |
|
self, |
|
|
|
instr |
|
) |
| |
gets last quote from mdata cache by instrument
:param instr - instrument inctance
◆ get_trade()
def xroad.mdata.MarketData.get_trade |
( |
|
self, |
|
|
|
instr |
|
) |
| |
gets last trade from mdata cache by instrument
:param instr - instrument inctance
◆ send()
def xroad.mdata.MarketData.send |
( |
|
self, |
|
|
|
mdtype, |
|
|
|
data |
|
) |
| |
sends data to stream
:param mdtype - type of mdata @see class ProtoType
:param data -
◆ subscribe()
def xroad.mdata.MarketData.subscribe |
( |
|
self, |
|
|
|
alias, |
|
|
|
mask, |
|
|
|
source = None |
|
) |
| |
subscribes to the market data of specific instrument
- Parameters
-
[in] | alias | - alias of instr |
[in] | mask | - subscription mask |
- See also
- SubscriptionType
- Parameters
-
[in] | source | - name of node which is source of market data |
The documentation for this class was generated from the following file:
- /home/dmitryme/dev/xroad/release/sdk/python/xroad/mdata.py