Open alexgolec opened 4 years ago
Neat!
According to : https://developer.tdameritrade.com/content/streaming-data#_Toc504640622
We can relate the Headline ID to the key we need.
If we run a subscribe to a symbol, for example, below I have ADBE
{'COUNT_FOR_KEYWORD': 5,
'ERROR_CODE': 0,
'HEADLINE': 'MW Adobe Systems stock price target raised to $730 '
'from $630 at BMO Capital',
'HEADLINE_ID': 'SN20210916008147',
'IS_HOT': False,
'KEYWORD_ARRAY': 'I/XISL,N/DJMW,P/SGN,P/OAC,I/XRUS,M/NND,I/XSTX,R/PRM,N/SN,I/XGDW,N/WEI,P/EWR,I/XDJLC,R/US,*ALL*,R/CA,P/RTRS,P/AEQI,M/TEC,R/USW,P/BFX,I/XDJGI,N/DJWI,N/CNW,P/HDL,I/XNQ1,I/XSLI,P/HLO,P/ABO,P/MWHL,I/XSP1,R/NME,I/XFCS,I/XSP5,ADBE,N/RUBL,I/SOF',
'STATUS': 'U',
'STORY_DATETIME': 1631800840000,
'STORY_ID': 'SN20210916008147',
'STORY_SOURCE': 'DJCNEWS',
'key': 'ADBE',
'seq': 8}
The HEADLINE_ID = SN20210916008147
all we need to do is take this link : https://research.tdameritrade.com/grid/public/markets/news/story.asp?docKey=
and set param docKey=1-
So we can go to
https://research.tdameritrade.com/grid/public/markets/news/story.asp?docKey=1-SN20210916008147
and get the story from td website
It appears as though most headlines come from DJCNEWS/BENZINGA, which are not publicly available from the URL provided. I believe the "1-" prefix corresponds to "CBSMW" (MarketWatch), in which might be accessible publicly. You would have to store a mapping from STORY_SOURCE to prefix based on the values found via the "Filter by News Source" dropdown on the right of the page:
There doesn't seem to be any documentation for the NEWS_STORY API Service, so perhaps this is unimplemented on their end, but that would likely be the way to retrieve news content.
https://research.tdameritrade.com/grid/public/markets/news/story.asp?docKey=XXXXX