Keyboard Shortcuts
Likes
Search
TWS API earning dates..
Walter,
The Wall Street Horizons subscription provides information about earnings dates via the reqFundamentals function: It will be in XML, i.e. ??? ??? <Name>Facebook Inc.</Name> ??? ??? <Ticker>FB</Ticker> ??? ??? <EarningsList> ??? ??? ??? <Earnings> ??? ??? ??? ??? <Q1>5/3/2017</Q1> ??? ??? ??? ??? <Q2>7/27/2016</Q2> ??? ??? ??? ??? <Q3>11/2/2016</Q3> ??? ??? ??? ??? <Q4>2/1/2017</Q4> ??? ??? ??? ??? <Period>Q1</Period> ??? ??? ??? ??? <Time>After Market</Time> ??? ??? ??? ??? <Etype>Confirmed</Etype> ??? ??? ??? ??? <Date>5/3/2017</Date> ??? ??? ??? ??? <TimeStamp>4/26/2017 1:13:26 PM</TimeStamp> ??? ??? ??? </Earnings> ??? ??? </EarningsList> |
开云体育Oh, nice. Thanks!
|
开云体育Do you mean read this date from your yes api python code?Yahoo finance data are not up to date for all the tickers.? I need this to automate my python script to display? On 8 Feb 2020, at 08:28, Despair <boris@...> wrote:
|
Robbo: still valid if subscribed to Horizon Wall Streets as Josh pointed out.
C# example: public void fundamentalData(int reqId, string data)
{
try
{
string ticker = XMLstringExtract(data, "Ticker");
data = XMLstringExtract(data, "EarningsList");
string date = XMLstringExtract(data, "Date");
string confirmed = XMLstringExtract(data, "Etype");
Log("Next " + ticker + " Earnings: " + date + " " + confirmed); } |
?I looked at?Horizon Wall Streets subscription and their subscription currently is 5 USD per month. I explored other options within?reqFundamentalData and mange to find next earning details within RESC.xml
-<Annual fYear="2020" periodLength="12" periodUnit="MNS" endMonth="12" fyNum="2">
?
<Interim type="Q" periodNum="1" periodLength="3" periodUnit="MNS" endMonth="3" endCalYear="2020" dateStatus="T" expectDate="2020-04-23T00:00:00"/>
?
<Interim type="Q" periodNum="2" periodLength="3" periodUnit="MNS" endMonth="6" endCalYear="2020" dateStatus="T" expectDate="2020-07-23T00:00:00"/>
?
<Interim type="Q" periodNum="3" periodLength="3" periodUnit="MNS" endMonth="9" endCalYear="2020"/>
?
<Interim type="Q" periodNum="4" periodLength="3" periodUnit="MNS" endMonth="12" endCalYear="2020"/>with the help of lxml/etree, I am now able to extract next earning date with the following code.? ? ? ? ? for child in root.xpath('//CompanyPeriods/Annual/Interim'): ? ? ? ? ? ? ? ? if (child.attrib['endCalYear'] == '2020'):
? ? ? ? ? ? ? ? ? ? print (child.tag, child.attrib, child.text)? |
hi Robbo , I tried the same, not getting results, Do I need WSJ subs? I tried it with that too. but not getting
<Annual endMonth="12" fYear="2021" fyNum="0" periodLength="12" periodUnit="MNS"> <Interim endCalYear="2021" endMonth="3" periodLength="3" periodNum="1" periodUnit="MNS" type="Q"/>
<Interim endCalYear="2021" endMonth="6" periodLength="3" periodNum="2" periodUnit="MNS" type="Q"/>
<Interim endCalYear="2021" endMonth="9" periodLength="3" periodNum="3" periodUnit="MNS" type="Q"/>
<Interim endCalYear="2021" endMonth="12" periodLength="3" periodNum="4" periodUnit="MNS" type="Q"/>
? |
Hi, ? with Wall Street Horizon subscription, reqFundamentalData(reqId:10000001, Contract:<XOM>, FundamentalType.CalendarReport) gives:
|
You have to subscribe to the WSH data feed in market subscriptions.? Then call: reqFundamentals(contract, FundamentalType.CalendarReport, handler); The handler will get back a big string of XML you can parse to get the event feed.? The TWS documentation for this functionality isn't very good.? I wasn't able to find a good page to give you a link.? But reqFundaments (in the Java API) or reqFundamentalData (in the EClient) is what you want. Hunter
On Friday, May 21, 2021, 12:32:38 PM PDT, <rajsekar37@...> wrote:
?. Does anyone know how to access this either in TWS and also In API?
|
Hi there I tried the IB api cal for the Earnings and it had issues. We got bad dates, sometimes the dates weren't there and it seemed to be flaky. SO we gave in an signed up for the SPLENDID this gets us IV, HV, earnings dates, earnings calcs based on prior earnings and a LOT of other data that we use to suplement and check IB data with. It's a simple API and we tend to use the overnight CSV by setting up a cronjob. curl " or PYTHON import requests x = requests.get(") print (x.text) |