You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I managed to get the mktbar service working by changing a few lines in blp.py:
class EventHandler:
def marketdata_event(self, event):
event_name = _EVENT_DICT[event.eventType()]
for n, msg in enumerate(event):
if msg.messageType() in _MARKET_DATA_EVENTS: # replace == with in
Ahh this is a good example and seems fairly easty to support. I haven't used this service before hence the lack of support. Happy to except a PR on this feature.
I managed to get the mktbar service working by changing a few lines in blp.py:
class EventHandler:
and _MARKET_DATA_EVENTS becomes a list:
_MARKET_DATA_EVENTS = [
blpapi.Name("MarketDataEvents"),
blpapi.Name("MarketBarStart"),
blpapi.Name("MarketBarUpdate")
]
Now when calling blp.BlpStream, I use
with blp.BlpStream(setDefaultSubscriptionService="//blp/mktbar") as bs:
default_args = {
"fields": ["LAST_PRICE"],
"options" : "interval=1"
}
bs.subscribe({ "USDJPY Curncy": default_args})
The text was updated successfully, but these errors were encountered: