node-yahoo-finance2 icon indicating copy to clipboard operation
node-yahoo-finance2 copied to clipboard

Not able to get balanceSheetHistory -> balanceSheetStatements data

Open abhishekJ-RMS opened this issue 1 year ago • 4 comments

Bug Report

Describe the bug

Below is the response I am getting when trying to get balanceSheetHistory

const financialData = await yahooFinance.quoteSummary("AAPL", { modules: ["balanceSheetHistory"], });

  // Log the entire response to inspect its structure
  console.log(JSON.stringify(financialData, null, 2));

{ "balanceSheetHistory": { "balanceSheetStatements": [ { "maxAge": 1, "endDate": "2024-09-30T00:00:00.000Z" }, { "maxAge": 1, "endDate": "2023-09-30T00:00:00.000Z" }, { "maxAge": 1, "endDate": "2022-09-30T00:00:00.000Z" }, { "maxAge": 1, "endDate": "2021-09-30T00:00:00.000Z" } ], "maxAge": 86400 } }

Minimal Reproduction

Environment

Browser or Node: Node version (if applicable): Npm version: Browser verion (if applicable): Library version (e.g. 2.13.2):

Additional Context

abhishekJ-RMS avatar Nov 15 '24 23:11 abhishekJ-RMS

I am having this issue as well

Rxann avatar Dec 10 '24 18:12 Rxann

im having the issue as well

tomerfooks avatar Dec 11 '24 20:12 tomerfooks

up

Noname01010101 avatar Dec 14 '24 16:12 Noname01010101

Hi all, finally had a chance to look at this now, thanks for your patience.

From inspecting the real finance.yahoo.com site, it seems this information is no longer provided by Yahoo's quoteSummary endpoint, but rather, from the fundamentalsTimeSeries endpoint (see our docs on that).

Does this kind of query provide what you're looking for?

$ yahoo-finance fundamentalsTimeSeries AAPL '{"period1":"2021-01-01","module":"balance-sheet","type":"annual"}'
[
  {
    date: 2021-09-30T00:00:00.000Z,
    cashAndCashEquivalents: 34940000000,
    machineryFurnitureEquipment: 78659000000,
    investmentsAndAdvances: 127877000000,
    commonStockEquity: 63090000000,
    availableForSaleSecurities: 127877000000,
    otherEquityAdjustments: 163000000,
    currentDeferredRevenue: 7612000000,
    otherInvestments: 127877000000,
    payablesAndAccruedExpenses: 54763000000,
    totalNonCurrentLiabilitiesNetMinorityInterest: 162431000000,
    cashFinancial: 17305000000,
    otherShortTermInvestments: 27699000000,
    accumulatedDepreciation: -70283000000,
    totalDebt: 136522000000,
    currentAssets: 134836000000,
    otherNonCurrentAssets: 38762000000,
    currentDeferredLiabilities: 7612000000,
    workingCapital: 9355000000,
    totalLiabilitiesNetMinorityInterest: 287912000000,
    tradeandOtherPayablesNonCurrent: 24689000000,
    retainedEarnings: 5562000000,
    currentCapitalLeaseObligation: 1528000000,
    totalEquityGrossMinorityInterest: 63090000000,
    otherCurrentAssets: 14111000000,
    longTermDebt: 109106000000,
    investedCapital: 187809000000,
    currentDebt: 15613000000,
    totalAssets: 351002000000,
    ordinarySharesNumber: 16426786000,
    otherReceivables: 25228000000,
    cashEquivalents: 17635000000,
    totalNonCurrentAssets: 216166000000,
    netDebt: 89779000000,
    stockholdersEquity: 63090000000,
    landAndImprovements: 20041000000,
    investmentinFinancialAssets: 127877000000,
    totalCapitalization: 172196000000,
    capitalStock: 57365000000,
    accountsReceivable: 26278000000,
    shareIssued: 16426786000,
    otherCurrentBorrowings: 9613000000,
    longTermDebtAndCapitalLeaseObligation: 119381000000,
    cashCashEquivalentsAndShortTermInvestments: 62639000000,
    receivables: 51506000000,
    capitalLeaseObligations: 11803000000,
    inventory: 6580000000,
    currentLiabilities: 125481000000,
    netPPE: 49527000000,
    tangibleBookValue: 63090000000,
    leases: 11023000000,
    longTermCapitalLeaseObligation: 10275000000,
    otherNonCurrentLiabilities: 18361000000,
    otherCurrentLiabilities: 45965000000,
    currentDebtAndCapitalLeaseObligation: 17141000000,
    commonStock: 57365000000,
    otherProperties: 10087000000,
    gainsLossesNotAffectingRetainedEarnings: 163000000,
    payables: 54763000000,
    accountsPayable: 54763000000,
    commercialPaper: 6000000000,
    netTangibleAssets: 63090000000,
    grossPPE: 119810000000
  },
  // ...
  {
    date: 2024-09-30T00:00:00.000Z,
    cashAndCashEquivalents: 29943000000,
    machineryFurnitureEquipment: 80205000000,
    investmentsAndAdvances: 91479000000,
    commonStockEquity: 56950000000,
    availableForSaleSecurities: 91479000000,
    totalTaxPayable: 26601000000,
    otherEquityAdjustments: -7172000000,
    currentDeferredRevenue: 8249000000,
    payablesAndAccruedExpenses: 95561000000,
    totalNonCurrentLiabilitiesNetMinorityInterest: 131638000000,
    cashFinancial: 27199000000,
    otherShortTermInvestments: 35228000000,
    accumulatedDepreciation: -73448000000,
    totalDebt: 106629000000,
    currentAssets: 152987000000,
    otherNonCurrentAssets: 55335000000,
    currentDeferredLiabilities: 8249000000,
    workingCapital: -23405000000,
    totalLiabilitiesNetMinorityInterest: 308030000000,
    tradeandOtherPayablesNonCurrent: 9254000000,
    retainedEarnings: -19154000000,
    nonCurrentDeferredTaxesAssets: 19499000000,
    nonCurrentDeferredAssets: 19499000000,
    totalEquityGrossMinorityInterest: 56950000000,
    otherCurrentAssets: 14287000000,
    longTermDebt: 85750000000,
    investedCapital: 163579000000,
    currentDebt: 20879000000,
    totalAssets: 364980000000,
    ordinarySharesNumber: 15116786000,
    otherReceivables: 32833000000,
    cashEquivalents: 2744000000,
    totalNonCurrentAssets: 211993000000,
    netDebt: 76686000000,
    stockholdersEquity: 56950000000,
    incomeTaxPayable: 26601000000,
    landAndImprovements: 24690000000,
    investmentinFinancialAssets: 91479000000,
    totalCapitalization: 142700000000,
    capitalStock: 83276000000,
    accountsReceivable: 33410000000,
    shareIssued: 15116786000,
    otherCurrentBorrowings: 10912000000,
    longTermDebtAndCapitalLeaseObligation: 85750000000,
    cashCashEquivalentsAndShortTermInvestments: 65171000000,
    receivables: 66243000000,
    inventory: 7286000000,
    currentLiabilities: 176392000000,
    netPPE: 45680000000,
    tangibleBookValue: 56950000000,
    leases: 14233000000,
    otherNonCurrentLiabilities: 36634000000,
    otherCurrentLiabilities: 51703000000,
    currentDebtAndCapitalLeaseObligation: 20879000000,
    commonStock: 83276000000,
    gainsLossesNotAffectingRetainedEarnings: -7172000000,
    payables: 95561000000,
    accountsPayable: 68960000000,
    commercialPaper: 9967000000,
    netTangibleAssets: 56950000000,
    grossPPE: 119128000000
  }
]

gadicc avatar Dec 21 '24 07:12 gadicc

Belated thanks for the rocket confirmations, everyone :) Closing this issue and will track making things clearer on our side in https://github.com/gadicc/yahoo-finance2/issues/949.

gadicc avatar Aug 25 '25 08:08 gadicc