Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Stream Live News #698

Open
NimaMPH opened this issue Feb 21, 2024 · 0 comments
Open

Stream Live News #698

NimaMPH opened this issue Feb 21, 2024 · 0 comments

Comments

@NimaMPH
Copy link

NimaMPH commented Feb 21, 2024

I am trying to start streaming live news but it seems that there is no genericTickList that provides it. I got f"mdoff,292:{provider_codes}" from IBKR API document but it does not work and the ticker does not have news data:

Get live news data for each symbol

for contract in settings.contracts_list:
symbol = contract.symbol

# Request live news data for each contract
ticker_live_news = ib_obj.reqMktData(
                                   contract           = contract,
                                   genericTickList    = f"mdoff,292:{provider_codes}",
                                   snapshot           = False,
                                   regulatorySnapshot = False
                                   )

# Confirm live news data is streaming for the symbol
print(f"{symbol} Live News Data Streaming Started!")
print(ticker_live_news)

# Call on_live_news_data_update_func if there is new data
ticker_live_news.updateEvent += on_live_news_data_update_func
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant