Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to get balanceSheetHistory -> balanceSheetStatements data #840

Open
abhishekJ-RMS opened this issue Nov 15, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@abhishekJ-RMS
Copy link

abhishekJ-RMS commented Nov 15, 2024

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 abhishekJ-RMS added the bug Something isn't working label Nov 15, 2024
@Rxann
Copy link

Rxann commented Dec 10, 2024

I am having this issue as well

@tomerfooks
Copy link

im having the issue as well

@Noname01010101
Copy link

up

@gadicc
Copy link
Owner

gadicc commented Dec 21, 2024

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
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants