alexgolec / tda-api

A TD Ameritrade API client for Python. Includes historical data for equities and ETFs, options chains, streaming order book data, complex order construction, and more.
https://tda-api.readthedocs.io
MIT License
1.27k stars 338 forks source link

News headlines #125

Closed highbulb closed 3 years ago

highbulb commented 3 years ago

News headlines is working for me. You need to contact API team and report problem. They need to verify your account with email and last four digits of account number. After that they will confirm the access. It is manual process and only API team can enable.

Below is output of news stream.

{'command': 'SUBS', 'content': [{'COUNT_FOR_KEYWORD': 6, 'ERROR_CODE': 0, 'HEADLINE': "MW UPDATE: Elon Musk's suggestive tweet leads to a " "discussion about a potential '$1-trillion favor' " 'for Tesla shareholders', 'HEADLINE_ID': 'SN20201220001023', 'IS_HOT': False, 'KEYWORD_ARRAY': 'MSTR,I/AUT,I/XISL,N/DJMW,P/SGN,M/TPX,P/MWMW,P/OAC,I/XRUS,M/NND,TSLA,R/PRM,N/MKT,N/HIY,N/SN,P/MWWS,N/WEI,I/XDJLC,R/US,ALL,R/CA,N/CRP,I/XAPT,R/USS,P/AEQI,I/IAV,M/TEC,R/USW,P/BFX,I/VEH,I/XDJGI,N/DJWI,N/CNW,N/FRX,M/AUTO,I/XNQ1,R/VA,I/XSLI,I/FIS,P/ABO,I/XSP1,R/NME,N/MFO,I/XSP6,I/XSP5,N/RUBL,M/FCL,I/SOF', 'STATUS': 'U', 'STORY_DATETIME': 1608517181000, 'STORY_ID': 'SN20201220001023', 'STORY_SOURCE': 'DJCNEWS', 'key': 'TSLA', 'seq': 1}, {'COUNT_FOR_KEYWORD': 4, 'ERROR_CODE': 0, 'HEADLINE': 'DJ Apple Closes About 80 Stores Due To Rising ' 'Covid-19 Cases -- Barrons.com', 'HEADLINE_ID': 'DN20201220000839', 'IS_HOT': False, 'KEYWORD_ARRAY': 'N/DJEN,AAPL,N/DJIV,N/NWS,P/RCC,N/GEN,N/DJIB,M/NND,P/WMMI,I/XSTX,N/WED,I/XFFX,I/XGDW,P/AEI,P/PSH,N/WEI,ALL,R/CA,P/ACMD,N/DJG,P/AEQI,N/DJI,I/CPR,R/USW,N/DJN,I/XDJGI,N/DJWI,P/MAAD,I/XNQ1,R/NME,N/DJRT,N/OSCM,N/DJGP,I/XISL,P/MCT,N/DJGS,P/SGN,N/DJGV,N/DJCS,P/NIP,N/LAB,P/NAE,I/XRUS,N/DN,P/FNVW,R/PRM,P/NIB,N/OSTR,N/DJOS,P/EWR,I/XDJLC,R/US,I/XDJI,P/MC1,N/WER,M/TEC,N/DJQA,P/MAST,N/CNW,N/MADN,N/HLT,I/XSLI,N/WSJC,N/FCTV,P/ABO,I/XSP1,N/DJPN,I/XSP5,I/XGTI,N/DJPT,N/FNVW,N/BRNO', 'STATUS': 'U', 'STORY_DATETIME': 1608497158000, 'STORY_ID': 'DN20201220000839', 'STORY_SOURCE': 'DJCNEWS', 'key': 'AAPL', 'seq': 1}, {'COUNT_FOR_KEYWORD': 5, 'ERROR_CODE': 0, 'HEADLINE': 'Boeing Uncrewed Loyal Wingman Conducted First ' 'High-Speed Taxi Test With Royal Australian Air ' 'Force', 'HEADLINE_ID': 'B18868615', 'IS_HOT': False, 'KEYWORD_ARRAY': 'News,ALL,BA', 'STATUS': 'U', 'STORY_DATETIME': 1608506662000, 'STORY_ID': 'B18868615', 'STORY_SOURCE': 'BENZINGA', 'key': 'BA', 'seq': 1}, {'COUNT_FOR_KEYWORD': 3, 'ERROR_CODE': 0, 'HEADLINE': "Here's What You Need To Know About Cyberattack " 'Against US', 'HEADLINE_ID': 'B18868228', 'IS_HOT': False, 'KEYWORD_ARRAY': 'MSFT,SWI,Government,News,General,Politics,SPY,ALL,Global', 'STATUS': 'U', 'STORY_DATETIME': 1608500618000, 'STORY_ID': 'B18868228', 'STORY_SOURCE': 'BENZINGA', 'key': 'MSFT', 'seq': 1}],

alexgolec commented 3 years ago

What is your source on only the API team being able to enable news headlines? I have news headlines on my account and it's not clear to me how I enabled it.

alexgolec commented 3 years ago

Hm, I'm hesitant to include this as a resolution because if that email is so slow to get a response then they probably don't want to be hammered with requests to enable news headlines. Also I've deleted your comment so as not to publicly expose that person's email. The original comment by @highbulb read:


Hi @alexgolec,

I initially used to send emails to api@tdameritrade.com. Over the time one support person responded finally. His email is [redacted]@[redacted]

I think it is worth trying both emails. Hope this helps!```