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

Earnings, Income Statement, Balance Sheet not returning data : Error #25

Open
paragemini opened this issue Jun 23, 2021 · 3 comments
Open

Comments

@paragemini
Copy link

paragemini commented Jun 23, 2021

Hello when I try to pull the data using the following command :

x <- av_get(symbol = "AAPL",
       av_fun     = "BALANCE_SHEET"

I get the following error :

Error: AAPL. API parameters used: symbol=AAPL, function=BALANCE_SHEET, api_key=O18N2VYYPKJS2RZZ, apikey=HIDDEN_FOR_YOUR_SAFETYlist(fiscalDateEnding = c("2020-09-30", "2019-09-30", "2018-09-30", "2017-09-30", "2016-09-30"), reportedCurrency = c("USD", "USD", "USD", "USD", "USD"), totalAssets = c("323888000000", "338516000000", "365725000000", "375319000000", "321686000000"), totalCurrentAssets = c("143713000000", "162819000000", "131339000000", "128645000000", "106869000000"), cashAndCashEquivalentsAtCarryingValue = c("38016000000", "48844000000", "25913000000", "20289000000", "20484000000"), cashAndShortTermInvestments = c("90943000000", 
"100557000000", "25913000000", "74181000000", "67155000000"), inventory = c("4061000000", "4106000000", "3956000000", "4855000000", "2132000000"), currentNetReceivables = c("37445000000", "45804000000", "48995000000", "35673000000", "29299000000"), totalNonCurrentAssets = c("180175000000", "175697000000", "234386000000", "246674000000", "385247000000
In addition: Warning message:
In stri_c(..., sep = sep, collapse = collapse, ignore_null = TRUE) :
  argument is not an atomic vector; coercing

SImilar error is repeated when using other functions

@cjuncosa
Copy link

Im having the same issue. I tried installing from devtools/git and same error:

av_get(symbol = "MSFT", av_fun = "EARNINGS")
Error: MSFT. API parameters used: symbol=MSFT, function=EARNINGS, apikey=HIDDEN_FOR_YOUR_SAFETYlist(fiscalDateEnding = c("2021-09-30", "2021-06-30", "2020-06-30", "2019-06-30", "2018-06-30", "2017-06-30", "2016-06-30", "2015-06-30", "2014-06-30", "2013-06-30", "2012-06-30", "2011-06-30", "2010-06-30", "2009-06-30", "2008-06-30", "2007-06-30", "2006-06-30", "2005-06-30", "2004-06-30", "2003-06-30", "2002-06-30", "2001-06-30", "2000-06-30", "1999-06-30", "1998-06-30", "1997-06-30", "1996-06-30"), reportedEPS = c("2.27", "7.97", "5.75", "4.75", "3.88", "3.31", "2.76", "2.46", "2.63", "2.67",
"2.73", "2.69", "2.1", "1.7", "1.88", "1.49", "1.27", "1.3", "1.26", "1.05", "0.93", "0.91", "0.87", "0.71", "0.46", "0.33", "0.215")). API parameters used: symbol=MSFT, function=EARNINGS, apikey=HIDDEN_FOR_YOUR_SAFETYlist(fiscalDateEnding = c("2021-09-30", "2021-06-30", "2021-03-31", "2020-12-31", "2020-09-30", "2020-06-30", "2020-03-31", "2019-12-31", "2019-09-30", "2019-06-30", "2019-03-31", "2018

@pauleeeeee
Copy link

Hi - I also receive this error when querying income statement, balance sheet, cash flow, and earnings.

@henrique-anatole
Copy link

henrique-anatole commented Nov 19, 2023

Hi - I also receive this error when querying income statement, balance sheet, cash flow, and earnings.

@pauleeeeee

I solved the issue with a small change in the function after the if (is_forex) part:

image

    } else if (av_fun %in% c("INCOME_STATEMENT", "BALANCE_SHEET", "CASH_FLOW", "EARNINGS")) {

        content <- content_list[-1] %>% 
            purrr::map_dfr(tibble::as_tibble) %>%
            tibble::add_column(period = rep(names(content_list[-1]), as.vector(purrr::map_dfr(content_list[-1], nrow))), .before = 1) %>% 
            tibble::add_column(symbol = content_list[[1]], .before = 1)

Hope it helps others!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants