Current section
Files
Jump to
Current section
Files
lib/fakes/api/stock_fundamental.ex
defmodule Fakes.Api.StockFundamental do
@moduledoc false
alias Fakes.Api.Base
def financial_statement_list() do
Base.ok_http_response([
"ETH",
"GOGN",
"000540.SZ",
"603931.SS",
"JMG.L",
"067900.KS",
"ERM.L",
"BSP.AX",
"SBFMW",
"LVCLY",
"CPAH",
"JGLE.JK",
"SMWN.DE",
"EMAARDEV.AE",
"0729.HK",
"CYBN",
"CHG",
"PLUGD",
"FVTID",
"0440.HK",
"GOAU4.SA",
"1930.HK",
"CDTI",
"PRCX",
"688133.SS",
"SCRM",
"SHALPAINTS.NS",
"..."
])
end
def income_statement() do
Base.ok_http_response([
%{
"date" => "2022-09-24",
"symbol" => "AAPL",
"reportedCurrency" => "USD",
"cik" => "0000320193",
"fillingDate" => "2022-10-28",
"acceptedDate" => "2022-10-27 18:01:14",
"calendarYear" => "2022",
"period" => "FY",
"revenue" => 394_328_000_000,
"costOfRevenue" => 223_546_000_000,
"grossProfit" => 170_782_000_000,
"grossProfitRatio" => 0.43309630561360085,
"researchAndDevelopmentExpenses" => 26_251_000_000,
"generalAndAdministrativeExpenses" => 0.0,
"sellingAndMarketingExpenses" => 0.0,
"sellingGeneralAndAdministrativeExpenses" => 25_094_000_000,
"otherExpenses" => 0.0,
"operatingExpenses" => 51_345_000_000,
"costAndExpenses" => 274_891_000_000,
"interestIncome" => 0.0,
"interestExpense" => 0.0,
"depreciationAndAmortization" => 11_104_000_000,
"ebitda" => 130_207_000_000,
"ebitdaratio" => 0.3301997322026333,
"operatingIncome" => 119_437_000_000,
"operatingIncomeRatio" => 0.30288744395528594,
"totalOtherIncomeExpensesNet" => -334_000_000,
"incomeBeforeTax" => 119_103_000_000,
"incomeBeforeTaxRatio" => 0.30204043334482966,
"incomeTaxExpense" => 19_300_000_000,
"netIncome" => 99_803_000_000,
"netIncomeRatio" => 0.2530964070519973,
"eps" => 6.15,
"epsdiluted" => 6.11,
"weightedAverageShsOut" => 16_215_963_000,
"weightedAverageShsOutDil" => 16_325_819_000,
"link" =>
"https://www.sec.gov/Archives/edgar/data/320193/000032019322000108/0000320193-22-000108-index.htm",
"finalLink" =>
"https://www.sec.gov/Archives/edgar/data/320193/000032019322000108/aapl-20220924.htm"
},
%{
"date" => "2021-09-25",
"symbol" => "AAPL",
"reportedCurrency" => "USD",
"cik" => "0000320193",
"fillingDate" => "2021-10-29",
"acceptedDate" => "2021-10-28 18:04:28",
"calendarYear" => "2021",
"period" => "FY",
"revenue" => 365_817_000_000,
"costOfRevenue" => 212_981_000_000,
"grossProfit" => 152_836_000_000,
"grossProfitRatio" => 0.4177935962516778,
"researchAndDevelopmentExpenses" => 21_914_000_000,
"generalAndAdministrativeExpenses" => 0.0,
"sellingAndMarketingExpenses" => 0.0,
"sellingGeneralAndAdministrativeExpenses" => 21_973_000_000,
"otherExpenses" => 0.0,
"operatingExpenses" => 43_887_000_000,
"costAndExpenses" => 256_868_000_000,
"interestIncome" => 2_843_000_000,
"interestExpense" => 2_645_000_000,
"depreciationAndAmortization" => 11_284_000_000,
"ebitda" => 123_136_000_000,
"ebitdaratio" => 0.33660546120054563,
"operatingIncome" => 108_949_000_000,
"operatingIncomeRatio" => 0.29782377527561593,
"totalOtherIncomeExpensesNet" => 258_000_000,
"incomeBeforeTax" => 109_207_000_000,
"incomeBeforeTaxRatio" => 0.2985290459437369,
"incomeTaxExpense" => 14_527_000_000,
"netIncome" => 94_680_000_000,
"netIncomeRatio" => 0.2588179335569424,
"eps" => 5.67,
"epsdiluted" => 5.61,
"weightedAverageShsOut" => 16_701_272_000,
"weightedAverageShsOutDil" => 16_864_919_000,
"link" =>
"https://www.sec.gov/Archives/edgar/data/320193/000032019321000105/0000320193-21-000105-index.htm",
"finalLink" =>
"https://www.sec.gov/Archives/edgar/data/320193/000032019321000105/aapl-20210925.htm"
}
])
end
def balance_sheet_statement() do
Base.ok_http_response([
%{
"date" => "2022-09-24",
"symbol" => "AAPL",
"reportedCurrency" => "USD",
"cik" => "0000320193",
"fillingDate" => "2022-10-28",
"acceptedDate" => "2022-10-27 18:01:14",
"calendarYear" => "2022",
"period" => "FY",
"cashAndCashEquivalents" => 23_646_000_000,
"shortTermInvestments" => 24_658_000_000,
"cashAndShortTermInvestments" => 48_304_000_000,
"netReceivables" => 60_932_000_000,
"inventory" => 4_946_000_000,
"otherCurrentAssets" => 21_223_000_000,
"totalCurrentAssets" => 135_405_000_000,
"propertyPlantEquipmentNet" => 42_117_000_000,
"goodwill" => 0.0,
"intangibleAssets" => 0.0,
"goodwillAndIntangibleAssets" => 0.0,
"longTermInvestments" => 120_805_000_000,
"taxAssets" => 0.0,
"otherNonCurrentAssets" => 54_428_000_000,
"totalNonCurrentAssets" => 217_350_000_000,
"otherAssets" => 0.0,
"totalAssets" => 352_755_000_000,
"accountPayables" => 64_115_000_000,
"shortTermDebt" => 21_110_000_000,
"taxPayables" => 0.0,
"deferredRevenue" => 7_912_000_000,
"otherCurrentLiabilities" => 60_845_000_000,
"totalCurrentLiabilities" => 153_982_000_000,
"longTermDebt" => 98_959_000_000,
"deferredRevenueNonCurrent" => 0.0,
"deferredTaxLiabilitiesNonCurrent" => 0.0,
"otherNonCurrentLiabilities" => 49_142_000_000,
"totalNonCurrentLiabilities" => 148_101_000_000,
"otherLiabilities" => 0.0,
"capitalLeaseObligations" => 0.0,
"totalLiabilities" => 302_083_000_000,
"preferredStock" => 0,
"commonStock" => 64_849_000_000,
"retainedEarnings" => -3_068_000_000,
"accumulatedOtherComprehensiveIncomeLoss" => -11_109_000_000,
"othertotalStockholdersEquity" => 0.0,
"totalStockholdersEquity" => 50_672_000_000,
"totalLiabilitiesAndStockholdersEquity" => 352_755_000_000,
"minorityInterest" => 0,
"totalEquity" => 50_672_000_000,
"totalLiabilitiesAndTotalEquity" => 352_755_000_000,
"totalInvestments" => 145_463_000_000,
"totalDebt" => 120_069_000_000,
"netDebt" => 96_423_000_000,
"link" =>
"https://www.sec.gov/Archives/edgar/data/320193/000032019322000108/0000320193-22-000108-index.htm",
"finalLink" =>
"https://www.sec.gov/Archives/edgar/data/320193/000032019322000108/aapl-20220924.htm"
},
%{
"date" => "2021-09-25",
"symbol" => "AAPL",
"reportedCurrency" => "USD",
"cik" => "0000320193",
"fillingDate" => "2021-10-29",
"acceptedDate" => "2021-10-28 18:04:28",
"calendarYear" => "2021",
"period" => "FY",
"cashAndCashEquivalents" => 34_940_000_000,
"shortTermInvestments" => 27_699_000_000,
"cashAndShortTermInvestments" => 62_639_000_000,
"netReceivables" => 51_506_000_000,
"inventory" => 6_580_000_000,
"otherCurrentAssets" => 14_111_000_000,
"totalCurrentAssets" => 134_836_000_000,
"propertyPlantEquipmentNet" => 39_440_000_000,
"goodwill" => 0.0,
"intangibleAssets" => 0.0,
"goodwillAndIntangibleAssets" => 0.0,
"longTermInvestments" => 127_877_000_000,
"taxAssets" => 0.0,
"otherNonCurrentAssets" => 48_849_000_000,
"totalNonCurrentAssets" => 216_166_000_000,
"otherAssets" => 0.0,
"totalAssets" => 351_002_000_000,
"accountPayables" => 54_763_000_000,
"shortTermDebt" => 15_613_000_000,
"taxPayables" => 0.0,
"deferredRevenue" => 7_612_000_000,
"otherCurrentLiabilities" => 47_493_000_000,
"totalCurrentLiabilities" => 125_481_000_000,
"longTermDebt" => 109_106_000_000,
"deferredRevenueNonCurrent" => 0.0,
"deferredTaxLiabilitiesNonCurrent" => 0.0,
"otherNonCurrentLiabilities" => 53_325_000_000,
"totalNonCurrentLiabilities" => 162_431_000_000,
"otherLiabilities" => 0.0,
"capitalLeaseObligations" => 0.0,
"totalLiabilities" => 287_912_000_000,
"preferredStock" => 0.0,
"commonStock" => 57_365_000_000,
"retainedEarnings" => 5_562_000_000,
"accumulatedOtherComprehensiveIncomeLoss" => 163_000_000,
"othertotalStockholdersEquity" => 0.0,
"totalStockholdersEquity" => 63_090_000_000,
"totalLiabilitiesAndStockholdersEquity" => 351_002_000_000,
"minorityInterest" => 0,
"totalEquity" => 63_090_000_000,
"totalLiabilitiesAndTotalEquity" => 351_002_000_000,
"totalInvestments" => 155_576_000_000,
"totalDebt" => 124_719_000_000,
"netDebt" => 89_779_000_000,
"link" =>
"https://www.sec.gov/Archives/edgar/data/320193/000032019321000105/0000320193-21-000105-index.htm",
"finalLink" =>
"https://www.sec.gov/Archives/edgar/data/320193/000032019321000105/aapl-20210925.htm"
}
])
end
end