fmp-node-api 0.0.3 → 0.0.5
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/README.md +7 -5
- package/dist/index.d.mts +379 -242
- package/dist/index.d.ts +379 -242
- package/dist/index.js +242 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +242 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -1
package/dist/index.d.mts
CHANGED
|
@@ -14,13 +14,6 @@ interface ErrorResponse extends APIResponse<never> {
|
|
|
14
14
|
error: string;
|
|
15
15
|
status: number;
|
|
16
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
|
-
}
|
|
24
17
|
interface FMPConfig {
|
|
25
18
|
apiKey: string;
|
|
26
19
|
baseURL?: string;
|
|
@@ -40,64 +33,80 @@ interface PaginationParams {
|
|
|
40
33
|
interface PeriodParams {
|
|
41
34
|
period?: 'annual' | 'quarter';
|
|
42
35
|
}
|
|
43
|
-
interface
|
|
44
|
-
|
|
45
|
-
open: number;
|
|
46
|
-
high: number;
|
|
47
|
-
low: number;
|
|
48
|
-
close: number;
|
|
49
|
-
adjClose: number;
|
|
50
|
-
volume: number;
|
|
51
|
-
unadjustedVolume: number;
|
|
52
|
-
change: number;
|
|
53
|
-
changePercent: number;
|
|
54
|
-
vwap: number;
|
|
55
|
-
label: string;
|
|
56
|
-
changeOverTime: number;
|
|
36
|
+
interface QueryParams {
|
|
37
|
+
[key: string]: string | number | boolean | undefined;
|
|
57
38
|
}
|
|
58
|
-
|
|
39
|
+
declare enum Period {
|
|
40
|
+
ANNUAL = "annual",
|
|
41
|
+
QUARTER = "quarter"
|
|
42
|
+
}
|
|
43
|
+
declare enum Exchange {
|
|
44
|
+
NYSE = "NYSE",
|
|
45
|
+
NASDAQ = "NASDAQ",
|
|
46
|
+
AMEX = "AMEX",
|
|
47
|
+
TSX = "TSX",
|
|
48
|
+
LSE = "LSE",
|
|
49
|
+
ASX = "ASX",
|
|
50
|
+
NSE = "NSE",
|
|
51
|
+
BSE = "BSE"
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface QuoteParams {
|
|
59
55
|
symbol: string;
|
|
60
|
-
historical: HistoricalPriceData[];
|
|
61
56
|
}
|
|
62
|
-
interface
|
|
63
|
-
|
|
57
|
+
interface HistoricalPriceParams {
|
|
58
|
+
symbol: string;
|
|
59
|
+
from?: string;
|
|
60
|
+
to?: string;
|
|
61
|
+
}
|
|
62
|
+
interface IntradayParams {
|
|
63
|
+
symbol: string;
|
|
64
|
+
interval: '1min' | '5min' | '15min' | '30min' | '1hour' | '4hour';
|
|
65
|
+
from?: string;
|
|
66
|
+
to?: string;
|
|
64
67
|
}
|
|
65
68
|
interface Quote {
|
|
66
69
|
symbol: string;
|
|
70
|
+
name: string;
|
|
67
71
|
price: number;
|
|
72
|
+
changesPercentage: number;
|
|
68
73
|
change: number;
|
|
69
|
-
changePercent: number;
|
|
70
74
|
dayLow: number;
|
|
71
75
|
dayHigh: number;
|
|
72
|
-
yearLow: number;
|
|
73
76
|
yearHigh: number;
|
|
74
|
-
|
|
77
|
+
yearLow: number;
|
|
78
|
+
marketCap: number | null;
|
|
75
79
|
priceAvg50: number;
|
|
76
80
|
priceAvg200: number;
|
|
81
|
+
exchange: string;
|
|
77
82
|
volume: number;
|
|
78
83
|
avgVolume: number;
|
|
79
|
-
exchange: string;
|
|
80
84
|
open: number;
|
|
81
85
|
previousClose: number;
|
|
82
|
-
eps: number;
|
|
83
|
-
pe: number;
|
|
84
|
-
earningsAnnouncement: string;
|
|
85
|
-
sharesOutstanding: number;
|
|
86
|
+
eps: number | null;
|
|
87
|
+
pe: number | null;
|
|
88
|
+
earningsAnnouncement: string | null;
|
|
89
|
+
sharesOutstanding: number | null;
|
|
86
90
|
timestamp: number;
|
|
87
91
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
interface HistoricalPriceData {
|
|
93
|
+
date: string;
|
|
94
|
+
open: number;
|
|
95
|
+
high: number;
|
|
96
|
+
low: number;
|
|
97
|
+
close: number;
|
|
98
|
+
adjClose: number;
|
|
99
|
+
volume: number;
|
|
100
|
+
unadjustedVolume: number;
|
|
101
|
+
change: number;
|
|
102
|
+
changePercent: number;
|
|
103
|
+
vwap: number;
|
|
104
|
+
label: string;
|
|
105
|
+
changeOverTime: number;
|
|
91
106
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
AMEX = "AMEX",
|
|
96
|
-
TSX = "TSX",
|
|
97
|
-
LSE = "LSE",
|
|
98
|
-
ASX = "ASX",
|
|
99
|
-
NSE = "NSE",
|
|
100
|
-
BSE = "BSE"
|
|
107
|
+
interface HistoricalPriceResponse {
|
|
108
|
+
symbol: string;
|
|
109
|
+
historical: HistoricalPriceData[];
|
|
101
110
|
}
|
|
102
111
|
|
|
103
112
|
interface StockQuote {
|
|
@@ -130,6 +139,10 @@ interface StockSplit {
|
|
|
130
139
|
numerator: number;
|
|
131
140
|
denominator: number;
|
|
132
141
|
}
|
|
142
|
+
interface StockSplitResponse {
|
|
143
|
+
symbol: string;
|
|
144
|
+
historical: StockSplit[];
|
|
145
|
+
}
|
|
133
146
|
interface StockDividend {
|
|
134
147
|
date: string;
|
|
135
148
|
label: string;
|
|
@@ -139,16 +152,15 @@ interface StockDividend {
|
|
|
139
152
|
paymentDate: string;
|
|
140
153
|
declarationDate: string;
|
|
141
154
|
}
|
|
155
|
+
interface StockDividendResponse {
|
|
156
|
+
symbol: string;
|
|
157
|
+
historical: StockDividend[];
|
|
158
|
+
}
|
|
142
159
|
interface MarketCap {
|
|
143
160
|
symbol: string;
|
|
144
161
|
date: string;
|
|
145
162
|
marketCap: number;
|
|
146
163
|
}
|
|
147
|
-
interface StockHistoricalPriceData extends HistoricalPriceData {
|
|
148
|
-
}
|
|
149
|
-
interface StockHistoricalPriceResponse extends HistoricalPriceResponse {
|
|
150
|
-
historical: StockHistoricalPriceData[];
|
|
151
|
-
}
|
|
152
164
|
|
|
153
165
|
interface FinancialStatementsParams extends SymbolParams, PeriodParams {
|
|
154
166
|
limit?: number;
|
|
@@ -547,6 +559,23 @@ interface FinancialGrowth extends GrowthStatementBase {
|
|
|
547
559
|
rdexpenseGrowth: number;
|
|
548
560
|
sgaexpensesGrowth: number;
|
|
549
561
|
}
|
|
562
|
+
interface EarningsHistorical {
|
|
563
|
+
date: string;
|
|
564
|
+
symbol: string;
|
|
565
|
+
eps: number;
|
|
566
|
+
epsEstimated: number;
|
|
567
|
+
time: string;
|
|
568
|
+
revenue: number;
|
|
569
|
+
revenueEstimated: number;
|
|
570
|
+
updatedFromDate: string;
|
|
571
|
+
fiscalDateEnding: string;
|
|
572
|
+
}
|
|
573
|
+
interface EarningsSurprises {
|
|
574
|
+
date: string;
|
|
575
|
+
symbol: string;
|
|
576
|
+
actualEarningResult: number;
|
|
577
|
+
estimatedEarning: number;
|
|
578
|
+
}
|
|
550
579
|
|
|
551
580
|
interface ForexQuoteParams extends SymbolParams {
|
|
552
581
|
}
|
|
@@ -579,8 +608,6 @@ interface ForexQuote {
|
|
|
579
608
|
timestamp: number;
|
|
580
609
|
}
|
|
581
610
|
|
|
582
|
-
interface CryptoQuoteParams extends SymbolParams {
|
|
583
|
-
}
|
|
584
611
|
interface CryptoHistoricalParams extends SymbolParams, DateRangeParams {
|
|
585
612
|
timeseries?: number;
|
|
586
613
|
}
|
|
@@ -588,13 +615,14 @@ interface CryptoListParams {
|
|
|
588
615
|
}
|
|
589
616
|
interface CryptoQuote {
|
|
590
617
|
symbol: string;
|
|
618
|
+
name: string;
|
|
591
619
|
price: number;
|
|
592
620
|
changesPercentage: number;
|
|
593
621
|
change: number;
|
|
594
622
|
dayLow: number;
|
|
595
623
|
dayHigh: number;
|
|
596
|
-
yearLow: number;
|
|
597
624
|
yearHigh: number;
|
|
625
|
+
yearLow: number;
|
|
598
626
|
marketCap: number;
|
|
599
627
|
priceAvg50: number;
|
|
600
628
|
priceAvg200: number;
|
|
@@ -603,86 +631,86 @@ interface CryptoQuote {
|
|
|
603
631
|
exchange: string;
|
|
604
632
|
open: number;
|
|
605
633
|
previousClose: number;
|
|
606
|
-
eps: number;
|
|
607
|
-
pe: number;
|
|
608
|
-
earningsAnnouncement: string;
|
|
634
|
+
eps: number | null;
|
|
635
|
+
pe: number | null;
|
|
636
|
+
earningsAnnouncement: string | null;
|
|
609
637
|
sharesOutstanding: number;
|
|
610
638
|
timestamp: number;
|
|
611
639
|
}
|
|
612
640
|
|
|
613
|
-
interface
|
|
614
|
-
|
|
615
|
-
interface ETFProfileParams extends SymbolParams {
|
|
616
|
-
}
|
|
617
|
-
interface ETFHoldersParams extends SymbolParams, PaginationParams {
|
|
618
|
-
}
|
|
619
|
-
interface ETFListParams {
|
|
641
|
+
interface ETFHoldingDates {
|
|
642
|
+
date: string;
|
|
620
643
|
}
|
|
621
|
-
interface
|
|
644
|
+
interface ETFHolding {
|
|
645
|
+
cik: string;
|
|
646
|
+
acceptanceTime: string;
|
|
647
|
+
date: string;
|
|
622
648
|
symbol: string;
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
649
|
+
name: string;
|
|
650
|
+
lei: string;
|
|
651
|
+
title: string;
|
|
652
|
+
cusip: string;
|
|
653
|
+
isin: string;
|
|
654
|
+
balance: number;
|
|
655
|
+
units: string;
|
|
656
|
+
cur_cd: string;
|
|
657
|
+
valUsd: number;
|
|
658
|
+
pctVal: number;
|
|
659
|
+
payoffProfile: string;
|
|
660
|
+
assetCat: string;
|
|
661
|
+
issuerCat: string;
|
|
662
|
+
invCountry: string;
|
|
663
|
+
isRestrictedSec: string;
|
|
664
|
+
fairValLevel: string;
|
|
665
|
+
isCashCollateral: string;
|
|
666
|
+
isNonCashCollateral: string;
|
|
667
|
+
isLoanByFund: string;
|
|
668
|
+
}
|
|
669
|
+
interface ETFHolder {
|
|
670
|
+
asset: string;
|
|
671
|
+
name: string;
|
|
672
|
+
isin: string;
|
|
673
|
+
cusip: string;
|
|
674
|
+
sharesNumber: number;
|
|
675
|
+
weightPercentage: number;
|
|
676
|
+
marketValue: number;
|
|
677
|
+
updated: string;
|
|
643
678
|
}
|
|
644
679
|
interface ETFProfile {
|
|
645
680
|
symbol: string;
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
marketCap: number;
|
|
650
|
-
lastDiv: number;
|
|
651
|
-
range: string;
|
|
652
|
-
changes: number;
|
|
653
|
-
companyName: string;
|
|
654
|
-
currency: string;
|
|
655
|
-
cik: string;
|
|
656
|
-
isin: string;
|
|
681
|
+
assetClass: string;
|
|
682
|
+
aum: number;
|
|
683
|
+
avgVolume: number;
|
|
657
684
|
cusip: string;
|
|
658
|
-
exchange: string;
|
|
659
|
-
exchangeShortName: string;
|
|
660
|
-
industry: string;
|
|
661
|
-
website: string;
|
|
662
685
|
description: string;
|
|
663
|
-
|
|
686
|
+
domicile: string;
|
|
687
|
+
etfCompany: string;
|
|
688
|
+
expenseRatio: number;
|
|
689
|
+
inceptionDate: string;
|
|
690
|
+
isin: string;
|
|
691
|
+
name: string;
|
|
692
|
+
nav: number;
|
|
693
|
+
navCurrency: string;
|
|
694
|
+
sectorsList: {
|
|
695
|
+
exposure: string;
|
|
696
|
+
industry: string;
|
|
697
|
+
}[];
|
|
698
|
+
website: string;
|
|
699
|
+
holdingsCount: number;
|
|
700
|
+
}
|
|
701
|
+
interface ETFWeighting {
|
|
664
702
|
sector: string;
|
|
703
|
+
weightPercentage: string;
|
|
704
|
+
}
|
|
705
|
+
interface ETFCountryWeighting {
|
|
665
706
|
country: string;
|
|
666
|
-
|
|
667
|
-
phone: string;
|
|
668
|
-
address: string;
|
|
669
|
-
city: string;
|
|
670
|
-
state: string;
|
|
671
|
-
zip: string;
|
|
672
|
-
dcfDiff: number;
|
|
673
|
-
dcf: number;
|
|
674
|
-
image: string;
|
|
675
|
-
ipoDate: string;
|
|
676
|
-
defaultImage: boolean;
|
|
677
|
-
isEtf: boolean;
|
|
678
|
-
isActivelyTrading: boolean;
|
|
679
|
-
isAdr: boolean;
|
|
680
|
-
isFund: boolean;
|
|
707
|
+
weightPercentage: string;
|
|
681
708
|
}
|
|
682
|
-
interface
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
709
|
+
interface ETFStockExposure {
|
|
710
|
+
etfSymbol: string;
|
|
711
|
+
assetExposure: string;
|
|
712
|
+
sharesNumber: number;
|
|
713
|
+
weightPercentage: number;
|
|
686
714
|
marketValue: number;
|
|
687
715
|
}
|
|
688
716
|
|
|
@@ -849,56 +877,36 @@ interface Unemployment {
|
|
|
849
877
|
changePercent: number;
|
|
850
878
|
}
|
|
851
879
|
|
|
852
|
-
interface MarketHoursParams {
|
|
853
|
-
}
|
|
854
|
-
interface MarketPerformanceParams {
|
|
855
|
-
}
|
|
856
|
-
interface MarketGainersParams {
|
|
857
|
-
}
|
|
858
|
-
interface MarketLosersParams {
|
|
859
|
-
}
|
|
860
|
-
interface MarketMostActiveParams {
|
|
861
|
-
}
|
|
862
|
-
interface MarketSectorPerformanceParams {
|
|
863
|
-
}
|
|
864
|
-
interface MarketIndexParams extends DateRangeParams {
|
|
865
|
-
}
|
|
866
880
|
interface MarketHours {
|
|
867
881
|
stockExchangeName: string;
|
|
868
882
|
stockMarketHours: {
|
|
869
883
|
openingHour: string;
|
|
870
884
|
closingHour: string;
|
|
871
|
-
gmtOffset: number;
|
|
872
885
|
};
|
|
873
|
-
|
|
886
|
+
stockMarketHolidays: MarketHoliday[];
|
|
874
887
|
isTheStockMarketOpen: boolean;
|
|
875
888
|
isTheEuronextMarketOpen: boolean;
|
|
876
889
|
isTheForexMarketOpen: boolean;
|
|
877
890
|
isTheCryptoMarketOpen: boolean;
|
|
878
891
|
}
|
|
892
|
+
interface MarketHoliday {
|
|
893
|
+
year: number;
|
|
894
|
+
'Martin Luther King, Jr. Day': string;
|
|
895
|
+
"Presidents' Day": string;
|
|
896
|
+
'Good Friday': string;
|
|
897
|
+
'Memorial Day': string;
|
|
898
|
+
Juneteenth: string;
|
|
899
|
+
'Independence Day': string;
|
|
900
|
+
'Labor Day': string;
|
|
901
|
+
'Thanksgiving Day': string;
|
|
902
|
+
Christmas: string;
|
|
903
|
+
}
|
|
879
904
|
interface MarketPerformance {
|
|
880
|
-
|
|
881
|
-
|
|
905
|
+
symbol: string;
|
|
906
|
+
name: string;
|
|
907
|
+
change: number;
|
|
882
908
|
price: number;
|
|
883
909
|
changesPercentage: number;
|
|
884
|
-
changes: number;
|
|
885
|
-
dayLow: number;
|
|
886
|
-
dayHigh: number;
|
|
887
|
-
yearLow: number;
|
|
888
|
-
yearHigh: number;
|
|
889
|
-
marketCap: number;
|
|
890
|
-
priceAvg50: number;
|
|
891
|
-
priceAvg200: number;
|
|
892
|
-
volume: number;
|
|
893
|
-
avgVolume: number;
|
|
894
|
-
exchange: string;
|
|
895
|
-
open: number;
|
|
896
|
-
previousClose: number;
|
|
897
|
-
eps: number;
|
|
898
|
-
pe: number;
|
|
899
|
-
earningsAnnouncement: string;
|
|
900
|
-
sharesOutstanding: number;
|
|
901
|
-
timestamp: number;
|
|
902
910
|
}
|
|
903
911
|
interface MarketSectorPerformance {
|
|
904
912
|
sector: string;
|
|
@@ -906,27 +914,27 @@ interface MarketSectorPerformance {
|
|
|
906
914
|
}
|
|
907
915
|
interface MarketIndex {
|
|
908
916
|
symbol: string;
|
|
909
|
-
name: string;
|
|
910
917
|
price: number;
|
|
911
|
-
|
|
918
|
+
extendedPrice: number | null;
|
|
912
919
|
change: number;
|
|
913
|
-
dayLow: number;
|
|
914
920
|
dayHigh: number;
|
|
915
|
-
|
|
916
|
-
yearHigh: number;
|
|
917
|
-
marketCap: number;
|
|
918
|
-
priceAvg50: number;
|
|
919
|
-
priceAvg200: number;
|
|
920
|
-
volume: number;
|
|
921
|
-
avgVolume: number;
|
|
922
|
-
exchange: string;
|
|
923
|
-
open: number;
|
|
921
|
+
dayLow: number;
|
|
924
922
|
previousClose: number;
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
923
|
+
volume: number | null;
|
|
924
|
+
open: number;
|
|
925
|
+
close: number | null;
|
|
926
|
+
lastTradeTime: string;
|
|
927
|
+
lastExtendedTradeTime: string | null;
|
|
928
|
+
updatedAt: string;
|
|
929
|
+
createdAt: string;
|
|
930
|
+
type: string;
|
|
931
|
+
name: string;
|
|
932
|
+
range: string;
|
|
933
|
+
yearHigh: number;
|
|
934
|
+
yearLow: number;
|
|
935
|
+
priceAvg50: number | null;
|
|
936
|
+
priceAvg200: number | null;
|
|
937
|
+
changesPercentage: number;
|
|
930
938
|
}
|
|
931
939
|
|
|
932
940
|
interface EarningsCalendar {
|
|
@@ -985,8 +993,9 @@ interface StockList {
|
|
|
985
993
|
symbol: string;
|
|
986
994
|
exchange: string;
|
|
987
995
|
exchangeShortName: string;
|
|
988
|
-
price:
|
|
996
|
+
price: number;
|
|
989
997
|
name: string;
|
|
998
|
+
type: string;
|
|
990
999
|
}
|
|
991
1000
|
interface ETFList {
|
|
992
1001
|
symbol: string;
|
|
@@ -1120,7 +1129,8 @@ declare class FMPClient {
|
|
|
1120
1129
|
private apiKey;
|
|
1121
1130
|
constructor(config: FMPConfig);
|
|
1122
1131
|
private createClient;
|
|
1123
|
-
get<T>(endpoint: string, version?: 'v3' | 'v4' | 'stable', params?: Record<string, any>): Promise<
|
|
1132
|
+
get<T>(endpoint: string, version?: 'v3' | 'v4' | 'stable', params?: Record<string, any>): Promise<APIResponse<T>>;
|
|
1133
|
+
getSingle<T>(endpoint: string, version?: 'v3' | 'v4' | 'stable', params?: Record<string, any>): Promise<APIResponse<T>>;
|
|
1124
1134
|
private getClientForVersion;
|
|
1125
1135
|
}
|
|
1126
1136
|
|
|
@@ -1129,16 +1139,16 @@ declare class StockEndpoints {
|
|
|
1129
1139
|
constructor(client: FMPClient);
|
|
1130
1140
|
/**
|
|
1131
1141
|
* Get real-time stock quote
|
|
1132
|
-
*
|
|
1142
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.
|
|
1133
1143
|
* @param symbol - The stock symbol to get the quote for
|
|
1134
1144
|
* @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.
|
|
1135
1145
|
*/
|
|
1136
1146
|
getQuote({ symbol }: {
|
|
1137
1147
|
symbol: string;
|
|
1138
|
-
}): Promise<
|
|
1148
|
+
}): Promise<APIResponse<StockQuote | null>>;
|
|
1139
1149
|
/**
|
|
1140
1150
|
* Get historical stock prices
|
|
1141
|
-
*
|
|
1151
|
+
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
1142
1152
|
* @param symbol - The stock symbol to get the historical prices for
|
|
1143
1153
|
* @param from - The start date to get the historical prices for
|
|
1144
1154
|
* @param to - The end date to get the historical prices for
|
|
@@ -1148,25 +1158,25 @@ declare class StockEndpoints {
|
|
|
1148
1158
|
symbol: string;
|
|
1149
1159
|
from?: string;
|
|
1150
1160
|
to?: string;
|
|
1151
|
-
}): Promise<
|
|
1161
|
+
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1152
1162
|
/**
|
|
1153
1163
|
* Get market cap
|
|
1154
1164
|
* https://site.financialmodelingprep.com/developer/docs#market-cap-company-information
|
|
1155
1165
|
* @param symbol - The stock symbol to get the market cap for
|
|
1156
1166
|
* @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.
|
|
1157
1167
|
*/
|
|
1158
|
-
getMarketCap({ symbol
|
|
1168
|
+
getMarketCap({ symbol }: {
|
|
1159
1169
|
symbol: string;
|
|
1160
|
-
}): Promise<
|
|
1170
|
+
}): Promise<APIResponse<MarketCap | null>>;
|
|
1161
1171
|
/**
|
|
1162
1172
|
* Get stock splits
|
|
1163
1173
|
* https://site.financialmodelingprep.com/developer/docs#splits-historical-splits
|
|
1164
1174
|
* @param symbol - The stock symbol to get the splits for
|
|
1165
1175
|
* @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.
|
|
1166
1176
|
*/
|
|
1167
|
-
getStockSplits({ symbol
|
|
1177
|
+
getStockSplits({ symbol }: {
|
|
1168
1178
|
symbol: string;
|
|
1169
|
-
}): Promise<
|
|
1179
|
+
}): Promise<APIResponse<StockSplitResponse>>;
|
|
1170
1180
|
/**
|
|
1171
1181
|
* Get dividend history
|
|
1172
1182
|
* https://site.financialmodelingprep.com/developer/docs#dividends-historical-dividends
|
|
@@ -1175,7 +1185,7 @@ declare class StockEndpoints {
|
|
|
1175
1185
|
*/
|
|
1176
1186
|
getDividendHistory({ symbol, }: {
|
|
1177
1187
|
symbol: string;
|
|
1178
|
-
}): Promise<
|
|
1188
|
+
}): Promise<APIResponse<StockDividendResponse>>;
|
|
1179
1189
|
}
|
|
1180
1190
|
|
|
1181
1191
|
declare class FinancialEndpoints {
|
|
@@ -1189,25 +1199,25 @@ declare class FinancialEndpoints {
|
|
|
1189
1199
|
* @param limit - The number of periods to get
|
|
1190
1200
|
* @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.
|
|
1191
1201
|
*/
|
|
1192
|
-
getIncomeStatement({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1202
|
+
getIncomeStatement({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<IncomeStatement[]>>;
|
|
1193
1203
|
/**
|
|
1194
1204
|
* Get balance sheet
|
|
1195
1205
|
* https://site.financialmodelingprep.com/developer/docs#balance-sheet-statements-financial-statements
|
|
1196
1206
|
* @param symbol - The stock symbol to get the balance sheet for
|
|
1197
1207
|
* @param period - The period to get the balance sheet for (annual or quarter)
|
|
1198
1208
|
* @param limit - The number of periods to get
|
|
1199
|
-
* @returns The balance sheet is a financial statement that displays a company
|
|
1209
|
+
* @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.
|
|
1200
1210
|
*/
|
|
1201
|
-
getBalanceSheet({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1211
|
+
getBalanceSheet({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<BalanceSheet[]>>;
|
|
1202
1212
|
/**
|
|
1203
1213
|
* Get cash flow statement
|
|
1204
1214
|
* https://site.financialmodelingprep.com/developer/docs#cashflow-statements-financial-statements
|
|
1205
1215
|
* @param symbol - The stock symbol to get the cash flow statement for
|
|
1206
1216
|
* @param period - The period to get the cash flow statement for (annual or quarter)
|
|
1207
1217
|
* @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
|
|
1218
|
+
* @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.
|
|
1209
1219
|
*/
|
|
1210
|
-
getCashFlowStatement({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1220
|
+
getCashFlowStatement({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<CashFlowStatement[]>>;
|
|
1211
1221
|
/**
|
|
1212
1222
|
* Get key metrics
|
|
1213
1223
|
* https://site.financialmodelingprep.com/developer/docs#key-metrics-statement-analysis
|
|
@@ -1216,7 +1226,7 @@ declare class FinancialEndpoints {
|
|
|
1216
1226
|
* @param limit - The number of periods to get
|
|
1217
1227
|
* @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.
|
|
1218
1228
|
*/
|
|
1219
|
-
getKeyMetrics({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1229
|
+
getKeyMetrics({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<KeyMetrics[]>>;
|
|
1220
1230
|
/**
|
|
1221
1231
|
* Get financial ratios
|
|
1222
1232
|
* https://site.financialmodelingprep.com/developer/docs#ratios-statement-analysis
|
|
@@ -1225,7 +1235,7 @@ declare class FinancialEndpoints {
|
|
|
1225
1235
|
* @param limit - The number of periods to get
|
|
1226
1236
|
* @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.
|
|
1227
1237
|
*/
|
|
1228
|
-
getFinancialRatios({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1238
|
+
getFinancialRatios({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<FinancialRatios[]>>;
|
|
1229
1239
|
/**
|
|
1230
1240
|
* Get enterprise value
|
|
1231
1241
|
* https://site.financialmodelingprep.com/developer/docs#enterprise-values-statement-analysis
|
|
@@ -1234,7 +1244,7 @@ declare class FinancialEndpoints {
|
|
|
1234
1244
|
* @param limit - The number of periods to get
|
|
1235
1245
|
* @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
1246
|
*/
|
|
1237
|
-
getEnterpriseValue({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1247
|
+
getEnterpriseValue({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<EnterpriseValue[]>>;
|
|
1238
1248
|
/**
|
|
1239
1249
|
* Get cashflow growth
|
|
1240
1250
|
* https://site.financialmodelingprep.com/developer/docs#cashflow-growth-statement-analysis
|
|
@@ -1243,7 +1253,7 @@ declare class FinancialEndpoints {
|
|
|
1243
1253
|
* @param limit - The number of periods to get
|
|
1244
1254
|
* @returns Get the cash flow growth rate for a company. Measure how quickly a company's cash flow is growing.
|
|
1245
1255
|
*/
|
|
1246
|
-
getCashflowGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1256
|
+
getCashflowGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<CashflowGrowth[]>>;
|
|
1247
1257
|
/**
|
|
1248
1258
|
* Get income growth
|
|
1249
1259
|
* https://site.financialmodelingprep.com/developer/docs#income-growth-statement-analysis
|
|
@@ -1252,7 +1262,7 @@ declare class FinancialEndpoints {
|
|
|
1252
1262
|
* @param limit - The number of periods to get
|
|
1253
1263
|
* @returns Get the income growth rate for a company. Measure how quickly a company's income is growing.
|
|
1254
1264
|
*/
|
|
1255
|
-
getIncomeGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1265
|
+
getIncomeGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<IncomeGrowth[]>>;
|
|
1256
1266
|
/**
|
|
1257
1267
|
* Get balance sheet growth
|
|
1258
1268
|
* https://site.financialmodelingprep.com/developer/docs#balance-sheet-growth-statement-analysis
|
|
@@ -1261,7 +1271,7 @@ declare class FinancialEndpoints {
|
|
|
1261
1271
|
* @param limit - The number of periods to get
|
|
1262
1272
|
* @returns Get the balance sheet growth rate for a company. Measure how quickly a company's assets and liabilities are growing.
|
|
1263
1273
|
*/
|
|
1264
|
-
getBalanceSheetGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1274
|
+
getBalanceSheetGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<BalanceSheetGrowth[]>>;
|
|
1265
1275
|
/**
|
|
1266
1276
|
* Get financial growth
|
|
1267
1277
|
* https://site.financialmodelingprep.com/developer/docs#financial-growth-statement-analysis
|
|
@@ -1270,7 +1280,23 @@ declare class FinancialEndpoints {
|
|
|
1270
1280
|
* @param limit - The number of periods to get
|
|
1271
1281
|
* @returns Financial Growth Get the financial growth rate for a company. Measure how quickly a company's overall financial performance is improving.
|
|
1272
1282
|
*/
|
|
1273
|
-
getFinancialGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<
|
|
1283
|
+
getFinancialGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<FinancialGrowth[]>>;
|
|
1284
|
+
/**
|
|
1285
|
+
* Get earnings historical
|
|
1286
|
+
* https://site.financialmodelingprep.com/developer/docs#earnings-historical-earnings
|
|
1287
|
+
* @param symbol - The stock symbol to get the earnings historical for
|
|
1288
|
+
* @param limit - The number of periods to get
|
|
1289
|
+
* @returns A list of historical & upcoming earnings announcements for a specific company, including the date, estimated EPS, and actual EPS.
|
|
1290
|
+
*/
|
|
1291
|
+
getEarningsHistorical({ symbol, limit, }: FinancialStatementsParams): Promise<APIResponse<EarningsHistorical[]>>;
|
|
1292
|
+
/**
|
|
1293
|
+
* Get earnings surprises
|
|
1294
|
+
* https://site.financialmodelingprep.com/developer/docs#earnings-surprises-earnings
|
|
1295
|
+
* @param symbol - The stock symbol to get the earnings surprises for
|
|
1296
|
+
* @param limit - The number of periods to get
|
|
1297
|
+
* @returns A list of earnings announcements for publicly traded companies that were either positive or negative surprises. This endpoint includes the date of the earnings announcement, the estimated EPS, the actual EPS, and the earnings surprise.
|
|
1298
|
+
*/
|
|
1299
|
+
getEarningsSurprises({ symbol, }: FinancialStatementsParams): Promise<APIResponse<EarningsSurprises[]>>;
|
|
1274
1300
|
}
|
|
1275
1301
|
|
|
1276
1302
|
declare class ForexEndpoints {
|
|
@@ -1278,24 +1304,35 @@ declare class ForexEndpoints {
|
|
|
1278
1304
|
constructor(client: FMPClient);
|
|
1279
1305
|
/**
|
|
1280
1306
|
* Get forex quote
|
|
1307
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.
|
|
1308
|
+
* @param params - Parameters for the forex quote request
|
|
1309
|
+
* @returns Forex quote data
|
|
1281
1310
|
*/
|
|
1282
|
-
getQuote(params: ForexQuoteParams): Promise<
|
|
1311
|
+
getQuote(params: ForexQuoteParams): Promise<APIResponse<ForexQuote[]>>;
|
|
1283
1312
|
/**
|
|
1284
1313
|
* Get historical forex prices
|
|
1314
|
+
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
1315
|
+
* @param symbol - The forex symbol to get the historical prices for
|
|
1316
|
+
* @param from - The start date to get the historical prices for
|
|
1317
|
+
* @param to - The end date to get the historical prices for
|
|
1318
|
+
* @returns Historical forex price data
|
|
1285
1319
|
*/
|
|
1286
1320
|
getHistoricalPrice({ symbol, from, to, }: {
|
|
1287
1321
|
symbol: string;
|
|
1288
1322
|
from?: string;
|
|
1289
1323
|
to?: string;
|
|
1290
|
-
}): Promise<
|
|
1324
|
+
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1291
1325
|
/**
|
|
1292
1326
|
* Get forex rates for a specific base currency
|
|
1327
|
+
* @param baseCurrency - The base currency to get forex rates for
|
|
1328
|
+
* @returns Forex rates data
|
|
1293
1329
|
*/
|
|
1294
|
-
getForexRates(baseCurrency?: string): Promise<
|
|
1330
|
+
getForexRates(baseCurrency?: string): Promise<APIResponse<Record<string, number>>>;
|
|
1295
1331
|
/**
|
|
1296
1332
|
* Get all forex rates
|
|
1333
|
+
* @returns All forex rates data
|
|
1297
1334
|
*/
|
|
1298
|
-
getAllForexRates(): Promise<
|
|
1335
|
+
getAllForexRates(): Promise<APIResponse<Record<string, Record<string, number>>>>;
|
|
1299
1336
|
}
|
|
1300
1337
|
|
|
1301
1338
|
declare class CryptoEndpoints {
|
|
@@ -1303,33 +1340,84 @@ declare class CryptoEndpoints {
|
|
|
1303
1340
|
constructor(client: FMPClient);
|
|
1304
1341
|
/**
|
|
1305
1342
|
* Get crypto quote
|
|
1343
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.
|
|
1344
|
+
* @param symbol - The crypto symbol to get the quote for
|
|
1345
|
+
* @returns Crypto quote data
|
|
1306
1346
|
*/
|
|
1307
|
-
getQuote(
|
|
1347
|
+
getQuote({ symbol }: {
|
|
1348
|
+
symbol: string;
|
|
1349
|
+
}): Promise<APIResponse<CryptoQuote | null>>;
|
|
1308
1350
|
/**
|
|
1309
1351
|
* Get historical crypto prices
|
|
1352
|
+
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
1353
|
+
* @param symbol - The crypto symbol to get the historical prices for
|
|
1354
|
+
* @param from - The start date to get the historical prices for
|
|
1355
|
+
* @param to - The end date to get the historical prices for
|
|
1356
|
+
* @returns Provides daily price data for all cryptocurrencies that are traded on exchanges around the world.
|
|
1310
1357
|
*/
|
|
1311
1358
|
getHistoricalPrice({ symbol, from, to, }: {
|
|
1312
1359
|
symbol: string;
|
|
1313
1360
|
from?: string;
|
|
1314
1361
|
to?: string;
|
|
1315
|
-
}): Promise<
|
|
1362
|
+
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1316
1363
|
}
|
|
1317
1364
|
|
|
1318
1365
|
declare class ETFEndpoints {
|
|
1319
1366
|
private client;
|
|
1320
1367
|
constructor(client: FMPClient);
|
|
1321
1368
|
/**
|
|
1322
|
-
* Get ETF
|
|
1369
|
+
* Get ETF holding dates
|
|
1370
|
+
* https://site.financialmodelingprep.com/developer/docs#etf-holding-dates-etf-holdings
|
|
1371
|
+
* @param symbol - The symbol of the ETF to get the holding dates for
|
|
1372
|
+
* @returns The FMP ETF Holding Dates endpoint provides a list of the dates on which ETF holdings are updated. For example, an investor may want to know when an ETF's holdings are updated in order to make sure that they are still aligned with their investment goals.
|
|
1323
1373
|
*/
|
|
1324
|
-
|
|
1374
|
+
getHoldingDates({ symbol }: SymbolParams): Promise<APIResponse<ETFHoldingDates[]>>;
|
|
1375
|
+
/**
|
|
1376
|
+
* Get ETF holdings
|
|
1377
|
+
* https://site.financialmodelingprep.com/developer/docs#etf-holdings-etf-holdings
|
|
1378
|
+
* @param symbol - The symbol of the ETF to get the holdings for
|
|
1379
|
+
* @param date - The date to get the holdings for
|
|
1380
|
+
* @returns The FMP ETF Holdings endpoint provides a list of all the institutional investors that own shares of an ETF. For example, an investor may want to know which ETF has the highest exposure to a particular industry or sector.
|
|
1381
|
+
*/
|
|
1382
|
+
getHoldings({ symbol, date, }: {
|
|
1383
|
+
symbol: string;
|
|
1384
|
+
date: string;
|
|
1385
|
+
}): Promise<APIResponse<ETFHolding[]>>;
|
|
1386
|
+
/**
|
|
1387
|
+
* Get ETF holder
|
|
1388
|
+
* https://site.financialmodelingprep.com/developer/docs#etf-holder-etf-holdings
|
|
1389
|
+
* @param symbol - The symbol of the ETF to get the holder for
|
|
1390
|
+
* @returns This endpoint returns all stocks held by a specific ETF. Assets, share number, and weight are among the fields returned. For example you can get components of SPY, VOO and more.
|
|
1391
|
+
*/
|
|
1392
|
+
getHolder({ symbol }: SymbolParams): Promise<APIResponse<ETFHolder[]>>;
|
|
1325
1393
|
/**
|
|
1326
1394
|
* Get ETF profile
|
|
1395
|
+
* https://site.financialmodelingprep.com/developer/docs#etf-information-etf-holdings
|
|
1396
|
+
* @param symbol - The symbol of the ETF to get the profile for
|
|
1397
|
+
* @returns The FMP ETF Information endpoint provides basic information about an ETF, such as its ticker symbol, name, expense ratio, and asset under management. For example, an investor may want to compare the expense ratios of different ETFs to find the one that is most cost-effective.
|
|
1327
1398
|
*/
|
|
1328
|
-
getProfile(
|
|
1399
|
+
getProfile({ symbol }: SymbolParams): Promise<APIResponse<ETFProfile | null>>;
|
|
1329
1400
|
/**
|
|
1330
|
-
* Get ETF
|
|
1401
|
+
* Get ETF sector weighting
|
|
1402
|
+
* https://site.financialmodelingprep.com/developer/docs#etf-sector-weighting-etf-holdings
|
|
1403
|
+
* @param symbol - The symbol of the ETF to get the sector exposure for
|
|
1404
|
+
* @returns The FMP ETF Sector Weighting endpoint provides a breakdown of the percentage of an ETF's assets that are invested in each sector. For example, an investor may want to invest in an ETF that has a high exposure to the technology sector if they believe that the technology sector is poised for growth.
|
|
1331
1405
|
*/
|
|
1332
|
-
|
|
1406
|
+
getSectorWeighting({ symbol }: SymbolParams): Promise<APIResponse<ETFWeighting[]>>;
|
|
1407
|
+
/**
|
|
1408
|
+
* Get ETF country weighting
|
|
1409
|
+
* https://site.financialmodelingprep.com/developer/docs#etf-country-weighting-etf-holdings
|
|
1410
|
+
* @param symbol - The symbol of the ETF to get the country weighting for
|
|
1411
|
+
* @returns The FMP ETF Country Weighting endpoint provides a breakdown of the percentage of an ETF's assets that are invested in each country. For example, an investor may want to invest in an ETF that has a high exposure to China if they believe that the Chinese economy is poised for growth.
|
|
1412
|
+
*/
|
|
1413
|
+
getCountryWeighting({ symbol }: SymbolParams): Promise<APIResponse<ETFCountryWeighting[]>>;
|
|
1414
|
+
/**
|
|
1415
|
+
* Get ETF Stock exposure
|
|
1416
|
+
* https://site.financialmodelingprep.com/developer/docs#etf-sector-exposure-etf-holdings
|
|
1417
|
+
* @param symbol - The symbol of the ETF to get the stock exposure for
|
|
1418
|
+
* @returns This endpoint returns asset exposure from all ETFs that have it in their holdings. It has properties like market value, share number or weight percentage. It can be useful for looking up stock you like to check what ETF has it on their portfolio.
|
|
1419
|
+
*/
|
|
1420
|
+
getStockExposure({ symbol }: SymbolParams): Promise<APIResponse<ETFStockExposure[]>>;
|
|
1333
1421
|
}
|
|
1334
1422
|
|
|
1335
1423
|
declare class MutualFundEndpoints {
|
|
@@ -1337,16 +1425,19 @@ declare class MutualFundEndpoints {
|
|
|
1337
1425
|
constructor(client: FMPClient);
|
|
1338
1426
|
/**
|
|
1339
1427
|
* Get mutual fund quote
|
|
1428
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in a future release.
|
|
1429
|
+
* @param params - Parameters for the mutual fund quote request
|
|
1430
|
+
* @returns Mutual fund quote data
|
|
1340
1431
|
*/
|
|
1341
|
-
getQuote(params: MutualFundQuoteParams): Promise<
|
|
1432
|
+
getQuote(params: MutualFundQuoteParams): Promise<APIResponse<MutualFundQuote[]>>;
|
|
1342
1433
|
/**
|
|
1343
1434
|
* Get mutual fund profile
|
|
1344
1435
|
*/
|
|
1345
|
-
getProfile(params: MutualFundProfileParams): Promise<
|
|
1436
|
+
getProfile(params: MutualFundProfileParams): Promise<APIResponse<MutualFundProfile[]>>;
|
|
1346
1437
|
/**
|
|
1347
1438
|
* Get mutual fund holdings
|
|
1348
1439
|
*/
|
|
1349
|
-
getHoldings(params: MutualFundHoldersParams): Promise<
|
|
1440
|
+
getHoldings(params: MutualFundHoldersParams): Promise<APIResponse<MutualFundHolding[]>>;
|
|
1350
1441
|
}
|
|
1351
1442
|
|
|
1352
1443
|
declare class BondEndpoints {
|
|
@@ -1354,16 +1445,24 @@ declare class BondEndpoints {
|
|
|
1354
1445
|
constructor(client: FMPClient);
|
|
1355
1446
|
/**
|
|
1356
1447
|
* Get bond quote
|
|
1448
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in a future release.
|
|
1449
|
+
* @param params - Parameters for the bond quote request
|
|
1450
|
+
* @returns Bond quote data
|
|
1357
1451
|
*/
|
|
1358
|
-
getQuote(params: BondQuoteParams): Promise<
|
|
1452
|
+
getQuote(params: BondQuoteParams): Promise<APIResponse<BondQuote[]>>;
|
|
1359
1453
|
/**
|
|
1360
1454
|
* Get historical bond prices
|
|
1455
|
+
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in a future release.
|
|
1456
|
+
* @param symbol - The bond symbol to get the historical prices for
|
|
1457
|
+
* @param from - The start date to get the historical prices for
|
|
1458
|
+
* @param to - The end date to get the historical prices for
|
|
1459
|
+
* @returns Historical bond price data
|
|
1361
1460
|
*/
|
|
1362
1461
|
getHistoricalPrice({ symbol, from, to, }: {
|
|
1363
1462
|
symbol: string;
|
|
1364
1463
|
from?: string;
|
|
1365
1464
|
to?: string;
|
|
1366
|
-
}): Promise<
|
|
1465
|
+
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1367
1466
|
}
|
|
1368
1467
|
|
|
1369
1468
|
declare class EconomicEndpoints {
|
|
@@ -1372,23 +1471,23 @@ declare class EconomicEndpoints {
|
|
|
1372
1471
|
/**
|
|
1373
1472
|
* Get treasury rates
|
|
1374
1473
|
*/
|
|
1375
|
-
getTreasuryRates(params?: TreasuryRateParams): Promise<
|
|
1474
|
+
getTreasuryRates(params?: TreasuryRateParams): Promise<APIResponse<TreasuryRate[]>>;
|
|
1376
1475
|
/**
|
|
1377
1476
|
* Get federal funds rate
|
|
1378
1477
|
*/
|
|
1379
|
-
getFederalFundsRate(params?: FederalFundsRateParams): Promise<
|
|
1478
|
+
getFederalFundsRate(params?: FederalFundsRateParams): Promise<APIResponse<FederalFundsRate[]>>;
|
|
1380
1479
|
/**
|
|
1381
1480
|
* Get CPI data
|
|
1382
1481
|
*/
|
|
1383
|
-
getCPI(params?: CPIParams): Promise<
|
|
1482
|
+
getCPI(params?: CPIParams): Promise<APIResponse<CPI[]>>;
|
|
1384
1483
|
/**
|
|
1385
1484
|
* Get GDP data
|
|
1386
1485
|
*/
|
|
1387
|
-
getGDP(params?: GDPParams): Promise<
|
|
1486
|
+
getGDP(params?: GDPParams): Promise<APIResponse<GDP[]>>;
|
|
1388
1487
|
/**
|
|
1389
1488
|
* Get unemployment data
|
|
1390
1489
|
*/
|
|
1391
|
-
getUnemployment(params?: UnemploymentParams): Promise<
|
|
1490
|
+
getUnemployment(params?: UnemploymentParams): Promise<APIResponse<Unemployment[]>>;
|
|
1392
1491
|
}
|
|
1393
1492
|
|
|
1394
1493
|
declare class MarketEndpoints {
|
|
@@ -1397,31 +1496,39 @@ declare class MarketEndpoints {
|
|
|
1397
1496
|
/**
|
|
1398
1497
|
* Get market hours
|
|
1399
1498
|
*/
|
|
1400
|
-
getMarketHours(): Promise<
|
|
1499
|
+
getMarketHours(): Promise<APIResponse<MarketHours>>;
|
|
1401
1500
|
/**
|
|
1402
1501
|
* Get market performance
|
|
1403
1502
|
*/
|
|
1404
|
-
getMarketPerformance(): Promise<
|
|
1503
|
+
getMarketPerformance(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1405
1504
|
/**
|
|
1406
1505
|
* Get top gainers
|
|
1506
|
+
* https://site.financialmodelingprep.com/developer/docs#market-biggest-gainers-market-overview
|
|
1507
|
+
* @returns The FMP Market Biggest Gainers endpoint provides a list of the stocks that have gained the most value on a given day. This information can be used by investors to identify stocks that are momentum and to potential investment opportunities.
|
|
1407
1508
|
*/
|
|
1408
|
-
getGainers(): Promise<
|
|
1509
|
+
getGainers(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1409
1510
|
/**
|
|
1410
1511
|
* Get top losers
|
|
1512
|
+
* https://site.financialmodelingprep.com/developer/docs#market-biggest-losers-market-overview
|
|
1513
|
+
* @returns The FMP Market Biggest Losers endpoint provides a list of the stocks that have lost the most value on a given day. This information can be used by investors to identify stocks that are underperforming and to potential trading opportunities.
|
|
1411
1514
|
*/
|
|
1412
|
-
getLosers(): Promise<
|
|
1515
|
+
getLosers(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1413
1516
|
/**
|
|
1414
1517
|
* Get most active stocks
|
|
1415
1518
|
*/
|
|
1416
|
-
getMostActive(): Promise<
|
|
1519
|
+
getMostActive(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1417
1520
|
/**
|
|
1418
1521
|
* Get sector performance
|
|
1522
|
+
* https://site.financialmodelingprep.com/developer/docs#sector-performance-market-overview
|
|
1523
|
+
* @returns The FMP Sector Performance endpoint provides the performance of each sector of the stock market over a specified period of time. This information can be used by investors to identify sectors that are outperforming or underperforming the market.
|
|
1419
1524
|
*/
|
|
1420
|
-
getSectorPerformance(): Promise<
|
|
1525
|
+
getSectorPerformance(): Promise<APIResponse<MarketSectorPerformance[]>>;
|
|
1421
1526
|
/**
|
|
1422
1527
|
* Get market indices
|
|
1528
|
+
* https://site.financialmodelingprep.com/developer/docs#market-index-market-overview
|
|
1529
|
+
* @returns The FMP Market Index endpoint provides a list of all the major stock market indices, such as the S&P 500, the Dow Jones Industrial Average, and the Nasdaq Composite Index. This information can be used by investors to track the performance of the overall stock market and to identify sectors and industries that are outperforming or underperforming the market.
|
|
1423
1530
|
*/
|
|
1424
|
-
getMarketIndex(
|
|
1531
|
+
getMarketIndex(): Promise<APIResponse<MarketIndex[]>>;
|
|
1425
1532
|
}
|
|
1426
1533
|
|
|
1427
1534
|
declare class ListEndpoints {
|
|
@@ -1432,31 +1539,31 @@ declare class ListEndpoints {
|
|
|
1432
1539
|
* https://site.financialmodelingprep.com/developer/docs#symbol-list-stock-list
|
|
1433
1540
|
* @returns The stock list
|
|
1434
1541
|
*/
|
|
1435
|
-
getStockList(): Promise<
|
|
1542
|
+
getStockList(): Promise<APIResponse<StockList[]>>;
|
|
1436
1543
|
/**
|
|
1437
1544
|
* Get ETF list
|
|
1438
1545
|
* https://site.financialmodelingprep.com/developer/docs#exchange-traded-fund-search-stock-list
|
|
1439
1546
|
* @returns The ETF list
|
|
1440
1547
|
*/
|
|
1441
|
-
getETFList(): Promise<
|
|
1548
|
+
getETFList(): Promise<APIResponse<ETFList[]>>;
|
|
1442
1549
|
/**
|
|
1443
1550
|
* Get crypto list
|
|
1444
1551
|
* https://site.financialmodelingprep.com/developer/docs#cryptocurrencies-list-crypto
|
|
1445
1552
|
* @returns The crypto list
|
|
1446
1553
|
*/
|
|
1447
|
-
getCryptoList(): Promise<
|
|
1554
|
+
getCryptoList(): Promise<APIResponse<CryptoList[]>>;
|
|
1448
1555
|
/**
|
|
1449
1556
|
* Get forex list
|
|
1450
1557
|
* https://site.financialmodelingprep.com/developer/docs#forex-list-forex
|
|
1451
1558
|
* @returns The forex list
|
|
1452
1559
|
*/
|
|
1453
|
-
getForexList(): Promise<
|
|
1560
|
+
getForexList(): Promise<APIResponse<ForexList[]>>;
|
|
1454
1561
|
/**
|
|
1455
1562
|
* Get available indexes list
|
|
1456
1563
|
* https://site.financialmodelingprep.com/developer/docs#available-indexes
|
|
1457
1564
|
* @returns The available indexes list
|
|
1458
1565
|
*/
|
|
1459
|
-
getAvailableIndexes(): Promise<
|
|
1566
|
+
getAvailableIndexes(): Promise<APIResponse<AvailableIndexesList[]>>;
|
|
1460
1567
|
}
|
|
1461
1568
|
|
|
1462
1569
|
declare class CalendarEndpoints {
|
|
@@ -1469,7 +1576,7 @@ declare class CalendarEndpoints {
|
|
|
1469
1576
|
* @param to - The end date to get the earnings calendar for
|
|
1470
1577
|
* @returns The earnings calendar
|
|
1471
1578
|
*/
|
|
1472
|
-
getEarningsCalendar({ from, to }?: DateRangeParams): Promise<
|
|
1579
|
+
getEarningsCalendar({ from, to }?: DateRangeParams): Promise<APIResponse<EarningsCalendar[]>>;
|
|
1473
1580
|
/**
|
|
1474
1581
|
* Get dividends calendar
|
|
1475
1582
|
* https://site.financialmodelingprep.com/developer/docs#dividends-calendar-dividends
|
|
@@ -1477,7 +1584,7 @@ declare class CalendarEndpoints {
|
|
|
1477
1584
|
* @param to - The end date to get the dividends calendar for
|
|
1478
1585
|
* @returns The dividends calendar
|
|
1479
1586
|
*/
|
|
1480
|
-
getDividendsCalendar({ from, to }?: DateRangeParams): Promise<
|
|
1587
|
+
getDividendsCalendar({ from, to }?: DateRangeParams): Promise<APIResponse<DividendsCalendar[]>>;
|
|
1481
1588
|
/**
|
|
1482
1589
|
* Get economics calendar
|
|
1483
1590
|
* https://site.financialmodelingprep.com/developer/docs#economics-calendar-economics-data
|
|
@@ -1485,7 +1592,7 @@ declare class CalendarEndpoints {
|
|
|
1485
1592
|
* @param to - The end date to get the economics calendar for
|
|
1486
1593
|
* @returns The economics calendar
|
|
1487
1594
|
*/
|
|
1488
|
-
getEconomicsCalendar({ from, to }?: DateRangeParams): Promise<
|
|
1595
|
+
getEconomicsCalendar({ from, to }?: DateRangeParams): Promise<APIResponse<EconomicsCalendar[]>>;
|
|
1489
1596
|
/**
|
|
1490
1597
|
* Get IPO calendar
|
|
1491
1598
|
* https://site.financialmodelingprep.com/developer/docs#ipo-calender-by-ipo-calendar
|
|
@@ -1493,7 +1600,7 @@ declare class CalendarEndpoints {
|
|
|
1493
1600
|
* @param to - The end date to get the IPO calendar for
|
|
1494
1601
|
* @returns The IPO calendar
|
|
1495
1602
|
*/
|
|
1496
|
-
getIPOCalendar({ from, to }?: DateRangeParams): Promise<
|
|
1603
|
+
getIPOCalendar({ from, to }?: DateRangeParams): Promise<APIResponse<IPOCalendar[]>>;
|
|
1497
1604
|
/**
|
|
1498
1605
|
* Get stock splits calendar
|
|
1499
1606
|
* https://site.financialmodelingprep.com/developer/docs#splits-calendar-splits
|
|
@@ -1501,7 +1608,7 @@ declare class CalendarEndpoints {
|
|
|
1501
1608
|
* @param to - The end date to get the stock splits calendar for
|
|
1502
1609
|
* @returns The stock splits calendar
|
|
1503
1610
|
*/
|
|
1504
|
-
getSplitsCalendar({ from, to }?: DateRangeParams): Promise<
|
|
1611
|
+
getSplitsCalendar({ from, to }?: DateRangeParams): Promise<APIResponse<SplitsCalendar[]>>;
|
|
1505
1612
|
}
|
|
1506
1613
|
|
|
1507
1614
|
declare class CompanyEndpoints {
|
|
@@ -1515,7 +1622,7 @@ declare class CompanyEndpoints {
|
|
|
1515
1622
|
*/
|
|
1516
1623
|
getCompanyProfile({ symbol, }: {
|
|
1517
1624
|
symbol: string;
|
|
1518
|
-
}): Promise<
|
|
1625
|
+
}): Promise<APIResponse<CompanyProfile | null>>;
|
|
1519
1626
|
/**
|
|
1520
1627
|
* Get executive compensation
|
|
1521
1628
|
* https://site.financialmodelingprep.com/developer/docs#executive-compensation-company-information
|
|
@@ -1524,7 +1631,7 @@ declare class CompanyEndpoints {
|
|
|
1524
1631
|
*/
|
|
1525
1632
|
getExecutiveCompensation({ symbol, }: {
|
|
1526
1633
|
symbol: string;
|
|
1527
|
-
}): Promise<
|
|
1634
|
+
}): Promise<APIResponse<ExecutiveCompensation[] | null>>;
|
|
1528
1635
|
/**
|
|
1529
1636
|
* Get company notes
|
|
1530
1637
|
* https://site.financialmodelingprep.com/developer/docs#company-notes-company-information
|
|
@@ -1533,7 +1640,7 @@ declare class CompanyEndpoints {
|
|
|
1533
1640
|
*/
|
|
1534
1641
|
getCompanyNotes({ symbol, }: {
|
|
1535
1642
|
symbol: string;
|
|
1536
|
-
}): Promise<
|
|
1643
|
+
}): Promise<APIResponse<CompanyNotes[] | null>>;
|
|
1537
1644
|
/**
|
|
1538
1645
|
* Get historical employee count
|
|
1539
1646
|
* https://site.financialmodelingprep.com/developer/docs#historical-employee-company-information
|
|
@@ -1542,16 +1649,16 @@ declare class CompanyEndpoints {
|
|
|
1542
1649
|
*/
|
|
1543
1650
|
getHistoricalEmployeeCount({ symbol, }: {
|
|
1544
1651
|
symbol: string;
|
|
1545
|
-
}): Promise<
|
|
1652
|
+
}): Promise<APIResponse<HistoricalEmployeeCount[] | null>>;
|
|
1546
1653
|
/**
|
|
1547
1654
|
* Get shares float
|
|
1548
1655
|
* https://site.financialmodelingprep.com/developer/docs#company-share-float-share-float
|
|
1549
1656
|
* @param symbol - The stock symbol to get the shares float for
|
|
1550
1657
|
* @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
1658
|
*/
|
|
1552
|
-
getSharesFloat({ symbol
|
|
1659
|
+
getSharesFloat({ symbol }: {
|
|
1553
1660
|
symbol: string;
|
|
1554
|
-
}): Promise<
|
|
1661
|
+
}): Promise<APIResponse<SharesFloat | null>>;
|
|
1555
1662
|
/**
|
|
1556
1663
|
* Get historical shares float
|
|
1557
1664
|
* https://site.financialmodelingprep.com/developer/docs#company-historical-share-float
|
|
@@ -1560,7 +1667,7 @@ declare class CompanyEndpoints {
|
|
|
1560
1667
|
*/
|
|
1561
1668
|
getHistoricalSharesFloat({ symbol, }: {
|
|
1562
1669
|
symbol: string;
|
|
1563
|
-
}): Promise<
|
|
1670
|
+
}): Promise<APIResponse<HistoricalSharesFloat[] | null>>;
|
|
1564
1671
|
/**
|
|
1565
1672
|
* Get earnings call transcript
|
|
1566
1673
|
* https://site.financialmodelingprep.com/developer/docs#earnings-transcript-earnings-transcripts
|
|
@@ -1573,7 +1680,36 @@ declare class CompanyEndpoints {
|
|
|
1573
1680
|
symbol: string;
|
|
1574
1681
|
year: number;
|
|
1575
1682
|
quarter: number;
|
|
1576
|
-
}): Promise<
|
|
1683
|
+
}): Promise<APIResponse<EarningsCallTranscript[] | null>>;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
declare class QuoteEndpoints {
|
|
1687
|
+
private client;
|
|
1688
|
+
constructor(client: FMPClient);
|
|
1689
|
+
/**
|
|
1690
|
+
* Get quote for any asset type (stock, crypto, forex, commodity, ETF)
|
|
1691
|
+
* @param params - Parameters for the quote request
|
|
1692
|
+
* @returns Quote data for the specified asset
|
|
1693
|
+
*/
|
|
1694
|
+
getQuote(params: QuoteParams): Promise<APIResponse<Quote | null>>;
|
|
1695
|
+
/**
|
|
1696
|
+
* Get historical prices for any asset type
|
|
1697
|
+
* @param params - Parameters for the historical price request
|
|
1698
|
+
* @returns Historical price data for the specified asset
|
|
1699
|
+
*/
|
|
1700
|
+
getHistoricalPrice(params: HistoricalPriceParams): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1701
|
+
/**
|
|
1702
|
+
* Get multiple quotes for any asset type
|
|
1703
|
+
* @param symbols - Array of symbols to get quotes for
|
|
1704
|
+
* @returns Array of quote data
|
|
1705
|
+
*/
|
|
1706
|
+
getQuotes(symbols: string[]): Promise<APIResponse<Quote[]>>;
|
|
1707
|
+
/**
|
|
1708
|
+
* Get intraday data for any asset type
|
|
1709
|
+
* @param params - Parameters for the intraday request
|
|
1710
|
+
* @returns Intraday price data for the specified asset
|
|
1711
|
+
*/
|
|
1712
|
+
getIntraday(params: IntradayParams): Promise<APIResponse<HistoricalPriceData[]>>;
|
|
1577
1713
|
}
|
|
1578
1714
|
|
|
1579
1715
|
/**
|
|
@@ -1611,6 +1747,7 @@ declare class FMP {
|
|
|
1611
1747
|
readonly list: ListEndpoints;
|
|
1612
1748
|
readonly calendar: CalendarEndpoints;
|
|
1613
1749
|
readonly company: CompanyEndpoints;
|
|
1750
|
+
readonly quote: QuoteEndpoints;
|
|
1614
1751
|
constructor(config: FMPConfig);
|
|
1615
1752
|
/**
|
|
1616
1753
|
* Get the underlying client instance for advanced usage
|
|
@@ -1742,4 +1879,4 @@ declare const HTTP_STATUS: {
|
|
|
1742
1879
|
readonly INTERNAL_SERVER_ERROR: 500;
|
|
1743
1880
|
};
|
|
1744
1881
|
|
|
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,
|
|
1882
|
+
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, 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 EarningsHistorical, type EarningsSurprises, 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 HistoricalPriceParams, type HistoricalPriceResponse, type HistoricalSharesFloat, type IPOCalendar, type IncomeGrowth, type IncomeStatement, type IntradayParams, type KeyMetrics, ListEndpoints, MAX_LIMIT, type MarketCap, MarketEndpoints, type MarketHoliday, type MarketHours, type MarketIndex, type MarketPerformance, type MarketSectorPerformance, 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, QuoteEndpoints, type QuoteParams, SECTORS, type SharesFloat, type SplitsCalendar, type StockDividend, type StockDividendResponse, StockEndpoints, type StockList, type StockQuote, type StockSplit, type StockSplitResponse, 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 };
|