fmp-node-api 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,1173 +1,8 @@
1
- interface APIResponse<T = unknown> {
2
- success: boolean;
3
- data: T | null;
4
- error: string | null;
5
- status: number;
6
- }
7
- interface FMPConfig {
8
- apiKey?: string;
9
- timeout?: number;
10
- }
11
- interface SymbolParams {
12
- symbol: string;
13
- }
14
- interface DateRangeParams {
15
- from?: string;
16
- to?: string;
17
- }
18
- interface PaginationParams {
19
- limit?: number;
20
- page?: number;
21
- }
22
- interface PeriodParams {
23
- period?: 'annual' | 'quarter';
24
- }
25
- interface QueryParams {
26
- [key: string]: string | number | boolean | undefined;
27
- }
28
- declare enum Period {
29
- ANNUAL = "annual",
30
- QUARTER = "quarter"
31
- }
32
- declare enum Exchange {
33
- NYSE = "NYSE",
34
- NASDAQ = "NASDAQ",
35
- AMEX = "AMEX",
36
- TSX = "TSX",
37
- LSE = "LSE",
38
- ASX = "ASX",
39
- NSE = "NSE",
40
- BSE = "BSE"
41
- }
42
-
43
- interface Quote {
44
- symbol: string;
45
- name: string;
46
- price: number;
47
- changesPercentage: number;
48
- change: number;
49
- dayLow: number;
50
- dayHigh: number;
51
- yearHigh: number;
52
- yearLow: number;
53
- marketCap: number | null;
54
- priceAvg50: number;
55
- priceAvg200: number;
56
- exchange: string;
57
- volume: number;
58
- avgVolume: number;
59
- open: number;
60
- previousClose: number;
61
- eps: number | null;
62
- pe: number | null;
63
- earningsAnnouncement: string | null;
64
- sharesOutstanding: number | null;
65
- timestamp: number;
66
- }
67
- interface HistoricalPriceData {
68
- date: string;
69
- open: number;
70
- high: number;
71
- low: number;
72
- close: number;
73
- adjClose: number;
74
- volume: number;
75
- unadjustedVolume: number;
76
- change: number;
77
- changePercent: number;
78
- vwap: number;
79
- label: string;
80
- changeOverTime: number;
81
- }
82
- interface HistoricalPriceResponse {
83
- symbol: string;
84
- historical: HistoricalPriceData[];
85
- }
86
-
87
- interface StockSplit {
88
- date: string;
89
- label: string;
90
- numerator: number;
91
- denominator: number;
92
- }
93
- interface StockSplitResponse {
94
- symbol: string;
95
- historical: StockSplit[];
96
- }
97
- interface StockDividend {
98
- date: string;
99
- label: string;
100
- adjDividend: number;
101
- dividend: number;
102
- recordDate: string;
103
- paymentDate: string;
104
- declarationDate: string;
105
- }
106
- interface StockDividendResponse {
107
- symbol: string;
108
- historical: StockDividend[];
109
- }
110
- interface MarketCap {
111
- symbol: string;
112
- date: string;
113
- marketCap: number;
114
- }
115
- interface StockRealTimePrice {
116
- symbol: string;
117
- price: number;
118
- }
119
- interface StockRealTimePriceFull {
120
- bidSize: number;
121
- askPrice: number;
122
- volume: number;
123
- askSize: number;
124
- bidPrice: number;
125
- lastSalePrice: number;
126
- lastSaleSize: number;
127
- lastSaleTime: number;
128
- fmpLast: number;
129
- lastUpdated: number;
130
- symbol: string;
131
- }
132
- interface StockListResponse<T> {
133
- stockList: T[];
134
- }
135
- interface CompaniesPriceListResponse<T> {
136
- companiesPriceList: T[];
137
- }
138
-
139
- interface FinancialStatementBase {
140
- date: string;
141
- symbol: string;
142
- reportedCurrency: string;
143
- cik: string;
144
- fillingDate: string;
145
- acceptedDate: string;
146
- calendarYear: string;
147
- period: string;
148
- link: string;
149
- finalLink: string;
150
- }
151
- interface GrowthStatementBase {
152
- date: string;
153
- symbol: string;
154
- calendarYear: string;
155
- period: string;
156
- }
157
- interface IncomeStatement extends FinancialStatementBase {
158
- revenue: number;
159
- costOfRevenue: number;
160
- grossProfit: number;
161
- grossProfitRatio: number;
162
- researchAndDevelopmentExpenses: number;
163
- generalAndAdministrativeExpenses: number;
164
- sellingAndMarketingExpenses: number;
165
- sellingGeneralAndAdministrativeExpenses: number;
166
- otherExpenses: number;
167
- operatingExpenses: number;
168
- costAndExpenses: number;
169
- interestIncome: number;
170
- interestExpense: number;
171
- depreciationAndAmortization: number;
172
- ebitda: number;
173
- ebitdaratio: number;
174
- operatingIncome: number;
175
- operatingIncomeRatio: number;
176
- totalOtherIncomeExpensesNet: number;
177
- incomeBeforeTax: number;
178
- incomeBeforeTaxRatio: number;
179
- incomeTaxExpense: number;
180
- netIncome: number;
181
- netIncomeRatio: number;
182
- eps: number;
183
- epsdiluted: number;
184
- weightedAverageShsOut: number;
185
- weightedAverageShsOutDil: number;
186
- }
187
- interface BalanceSheet extends FinancialStatementBase {
188
- cashAndCashEquivalents: number;
189
- shortTermInvestments: number;
190
- cashAndShortTermInvestments: number;
191
- netReceivables: number;
192
- inventory: number;
193
- otherCurrentAssets: number;
194
- totalCurrentAssets: number;
195
- propertyPlantEquipmentNet: number;
196
- goodwill: number;
197
- intangibleAssets: number;
198
- goodwillAndIntangibleAssets: number;
199
- longTermInvestments: number;
200
- taxAssets: number;
201
- otherNonCurrentAssets: number;
202
- totalNonCurrentAssets: number;
203
- otherAssets: number;
204
- totalAssets: number;
205
- accountPayables: number;
206
- shortTermDebt: number;
207
- taxPayables: number;
208
- deferredRevenue: number;
209
- otherCurrentLiabilities: number;
210
- totalCurrentLiabilities: number;
211
- longTermDebt: number;
212
- deferredRevenueNonCurrent: number;
213
- deferredTaxLiabilitiesNonCurrent: number;
214
- otherNonCurrentLiabilities: number;
215
- totalNonCurrentLiabilities: number;
216
- otherLiabilities: number;
217
- capitalLeaseObligations: number;
218
- totalLiabilities: number;
219
- preferredStock: number;
220
- commonStock: number;
221
- retainedEarnings: number;
222
- accumulatedOtherComprehensiveIncomeLoss: number;
223
- othertotalStockholdersEquity: number;
224
- totalStockholdersEquity: number;
225
- totalEquity: number;
226
- totalLiabilitiesAndStockholdersEquity: number;
227
- minorityInterest: number;
228
- totalLiabilitiesAndTotalEquity: number;
229
- totalInvestments: number;
230
- totalDebt: number;
231
- netDebt: number;
232
- }
233
- interface CashFlowStatement extends FinancialStatementBase {
234
- netIncome: number;
235
- depreciationAndAmortization: number;
236
- deferredIncomeTax: number;
237
- stockBasedCompensation: number;
238
- changeInWorkingCapital: number;
239
- accountsReceivables: number;
240
- inventory: number;
241
- accountsPayables: number;
242
- otherWorkingCapital: number;
243
- otherNonCashItems: number;
244
- netCashProvidedByOperatingActivities: number;
245
- investmentsInPropertyPlantAndEquipment: number;
246
- acquisitionsNet: number;
247
- purchasesOfInvestments: number;
248
- salesMaturitiesOfInvestments: number;
249
- otherInvestingActivites: number;
250
- netCashUsedForInvestingActivites: number;
251
- debtRepayment: number;
252
- commonStockIssued: number;
253
- commonStockRepurchased: number;
254
- dividendsPaid: number;
255
- otherFinancingActivites: number;
256
- netCashUsedProvidedByFinancingActivities: number;
257
- effectOfForexChangesOnCash: number;
258
- netChangeInCash: number;
259
- cashAtEndOfPeriod: number;
260
- cashAtBeginningOfPeriod: number;
261
- operatingCashFlow: number;
262
- capitalExpenditure: number;
263
- freeCashFlow: number;
264
- }
265
- interface KeyMetrics {
266
- symbol: string;
267
- date: string;
268
- period: string;
269
- revenuePerShare: number;
270
- netIncomePerShare: number;
271
- operatingCashFlowPerShare: number;
272
- freeCashFlowPerShare: number;
273
- cashPerShare: number;
274
- bookValuePerShare: number;
275
- tangibleBookValuePerShare: number;
276
- shareholdersEquityPerShare: number;
277
- interestDebtPerShare: number;
278
- marketCap: number;
279
- enterpriseValue: number;
280
- peRatio: number;
281
- priceToSalesRatio: number;
282
- pocfratio: number;
283
- pfcfRatio: number;
284
- pbRatio: number;
285
- ptbRatio: number;
286
- evToSales: number;
287
- enterpriseValueOverEBITDA: number;
288
- evToOperatingCashFlow: number;
289
- evToFreeCashFlow: number;
290
- earningsYield: number;
291
- freeCashFlowYield: number;
292
- debtToEquity: number;
293
- debtToAssets: number;
294
- netDebtToEBITDA: number;
295
- currentRatio: number;
296
- interestCoverage: number;
297
- incomeQuality: number;
298
- dividendYield: number;
299
- payoutRatio: number;
300
- salesGeneralAndAdministrativeToRevenue: number;
301
- researchAndDevelopmentToRevenue: number;
302
- intangiblesToTotalAssets: number;
303
- capexToOperatingCashFlow: number;
304
- capexToRevenue: number;
305
- capexToDepreciation: number;
306
- stockBasedCompensationToRevenue: number;
307
- grahamNumber: number;
308
- roic: number;
309
- returnOnTangibleAssets: number;
310
- grahamNetNet: number;
311
- workingCapital: number;
312
- tangibleAssetValue: number;
313
- netCurrentAssetValue: number;
314
- investedCapital: number;
315
- averageReceivables: number;
316
- averagePayables: number;
317
- averageInventory: number;
318
- daysSalesOutstanding: number;
319
- daysPayablesOutstanding: number;
320
- daysOfInventoryOnHand: number;
321
- receivablesTurnover: number;
322
- payablesTurnover: number;
323
- inventoryTurnover: number;
324
- roe: number;
325
- capexPerShare: number;
326
- }
327
- interface FinancialRatios {
328
- symbol: string;
329
- date: string;
330
- period: string;
331
- currentRatio: number;
332
- quickRatio: number;
333
- cashRatio: number;
334
- daysOfSalesOutstanding: number;
335
- daysOfInventoryOutstanding: number;
336
- operatingCycle: number;
337
- daysOfPayablesOutstanding: number;
338
- cashConversionCycle: number;
339
- grossProfitMargin: number;
340
- operatingProfitMargin: number;
341
- pretaxProfitMargin: number;
342
- netProfitMargin: number;
343
- effectiveTaxRate: number;
344
- returnOnAssets: number;
345
- returnOnEquity: number;
346
- returnOnCapitalEmployed: number;
347
- netIncomePerEBT: number;
348
- ebtPerEbit: number;
349
- ebitPerRevenue: number;
350
- debtRatio: number;
351
- debtEquityRatio: number;
352
- longTermDebtToCapitalization: number;
353
- totalDebtToCapitalization: number;
354
- interestCoverage: number;
355
- cashFlowToDebtRatio: number;
356
- companyEquityMultiplier: number;
357
- receivablesTurnover: number;
358
- payablesTurnover: number;
359
- inventoryTurnover: number;
360
- fixedAssetTurnover: number;
361
- assetTurnover: number;
362
- operatingCashFlowPerShare: number;
363
- freeCashFlowPerShare: number;
364
- cashPerShare: number;
365
- payoutRatio: number;
366
- operatingCashFlowSalesRatio: number;
367
- freeCashFlowOperatingCashFlowRatio: number;
368
- cashFlowCoverageRatios: number;
369
- shortTermCoverageRatios: number;
370
- capitalExpenditureCoverageRatio: number;
371
- dividendPaidAndCapexCoverageRatio: number;
372
- dividendPayoutRatio: number;
373
- priceBookValueRatio: number;
374
- priceToBookRatio: number;
375
- priceToSalesRatio: number;
376
- priceEarningsRatio: number;
377
- priceToFreeCashFlowsRatio: number;
378
- priceToOperatingCashFlowsRatio: number;
379
- priceCashFlowRatio: number;
380
- priceEarningsToGrowthRatio: number;
381
- priceSalesRatio: number;
382
- dividendYield: number;
383
- enterpriseValueMultiple: number;
384
- priceFairValue: number;
385
- }
386
- interface EnterpriseValue {
387
- symbol: string;
388
- date: string;
389
- stockPrice: number;
390
- numberOfShares: number;
391
- marketCapitalization: number;
392
- minusCashAndCashEquivalents: number;
393
- addTotalDebt: number;
394
- enterpriseValue: number;
395
- }
396
- interface CashflowGrowth extends GrowthStatementBase {
397
- growthNetIncome: number;
398
- growthDepreciationAndAmortization: number;
399
- growthDeferredIncomeTax: number;
400
- growthStockBasedCompensation: number;
401
- growthChangeInWorkingCapital: number;
402
- growthAccountsReceivables: number;
403
- growthInventory: number;
404
- growthAccountsPayables: number;
405
- growthOtherWorkingCapital: number;
406
- growthOtherNonCashItems: number;
407
- growthNetCashProvidedByOperatingActivites: number;
408
- growthInvestmentsInPropertyPlantAndEquipment: number;
409
- growthAcquisitionsNet: number;
410
- growthPurchasesOfInvestments: number;
411
- growthSalesMaturitiesOfInvestments: number;
412
- growthOtherInvestingActivites: number;
413
- growthNetCashUsedForInvestingActivites: number;
414
- growthDebtRepayment: number;
415
- growthCommonStockIssued: number;
416
- growthCommonStockRepurchased: number;
417
- growthDividendsPaid: number;
418
- growthOtherFinancingActivites: number;
419
- growthNetCashUsedProvidedByFinancingActivities: number;
420
- growthEffectOfForexChangesOnCash: number;
421
- growthNetChangeInCash: number;
422
- growthCashAtEndOfPeriod: number;
423
- growthCashAtBeginningOfPeriod: number;
424
- growthOperatingCashFlow: number;
425
- growthCapitalExpenditure: number;
426
- growthFreeCashFlow: number;
427
- }
428
- interface IncomeGrowth extends GrowthStatementBase {
429
- growthRevenue: number;
430
- growthCostOfRevenue: number;
431
- growthGrossProfit: number;
432
- growthGrossProfitRatio: number;
433
- growthResearchAndDevelopmentExpenses: number;
434
- growthGeneralAndAdministrativeExpenses: number;
435
- growthSellingAndMarketingExpenses: number;
436
- growthOtherExpenses: number;
437
- growthOperatingExpenses: number;
438
- growthCostAndExpenses: number;
439
- growthInterestExpense: number;
440
- growthDepreciationAndAmortization: number;
441
- growthEBITDA: number;
442
- growthEBITDARatio: number;
443
- growthOperatingIncome: number;
444
- growthOperatingIncomeRatio: number;
445
- growthTotalOtherIncomeExpensesNet: number;
446
- growthIncomeBeforeTax: number;
447
- growthIncomeBeforeTaxRatio: number;
448
- growthIncomeTaxExpense: number;
449
- growthNetIncome: number;
450
- growthNetIncomeRatio: number;
451
- growthEPS: number;
452
- growthEPSDiluted: number;
453
- growthWeightedAverageShsOut: number;
454
- growthWeightedAverageShsOutDil: number;
455
- }
456
- interface BalanceSheetGrowth extends GrowthStatementBase {
457
- growthCashAndCashEquivalents: number;
458
- growthShortTermInvestments: number;
459
- growthCashAndShortTermInvestments: number;
460
- growthNetReceivables: number;
461
- growthInventory: number;
462
- growthOtherCurrentAssets: number;
463
- growthTotalCurrentAssets: number;
464
- growthPropertyPlantEquipmentNet: number;
465
- growthGoodwill: number;
466
- growthIntangibleAssets: number;
467
- growthGoodwillAndIntangibleAssets: number;
468
- growthLongTermInvestments: number;
469
- growthTaxAssets: number;
470
- growthOtherNonCurrentAssets: number;
471
- growthTotalNonCurrentAssets: number;
472
- growthOtherAssets: number;
473
- growthTotalAssets: number;
474
- growthAccountPayables: number;
475
- growthShortTermDebt: number;
476
- growthTaxPayables: number;
477
- growthDeferredRevenue: number;
478
- growthOtherCurrentLiabilities: number;
479
- growthTotalCurrentLiabilities: number;
480
- growthLongTermDebt: number;
481
- growthDeferredRevenueNonCurrent: number;
482
- growthDeferrredTaxLiabilitiesNonCurrent: number;
483
- growthOtherNonCurrentLiabilities: number;
484
- growthTotalNonCurrentLiabilities: number;
485
- growthOtherLiabilities: number;
486
- growthTotalLiabilities: number;
487
- growthCommonStock: number;
488
- growthRetainedEarnings: number;
489
- growthAccumulatedOtherComprehensiveIncomeLoss: number;
490
- growthOthertotalStockholdersEquity: number;
491
- growthTotalStockholdersEquity: number;
492
- growthTotalLiabilitiesAndStockholdersEquity: number;
493
- growthTotalInvestments: number;
494
- growthTotalDebt: number;
495
- growthNetDebt: number;
496
- }
497
- interface FinancialGrowth extends GrowthStatementBase {
498
- revenueGrowth: number;
499
- grossProfitGrowth: number;
500
- ebitgrowth: number;
501
- operatingIncomeGrowth: number;
502
- netIncomeGrowth: number;
503
- epsgrowth: number;
504
- epsdilutedGrowth: number;
505
- weightedAverageSharesGrowth: number;
506
- weightedAverageSharesDilutedGrowth: number;
507
- dividendsperShareGrowth: number;
508
- operatingCashFlowGrowth: number;
509
- freeCashFlowGrowth: number;
510
- tenYRevenueGrowthPerShare: number;
511
- fiveYRevenueGrowthPerShare: number;
512
- threeYRevenueGrowthPerShare: number;
513
- tenYOperatingCFGrowthPerShare: number;
514
- fiveYOperatingCFGrowthPerShare: number;
515
- threeYOperatingCFGrowthPerShare: number;
516
- tenYNetIncomeGrowthPerShare: number;
517
- fiveYNetIncomeGrowthPerShare: number;
518
- threeYNetIncomeGrowthPerShare: number;
519
- tenYShareholdersEquityGrowthPerShare: number;
520
- fiveYShareholdersEquityGrowthPerShare: number;
521
- threeYShareholdersEquityGrowthPerShare: number;
522
- tenYDividendperShareGrowthPerShare: number;
523
- fiveYDividendperShareGrowthPerShare: number;
524
- threeYDividendperShareGrowthPerShare: number;
525
- receivablesGrowth: number;
526
- inventoryGrowth: number;
527
- assetGrowth: number;
528
- bookValueperShareGrowth: number;
529
- debtGrowth: number;
530
- rdexpenseGrowth: number;
531
- sgaexpensesGrowth: number;
532
- }
533
- interface EarningsHistorical {
534
- date: string;
535
- symbol: string;
536
- eps: number;
537
- epsEstimated: number;
538
- time: string;
539
- revenue: number;
540
- revenueEstimated: number;
541
- updatedFromDate: string;
542
- fiscalDateEnding: string;
543
- }
544
- interface EarningsSurprises {
545
- date: string;
546
- symbol: string;
547
- actualEarningResult: number;
548
- estimatedEarning: number;
549
- }
550
-
551
- interface ETFHoldingDates {
552
- date: string;
553
- }
554
- interface ETFHolding {
555
- cik: string;
556
- acceptanceTime: string;
557
- date: string;
558
- symbol: string;
559
- name: string;
560
- lei: string;
561
- title: string;
562
- cusip: string;
563
- isin: string;
564
- balance: number;
565
- units: string;
566
- cur_cd: string;
567
- valUsd: number;
568
- pctVal: number;
569
- payoffProfile: string;
570
- assetCat: string;
571
- issuerCat: string;
572
- invCountry: string;
573
- isRestrictedSec: string;
574
- fairValLevel: string;
575
- isCashCollateral: string;
576
- isNonCashCollateral: string;
577
- isLoanByFund: string;
578
- }
579
- interface ETFHolder {
580
- asset: string;
581
- name: string;
582
- isin: string;
583
- cusip: string;
584
- sharesNumber: number;
585
- weightPercentage: number;
586
- marketValue: number;
587
- updated: string;
588
- }
589
- interface ETFProfile {
590
- symbol: string;
591
- assetClass: string;
592
- aum: number;
593
- avgVolume: number;
594
- cusip: string;
595
- description: string;
596
- domicile: string;
597
- etfCompany: string;
598
- expenseRatio: number;
599
- inceptionDate: string;
600
- isin: string;
601
- name: string;
602
- nav: number;
603
- navCurrency: string;
604
- sectorsList: {
605
- exposure: string;
606
- industry: string;
607
- }[];
608
- website: string;
609
- holdingsCount: number;
610
- }
611
- interface ETFWeighting {
612
- sector: string;
613
- weightPercentage: string;
614
- }
615
- interface ETFCountryWeighting {
616
- country: string;
617
- weightPercentage: string;
618
- }
619
- interface ETFStockExposure {
620
- etfSymbol: string;
621
- assetExposure: string;
622
- sharesNumber: number;
623
- weightPercentage: number;
624
- marketValue: number;
625
- }
626
-
627
- interface MutualFundHolding {
628
- holder: string;
629
- shares: number;
630
- dateReported: string;
631
- change: number;
632
- weightPercent: number;
633
- }
634
-
635
- interface EconomicIndicator {
636
- date: string;
637
- value: number;
638
- }
639
- interface TreasuryRate {
640
- date: string;
641
- month1: number;
642
- month2: number;
643
- month3: number;
644
- month6: number;
645
- year1: number;
646
- year2: number;
647
- year3: number;
648
- year5: number;
649
- year7: number;
650
- year10: number;
651
- year20: number;
652
- year30: number;
653
- }
654
- type EconomicIndicatorName = 'GDP' | 'realGDP' | 'nominalPotentialGDP' | 'realGDPPerCapita' | 'federalFunds' | 'CPI' | 'inflationRate' | 'inflation' | 'retailSales' | 'consumerSentiment' | 'durableGoods' | 'unemploymentRate' | 'totalNonfarmPayroll' | 'initialClaims' | 'industrialProductionTotalIndex' | 'newPrivatelyOwnedHousingUnitsStartedTotalUnits' | 'totalVehicleSales' | 'retailMoneyFunds' | 'smoothedUSRecessionProbabilities' | '3MonthOr90DayRatesAndYieldsCertificatesOfDeposit' | 'commercialBankInterestRateOnCreditCardPlansAllAccounts' | '30YearFixedRateMortgageAverage' | '15YearFixedRateMortgageAverage';
655
-
656
- interface MarketHours {
657
- stockExchangeName: string;
658
- stockMarketHours: {
659
- openingHour: string;
660
- closingHour: string;
661
- };
662
- stockMarketHolidays: MarketHoliday[];
663
- isTheStockMarketOpen: boolean;
664
- isTheEuronextMarketOpen: boolean;
665
- isTheForexMarketOpen: boolean;
666
- isTheCryptoMarketOpen: boolean;
667
- }
668
- interface MarketHoliday {
669
- year: number;
670
- 'Martin Luther King, Jr. Day': string;
671
- "Presidents' Day": string;
672
- 'Good Friday': string;
673
- 'Memorial Day': string;
674
- Juneteenth: string;
675
- 'Independence Day': string;
676
- 'Labor Day': string;
677
- 'Thanksgiving Day': string;
678
- Christmas: string;
679
- }
680
- interface MarketPerformance {
681
- symbol: string;
682
- name: string;
683
- change: number;
684
- price: number;
685
- changesPercentage: number;
686
- }
687
- interface MarketSectorPerformance {
688
- sector: string;
689
- changesPercentage: number;
690
- }
691
- interface MarketIndex {
692
- symbol: string;
693
- price: number;
694
- extendedPrice: number | null;
695
- change: number;
696
- dayHigh: number;
697
- dayLow: number;
698
- previousClose: number;
699
- volume: number | null;
700
- open: number;
701
- close: number | null;
702
- lastTradeTime: string;
703
- lastExtendedTradeTime: string | null;
704
- updatedAt: string;
705
- createdAt: string;
706
- type: string;
707
- name: string;
708
- range: string;
709
- yearHigh: number;
710
- yearLow: number;
711
- priceAvg50: number | null;
712
- priceAvg200: number | null;
713
- changesPercentage: number;
714
- }
715
-
716
- interface EarningsCalendar {
717
- date: string;
718
- symbol: string;
719
- eps: number | null;
720
- epsEstimated: number | null;
721
- time: string;
722
- revenue: number | null;
723
- revenueEstimated: number | null;
724
- fiscalDateEnding: string;
725
- updatedFromDate: string;
726
- }
727
- interface EarningsConfirmed {
728
- symbol: string;
729
- exchange: string;
730
- time: string;
731
- when: string;
732
- date: string;
733
- publicationDate: string;
734
- title: string;
735
- url: string;
736
- }
737
- interface DividendsCalendar {
738
- date: string;
739
- label: string;
740
- adjDividend: number;
741
- symbol: string;
742
- dividend: number;
743
- recordDate: string;
744
- paymentDate: string;
745
- declarationDate: string;
746
- }
747
- interface EconomicsCalendar {
748
- date: string;
749
- country: string;
750
- event: string;
751
- currency: string;
752
- previous: number;
753
- estimate: number | null;
754
- actual: number | null;
755
- change: number;
756
- impact: string;
757
- changePercentage: number;
758
- unit: string | null;
759
- }
760
- interface IPOCalendar {
761
- date: string;
762
- company: string;
763
- symbol: string;
764
- exchange: string;
765
- actions: string;
766
- shares: number | null;
767
- priceRange: string | null;
768
- marketCap: number | null;
769
- }
770
- interface SplitsCalendar {
771
- date: string;
772
- label: string;
773
- symbol: string;
774
- numerator: number;
775
- denominator: number;
776
- }
777
-
778
- interface StockList {
779
- symbol: string;
780
- exchange: string;
781
- exchangeShortName: string;
782
- price: number;
783
- name: string;
784
- type: string;
785
- }
786
- interface ETFList {
787
- symbol: string;
788
- exchange: string;
789
- exchangeShortName: string;
790
- price: number;
791
- name: string;
792
- }
793
- interface CryptoList {
794
- symbol: string;
795
- name: string;
796
- currency: string;
797
- stockExchange: string;
798
- exchangeShortName: string;
799
- }
800
- interface ForexList {
801
- symbol: string;
802
- name: string;
803
- currency: string;
804
- stockExchange: string;
805
- exchangeShortName: string;
806
- }
807
- interface AvailableIndexesList {
808
- symbol: string;
809
- name: string;
810
- currency: string;
811
- stockExchange: string;
812
- exchangeShortName: string;
813
- }
814
-
815
- interface CompanyProfile {
816
- symbol: string;
817
- price: number;
818
- beta: number;
819
- volAvg: number;
820
- mktCap: number;
821
- lastDiv: number;
822
- range: string;
823
- changes: number;
824
- companyName: string;
825
- currency: string;
826
- cik: string;
827
- isin: string;
828
- cusip: string;
829
- exchange: string;
830
- exchangeShortName: string;
831
- industry: string;
832
- website: string;
833
- description: string;
834
- ceo: string;
835
- sector: string;
836
- country: string;
837
- fullTimeEmployees: string;
838
- phone: string;
839
- address: string;
840
- city: string;
841
- state: string;
842
- zip: string;
843
- dcfDiff: number;
844
- dcf: number;
845
- image: string;
846
- ipoDate: string;
847
- defaultImage: boolean;
848
- isEtf: boolean;
849
- isActivelyTrading: boolean;
850
- isAdr: boolean;
851
- isFund: boolean;
852
- }
853
- interface ExecutiveCompensation {
854
- cik: string;
855
- symbol: string;
856
- companyName: string;
857
- industryTitle: string;
858
- acceptedDate: string;
859
- filingDate: string;
860
- nameAndPosition: string;
861
- year: number;
862
- salary: number;
863
- bonus: number;
864
- stock_award: number;
865
- incentive_plan_compensation: number;
866
- all_other_compensation: number;
867
- total: number;
868
- url: string;
869
- }
870
- interface CompanyNotes {
871
- cik: string;
872
- symbol: string;
873
- title: string;
874
- exchange: string;
875
- }
876
- interface HistoricalEmployeeCount {
877
- symbol: string;
878
- cik: string;
879
- acceptanceTime: string;
880
- periodOfReport: string;
881
- companyName: string;
882
- formType: string;
883
- filingDate: string;
884
- employeeCount: number;
885
- source: string;
886
- }
887
- interface SharesFloat {
888
- symbol: string;
889
- freeFloat: number;
890
- floatShares: number;
891
- outstandingShares: number;
892
- source: string;
893
- date: string;
894
- }
895
- interface HistoricalSharesFloat {
896
- symbol: string;
897
- freeFloat: number;
898
- floatShares: string;
899
- outstandingShares: string;
900
- source: string;
901
- date: string;
902
- }
903
- interface EarningsCallTranscript {
904
- symbol: string;
905
- quarter: number;
906
- year: number;
907
- date: string;
908
- content: string;
909
- }
910
- type CompanyTranscriptData = [number, number, string];
911
-
912
- interface SenateTradingResponse {
913
- firstName: string;
914
- lastName: string;
915
- office: string;
916
- link: string;
917
- dateRecieved: string;
918
- transactionDate: string;
919
- owner: string;
920
- assetDescription: string;
921
- assetType: string;
922
- type: string;
923
- amount: string;
924
- comment: string;
925
- symbol: string;
926
- }
927
- interface HouseTradingResponse {
928
- disclosureYear: string;
929
- disclosureDate: string;
930
- transactionDate: string;
931
- owner: string;
932
- ticker: string;
933
- assetDescription: string;
934
- type: string;
935
- amount: string;
936
- representative: string;
937
- district: string;
938
- link: string;
939
- capitalGainsOver200USD: string;
940
- }
941
- interface SenateHouseTradingByNameResponse {
942
- symbol: string;
943
- disclosureDate: string;
944
- transactionDate: string;
945
- firstName: string;
946
- lastName: string;
947
- office: string;
948
- district: string;
949
- owner: string;
950
- assetDescription: string;
951
- assetType: string;
952
- type: string;
953
- amount: string;
954
- capitalGainsOver200USD: string;
955
- comment: string;
956
- link: string;
957
- }
958
-
959
- interface Form13FResponse {
960
- date: string;
961
- fillingDate: string;
962
- acceptedDate: string;
963
- cik: string;
964
- cusip: string;
965
- tickerCusip: string;
966
- nameOfIssuer: string;
967
- shares: number;
968
- titleOfClass: string;
969
- value: number;
970
- link: string;
971
- finalLink: string;
972
- }
973
- interface InstitutionalHolderResponse {
974
- holder: string;
975
- shares: number;
976
- dateReported: string;
977
- change: number;
978
- }
979
-
980
- interface InsiderTradingRSSResponse {
981
- title: string;
982
- fillingDate: string;
983
- symbol: string;
984
- link: string;
985
- reportingCik: string;
986
- issuerCik: string;
987
- }
988
- interface InsiderTradingSearchResponse {
989
- symbol: string;
990
- filingDate: string;
991
- transactionDate: string;
992
- reportingCik: string;
993
- transactionType: string;
994
- securitiesOwned: number;
995
- securitiesTransacted: number;
996
- companyCik: string;
997
- reportingName: string;
998
- typeOfOwner: string;
999
- link: string;
1000
- securityName: string;
1001
- price: number;
1002
- formType: string;
1003
- acquistionOrDisposition: string;
1004
- }
1005
- type TransactionTypesResponse = string[];
1006
- interface InsidersBySymbolResponse {
1007
- typeOfOwner: string;
1008
- transactionDate: string;
1009
- owner: string;
1010
- }
1011
- interface InsiderTradeStatisticsResponse {
1012
- symbol: string;
1013
- cik: string;
1014
- year: number;
1015
- quarter: number;
1016
- purchases: number;
1017
- sales: number;
1018
- buySellRatio: number;
1019
- totalBought: number;
1020
- totalSold: number;
1021
- averageBought: number;
1022
- averageSold: number;
1023
- pPurchases: number;
1024
- sSales: number;
1025
- }
1026
- interface CikMapperResponse {
1027
- reportingCik: string;
1028
- reportingName: string;
1029
- }
1030
- interface CikMapperBySymbolResponse {
1031
- symbol: string;
1032
- companyCik: string;
1033
- }
1034
- interface BeneficialOwnershipResponse {
1035
- cik: string;
1036
- symbol: string;
1037
- filingDate: string;
1038
- acceptedDate: string;
1039
- cusip: string;
1040
- nameOfReportingPerson: string;
1041
- citizenshipOrPlaceOfOrganization: string;
1042
- soleVotingPower: string;
1043
- sharedVotingPower: string;
1044
- soleDispositivePower: string;
1045
- sharedDispositivePower: string;
1046
- amountBeneficiallyOwned: string;
1047
- percentOfClass: string;
1048
- typeOfReportingPerson: string;
1049
- url: string;
1050
- }
1051
- interface FailToDeliverResponse {
1052
- symbol: string;
1053
- date: string;
1054
- price: number;
1055
- quantity: number;
1056
- cusip: string;
1057
- name: string;
1058
- }
1059
- declare enum TransactionType {
1060
- AWARD = "A-Award",
1061
- CONVERSION = "C-Conversion",
1062
- RETURN = "D-Return",
1063
- EXPIRE_SHORT = "E-ExpireShort",
1064
- IN_KIND = "F-InKind",
1065
- GIFT = "G-Gift",
1066
- EXPIRE_LONG = "H-ExpireLong",
1067
- DISCRETIONARY = "I-Discretionary",
1068
- OTHER = "J-Other",
1069
- SMALL = "L-Small",
1070
- EXEMPT = "M-Exempt",
1071
- OUT_OF_THE_MONEY = "O-OutOfTheMoney",
1072
- PURCHASE = "P-Purchase",
1073
- SALE = "S-Sale",
1074
- TENDER = "U-Tender",
1075
- WILL = "W-Will",
1076
- IN_THE_MONEY = "X-InTheMoney",
1077
- TRUST = "Z-Trust"
1078
- }
1079
-
1080
- interface RSSFeedItem {
1081
- title: string;
1082
- date: string;
1083
- link: string;
1084
- cik: string;
1085
- form_type: string;
1086
- ticker: string;
1087
- done: boolean;
1088
- }
1089
- interface RSSFeedV3Item {
1090
- title: string;
1091
- date: string;
1092
- link: string;
1093
- cik: string;
1094
- form_type: string;
1095
- ticker: string;
1096
- done: boolean;
1097
- }
1098
- interface RSSFeed8KItem {
1099
- title: string;
1100
- symbol: string;
1101
- cik: string;
1102
- link: string;
1103
- finalLink: string;
1104
- date: string;
1105
- process: string;
1106
- hasFinancials: string;
1107
- }
1108
- interface SECFiling {
1109
- symbol: string;
1110
- cik: string;
1111
- type: string;
1112
- link: string;
1113
- finalLink: string;
1114
- acceptedDate: string;
1115
- fillingDate: string;
1116
- }
1117
- interface IndustryClassification {
1118
- symbol: string;
1119
- name: string;
1120
- cik: string;
1121
- sicCode: string;
1122
- industryTitle: string;
1123
- businessAdress: string;
1124
- phoneNumber: string;
1125
- }
1126
- interface IndustryClassificationCode {
1127
- office: string;
1128
- sicCode: string;
1129
- industryTitle: string;
1130
- }
1131
- interface RSSFeedParams {
1132
- limit?: number;
1133
- type?: string;
1134
- from?: string;
1135
- to?: string;
1136
- isDone?: boolean;
1137
- }
1138
- interface RSSFeedV3Params {
1139
- page?: number;
1140
- datatype?: string;
1141
- }
1142
- interface RSSFeedAllItem {
1143
- symbol: string;
1144
- fillingDate: string;
1145
- acceptedDate: string;
1146
- cik: string;
1147
- type: string;
1148
- link: string;
1149
- finalLink: string;
1150
- }
1151
- interface RSSFeed8KParams {
1152
- page?: number;
1153
- from?: string;
1154
- to?: string;
1155
- hasFinancial?: boolean;
1156
- limit?: number;
1157
- }
1158
- interface SECFilingsParams {
1159
- page?: number;
1160
- type?: string;
1161
- }
1162
- interface IndividualIndustryClassificationParams {
1163
- symbol?: string;
1164
- cik?: number;
1165
- sicCode?: number;
1166
- }
1167
- interface IndustryClassificationCodesParams {
1168
- industryTitle?: string;
1169
- sicCode?: number;
1170
- }
1
+ import { F as FMPConfig, A as APIResponse } from './common-COsxpVBY.js';
2
+ export { P as PeriodParams, S as SymbolParams } from './common-COsxpVBY.js';
3
+ import { M as MarketCap, S as StockSplitResponse, a as StockDividendResponse, b as StockRealTimePrice, c as StockRealTimePriceFull, I as IncomeStatement, B as BalanceSheet, C as CashFlowStatement, K as KeyMetrics, F as FinancialRatios, E as EnterpriseValue, d as CashflowGrowth, e as IncomeGrowth, f as BalanceSheetGrowth, g as FinancialGrowth, h as EarningsHistorical, i as EarningsSurprises, j as ETFHoldingDates, k as ETFHolding, l as ETFHolder, m as ETFProfile, n as ETFWeighting, o as ETFCountryWeighting, p as ETFStockExposure, T as TreasuryRate, q as EconomicIndicator, r as MarketHours, s as MarketPerformance, t as MarketSectorPerformance, u as MarketIndex, v as StockList, w as ETFList, x as CryptoList, y as ForexList, A as AvailableIndexesList, z as EarningsCalendar, D as EarningsConfirmed, G as DividendsCalendar, H as EconomicsCalendar, J as IPOCalendar, L as SplitsCalendar, N as CompanyProfile, O as ExecutiveCompensation, P as CompanyNotes, Q as HistoricalEmployeeCount, R as SharesFloat, U as HistoricalSharesFloat, V as EarningsCallTranscript, W as CompanyTranscriptData, X as Quote, Y as HistoricalPriceResponse, Z as HistoricalPriceData, _ as SenateTradingResponse, $ as SenateHouseTradingByNameResponse, a0 as HouseTradingResponse, a1 as Form13FResponse, a2 as InstitutionalHolderResponse, a3 as InsiderTradingRSSResponse, a4 as InsiderTradingSearchResponse, a5 as TransactionTypesResponse, a6 as InsidersBySymbolResponse, a7 as InsiderTradeStatisticsResponse, a8 as CikMapperResponse, a9 as CikMapperBySymbolResponse, aa as BeneficialOwnershipResponse, ab as FailToDeliverResponse, ac as TransactionType, ad as RSSFeedItem, ae as RSSFeedAllItem, af as RSSFeedV3Item, ag as RSSFeed8KItem, ah as SECFiling, ai as IndustryClassification, aj as IndustryClassificationCode } from './types-only-DjnrpNZm.js';
4
+ export { al as StockDividend, ak as StockSplit } from './types-only-DjnrpNZm.js';
5
+ export { FMPValidation } from './utils/validation.js';
1171
6
 
1172
7
  declare class FMPClient {
1173
8
  private v3Client;
@@ -3993,6 +2828,14 @@ declare class SECEndpoints {
3993
2828
  }): Promise<APIResponse<IndustryClassificationCode[]>>;
3994
2829
  }
3995
2830
 
2831
+ interface MutualFundHolding {
2832
+ holder: string;
2833
+ shares: number;
2834
+ dateReported: string;
2835
+ change: number;
2836
+ weightPercent: number;
2837
+ }
2838
+
3996
2839
  declare class MutualFundEndpoints {
3997
2840
  private client;
3998
2841
  constructor(client: FMPClient);
@@ -4101,6 +2944,27 @@ declare class FMP {
4101
2944
  getClient(): FMPClient;
4102
2945
  }
4103
2946
 
2947
+ /**
2948
+ * Format currency value
2949
+ */
2950
+ declare function formatCurrency(value: number, currency?: string): string;
2951
+ /**
2952
+ * Format percentage value
2953
+ */
2954
+ declare function formatPercentage(value: number, decimals?: number): string;
2955
+ /**
2956
+ * Format large numbers with K, M, B suffixes
2957
+ */
2958
+ declare function formatLargeNumber(value: number): string;
2959
+ /**
2960
+ * Format date to YYYY-MM-DD
2961
+ */
2962
+ declare function formatDate(date: Date | string): string;
2963
+ /**
2964
+ * Format volume with appropriate units
2965
+ */
2966
+ declare function formatVolume(volume: number): string;
2967
+
4104
2968
  declare const DEFAULT_TIMEOUT = 10000;
4105
2969
  declare const DEFAULT_LIMIT = 100;
4106
2970
  declare const MAX_LIMIT = 1000;
@@ -4131,409 +2995,5 @@ declare const SECTORS: {
4131
2995
  readonly REAL_ESTATE: "Real Estate";
4132
2996
  readonly COMMUNICATION_SERVICES: "Communication Services";
4133
2997
  };
4134
- declare const COUNTRIES: {
4135
- readonly US: "US";
4136
- readonly CA: "CA";
4137
- readonly GB: "GB";
4138
- readonly AU: "AU";
4139
- readonly IN: "IN";
4140
- readonly DE: "DE";
4141
- readonly FR: "FR";
4142
- readonly JP: "JP";
4143
- readonly CN: "CN";
4144
- readonly BR: "BR";
4145
- };
4146
- declare const ERROR_MESSAGES: {
4147
- readonly API_KEY_REQUIRED: "API key is required";
4148
- readonly SYMBOL_REQUIRED: "Symbol is required";
4149
- readonly INVALID_SYMBOL: "Invalid symbol format";
4150
- readonly INVALID_DATE: "Invalid date format. Use YYYY-MM-DD";
4151
- readonly INVALID_PERIOD: "Period must be either \"annual\" or \"quarter\"";
4152
- readonly INVALID_LIMIT: "Limit must be between 1 and 1000";
4153
- readonly INVALID_PAGE: "Page must be a non-negative number";
4154
- readonly REQUEST_FAILED: "Request failed";
4155
- readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded";
4156
- readonly UNAUTHORIZED: "Unauthorized - Invalid API key";
4157
- readonly NOT_FOUND: "Resource not found";
4158
- };
4159
- declare const HTTP_STATUS: {
4160
- readonly OK: 200;
4161
- readonly CREATED: 201;
4162
- readonly BAD_REQUEST: 400;
4163
- readonly UNAUTHORIZED: 401;
4164
- readonly FORBIDDEN: 403;
4165
- readonly NOT_FOUND: 404;
4166
- readonly TOO_MANY_REQUESTS: 429;
4167
- readonly INTERNAL_SERVER_ERROR: 500;
4168
- };
4169
-
4170
- /**
4171
- * Format currency value
4172
- */
4173
- declare function formatCurrency(value: number, currency?: string): string;
4174
- /**
4175
- * Format percentage value
4176
- */
4177
- declare function formatPercentage(value: number, decimals?: number): string;
4178
- /**
4179
- * Format large numbers with K, M, B suffixes
4180
- */
4181
- declare function formatLargeNumber(value: number): string;
4182
- /**
4183
- * Format date to YYYY-MM-DD
4184
- */
4185
- declare function formatDate(date: Date | string): string;
4186
- /**
4187
- * Format date to readable format
4188
- */
4189
- declare function formatReadableDate(date: Date | string): string;
4190
- /**
4191
- * Format timestamp to readable format
4192
- */
4193
- declare function formatTimestamp(timestamp: number): string;
4194
- /**
4195
- * Format number with specified decimal places
4196
- */
4197
- declare function formatNumber(value: number, decimals?: number): string;
4198
- /**
4199
- * Format volume with appropriate units
4200
- */
4201
- declare function formatVolume(volume: number): string;
4202
-
4203
- /**
4204
- * Validation utilities for FMP API parameters and responses
4205
- */
4206
- declare class FMPValidation {
4207
- /**
4208
- * Validate stock symbol format
4209
- * @param symbol - The symbol to validate
4210
- * @returns True if the symbol format is valid
4211
- */
4212
- static isValidSymbol(symbol: string): boolean;
4213
- /**
4214
- * Validate crypto symbol format
4215
- * @param symbol - The crypto symbol to validate
4216
- * @returns True if the crypto symbol format is valid
4217
- */
4218
- static isValidCryptoSymbol(symbol: string): boolean;
4219
- /**
4220
- * Validate forex pair format
4221
- * @param symbol - The forex pair to validate
4222
- * @returns True if the forex pair format is valid
4223
- */
4224
- static isValidForexPair(symbol: string): boolean;
4225
- /**
4226
- * Validate date format (YYYY-MM-DD)
4227
- * @param date - The date string to validate
4228
- * @returns True if the date format is valid
4229
- */
4230
- static isValidDate(date: string): boolean;
4231
- /**
4232
- * Validate date range
4233
- * @param from - Start date
4234
- * @param to - End date
4235
- * @returns True if the date range is valid
4236
- */
4237
- static isValidDateRange(from: string, to: string): boolean;
4238
- /**
4239
- * Validate API response structure
4240
- * @param response - The response to validate
4241
- * @returns True if the response has the expected structure
4242
- */
4243
- static isValidResponse(response: any): response is APIResponse<any>;
4244
- /**
4245
- * Validate API key format
4246
- * @param apiKey - The API key to validate
4247
- * @returns True if the API key format is valid
4248
- */
4249
- static isValidApiKey(apiKey: string): boolean;
4250
- /**
4251
- * Validate period parameter
4252
- * @param period - The period to validate
4253
- * @returns True if the period is valid
4254
- */
4255
- static isValidPeriod(period: string): boolean;
4256
- /**
4257
- * Validate limit parameter
4258
- * @param limit - The limit to validate
4259
- * @returns True if the limit is valid
4260
- */
4261
- static isValidLimit(limit: number): boolean;
4262
- /**
4263
- * Get validation errors for quote parameters
4264
- * @param params - The parameters to validate
4265
- * @returns Array of validation error messages
4266
- */
4267
- static validateQuoteParams(params: any): string[];
4268
- /**
4269
- * Get validation errors for financial statement parameters
4270
- * @param params - The parameters to validate
4271
- * @returns Array of validation error messages
4272
- */
4273
- static validateFinancialParams(params: any): string[];
4274
- /**
4275
- * Get validation errors for date range parameters
4276
- * @param params - The parameters to validate
4277
- * @returns Array of validation error messages
4278
- */
4279
- static validateDateRangeParams(params: any): string[];
4280
- /**
4281
- * Validate and throw error if validation fails
4282
- * @param errors - Array of validation errors
4283
- * @param context - Context for the error message
4284
- */
4285
- static throwIfInvalid(errors: string[], context?: string): void;
4286
- }
4287
-
4288
- /**
4289
- * Helper utilities for exploring and working with the FMP API client
4290
- */
4291
- declare class FMPHelpers {
4292
- /**
4293
- * Get all available endpoint categories from the FMP client
4294
- * @param fmp - The FMP client instance
4295
- * @returns Array of endpoint category names
4296
- */
4297
- static getEndpointCategories(fmp: FMP): string[];
4298
- /**
4299
- * Get all methods for a specific endpoint category
4300
- * @param fmp - The FMP client instance
4301
- * @param endpoint - The endpoint category name
4302
- * @returns Array of method names
4303
- */
4304
- static getEndpointMethods(fmp: FMP, endpoint: string): string[];
4305
- /**
4306
- * Get all available methods across all endpoint categories
4307
- * @param fmp - The FMP client instance
4308
- * @returns Object mapping endpoint categories to their methods
4309
- */
4310
- static getAllMethods(fmp: FMP): Record<string, string[]>;
4311
- /**
4312
- * Get a summary of the API structure
4313
- * @param fmp - The FMP client instance
4314
- * @returns Summary object with endpoint and method counts
4315
- */
4316
- static getApiSummary(fmp: FMP): {
4317
- totalEndpoints: number;
4318
- totalMethods: number;
4319
- categories: string[];
4320
- methodCounts: Record<string, number>;
4321
- };
4322
- /**
4323
- * Check if a specific method exists on an endpoint
4324
- * @param fmp - The FMP client instance
4325
- * @param endpoint - The endpoint category name
4326
- * @param method - The method name
4327
- * @returns True if the method exists
4328
- */
4329
- static hasMethod(fmp: FMP, endpoint: string, method: string): boolean;
4330
- /**
4331
- * Get method signature information (basic introspection)
4332
- * @param fmp - The FMP client instance
4333
- * @param endpoint - The endpoint category name
4334
- * @param method - The method name
4335
- * @returns Method information or null if not found
4336
- */
4337
- static getMethodInfo(fmp: FMP, endpoint: string, method: string): {
4338
- name: string;
4339
- type: 'function';
4340
- async: boolean;
4341
- } | null;
4342
- }
4343
-
4344
- /**
4345
- * Utility functions for common financial data processing and formatting
4346
- */
4347
- declare class FMPUtils {
4348
- /**
4349
- * Format currency values
4350
- * @param value - The numeric value to format
4351
- * @param currency - The currency code (default: USD)
4352
- * @param locale - The locale for formatting (default: en-US)
4353
- * @returns Formatted currency string
4354
- */
4355
- static formatCurrency(value: number, currency?: string, locale?: string): string;
4356
- /**
4357
- * Format percentages
4358
- * @param value - The percentage value (as decimal, e.g., 0.15 for 15%)
4359
- * @param decimals - Number of decimal places (default: 2)
4360
- * @returns Formatted percentage string
4361
- */
4362
- static formatPercentage(value: number, decimals?: number): string;
4363
- /**
4364
- * Format large numbers with abbreviations (K, M, B, T)
4365
- * @param value - The numeric value to format
4366
- * @param decimals - Number of decimal places (default: 1)
4367
- * @returns Formatted number string
4368
- */
4369
- static formatLargeNumber(value: number, decimals?: number): string;
4370
- /**
4371
- * Convert date string to Date object
4372
- * @param dateString - The date string in YYYY-MM-DD format
4373
- * @returns Date object or null if invalid
4374
- */
4375
- static parseDate(dateString: string): Date | null;
4376
- /**
4377
- * Format date to readable string
4378
- * @param date - Date object or date string
4379
- * @param format - Format style ('short', 'long', 'iso')
4380
- * @returns Formatted date string
4381
- */
4382
- static formatDate(date: Date | string, format?: 'short' | 'long' | 'iso'): string;
4383
- /**
4384
- * Calculate working days between two dates (excluding weekends)
4385
- * @param from - Start date
4386
- * @param to - End date
4387
- * @returns Number of working days
4388
- */
4389
- static getWorkingDays(from: string | Date, to: string | Date): number;
4390
- /**
4391
- * Calculate percentage change between two values
4392
- * @param oldValue - The original value
4393
- * @param newValue - The new value
4394
- * @param decimals - Number of decimal places (default: 2)
4395
- * @returns Percentage change as a number
4396
- */
4397
- static calculatePercentageChange(oldValue: number, newValue: number, decimals?: number): number;
4398
- /**
4399
- * Batch API calls with rate limiting
4400
- * @param calls - Array of async functions to execute
4401
- * @param delayMs - Delay between calls in milliseconds (default: 100)
4402
- * @param maxConcurrent - Maximum concurrent calls (default: 1)
4403
- * @returns Array of results
4404
- */
4405
- static batchCalls<T>(calls: (() => Promise<T>)[], delayMs?: number, maxConcurrent?: number): Promise<T[]>;
4406
- /**
4407
- * Split array into chunks
4408
- * @param array - The array to split
4409
- * @param chunkSize - Size of each chunk
4410
- * @returns Array of chunks
4411
- */
4412
- static chunkArray<T>(array: T[], chunkSize: number): T[][];
4413
- /**
4414
- * Retry a function with exponential backoff
4415
- * @param fn - The function to retry
4416
- * @param maxRetries - Maximum number of retries (default: 3)
4417
- * @param baseDelay - Base delay in milliseconds (default: 1000)
4418
- * @returns Function result
4419
- */
4420
- static retryWithBackoff<T>(fn: () => Promise<T>, maxRetries?: number, baseDelay?: number): Promise<T>;
4421
- /**
4422
- * Debounce a function
4423
- * @param func - The function to debounce
4424
- * @param wait - Wait time in milliseconds
4425
- * @returns Debounced function
4426
- */
4427
- static debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
4428
- /**
4429
- * Throttle a function
4430
- * @param func - The function to throttle
4431
- * @param limit - Time limit in milliseconds
4432
- * @returns Throttled function
4433
- */
4434
- static throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void;
4435
- }
4436
-
4437
- /**
4438
- * Debugging utilities for FMP API development and troubleshooting
4439
- */
4440
- declare class FMPDebug {
4441
- private static isDevelopment;
4442
- private static isDebugEnabled;
4443
- /**
4444
- * Log API calls for debugging (only in development)
4445
- * @param endpoint - The endpoint being called
4446
- * @param params - The parameters passed to the endpoint
4447
- * @param response - The response received
4448
- * @param duration - The duration of the call in milliseconds
4449
- */
4450
- static logApiCall(endpoint: string, params: any, response: any, duration?: number): void;
4451
- /**
4452
- * Log API errors for debugging
4453
- * @param endpoint - The endpoint that failed
4454
- * @param params - The parameters that were passed
4455
- * @param error - The error that occurred
4456
- */
4457
- static logApiError(endpoint: string, params: any, error: any): void;
4458
- /**
4459
- * Get comprehensive API usage statistics
4460
- * @param fmp - The FMP client instance
4461
- * @returns Detailed API statistics
4462
- */
4463
- static getApiStats(fmp: FMP): {
4464
- totalEndpoints: number;
4465
- totalMethods: number;
4466
- categories: string[];
4467
- methodCounts: Record<string, number>;
4468
- estimatedApiCalls: number;
4469
- };
4470
- /**
4471
- * Validate API key format and provide feedback
4472
- * @param apiKey - The API key to validate
4473
- * @returns Validation result with details
4474
- */
4475
- static validateApiKey(apiKey: string): {
4476
- isValid: boolean;
4477
- length: number;
4478
- format: string;
4479
- suggestions: string[];
4480
- };
4481
- /**
4482
- * Check API key environment variable
4483
- * @returns Environment check result
4484
- */
4485
- static checkApiKeyEnvironment(): {
4486
- hasEnvVar: boolean;
4487
- envVarName: string;
4488
- isValid: boolean;
4489
- suggestions: string[];
4490
- };
4491
- /**
4492
- * Get performance metrics for API calls
4493
- * @param fmp - The FMP client instance
4494
- * @returns Performance information
4495
- */
4496
- static getPerformanceInfo(): {
4497
- nodeVersion: string;
4498
- platform: string;
4499
- memoryUsage: NodeJS.MemoryUsage;
4500
- uptime: number;
4501
- };
4502
- /**
4503
- * Create a debug configuration object
4504
- * @param fmp - The FMP client instance
4505
- * @returns Debug configuration
4506
- */
4507
- static createDebugConfig(fmp: FMP): {
4508
- apiStats: ReturnType<typeof FMPDebug.getApiStats>;
4509
- envCheck: ReturnType<typeof FMPDebug.checkApiKeyEnvironment>;
4510
- performance: ReturnType<typeof FMPDebug.getPerformanceInfo>;
4511
- timestamp: string;
4512
- };
4513
- /**
4514
- * Print debug information to console
4515
- * @param fmp - The FMP client instance
4516
- */
4517
- static printDebugInfo(fmp: FMP): void;
4518
- /**
4519
- * Enable debug mode programmatically
4520
- */
4521
- static enableDebugMode(): void;
4522
- /**
4523
- * Disable debug mode programmatically
4524
- */
4525
- static disableDebugMode(): void;
4526
- /**
4527
- * Check if debug mode is enabled
4528
- * @returns True if debug mode is enabled
4529
- */
4530
- static isDebugMode(): boolean;
4531
- /**
4532
- * Create a debug wrapper for API calls
4533
- * @param fmp - The FMP client instance
4534
- * @returns FMP client with debug logging
4535
- */
4536
- static createDebugWrapper(fmp: FMP): FMP;
4537
- }
4538
2998
 
4539
- export { type APIResponse, type AvailableIndexesList, type BalanceSheet, type BalanceSheetGrowth, type BeneficialOwnershipResponse, COUNTRIES, CalendarEndpoints, type CashFlowStatement, type CashflowGrowth, type CikMapperBySymbolResponse, type CikMapperResponse, type CompaniesPriceListResponse, CompanyEndpoints, type CompanyNotes, type CompanyProfile, type CompanyTranscriptData, type CryptoList, DEFAULT_LIMIT, DEFAULT_TIMEOUT, type DateRangeParams, type DividendsCalendar, ERROR_MESSAGES, type ETFCountryWeighting, ETFEndpoints, type ETFHolder, type ETFHolding, type ETFHoldingDates, type ETFList, type ETFProfile, type ETFStockExposure, type ETFWeighting, EXCHANGES, type EarningsCalendar, type EarningsCallTranscript, type EarningsConfirmed, type EarningsHistorical, type EarningsSurprises, EconomicEndpoints, type EconomicIndicator, type EconomicIndicatorName, type EconomicsCalendar, type EnterpriseValue, Exchange, type ExecutiveCompensation, FMP, FMPClient, type FMPConfig, FMPDebug, FMPHelpers, FMPUtils, FMPValidation, type FailToDeliverResponse, FinancialEndpoints, type FinancialGrowth, type FinancialRatios, type FinancialStatementBase, type ForexList, type Form13FResponse, type GrowthStatementBase, HTTP_STATUS, type HistoricalEmployeeCount, type HistoricalPriceData, type HistoricalPriceResponse, type HistoricalSharesFloat, type HouseTradingResponse, type IPOCalendar, type IncomeGrowth, type IncomeStatement, type IndividualIndustryClassificationParams, type IndustryClassification, type IndustryClassificationCode, type IndustryClassificationCodesParams, InsiderEndpoints, type InsiderTradeStatisticsResponse, type InsiderTradingRSSResponse, type InsiderTradingSearchResponse, type InsidersBySymbolResponse, InstitutionalEndpoints, type InstitutionalHolderResponse, type KeyMetrics, ListEndpoints, MAX_LIMIT, type MarketCap, MarketEndpoints, type MarketHoliday, type MarketHours, type MarketIndex, type MarketPerformance, type MarketSectorPerformance, MutualFundEndpoints, type MutualFundHolding, PERIODS, type PaginationParams, Period, type PeriodParams, type QueryParams, type Quote, QuoteEndpoints, type RSSFeed8KItem, type RSSFeed8KParams, type RSSFeedAllItem, type RSSFeedItem, type RSSFeedParams, type RSSFeedV3Item, type RSSFeedV3Params, SECEndpoints, type SECFiling, type SECFilingsParams, SECTORS, SenateHouseEndpoints, type SenateHouseTradingByNameResponse, type SenateTradingResponse, type SharesFloat, type SplitsCalendar, type StockDividend, type StockDividendResponse, StockEndpoints, type StockList, type StockListResponse, type StockRealTimePrice, type StockRealTimePriceFull, type StockSplit, type StockSplitResponse, type SymbolParams, TransactionType, type TransactionTypesResponse, type TreasuryRate, formatCurrency, formatDate, formatLargeNumber, formatNumber, formatPercentage, formatReadableDate, formatTimestamp, formatVolume };
2999
+ export { APIResponse, CalendarEndpoints, CompanyEndpoints, DEFAULT_LIMIT, DEFAULT_TIMEOUT, ETFEndpoints, EXCHANGES, EconomicEndpoints, FMP, FMPClient, FinancialEndpoints, InsiderEndpoints, InstitutionalEndpoints, ListEndpoints, MAX_LIMIT, MarketCap, MarketEndpoints, MutualFundEndpoints, PERIODS, Quote, QuoteEndpoints, SECEndpoints, SECTORS, SenateHouseEndpoints, StockEndpoints, StockRealTimePrice, formatCurrency, formatDate, formatLargeNumber, formatPercentage, formatVolume };