• C#
  • Java
  • VB
  • C++
  • Python
Contact us
Fundamental Data

Fundamental data for stocks and the Wall Street Events Horizon Calendar can be accessed via the TWS API through the IBApi.EClient.reqFundamentalData. For the "CalendarReport" it is necessary to have the Wall Street Horizon subscription activated first in Account Management. The other report types require the Fundamentals subscription but this is freely available and will be activated in most accounts by default.

  • client.reqFundamentalData(8001, ContractSamples.USStock(), "ReportsFinSummary", null);
  • client.reqFundamentalData(8001, ContractSamples.USStock(), "ReportsFinSummary", null);
  • client.reqFundamentalData(8001, ContractSamples.USStock(), "ReportsFinSummary", Nothing)
  • m_pClient->reqFundamentalData(8001, ContractSamples::USStock(), "ReportsFinSummary", TagValueListSPtr());
  • 1  self.reqFundamentalData(8001, ContractSamples.USStock(), "ReportsFinSummary", [])

Note how a string attribute specifies the requested report type. In the example above the request was made for the financial summary. See Report Types at the bottom of this page for the rest report types available.

There is a limitation of 60 reqFundamentalData requests that can be made in a 10 minute period.

Results are delivered via IBApi.EWrapper.fundamentalData in form of an XML report:

  • public class EWrapperImpl : EWrapper
    {
    ...
    public virtual void fundamentalData(int reqId, string data)
    {
    Console.WriteLine("FundamentalData. " + reqId + "" + data+"\n");
    }
  • public class EWrapperImpl implements EWrapper {
    ...
    @Override
    public void fundamentalData(int reqId, String data) {
    System.out.println("FundamentalData. ReqId: ["+reqId+"] - Data: ["+data+"]");
    }
  • Public Class EWrapperImpl
    Implements EWrapper
    ...
    Public Sub fundamentalData(reqId As Integer, data As String) Implements IBApi.EWrapper.fundamentalData
    Console.WriteLine("FundamentalData - ReqId [" & reqId & "] Data [" & data & "]")
    End Sub
  • class TestCppClient : public EWrapper
    {
    ...
    void TestCppClient::fundamentalData(TickerId reqId, const std::string& data) {
    printf( "FundamentalData. ReqId: %ld, %s\n", reqId, data.c_str());
    }
  • 1 class TestWrapper(wrapper.EWrapper):
    ...
    1  def fundamentalData(self, reqId: TickerId, data: str):
    2  super().fundamentalData(reqId, data)
    3  print("FundamentalData. ReqId:", reqId, "Data:", data)

The IBApi.EClient.reqFundamentalData request can be cancelled via IBApi.EClient.cancelFundamentalData :

  • client.cancelFundamentalData(8001);
  • client.cancelFundamentalData(8001);
  • '** Canceling fundamentals request ***
    client.cancelFundamentalData(8001)
  • m_pClient->cancelFundamentalData(8001);
  • 1  self.cancelFundamentalData(8001)

Report Types

Report TypeDescription
ReportsFinSummaryFinancial summary
ReportsOwnershipCompany's ownership (Can be large in size)
ReportSnapshotCompany's financial overview
ReportsFinStatementsFinancial Statements
RESCAnalyst Estimates
CalendarReportCompany's calendar

Fundamental Ratios data can be acquired by requesting generic tick type 258 with IBApi.EClient.reqMktData. See both Available Tick Types and Fundamental Ratios.