fmp-node-api 0.0.2 → 0.0.3

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,5 +1,3 @@
1
- import { AxiosRequestConfig, AxiosInstance } from 'axios';
2
-
3
1
  interface APIResponse<T = unknown> {
4
2
  success: boolean;
5
3
  data?: T;
@@ -16,6 +14,13 @@ interface ErrorResponse extends APIResponse<never> {
16
14
  error: string;
17
15
  status: number;
18
16
  }
17
+ type UnwrapSingle<T> = T extends [infer U] ? U : T extends (infer U)[] ? U | U[] : T;
18
+ interface UnwrappedAPIResponse<T = unknown> {
19
+ success: boolean;
20
+ data?: UnwrapSingle<T>;
21
+ error?: string;
22
+ status?: number;
23
+ }
19
24
  interface FMPConfig {
20
25
  apiKey: string;
21
26
  baseURL?: string;
@@ -80,87 +85,44 @@ interface Quote {
80
85
  sharesOutstanding: number;
81
86
  timestamp: number;
82
87
  }
83
- interface CompanyProfile {
88
+ declare enum Period {
89
+ ANNUAL = "annual",
90
+ QUARTER = "quarter"
91
+ }
92
+ declare enum Exchange {
93
+ NYSE = "NYSE",
94
+ NASDAQ = "NASDAQ",
95
+ AMEX = "AMEX",
96
+ TSX = "TSX",
97
+ LSE = "LSE",
98
+ ASX = "ASX",
99
+ NSE = "NSE",
100
+ BSE = "BSE"
101
+ }
102
+
103
+ interface StockQuote {
84
104
  symbol: string;
105
+ name: string;
85
106
  price: number;
86
- beta: number;
87
- volAvg: number;
107
+ changesPercentage: number;
108
+ change: number;
109
+ dayLow: number;
110
+ dayHigh: number;
111
+ yearHigh: number;
112
+ yearLow: number;
88
113
  marketCap: number;
89
- lastDiv: number;
90
- range: string;
91
- changes: number;
92
- companyName: string;
93
- currency: string;
94
- cik: string;
95
- isin: string;
96
- cusip: string;
114
+ priceAvg50: number;
115
+ priceAvg200: number;
97
116
  exchange: string;
98
- exchangeShortName: string;
99
- industry: string;
100
- website: string;
101
- description: string;
102
- ceo: string;
103
- sector: string;
104
- country: string;
105
- fullTimeEmployees: string;
106
- phone: string;
107
- address: string;
108
- city: string;
109
- state: string;
110
- zip: string;
111
- dcfDiff: number;
112
- dcf: number;
113
- image: string;
114
- ipoDate: string;
115
- defaultImage: boolean;
116
- isEtf: boolean;
117
- isActivelyTrading: boolean;
118
- isAdr: boolean;
119
- isFund: boolean;
120
- }
121
- declare const FMP_STABLE_URL = "https://financialmodelingprep.com/stable";
122
-
123
- type StockQuote = Quote;
124
- interface StockQuoteParams extends SymbolParams {
125
- }
126
- interface StockProfileParams extends SymbolParams {
127
- }
128
- interface StockHistoricalPriceParams extends SymbolParams, DateRangeParams {
129
- timeseries?: number;
130
- }
131
- interface StockMarketCapParams extends SymbolParams {
132
- }
133
- interface StockEarningsCalendarParams {
134
- from?: string;
135
- to?: string;
136
- }
137
- interface StockSplitsParams extends SymbolParams {
138
- }
139
- interface StockDividendParams extends SymbolParams {
140
- }
141
- interface StockInsiderTradingParams extends SymbolParams, PaginationParams {
142
- }
143
- interface StockInstitutionalHoldersParams extends SymbolParams {
144
- }
145
- interface StockMutualFundHoldersParams extends SymbolParams {
146
- }
147
- interface StockMajorHoldersParams extends SymbolParams {
148
- }
149
- interface StockAnalystEstimatesParams extends SymbolParams, PaginationParams {
150
- }
151
- interface StockPriceTargetParams extends SymbolParams {
152
- }
153
- interface StockRatingParams extends SymbolParams {
154
- }
155
- interface StockGradeParams extends SymbolParams {
156
- }
157
- interface StockSectorPerformanceParams {
158
- }
159
- interface StockLosersParams {
160
- }
161
- interface StockGainersParams {
162
- }
163
- interface StockMostActiveParams {
117
+ volume: number;
118
+ avgVolume: number;
119
+ open: number;
120
+ previousClose: number;
121
+ eps: number;
122
+ pe: number;
123
+ earningsAnnouncement: string;
124
+ sharesOutstanding: number;
125
+ timestamp: number;
164
126
  }
165
127
  interface StockSplit {
166
128
  date: string;
@@ -177,128 +139,11 @@ interface StockDividend {
177
139
  paymentDate: string;
178
140
  declarationDate: string;
179
141
  }
180
- interface InsiderTrading {
181
- symbol: string;
182
- companyName: string;
183
- cik: string;
184
- ownerName: string;
185
- ownerCik: string;
186
- ownerTitle: string;
187
- transactionDate: string;
188
- transactionCode: string;
189
- transactionAmount: number;
190
- transactionPrice: number;
191
- transactionAcquiredDisposed: string;
192
- postTransactionAmount: number;
193
- secLink: string;
194
- }
195
- interface InstitutionalHolder {
196
- holder: string;
197
- shares: number;
198
- dateReported: string;
199
- change: number;
200
- weightPercent: number;
201
- }
202
- interface MutualFundHolder {
203
- holder: string;
204
- shares: number;
205
- dateReported: string;
206
- change: number;
207
- weightPercent: number;
208
- }
209
- interface MajorHolder {
210
- holder: string;
211
- shares: number;
212
- dateReported: string;
213
- change: number;
214
- weightPercent: number;
215
- }
216
- interface AnalystEstimate {
217
- symbol: string;
218
- date: string;
219
- estimatedRevenueLow: number;
220
- estimatedRevenueHigh: number;
221
- estimatedRevenueAvg: number;
222
- estimatedEbitdaLow: number;
223
- estimatedEbitdaHigh: number;
224
- estimatedEbitdaAvg: number;
225
- estimatedEbitLow: number;
226
- estimatedEbitHigh: number;
227
- estimatedEbitAvg: number;
228
- estimatedNetIncomeLow: number;
229
- estimatedNetIncomeHigh: number;
230
- estimatedNetIncomeAvg: number;
231
- estimatedSgaExpenseLow: number;
232
- estimatedSgaExpenseHigh: number;
233
- estimatedSgaExpenseAvg: number;
234
- estimatedEpsAvg: number;
235
- estimatedEpsHigh: number;
236
- estimatedEpsLow: number;
237
- numberAnalystEstimatedRevenue: number;
238
- numberAnalystsEstimatedEps: number;
239
- }
240
- interface PriceTarget {
241
- symbol: string;
242
- targetMean: number;
243
- targetMedian: number;
244
- targetHigh: number;
245
- targetLow: number;
246
- targetCount: number;
247
- }
248
- interface StockRating {
249
- symbol: string;
250
- date: string;
251
- rating: string;
252
- ratingScore: number;
253
- ratingRecommendation: string;
254
- ratingDetailsDCFScore: number;
255
- ratingDetailsDCFRecommendation: string;
256
- ratingDetailsROEScore: number;
257
- ratingDetailsROERecommendation: string;
258
- ratingDetailsROAScore: number;
259
- ratingDetailsROARecommendation: string;
260
- ratingDetailsDEScore: number;
261
- ratingDetailsDERecommendation: string;
262
- ratingDetailsPEScore: number;
263
- ratingDetailsPERecommendation: string;
264
- ratingDetailsPBScore: number;
265
- ratingDetailsPBRecommendation: string;
266
- }
267
- interface StockGrade {
268
- symbol: string;
269
- date: string;
270
- gradingCompany: string;
271
- previousGrade: string;
272
- newGrade: string;
273
- grade: string;
274
- }
275
- interface SectorPerformance {
276
- sector: string;
277
- changesPercentage: number;
278
- }
279
- interface StockList {
280
- symbol: string;
281
- name: string;
282
- currency: string;
283
- stockExchange: string;
284
- exchangeShortName: string;
285
- }
286
142
  interface MarketCap {
287
143
  symbol: string;
288
144
  date: string;
289
145
  marketCap: number;
290
146
  }
291
- interface EarningsCalendar {
292
- date: string;
293
- symbol: string;
294
- eps: number;
295
- estimatedEps: number;
296
- time: string;
297
- revenue: number;
298
- estimatedRevenue: number;
299
- fiscalDateEnding: string;
300
- updatedFromDate: string;
301
- }
302
147
  interface StockHistoricalPriceData extends HistoricalPriceData {
303
148
  }
304
149
  interface StockHistoricalPriceResponse extends HistoricalPriceResponse {
@@ -308,23 +153,7 @@ interface StockHistoricalPriceResponse extends HistoricalPriceResponse {
308
153
  interface FinancialStatementsParams extends SymbolParams, PeriodParams {
309
154
  limit?: number;
310
155
  }
311
- interface IncomeStatementParams extends FinancialStatementsParams {
312
- }
313
- interface BalanceSheetParams extends FinancialStatementsParams {
314
- }
315
- interface CashFlowParams extends FinancialStatementsParams {
316
- }
317
- interface FinancialGrowthParams extends FinancialStatementsParams {
318
- }
319
- interface KeyMetricsParams extends FinancialStatementsParams {
320
- }
321
- interface FinancialRatiosParams extends FinancialStatementsParams {
322
- }
323
- interface EnterpriseValueParams extends FinancialStatementsParams {
324
- }
325
- interface CompanyValuationParams extends FinancialStatementsParams {
326
- }
327
- interface FinancialStatement {
156
+ interface FinancialStatementBase {
328
157
  date: string;
329
158
  symbol: string;
330
159
  reportedCurrency: string;
@@ -335,9 +164,14 @@ interface FinancialStatement {
335
164
  period: string;
336
165
  link: string;
337
166
  finalLink: string;
338
- [key: string]: string | number | boolean;
339
167
  }
340
- interface IncomeStatement extends FinancialStatement {
168
+ interface GrowthStatementBase {
169
+ date: string;
170
+ symbol: string;
171
+ calendarYear: string;
172
+ period: string;
173
+ }
174
+ interface IncomeStatement extends FinancialStatementBase {
341
175
  revenue: number;
342
176
  costOfRevenue: number;
343
177
  grossProfit: number;
@@ -349,6 +183,7 @@ interface IncomeStatement extends FinancialStatement {
349
183
  otherExpenses: number;
350
184
  operatingExpenses: number;
351
185
  costAndExpenses: number;
186
+ interestIncome: number;
352
187
  interestExpense: number;
353
188
  depreciationAndAmortization: number;
354
189
  ebitda: number;
@@ -362,16 +197,17 @@ interface IncomeStatement extends FinancialStatement {
362
197
  netIncome: number;
363
198
  netIncomeRatio: number;
364
199
  eps: number;
365
- epsDiluted: number;
366
- ebit: number;
367
- ebitRatio: number;
200
+ epsdiluted: number;
201
+ weightedAverageShsOut: number;
202
+ weightedAverageShsOutDil: number;
368
203
  }
369
- interface BalanceSheet extends FinancialStatement {
204
+ interface BalanceSheet extends FinancialStatementBase {
370
205
  cashAndCashEquivalents: number;
371
206
  shortTermInvestments: number;
372
207
  cashAndShortTermInvestments: number;
373
208
  netReceivables: number;
374
209
  inventory: number;
210
+ otherCurrentAssets: number;
375
211
  totalCurrentAssets: number;
376
212
  propertyPlantEquipmentNet: number;
377
213
  goodwill: number;
@@ -411,10 +247,11 @@ interface BalanceSheet extends FinancialStatement {
411
247
  totalDebt: number;
412
248
  netDebt: number;
413
249
  }
414
- interface CashFlowStatement extends FinancialStatement {
250
+ interface CashFlowStatement extends FinancialStatementBase {
415
251
  netIncome: number;
416
252
  depreciationAndAmortization: number;
417
253
  deferredIncomeTax: number;
254
+ stockBasedCompensation: number;
418
255
  changeInWorkingCapital: number;
419
256
  accountsReceivables: number;
420
257
  inventory: number;
@@ -573,6 +410,143 @@ interface EnterpriseValue {
573
410
  addTotalDebt: number;
574
411
  enterpriseValue: number;
575
412
  }
413
+ interface CashflowGrowth extends GrowthStatementBase {
414
+ growthNetIncome: number;
415
+ growthDepreciationAndAmortization: number;
416
+ growthDeferredIncomeTax: number;
417
+ growthStockBasedCompensation: number;
418
+ growthChangeInWorkingCapital: number;
419
+ growthAccountsReceivables: number;
420
+ growthInventory: number;
421
+ growthAccountsPayables: number;
422
+ growthOtherWorkingCapital: number;
423
+ growthOtherNonCashItems: number;
424
+ growthNetCashProvidedByOperatingActivites: number;
425
+ growthInvestmentsInPropertyPlantAndEquipment: number;
426
+ growthAcquisitionsNet: number;
427
+ growthPurchasesOfInvestments: number;
428
+ growthSalesMaturitiesOfInvestments: number;
429
+ growthOtherInvestingActivites: number;
430
+ growthNetCashUsedForInvestingActivites: number;
431
+ growthDebtRepayment: number;
432
+ growthCommonStockIssued: number;
433
+ growthCommonStockRepurchased: number;
434
+ growthDividendsPaid: number;
435
+ growthOtherFinancingActivites: number;
436
+ growthNetCashUsedProvidedByFinancingActivities: number;
437
+ growthEffectOfForexChangesOnCash: number;
438
+ growthNetChangeInCash: number;
439
+ growthCashAtEndOfPeriod: number;
440
+ growthCashAtBeginningOfPeriod: number;
441
+ growthOperatingCashFlow: number;
442
+ growthCapitalExpenditure: number;
443
+ growthFreeCashFlow: number;
444
+ }
445
+ interface IncomeGrowth extends GrowthStatementBase {
446
+ growthRevenue: number;
447
+ growthCostOfRevenue: number;
448
+ growthGrossProfit: number;
449
+ growthGrossProfitRatio: number;
450
+ growthResearchAndDevelopmentExpenses: number;
451
+ growthGeneralAndAdministrativeExpenses: number;
452
+ growthSellingAndMarketingExpenses: number;
453
+ growthOtherExpenses: number;
454
+ growthOperatingExpenses: number;
455
+ growthCostAndExpenses: number;
456
+ growthInterestExpense: number;
457
+ growthDepreciationAndAmortization: number;
458
+ growthEBITDA: number;
459
+ growthEBITDARatio: number;
460
+ growthOperatingIncome: number;
461
+ growthOperatingIncomeRatio: number;
462
+ growthTotalOtherIncomeExpensesNet: number;
463
+ growthIncomeBeforeTax: number;
464
+ growthIncomeBeforeTaxRatio: number;
465
+ growthIncomeTaxExpense: number;
466
+ growthNetIncome: number;
467
+ growthNetIncomeRatio: number;
468
+ growthEPS: number;
469
+ growthEPSDiluted: number;
470
+ growthWeightedAverageShsOut: number;
471
+ growthWeightedAverageShsOutDil: number;
472
+ }
473
+ interface BalanceSheetGrowth extends GrowthStatementBase {
474
+ growthCashAndCashEquivalents: number;
475
+ growthShortTermInvestments: number;
476
+ growthCashAndShortTermInvestments: number;
477
+ growthNetReceivables: number;
478
+ growthInventory: number;
479
+ growthOtherCurrentAssets: number;
480
+ growthTotalCurrentAssets: number;
481
+ growthPropertyPlantEquipmentNet: number;
482
+ growthGoodwill: number;
483
+ growthIntangibleAssets: number;
484
+ growthGoodwillAndIntangibleAssets: number;
485
+ growthLongTermInvestments: number;
486
+ growthTaxAssets: number;
487
+ growthOtherNonCurrentAssets: number;
488
+ growthTotalNonCurrentAssets: number;
489
+ growthOtherAssets: number;
490
+ growthTotalAssets: number;
491
+ growthAccountPayables: number;
492
+ growthShortTermDebt: number;
493
+ growthTaxPayables: number;
494
+ growthDeferredRevenue: number;
495
+ growthOtherCurrentLiabilities: number;
496
+ growthTotalCurrentLiabilities: number;
497
+ growthLongTermDebt: number;
498
+ growthDeferredRevenueNonCurrent: number;
499
+ growthDeferrredTaxLiabilitiesNonCurrent: number;
500
+ growthOtherNonCurrentLiabilities: number;
501
+ growthTotalNonCurrentLiabilities: number;
502
+ growthOtherLiabilities: number;
503
+ growthTotalLiabilities: number;
504
+ growthCommonStock: number;
505
+ growthRetainedEarnings: number;
506
+ growthAccumulatedOtherComprehensiveIncomeLoss: number;
507
+ growthOthertotalStockholdersEquity: number;
508
+ growthTotalStockholdersEquity: number;
509
+ growthTotalLiabilitiesAndStockholdersEquity: number;
510
+ growthTotalInvestments: number;
511
+ growthTotalDebt: number;
512
+ growthNetDebt: number;
513
+ }
514
+ interface FinancialGrowth extends GrowthStatementBase {
515
+ revenueGrowth: number;
516
+ grossProfitGrowth: number;
517
+ ebitgrowth: number;
518
+ operatingIncomeGrowth: number;
519
+ netIncomeGrowth: number;
520
+ epsgrowth: number;
521
+ epsdilutedGrowth: number;
522
+ weightedAverageSharesGrowth: number;
523
+ weightedAverageSharesDilutedGrowth: number;
524
+ dividendsperShareGrowth: number;
525
+ operatingCashFlowGrowth: number;
526
+ freeCashFlowGrowth: number;
527
+ tenYRevenueGrowthPerShare: number;
528
+ fiveYRevenueGrowthPerShare: number;
529
+ threeYRevenueGrowthPerShare: number;
530
+ tenYOperatingCFGrowthPerShare: number;
531
+ fiveYOperatingCFGrowthPerShare: number;
532
+ threeYOperatingCFGrowthPerShare: number;
533
+ tenYNetIncomeGrowthPerShare: number;
534
+ fiveYNetIncomeGrowthPerShare: number;
535
+ threeYNetIncomeGrowthPerShare: number;
536
+ tenYShareholdersEquityGrowthPerShare: number;
537
+ fiveYShareholdersEquityGrowthPerShare: number;
538
+ threeYShareholdersEquityGrowthPerShare: number;
539
+ tenYDividendperShareGrowthPerShare: number;
540
+ fiveYDividendperShareGrowthPerShare: number;
541
+ threeYDividendperShareGrowthPerShare: number;
542
+ receivablesGrowth: number;
543
+ inventoryGrowth: number;
544
+ assetGrowth: number;
545
+ bookValueperShareGrowth: number;
546
+ debtGrowth: number;
547
+ rdexpenseGrowth: number;
548
+ sgaexpensesGrowth: number;
549
+ }
576
550
 
577
551
  interface ForexQuoteParams extends SymbolParams {
578
552
  }
@@ -604,13 +578,6 @@ interface ForexQuote {
604
578
  sharesOutstanding: number;
605
579
  timestamp: number;
606
580
  }
607
- interface ForexPair {
608
- symbol: string;
609
- name: string;
610
- currency: string;
611
- stockExchange: string;
612
- exchangeShortName: string;
613
- }
614
581
 
615
582
  interface CryptoQuoteParams extends SymbolParams {
616
583
  }
@@ -642,13 +609,6 @@ interface CryptoQuote {
642
609
  sharesOutstanding: number;
643
610
  timestamp: number;
644
611
  }
645
- interface CryptoCurrency {
646
- symbol: string;
647
- name: string;
648
- currency: string;
649
- stockExchange: string;
650
- exchangeShortName: string;
651
- }
652
612
 
653
613
  interface ETFQuoteParams extends SymbolParams {
654
614
  }
@@ -725,13 +685,6 @@ interface ETFHolding {
725
685
  shares: number;
726
686
  marketValue: number;
727
687
  }
728
- interface ETFList {
729
- symbol: string;
730
- name: string;
731
- currency: string;
732
- stockExchange: string;
733
- exchangeShortName: string;
734
- }
735
688
 
736
689
  interface MutualFundQuoteParams extends SymbolParams {
737
690
  }
@@ -808,13 +761,6 @@ interface MutualFundHolding {
808
761
  shares: number;
809
762
  marketValue: number;
810
763
  }
811
- interface MutualFundList {
812
- symbol: string;
813
- name: string;
814
- currency: string;
815
- stockExchange: string;
816
- exchangeShortName: string;
817
- }
818
764
 
819
765
  interface BondQuoteParams extends SymbolParams {
820
766
  }
@@ -846,13 +792,6 @@ interface BondQuote {
846
792
  sharesOutstanding: number;
847
793
  timestamp: number;
848
794
  }
849
- interface BondList {
850
- symbol: string;
851
- name: string;
852
- currency: string;
853
- stockExchange: string;
854
- exchangeShortName: string;
855
- }
856
795
 
857
796
  interface EconomicIndicatorParams extends DateRangeParams {
858
797
  }
@@ -990,23 +929,199 @@ interface MarketIndex {
990
929
  timestamp: number;
991
930
  }
992
931
 
932
+ interface EarningsCalendar {
933
+ date: string;
934
+ symbol: string;
935
+ eps: number;
936
+ epsEstimated: number | null;
937
+ time: string;
938
+ revenue: number | null;
939
+ revenueEstimated: number | null;
940
+ fiscalDateEnding: string;
941
+ updatedFromDate: string;
942
+ }
943
+ interface DividendsCalendar {
944
+ date: string;
945
+ label: string;
946
+ adjDividend: number;
947
+ symbol: string;
948
+ dividend: number;
949
+ recordDate: string;
950
+ paymentDate: string;
951
+ declarationDate: string;
952
+ }
953
+ interface EconomicsCalendar {
954
+ date: string;
955
+ country: string;
956
+ event: string;
957
+ currency: string;
958
+ previous: number;
959
+ estimate: number | null;
960
+ actual: number | null;
961
+ change: number;
962
+ impact: string;
963
+ changePercentage: number;
964
+ unit: string | null;
965
+ }
966
+ interface IPOCalendar {
967
+ date: string;
968
+ company: string;
969
+ symbol: string;
970
+ exchange: string;
971
+ actions: string;
972
+ shares: number | null;
973
+ priceRange: string | null;
974
+ marketCap: number | null;
975
+ }
976
+ interface SplitsCalendar {
977
+ date: string;
978
+ label: string;
979
+ symbol: string;
980
+ numerator: number;
981
+ denominator: number;
982
+ }
983
+
984
+ interface StockList {
985
+ symbol: string;
986
+ exchange: string;
987
+ exchangeShortName: string;
988
+ price: string;
989
+ name: string;
990
+ }
991
+ interface ETFList {
992
+ symbol: string;
993
+ exchange: string;
994
+ exchangeShortName: string;
995
+ price: number;
996
+ name: string;
997
+ }
998
+ interface CryptoList {
999
+ symbol: string;
1000
+ name: string;
1001
+ currency: string;
1002
+ stockExchange: string;
1003
+ exchangeShortName: string;
1004
+ }
1005
+ interface ForexList {
1006
+ symbol: string;
1007
+ name: string;
1008
+ currency: string;
1009
+ stockExchange: string;
1010
+ exchangeShortName: string;
1011
+ }
1012
+ interface AvailableIndexesList {
1013
+ symbol: string;
1014
+ name: string;
1015
+ currency: string;
1016
+ stockExchange: string;
1017
+ exchangeShortName: string;
1018
+ }
1019
+
1020
+ interface CompanyProfile {
1021
+ symbol: string;
1022
+ price: number;
1023
+ beta: number;
1024
+ volAvg: number;
1025
+ mktCap: number;
1026
+ lastDiv: number;
1027
+ range: string;
1028
+ changes: number;
1029
+ companyName: string;
1030
+ currency: string;
1031
+ cik: string;
1032
+ isin: string;
1033
+ cusip: string;
1034
+ exchange: string;
1035
+ exchangeShortName: string;
1036
+ industry: string;
1037
+ website: string;
1038
+ description: string;
1039
+ ceo: string;
1040
+ sector: string;
1041
+ country: string;
1042
+ fullTimeEmployees: string;
1043
+ phone: string;
1044
+ address: string;
1045
+ city: string;
1046
+ state: string;
1047
+ zip: string;
1048
+ dcfDiff: number;
1049
+ dcf: number;
1050
+ image: string;
1051
+ ipoDate: string;
1052
+ defaultImage: boolean;
1053
+ isEtf: boolean;
1054
+ isActivelyTrading: boolean;
1055
+ isAdr: boolean;
1056
+ isFund: boolean;
1057
+ }
1058
+ interface ExecutiveCompensation {
1059
+ cik: string;
1060
+ symbol: string;
1061
+ companyName: string;
1062
+ industryTitle: string;
1063
+ acceptedDate: string;
1064
+ filingDate: string;
1065
+ nameAndPosition: string;
1066
+ year: number;
1067
+ salary: number;
1068
+ bonus: number;
1069
+ stock_award: number;
1070
+ incentive_plan_compensation: number;
1071
+ all_other_compensation: number;
1072
+ total: number;
1073
+ url: string;
1074
+ }
1075
+ interface CompanyNotes {
1076
+ cik: string;
1077
+ symbol: string;
1078
+ title: string;
1079
+ exchange: string;
1080
+ }
1081
+ interface HistoricalEmployeeCount {
1082
+ symbol: string;
1083
+ cik: string;
1084
+ acceptanceTime: string;
1085
+ periodOfReport: string;
1086
+ companyName: string;
1087
+ formType: string;
1088
+ filingDate: string;
1089
+ employeeCount: number;
1090
+ source: string;
1091
+ }
1092
+ interface SharesFloat {
1093
+ symbol: string;
1094
+ freeFloat: number;
1095
+ floatShares: number;
1096
+ outstandingShares: number;
1097
+ source: string;
1098
+ date: string;
1099
+ }
1100
+ interface HistoricalSharesFloat {
1101
+ symbol: string;
1102
+ freeFloat: number;
1103
+ floatShares: string;
1104
+ outstandingShares: string;
1105
+ source: string;
1106
+ date: string;
1107
+ }
1108
+ interface EarningsCallTranscript {
1109
+ symbol: string;
1110
+ quarter: number;
1111
+ year: number;
1112
+ date: string;
1113
+ content: string;
1114
+ }
1115
+
993
1116
  declare class FMPClient {
994
- private client;
1117
+ private v3Client;
1118
+ private v4Client;
1119
+ private stableClient;
995
1120
  private apiKey;
996
- private baseURL;
997
1121
  constructor(config: FMPConfig);
998
- /**
999
- * Make a GET request to the API
1000
- */
1001
- get<T = any>(endpoint: string, params?: Record<string, any>): Promise<APIResponse<T>>;
1002
- /**
1003
- * Make a POST request to the API
1004
- */
1005
- post<T = any>(endpoint: string, data?: any, config?: AxiosRequestConfig): Promise<APIResponse<T>>;
1006
- /**
1007
- * Get the underlying axios instance for advanced usage
1008
- */
1009
- getAxiosInstance(): AxiosInstance;
1122
+ private createClient;
1123
+ get<T>(endpoint: string, version?: 'v3' | 'v4' | 'stable', params?: Record<string, any>): Promise<UnwrappedAPIResponse<T>>;
1124
+ private getClientForVersion;
1010
1125
  }
1011
1126
 
1012
1127
  declare class StockEndpoints {
@@ -1014,53 +1129,53 @@ declare class StockEndpoints {
1014
1129
  constructor(client: FMPClient);
1015
1130
  /**
1016
1131
  * Get real-time stock quote
1132
+ * https://site.financialmodelingprep.com/developer/docs#full-quote-quote
1133
+ * @param symbol - The stock symbol to get the quote for
1134
+ * @returns This endpoint gives you the latest bid and ask prices for a stock, as well as the volume and last trade price in real time.
1017
1135
  */
1018
1136
  getQuote({ symbol }: {
1019
1137
  symbol: string;
1020
- }): Promise<APIResponse<StockQuote[]>>;
1021
- /**
1022
- * Get company profile
1023
- */
1024
- getCompanyProfile({ symbol }: {
1025
- symbol: string;
1026
- }): Promise<APIResponse<CompanyProfile[]>>;
1138
+ }): Promise<UnwrappedAPIResponse<StockQuote | null>>;
1027
1139
  /**
1028
1140
  * Get historical stock prices
1141
+ * https://site.financialmodelingprep.com/developer/docs#daily-chart-charts
1142
+ * @param symbol - The stock symbol to get the historical prices for
1143
+ * @param from - The start date to get the historical prices for
1144
+ * @param to - The end date to get the historical prices for
1145
+ * @returns The FMP Daily Chart endpoint provides daily stock data for a specified company, including opening, high, low, and closing prices, with a default limit of 5 years of historical data. To access data beyond this limit, use the from and to parameters for custom date ranges, each with a 5-year limit
1029
1146
  */
1030
1147
  getHistoricalPrice({ symbol, from, to, }: {
1031
1148
  symbol: string;
1032
1149
  from?: string;
1033
1150
  to?: string;
1034
- }): Promise<APIResponse<StockHistoricalPriceResponse>>;
1151
+ }): Promise<UnwrappedAPIResponse<StockHistoricalPriceResponse>>;
1035
1152
  /**
1036
- * Get list of all stocks
1153
+ * Get market cap
1154
+ * https://site.financialmodelingprep.com/developer/docs#market-cap-company-information
1155
+ * @param symbol - The stock symbol to get the market cap for
1156
+ * @returns The FMP Market Cap endpoint provides the current market capitalization of a company. Market cap is a measure of the size and relative importance of a company in the stock market. It is calculated by multiplying the current share price by the number of outstanding shares.
1037
1157
  */
1038
- getStockList(): Promise<APIResponse<StockList[]>>;
1039
- /**
1040
- * Get market capitalization
1041
- */
1042
- getMarketCap({ symbol }: {
1158
+ getMarketCap({ symbol, }: {
1043
1159
  symbol: string;
1044
- }): Promise<APIResponse<MarketCap[]>>;
1045
- /**
1046
- * Get earnings calendar
1047
- */
1048
- getEarningsCalendar(params: {
1049
- from?: string;
1050
- to?: string;
1051
- }): Promise<APIResponse<EarningsCalendar[]>>;
1160
+ }): Promise<UnwrappedAPIResponse<MarketCap | null>>;
1052
1161
  /**
1053
1162
  * Get stock splits
1163
+ * https://site.financialmodelingprep.com/developer/docs#splits-historical-splits
1164
+ * @param symbol - The stock symbol to get the splits for
1165
+ * @returns A list of historical stock splits for publicly traded companies, including the date of the stock split, the split ratio, and the type of stock split.
1054
1166
  */
1055
- getStockSplits({ symbol }: {
1167
+ getStockSplits({ symbol, }: {
1056
1168
  symbol: string;
1057
- }): Promise<APIResponse<StockSplit[]>>;
1169
+ }): Promise<UnwrappedAPIResponse<StockSplit[]>>;
1058
1170
  /**
1059
1171
  * Get dividend history
1172
+ * https://site.financialmodelingprep.com/developer/docs#dividends-historical-dividends
1173
+ * @param symbol - The stock symbol to get the dividend history for
1174
+ * @returns A list of historical dividend payments for publicly traded companies, including the date of the dividend payment, the ex-dividend date, and the dividend per share.
1060
1175
  */
1061
- getDividendHistory({ symbol }: {
1176
+ getDividendHistory({ symbol, }: {
1062
1177
  symbol: string;
1063
- }): Promise<APIResponse<StockDividend[]>>;
1178
+ }): Promise<UnwrappedAPIResponse<StockDividend[]>>;
1064
1179
  }
1065
1180
 
1066
1181
  declare class FinancialEndpoints {
@@ -1068,130 +1183,187 @@ declare class FinancialEndpoints {
1068
1183
  constructor(client: FMPClient);
1069
1184
  /**
1070
1185
  * Get income statement
1186
+ * https://site.financialmodelingprep.com/developer/docs#income-statements-financial-statements
1187
+ * @param symbol - The stock symbol to get the income statement for
1188
+ * @param period - The period to get the income statement for (annual or quarter)
1189
+ * @param limit - The number of periods to get
1190
+ * @returns FMP's Income Statement API provides access to real-time income statement data for a wide range of companies, including public companies, private companies, and ETFs. This data can be used to track a company's profitability over time, to compare a company to its competitors, and to identify trends in a company's business.
1071
1191
  */
1072
- getIncomeStatement({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<FinancialStatement[]>>;
1192
+ getIncomeStatement({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<IncomeStatement[]>>;
1073
1193
  /**
1074
1194
  * Get balance sheet
1195
+ * https://site.financialmodelingprep.com/developer/docs#balance-sheet-statements-financial-statements
1196
+ * @param symbol - The stock symbol to get the balance sheet for
1197
+ * @param period - The period to get the balance sheet for (annual or quarter)
1198
+ * @param limit - The number of periods to get
1199
+ * @returns The balance sheet is a financial statement that displays a company’s total assets, liabilities, and shareholder equity over a specific timeframe (quarterly or yearly). Investors can use this statement to determine if the company can fund its operations, meet its debt obligations, and pay a dividend.
1075
1200
  */
1076
- getBalanceSheet({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<FinancialStatement[]>>;
1201
+ getBalanceSheet({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<BalanceSheet[]>>;
1077
1202
  /**
1078
1203
  * Get cash flow statement
1204
+ * https://site.financialmodelingprep.com/developer/docs#cashflow-statements-financial-statements
1205
+ * @param symbol - The stock symbol to get the cash flow statement for
1206
+ * @param period - The period to get the cash flow statement for (annual or quarter)
1207
+ * @param limit - The number of periods to get
1208
+ * @returns The cash flow statement is a financial statement that highlights how cash moves through the company, including both cash inflows and outflows. This statement shows the cash flows in 3 main categories “Operating Cash Flows”, “Investing Cash Flows”, and “Financing Cash Flows”, which help investors to understand if the company is making money or losing money by conducting business.
1079
1209
  */
1080
- getCashFlowStatement({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<FinancialStatement[]>>;
1210
+ getCashFlowStatement({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<CashFlowStatement[]>>;
1081
1211
  /**
1082
1212
  * Get key metrics
1213
+ * https://site.financialmodelingprep.com/developer/docs#key-metrics-statement-analysis
1214
+ * @param symbol - The stock symbol to get the key metrics for
1215
+ * @param period - The period to get the key metrics for (annual or quarter)
1216
+ * @param limit - The number of periods to get
1217
+ * @returns Get key financial metrics for a company, including revenue, net income, and price-to-earnings ratio (P/E ratio). Assess a company's financial performance and compare it to its competitors.
1083
1218
  */
1084
- getKeyMetrics({ symbol, period, limit, }: KeyMetricsParams): Promise<APIResponse<KeyMetrics[]>>;
1219
+ getKeyMetrics({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<KeyMetrics[]>>;
1085
1220
  /**
1086
1221
  * Get financial ratios
1222
+ * https://site.financialmodelingprep.com/developer/docs#ratios-statement-analysis
1223
+ * @param symbol - The stock symbol to get the financial ratios for
1224
+ * @param period - The period to get the financial ratios for (annual or quarter)
1225
+ * @param limit - The number of periods to get
1226
+ * @returns Get financial ratios for a company, such as the P/B ratio and the ROE. Assess a company's financial health and compare it to its competitors.
1087
1227
  */
1088
- getFinancialRatios({ symbol, period, limit, }: FinancialRatiosParams): Promise<APIResponse<FinancialRatios[]>>;
1228
+ getFinancialRatios({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<FinancialRatios[]>>;
1089
1229
  /**
1090
1230
  * Get enterprise value
1231
+ * https://site.financialmodelingprep.com/developer/docs#enterprise-values-statement-analysis
1232
+ * @param symbol - The stock symbol to get the enterprise value for
1233
+ * @param period - The period to get the enterprise value for (annual or quarter)
1234
+ * @param limit - The number of periods to get
1235
+ * @returns Get the enterprise value of a company, which is the total value of a company, including its equity and debt. Assess a company's overall value and compare it to its peers.
1236
+ */
1237
+ getEnterpriseValue({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<EnterpriseValue[]>>;
1238
+ /**
1239
+ * Get cashflow growth
1240
+ * https://site.financialmodelingprep.com/developer/docs#cashflow-growth-statement-analysis
1241
+ * @param symbol - The stock symbol to get the cashflow growth for
1242
+ * @param period - The period to get the cashflow growth for (annual or quarter)
1243
+ * @param limit - The number of periods to get
1244
+ * @returns Get the cash flow growth rate for a company. Measure how quickly a company's cash flow is growing.
1245
+ */
1246
+ getCashflowGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<CashflowGrowth[]>>;
1247
+ /**
1248
+ * Get income growth
1249
+ * https://site.financialmodelingprep.com/developer/docs#income-growth-statement-analysis
1250
+ * @param symbol - The stock symbol to get the income growth for
1251
+ * @param period - The period to get the income growth for (annual or quarter)
1252
+ * @param limit - The number of periods to get
1253
+ * @returns Get the income growth rate for a company. Measure how quickly a company's income is growing.
1254
+ */
1255
+ getIncomeGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<IncomeGrowth[]>>;
1256
+ /**
1257
+ * Get balance sheet growth
1258
+ * https://site.financialmodelingprep.com/developer/docs#balance-sheet-growth-statement-analysis
1259
+ * @param symbol - The stock symbol to get the balance sheet growth for
1260
+ * @param period - The period to get the balance sheet growth for (annual or quarter)
1261
+ * @param limit - The number of periods to get
1262
+ * @returns Get the balance sheet growth rate for a company. Measure how quickly a company's assets and liabilities are growing.
1091
1263
  */
1092
- getEnterpriseValue({ symbol, period, limit, }: EnterpriseValueParams): Promise<APIResponse<EnterpriseValue[]>>;
1264
+ getBalanceSheetGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<BalanceSheetGrowth[]>>;
1265
+ /**
1266
+ * Get financial growth
1267
+ * https://site.financialmodelingprep.com/developer/docs#financial-growth-statement-analysis
1268
+ * @param symbol - The stock symbol to get the financial growth for
1269
+ * @param period - The period to get the financial growth for (annual or quarter)
1270
+ * @param limit - The number of periods to get
1271
+ * @returns Financial Growth Get the financial growth rate for a company. Measure how quickly a company's overall financial performance is improving.
1272
+ */
1273
+ getFinancialGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<UnwrappedAPIResponse<FinancialGrowth[]>>;
1093
1274
  }
1094
1275
 
1095
1276
  declare class ForexEndpoints {
1096
1277
  private client;
1097
1278
  constructor(client: FMPClient);
1098
1279
  /**
1099
- * Get real-time forex quote
1100
- */
1101
- getQuote(params: ForexQuoteParams): Promise<APIResponse<ForexQuote[]>>;
1102
- /**
1103
- * Get historical forex data
1280
+ * Get forex quote
1104
1281
  */
1105
- getHistoricalPrice(params: ForexHistoricalParams): Promise<APIResponse<HistoricalPriceResponse>>;
1282
+ getQuote(params: ForexQuoteParams): Promise<UnwrappedAPIResponse<ForexQuote[]>>;
1106
1283
  /**
1107
- * Get list of all forex pairs
1108
- * Using the forex-specific endpoint
1284
+ * Get historical forex prices
1109
1285
  */
1110
- getForexList(): Promise<APIResponse<ForexPair[]>>;
1286
+ getHistoricalPrice({ symbol, from, to, }: {
1287
+ symbol: string;
1288
+ from?: string;
1289
+ to?: string;
1290
+ }): Promise<UnwrappedAPIResponse<HistoricalPriceResponse>>;
1111
1291
  /**
1112
- * Get forex rates for a specific currency
1292
+ * Get forex rates for a specific base currency
1113
1293
  */
1114
- getForexRates(baseCurrency?: string): Promise<APIResponse<Record<string, number>>>;
1294
+ getForexRates(baseCurrency?: string): Promise<UnwrappedAPIResponse<Record<string, number>>>;
1115
1295
  /**
1116
- * Get forex rates for all currencies
1296
+ * Get all forex rates
1117
1297
  */
1118
- getAllForexRates(): Promise<APIResponse<Record<string, Record<string, number>>>>;
1298
+ getAllForexRates(): Promise<UnwrappedAPIResponse<Record<string, Record<string, number>>>>;
1119
1299
  }
1120
1300
 
1121
1301
  declare class CryptoEndpoints {
1122
1302
  private client;
1123
1303
  constructor(client: FMPClient);
1124
1304
  /**
1125
- * Get real-time crypto quote
1126
- */
1127
- getQuote(params: CryptoQuoteParams): Promise<APIResponse<CryptoQuote[]>>;
1128
- /**
1129
- * Get historical crypto data
1305
+ * Get crypto quote
1130
1306
  */
1131
- getHistoricalPrice(params: CryptoHistoricalParams): Promise<APIResponse<HistoricalPriceResponse>>;
1307
+ getQuote(params: CryptoQuoteParams): Promise<UnwrappedAPIResponse<CryptoQuote[]>>;
1132
1308
  /**
1133
- * Get list of all cryptocurrencies
1309
+ * Get historical crypto prices
1134
1310
  */
1135
- getCryptoList(): Promise<APIResponse<CryptoCurrency[]>>;
1311
+ getHistoricalPrice({ symbol, from, to, }: {
1312
+ symbol: string;
1313
+ from?: string;
1314
+ to?: string;
1315
+ }): Promise<UnwrappedAPIResponse<HistoricalPriceResponse>>;
1136
1316
  }
1137
1317
 
1138
1318
  declare class ETFEndpoints {
1139
1319
  private client;
1140
1320
  constructor(client: FMPClient);
1141
1321
  /**
1142
- * Get real-time ETF quote
1322
+ * Get ETF quote
1143
1323
  */
1144
- getQuote(params: ETFQuoteParams): Promise<APIResponse<ETFQuote[]>>;
1324
+ getQuote(params: ETFQuoteParams): Promise<UnwrappedAPIResponse<ETFQuote[]>>;
1145
1325
  /**
1146
1326
  * Get ETF profile
1147
1327
  */
1148
- getProfile(params: ETFProfileParams): Promise<APIResponse<ETFProfile[]>>;
1328
+ getProfile(params: ETFProfileParams): Promise<UnwrappedAPIResponse<ETFProfile[]>>;
1149
1329
  /**
1150
1330
  * Get ETF holdings
1151
1331
  */
1152
- getHoldings(params: ETFHoldersParams): Promise<APIResponse<ETFHolding[]>>;
1153
- /**
1154
- * Get list of all ETFs
1155
- */
1156
- getETFList(): Promise<APIResponse<ETFList[]>>;
1332
+ getHoldings(params: ETFHoldersParams): Promise<UnwrappedAPIResponse<ETFHolding[]>>;
1157
1333
  }
1158
1334
 
1159
1335
  declare class MutualFundEndpoints {
1160
1336
  private client;
1161
1337
  constructor(client: FMPClient);
1162
1338
  /**
1163
- * Get real-time mutual fund quote
1339
+ * Get mutual fund quote
1164
1340
  */
1165
- getQuote(params: MutualFundQuoteParams): Promise<APIResponse<MutualFundQuote[]>>;
1341
+ getQuote(params: MutualFundQuoteParams): Promise<UnwrappedAPIResponse<MutualFundQuote[]>>;
1166
1342
  /**
1167
1343
  * Get mutual fund profile
1168
1344
  */
1169
- getProfile(params: MutualFundProfileParams): Promise<APIResponse<MutualFundProfile[]>>;
1345
+ getProfile(params: MutualFundProfileParams): Promise<UnwrappedAPIResponse<MutualFundProfile[]>>;
1170
1346
  /**
1171
1347
  * Get mutual fund holdings
1172
1348
  */
1173
- getHoldings(params: MutualFundHoldersParams): Promise<APIResponse<MutualFundHolding[]>>;
1174
- /**
1175
- * Get list of all mutual funds
1176
- */
1177
- getMutualFundList(): Promise<APIResponse<MutualFundList[]>>;
1349
+ getHoldings(params: MutualFundHoldersParams): Promise<UnwrappedAPIResponse<MutualFundHolding[]>>;
1178
1350
  }
1179
1351
 
1180
1352
  declare class BondEndpoints {
1181
1353
  private client;
1182
1354
  constructor(client: FMPClient);
1183
1355
  /**
1184
- * Get real-time bond quote
1185
- */
1186
- getQuote(params: BondQuoteParams): Promise<APIResponse<BondQuote[]>>;
1187
- /**
1188
- * Get historical bond data
1356
+ * Get bond quote
1189
1357
  */
1190
- getHistoricalPrice(params: BondHistoricalParams): Promise<APIResponse<HistoricalPriceResponse>>;
1358
+ getQuote(params: BondQuoteParams): Promise<UnwrappedAPIResponse<BondQuote[]>>;
1191
1359
  /**
1192
- * Get list of all bonds
1360
+ * Get historical bond prices
1193
1361
  */
1194
- getBondList(): Promise<APIResponse<BondList[]>>;
1362
+ getHistoricalPrice({ symbol, from, to, }: {
1363
+ symbol: string;
1364
+ from?: string;
1365
+ to?: string;
1366
+ }): Promise<UnwrappedAPIResponse<HistoricalPriceResponse>>;
1195
1367
  }
1196
1368
 
1197
1369
  declare class EconomicEndpoints {
@@ -1200,23 +1372,23 @@ declare class EconomicEndpoints {
1200
1372
  /**
1201
1373
  * Get treasury rates
1202
1374
  */
1203
- getTreasuryRates(params?: TreasuryRateParams): Promise<APIResponse<TreasuryRate[]>>;
1375
+ getTreasuryRates(params?: TreasuryRateParams): Promise<UnwrappedAPIResponse<TreasuryRate[]>>;
1204
1376
  /**
1205
1377
  * Get federal funds rate
1206
1378
  */
1207
- getFederalFundsRate(params?: FederalFundsRateParams): Promise<APIResponse<FederalFundsRate[]>>;
1379
+ getFederalFundsRate(params?: FederalFundsRateParams): Promise<UnwrappedAPIResponse<FederalFundsRate[]>>;
1208
1380
  /**
1209
1381
  * Get CPI data
1210
1382
  */
1211
- getCPI(params?: CPIParams): Promise<APIResponse<CPI[]>>;
1383
+ getCPI(params?: CPIParams): Promise<UnwrappedAPIResponse<CPI[]>>;
1212
1384
  /**
1213
1385
  * Get GDP data
1214
1386
  */
1215
- getGDP(params?: GDPParams): Promise<APIResponse<GDP[]>>;
1387
+ getGDP(params?: GDPParams): Promise<UnwrappedAPIResponse<GDP[]>>;
1216
1388
  /**
1217
1389
  * Get unemployment data
1218
1390
  */
1219
- getUnemployment(params?: UnemploymentParams): Promise<APIResponse<Unemployment[]>>;
1391
+ getUnemployment(params?: UnemploymentParams): Promise<UnwrappedAPIResponse<Unemployment[]>>;
1220
1392
  }
1221
1393
 
1222
1394
  declare class MarketEndpoints {
@@ -1225,31 +1397,183 @@ declare class MarketEndpoints {
1225
1397
  /**
1226
1398
  * Get market hours
1227
1399
  */
1228
- getMarketHours(): Promise<APIResponse<MarketHours>>;
1400
+ getMarketHours(): Promise<UnwrappedAPIResponse<MarketHours>>;
1229
1401
  /**
1230
1402
  * Get market performance
1231
1403
  */
1232
- getMarketPerformance(): Promise<APIResponse<MarketPerformance[]>>;
1404
+ getMarketPerformance(): Promise<UnwrappedAPIResponse<MarketPerformance[]>>;
1233
1405
  /**
1234
- * Get market gainers
1406
+ * Get top gainers
1235
1407
  */
1236
- getGainers(): Promise<APIResponse<MarketPerformance[]>>;
1408
+ getGainers(): Promise<UnwrappedAPIResponse<MarketPerformance[]>>;
1237
1409
  /**
1238
- * Get market losers
1410
+ * Get top losers
1239
1411
  */
1240
- getLosers(): Promise<APIResponse<MarketPerformance[]>>;
1412
+ getLosers(): Promise<UnwrappedAPIResponse<MarketPerformance[]>>;
1241
1413
  /**
1242
1414
  * Get most active stocks
1243
1415
  */
1244
- getMostActive(): Promise<APIResponse<MarketPerformance[]>>;
1416
+ getMostActive(): Promise<UnwrappedAPIResponse<MarketPerformance[]>>;
1245
1417
  /**
1246
1418
  * Get sector performance
1247
1419
  */
1248
- getSectorPerformance(): Promise<APIResponse<MarketSectorPerformance[]>>;
1420
+ getSectorPerformance(): Promise<UnwrappedAPIResponse<MarketSectorPerformance[]>>;
1421
+ /**
1422
+ * Get market indices
1423
+ */
1424
+ getMarketIndex(params?: MarketIndexParams): Promise<UnwrappedAPIResponse<MarketIndex[]>>;
1425
+ }
1426
+
1427
+ declare class ListEndpoints {
1428
+ private client;
1429
+ constructor(client: FMPClient);
1430
+ /**
1431
+ * Get stock list
1432
+ * https://site.financialmodelingprep.com/developer/docs#symbol-list-stock-list
1433
+ * @returns The stock list
1434
+ */
1435
+ getStockList(): Promise<UnwrappedAPIResponse<StockList[]>>;
1436
+ /**
1437
+ * Get ETF list
1438
+ * https://site.financialmodelingprep.com/developer/docs#exchange-traded-fund-search-stock-list
1439
+ * @returns The ETF list
1440
+ */
1441
+ getETFList(): Promise<UnwrappedAPIResponse<ETFList[]>>;
1442
+ /**
1443
+ * Get crypto list
1444
+ * https://site.financialmodelingprep.com/developer/docs#cryptocurrencies-list-crypto
1445
+ * @returns The crypto list
1446
+ */
1447
+ getCryptoList(): Promise<UnwrappedAPIResponse<CryptoList[]>>;
1448
+ /**
1449
+ * Get forex list
1450
+ * https://site.financialmodelingprep.com/developer/docs#forex-list-forex
1451
+ * @returns The forex list
1452
+ */
1453
+ getForexList(): Promise<UnwrappedAPIResponse<ForexList[]>>;
1454
+ /**
1455
+ * Get available indexes list
1456
+ * https://site.financialmodelingprep.com/developer/docs#available-indexes
1457
+ * @returns The available indexes list
1458
+ */
1459
+ getAvailableIndexes(): Promise<UnwrappedAPIResponse<AvailableIndexesList[]>>;
1460
+ }
1461
+
1462
+ declare class CalendarEndpoints {
1463
+ private client;
1464
+ constructor(client: FMPClient);
1465
+ /**
1466
+ * Get earnings calendar
1467
+ * https://site.financialmodelingprep.com/developer/docs#earnings-calendar-earnings
1468
+ * @param from - The start date to get the earnings calendar for
1469
+ * @param to - The end date to get the earnings calendar for
1470
+ * @returns The earnings calendar
1471
+ */
1472
+ getEarningsCalendar({ from, to }?: DateRangeParams): Promise<UnwrappedAPIResponse<EarningsCalendar[]>>;
1473
+ /**
1474
+ * Get dividends calendar
1475
+ * https://site.financialmodelingprep.com/developer/docs#dividends-calendar-dividends
1476
+ * @param from - The start date to get the dividends calendar for
1477
+ * @param to - The end date to get the dividends calendar for
1478
+ * @returns The dividends calendar
1479
+ */
1480
+ getDividendsCalendar({ from, to }?: DateRangeParams): Promise<UnwrappedAPIResponse<DividendsCalendar[]>>;
1481
+ /**
1482
+ * Get economics calendar
1483
+ * https://site.financialmodelingprep.com/developer/docs#economics-calendar-economics-data
1484
+ * @param from - The start date to get the economics calendar for
1485
+ * @param to - The end date to get the economics calendar for
1486
+ * @returns The economics calendar
1487
+ */
1488
+ getEconomicsCalendar({ from, to }?: DateRangeParams): Promise<UnwrappedAPIResponse<EconomicsCalendar[]>>;
1489
+ /**
1490
+ * Get IPO calendar
1491
+ * https://site.financialmodelingprep.com/developer/docs#ipo-calender-by-ipo-calendar
1492
+ * @param from - The start date to get the IPO calendar for
1493
+ * @param to - The end date to get the IPO calendar for
1494
+ * @returns The IPO calendar
1495
+ */
1496
+ getIPOCalendar({ from, to }?: DateRangeParams): Promise<UnwrappedAPIResponse<IPOCalendar[]>>;
1249
1497
  /**
1250
- * Get market index data
1498
+ * Get stock splits calendar
1499
+ * https://site.financialmodelingprep.com/developer/docs#splits-calendar-splits
1500
+ * @param from - The start date to get the stock splits calendar for
1501
+ * @param to - The end date to get the stock splits calendar for
1502
+ * @returns The stock splits calendar
1251
1503
  */
1252
- getMarketIndex(params?: MarketIndexParams): Promise<APIResponse<MarketIndex[]>>;
1504
+ getSplitsCalendar({ from, to }?: DateRangeParams): Promise<UnwrappedAPIResponse<SplitsCalendar[]>>;
1505
+ }
1506
+
1507
+ declare class CompanyEndpoints {
1508
+ private client;
1509
+ constructor(client: FMPClient);
1510
+ /**
1511
+ * Get company profile
1512
+ * https://site.financialmodelingprep.com/developer/docs#company-profile-company-information
1513
+ * @param symbol - The stock symbol to get the profile for
1514
+ * @returns Get a comprehensive overview of a company with our Company Profile endpoint. This endpoint provides key information such as price, beta, market capitalization, description, headquarters, and more.
1515
+ */
1516
+ getCompanyProfile({ symbol, }: {
1517
+ symbol: string;
1518
+ }): Promise<UnwrappedAPIResponse<CompanyProfile | null>>;
1519
+ /**
1520
+ * Get executive compensation
1521
+ * https://site.financialmodelingprep.com/developer/docs#executive-compensation-company-information
1522
+ * @param symbol - The stock symbol to get the executive compensation for
1523
+ * @returns Understand how a company compensates its executives with our Executive Compensation endpoint. This endpoint provides information such as salary, bonus, and stock options for each executive.
1524
+ */
1525
+ getExecutiveCompensation({ symbol, }: {
1526
+ symbol: string;
1527
+ }): Promise<UnwrappedAPIResponse<ExecutiveCompensation[] | null>>;
1528
+ /**
1529
+ * Get company notes
1530
+ * https://site.financialmodelingprep.com/developer/docs#company-notes-company-information
1531
+ * @param symbol - The stock symbol to get the notes for
1532
+ * @returns Stay up-to-date on a company's financial condition, operations, and risks with our Company Notes endpoint. This endpoint provides information about notes reported by a company in their financial statements.
1533
+ */
1534
+ getCompanyNotes({ symbol, }: {
1535
+ symbol: string;
1536
+ }): Promise<UnwrappedAPIResponse<CompanyNotes[] | null>>;
1537
+ /**
1538
+ * Get historical employee count
1539
+ * https://site.financialmodelingprep.com/developer/docs#historical-employee-company-information
1540
+ * @param symbol - The stock symbol to get the historical employee count for
1541
+ * @returns Track a company's employee count over time with our Historical Employee Count endpoint. This endpoint provides information about the number of employees a company has had each year.
1542
+ */
1543
+ getHistoricalEmployeeCount({ symbol, }: {
1544
+ symbol: string;
1545
+ }): Promise<UnwrappedAPIResponse<HistoricalEmployeeCount[] | null>>;
1546
+ /**
1547
+ * Get shares float
1548
+ * https://site.financialmodelingprep.com/developer/docs#company-share-float-share-float
1549
+ * @param symbol - The stock symbol to get the shares float for
1550
+ * @returns The FMP Company Share Float endpoint provides the total number of shares that are publicly traded for a given company. This is also known as the company's float. The float is calculated by subtracting the number of restricted shares from the total number of outstanding shares.
1551
+ */
1552
+ getSharesFloat({ symbol, }: {
1553
+ symbol: string;
1554
+ }): Promise<UnwrappedAPIResponse<SharesFloat | null>>;
1555
+ /**
1556
+ * Get historical shares float
1557
+ * https://site.financialmodelingprep.com/developer/docs#company-historical-share-float
1558
+ * @param symbol - The stock symbol to get the historical shares float for
1559
+ * @returns The FMP Historical Share Float endpoint provides historical data on the number of shares that are publicly traded for a given company. This is also known as the company's float. The float is calculated by subtracting the number of restricted shares from the total number of outstanding shares.
1560
+ */
1561
+ getHistoricalSharesFloat({ symbol, }: {
1562
+ symbol: string;
1563
+ }): Promise<UnwrappedAPIResponse<HistoricalSharesFloat[] | null>>;
1564
+ /**
1565
+ * Get earnings call transcript
1566
+ * https://site.financialmodelingprep.com/developer/docs#earnings-transcript-earnings-transcripts
1567
+ * @param symbol - The stock symbol to get the earnings call transcript for
1568
+ * @param year - The year of the earnings call
1569
+ * @param quarter - The quarter of the earnings call
1570
+ * @returns The FMP Earnings Call Transcript endpoint provides the transcript of a company's earnings call.
1571
+ */
1572
+ getEarningsCallTranscript({ symbol, year, quarter, }: {
1573
+ symbol: string;
1574
+ year: number;
1575
+ quarter: number;
1576
+ }): Promise<UnwrappedAPIResponse<EarningsCallTranscript[] | null>>;
1253
1577
  }
1254
1578
 
1255
1579
  /**
@@ -1284,6 +1608,9 @@ declare class FMP {
1284
1608
  readonly bond: BondEndpoints;
1285
1609
  readonly economic: EconomicEndpoints;
1286
1610
  readonly market: MarketEndpoints;
1611
+ readonly list: ListEndpoints;
1612
+ readonly calendar: CalendarEndpoints;
1613
+ readonly company: CompanyEndpoints;
1287
1614
  constructor(config: FMPConfig);
1288
1615
  /**
1289
1616
  * Get the underlying client instance for advanced usage
@@ -1291,6 +1618,14 @@ declare class FMP {
1291
1618
  getClient(): FMPClient;
1292
1619
  }
1293
1620
 
1621
+ /**
1622
+ * Validate API key
1623
+ */
1624
+ declare function validateApiKey(apiKey: string): void;
1625
+ /**
1626
+ * Validate stock symbol
1627
+ */
1628
+ declare function validateSymbol(symbol: string): void;
1294
1629
  /**
1295
1630
  * Validate date format (YYYY-MM-DD)
1296
1631
  */
@@ -1407,25 +1742,4 @@ declare const HTTP_STATUS: {
1407
1742
  readonly INTERNAL_SERVER_ERROR: 500;
1408
1743
  };
1409
1744
 
1410
- declare class FMPError extends Error {
1411
- status?: number | undefined;
1412
- code?: string | undefined;
1413
- constructor(message: string, status?: number | undefined, code?: string | undefined);
1414
- }
1415
- declare function validateApiKey(apiKey: string): void;
1416
- declare function validateSymbol(symbol: string): void;
1417
- declare const FMP_BASE_URL = "https://financialmodelingprep.com/api/v3";
1418
- declare const FMP_BASE_URL_V4 = "https://financialmodelingprep.com/api/v4";
1419
- declare enum Period {
1420
- ANNUAL = "annual",
1421
- QUARTER = "quarter"
1422
- }
1423
- declare enum Exchange {
1424
- NYSE = "NYSE",
1425
- NASDAQ = "NASDAQ",
1426
- AMEX = "AMEX",
1427
- TSX = "TSX",
1428
- LSE = "LSE"
1429
- }
1430
-
1431
- export { type APIResponse, type AnalystEstimate, type BalanceSheet, type BalanceSheetParams, BondEndpoints, type BondHistoricalParams, type BondList, type BondListParams, type BondQuote, type BondQuoteParams, COUNTRIES, type CPI, type CPIParams, type CashFlowParams, type CashFlowStatement, type CompanyProfile, type CompanyValuationParams, type CryptoCurrency, CryptoEndpoints, type CryptoHistoricalParams, type CryptoListParams, type CryptoQuote, type CryptoQuoteParams, DEFAULT_LIMIT, DEFAULT_TIMEOUT, type DateRangeParams, ERROR_MESSAGES, ETFEndpoints, type ETFHoldersParams, type ETFHolding, type ETFList, type ETFListParams, type ETFProfile, type ETFProfileParams, type ETFQuote, type ETFQuoteParams, EXCHANGES, type EarningsCalendar, EconomicEndpoints, type EconomicIndicator, type EconomicIndicatorParams, type EnterpriseValue, type EnterpriseValueParams, type ErrorResponse, Exchange, FMP, FMPClient, type FMPConfig, FMPError, FMP_BASE_URL, FMP_BASE_URL_V4, FMP_STABLE_URL, type FederalFundsRate, type FederalFundsRateParams, FinancialEndpoints, type FinancialGrowthParams, type FinancialRatios, type FinancialRatiosParams, type FinancialStatement, type FinancialStatementsParams, ForexEndpoints, type ForexHistoricalParams, type ForexListParams, type ForexPair, type ForexQuote, type ForexQuoteParams, type GDP, type GDPParams, HTTP_STATUS, type HistoricalPriceData, type HistoricalPriceResponse, type IncomeStatement, type IncomeStatementParams, type InsiderTrading, type InstitutionalHolder, type KeyMetrics, type KeyMetricsParams, MAX_LIMIT, type MajorHolder, type MarketCap, MarketEndpoints, type MarketGainersParams, type MarketHours, type MarketHoursParams, type MarketIndex, type MarketIndexParams, type MarketLosersParams, type MarketMostActiveParams, type MarketPerformance, type MarketPerformanceParams, type MarketSectorPerformance, type MarketSectorPerformanceParams, MutualFundEndpoints, type MutualFundHolder, type MutualFundHoldersParams, type MutualFundHolding, type MutualFundList, type MutualFundListParams, type MutualFundProfile, type MutualFundProfileParams, type MutualFundQuote, type MutualFundQuoteParams, PERIODS, type PaginationParams, Period, type PeriodParams, type PriceTarget, type QueryParams, type Quote, SECTORS, type SectorPerformance, type StockAnalystEstimatesParams, type StockDividend, type StockDividendParams, type StockEarningsCalendarParams, StockEndpoints, type StockGainersParams, type StockGrade, type StockGradeParams, type StockHistoricalPriceData, type StockHistoricalPriceParams, type StockHistoricalPriceResponse, type StockInsiderTradingParams, type StockInstitutionalHoldersParams, type StockList, type StockLosersParams, type StockMajorHoldersParams, type StockMarketCapParams, type StockMostActiveParams, type StockMutualFundHoldersParams, type StockPriceTargetParams, type StockProfileParams, type StockQuote, type StockQuoteParams, type StockRating, type StockRatingParams, type StockSectorPerformanceParams, type StockSplit, type StockSplitsParams, type SuccessResponse, type SymbolParams, type TreasuryRate, type TreasuryRateParams, type Unemployment, type UnemploymentParams, formatCurrency, formatDate, formatLargeNumber, formatNumber, formatPercentage, formatReadableDate, formatTimestamp, formatVolume, validateApiKey, validateDate, validateLimit, validatePage, validatePeriod, validateSymbol };
1745
+ export { type APIResponse, type AvailableIndexesList, type BalanceSheet, type BalanceSheetGrowth, BondEndpoints, type BondHistoricalParams, type BondListParams, type BondQuote, type BondQuoteParams, COUNTRIES, type CPI, type CPIParams, CalendarEndpoints, type CashFlowStatement, type CashflowGrowth, CompanyEndpoints, type CompanyNotes, type CompanyProfile, CryptoEndpoints, type CryptoHistoricalParams, type CryptoList, type CryptoListParams, type CryptoQuote, type CryptoQuoteParams, DEFAULT_LIMIT, DEFAULT_TIMEOUT, type DateRangeParams, type DividendsCalendar, ERROR_MESSAGES, ETFEndpoints, type ETFHoldersParams, type ETFHolding, type ETFList, type ETFListParams, type ETFProfile, type ETFProfileParams, type ETFQuote, type ETFQuoteParams, EXCHANGES, type EarningsCalendar, type EarningsCallTranscript, EconomicEndpoints, type EconomicIndicator, type EconomicIndicatorParams, type EconomicsCalendar, type EnterpriseValue, type ErrorResponse, Exchange, type ExecutiveCompensation, FMP, FMPClient, type FMPConfig, type FederalFundsRate, type FederalFundsRateParams, FinancialEndpoints, type FinancialGrowth, type FinancialRatios, type FinancialStatementBase, type FinancialStatementsParams, ForexEndpoints, type ForexHistoricalParams, type ForexList, type ForexListParams, type ForexQuote, type ForexQuoteParams, type GDP, type GDPParams, type GrowthStatementBase, HTTP_STATUS, type HistoricalEmployeeCount, type HistoricalPriceData, type HistoricalPriceResponse, type HistoricalSharesFloat, type IPOCalendar, type IncomeGrowth, type IncomeStatement, type KeyMetrics, ListEndpoints, MAX_LIMIT, type MarketCap, MarketEndpoints, type MarketGainersParams, type MarketHours, type MarketHoursParams, type MarketIndex, type MarketIndexParams, type MarketLosersParams, type MarketMostActiveParams, type MarketPerformance, type MarketPerformanceParams, type MarketSectorPerformance, type MarketSectorPerformanceParams, MutualFundEndpoints, type MutualFundHoldersParams, type MutualFundHolding, type MutualFundListParams, type MutualFundProfile, type MutualFundProfileParams, type MutualFundQuote, type MutualFundQuoteParams, PERIODS, type PaginationParams, Period, type PeriodParams, type QueryParams, type Quote, SECTORS, type SharesFloat, type SplitsCalendar, type StockDividend, StockEndpoints, type StockHistoricalPriceData, type StockHistoricalPriceResponse, type StockList, type StockQuote, type StockSplit, type SuccessResponse, type SymbolParams, type TreasuryRate, type TreasuryRateParams, type Unemployment, type UnemploymentParams, type UnwrapSingle, type UnwrappedAPIResponse, formatCurrency, formatDate, formatLargeNumber, formatNumber, formatPercentage, formatReadableDate, formatTimestamp, formatVolume, validateApiKey, validateDate, validateLimit, validatePage, validatePeriod, validateSymbol };