fmp-node-api 0.0.7 → 0.1.0
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 +155 -51
- package/dist/index.d.mts +3291 -662
- package/dist/index.d.ts +3291 -662
- package/dist/index.js +3532 -681
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3525 -674
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
interface APIResponse<T = unknown> {
|
|
2
2
|
success: boolean;
|
|
3
|
-
data
|
|
4
|
-
error
|
|
5
|
-
status?: number;
|
|
6
|
-
}
|
|
7
|
-
interface SuccessResponse<T> extends APIResponse<T> {
|
|
8
|
-
success: true;
|
|
9
|
-
data: T;
|
|
10
|
-
status: number;
|
|
11
|
-
}
|
|
12
|
-
interface ErrorResponse extends APIResponse<never> {
|
|
13
|
-
success: false;
|
|
14
|
-
error: string;
|
|
3
|
+
data: T | null;
|
|
4
|
+
error: string | null;
|
|
15
5
|
status: number;
|
|
16
6
|
}
|
|
17
7
|
interface FMPConfig {
|
|
18
|
-
apiKey
|
|
19
|
-
baseURL?: string;
|
|
8
|
+
apiKey?: string;
|
|
20
9
|
timeout?: number;
|
|
21
10
|
}
|
|
22
11
|
interface SymbolParams {
|
|
@@ -51,20 +40,6 @@ declare enum Exchange {
|
|
|
51
40
|
BSE = "BSE"
|
|
52
41
|
}
|
|
53
42
|
|
|
54
|
-
interface QuoteParams {
|
|
55
|
-
symbol: string;
|
|
56
|
-
}
|
|
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;
|
|
67
|
-
}
|
|
68
43
|
interface Quote {
|
|
69
44
|
symbol: string;
|
|
70
45
|
name: string;
|
|
@@ -109,30 +84,6 @@ interface HistoricalPriceResponse {
|
|
|
109
84
|
historical: HistoricalPriceData[];
|
|
110
85
|
}
|
|
111
86
|
|
|
112
|
-
interface StockQuote {
|
|
113
|
-
symbol: string;
|
|
114
|
-
name: string;
|
|
115
|
-
price: number;
|
|
116
|
-
changesPercentage: number;
|
|
117
|
-
change: number;
|
|
118
|
-
dayLow: number;
|
|
119
|
-
dayHigh: number;
|
|
120
|
-
yearHigh: number;
|
|
121
|
-
yearLow: number;
|
|
122
|
-
marketCap: number;
|
|
123
|
-
priceAvg50: number;
|
|
124
|
-
priceAvg200: number;
|
|
125
|
-
exchange: string;
|
|
126
|
-
volume: number;
|
|
127
|
-
avgVolume: number;
|
|
128
|
-
open: number;
|
|
129
|
-
previousClose: number;
|
|
130
|
-
eps: number;
|
|
131
|
-
pe: number;
|
|
132
|
-
earningsAnnouncement: string;
|
|
133
|
-
sharesOutstanding: number;
|
|
134
|
-
timestamp: number;
|
|
135
|
-
}
|
|
136
87
|
interface StockSplit {
|
|
137
88
|
date: string;
|
|
138
89
|
label: string;
|
|
@@ -185,9 +136,6 @@ interface CompaniesPriceListResponse<T> {
|
|
|
185
136
|
companiesPriceList: T[];
|
|
186
137
|
}
|
|
187
138
|
|
|
188
|
-
interface FinancialStatementsParams extends SymbolParams, PeriodParams {
|
|
189
|
-
limit?: number;
|
|
190
|
-
}
|
|
191
139
|
interface FinancialStatementBase {
|
|
192
140
|
date: string;
|
|
193
141
|
symbol: string;
|
|
@@ -600,63 +548,6 @@ interface EarningsSurprises {
|
|
|
600
548
|
estimatedEarning: number;
|
|
601
549
|
}
|
|
602
550
|
|
|
603
|
-
interface ForexHistoricalParams extends SymbolParams, DateRangeParams {
|
|
604
|
-
timeseries?: number;
|
|
605
|
-
}
|
|
606
|
-
interface ForexQuote {
|
|
607
|
-
symbol: string;
|
|
608
|
-
price: number;
|
|
609
|
-
changesPercentage: number;
|
|
610
|
-
change: number;
|
|
611
|
-
dayLow: number;
|
|
612
|
-
dayHigh: number;
|
|
613
|
-
yearLow: number;
|
|
614
|
-
yearHigh: number;
|
|
615
|
-
marketCap: number;
|
|
616
|
-
priceAvg50: number;
|
|
617
|
-
priceAvg200: number;
|
|
618
|
-
volume: number;
|
|
619
|
-
avgVolume: number;
|
|
620
|
-
exchange: string;
|
|
621
|
-
open: number;
|
|
622
|
-
previousClose: number;
|
|
623
|
-
eps: number;
|
|
624
|
-
pe: number;
|
|
625
|
-
earningsAnnouncement: string;
|
|
626
|
-
sharesOutstanding: number;
|
|
627
|
-
timestamp: number;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
interface CryptoHistoricalParams extends SymbolParams, DateRangeParams {
|
|
631
|
-
timeseries?: number;
|
|
632
|
-
}
|
|
633
|
-
interface CryptoListParams {
|
|
634
|
-
}
|
|
635
|
-
interface CryptoQuote {
|
|
636
|
-
symbol: string;
|
|
637
|
-
name: string;
|
|
638
|
-
price: number;
|
|
639
|
-
changesPercentage: number;
|
|
640
|
-
change: number;
|
|
641
|
-
dayLow: number;
|
|
642
|
-
dayHigh: number;
|
|
643
|
-
yearHigh: number;
|
|
644
|
-
yearLow: number;
|
|
645
|
-
marketCap: number;
|
|
646
|
-
priceAvg50: number;
|
|
647
|
-
priceAvg200: number;
|
|
648
|
-
volume: number;
|
|
649
|
-
avgVolume: number;
|
|
650
|
-
exchange: string;
|
|
651
|
-
open: number;
|
|
652
|
-
previousClose: number;
|
|
653
|
-
eps: number | null;
|
|
654
|
-
pe: number | null;
|
|
655
|
-
earningsAnnouncement: string | null;
|
|
656
|
-
sharesOutstanding: number;
|
|
657
|
-
timestamp: number;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
551
|
interface ETFHoldingDates {
|
|
661
552
|
date: string;
|
|
662
553
|
}
|
|
@@ -733,29 +624,6 @@ interface ETFStockExposure {
|
|
|
733
624
|
marketValue: number;
|
|
734
625
|
}
|
|
735
626
|
|
|
736
|
-
interface MutualFundQuote {
|
|
737
|
-
symbol: string;
|
|
738
|
-
price: number;
|
|
739
|
-
changesPercentage: number;
|
|
740
|
-
change: number;
|
|
741
|
-
dayLow: number;
|
|
742
|
-
dayHigh: number;
|
|
743
|
-
yearLow: number;
|
|
744
|
-
yearHigh: number;
|
|
745
|
-
marketCap: number;
|
|
746
|
-
priceAvg50: number;
|
|
747
|
-
priceAvg200: number;
|
|
748
|
-
volume: number;
|
|
749
|
-
avgVolume: number;
|
|
750
|
-
exchange: string;
|
|
751
|
-
open: number;
|
|
752
|
-
previousClose: number;
|
|
753
|
-
eps: number;
|
|
754
|
-
pe: number;
|
|
755
|
-
earningsAnnouncement: string;
|
|
756
|
-
sharesOutstanding: number;
|
|
757
|
-
timestamp: number;
|
|
758
|
-
}
|
|
759
627
|
interface MutualFundHolding {
|
|
760
628
|
holder: string;
|
|
761
629
|
shares: number;
|
|
@@ -784,11 +652,6 @@ interface TreasuryRate {
|
|
|
784
652
|
year30: number;
|
|
785
653
|
}
|
|
786
654
|
type EconomicIndicatorName = 'GDP' | 'realGDP' | 'nominalPotentialGDP' | 'realGDPPerCapita' | 'federalFunds' | 'CPI' | 'inflationRate' | 'inflation' | 'retailSales' | 'consumerSentiment' | 'durableGoods' | 'unemploymentRate' | 'totalNonfarmPayroll' | 'initialClaims' | 'industrialProductionTotalIndex' | 'newPrivatelyOwnedHousingUnitsStartedTotalUnits' | 'totalVehicleSales' | 'retailMoneyFunds' | 'smoothedUSRecessionProbabilities' | '3MonthOr90DayRatesAndYieldsCertificatesOfDeposit' | 'commercialBankInterestRateOnCreditCardPlansAllAccounts' | '30YearFixedRateMortgageAverage' | '15YearFixedRateMortgageAverage';
|
|
787
|
-
interface EconomicIndicatorParams {
|
|
788
|
-
name: EconomicIndicatorName;
|
|
789
|
-
from?: string;
|
|
790
|
-
to?: string;
|
|
791
|
-
}
|
|
792
655
|
|
|
793
656
|
interface MarketHours {
|
|
794
657
|
stockExchangeName: string;
|
|
@@ -853,7 +716,7 @@ interface MarketIndex {
|
|
|
853
716
|
interface EarningsCalendar {
|
|
854
717
|
date: string;
|
|
855
718
|
symbol: string;
|
|
856
|
-
eps: number;
|
|
719
|
+
eps: number | null;
|
|
857
720
|
epsEstimated: number | null;
|
|
858
721
|
time: string;
|
|
859
722
|
revenue: number | null;
|
|
@@ -1046,15 +909,6 @@ interface EarningsCallTranscript {
|
|
|
1046
909
|
}
|
|
1047
910
|
type CompanyTranscriptData = [number, number, string];
|
|
1048
911
|
|
|
1049
|
-
interface SenateHouseTradingParams {
|
|
1050
|
-
symbol: string;
|
|
1051
|
-
}
|
|
1052
|
-
interface SenateHouseTradingRSSFeedParams {
|
|
1053
|
-
page: number;
|
|
1054
|
-
}
|
|
1055
|
-
interface SenateHouseTradingByNameParams {
|
|
1056
|
-
name: string;
|
|
1057
|
-
}
|
|
1058
912
|
interface SenateTradingResponse {
|
|
1059
913
|
firstName: string;
|
|
1060
914
|
lastName: string;
|
|
@@ -1102,13 +956,225 @@ interface SenateHouseTradingByNameResponse {
|
|
|
1102
956
|
link: string;
|
|
1103
957
|
}
|
|
1104
958
|
|
|
959
|
+
interface Form13FResponse {
|
|
960
|
+
date: string;
|
|
961
|
+
fillingDate: string;
|
|
962
|
+
acceptedDate: string;
|
|
963
|
+
cik: string;
|
|
964
|
+
cusip: string;
|
|
965
|
+
tickerCusip: string;
|
|
966
|
+
nameOfIssuer: string;
|
|
967
|
+
shares: number;
|
|
968
|
+
titleOfClass: string;
|
|
969
|
+
value: number;
|
|
970
|
+
link: string;
|
|
971
|
+
finalLink: string;
|
|
972
|
+
}
|
|
973
|
+
interface InstitutionalHolderResponse {
|
|
974
|
+
holder: string;
|
|
975
|
+
shares: number;
|
|
976
|
+
dateReported: string;
|
|
977
|
+
change: number;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
interface InsiderTradingRSSResponse {
|
|
981
|
+
title: string;
|
|
982
|
+
fillingDate: string;
|
|
983
|
+
symbol: string;
|
|
984
|
+
link: string;
|
|
985
|
+
reportingCik: string;
|
|
986
|
+
issuerCik: string;
|
|
987
|
+
}
|
|
988
|
+
interface InsiderTradingSearchResponse {
|
|
989
|
+
symbol: string;
|
|
990
|
+
filingDate: string;
|
|
991
|
+
transactionDate: string;
|
|
992
|
+
reportingCik: string;
|
|
993
|
+
transactionType: string;
|
|
994
|
+
securitiesOwned: number;
|
|
995
|
+
securitiesTransacted: number;
|
|
996
|
+
companyCik: string;
|
|
997
|
+
reportingName: string;
|
|
998
|
+
typeOfOwner: string;
|
|
999
|
+
link: string;
|
|
1000
|
+
securityName: string;
|
|
1001
|
+
price: number;
|
|
1002
|
+
formType: string;
|
|
1003
|
+
acquistionOrDisposition: string;
|
|
1004
|
+
}
|
|
1005
|
+
type TransactionTypesResponse = string[];
|
|
1006
|
+
interface InsidersBySymbolResponse {
|
|
1007
|
+
typeOfOwner: string;
|
|
1008
|
+
transactionDate: string;
|
|
1009
|
+
owner: string;
|
|
1010
|
+
}
|
|
1011
|
+
interface InsiderTradeStatisticsResponse {
|
|
1012
|
+
symbol: string;
|
|
1013
|
+
cik: string;
|
|
1014
|
+
year: number;
|
|
1015
|
+
quarter: number;
|
|
1016
|
+
purchases: number;
|
|
1017
|
+
sales: number;
|
|
1018
|
+
buySellRatio: number;
|
|
1019
|
+
totalBought: number;
|
|
1020
|
+
totalSold: number;
|
|
1021
|
+
averageBought: number;
|
|
1022
|
+
averageSold: number;
|
|
1023
|
+
pPurchases: number;
|
|
1024
|
+
sSales: number;
|
|
1025
|
+
}
|
|
1026
|
+
interface CikMapperResponse {
|
|
1027
|
+
reportingCik: string;
|
|
1028
|
+
reportingName: string;
|
|
1029
|
+
}
|
|
1030
|
+
interface CikMapperBySymbolResponse {
|
|
1031
|
+
symbol: string;
|
|
1032
|
+
companyCik: string;
|
|
1033
|
+
}
|
|
1034
|
+
interface BeneficialOwnershipResponse {
|
|
1035
|
+
cik: string;
|
|
1036
|
+
symbol: string;
|
|
1037
|
+
filingDate: string;
|
|
1038
|
+
acceptedDate: string;
|
|
1039
|
+
cusip: string;
|
|
1040
|
+
nameOfReportingPerson: string;
|
|
1041
|
+
citizenshipOrPlaceOfOrganization: string;
|
|
1042
|
+
soleVotingPower: string;
|
|
1043
|
+
sharedVotingPower: string;
|
|
1044
|
+
soleDispositivePower: string;
|
|
1045
|
+
sharedDispositivePower: string;
|
|
1046
|
+
amountBeneficiallyOwned: string;
|
|
1047
|
+
percentOfClass: string;
|
|
1048
|
+
typeOfReportingPerson: string;
|
|
1049
|
+
url: string;
|
|
1050
|
+
}
|
|
1051
|
+
interface FailToDeliverResponse {
|
|
1052
|
+
symbol: string;
|
|
1053
|
+
date: string;
|
|
1054
|
+
price: number;
|
|
1055
|
+
quantity: number;
|
|
1056
|
+
cusip: string;
|
|
1057
|
+
name: string;
|
|
1058
|
+
}
|
|
1059
|
+
declare enum TransactionType {
|
|
1060
|
+
AWARD = "A-Award",
|
|
1061
|
+
CONVERSION = "C-Conversion",
|
|
1062
|
+
RETURN = "D-Return",
|
|
1063
|
+
EXPIRE_SHORT = "E-ExpireShort",
|
|
1064
|
+
IN_KIND = "F-InKind",
|
|
1065
|
+
GIFT = "G-Gift",
|
|
1066
|
+
EXPIRE_LONG = "H-ExpireLong",
|
|
1067
|
+
DISCRETIONARY = "I-Discretionary",
|
|
1068
|
+
OTHER = "J-Other",
|
|
1069
|
+
SMALL = "L-Small",
|
|
1070
|
+
EXEMPT = "M-Exempt",
|
|
1071
|
+
OUT_OF_THE_MONEY = "O-OutOfTheMoney",
|
|
1072
|
+
PURCHASE = "P-Purchase",
|
|
1073
|
+
SALE = "S-Sale",
|
|
1074
|
+
TENDER = "U-Tender",
|
|
1075
|
+
WILL = "W-Will",
|
|
1076
|
+
IN_THE_MONEY = "X-InTheMoney",
|
|
1077
|
+
TRUST = "Z-Trust"
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
interface RSSFeedItem {
|
|
1081
|
+
title: string;
|
|
1082
|
+
date: string;
|
|
1083
|
+
link: string;
|
|
1084
|
+
cik: string;
|
|
1085
|
+
form_type: string;
|
|
1086
|
+
ticker: string;
|
|
1087
|
+
done: boolean;
|
|
1088
|
+
}
|
|
1089
|
+
interface RSSFeedV3Item {
|
|
1090
|
+
title: string;
|
|
1091
|
+
date: string;
|
|
1092
|
+
link: string;
|
|
1093
|
+
cik: string;
|
|
1094
|
+
form_type: string;
|
|
1095
|
+
ticker: string;
|
|
1096
|
+
done: boolean;
|
|
1097
|
+
}
|
|
1098
|
+
interface RSSFeed8KItem {
|
|
1099
|
+
title: string;
|
|
1100
|
+
symbol: string;
|
|
1101
|
+
cik: string;
|
|
1102
|
+
link: string;
|
|
1103
|
+
finalLink: string;
|
|
1104
|
+
date: string;
|
|
1105
|
+
process: string;
|
|
1106
|
+
hasFinancials: string;
|
|
1107
|
+
}
|
|
1108
|
+
interface SECFiling {
|
|
1109
|
+
symbol: string;
|
|
1110
|
+
cik: string;
|
|
1111
|
+
type: string;
|
|
1112
|
+
link: string;
|
|
1113
|
+
finalLink: string;
|
|
1114
|
+
acceptedDate: string;
|
|
1115
|
+
fillingDate: string;
|
|
1116
|
+
}
|
|
1117
|
+
interface IndustryClassification {
|
|
1118
|
+
symbol: string;
|
|
1119
|
+
name: string;
|
|
1120
|
+
cik: string;
|
|
1121
|
+
sicCode: string;
|
|
1122
|
+
industryTitle: string;
|
|
1123
|
+
businessAdress: string;
|
|
1124
|
+
phoneNumber: string;
|
|
1125
|
+
}
|
|
1126
|
+
interface IndustryClassificationCode {
|
|
1127
|
+
office: string;
|
|
1128
|
+
sicCode: string;
|
|
1129
|
+
industryTitle: string;
|
|
1130
|
+
}
|
|
1131
|
+
interface RSSFeedParams {
|
|
1132
|
+
limit?: number;
|
|
1133
|
+
type?: string;
|
|
1134
|
+
from?: string;
|
|
1135
|
+
to?: string;
|
|
1136
|
+
isDone?: boolean;
|
|
1137
|
+
}
|
|
1138
|
+
interface RSSFeedV3Params {
|
|
1139
|
+
page?: number;
|
|
1140
|
+
datatype?: string;
|
|
1141
|
+
}
|
|
1142
|
+
interface RSSFeedAllItem {
|
|
1143
|
+
symbol: string;
|
|
1144
|
+
fillingDate: string;
|
|
1145
|
+
acceptedDate: string;
|
|
1146
|
+
cik: string;
|
|
1147
|
+
type: string;
|
|
1148
|
+
link: string;
|
|
1149
|
+
finalLink: string;
|
|
1150
|
+
}
|
|
1151
|
+
interface RSSFeed8KParams {
|
|
1152
|
+
page?: number;
|
|
1153
|
+
from?: string;
|
|
1154
|
+
to?: string;
|
|
1155
|
+
hasFinancial?: boolean;
|
|
1156
|
+
limit?: number;
|
|
1157
|
+
}
|
|
1158
|
+
interface SECFilingsParams {
|
|
1159
|
+
page?: number;
|
|
1160
|
+
type?: string;
|
|
1161
|
+
}
|
|
1162
|
+
interface IndividualIndustryClassificationParams {
|
|
1163
|
+
symbol?: string;
|
|
1164
|
+
cik?: number;
|
|
1165
|
+
sicCode?: number;
|
|
1166
|
+
}
|
|
1167
|
+
interface IndustryClassificationCodesParams {
|
|
1168
|
+
industryTitle?: string;
|
|
1169
|
+
sicCode?: number;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1105
1172
|
declare class FMPClient {
|
|
1106
1173
|
private v3Client;
|
|
1107
1174
|
private v4Client;
|
|
1108
1175
|
private stableClient;
|
|
1109
1176
|
private apiKey;
|
|
1110
1177
|
constructor(config: FMPConfig);
|
|
1111
|
-
private createClient;
|
|
1112
1178
|
/**
|
|
1113
1179
|
* Standard get method - returns raw API response
|
|
1114
1180
|
*
|
|
@@ -1129,372 +1195,1092 @@ declare class StockEndpoints {
|
|
|
1129
1195
|
private client;
|
|
1130
1196
|
constructor(client: FMPClient);
|
|
1131
1197
|
/**
|
|
1132
|
-
* Get
|
|
1133
|
-
*
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1198
|
+
* Get current market capitalization for a stock
|
|
1199
|
+
*
|
|
1200
|
+
* Market capitalization represents the total value of a company's outstanding shares.
|
|
1201
|
+
* Calculated by multiplying the current share price by the number of outstanding shares.
|
|
1202
|
+
* This metric is crucial for understanding a company's size and market position.
|
|
1203
|
+
*
|
|
1204
|
+
* @param symbol - The stock symbol to get market cap for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1205
|
+
*
|
|
1206
|
+
* @returns Promise resolving to market cap data including symbol, date, and market cap value
|
|
1207
|
+
*
|
|
1208
|
+
* @example
|
|
1209
|
+
* ```typescript
|
|
1210
|
+
* // Get market cap for Apple
|
|
1211
|
+
* const marketCap = await fmp.stock.getMarketCap('AAPL');
|
|
1212
|
+
* console.log(`Apple's market cap: $${marketCap.data.marketCap.toLocaleString()}`);
|
|
1213
|
+
*
|
|
1214
|
+
* // Get market cap for Microsoft
|
|
1215
|
+
* const msftCap = await fmp.stock.getMarketCap('MSFT');
|
|
1216
|
+
* ```
|
|
1217
|
+
*
|
|
1218
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#market-cap-company-information|FMP Market Cap Documentation}
|
|
1136
1219
|
*/
|
|
1137
|
-
|
|
1138
|
-
symbol: string;
|
|
1139
|
-
}): Promise<APIResponse<StockQuote>>;
|
|
1220
|
+
getMarketCap(symbol: string): Promise<APIResponse<MarketCap>>;
|
|
1140
1221
|
/**
|
|
1141
|
-
* Get historical stock
|
|
1142
|
-
*
|
|
1143
|
-
*
|
|
1144
|
-
*
|
|
1145
|
-
*
|
|
1146
|
-
*
|
|
1222
|
+
* Get historical stock splits for a company
|
|
1223
|
+
*
|
|
1224
|
+
* Stock splits occur when a company increases the number of shares by dividing existing shares.
|
|
1225
|
+
* This endpoint provides the complete history of stock splits including dates, ratios, and split types.
|
|
1226
|
+
* Useful for adjusting historical price data and understanding corporate actions.
|
|
1227
|
+
*
|
|
1228
|
+
* @param symbol - The stock symbol to get split history for (e.g., 'AAPL', 'TSLA', 'NVDA')
|
|
1229
|
+
*
|
|
1230
|
+
* @returns Promise resolving to historical stock splits with dates, labels, and split ratios
|
|
1231
|
+
*
|
|
1232
|
+
* @example
|
|
1233
|
+
* ```typescript
|
|
1234
|
+
* // Get Apple's split history
|
|
1235
|
+
* const splits = await fmp.stock.getStockSplits('AAPL');
|
|
1236
|
+
* splits.data.historical.forEach(split => {
|
|
1237
|
+
* console.log(`${split.date}: ${split.numerator}:${split.denominator} split`);
|
|
1238
|
+
* });
|
|
1239
|
+
*
|
|
1240
|
+
* // Get Tesla's split history
|
|
1241
|
+
* const teslaSplits = await fmp.stock.getStockSplits('TSLA');
|
|
1242
|
+
* ```
|
|
1243
|
+
*
|
|
1244
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#splits-historical-splits|FMP Stock Splits Documentation}
|
|
1147
1245
|
*/
|
|
1148
|
-
|
|
1149
|
-
symbol: string;
|
|
1150
|
-
from?: string;
|
|
1151
|
-
to?: string;
|
|
1152
|
-
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1246
|
+
getStockSplits(symbol: string): Promise<APIResponse<StockSplitResponse>>;
|
|
1153
1247
|
/**
|
|
1154
|
-
* Get
|
|
1155
|
-
*
|
|
1156
|
-
*
|
|
1157
|
-
*
|
|
1248
|
+
* Get historical dividend payments for a stock
|
|
1249
|
+
*
|
|
1250
|
+
* Dividends are periodic payments made by companies to shareholders from profits.
|
|
1251
|
+
* This endpoint provides the complete dividend history including payment dates, amounts,
|
|
1252
|
+
* and important dates like ex-dividend, record, and declaration dates.
|
|
1253
|
+
*
|
|
1254
|
+
* @param symbol - The stock symbol to get dividend history for (e.g., 'KO', 'JNJ', 'PG')
|
|
1255
|
+
*
|
|
1256
|
+
* @returns Promise resolving to dividend history with payment details and important dates
|
|
1257
|
+
*
|
|
1258
|
+
* @example
|
|
1259
|
+
* ```typescript
|
|
1260
|
+
* // Get Coca-Cola's dividend history
|
|
1261
|
+
* const dividends = await fmp.stock.getDividendHistory('KO');
|
|
1262
|
+
* dividends.data.historical.forEach(dividend => {
|
|
1263
|
+
* console.log(`${dividend.date}: $${dividend.dividend} per share`);
|
|
1264
|
+
* });
|
|
1265
|
+
*
|
|
1266
|
+
* // Get Johnson & Johnson's dividend history
|
|
1267
|
+
* const jnjDividends = await fmp.stock.getDividendHistory('JNJ');
|
|
1268
|
+
* ```
|
|
1269
|
+
*
|
|
1270
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#dividends-historical-dividends|FMP Dividends Documentation}
|
|
1158
1271
|
*/
|
|
1159
|
-
|
|
1160
|
-
symbol: string;
|
|
1161
|
-
}): Promise<APIResponse<MarketCap>>;
|
|
1272
|
+
getDividendHistory(symbol: string): Promise<APIResponse<StockDividendResponse>>;
|
|
1162
1273
|
/**
|
|
1163
|
-
* Get stock
|
|
1164
|
-
*
|
|
1165
|
-
*
|
|
1166
|
-
*
|
|
1274
|
+
* Get real-time stock prices for multiple symbols
|
|
1275
|
+
*
|
|
1276
|
+
* Provides current market prices for stocks with minimal data overhead.
|
|
1277
|
+
* Returns basic price information including symbol and current price.
|
|
1278
|
+
* Ideal for quick price checks and portfolio monitoring.
|
|
1279
|
+
*
|
|
1280
|
+
* @param symbols - Array of stock symbols to get real-time prices for
|
|
1281
|
+
*
|
|
1282
|
+
* @returns Promise resolving to array of real-time price data with symbol and price
|
|
1283
|
+
*
|
|
1284
|
+
* @example
|
|
1285
|
+
* ```typescript
|
|
1286
|
+
* // Get prices for multiple tech stocks
|
|
1287
|
+
* const prices = await fmp.stock.getRealTimePrice([
|
|
1288
|
+
* 'AAPL', 'MSFT', 'GOOGL', 'AMZN', 'TSLA'
|
|
1289
|
+
* ]);
|
|
1290
|
+
*
|
|
1291
|
+
* prices.data.forEach(stock => {
|
|
1292
|
+
* console.log(`${stock.symbol}: $${stock.price}`);
|
|
1293
|
+
* });
|
|
1294
|
+
*
|
|
1295
|
+
* // Get price for single stock
|
|
1296
|
+
* const aaplPrice = await fmp.stock.getRealTimePrice(['AAPL']);
|
|
1297
|
+
* ```
|
|
1167
1298
|
*/
|
|
1168
|
-
|
|
1169
|
-
symbol: string;
|
|
1170
|
-
}): Promise<APIResponse<StockSplitResponse>>;
|
|
1299
|
+
getRealTimePrice(symbols: string[]): Promise<APIResponse<StockRealTimePrice[]>>;
|
|
1171
1300
|
/**
|
|
1172
|
-
* Get
|
|
1173
|
-
*
|
|
1174
|
-
*
|
|
1175
|
-
*
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
*
|
|
1182
|
-
* @
|
|
1183
|
-
*
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
*
|
|
1190
|
-
*
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
1301
|
+
* Get comprehensive real-time stock data for multiple symbols
|
|
1302
|
+
*
|
|
1303
|
+
* Provides detailed real-time market data including bid/ask prices, volume, trade sizes,
|
|
1304
|
+
* and timestamps. This endpoint offers much more information than the basic real-time price.
|
|
1305
|
+
* Perfect for trading applications, market analysis, and detailed price monitoring.
|
|
1306
|
+
*
|
|
1307
|
+
* @param symbols - Array of stock symbols to get detailed real-time data for
|
|
1308
|
+
*
|
|
1309
|
+
* @returns Promise resolving to array of detailed real-time data including bid/ask, volume, and timestamps
|
|
1310
|
+
*
|
|
1311
|
+
* @example
|
|
1312
|
+
* ```typescript
|
|
1313
|
+
* // Get detailed data for multiple stocks
|
|
1314
|
+
* const detailedData = await fmp.stock.getRealTimePriceForMultipleStocks([
|
|
1315
|
+
* 'AAPL', 'MSFT', 'GOOGL'
|
|
1316
|
+
* ]);
|
|
1317
|
+
*
|
|
1318
|
+
* detailedData.data.forEach(stock => {
|
|
1319
|
+
* console.log(`${stock.symbol}:`);
|
|
1320
|
+
* console.log(` Bid: $${stock.bidPrice} (${stock.bidSize} shares)`);
|
|
1321
|
+
* console.log(` Ask: $${stock.askPrice} (${stock.askSize} shares)`);
|
|
1322
|
+
* console.log(` Last: $${stock.lastSalePrice} (${stock.lastSaleSize} shares)`);
|
|
1323
|
+
* console.log(` Volume: ${stock.volume.toLocaleString()}`);
|
|
1324
|
+
* });
|
|
1325
|
+
*
|
|
1326
|
+
* // Get detailed data for single stock
|
|
1327
|
+
* const aaplDetailed = await fmp.stock.getRealTimePriceForMultipleStocks(['AAPL']);
|
|
1328
|
+
* ```
|
|
1329
|
+
*
|
|
1330
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#real-time-full-price-quote|FMP Real-Time Full Price Documentation}
|
|
1193
1331
|
*/
|
|
1194
|
-
getRealTimePriceForMultipleStocks(
|
|
1195
|
-
symbols: string[];
|
|
1196
|
-
}): Promise<APIResponse<StockRealTimePriceFull[]>>;
|
|
1332
|
+
getRealTimePriceForMultipleStocks(symbols: string[]): Promise<APIResponse<StockRealTimePriceFull[]>>;
|
|
1197
1333
|
}
|
|
1198
1334
|
|
|
1199
1335
|
declare class FinancialEndpoints {
|
|
1200
1336
|
private client;
|
|
1201
1337
|
constructor(client: FMPClient);
|
|
1202
1338
|
/**
|
|
1203
|
-
* Get income statement
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1206
|
-
*
|
|
1207
|
-
*
|
|
1208
|
-
*
|
|
1339
|
+
* Get income statement data
|
|
1340
|
+
*
|
|
1341
|
+
* Provides comprehensive income statement data including revenue, expenses,
|
|
1342
|
+
* net income, and earnings per share. Essential for analyzing company
|
|
1343
|
+
* profitability, revenue trends, and financial performance over time.
|
|
1344
|
+
*
|
|
1345
|
+
* @param params - Income statement request parameters
|
|
1346
|
+
* @param params.symbol - The stock symbol to get income statement for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1347
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1348
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1349
|
+
*
|
|
1350
|
+
* @returns Promise resolving to array of income statement data with financial metrics
|
|
1351
|
+
*
|
|
1352
|
+
* @example
|
|
1353
|
+
* ```typescript
|
|
1354
|
+
* // Get annual income statements for Apple
|
|
1355
|
+
* const incomeStatements = await fmp.financial.getIncomeStatement({ symbol: 'AAPL' });
|
|
1356
|
+
* incomeStatements.data.forEach(statement => {
|
|
1357
|
+
* console.log(`${statement.date}: Revenue $${statement.revenue.toLocaleString()}, Net Income $${statement.netIncome.toLocaleString()}`);
|
|
1358
|
+
* });
|
|
1359
|
+
*
|
|
1360
|
+
* // Get quarterly income statements for Microsoft
|
|
1361
|
+
* const quarterlyIncome = await fmp.financial.getIncomeStatement({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1362
|
+
* ```
|
|
1363
|
+
*
|
|
1364
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#income-statements-financial-statements|FMP Income Statement Documentation}
|
|
1209
1365
|
*/
|
|
1210
|
-
getIncomeStatement(
|
|
1366
|
+
getIncomeStatement(params: {
|
|
1367
|
+
symbol: string;
|
|
1368
|
+
period?: 'annual' | 'quarter';
|
|
1369
|
+
limit?: number;
|
|
1370
|
+
}): Promise<APIResponse<IncomeStatement[]>>;
|
|
1211
1371
|
/**
|
|
1212
|
-
* Get balance sheet
|
|
1213
|
-
*
|
|
1214
|
-
*
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
1217
|
-
*
|
|
1372
|
+
* Get balance sheet data
|
|
1373
|
+
*
|
|
1374
|
+
* Provides comprehensive balance sheet data including assets, liabilities,
|
|
1375
|
+
* and shareholder equity. Essential for analyzing company financial position,
|
|
1376
|
+
* liquidity, and capital structure.
|
|
1377
|
+
*
|
|
1378
|
+
* @param params - Balance sheet request parameters
|
|
1379
|
+
* @param params.symbol - The stock symbol to get balance sheet for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1380
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1381
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1382
|
+
*
|
|
1383
|
+
* @returns Promise resolving to array of balance sheet data with financial position metrics
|
|
1384
|
+
*
|
|
1385
|
+
* @example
|
|
1386
|
+
* ```typescript
|
|
1387
|
+
* // Get annual balance sheets for Apple
|
|
1388
|
+
* const balanceSheets = await fmp.financial.getBalanceSheet({ symbol: 'AAPL' });
|
|
1389
|
+
* balanceSheets.data.forEach(sheet => {
|
|
1390
|
+
* console.log(`${sheet.date}: Assets $${sheet.totalAssets.toLocaleString()}, Equity $${sheet.totalStockholdersEquity.toLocaleString()}`);
|
|
1391
|
+
* });
|
|
1392
|
+
*
|
|
1393
|
+
* // Get quarterly balance sheets for Microsoft
|
|
1394
|
+
* const quarterlyBalance = await fmp.financial.getBalanceSheet({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1395
|
+
* ```
|
|
1396
|
+
*
|
|
1397
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#balance-sheet-statements-financial-statements|FMP Balance Sheet Documentation}
|
|
1218
1398
|
*/
|
|
1219
|
-
getBalanceSheet(
|
|
1399
|
+
getBalanceSheet(params: {
|
|
1400
|
+
symbol: string;
|
|
1401
|
+
period?: 'annual' | 'quarter';
|
|
1402
|
+
limit?: number;
|
|
1403
|
+
}): Promise<APIResponse<BalanceSheet[]>>;
|
|
1220
1404
|
/**
|
|
1221
|
-
* Get cash flow statement
|
|
1222
|
-
*
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1225
|
-
*
|
|
1226
|
-
*
|
|
1405
|
+
* Get cash flow statement data
|
|
1406
|
+
*
|
|
1407
|
+
* Provides comprehensive cash flow data including operating, investing,
|
|
1408
|
+
* and financing cash flows. Essential for analyzing company cash generation,
|
|
1409
|
+
* capital allocation, and financial sustainability.
|
|
1410
|
+
*
|
|
1411
|
+
* @param params - Cash flow statement request parameters
|
|
1412
|
+
* @param params.symbol - The stock symbol to get cash flow statement for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1413
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1414
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1415
|
+
*
|
|
1416
|
+
* @returns Promise resolving to array of cash flow statement data with cash flow metrics
|
|
1417
|
+
*
|
|
1418
|
+
* @example
|
|
1419
|
+
* ```typescript
|
|
1420
|
+
* // Get annual cash flow statements for Apple
|
|
1421
|
+
* const cashFlows = await fmp.financial.getCashFlowStatement({ symbol: 'AAPL' });
|
|
1422
|
+
* cashFlows.data.forEach(flow => {
|
|
1423
|
+
* console.log(`${flow.date}: Operating CF $${flow.operatingCashFlow.toLocaleString()}, Free CF $${flow.freeCashFlow.toLocaleString()}`);
|
|
1424
|
+
* });
|
|
1425
|
+
*
|
|
1426
|
+
* // Get quarterly cash flow statements for Microsoft
|
|
1427
|
+
* const quarterlyCashFlow = await fmp.financial.getCashFlowStatement({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1428
|
+
* ```
|
|
1429
|
+
*
|
|
1430
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#cashflow-statements-financial-statements|FMP Cash Flow Statement Documentation}
|
|
1227
1431
|
*/
|
|
1228
|
-
getCashFlowStatement(
|
|
1432
|
+
getCashFlowStatement(params: {
|
|
1433
|
+
symbol: string;
|
|
1434
|
+
period?: 'annual' | 'quarter';
|
|
1435
|
+
limit?: number;
|
|
1436
|
+
}): Promise<APIResponse<CashFlowStatement[]>>;
|
|
1229
1437
|
/**
|
|
1230
|
-
* Get key metrics
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1438
|
+
* Get key financial metrics
|
|
1439
|
+
*
|
|
1440
|
+
* Provides essential financial metrics including revenue, net income,
|
|
1441
|
+
* P/E ratio, and other key performance indicators. Essential for
|
|
1442
|
+
* fundamental analysis and company valuation.
|
|
1443
|
+
*
|
|
1444
|
+
* @param params - Key metrics request parameters
|
|
1445
|
+
* @param params.symbol - The stock symbol to get key metrics for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1446
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1447
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1448
|
+
*
|
|
1449
|
+
* @returns Promise resolving to array of key metrics data with financial indicators
|
|
1450
|
+
*
|
|
1451
|
+
* @example
|
|
1452
|
+
* ```typescript
|
|
1453
|
+
* // Get key metrics for Apple
|
|
1454
|
+
* const keyMetrics = await fmp.financial.getKeyMetrics({ symbol: 'AAPL' });
|
|
1455
|
+
* keyMetrics.data.forEach(metric => {
|
|
1456
|
+
* console.log(`${metric.date}: P/E ${metric.peRatio}, ROE ${metric.roe}%`);
|
|
1457
|
+
* });
|
|
1458
|
+
*
|
|
1459
|
+
* // Get quarterly key metrics for Microsoft
|
|
1460
|
+
* const quarterlyMetrics = await fmp.financial.getKeyMetrics({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1461
|
+
* ```
|
|
1462
|
+
*
|
|
1463
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#key-metrics-statement-analysis|FMP Key Metrics Documentation}
|
|
1236
1464
|
*/
|
|
1237
|
-
getKeyMetrics(
|
|
1465
|
+
getKeyMetrics(params: {
|
|
1466
|
+
symbol: string;
|
|
1467
|
+
period?: 'annual' | 'quarter';
|
|
1468
|
+
limit?: number;
|
|
1469
|
+
}): Promise<APIResponse<KeyMetrics[]>>;
|
|
1238
1470
|
/**
|
|
1239
1471
|
* Get financial ratios
|
|
1240
|
-
*
|
|
1241
|
-
*
|
|
1242
|
-
*
|
|
1243
|
-
*
|
|
1244
|
-
*
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
*
|
|
1249
|
-
*
|
|
1250
|
-
* @
|
|
1251
|
-
*
|
|
1252
|
-
* @
|
|
1253
|
-
*
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
*
|
|
1258
|
-
*
|
|
1259
|
-
*
|
|
1260
|
-
*
|
|
1261
|
-
*
|
|
1262
|
-
*
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
* @returns Get the income growth rate for a company. Measure how quickly a company's income is growing.
|
|
1272
|
-
*/
|
|
1273
|
-
getIncomeGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<IncomeGrowth[]>>;
|
|
1274
|
-
/**
|
|
1275
|
-
* Get balance sheet growth
|
|
1276
|
-
* https://site.financialmodelingprep.com/developer/docs#balance-sheet-growth-statement-analysis
|
|
1277
|
-
* @param symbol - The stock symbol to get the balance sheet growth for
|
|
1278
|
-
* @param period - The period to get the balance sheet growth for (annual or quarter)
|
|
1279
|
-
* @param limit - The number of periods to get
|
|
1280
|
-
* @returns Get the balance sheet growth rate for a company. Measure how quickly a company's assets and liabilities are growing.
|
|
1281
|
-
*/
|
|
1282
|
-
getBalanceSheetGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<BalanceSheetGrowth[]>>;
|
|
1283
|
-
/**
|
|
1284
|
-
* Get financial growth
|
|
1285
|
-
* https://site.financialmodelingprep.com/developer/docs#financial-growth-statement-analysis
|
|
1286
|
-
* @param symbol - The stock symbol to get the financial growth for
|
|
1287
|
-
* @param period - The period to get the financial growth for (annual or quarter)
|
|
1288
|
-
* @param limit - The number of periods to get
|
|
1289
|
-
* @returns Financial Growth Get the financial growth rate for a company. Measure how quickly a company's overall financial performance is improving.
|
|
1290
|
-
*/
|
|
1291
|
-
getFinancialGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<FinancialGrowth[]>>;
|
|
1292
|
-
/**
|
|
1293
|
-
* Get earnings historical
|
|
1294
|
-
* https://site.financialmodelingprep.com/developer/docs#earnings-historical-earnings
|
|
1295
|
-
* @param symbol - The stock symbol to get the earnings historical for
|
|
1296
|
-
* @param limit - The number of periods to get
|
|
1297
|
-
* @returns A list of historical & upcoming earnings announcements for a specific company, including the date, estimated EPS, and actual EPS.
|
|
1298
|
-
*/
|
|
1299
|
-
getEarningsHistorical({ symbol, limit, }: FinancialStatementsParams): Promise<APIResponse<EarningsHistorical[]>>;
|
|
1300
|
-
/**
|
|
1301
|
-
* Get earnings surprises
|
|
1302
|
-
* https://site.financialmodelingprep.com/developer/docs#earnings-surprises-earnings
|
|
1303
|
-
* @param symbol - The stock symbol to get the earnings surprises for
|
|
1304
|
-
* @param limit - The number of periods to get
|
|
1305
|
-
* @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.
|
|
1306
|
-
*/
|
|
1307
|
-
getEarningsSurprises({ symbol, }: FinancialStatementsParams): Promise<APIResponse<EarningsSurprises[]>>;
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
declare class ForexEndpoints {
|
|
1311
|
-
private client;
|
|
1312
|
-
constructor(client: FMPClient);
|
|
1472
|
+
*
|
|
1473
|
+
* Provides comprehensive financial ratios including P/B ratio, ROE,
|
|
1474
|
+
* debt-to-equity, and other important ratios. Essential for analyzing
|
|
1475
|
+
* company financial health and comparing with peers.
|
|
1476
|
+
*
|
|
1477
|
+
* @param params - Financial ratios request parameters
|
|
1478
|
+
* @param params.symbol - The stock symbol to get financial ratios for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1479
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1480
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1481
|
+
*
|
|
1482
|
+
* @returns Promise resolving to array of financial ratios data with ratio metrics
|
|
1483
|
+
*
|
|
1484
|
+
* @example
|
|
1485
|
+
* ```typescript
|
|
1486
|
+
* // Get financial ratios for Apple
|
|
1487
|
+
* const ratios = await fmp.financial.getFinancialRatios({ symbol: 'AAPL' });
|
|
1488
|
+
* ratios.data.forEach(ratio => {
|
|
1489
|
+
* console.log(`${ratio.date}: P/B ${ratio.priceToBookRatio}, Debt/Equity ${ratio.debtToEquity}`);
|
|
1490
|
+
* });
|
|
1491
|
+
*
|
|
1492
|
+
* // Get quarterly ratios for Microsoft
|
|
1493
|
+
* const quarterlyRatios = await fmp.financial.getFinancialRatios({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1494
|
+
* ```
|
|
1495
|
+
*
|
|
1496
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#ratios-statement-analysis|FMP Financial Ratios Documentation}
|
|
1497
|
+
*/
|
|
1498
|
+
getFinancialRatios(params: {
|
|
1499
|
+
symbol: string;
|
|
1500
|
+
period?: 'annual' | 'quarter';
|
|
1501
|
+
limit?: number;
|
|
1502
|
+
}): Promise<APIResponse<FinancialRatios[]>>;
|
|
1313
1503
|
/**
|
|
1314
|
-
* Get
|
|
1315
|
-
*
|
|
1316
|
-
*
|
|
1317
|
-
*
|
|
1504
|
+
* Get enterprise value data
|
|
1505
|
+
*
|
|
1506
|
+
* Provides enterprise value metrics including total enterprise value,
|
|
1507
|
+
* market cap, and debt information. Essential for company valuation
|
|
1508
|
+
* and comparing companies with different capital structures.
|
|
1509
|
+
*
|
|
1510
|
+
* @param params - Enterprise value request parameters
|
|
1511
|
+
* @param params.symbol - The stock symbol to get enterprise value for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1512
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1513
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1514
|
+
*
|
|
1515
|
+
* @returns Promise resolving to array of enterprise value data with valuation metrics
|
|
1516
|
+
*
|
|
1517
|
+
* @example
|
|
1518
|
+
* ```typescript
|
|
1519
|
+
* // Get enterprise value for Apple
|
|
1520
|
+
* const enterpriseValue = await fmp.financial.getEnterpriseValue({ symbol: 'AAPL' });
|
|
1521
|
+
* enterpriseValue.data.forEach(ev => {
|
|
1522
|
+
* console.log(`${ev.date}: EV $${ev.enterpriseValue.toLocaleString()}, Market Cap $${ev.marketCapitalization.toLocaleString()}`);
|
|
1523
|
+
* });
|
|
1524
|
+
*
|
|
1525
|
+
* // Get quarterly enterprise value for Microsoft
|
|
1526
|
+
* const quarterlyEV = await fmp.financial.getEnterpriseValue({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1527
|
+
* ```
|
|
1528
|
+
*
|
|
1529
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#enterprise-values-statement-analysis|FMP Enterprise Value Documentation}
|
|
1318
1530
|
*/
|
|
1319
|
-
|
|
1531
|
+
getEnterpriseValue(params: {
|
|
1532
|
+
symbol: string;
|
|
1533
|
+
period?: 'annual' | 'quarter';
|
|
1534
|
+
limit?: number;
|
|
1535
|
+
}): Promise<APIResponse<EnterpriseValue[]>>;
|
|
1320
1536
|
/**
|
|
1321
|
-
* Get
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
*
|
|
1537
|
+
* Get cash flow growth data
|
|
1538
|
+
*
|
|
1539
|
+
* Provides cash flow growth rates showing how quickly a company's
|
|
1540
|
+
* cash flows are growing over time. Essential for analyzing cash
|
|
1541
|
+
* generation trends and financial sustainability.
|
|
1542
|
+
*
|
|
1543
|
+
* @param params - Cash flow growth request parameters
|
|
1544
|
+
* @param params.symbol - The stock symbol to get cash flow growth for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1545
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1546
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1547
|
+
*
|
|
1548
|
+
* @returns Promise resolving to array of cash flow growth data with growth metrics
|
|
1549
|
+
*
|
|
1550
|
+
* @example
|
|
1551
|
+
* ```typescript
|
|
1552
|
+
* // Get cash flow growth for Apple
|
|
1553
|
+
* const cashFlowGrowth = await fmp.financial.getCashflowGrowth({ symbol: 'AAPL' });
|
|
1554
|
+
* cashFlowGrowth.data.forEach(growth => {
|
|
1555
|
+
* console.log(`${growth.date}: Operating CF Growth ${growth.operatingCashFlowGrowth}%`);
|
|
1556
|
+
* });
|
|
1557
|
+
*
|
|
1558
|
+
* // Get quarterly cash flow growth for Microsoft
|
|
1559
|
+
* const quarterlyGrowth = await fmp.financial.getCashflowGrowth({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1560
|
+
* ```
|
|
1561
|
+
*
|
|
1562
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#cashflow-growth-statement-analysis|FMP Cash Flow Growth Documentation}
|
|
1327
1563
|
*/
|
|
1328
|
-
|
|
1564
|
+
getCashflowGrowth(params: {
|
|
1329
1565
|
symbol: string;
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
}): Promise<APIResponse<
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1566
|
+
period?: 'annual' | 'quarter';
|
|
1567
|
+
limit?: number;
|
|
1568
|
+
}): Promise<APIResponse<CashflowGrowth[]>>;
|
|
1569
|
+
/**
|
|
1570
|
+
* Get income growth data
|
|
1571
|
+
*
|
|
1572
|
+
* Provides income growth rates showing how quickly a company's
|
|
1573
|
+
* revenue and net income are growing over time. Essential for
|
|
1574
|
+
* analyzing profitability trends and business momentum.
|
|
1575
|
+
*
|
|
1576
|
+
* @param params - Income growth request parameters
|
|
1577
|
+
* @param params.symbol - The stock symbol to get income growth for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1578
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1579
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1580
|
+
*
|
|
1581
|
+
* @returns Promise resolving to array of income growth data with growth metrics
|
|
1582
|
+
*
|
|
1583
|
+
* @example
|
|
1584
|
+
* ```typescript
|
|
1585
|
+
* // Get income growth for Apple
|
|
1586
|
+
* const incomeGrowth = await fmp.financial.getIncomeGrowth({ symbol: 'AAPL' });
|
|
1587
|
+
* incomeGrowth.data.forEach(growth => {
|
|
1588
|
+
* console.log(`${growth.date}: Revenue Growth ${growth.revenueGrowth}%, Net Income Growth ${growth.netIncomeGrowth}%`);
|
|
1589
|
+
* });
|
|
1590
|
+
*
|
|
1591
|
+
* // Get quarterly income growth for Microsoft
|
|
1592
|
+
* const quarterlyGrowth = await fmp.financial.getIncomeGrowth({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1593
|
+
* ```
|
|
1594
|
+
*
|
|
1595
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#income-growth-statement-analysis|FMP Income Growth Documentation}
|
|
1596
|
+
*/
|
|
1597
|
+
getIncomeGrowth(params: {
|
|
1598
|
+
symbol: string;
|
|
1599
|
+
period?: 'annual' | 'quarter';
|
|
1600
|
+
limit?: number;
|
|
1601
|
+
}): Promise<APIResponse<IncomeGrowth[]>>;
|
|
1338
1602
|
/**
|
|
1339
|
-
* Get
|
|
1340
|
-
*
|
|
1341
|
-
*
|
|
1342
|
-
*
|
|
1603
|
+
* Get balance sheet growth data
|
|
1604
|
+
*
|
|
1605
|
+
* Provides balance sheet growth rates showing how quickly a company's
|
|
1606
|
+
* assets, liabilities, and equity are growing over time. Essential for
|
|
1607
|
+
* analyzing capital structure trends and financial position changes.
|
|
1608
|
+
*
|
|
1609
|
+
* @param params - Balance sheet growth request parameters
|
|
1610
|
+
* @param params.symbol - The stock symbol to get balance sheet growth for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1611
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1612
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1613
|
+
*
|
|
1614
|
+
* @returns Promise resolving to array of balance sheet growth data with growth metrics
|
|
1615
|
+
*
|
|
1616
|
+
* @example
|
|
1617
|
+
* ```typescript
|
|
1618
|
+
* // Get balance sheet growth for Apple
|
|
1619
|
+
* const balanceSheetGrowth = await fmp.financial.getBalanceSheetGrowth({ symbol: 'AAPL' });
|
|
1620
|
+
* balanceSheetGrowth.data.forEach(growth => {
|
|
1621
|
+
* console.log(`${growth.date}: Assets Growth ${growth.totalAssetsGrowth}%, Equity Growth ${growth.totalStockholdersEquityGrowth}%`);
|
|
1622
|
+
* });
|
|
1623
|
+
*
|
|
1624
|
+
* // Get quarterly balance sheet growth for Microsoft
|
|
1625
|
+
* const quarterlyGrowth = await fmp.financial.getBalanceSheetGrowth({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1626
|
+
* ```
|
|
1627
|
+
*
|
|
1628
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#balance-sheet-growth-statement-analysis|FMP Balance Sheet Growth Documentation}
|
|
1343
1629
|
*/
|
|
1344
|
-
|
|
1630
|
+
getBalanceSheetGrowth(params: {
|
|
1345
1631
|
symbol: string;
|
|
1346
|
-
|
|
1632
|
+
period?: 'annual' | 'quarter';
|
|
1633
|
+
limit?: number;
|
|
1634
|
+
}): Promise<APIResponse<BalanceSheetGrowth[]>>;
|
|
1347
1635
|
/**
|
|
1348
|
-
* Get
|
|
1349
|
-
*
|
|
1350
|
-
*
|
|
1351
|
-
*
|
|
1352
|
-
*
|
|
1353
|
-
*
|
|
1636
|
+
* Get financial growth data
|
|
1637
|
+
*
|
|
1638
|
+
* Provides comprehensive financial growth rates across all key
|
|
1639
|
+
* financial metrics. Essential for analyzing overall financial
|
|
1640
|
+
* performance trends and business momentum.
|
|
1641
|
+
*
|
|
1642
|
+
* @param params - Financial growth request parameters
|
|
1643
|
+
* @param params.symbol - The stock symbol to get financial growth for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1644
|
+
* @param params.period - The reporting period: 'annual' or 'quarter' (default: 'annual')
|
|
1645
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1646
|
+
*
|
|
1647
|
+
* @returns Promise resolving to array of financial growth data with comprehensive growth metrics
|
|
1648
|
+
*
|
|
1649
|
+
* @example
|
|
1650
|
+
* ```typescript
|
|
1651
|
+
* // Get financial growth for Apple
|
|
1652
|
+
* const financialGrowth = await fmp.financial.getFinancialGrowth({ symbol: 'AAPL' });
|
|
1653
|
+
* financialGrowth.data.forEach(growth => {
|
|
1654
|
+
* console.log(`${growth.date}: Revenue Growth ${growth.revenueGrowth}%, EPS Growth ${growth.epsGrowth}%`);
|
|
1655
|
+
* });
|
|
1656
|
+
*
|
|
1657
|
+
* // Get quarterly financial growth for Microsoft
|
|
1658
|
+
* const quarterlyGrowth = await fmp.financial.getFinancialGrowth({ symbol: 'MSFT', period: 'quarter', limit: 8 });
|
|
1659
|
+
* ```
|
|
1660
|
+
*
|
|
1661
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#financial-growth-statement-analysis|FMP Financial Growth Documentation}
|
|
1354
1662
|
*/
|
|
1355
|
-
|
|
1663
|
+
getFinancialGrowth(params: {
|
|
1356
1664
|
symbol: string;
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
}): Promise<APIResponse<
|
|
1665
|
+
period?: 'annual' | 'quarter';
|
|
1666
|
+
limit?: number;
|
|
1667
|
+
}): Promise<APIResponse<FinancialGrowth[]>>;
|
|
1668
|
+
/**
|
|
1669
|
+
* Get historical earnings data
|
|
1670
|
+
*
|
|
1671
|
+
* Provides historical and upcoming earnings announcements including
|
|
1672
|
+
* dates, estimated EPS, and actual EPS. Essential for analyzing
|
|
1673
|
+
* earnings trends and tracking company performance.
|
|
1674
|
+
*
|
|
1675
|
+
* @param params - Earnings historical request parameters
|
|
1676
|
+
* @param params.symbol - The stock symbol to get earnings history for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1677
|
+
* @param params.limit - Number of periods to retrieve (default: 5)
|
|
1678
|
+
*
|
|
1679
|
+
* @returns Promise resolving to array of historical earnings data with announcement details
|
|
1680
|
+
*
|
|
1681
|
+
* @example
|
|
1682
|
+
* ```typescript
|
|
1683
|
+
* // Get earnings history for Apple
|
|
1684
|
+
* const earningsHistory = await fmp.financial.getEarningsHistorical({ symbol: 'AAPL', limit: 10 });
|
|
1685
|
+
* earningsHistory.data.forEach(earning => {
|
|
1686
|
+
* console.log(`${earning.date}: Est. ${earning.estimatedEps}, Actual ${earning.actualEps}`);
|
|
1687
|
+
* });
|
|
1688
|
+
*
|
|
1689
|
+
* // Get earnings history for Microsoft
|
|
1690
|
+
* const msftEarnings = await fmp.financial.getEarningsHistorical({ symbol: 'MSFT', limit: 8 });
|
|
1691
|
+
* ```
|
|
1692
|
+
*
|
|
1693
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#earnings-historical-earnings|FMP Earnings Historical Documentation}
|
|
1694
|
+
*/
|
|
1695
|
+
getEarningsHistorical(params: {
|
|
1696
|
+
symbol: string;
|
|
1697
|
+
limit?: number;
|
|
1698
|
+
}): Promise<APIResponse<EarningsHistorical[]>>;
|
|
1699
|
+
/**
|
|
1700
|
+
* Get earnings surprises data
|
|
1701
|
+
*
|
|
1702
|
+
* Provides earnings announcements that exceeded or fell short of
|
|
1703
|
+
* analyst estimates. Essential for analyzing earnings quality and
|
|
1704
|
+
* market reactions to earnings releases.
|
|
1705
|
+
*
|
|
1706
|
+
* @param symbol - The stock symbol to get earnings surprises for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1707
|
+
*
|
|
1708
|
+
* @returns Promise resolving to array of earnings surprises data with surprise details
|
|
1709
|
+
*
|
|
1710
|
+
* @example
|
|
1711
|
+
* ```typescript
|
|
1712
|
+
* // Get earnings surprises for Apple
|
|
1713
|
+
* const earningsSurprises = await fmp.financial.getEarningsSurprises('AAPL');
|
|
1714
|
+
* earningsSurprises.data.forEach(surprise => {
|
|
1715
|
+
* console.log(`${surprise.date}: Est. ${surprise.estimatedEps}, Actual ${surprise.actualEps}, Surprise ${surprise.surprisePercentage}%`);
|
|
1716
|
+
* });
|
|
1717
|
+
*
|
|
1718
|
+
* // Get earnings surprises for Microsoft
|
|
1719
|
+
* const msftSurprises = await fmp.financial.getEarningsSurprises('MSFT');
|
|
1720
|
+
* ```
|
|
1721
|
+
*
|
|
1722
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#earnings-surprises-earnings|FMP Earnings Surprises Documentation}
|
|
1723
|
+
*/
|
|
1724
|
+
getEarningsSurprises(symbol: string): Promise<APIResponse<EarningsSurprises[]>>;
|
|
1360
1725
|
}
|
|
1361
1726
|
|
|
1362
1727
|
declare class ETFEndpoints {
|
|
1363
1728
|
private client;
|
|
1364
1729
|
constructor(client: FMPClient);
|
|
1365
1730
|
/**
|
|
1366
|
-
* Get ETF holding dates
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1731
|
+
* Get available ETF holding dates
|
|
1732
|
+
*
|
|
1733
|
+
* Provides a list of dates when ETF holdings are updated and available.
|
|
1734
|
+
* Useful for determining when the most recent holdings data is available
|
|
1735
|
+
* and ensuring you're working with current portfolio information.
|
|
1736
|
+
*
|
|
1737
|
+
* @param symbol - ETF symbol to get holding dates for (e.g., 'SPY', 'VOO', 'QQQ')
|
|
1738
|
+
*
|
|
1739
|
+
* @returns Promise resolving to array of available holding dates
|
|
1740
|
+
*
|
|
1741
|
+
* @example
|
|
1742
|
+
* ```typescript
|
|
1743
|
+
* // Get holding dates for specific ETF
|
|
1744
|
+
* const spyDates = await fmp.etf.getHoldingDates('SPY');
|
|
1745
|
+
* spyDates.data.forEach(date => {
|
|
1746
|
+
* console.log(`Holdings available: ${date.date}`);
|
|
1747
|
+
* });
|
|
1748
|
+
*
|
|
1749
|
+
* // Get VOO holding dates
|
|
1750
|
+
* const vooDates = await fmp.etf.getHoldingDates('VOO');
|
|
1751
|
+
* ```
|
|
1752
|
+
*
|
|
1753
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#etf-holding-dates-etf-holdings|FMP ETF Holding Dates Documentation}
|
|
1370
1754
|
*/
|
|
1371
|
-
getHoldingDates(
|
|
1755
|
+
getHoldingDates(symbol: string): Promise<APIResponse<ETFHoldingDates[]>>;
|
|
1372
1756
|
/**
|
|
1373
|
-
* Get ETF holdings
|
|
1374
|
-
*
|
|
1375
|
-
*
|
|
1376
|
-
*
|
|
1377
|
-
*
|
|
1757
|
+
* Get ETF holdings for specific date
|
|
1758
|
+
*
|
|
1759
|
+
* Provides detailed holdings information for an ETF on a specific date.
|
|
1760
|
+
* Includes individual stocks, their weights, shares held, and market values.
|
|
1761
|
+
* Essential for understanding ETF composition and portfolio analysis.
|
|
1762
|
+
*
|
|
1763
|
+
* @param params - ETF holdings request parameters
|
|
1764
|
+
* @param params.symbol - The ETF symbol to get holdings for (e.g., 'SPY', 'VOO', 'QQQ')
|
|
1765
|
+
* @param params.date - The date to get holdings for in YYYY-MM-DD format
|
|
1766
|
+
*
|
|
1767
|
+
* @returns Promise resolving to array of ETF holdings with detailed stock information
|
|
1768
|
+
*
|
|
1769
|
+
* @example
|
|
1770
|
+
* ```typescript
|
|
1771
|
+
* // Get SPY holdings for specific date
|
|
1772
|
+
* const holdings = await fmp.etf.getHoldings({ symbol: 'SPY', date: '2024-01-15' });
|
|
1773
|
+
* holdings.data.forEach(holding => {
|
|
1774
|
+
* console.log(`${holding.asset}: ${holding.weight}% (${holding.sharesNumber} shares)`);
|
|
1775
|
+
* });
|
|
1776
|
+
*
|
|
1777
|
+
* // Get VOO holdings
|
|
1778
|
+
* const vooHoldings = await fmp.etf.getHoldings({ symbol: 'VOO', date: '2024-01-15' });
|
|
1779
|
+
* ```
|
|
1780
|
+
*
|
|
1781
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#etf-holdings-etf-holdings|FMP ETF Holdings Documentation}
|
|
1378
1782
|
*/
|
|
1379
|
-
getHoldings(
|
|
1783
|
+
getHoldings(params: {
|
|
1380
1784
|
symbol: string;
|
|
1381
1785
|
date: string;
|
|
1382
1786
|
}): Promise<APIResponse<ETFHolding[]>>;
|
|
1383
1787
|
/**
|
|
1384
|
-
* Get ETF
|
|
1385
|
-
*
|
|
1386
|
-
*
|
|
1387
|
-
*
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1393
|
-
*
|
|
1394
|
-
* @
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
*
|
|
1399
|
-
*
|
|
1400
|
-
*
|
|
1401
|
-
*
|
|
1788
|
+
* Get ETF holdings and components
|
|
1789
|
+
*
|
|
1790
|
+
* Provides all stocks held by a specific ETF including assets, share numbers,
|
|
1791
|
+
* and weight percentages. Essential for understanding ETF composition and
|
|
1792
|
+
* finding which ETFs hold specific stocks.
|
|
1793
|
+
*
|
|
1794
|
+
* @param symbol - The ETF symbol to get holdings for (e.g., 'SPY', 'VOO', 'QQQ')
|
|
1795
|
+
*
|
|
1796
|
+
* @returns Promise resolving to array of ETF holdings with stock details
|
|
1797
|
+
*
|
|
1798
|
+
* @example
|
|
1799
|
+
* ```typescript
|
|
1800
|
+
* // Get SPY holdings
|
|
1801
|
+
* const spyHoldings = await fmp.etf.getHolder('SPY');
|
|
1802
|
+
* spyHoldings.data.forEach(holding => {
|
|
1803
|
+
* console.log(`${holding.asset}: ${holding.weight}% (${holding.sharesNumber} shares)`);
|
|
1804
|
+
* });
|
|
1805
|
+
*
|
|
1806
|
+
* // Get VOO holdings
|
|
1807
|
+
* const vooHoldings = await fmp.etf.getHolder('VOO');
|
|
1808
|
+
* ```
|
|
1809
|
+
*
|
|
1810
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#etf-holder-etf-holdings|FMP ETF Holder Documentation}
|
|
1402
1811
|
*/
|
|
1403
|
-
|
|
1812
|
+
getHolder(symbol: string): Promise<APIResponse<ETFHolder[]>>;
|
|
1404
1813
|
/**
|
|
1405
|
-
* Get ETF
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1408
|
-
*
|
|
1814
|
+
* Get ETF profile and information
|
|
1815
|
+
*
|
|
1816
|
+
* Provides comprehensive information about an ETF including ticker symbol,
|
|
1817
|
+
* name, expense ratio, assets under management, and other key metrics.
|
|
1818
|
+
* Essential for ETF comparison and due diligence.
|
|
1819
|
+
*
|
|
1820
|
+
* @param symbol - ETF symbol to get profile for (e.g., 'SPY', 'VOO', 'QQQ')
|
|
1821
|
+
*
|
|
1822
|
+
* @returns Promise resolving to ETF profile with detailed information
|
|
1823
|
+
*
|
|
1824
|
+
* @example
|
|
1825
|
+
* ```typescript
|
|
1826
|
+
* // Get SPY profile
|
|
1827
|
+
* const spyProfile = await fmp.etf.getProfile('SPY');
|
|
1828
|
+
* console.log(`SPY AUM: $${spyProfile.data.aum.toLocaleString()}`);
|
|
1829
|
+
* console.log(`Expense Ratio: ${spyProfile.data.expenseRatio}%`);
|
|
1830
|
+
*
|
|
1831
|
+
* // Get VOO profile
|
|
1832
|
+
* const vooProfile = await fmp.etf.getProfile('VOO');
|
|
1833
|
+
* ```
|
|
1834
|
+
*
|
|
1835
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#etf-information-etf-holdings|FMP ETF Information Documentation}
|
|
1409
1836
|
*/
|
|
1410
|
-
|
|
1837
|
+
getProfile(symbol: string): Promise<APIResponse<ETFProfile>>;
|
|
1411
1838
|
/**
|
|
1412
|
-
* Get ETF
|
|
1413
|
-
*
|
|
1414
|
-
*
|
|
1415
|
-
*
|
|
1839
|
+
* Get ETF sector weighting and exposure
|
|
1840
|
+
*
|
|
1841
|
+
* Provides a breakdown of an ETF's sector allocation showing the percentage
|
|
1842
|
+
* of assets invested in each sector. Essential for understanding sector
|
|
1843
|
+
* exposure and diversification analysis.
|
|
1844
|
+
*
|
|
1845
|
+
* @param symbol - The ETF symbol to get sector weighting for (e.g., 'SPY', 'VOO', 'QQQ')
|
|
1846
|
+
*
|
|
1847
|
+
* @returns Promise resolving to array of sector weightings with percentage allocations
|
|
1848
|
+
*
|
|
1849
|
+
* @example
|
|
1850
|
+
* ```typescript
|
|
1851
|
+
* // Get SPY sector weightings
|
|
1852
|
+
* const sectorWeightings = await fmp.etf.getSectorWeighting('SPY');
|
|
1853
|
+
* sectorWeightings.data.forEach(sector => {
|
|
1854
|
+
* console.log(`${sector.sector}: ${sector.weight}%`);
|
|
1855
|
+
* });
|
|
1856
|
+
*
|
|
1857
|
+
* // Get QQQ sector exposure (tech-heavy)
|
|
1858
|
+
* const qqqSectors = await fmp.etf.getSectorWeighting('QQQ');
|
|
1859
|
+
* ```
|
|
1860
|
+
*
|
|
1861
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#etf-sector-weighting-etf-holdings|FMP ETF Sector Weighting Documentation}
|
|
1416
1862
|
*/
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
declare class MutualFundEndpoints {
|
|
1421
|
-
private client;
|
|
1422
|
-
constructor(client: FMPClient);
|
|
1863
|
+
getSectorWeighting(symbol: string): Promise<APIResponse<ETFWeighting[]>>;
|
|
1423
1864
|
/**
|
|
1424
|
-
* Get
|
|
1425
|
-
*
|
|
1426
|
-
*
|
|
1427
|
-
*
|
|
1865
|
+
* Get ETF country weighting and exposure
|
|
1866
|
+
*
|
|
1867
|
+
* Provides a breakdown of an ETF's geographic allocation showing the percentage
|
|
1868
|
+
* of assets invested in each country. Essential for understanding international
|
|
1869
|
+
* exposure and geographic diversification.
|
|
1870
|
+
*
|
|
1871
|
+
* @param symbol - The ETF symbol to get country weighting for (e.g., 'SPY', 'VOO', 'EFA')
|
|
1872
|
+
*
|
|
1873
|
+
* @returns Promise resolving to array of country weightings with percentage allocations
|
|
1874
|
+
*
|
|
1875
|
+
* @example
|
|
1876
|
+
* ```typescript
|
|
1877
|
+
* // Get SPY country weightings
|
|
1878
|
+
* const countryWeightings = await fmp.etf.getCountryWeighting('SPY');
|
|
1879
|
+
* countryWeightings.data.forEach(country => {
|
|
1880
|
+
* console.log(`${country.country}: ${country.weight}%`);
|
|
1881
|
+
* });
|
|
1882
|
+
*
|
|
1883
|
+
* // Get international ETF exposure
|
|
1884
|
+
* const efaCountries = await fmp.etf.getCountryWeighting('EFA');
|
|
1885
|
+
* ```
|
|
1886
|
+
*
|
|
1887
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#etf-country-weighting-etf-holdings|FMP ETF Country Weighting Documentation}
|
|
1428
1888
|
*/
|
|
1429
|
-
|
|
1889
|
+
getCountryWeighting(symbol: string): Promise<APIResponse<ETFCountryWeighting[]>>;
|
|
1430
1890
|
/**
|
|
1431
|
-
* Get
|
|
1432
|
-
*
|
|
1433
|
-
*
|
|
1434
|
-
*
|
|
1891
|
+
* Get ETF stock exposure and holdings
|
|
1892
|
+
*
|
|
1893
|
+
* Provides detailed exposure information for a specific stock across all ETFs
|
|
1894
|
+
* that hold it. Includes market value, share numbers, and weight percentages.
|
|
1895
|
+
* Useful for finding which ETFs have exposure to specific stocks.
|
|
1896
|
+
*
|
|
1897
|
+
* @param symbol - The stock symbol to get ETF exposure for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
1898
|
+
*
|
|
1899
|
+
* @returns Promise resolving to array of ETF exposures with detailed holding information
|
|
1900
|
+
*
|
|
1901
|
+
* @example
|
|
1902
|
+
* ```typescript
|
|
1903
|
+
* // Find ETFs that hold Apple
|
|
1904
|
+
* const appleExposure = await fmp.etf.getStockExposure('AAPL');
|
|
1905
|
+
* appleExposure.data.forEach(etf => {
|
|
1906
|
+
* console.log(`${etf.etfSymbol}: ${etf.weight}% (${etf.sharesNumber} shares)`);
|
|
1907
|
+
* });
|
|
1908
|
+
*
|
|
1909
|
+
* // Find ETFs that hold Microsoft
|
|
1910
|
+
* const msftExposure = await fmp.etf.getStockExposure('MSFT');
|
|
1911
|
+
* ```
|
|
1912
|
+
*
|
|
1913
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#etf-sector-exposure-etf-holdings|FMP ETF Stock Exposure Documentation}
|
|
1435
1914
|
*/
|
|
1436
|
-
|
|
1915
|
+
getStockExposure(symbol: string): Promise<APIResponse<ETFStockExposure[]>>;
|
|
1437
1916
|
}
|
|
1438
1917
|
|
|
1439
1918
|
declare class EconomicEndpoints {
|
|
1440
1919
|
private client;
|
|
1441
1920
|
constructor(client: FMPClient);
|
|
1442
1921
|
/**
|
|
1443
|
-
* Get treasury rates
|
|
1444
|
-
*
|
|
1445
|
-
*
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1922
|
+
* Get treasury rates data
|
|
1923
|
+
*
|
|
1924
|
+
* Provides historical treasury rates for various maturities including
|
|
1925
|
+
* 1-month, 3-month, 6-month, 1-year, 2-year, 3-year, 5-year, 7-year,
|
|
1926
|
+
* 10-year, 20-year, and 30-year treasury bonds. Essential for analyzing
|
|
1927
|
+
* interest rate trends, yield curves, and fixed income investments.
|
|
1928
|
+
*
|
|
1929
|
+
* @param params - Treasury rates request parameters
|
|
1930
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to 1 year ago)
|
|
1931
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to today)
|
|
1932
|
+
*
|
|
1933
|
+
* @returns Promise resolving to array of treasury rates data with yield information
|
|
1934
|
+
*
|
|
1935
|
+
* @example
|
|
1936
|
+
* ```typescript
|
|
1937
|
+
* // Get treasury rates for the last year
|
|
1938
|
+
* const treasuryRates = await fmp.economic.getTreasuryRates({
|
|
1939
|
+
* from: '2023-01-01',
|
|
1940
|
+
* to: '2023-12-31'
|
|
1941
|
+
* });
|
|
1942
|
+
* treasuryRates.data.forEach(rate => {
|
|
1943
|
+
* console.log(`${rate.date}: 10Y ${rate.tenY}%, 2Y ${rate.twoY}%`);
|
|
1944
|
+
* });
|
|
1945
|
+
*
|
|
1946
|
+
* // Get recent treasury rates
|
|
1947
|
+
* const recentRates = await fmp.economic.getTreasuryRates({
|
|
1948
|
+
* from: '2024-01-01'
|
|
1949
|
+
* });
|
|
1950
|
+
* ```
|
|
1951
|
+
*
|
|
1952
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#treasury-rates-economics-data|FMP Treasury Rates Documentation}
|
|
1448
1953
|
*/
|
|
1449
|
-
getTreasuryRates(params:
|
|
1954
|
+
getTreasuryRates(params: {
|
|
1955
|
+
from?: string;
|
|
1956
|
+
to?: string;
|
|
1957
|
+
}): Promise<APIResponse<TreasuryRate[]>>;
|
|
1450
1958
|
/**
|
|
1451
|
-
* Get economic indicators
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1959
|
+
* Get economic indicators data
|
|
1960
|
+
*
|
|
1961
|
+
* Provides real-time and historical economic data for a wide variety of
|
|
1962
|
+
* economic indicators including GDP, unemployment, inflation, retail sales,
|
|
1963
|
+
* and many others. Essential for macroeconomic analysis and understanding
|
|
1964
|
+
* economic trends and cycles.
|
|
1965
|
+
*
|
|
1966
|
+
* @param params - Economic indicators request parameters
|
|
1967
|
+
* @param params.name - The economic indicator to retrieve
|
|
1968
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to 1 year ago)
|
|
1969
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to today)
|
|
1970
|
+
*
|
|
1971
|
+
* @returns Promise resolving to array of economic indicator data with historical values
|
|
1972
|
+
*
|
|
1973
|
+
* @example
|
|
1974
|
+
* ```typescript
|
|
1975
|
+
* // Get GDP data for the last year
|
|
1976
|
+
* const gdpData = await fmp.economic.getEconomicIndicators({
|
|
1977
|
+
* name: 'GDP',
|
|
1978
|
+
* from: '2023-01-01',
|
|
1979
|
+
* to: '2023-12-31'
|
|
1980
|
+
* });
|
|
1981
|
+
* gdpData.data.forEach(gdp => {
|
|
1982
|
+
* console.log(`${gdp.date}: GDP $${gdp.value.toLocaleString()} billion`);
|
|
1983
|
+
* });
|
|
1984
|
+
*
|
|
1985
|
+
* // Get unemployment rate data
|
|
1986
|
+
* const unemploymentData = await fmp.economic.getEconomicIndicators({
|
|
1987
|
+
* name: 'unemploymentRate',
|
|
1988
|
+
* from: '2024-01-01'
|
|
1989
|
+
* });
|
|
1990
|
+
*
|
|
1991
|
+
* // Get inflation rate data
|
|
1992
|
+
* const inflationData = await fmp.economic.getEconomicIndicators({
|
|
1993
|
+
* name: 'inflationRate',
|
|
1994
|
+
* from: '2023-01-01',
|
|
1995
|
+
* to: '2023-12-31'
|
|
1996
|
+
* });
|
|
1997
|
+
* ```
|
|
1998
|
+
*
|
|
1999
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#economic-indicators-economics-data|FMP Economic Indicators Documentation}
|
|
1457
2000
|
*/
|
|
1458
|
-
getEconomicIndicators(params:
|
|
2001
|
+
getEconomicIndicators(params: {
|
|
2002
|
+
name: 'GDP' | 'realGDP' | 'nominalPotentialGDP' | 'realGDPPerCapita' | 'federalFunds' | 'CPI' | 'inflationRate' | 'inflation' | 'retailSales' | 'consumerSentiment' | 'durableGoods' | 'unemploymentRate' | 'totalNonfarmPayroll' | 'initialClaims' | 'industrialProductionTotalIndex' | 'newPrivatelyOwnedHousingUnitsStartedTotalUnits' | 'totalVehicleSales' | 'retailMoneyFunds' | 'smoothedUSRecessionProbabilities' | '3MonthOr90DayRatesAndYieldsCertificatesOfDeposit' | 'commercialBankInterestRateOnCreditCardPlansAllAccounts' | '30YearFixedRateMortgageAverage' | '15YearFixedRateMortgageAverage';
|
|
2003
|
+
from?: string;
|
|
2004
|
+
to?: string;
|
|
2005
|
+
}): Promise<APIResponse<EconomicIndicator[]>>;
|
|
1459
2006
|
}
|
|
1460
2007
|
|
|
1461
2008
|
declare class MarketEndpoints {
|
|
1462
2009
|
private client;
|
|
1463
2010
|
constructor(client: FMPClient);
|
|
1464
2011
|
/**
|
|
1465
|
-
* Get market hours
|
|
2012
|
+
* Get current market hours and trading status
|
|
2013
|
+
*
|
|
2014
|
+
* Provides real-time information about market trading hours, including
|
|
2015
|
+
* whether markets are currently open or closed, trading session times,
|
|
2016
|
+
* and upcoming market holidays. Essential for determining trading
|
|
2017
|
+
* availability and market status.
|
|
2018
|
+
*
|
|
2019
|
+
* @returns Promise resolving to market hours data with trading status and session information
|
|
2020
|
+
*
|
|
2021
|
+
* @example
|
|
2022
|
+
* ```typescript
|
|
2023
|
+
* // Get current market status
|
|
2024
|
+
* const marketHours = await fmp.market.getMarketHours();
|
|
2025
|
+
* console.log(`Market is ${marketHours.data.isTheStockMarketOpen ? 'OPEN' : 'CLOSED'}`);
|
|
2026
|
+
* console.log(`Current time: ${marketHours.data.currentTime}`);
|
|
2027
|
+
* console.log(`Next trading day: ${marketHours.data.nextTradingDay}`);
|
|
2028
|
+
*
|
|
2029
|
+
* // Check if it's a trading day
|
|
2030
|
+
* if (marketHours.data.isTheStockMarketOpen) {
|
|
2031
|
+
* console.log('Markets are currently open for trading');
|
|
2032
|
+
* } else {
|
|
2033
|
+
* console.log('Markets are closed');
|
|
2034
|
+
* }
|
|
2035
|
+
* ```
|
|
2036
|
+
*
|
|
2037
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#market-hours|FMP Market Hours Documentation}
|
|
1466
2038
|
*/
|
|
1467
2039
|
getMarketHours(): Promise<APIResponse<MarketHours>>;
|
|
1468
2040
|
/**
|
|
1469
|
-
* Get market performance
|
|
2041
|
+
* Get overall market performance data
|
|
2042
|
+
*
|
|
2043
|
+
* Provides comprehensive market performance data including major indices,
|
|
2044
|
+
* market breadth, and key performance metrics. Essential for understanding
|
|
2045
|
+
* overall market sentiment, trends, and daily market activity.
|
|
2046
|
+
*
|
|
2047
|
+
* @returns Promise resolving to array of market performance data with indices and metrics
|
|
2048
|
+
*
|
|
2049
|
+
* @example
|
|
2050
|
+
* ```typescript
|
|
2051
|
+
* // Get overall market performance
|
|
2052
|
+
* const marketPerformance = await fmp.market.getMarketPerformance();
|
|
2053
|
+
* marketPerformance.data.forEach(market => {
|
|
2054
|
+
* console.log(`${market.index}: ${market.change} (${market.changesPercentage}%)`);
|
|
2055
|
+
* console.log(` Open: $${market.open}, High: $${market.dayHigh}, Low: $${market.dayLow}`);
|
|
2056
|
+
* });
|
|
2057
|
+
*
|
|
2058
|
+
* // Find specific indices
|
|
2059
|
+
* const sp500 = marketPerformance.data.find(market => market.index === 'S&P 500');
|
|
2060
|
+
* console.log(`S&P 500 performance: ${sp500?.changesPercentage}%`);
|
|
2061
|
+
*
|
|
2062
|
+
* // Check market sentiment
|
|
2063
|
+
* const gainers = marketPerformance.data.filter(market => market.changesPercentage > 0);
|
|
2064
|
+
* const losers = marketPerformance.data.filter(market => market.changesPercentage < 0);
|
|
2065
|
+
* console.log(`Gaining indices: ${gainers.length}, Losing indices: ${losers.length}`);
|
|
2066
|
+
* ```
|
|
2067
|
+
*
|
|
2068
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#market-performance|FMP Market Performance Documentation}
|
|
1470
2069
|
*/
|
|
1471
2070
|
getMarketPerformance(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1472
2071
|
/**
|
|
1473
|
-
* Get top
|
|
1474
|
-
*
|
|
1475
|
-
*
|
|
2072
|
+
* Get top gaining stocks for the current trading day
|
|
2073
|
+
*
|
|
2074
|
+
* Provides a list of stocks that have gained the most value during the
|
|
2075
|
+
* current trading session. Essential for identifying momentum stocks,
|
|
2076
|
+
* tracking market movers, and discovering potential investment opportunities.
|
|
2077
|
+
* Useful for day trading, momentum strategies, and market analysis.
|
|
2078
|
+
*
|
|
2079
|
+
* @returns Promise resolving to array of top gaining stocks with price and percentage change data
|
|
2080
|
+
*
|
|
2081
|
+
* @example
|
|
2082
|
+
* ```typescript
|
|
2083
|
+
* // Get top gainers for the day
|
|
2084
|
+
* const gainers = await fmp.market.getGainers();
|
|
2085
|
+
* console.log(`Top ${gainers.data.length} gaining stocks today:`);
|
|
2086
|
+
*
|
|
2087
|
+
* gainers.data.forEach((stock, index) => {
|
|
2088
|
+
* console.log(`${index + 1}. ${stock.symbol} (${stock.name})`);
|
|
2089
|
+
* console.log(` Price: $${stock.price} | Change: +${stock.change} (${stock.changesPercentage}%)`);
|
|
2090
|
+
* console.log(` Volume: ${stock.volume.toLocaleString()}`);
|
|
2091
|
+
* });
|
|
2092
|
+
*
|
|
2093
|
+
* // Find stocks with >10% gains
|
|
2094
|
+
* const bigGainers = gainers.data.filter(stock => stock.changesPercentage > 10);
|
|
2095
|
+
* console.log(`Stocks with >10% gains: ${bigGainers.length}`);
|
|
2096
|
+
*
|
|
2097
|
+
* // Check volume leaders among gainers
|
|
2098
|
+
* const highVolumeGainers = gainers.data.filter(stock => stock.volume > 1000000);
|
|
2099
|
+
* console.log(`High volume gainers (>1M shares): ${highVolumeGainers.length}`);
|
|
2100
|
+
* ```
|
|
2101
|
+
*
|
|
2102
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#market-biggest-gainers-market-overview|FMP Market Biggest Gainers Documentation}
|
|
1476
2103
|
*/
|
|
1477
2104
|
getGainers(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1478
2105
|
/**
|
|
1479
|
-
* Get top
|
|
1480
|
-
*
|
|
1481
|
-
*
|
|
2106
|
+
* Get top losing stocks for the current trading day
|
|
2107
|
+
*
|
|
2108
|
+
* Provides a list of stocks that have lost the most value during the
|
|
2109
|
+
* current trading session. Essential for identifying underperforming stocks,
|
|
2110
|
+
* tracking market decliners, and discovering potential contrarian opportunities.
|
|
2111
|
+
* Useful for risk management, short selling strategies, and market analysis.
|
|
2112
|
+
*
|
|
2113
|
+
* @returns Promise resolving to array of top losing stocks with price and percentage change data
|
|
2114
|
+
*
|
|
2115
|
+
* @example
|
|
2116
|
+
* ```typescript
|
|
2117
|
+
* // Get top losers for the day
|
|
2118
|
+
* const losers = await fmp.market.getLosers();
|
|
2119
|
+
* console.log(`Top ${losers.data.length} losing stocks today:`);
|
|
2120
|
+
*
|
|
2121
|
+
* losers.data.forEach((stock, index) => {
|
|
2122
|
+
* console.log(`${index + 1}. ${stock.symbol} (${stock.name})`);
|
|
2123
|
+
* console.log(` Price: $${stock.price} | Change: ${stock.change} (${stock.changesPercentage}%)`);
|
|
2124
|
+
* console.log(` Volume: ${stock.volume.toLocaleString()}`);
|
|
2125
|
+
* });
|
|
2126
|
+
*
|
|
2127
|
+
* // Find stocks with >10% losses
|
|
2128
|
+
* const bigLosers = losers.data.filter(stock => stock.changesPercentage < -10);
|
|
2129
|
+
* console.log(`Stocks with >10% losses: ${bigLosers.length}`);
|
|
2130
|
+
*
|
|
2131
|
+
* // Check for potential oversold conditions
|
|
2132
|
+
* const highVolumeLosers = losers.data.filter(stock => stock.volume > 1000000);
|
|
2133
|
+
* console.log(`High volume losers (>1M shares): ${highVolumeLosers.length}`);
|
|
2134
|
+
*
|
|
2135
|
+
* // Look for potential bounce candidates
|
|
2136
|
+
* const oversoldStocks = losers.data.filter(stock =>
|
|
2137
|
+
* stock.changesPercentage < -5 && stock.volume > 500000
|
|
2138
|
+
* );
|
|
2139
|
+
* ```
|
|
2140
|
+
*
|
|
2141
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#market-biggest-losers-market-overview|FMP Market Biggest Losers Documentation}
|
|
1482
2142
|
*/
|
|
1483
2143
|
getLosers(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1484
2144
|
/**
|
|
1485
|
-
* Get most
|
|
2145
|
+
* Get most actively traded stocks for the current trading day
|
|
2146
|
+
*
|
|
2147
|
+
* Provides a list of stocks with the highest trading volume during the
|
|
2148
|
+
* current trading session. Essential for identifying stocks with high
|
|
2149
|
+
* liquidity, tracking market interest, and discovering stocks with
|
|
2150
|
+
* significant trading activity. Useful for day trading and liquidity analysis.
|
|
2151
|
+
*
|
|
2152
|
+
* @returns Promise resolving to array of most active stocks with volume and price data
|
|
2153
|
+
*
|
|
2154
|
+
* @example
|
|
2155
|
+
* ```typescript
|
|
2156
|
+
* // Get most active stocks for the day
|
|
2157
|
+
* const mostActive = await fmp.market.getMostActive();
|
|
2158
|
+
* console.log(`Top ${mostActive.data.length} most active stocks today:`);
|
|
2159
|
+
*
|
|
2160
|
+
* mostActive.data.forEach((stock, index) => {
|
|
2161
|
+
* console.log(`${index + 1}. ${stock.symbol} (${stock.name})`);
|
|
2162
|
+
* console.log(` Volume: ${stock.volume.toLocaleString()} shares`);
|
|
2163
|
+
* console.log(` Price: $${stock.price} | Change: ${stock.change} (${stock.changesPercentage}%)`);
|
|
2164
|
+
* console.log(` Avg Volume: ${stock.avgVolume?.toLocaleString() || 'N/A'}`);
|
|
2165
|
+
* });
|
|
2166
|
+
*
|
|
2167
|
+
* // Find stocks with unusual volume (>2x average)
|
|
2168
|
+
* const unusualVolume = mostActive.data.filter(stock =>
|
|
2169
|
+
* stock.avgVolume && stock.volume > stock.avgVolume * 2
|
|
2170
|
+
* );
|
|
2171
|
+
* console.log(`Stocks with unusual volume: ${unusualVolume.length}`);
|
|
2172
|
+
*
|
|
2173
|
+
* // Check for high volume gainers
|
|
2174
|
+
* const highVolumeGainers = mostActive.data.filter(stock =>
|
|
2175
|
+
* stock.changesPercentage > 0 && stock.volume > 1000000
|
|
2176
|
+
* );
|
|
2177
|
+
* console.log(`High volume gainers: ${highVolumeGainers.length}`);
|
|
2178
|
+
*
|
|
2179
|
+
* // Find penny stocks with high volume
|
|
2180
|
+
* const pennyStocks = mostActive.data.filter(stock =>
|
|
2181
|
+
* stock.price < 5 && stock.volume > 500000
|
|
2182
|
+
* );
|
|
2183
|
+
* ```
|
|
2184
|
+
*
|
|
2185
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#market-most-actives|FMP Market Most Actives Documentation}
|
|
1486
2186
|
*/
|
|
1487
2187
|
getMostActive(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1488
2188
|
/**
|
|
1489
|
-
* Get sector performance
|
|
1490
|
-
*
|
|
1491
|
-
*
|
|
2189
|
+
* Get sector performance data for the current trading day
|
|
2190
|
+
*
|
|
2191
|
+
* Provides performance data for all major market sectors including
|
|
2192
|
+
* technology, healthcare, financials, energy, and others. Essential for
|
|
2193
|
+
* sector rotation analysis, identifying leading/lagging sectors, and
|
|
2194
|
+
* understanding market breadth and sector-specific trends.
|
|
2195
|
+
*
|
|
2196
|
+
* @returns Promise resolving to array of sector performance data with percentage changes
|
|
2197
|
+
*
|
|
2198
|
+
* @example
|
|
2199
|
+
* ```typescript
|
|
2200
|
+
* // Get sector performance for the day
|
|
2201
|
+
* const sectorPerformance = await fmp.market.getSectorPerformance();
|
|
2202
|
+
* console.log(`Sector performance for ${sectorPerformance.data.length} sectors:`);
|
|
2203
|
+
*
|
|
2204
|
+
* sectorPerformance.data.forEach(sector => {
|
|
2205
|
+
* const changeColor = sector.changesPercentage >= 0 ? 'green' : 'red';
|
|
2206
|
+
* console.log(`${sector.sector}: ${sector.changesPercentage}%`);
|
|
2207
|
+
* console.log(` Change: ${sector.changesPercentage >= 0 ? '+' : ''}${sector.changesPercentage}%`);
|
|
2208
|
+
* });
|
|
2209
|
+
*
|
|
2210
|
+
* // Find best performing sectors
|
|
2211
|
+
* const topSectors = sectorPerformance.data
|
|
2212
|
+
* .sort((a, b) => b.changesPercentage - a.changesPercentage)
|
|
2213
|
+
* .slice(0, 3);
|
|
2214
|
+
* console.log('Top 3 performing sectors:');
|
|
2215
|
+
* topSectors.forEach((sector, index) => {
|
|
2216
|
+
* console.log(`${index + 1}. ${sector.sector}: ${sector.changesPercentage}%`);
|
|
2217
|
+
* });
|
|
2218
|
+
*
|
|
2219
|
+
* // Find worst performing sectors
|
|
2220
|
+
* const bottomSectors = sectorPerformance.data
|
|
2221
|
+
* .sort((a, b) => a.changesPercentage - b.changesPercentage)
|
|
2222
|
+
* .slice(0, 3);
|
|
2223
|
+
* console.log('Bottom 3 performing sectors:');
|
|
2224
|
+
* bottomSectors.forEach((sector, index) => {
|
|
2225
|
+
* console.log(`${index + 1}. ${sector.sector}: ${sector.changesPercentage}%`);
|
|
2226
|
+
* });
|
|
2227
|
+
*
|
|
2228
|
+
* // Check for sector rotation
|
|
2229
|
+
* const gainingSectors = sectorPerformance.data.filter(sector => sector.changesPercentage > 0);
|
|
2230
|
+
* const losingSectors = sectorPerformance.data.filter(sector => sector.changesPercentage < 0);
|
|
2231
|
+
* console.log(`Sectors gaining: ${gainingSectors.length}, Sectors losing: ${losingSectors.length}`);
|
|
2232
|
+
* ```
|
|
2233
|
+
*
|
|
2234
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#sector-performance-market-overview|FMP Sector Performance Documentation}
|
|
1492
2235
|
*/
|
|
1493
2236
|
getSectorPerformance(): Promise<APIResponse<MarketSectorPerformance[]>>;
|
|
1494
2237
|
/**
|
|
1495
|
-
* Get market indices
|
|
1496
|
-
*
|
|
1497
|
-
*
|
|
2238
|
+
* Get real-time data for major market indices
|
|
2239
|
+
*
|
|
2240
|
+
* Provides real-time quote data for all major stock market indices including
|
|
2241
|
+
* S&P 500, Dow Jones Industrial Average, NASDAQ Composite, and other global
|
|
2242
|
+
* indices. Essential for tracking overall market performance, understanding
|
|
2243
|
+
* market sentiment, and identifying broad market trends.
|
|
2244
|
+
*
|
|
2245
|
+
* @returns Promise resolving to array of market index data with real-time quotes
|
|
2246
|
+
*
|
|
2247
|
+
* @example
|
|
2248
|
+
* ```typescript
|
|
2249
|
+
* // Get real-time market indices
|
|
2250
|
+
* const marketIndices = await fmp.market.getMarketIndex();
|
|
2251
|
+
* console.log(`Real-time data for ${marketIndices.data.length} major indices:`);
|
|
2252
|
+
*
|
|
2253
|
+
* marketIndices.data.forEach(index => {
|
|
2254
|
+
* console.log(`${index.symbol} (${index.name}):`);
|
|
2255
|
+
* console.log(` Price: $${index.price}`);
|
|
2256
|
+
* console.log(` Change: ${index.change} (${index.changesPercentage}%)`);
|
|
2257
|
+
* console.log(` Day Range: $${index.dayLow} - $${index.dayHigh}`);
|
|
2258
|
+
* console.log(` Volume: ${index.volume?.toLocaleString() || 'N/A'}`);
|
|
2259
|
+
* });
|
|
2260
|
+
*
|
|
2261
|
+
* // Find specific major indices
|
|
2262
|
+
* const sp500 = marketIndices.data.find(index => index.symbol === '^GSPC');
|
|
2263
|
+
* const nasdaq = marketIndices.data.find(index => index.symbol === '^IXIC');
|
|
2264
|
+
* const dowJones = marketIndices.data.find(index => index.symbol === '^DJI');
|
|
2265
|
+
*
|
|
2266
|
+
* console.log(`S&P 500: ${sp500?.price} (${sp500?.changesPercentage}%)`);
|
|
2267
|
+
* console.log(`NASDAQ: ${nasdaq?.price} (${nasdaq?.changesPercentage}%)`);
|
|
2268
|
+
* console.log(`Dow Jones: ${dowJones?.price} (${dowJones?.changesPercentage}%)`);
|
|
2269
|
+
*
|
|
2270
|
+
* // Check market breadth
|
|
2271
|
+
* const gainingIndices = marketIndices.data.filter(index => index.changesPercentage > 0);
|
|
2272
|
+
* const losingIndices = marketIndices.data.filter(index => index.changesPercentage < 0);
|
|
2273
|
+
* console.log(`Indices gaining: ${gainingIndices.length}, Indices losing: ${losingIndices.length}`);
|
|
2274
|
+
*
|
|
2275
|
+
* // Find international indices
|
|
2276
|
+
* const internationalIndices = marketIndices.data.filter(index =>
|
|
2277
|
+
* !index.symbol.startsWith('^') ||
|
|
2278
|
+
* index.name.toLowerCase().includes('europe') ||
|
|
2279
|
+
* index.name.toLowerCase().includes('asia')
|
|
2280
|
+
* );
|
|
2281
|
+
* ```
|
|
2282
|
+
*
|
|
2283
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#market-index-market-overview|FMP Market Index Documentation}
|
|
1498
2284
|
*/
|
|
1499
2285
|
getMarketIndex(): Promise<APIResponse<MarketIndex[]>>;
|
|
1500
2286
|
}
|
|
@@ -1503,241 +2289,1764 @@ declare class ListEndpoints {
|
|
|
1503
2289
|
private client;
|
|
1504
2290
|
constructor(client: FMPClient);
|
|
1505
2291
|
/**
|
|
1506
|
-
* Get
|
|
1507
|
-
*
|
|
1508
|
-
*
|
|
2292
|
+
* Get comprehensive list of all available stocks
|
|
2293
|
+
*
|
|
2294
|
+
* Provides a complete list of all stocks available on major exchanges including
|
|
2295
|
+
* NYSE, NASDAQ, and other global markets. Essential for discovering available
|
|
2296
|
+
* symbols, building watchlists, or creating stock screening applications.
|
|
2297
|
+
*
|
|
2298
|
+
* @returns Promise resolving to array of stock data with symbol, name, exchange, and price information
|
|
2299
|
+
*
|
|
2300
|
+
* @example
|
|
2301
|
+
* ```typescript
|
|
2302
|
+
* // Get all available stocks
|
|
2303
|
+
* const stocks = await fmp.list.getStockList();
|
|
2304
|
+
* console.log(`Total stocks available: ${stocks.data.length}`);
|
|
2305
|
+
*
|
|
2306
|
+
* // Find specific stocks
|
|
2307
|
+
* const appleStock = stocks.data.find(stock => stock.symbol === 'AAPL');
|
|
2308
|
+
* console.log(`Apple: ${appleStock?.name} (${appleStock?.exchange})`);
|
|
2309
|
+
*
|
|
2310
|
+
* // Filter by exchange
|
|
2311
|
+
* const nasdaqStocks = stocks.data.filter(stock => stock.exchange === 'NASDAQ');
|
|
2312
|
+
* console.log(`NASDAQ stocks: ${nasdaqStocks.length}`);
|
|
2313
|
+
* ```
|
|
2314
|
+
*
|
|
2315
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#symbol-list-stock-list|FMP Stock List Documentation}
|
|
1509
2316
|
*/
|
|
1510
2317
|
getStockList(): Promise<APIResponse<StockList[]>>;
|
|
1511
2318
|
/**
|
|
1512
|
-
* Get
|
|
1513
|
-
*
|
|
1514
|
-
*
|
|
2319
|
+
* Get comprehensive list of all available ETFs
|
|
2320
|
+
*
|
|
2321
|
+
* Provides a complete list of all Exchange-Traded Funds (ETFs) available for trading.
|
|
2322
|
+
* Includes ETFs from various asset classes including equity, bond, commodity, and
|
|
2323
|
+
* sector-specific funds. Essential for ETF research and portfolio construction.
|
|
2324
|
+
*
|
|
2325
|
+
* @returns Promise resolving to array of ETF data with symbol, name, exchange, and asset class information
|
|
2326
|
+
*
|
|
2327
|
+
* @example
|
|
2328
|
+
* ```typescript
|
|
2329
|
+
* // Get all available ETFs
|
|
2330
|
+
* const etfs = await fmp.list.getETFList();
|
|
2331
|
+
* console.log(`Total ETFs available: ${etfs.data.length}`);
|
|
2332
|
+
*
|
|
2333
|
+
* // Find specific ETFs
|
|
2334
|
+
* const spyETF = etfs.data.find(etf => etf.symbol === 'SPY');
|
|
2335
|
+
* console.log(`SPY: ${spyETF?.name} (${spyETF?.assetClass})`);
|
|
2336
|
+
*
|
|
2337
|
+
* // Filter by asset class
|
|
2338
|
+
* const equityETFs = etfs.data.filter(etf => etf.assetClass === 'Equity');
|
|
2339
|
+
* console.log(`Equity ETFs: ${equityETFs.length}`);
|
|
2340
|
+
*
|
|
2341
|
+
* // Find sector ETFs
|
|
2342
|
+
* const techETFs = etfs.data.filter(etf =>
|
|
2343
|
+
* etf.name.toLowerCase().includes('technology') ||
|
|
2344
|
+
* etf.name.toLowerCase().includes('tech')
|
|
2345
|
+
* );
|
|
2346
|
+
* ```
|
|
2347
|
+
*
|
|
2348
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#exchange-traded-fund-search-stock-list|FMP ETF List Documentation}
|
|
1515
2349
|
*/
|
|
1516
2350
|
getETFList(): Promise<APIResponse<ETFList[]>>;
|
|
1517
2351
|
/**
|
|
1518
|
-
* Get
|
|
1519
|
-
*
|
|
1520
|
-
*
|
|
2352
|
+
* Get comprehensive list of all available cryptocurrencies
|
|
2353
|
+
*
|
|
2354
|
+
* Provides a complete list of all cryptocurrencies available for trading.
|
|
2355
|
+
* Includes major cryptocurrencies like Bitcoin, Ethereum, and thousands of altcoins
|
|
2356
|
+
* with their trading pairs against USD and other major currencies.
|
|
2357
|
+
*
|
|
2358
|
+
* @returns Promise resolving to array of cryptocurrency data with symbol, name, and exchange information
|
|
2359
|
+
*
|
|
2360
|
+
* @example
|
|
2361
|
+
* ```typescript
|
|
2362
|
+
* // Get all available cryptocurrencies
|
|
2363
|
+
* const cryptos = await fmp.list.getCryptoList();
|
|
2364
|
+
* console.log(`Total cryptocurrencies available: ${cryptos.data.length}`);
|
|
2365
|
+
*
|
|
2366
|
+
* // Find major cryptocurrencies
|
|
2367
|
+
* const bitcoin = cryptos.data.find(crypto => crypto.symbol === 'BTCUSD');
|
|
2368
|
+
* console.log(`Bitcoin: ${bitcoin?.name} (${bitcoin?.exchange})`);
|
|
2369
|
+
*
|
|
2370
|
+
* const ethereum = cryptos.data.find(crypto => crypto.symbol === 'ETHUSD');
|
|
2371
|
+
* console.log(`Ethereum: ${ethereum?.name} (${ethereum?.exchange})`);
|
|
2372
|
+
*
|
|
2373
|
+
* // Filter by exchange
|
|
2374
|
+
* const binanceCryptos = cryptos.data.filter(crypto => crypto.exchange === 'Binance');
|
|
2375
|
+
* console.log(`Binance cryptocurrencies: ${binanceCryptos.length}`);
|
|
2376
|
+
*
|
|
2377
|
+
* // Find altcoins
|
|
2378
|
+
* const altcoins = cryptos.data.filter(crypto =>
|
|
2379
|
+
* !['BTCUSD', 'ETHUSD', 'USDTUSD', 'USDCUSD'].includes(crypto.symbol)
|
|
2380
|
+
* );
|
|
2381
|
+
* ```
|
|
2382
|
+
*
|
|
2383
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#cryptocurrencies-list-crypto|FMP Cryptocurrency List Documentation}
|
|
1521
2384
|
*/
|
|
1522
2385
|
getCryptoList(): Promise<APIResponse<CryptoList[]>>;
|
|
1523
2386
|
/**
|
|
1524
|
-
* Get forex
|
|
1525
|
-
*
|
|
1526
|
-
*
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
*
|
|
1531
|
-
*
|
|
1532
|
-
* @
|
|
1533
|
-
|
|
1534
|
-
|
|
2387
|
+
* Get comprehensive list of all available forex currency pairs
|
|
2388
|
+
*
|
|
2389
|
+
* Provides a complete list of all foreign exchange currency pairs available for trading.
|
|
2390
|
+
* Includes major, minor, and exotic currency pairs with their base and quote currencies.
|
|
2391
|
+
* Essential for forex trading, currency analysis, and international market research.
|
|
2392
|
+
*
|
|
2393
|
+
* @returns Promise resolving to array of forex data with currency pair symbols and exchange information
|
|
2394
|
+
*
|
|
2395
|
+
* @example
|
|
2396
|
+
* ```typescript
|
|
2397
|
+
* // Get all available forex pairs
|
|
2398
|
+
* const forexPairs = await fmp.list.getForexList();
|
|
2399
|
+
* console.log(`Total forex pairs available: ${forexPairs.data.length}`);
|
|
2400
|
+
*
|
|
2401
|
+
* // Find major currency pairs
|
|
2402
|
+
* const eurUsd = forexPairs.data.find(pair => pair.symbol === 'EURUSD');
|
|
2403
|
+
* console.log(`EUR/USD: ${eurUsd?.name} (${eurUsd?.exchange})`);
|
|
2404
|
+
*
|
|
2405
|
+
* const gbpUsd = forexPairs.data.find(pair => pair.symbol === 'GBPUSD');
|
|
2406
|
+
* console.log(`GBP/USD: ${gbpUsd?.name} (${gbpUsd?.exchange})`);
|
|
2407
|
+
*
|
|
2408
|
+
* // Filter major pairs (USD as quote currency)
|
|
2409
|
+
* const majorPairs = forexPairs.data.filter(pair =>
|
|
2410
|
+
* pair.symbol.endsWith('USD') && pair.symbol.length === 6
|
|
2411
|
+
* );
|
|
2412
|
+
* console.log(`Major pairs: ${majorPairs.length}`);
|
|
2413
|
+
*
|
|
2414
|
+
* // Find exotic pairs
|
|
2415
|
+
* const exoticPairs = forexPairs.data.filter(pair =>
|
|
2416
|
+
* pair.symbol.includes('ZAR') || pair.symbol.includes('TRY') || pair.symbol.includes('BRL')
|
|
2417
|
+
* );
|
|
2418
|
+
* ```
|
|
2419
|
+
*
|
|
2420
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#forex-list-forex|FMP Forex List Documentation}
|
|
2421
|
+
*/
|
|
2422
|
+
getForexList(): Promise<APIResponse<ForexList[]>>;
|
|
2423
|
+
/**
|
|
2424
|
+
* Get comprehensive list of all available market indexes
|
|
2425
|
+
*
|
|
2426
|
+
* Provides a complete list of all market indexes available for tracking and analysis.
|
|
2427
|
+
* Includes major global indexes like S&P 500, NASDAQ, Dow Jones, as well as
|
|
2428
|
+
* international indexes, sector indexes, and specialized market benchmarks.
|
|
2429
|
+
*
|
|
2430
|
+
* @returns Promise resolving to array of index data with symbol, name, and exchange information
|
|
2431
|
+
*
|
|
2432
|
+
* @example
|
|
2433
|
+
* ```typescript
|
|
2434
|
+
* // Get all available indexes
|
|
2435
|
+
* const indexes = await fmp.list.getAvailableIndexes();
|
|
2436
|
+
* console.log(`Total indexes available: ${indexes.data.length}`);
|
|
2437
|
+
*
|
|
2438
|
+
* // Find major US indexes
|
|
2439
|
+
* const sp500 = indexes.data.find(index => index.symbol === '^GSPC');
|
|
2440
|
+
* console.log(`S&P 500: ${sp500?.name} (${sp500?.exchange})`);
|
|
2441
|
+
*
|
|
2442
|
+
* const nasdaq = indexes.data.find(index => index.symbol === '^IXIC');
|
|
2443
|
+
* console.log(`NASDAQ: ${nasdaq?.name} (${nasdaq?.exchange})`);
|
|
2444
|
+
*
|
|
2445
|
+
* const dowJones = indexes.data.find(index => index.symbol === '^DJI');
|
|
2446
|
+
* console.log(`Dow Jones: ${dowJones?.name} (${dowJones?.exchange})`);
|
|
2447
|
+
*
|
|
2448
|
+
* // Filter by exchange
|
|
2449
|
+
* const nyseIndexes = indexes.data.filter(index => index.exchange === 'NYSE');
|
|
2450
|
+
* console.log(`NYSE indexes: ${nyseIndexes.length}`);
|
|
2451
|
+
*
|
|
2452
|
+
* // Find sector indexes
|
|
2453
|
+
* const techIndexes = indexes.data.filter(index =>
|
|
2454
|
+
* index.name.toLowerCase().includes('technology') ||
|
|
2455
|
+
* index.name.toLowerCase().includes('tech')
|
|
2456
|
+
* );
|
|
2457
|
+
* ```
|
|
2458
|
+
*
|
|
2459
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#available-indexes|FMP Available Indexes Documentation}
|
|
2460
|
+
*/
|
|
2461
|
+
getAvailableIndexes(): Promise<APIResponse<AvailableIndexesList[]>>;
|
|
1535
2462
|
}
|
|
1536
2463
|
|
|
1537
2464
|
declare class CalendarEndpoints {
|
|
1538
2465
|
private client;
|
|
1539
2466
|
constructor(client: FMPClient);
|
|
1540
2467
|
/**
|
|
1541
|
-
* Get earnings calendar
|
|
1542
|
-
*
|
|
1543
|
-
*
|
|
1544
|
-
*
|
|
1545
|
-
*
|
|
2468
|
+
* Get earnings calendar data
|
|
2469
|
+
*
|
|
2470
|
+
* Provides upcoming earnings announcements for all publicly traded companies
|
|
2471
|
+
* within a specified date range. Essential for tracking earnings season,
|
|
2472
|
+
* market events, and investment timing decisions.
|
|
2473
|
+
*
|
|
2474
|
+
* @param params - Earnings calendar request parameters
|
|
2475
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to today)
|
|
2476
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to 30 days from today)
|
|
2477
|
+
*
|
|
2478
|
+
* @returns Promise resolving to array of earnings calendar data with announcement details
|
|
2479
|
+
*
|
|
2480
|
+
* @example
|
|
2481
|
+
* ```typescript
|
|
2482
|
+
* // Get earnings calendar for next week
|
|
2483
|
+
* const earningsCalendar = await fmp.calendar.getEarningsCalendar({
|
|
2484
|
+
* from: '2024-01-15',
|
|
2485
|
+
* to: '2024-01-22'
|
|
2486
|
+
* });
|
|
2487
|
+
* earningsCalendar.data.forEach(earning => {
|
|
2488
|
+
* console.log(`${earning.date}: ${earning.symbol} - Est. EPS: ${earning.estimatedEps}`);
|
|
2489
|
+
* });
|
|
2490
|
+
*
|
|
2491
|
+
* // Get earnings calendar for current month
|
|
2492
|
+
* const monthlyEarnings = await fmp.calendar.getEarningsCalendar({
|
|
2493
|
+
* from: '2024-01-01',
|
|
2494
|
+
* to: '2024-01-31'
|
|
2495
|
+
* });
|
|
2496
|
+
* ```
|
|
2497
|
+
*
|
|
2498
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#earnings-calendar-earnings|FMP Earnings Calendar Documentation}
|
|
1546
2499
|
*/
|
|
1547
|
-
getEarningsCalendar(
|
|
2500
|
+
getEarningsCalendar(params?: {
|
|
2501
|
+
from?: string;
|
|
2502
|
+
to?: string;
|
|
2503
|
+
}): Promise<APIResponse<EarningsCalendar[]>>;
|
|
1548
2504
|
/**
|
|
1549
|
-
* Get earnings
|
|
1550
|
-
*
|
|
1551
|
-
*
|
|
1552
|
-
*
|
|
1553
|
-
*
|
|
2505
|
+
* Get confirmed earnings calendar data
|
|
2506
|
+
*
|
|
2507
|
+
* Provides confirmed earnings announcements with verified dates and times.
|
|
2508
|
+
* These are earnings announcements that have been officially confirmed
|
|
2509
|
+
* by companies, providing more reliable scheduling information.
|
|
2510
|
+
*
|
|
2511
|
+
* @param params - Confirmed earnings calendar request parameters
|
|
2512
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to today)
|
|
2513
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to 30 days from today)
|
|
2514
|
+
*
|
|
2515
|
+
* @returns Promise resolving to array of confirmed earnings calendar data
|
|
2516
|
+
*
|
|
2517
|
+
* @example
|
|
2518
|
+
* ```typescript
|
|
2519
|
+
* // Get confirmed earnings for next week
|
|
2520
|
+
* const confirmedEarnings = await fmp.calendar.getEarningsConfirmed({
|
|
2521
|
+
* from: '2024-01-15',
|
|
2522
|
+
* to: '2024-01-22'
|
|
2523
|
+
* });
|
|
2524
|
+
* confirmedEarnings.data.forEach(earning => {
|
|
2525
|
+
* console.log(`${earning.date}: ${earning.symbol} - Confirmed: ${earning.time}`);
|
|
2526
|
+
* });
|
|
2527
|
+
*
|
|
2528
|
+
* // Get confirmed earnings for current month
|
|
2529
|
+
* const monthlyConfirmed = await fmp.calendar.getEarningsConfirmed({
|
|
2530
|
+
* from: '2024-01-01',
|
|
2531
|
+
* to: '2024-01-31'
|
|
2532
|
+
* });
|
|
2533
|
+
* ```
|
|
2534
|
+
*
|
|
2535
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#earnings-confirmed-earnings|FMP Earnings Confirmed Documentation}
|
|
1554
2536
|
*/
|
|
1555
|
-
getEarningsConfirmed(
|
|
2537
|
+
getEarningsConfirmed(params?: {
|
|
2538
|
+
from?: string;
|
|
2539
|
+
to?: string;
|
|
2540
|
+
}): Promise<APIResponse<EarningsConfirmed[]>>;
|
|
1556
2541
|
/**
|
|
1557
|
-
* Get dividends calendar
|
|
1558
|
-
*
|
|
1559
|
-
*
|
|
1560
|
-
*
|
|
1561
|
-
*
|
|
2542
|
+
* Get dividends calendar data
|
|
2543
|
+
*
|
|
2544
|
+
* Provides upcoming dividend payments and ex-dividend dates for all
|
|
2545
|
+
* publicly traded companies within a specified date range. Essential
|
|
2546
|
+
* for dividend investors and income-focused strategies.
|
|
2547
|
+
*
|
|
2548
|
+
* @param params - Dividends calendar request parameters
|
|
2549
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to today)
|
|
2550
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to 30 days from today)
|
|
2551
|
+
*
|
|
2552
|
+
* @returns Promise resolving to array of dividends calendar data with payment details
|
|
2553
|
+
*
|
|
2554
|
+
* @example
|
|
2555
|
+
* ```typescript
|
|
2556
|
+
* // Get dividends calendar for next week
|
|
2557
|
+
* const dividendsCalendar = await fmp.calendar.getDividendsCalendar({
|
|
2558
|
+
* from: '2024-01-15',
|
|
2559
|
+
* to: '2024-01-22'
|
|
2560
|
+
* });
|
|
2561
|
+
* dividendsCalendar.data.forEach(dividend => {
|
|
2562
|
+
* console.log(`${dividend.date}: ${dividend.symbol} - Amount: $${dividend.amount}`);
|
|
2563
|
+
* });
|
|
2564
|
+
*
|
|
2565
|
+
* // Get dividends calendar for current month
|
|
2566
|
+
* const monthlyDividends = await fmp.calendar.getDividendsCalendar({
|
|
2567
|
+
* from: '2024-01-01',
|
|
2568
|
+
* to: '2024-01-31'
|
|
2569
|
+
* });
|
|
2570
|
+
* ```
|
|
2571
|
+
*
|
|
2572
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#dividends-calendar-dividends|FMP Dividends Calendar Documentation}
|
|
1562
2573
|
*/
|
|
1563
|
-
getDividendsCalendar(
|
|
2574
|
+
getDividendsCalendar(params?: {
|
|
2575
|
+
from?: string;
|
|
2576
|
+
to?: string;
|
|
2577
|
+
}): Promise<APIResponse<DividendsCalendar[]>>;
|
|
1564
2578
|
/**
|
|
1565
|
-
* Get
|
|
1566
|
-
*
|
|
1567
|
-
*
|
|
1568
|
-
*
|
|
1569
|
-
*
|
|
2579
|
+
* Get economic calendar data
|
|
2580
|
+
*
|
|
2581
|
+
* Provides upcoming economic events, indicators, and data releases
|
|
2582
|
+
* that can impact financial markets. Essential for understanding
|
|
2583
|
+
* market-moving events and economic trends.
|
|
2584
|
+
*
|
|
2585
|
+
* @param params - Economic calendar request parameters
|
|
2586
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to today)
|
|
2587
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to 30 days from today)
|
|
2588
|
+
*
|
|
2589
|
+
* @returns Promise resolving to array of economic calendar data with event details
|
|
2590
|
+
*
|
|
2591
|
+
* @example
|
|
2592
|
+
* ```typescript
|
|
2593
|
+
* // Get economic calendar for next week
|
|
2594
|
+
* const economicCalendar = await fmp.calendar.getEconomicsCalendar({
|
|
2595
|
+
* from: '2024-01-15',
|
|
2596
|
+
* to: '2024-01-22'
|
|
2597
|
+
* });
|
|
2598
|
+
* economicCalendar.data.forEach(event => {
|
|
2599
|
+
* console.log(`${event.date}: ${event.event} - Country: ${event.country}`);
|
|
2600
|
+
* });
|
|
2601
|
+
*
|
|
2602
|
+
* // Get economic calendar for current month
|
|
2603
|
+
* const monthlyEconomic = await fmp.calendar.getEconomicsCalendar({
|
|
2604
|
+
* from: '2024-01-01',
|
|
2605
|
+
* to: '2024-01-31'
|
|
2606
|
+
* });
|
|
2607
|
+
* ```
|
|
2608
|
+
*
|
|
2609
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#economics-calendar-economics-data|FMP Economic Calendar Documentation}
|
|
1570
2610
|
*/
|
|
1571
|
-
getEconomicsCalendar(
|
|
2611
|
+
getEconomicsCalendar(params?: {
|
|
2612
|
+
from?: string;
|
|
2613
|
+
to?: string;
|
|
2614
|
+
}): Promise<APIResponse<EconomicsCalendar[]>>;
|
|
1572
2615
|
/**
|
|
1573
|
-
* Get IPO calendar
|
|
1574
|
-
*
|
|
1575
|
-
*
|
|
1576
|
-
*
|
|
1577
|
-
*
|
|
2616
|
+
* Get IPO calendar data
|
|
2617
|
+
*
|
|
2618
|
+
* Provides upcoming initial public offerings (IPOs) and their details
|
|
2619
|
+
* within a specified date range. Essential for tracking new market
|
|
2620
|
+
* entrants and investment opportunities in newly public companies.
|
|
2621
|
+
*
|
|
2622
|
+
* @param params - IPO calendar request parameters
|
|
2623
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to today)
|
|
2624
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to 30 days from today)
|
|
2625
|
+
*
|
|
2626
|
+
* @returns Promise resolving to array of IPO calendar data with offering details
|
|
2627
|
+
*
|
|
2628
|
+
* @example
|
|
2629
|
+
* ```typescript
|
|
2630
|
+
* // Get IPO calendar for next week
|
|
2631
|
+
* const ipoCalendar = await fmp.calendar.getIPOCalendar({
|
|
2632
|
+
* from: '2024-01-15',
|
|
2633
|
+
* to: '2024-01-22'
|
|
2634
|
+
* });
|
|
2635
|
+
* ipoCalendar.data.forEach(ipo => {
|
|
2636
|
+
* console.log(`${ipo.date}: ${ipo.symbol} - Price: $${ipo.price}, Shares: ${ipo.shares.toLocaleString()}`);
|
|
2637
|
+
* });
|
|
2638
|
+
*
|
|
2639
|
+
* // Get IPO calendar for current month
|
|
2640
|
+
* const monthlyIPOs = await fmp.calendar.getIPOCalendar({
|
|
2641
|
+
* from: '2024-01-01',
|
|
2642
|
+
* to: '2024-01-31'
|
|
2643
|
+
* });
|
|
2644
|
+
* ```
|
|
2645
|
+
*
|
|
2646
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#ipo-calender-by-ipo-calendar|FMP IPO Calendar Documentation}
|
|
1578
2647
|
*/
|
|
1579
|
-
getIPOCalendar(
|
|
2648
|
+
getIPOCalendar(params?: {
|
|
2649
|
+
from?: string;
|
|
2650
|
+
to?: string;
|
|
2651
|
+
}): Promise<APIResponse<IPOCalendar[]>>;
|
|
1580
2652
|
/**
|
|
1581
|
-
* Get stock splits calendar
|
|
1582
|
-
*
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1585
|
-
*
|
|
2653
|
+
* Get stock splits calendar data
|
|
2654
|
+
*
|
|
2655
|
+
* Provides upcoming stock splits for publicly traded companies within
|
|
2656
|
+
* a specified date range. Essential for understanding corporate actions
|
|
2657
|
+
* that affect share prices and trading dynamics.
|
|
2658
|
+
*
|
|
2659
|
+
* @param params - Stock splits calendar request parameters
|
|
2660
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to today)
|
|
2661
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to 30 days from today)
|
|
2662
|
+
*
|
|
2663
|
+
* @returns Promise resolving to array of stock splits calendar data with split details
|
|
2664
|
+
*
|
|
2665
|
+
* @example
|
|
2666
|
+
* ```typescript
|
|
2667
|
+
* // Get stock splits calendar for next week
|
|
2668
|
+
* const splitsCalendar = await fmp.calendar.getSplitsCalendar({
|
|
2669
|
+
* from: '2024-01-15',
|
|
2670
|
+
* to: '2024-01-22'
|
|
2671
|
+
* });
|
|
2672
|
+
* splitsCalendar.data.forEach(split => {
|
|
2673
|
+
* console.log(`${split.date}: ${split.symbol} - Ratio: ${split.numerator}:${split.denominator}`);
|
|
2674
|
+
* });
|
|
2675
|
+
*
|
|
2676
|
+
* // Get stock splits calendar for current month
|
|
2677
|
+
* const monthlySplits = await fmp.calendar.getSplitsCalendar({
|
|
2678
|
+
* from: '2024-01-01',
|
|
2679
|
+
* to: '2024-01-31'
|
|
2680
|
+
* });
|
|
2681
|
+
* ```
|
|
2682
|
+
*
|
|
2683
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#splits-calendar-splits|FMP Stock Splits Calendar Documentation}
|
|
1586
2684
|
*/
|
|
1587
|
-
getSplitsCalendar(
|
|
2685
|
+
getSplitsCalendar(params?: {
|
|
2686
|
+
from?: string;
|
|
2687
|
+
to?: string;
|
|
2688
|
+
}): Promise<APIResponse<SplitsCalendar[]>>;
|
|
1588
2689
|
}
|
|
1589
2690
|
|
|
1590
2691
|
declare class CompanyEndpoints {
|
|
1591
2692
|
private client;
|
|
1592
2693
|
constructor(client: FMPClient);
|
|
1593
2694
|
/**
|
|
1594
|
-
* Get company profile
|
|
1595
|
-
*
|
|
1596
|
-
*
|
|
1597
|
-
*
|
|
2695
|
+
* Get comprehensive company profile and information
|
|
2696
|
+
*
|
|
2697
|
+
* Provides detailed company information including financial metrics, business description,
|
|
2698
|
+
* headquarters location, and key performance indicators. Essential for fundamental analysis
|
|
2699
|
+
* and understanding a company's business model and market position.
|
|
2700
|
+
*
|
|
2701
|
+
* @param symbol - The stock symbol to get the profile for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
2702
|
+
*
|
|
2703
|
+
* @returns Promise resolving to comprehensive company profile with financial and business information
|
|
2704
|
+
*
|
|
2705
|
+
* @example
|
|
2706
|
+
* ```typescript
|
|
2707
|
+
* // Get Apple's company profile
|
|
2708
|
+
* const profile = await fmp.company.getCompanyProfile('AAPL');
|
|
2709
|
+
* console.log(`Company: ${profile.data.companyName}`);
|
|
2710
|
+
* console.log(`Industry: ${profile.data.industry}`);
|
|
2711
|
+
* console.log(`Market Cap: $${profile.data.mktCap.toLocaleString()}`);
|
|
2712
|
+
* console.log(`Description: ${profile.data.description.substring(0, 100)}...`);
|
|
2713
|
+
*
|
|
2714
|
+
* // Get Microsoft's profile
|
|
2715
|
+
* const msftProfile = await fmp.company.getCompanyProfile('MSFT');
|
|
2716
|
+
* ```
|
|
2717
|
+
*
|
|
2718
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#company-profile-company-information|FMP Company Profile Documentation}
|
|
2719
|
+
*/
|
|
2720
|
+
getCompanyProfile(symbol: string): Promise<APIResponse<CompanyProfile>>;
|
|
2721
|
+
/**
|
|
2722
|
+
* Get executive compensation and governance information
|
|
2723
|
+
*
|
|
2724
|
+
* Provides detailed compensation data for company executives including salary, bonuses,
|
|
2725
|
+
* stock options, and other benefits. Essential for governance analysis and understanding
|
|
2726
|
+
* executive pay structures and alignment with shareholder interests.
|
|
2727
|
+
*
|
|
2728
|
+
* @param symbol - The stock symbol to get executive compensation for (e.g., 'AAPL', 'MSFT', 'TSLA')
|
|
2729
|
+
*
|
|
2730
|
+
* @returns Promise resolving to array of executive compensation data with detailed pay information
|
|
2731
|
+
*
|
|
2732
|
+
* @example
|
|
2733
|
+
* ```typescript
|
|
2734
|
+
* // Get Apple's executive compensation
|
|
2735
|
+
* const compensation = await fmp.company.getExecutiveCompensation('AAPL');
|
|
2736
|
+
* compensation.data.forEach(exec => {
|
|
2737
|
+
* console.log(`${exec.name} (${exec.title}):`);
|
|
2738
|
+
* console.log(` Salary: $${exec.salary.toLocaleString()}`);
|
|
2739
|
+
* console.log(` Bonus: $${exec.bonus.toLocaleString()}`);
|
|
2740
|
+
* console.log(` Stock Options: $${exec.stockAwards.toLocaleString()}`);
|
|
2741
|
+
* });
|
|
2742
|
+
*
|
|
2743
|
+
* // Get Tesla's executive compensation
|
|
2744
|
+
* const teslaComp = await fmp.company.getExecutiveCompensation('TSLA');
|
|
2745
|
+
* ```
|
|
2746
|
+
*
|
|
2747
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#executive-compensation-company-information|FMP Executive Compensation Documentation}
|
|
2748
|
+
*/
|
|
2749
|
+
getExecutiveCompensation(symbol: string): Promise<APIResponse<ExecutiveCompensation[]>>;
|
|
2750
|
+
/**
|
|
2751
|
+
* Get company notes and financial disclosures
|
|
2752
|
+
*
|
|
2753
|
+
* Provides important notes and disclosures from company financial statements.
|
|
2754
|
+
* These notes contain critical information about accounting policies, risks,
|
|
2755
|
+
* contingencies, and other material information that affects financial analysis.
|
|
2756
|
+
*
|
|
2757
|
+
* @param symbol - The stock symbol to get notes for (e.g., 'AAPL', 'MSFT', 'JPM')
|
|
2758
|
+
*
|
|
2759
|
+
* @returns Promise resolving to array of company notes with detailed disclosure information
|
|
2760
|
+
*
|
|
2761
|
+
* @example
|
|
2762
|
+
* ```typescript
|
|
2763
|
+
* // Get Apple's company notes
|
|
2764
|
+
* const notes = await fmp.company.getCompanyNotes('AAPL');
|
|
2765
|
+
* notes.data.forEach(note => {
|
|
2766
|
+
* console.log(`Note ${note.noteNumber}: ${note.noteTitle}`);
|
|
2767
|
+
* console.log(` Content: ${note.noteContent.substring(0, 100)}...`);
|
|
2768
|
+
* });
|
|
2769
|
+
*
|
|
2770
|
+
* // Get JPMorgan's notes
|
|
2771
|
+
* const jpmNotes = await fmp.company.getCompanyNotes('JPM');
|
|
2772
|
+
* ```
|
|
2773
|
+
*
|
|
2774
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#company-notes-company-information|FMP Company Notes Documentation}
|
|
2775
|
+
*/
|
|
2776
|
+
getCompanyNotes(symbol: string): Promise<APIResponse<CompanyNotes[]>>;
|
|
2777
|
+
/**
|
|
2778
|
+
* Get historical employee count data
|
|
2779
|
+
*
|
|
2780
|
+
* Provides historical data on company employee counts over time.
|
|
2781
|
+
* Useful for analyzing company growth, operational efficiency, and workforce trends.
|
|
2782
|
+
* Employee count is often a key indicator of company expansion or contraction.
|
|
2783
|
+
*
|
|
2784
|
+
* @param symbol - The stock symbol to get historical employee count for (e.g., 'AAPL', 'MSFT', 'AMZN')
|
|
2785
|
+
*
|
|
2786
|
+
* @returns Promise resolving to array of historical employee count data with year-by-year information
|
|
2787
|
+
*
|
|
2788
|
+
* @example
|
|
2789
|
+
* ```typescript
|
|
2790
|
+
* // Get Apple's employee count history
|
|
2791
|
+
* const employees = await fmp.company.getHistoricalEmployeeCount('AAPL');
|
|
2792
|
+
* employees.data.forEach(year => {
|
|
2793
|
+
* console.log(`${year.year}: ${year.employeeCount.toLocaleString()} employees`);
|
|
2794
|
+
* });
|
|
2795
|
+
*
|
|
2796
|
+
* // Get Amazon's employee growth
|
|
2797
|
+
* const amazonEmployees = await fmp.company.getHistoricalEmployeeCount('AMZN');
|
|
2798
|
+
* ```
|
|
2799
|
+
*
|
|
2800
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#historical-employee-company-information|FMP Historical Employee Count Documentation}
|
|
2801
|
+
*/
|
|
2802
|
+
getHistoricalEmployeeCount(symbol: string): Promise<APIResponse<HistoricalEmployeeCount[]>>;
|
|
2803
|
+
/**
|
|
2804
|
+
* Get current shares float information
|
|
2805
|
+
*
|
|
2806
|
+
* Provides the total number of shares that are publicly traded (float) for a company.
|
|
2807
|
+
* The float is calculated by subtracting restricted shares from total outstanding shares.
|
|
2808
|
+
* Important for understanding liquidity, volatility, and trading dynamics.
|
|
2809
|
+
*
|
|
2810
|
+
* @param symbol - The stock symbol to get shares float for (e.g., 'AAPL', 'TSLA', 'NVDA')
|
|
2811
|
+
*
|
|
2812
|
+
* @returns Promise resolving to shares float data with current float information
|
|
2813
|
+
*
|
|
2814
|
+
* @example
|
|
2815
|
+
* ```typescript
|
|
2816
|
+
* // Get Apple's shares float
|
|
2817
|
+
* const float = await fmp.company.getSharesFloat('AAPL');
|
|
2818
|
+
* console.log(`Float: ${float.data.sharesFloat.toLocaleString()} shares`);
|
|
2819
|
+
* console.log(`Outstanding: ${float.data.sharesOutstanding.toLocaleString()} shares`);
|
|
2820
|
+
* console.log(`Restricted: ${float.data.restrictedShares.toLocaleString()} shares`);
|
|
2821
|
+
*
|
|
2822
|
+
* // Get Tesla's float
|
|
2823
|
+
* const teslaFloat = await fmp.company.getSharesFloat('TSLA');
|
|
2824
|
+
* ```
|
|
2825
|
+
*
|
|
2826
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#company-share-float-share-float|FMP Shares Float Documentation}
|
|
2827
|
+
*/
|
|
2828
|
+
getSharesFloat(symbol: string): Promise<APIResponse<SharesFloat>>;
|
|
2829
|
+
/**
|
|
2830
|
+
* Get historical shares float data
|
|
2831
|
+
*
|
|
2832
|
+
* Provides historical data on company shares float over time.
|
|
2833
|
+
* Useful for analyzing changes in liquidity, share issuance, and corporate actions
|
|
2834
|
+
* that affect the number of publicly traded shares.
|
|
2835
|
+
*
|
|
2836
|
+
* @param symbol - The stock symbol to get historical shares float for (e.g., 'AAPL', 'TSLA', 'NVDA')
|
|
2837
|
+
*
|
|
2838
|
+
* @returns Promise resolving to array of historical shares float data with date-by-date information
|
|
2839
|
+
*
|
|
2840
|
+
* @example
|
|
2841
|
+
* ```typescript
|
|
2842
|
+
* // Get Apple's historical float
|
|
2843
|
+
* const historicalFloat = await fmp.company.getHistoricalSharesFloat('AAPL');
|
|
2844
|
+
* historicalFloat.data.forEach(entry => {
|
|
2845
|
+
* console.log(`${entry.date}: ${entry.sharesFloat.toLocaleString()} shares`);
|
|
2846
|
+
* });
|
|
2847
|
+
*
|
|
2848
|
+
* // Get Tesla's float history
|
|
2849
|
+
* const teslaHistory = await fmp.company.getHistoricalSharesFloat('TSLA');
|
|
2850
|
+
* ```
|
|
2851
|
+
*
|
|
2852
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#company-historical-share-float|FMP Historical Shares Float Documentation}
|
|
1598
2853
|
*/
|
|
1599
|
-
|
|
2854
|
+
getHistoricalSharesFloat(symbol: string): Promise<APIResponse<HistoricalSharesFloat[]>>;
|
|
2855
|
+
/**
|
|
2856
|
+
* Get earnings call transcript for specific quarter
|
|
2857
|
+
*
|
|
2858
|
+
* Provides the full transcript of a company's earnings conference call.
|
|
2859
|
+
* Contains detailed Q&A sessions, management commentary, and insights into
|
|
2860
|
+
* company performance, strategy, and future outlook.
|
|
2861
|
+
*
|
|
2862
|
+
* @param params - Earnings call transcript request parameters
|
|
2863
|
+
* @param params.symbol - The stock symbol to get transcript for (e.g., 'AAPL', 'MSFT', 'TSLA')
|
|
2864
|
+
* @param params.year - The year of the earnings call (e.g., 2024)
|
|
2865
|
+
* @param params.quarter - The quarter of the earnings call (1, 2, 3, or 4)
|
|
2866
|
+
*
|
|
2867
|
+
* @returns Promise resolving to earnings call transcript with full text content
|
|
2868
|
+
*
|
|
2869
|
+
* @example
|
|
2870
|
+
* ```typescript
|
|
2871
|
+
* // Get Apple's Q1 2024 earnings call
|
|
2872
|
+
* const transcript = await fmp.company.getEarningsCallTranscript({
|
|
2873
|
+
* symbol: 'AAPL',
|
|
2874
|
+
* year: 2024,
|
|
2875
|
+
* quarter: 1
|
|
2876
|
+
* });
|
|
2877
|
+
* console.log(`Transcript: ${transcript.data[0].content.substring(0, 200)}...`);
|
|
2878
|
+
*
|
|
2879
|
+
* // Get Tesla's Q4 2023 earnings call
|
|
2880
|
+
* const teslaTranscript = await fmp.company.getEarningsCallTranscript({
|
|
2881
|
+
* symbol: 'TSLA',
|
|
2882
|
+
* year: 2023,
|
|
2883
|
+
* quarter: 4
|
|
2884
|
+
* });
|
|
2885
|
+
* ```
|
|
2886
|
+
*
|
|
2887
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#earnings-transcript-earnings-transcripts|FMP Earnings Call Transcript Documentation}
|
|
2888
|
+
*/
|
|
2889
|
+
getEarningsCallTranscript(params: {
|
|
1600
2890
|
symbol: string;
|
|
1601
|
-
|
|
2891
|
+
year: number;
|
|
2892
|
+
quarter: number;
|
|
2893
|
+
}): Promise<APIResponse<EarningsCallTranscript[]>>;
|
|
2894
|
+
/**
|
|
2895
|
+
* Get available earnings call transcript dates
|
|
2896
|
+
*
|
|
2897
|
+
* Provides a list of all available earnings call transcript dates for a company.
|
|
2898
|
+
* Useful for discovering which quarters have transcripts available before
|
|
2899
|
+
* requesting the full transcript content.
|
|
2900
|
+
*
|
|
2901
|
+
* @param symbol - The stock symbol to get transcript dates for (e.g., 'AAPL', 'MSFT', 'TSLA')
|
|
2902
|
+
*
|
|
2903
|
+
* @returns Promise resolving to array of available transcript dates with quarter information
|
|
2904
|
+
*
|
|
2905
|
+
* @example
|
|
2906
|
+
* ```typescript
|
|
2907
|
+
* // Get Apple's available transcript dates
|
|
2908
|
+
* const transcriptDates = await fmp.company.getCompanyTranscriptData('AAPL');
|
|
2909
|
+
* transcriptDates.data.forEach(date => {
|
|
2910
|
+
* console.log(`Q${date.quarter} ${date.year}: ${date.date}`);
|
|
2911
|
+
* });
|
|
2912
|
+
*
|
|
2913
|
+
* // Get Microsoft's transcript availability
|
|
2914
|
+
* const msftDates = await fmp.company.getCompanyTranscriptData('MSFT');
|
|
2915
|
+
* ```
|
|
2916
|
+
*
|
|
2917
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#transcript-dates-earnings-transcripts|FMP Company Transcript Data Documentation}
|
|
2918
|
+
*/
|
|
2919
|
+
getCompanyTranscriptData(symbol: string): Promise<APIResponse<CompanyTranscriptData[]>>;
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
declare class QuoteEndpoints {
|
|
2923
|
+
private client;
|
|
2924
|
+
constructor(client: FMPClient);
|
|
2925
|
+
/**
|
|
2926
|
+
* Get real-time quote data for any asset type (stocks, crypto, forex, commodities, ETFs)
|
|
2927
|
+
*
|
|
2928
|
+
* This endpoint provides current market data including price, volume, market cap, and key metrics.
|
|
2929
|
+
* Works with any valid symbol across all supported asset classes.
|
|
2930
|
+
*
|
|
2931
|
+
* @param symbol - The trading symbol (e.g., 'AAPL', 'BTCUSD', 'EURUSD', 'GCUSD', 'SPY')
|
|
2932
|
+
*
|
|
2933
|
+
* @returns Promise resolving to quote data with current price, volume, market cap, and performance metrics
|
|
2934
|
+
*
|
|
2935
|
+
* @example
|
|
2936
|
+
* ```typescript
|
|
2937
|
+
* // Get stock quote
|
|
2938
|
+
* const aaplQuote = await fmp.quote.getQuote('AAPL');
|
|
2939
|
+
*
|
|
2940
|
+
* // Get crypto quote
|
|
2941
|
+
* const btcQuote = await fmp.quote.getQuote('BTCUSD');
|
|
2942
|
+
*
|
|
2943
|
+
* // Get forex quote
|
|
2944
|
+
* const eurQuote = await fmp.quote.getQuote('EURUSD');
|
|
2945
|
+
* ```
|
|
2946
|
+
*/
|
|
2947
|
+
getQuote(symbol: string): Promise<APIResponse<Quote>>;
|
|
1602
2948
|
/**
|
|
1603
|
-
* Get
|
|
1604
|
-
*
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
2949
|
+
* Get historical price data for any asset type with customizable date range
|
|
2950
|
+
*
|
|
2951
|
+
* Retrieves daily OHLCV (Open, High, Low, Close, Volume) data for the specified symbol.
|
|
2952
|
+
* Data includes adjusted close prices, volume, and percentage changes.
|
|
2953
|
+
*
|
|
2954
|
+
* @param params - Historical price request parameters
|
|
2955
|
+
* @param params.symbol - The trading symbol to get historical data for
|
|
2956
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional, defaults to 1 year ago)
|
|
2957
|
+
* @param params.to - End date in YYYY-MM-DD format (optional, defaults to today)
|
|
2958
|
+
*
|
|
2959
|
+
* @returns Promise resolving to historical price data with daily OHLCV information
|
|
2960
|
+
*
|
|
2961
|
+
* @example
|
|
2962
|
+
* ```typescript
|
|
2963
|
+
* // Get last year's data
|
|
2964
|
+
* const history = await fmp.quote.getHistoricalPrice({
|
|
2965
|
+
* symbol: 'AAPL',
|
|
2966
|
+
* from: '2023-01-01',
|
|
2967
|
+
* to: '2023-12-31'
|
|
2968
|
+
* });
|
|
2969
|
+
*
|
|
2970
|
+
* // Get recent data (last 30 days)
|
|
2971
|
+
* const recent = await fmp.quote.getHistoricalPrice({
|
|
2972
|
+
* symbol: 'BTCUSD',
|
|
2973
|
+
* from: '2024-01-01'
|
|
2974
|
+
* });
|
|
2975
|
+
* ```
|
|
1607
2976
|
*/
|
|
1608
|
-
|
|
2977
|
+
getHistoricalPrice(params: {
|
|
1609
2978
|
symbol: string;
|
|
1610
|
-
|
|
2979
|
+
from?: string;
|
|
2980
|
+
to?: string;
|
|
2981
|
+
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1611
2982
|
/**
|
|
1612
|
-
* Get
|
|
1613
|
-
*
|
|
1614
|
-
*
|
|
1615
|
-
*
|
|
2983
|
+
* Get real-time quotes for multiple symbols in a single request
|
|
2984
|
+
*
|
|
2985
|
+
* Efficiently retrieve quote data for multiple assets across different asset classes.
|
|
2986
|
+
* Useful for portfolio tracking, market monitoring, or batch data collection.
|
|
2987
|
+
*
|
|
2988
|
+
* @param symbols - Array of trading symbols to get quotes for
|
|
2989
|
+
*
|
|
2990
|
+
* @returns Promise resolving to an array of quote data for all requested symbols
|
|
2991
|
+
*
|
|
2992
|
+
* @example
|
|
2993
|
+
* ```typescript
|
|
2994
|
+
* // Get quotes for a mixed portfolio
|
|
2995
|
+
* const quotes = await fmp.quote.getQuotes([
|
|
2996
|
+
* 'AAPL', // Stock
|
|
2997
|
+
* 'BTCUSD', // Crypto
|
|
2998
|
+
* 'EURUSD', // Forex
|
|
2999
|
+
* 'SPY' // ETF
|
|
3000
|
+
* ]);
|
|
3001
|
+
*
|
|
3002
|
+
* // Get quotes for tech stocks
|
|
3003
|
+
* const techQuotes = await fmp.quote.getQuotes([
|
|
3004
|
+
* 'AAPL', 'MSFT', 'GOOGL', 'AMZN', 'TSLA'
|
|
3005
|
+
* ]);
|
|
3006
|
+
* ```
|
|
1616
3007
|
*/
|
|
1617
|
-
|
|
3008
|
+
getQuotes(symbols: string[]): Promise<APIResponse<Quote[]>>;
|
|
3009
|
+
/**
|
|
3010
|
+
* Get intraday price data with customizable time intervals
|
|
3011
|
+
*
|
|
3012
|
+
* Retrieves intraday OHLCV data at specified intervals (1min to 4hour).
|
|
3013
|
+
* Perfect for technical analysis, day trading, or short-term price monitoring.
|
|
3014
|
+
*
|
|
3015
|
+
* @param params - Intraday request parameters
|
|
3016
|
+
* @param params.symbol - The trading symbol to get intraday data for
|
|
3017
|
+
* @param params.interval - Time interval: '1min', '5min', '15min', '30min', '1hour', or '4hour'
|
|
3018
|
+
* @param params.from - Start date in YYYY-MM-DD format (optional)
|
|
3019
|
+
* @param params.to - End date in YYYY-MM-DD format (optional)
|
|
3020
|
+
*
|
|
3021
|
+
* @returns Promise resolving to intraday price data with OHLCV information at specified intervals
|
|
3022
|
+
*
|
|
3023
|
+
* @example
|
|
3024
|
+
* ```typescript
|
|
3025
|
+
* // Get 5-minute intraday data for today
|
|
3026
|
+
* const intraday = await fmp.quote.getIntraday({
|
|
3027
|
+
* symbol: 'AAPL',
|
|
3028
|
+
* interval: '5min',
|
|
3029
|
+
* from: '2024-01-15'
|
|
3030
|
+
* });
|
|
3031
|
+
*
|
|
3032
|
+
* // Get 1-hour data for crypto
|
|
3033
|
+
* const cryptoIntraday = await fmp.quote.getIntraday({
|
|
3034
|
+
* symbol: 'BTCUSD',
|
|
3035
|
+
* interval: '1hour',
|
|
3036
|
+
* from: '2024-01-10',
|
|
3037
|
+
* to: '2024-01-15'
|
|
3038
|
+
* });
|
|
3039
|
+
* ```
|
|
3040
|
+
*/
|
|
3041
|
+
getIntraday(params: {
|
|
1618
3042
|
symbol: string;
|
|
1619
|
-
|
|
3043
|
+
interval: '1min' | '5min' | '15min' | '30min' | '1hour' | '4hour';
|
|
3044
|
+
from?: string;
|
|
3045
|
+
to?: string;
|
|
3046
|
+
}): Promise<APIResponse<HistoricalPriceData[]>>;
|
|
3047
|
+
}
|
|
3048
|
+
|
|
3049
|
+
declare class SenateHouseEndpoints {
|
|
3050
|
+
private client;
|
|
3051
|
+
constructor(client: FMPClient);
|
|
1620
3052
|
/**
|
|
1621
|
-
* Get
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
1624
|
-
*
|
|
3053
|
+
* Get senate trading data for a specific stock symbol
|
|
3054
|
+
*
|
|
3055
|
+
* Provides detailed information about senate members' trading activities for a specific stock.
|
|
3056
|
+
* Includes transaction details, amounts, dates, and ownership information for transparency
|
|
3057
|
+
* and compliance with the STOCK Act (Stop Trading on Congressional Knowledge).
|
|
3058
|
+
*
|
|
3059
|
+
* @param params - Senate trading request parameters
|
|
3060
|
+
* @param params.symbol - The stock symbol to get senate trading data for (e.g., 'AAPL', 'MSFT', 'TSLA')
|
|
3061
|
+
*
|
|
3062
|
+
* @returns Promise resolving to array of senate trading data with transaction details
|
|
3063
|
+
*
|
|
3064
|
+
* @example
|
|
3065
|
+
* ```typescript
|
|
3066
|
+
* // Get senate trading data for Apple
|
|
3067
|
+
* const appleSenateTrading = await fmp.senateHouse.getSenateTrading({ symbol: 'AAPL' });
|
|
3068
|
+
* appleSenateTrading.data.forEach(trade => {
|
|
3069
|
+
* console.log(`${trade.firstName} ${trade.lastName} (${trade.office}):`);
|
|
3070
|
+
* console.log(` ${trade.type} ${trade.amount} of ${trade.assetDescription}`);
|
|
3071
|
+
* console.log(` Transaction Date: ${trade.transactionDate}`);
|
|
3072
|
+
* });
|
|
3073
|
+
*
|
|
3074
|
+
* // Get senate trading data for Tesla
|
|
3075
|
+
* const teslaSenateTrading = await fmp.senateHouse.getSenateTrading({ symbol: 'TSLA' });
|
|
3076
|
+
* ```
|
|
3077
|
+
*
|
|
3078
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#senate-trading|FMP Senate Trading Documentation}
|
|
1625
3079
|
*/
|
|
1626
|
-
|
|
3080
|
+
getSenateTrading(params: {
|
|
1627
3081
|
symbol: string;
|
|
1628
|
-
}): Promise<APIResponse<
|
|
3082
|
+
}): Promise<APIResponse<SenateTradingResponse[]>>;
|
|
1629
3083
|
/**
|
|
1630
|
-
* Get
|
|
1631
|
-
*
|
|
1632
|
-
*
|
|
1633
|
-
*
|
|
3084
|
+
* Get senate trading RSS feed with pagination
|
|
3085
|
+
*
|
|
3086
|
+
* Provides a paginated RSS feed of all senate trading activities across all stocks.
|
|
3087
|
+
* Useful for monitoring congressional trading activities, compliance tracking,
|
|
3088
|
+
* and transparency reporting. Returns recent trading disclosures from senate members.
|
|
3089
|
+
*
|
|
3090
|
+
* @param params - Senate trading RSS feed request parameters
|
|
3091
|
+
* @param params.page - The page number to retrieve (starts from 0)
|
|
3092
|
+
*
|
|
3093
|
+
* @returns Promise resolving to array of senate trading data from RSS feed
|
|
3094
|
+
*
|
|
3095
|
+
* @example
|
|
3096
|
+
* ```typescript
|
|
3097
|
+
* // Get first page of senate trading RSS feed
|
|
3098
|
+
* const firstPage = await fmp.senateHouse.getSenateTradingRSSFeed({ page: 0 });
|
|
3099
|
+
* console.log(`First page: ${firstPage.data.length} trading activities`);
|
|
3100
|
+
*
|
|
3101
|
+
* // Get second page of senate trading RSS feed
|
|
3102
|
+
* const secondPage = await fmp.senateHouse.getSenateTradingRSSFeed({ page: 1 });
|
|
3103
|
+
* console.log(`Second page: ${secondPage.data.length} trading activities`);
|
|
3104
|
+
*
|
|
3105
|
+
* // Get recent senate trading activities
|
|
3106
|
+
* const recentTrades = await fmp.senateHouse.getSenateTradingRSSFeed({ page: 0 });
|
|
3107
|
+
* recentTrades.data.forEach(trade => {
|
|
3108
|
+
* console.log(`${trade.firstName} ${trade.lastName}: ${trade.type} ${trade.amount}`);
|
|
3109
|
+
* });
|
|
3110
|
+
* ```
|
|
3111
|
+
*
|
|
3112
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#senate-trading-rss-feed-senate|FMP Senate Trading RSS Feed Documentation}
|
|
3113
|
+
*/
|
|
3114
|
+
getSenateTradingRSSFeed(params: {
|
|
3115
|
+
page: number;
|
|
3116
|
+
}): Promise<APIResponse<SenateTradingResponse[]>>;
|
|
3117
|
+
/**
|
|
3118
|
+
* Get senate trading data for a specific senator by name
|
|
3119
|
+
*
|
|
3120
|
+
* Provides detailed trading activities for a specific senate member across all stocks.
|
|
3121
|
+
* Useful for tracking individual senator's trading patterns, compliance monitoring,
|
|
3122
|
+
* and transparency reporting. Returns all trading disclosures for the specified senator.
|
|
3123
|
+
*
|
|
3124
|
+
* @param params - Senate trading by name request parameters
|
|
3125
|
+
* @param params.name - The name of the senator to get trading data for (e.g., 'John Smith', 'Jane Doe')
|
|
3126
|
+
*
|
|
3127
|
+
* @returns Promise resolving to array of senate trading data for the specified senator
|
|
3128
|
+
*
|
|
3129
|
+
* @example
|
|
3130
|
+
* ```typescript
|
|
3131
|
+
* // Get trading data for Senator John Smith
|
|
3132
|
+
* const johnSmithTrades = await fmp.senateHouse.getSenateTradingByName({ name: 'John Smith' });
|
|
3133
|
+
* johnSmithTrades.data.forEach(trade => {
|
|
3134
|
+
* console.log(`${trade.symbol}: ${trade.type} ${trade.amount}`);
|
|
3135
|
+
* console.log(` Transaction Date: ${trade.transactionDate}`);
|
|
3136
|
+
* console.log(` Asset: ${trade.assetDescription}`);
|
|
3137
|
+
* });
|
|
3138
|
+
*
|
|
3139
|
+
* // Get trading data for Senator Jane Doe
|
|
3140
|
+
* const janeDoeTrades = await fmp.senateHouse.getSenateTradingByName({ name: 'Jane Doe' });
|
|
3141
|
+
* console.log(`Jane Doe has ${janeDoeTrades.data.length} trading activities`);
|
|
3142
|
+
* ```
|
|
3143
|
+
*
|
|
3144
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs/stable#senate-trading-by-name|FMP Senate Trading by Name Documentation}
|
|
3145
|
+
*/
|
|
3146
|
+
getSenateTradingByName(params: {
|
|
3147
|
+
name: string;
|
|
3148
|
+
}): Promise<APIResponse<SenateHouseTradingByNameResponse[]>>;
|
|
3149
|
+
/**
|
|
3150
|
+
* Get house trading data for a specific stock symbol
|
|
3151
|
+
*
|
|
3152
|
+
* Provides detailed information about house representatives' trading activities for a specific stock.
|
|
3153
|
+
* Includes transaction details, amounts, dates, and district information for transparency
|
|
3154
|
+
* and compliance with the STOCK Act (Stop Trading on Congressional Knowledge).
|
|
3155
|
+
*
|
|
3156
|
+
* @param params - House trading request parameters
|
|
3157
|
+
* @param params.symbol - The stock symbol to get house trading data for (e.g., 'AAPL', 'MSFT', 'TSLA')
|
|
3158
|
+
*
|
|
3159
|
+
* @returns Promise resolving to array of house trading data with transaction details
|
|
3160
|
+
*
|
|
3161
|
+
* @example
|
|
3162
|
+
* ```typescript
|
|
3163
|
+
* // Get house trading data for Apple
|
|
3164
|
+
* const appleHouseTrading = await fmp.senateHouse.getHouseTrading({ symbol: 'AAPL' });
|
|
3165
|
+
* appleHouseTrading.data.forEach(trade => {
|
|
3166
|
+
* console.log(`${trade.representative} (District ${trade.district}):`);
|
|
3167
|
+
* console.log(` ${trade.type} ${trade.amount} of ${trade.assetDescription}`);
|
|
3168
|
+
* console.log(` Transaction Date: ${trade.transactionDate}`);
|
|
3169
|
+
* });
|
|
3170
|
+
*
|
|
3171
|
+
* // Get house trading data for Microsoft
|
|
3172
|
+
* const msftHouseTrading = await fmp.senateHouse.getHouseTrading({ symbol: 'MSFT' });
|
|
3173
|
+
* console.log(`Microsoft house trading activities: ${msftHouseTrading.data.length}`);
|
|
3174
|
+
* ```
|
|
3175
|
+
*
|
|
3176
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#house-disclosure|FMP House Trading Documentation}
|
|
1634
3177
|
*/
|
|
1635
|
-
|
|
3178
|
+
getHouseTrading(params: {
|
|
1636
3179
|
symbol: string;
|
|
1637
|
-
}): Promise<APIResponse<
|
|
3180
|
+
}): Promise<APIResponse<HouseTradingResponse[]>>;
|
|
3181
|
+
/**
|
|
3182
|
+
* Get house trading RSS feed with pagination
|
|
3183
|
+
*
|
|
3184
|
+
* Provides a paginated RSS feed of all house trading activities across all stocks.
|
|
3185
|
+
* Useful for monitoring congressional trading activities, compliance tracking,
|
|
3186
|
+
* and transparency reporting. Returns recent trading disclosures from house representatives.
|
|
3187
|
+
*
|
|
3188
|
+
* @param params - House trading RSS feed request parameters
|
|
3189
|
+
* @param params.page - The page number to retrieve (starts from 0)
|
|
3190
|
+
*
|
|
3191
|
+
* @returns Promise resolving to array of house trading data from RSS feed
|
|
3192
|
+
*
|
|
3193
|
+
* @example
|
|
3194
|
+
* ```typescript
|
|
3195
|
+
* // Get first page of house trading RSS feed
|
|
3196
|
+
* const firstPage = await fmp.senateHouse.getHouseTradingRSSFeed({ page: 0 });
|
|
3197
|
+
* console.log(`First page: ${firstPage.data.length} trading activities`);
|
|
3198
|
+
*
|
|
3199
|
+
* // Get second page of house trading RSS feed
|
|
3200
|
+
* const secondPage = await fmp.senateHouse.getHouseTradingRSSFeed({ page: 1 });
|
|
3201
|
+
* console.log(`Second page: ${secondPage.data.length} trading activities`);
|
|
3202
|
+
*
|
|
3203
|
+
* // Get recent house trading activities
|
|
3204
|
+
* const recentTrades = await fmp.senateHouse.getHouseTradingRSSFeed({ page: 0 });
|
|
3205
|
+
* recentTrades.data.forEach(trade => {
|
|
3206
|
+
* console.log(`${trade.representative} (District ${trade.district}): ${trade.type} ${trade.amount}`);
|
|
3207
|
+
* });
|
|
3208
|
+
* ```
|
|
3209
|
+
*
|
|
3210
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#house-disclosure-rss-feed-senate|FMP House Trading RSS Feed Documentation}
|
|
3211
|
+
*/
|
|
3212
|
+
getHouseTradingRSSFeed(params: {
|
|
3213
|
+
page: number;
|
|
3214
|
+
}): Promise<APIResponse<HouseTradingResponse[]>>;
|
|
3215
|
+
/**
|
|
3216
|
+
* Get house trading data for a specific representative by name
|
|
3217
|
+
*
|
|
3218
|
+
* Provides detailed trading activities for a specific house representative across all stocks.
|
|
3219
|
+
* Useful for tracking individual representative's trading patterns, compliance monitoring,
|
|
3220
|
+
* and transparency reporting. Returns all trading disclosures for the specified representative.
|
|
3221
|
+
*
|
|
3222
|
+
* @param params - House trading by name request parameters
|
|
3223
|
+
* @param params.name - The name of the representative to get trading data for (e.g., 'John Smith', 'Jane Doe')
|
|
3224
|
+
*
|
|
3225
|
+
* @returns Promise resolving to array of house trading data for the specified representative
|
|
3226
|
+
*
|
|
3227
|
+
* @example
|
|
3228
|
+
* ```typescript
|
|
3229
|
+
* // Get trading data for Representative John Smith
|
|
3230
|
+
* const johnSmithTrades = await fmp.senateHouse.getHouseTradingByName({ name: 'John Smith' });
|
|
3231
|
+
* johnSmithTrades.data.forEach(trade => {
|
|
3232
|
+
* console.log(`${trade.symbol}: ${trade.type} ${trade.amount}`);
|
|
3233
|
+
* console.log(` Transaction Date: ${trade.transactionDate}`);
|
|
3234
|
+
* console.log(` Asset: ${trade.assetDescription}`);
|
|
3235
|
+
* console.log(` District: ${trade.district}`);
|
|
3236
|
+
* });
|
|
3237
|
+
*
|
|
3238
|
+
* // Get trading data for Representative Jane Doe
|
|
3239
|
+
* const janeDoeTrades = await fmp.senateHouse.getHouseTradingByName({ name: 'Jane Doe' });
|
|
3240
|
+
* console.log(`Jane Doe has ${janeDoeTrades.data.length} trading activities`);
|
|
3241
|
+
* ```
|
|
3242
|
+
*
|
|
3243
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs/stable#house-trading-by-name|FMP House Trading by Name Documentation}
|
|
3244
|
+
*/
|
|
3245
|
+
getHouseTradingByName(params: {
|
|
3246
|
+
name: string;
|
|
3247
|
+
}): Promise<APIResponse<SenateHouseTradingByNameResponse[]>>;
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
declare class InstitutionalEndpoints {
|
|
3251
|
+
private client;
|
|
3252
|
+
constructor(client: FMPClient);
|
|
3253
|
+
/**
|
|
3254
|
+
* Get Form 13F institutional stock ownership data
|
|
3255
|
+
*
|
|
3256
|
+
* Provides Form 13F institutional stock ownership data for investment
|
|
3257
|
+
* managers with over $100 million in assets under management. Essential
|
|
3258
|
+
* for analyzing institutional investment patterns and holdings.
|
|
3259
|
+
*
|
|
3260
|
+
* @param params - Form 13F request parameters
|
|
3261
|
+
* @param params.cik - Central Index Key (CIK) of the investment manager
|
|
3262
|
+
* @param params.date - Specific date in YYYY-MM-DD format (optional, defaults to most recent filing)
|
|
3263
|
+
*
|
|
3264
|
+
* @returns Promise resolving to array of Form 13F institutional ownership data
|
|
3265
|
+
*
|
|
3266
|
+
* @example
|
|
3267
|
+
* ```typescript
|
|
3268
|
+
* // Get Berkshire Hathaway's Form 13F data
|
|
3269
|
+
* const berkshire13F = await fmp.institutional.getForm13F({
|
|
3270
|
+
* cik: '0001067983'
|
|
3271
|
+
* });
|
|
3272
|
+
* berkshire13F.data.forEach(holding => {
|
|
3273
|
+
* console.log(`${holding.issuerName}: ${holding.value.toLocaleString()} shares, $${holding.value.toLocaleString()}`);
|
|
3274
|
+
* });
|
|
3275
|
+
*
|
|
3276
|
+
* // Get Form 13F data for specific date
|
|
3277
|
+
* const historical13F = await fmp.institutional.getForm13F({
|
|
3278
|
+
* cik: '0001067983',
|
|
3279
|
+
* date: '2023-12-31'
|
|
3280
|
+
* });
|
|
3281
|
+
*
|
|
3282
|
+
* // Get BlackRock's Form 13F data
|
|
3283
|
+
* const blackrock13F = await fmp.institutional.getForm13F({
|
|
3284
|
+
* cik: '0001364742'
|
|
3285
|
+
* });
|
|
3286
|
+
* ```
|
|
3287
|
+
*
|
|
3288
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#form-13f-13f---institutional-stock-ownership|FMP Form 13F Documentation}
|
|
3289
|
+
*/
|
|
3290
|
+
getForm13F(params: {
|
|
3291
|
+
cik: string;
|
|
3292
|
+
date?: string;
|
|
3293
|
+
}): Promise<APIResponse<Form13FResponse[]>>;
|
|
1638
3294
|
/**
|
|
1639
|
-
* Get
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1642
|
-
*
|
|
3295
|
+
* Get Form 13F filing dates for an investment manager
|
|
3296
|
+
*
|
|
3297
|
+
* Provides available filing dates for Form 13F submissions by a specific
|
|
3298
|
+
* investment manager. Essential for discovering historical filing dates
|
|
3299
|
+
* before requesting detailed Form 13F data.
|
|
3300
|
+
*
|
|
3301
|
+
* @param params - Form 13F dates request parameters
|
|
3302
|
+
* @param params.cik - Central Index Key (CIK) of the investment manager
|
|
3303
|
+
*
|
|
3304
|
+
* @returns Promise resolving to array of available Form 13F filing dates
|
|
3305
|
+
*
|
|
3306
|
+
* @example
|
|
3307
|
+
* ```typescript
|
|
3308
|
+
* // Get Berkshire Hathaway's Form 13F filing dates
|
|
3309
|
+
* const berkshireDates = await fmp.institutional.getForm13FDates({
|
|
3310
|
+
* cik: '0001067983'
|
|
3311
|
+
* });
|
|
3312
|
+
* berkshireDates.data.forEach(date => {
|
|
3313
|
+
* console.log(`Filing date: ${date}`);
|
|
3314
|
+
* });
|
|
3315
|
+
*
|
|
3316
|
+
* // Get BlackRock's filing dates
|
|
3317
|
+
* const blackrockDates = await fmp.institutional.getForm13FDates({
|
|
3318
|
+
* cik: '0001364742'
|
|
3319
|
+
* });
|
|
3320
|
+
* ```
|
|
3321
|
+
*
|
|
3322
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#form-13f-dates-13f---institutional-stock-ownership|FMP Form 13F Dates Documentation}
|
|
3323
|
+
*/
|
|
3324
|
+
getForm13FDates(params: {
|
|
3325
|
+
cik: string;
|
|
3326
|
+
}): Promise<APIResponse<string[]>>;
|
|
3327
|
+
/**
|
|
3328
|
+
* Get institutional holders for a company
|
|
3329
|
+
*
|
|
3330
|
+
* Provides data on institutional investors holding shares in a specific
|
|
3331
|
+
* company. Essential for understanding institutional ownership patterns,
|
|
3332
|
+
* major shareholders, and investment sentiment.
|
|
3333
|
+
*
|
|
3334
|
+
* @param params - Institutional holders request parameters
|
|
3335
|
+
* @param params.symbol - Stock symbol to get institutional holders for
|
|
3336
|
+
*
|
|
3337
|
+
* @returns Promise resolving to array of institutional holders data
|
|
3338
|
+
*
|
|
3339
|
+
* @example
|
|
3340
|
+
* ```typescript
|
|
3341
|
+
* // Get Apple's institutional holders
|
|
3342
|
+
* const appleHolders = await fmp.institutional.getInstitutionalHolders({
|
|
3343
|
+
* symbol: 'AAPL'
|
|
3344
|
+
* });
|
|
3345
|
+
* appleHolders.data.forEach(holder => {
|
|
3346
|
+
* console.log(`${holder.holder}: ${holder.shares.toLocaleString()} shares (${holder.weight}%)`);
|
|
3347
|
+
* });
|
|
3348
|
+
*
|
|
3349
|
+
* // Get Microsoft's institutional holders
|
|
3350
|
+
* const msftHolders = await fmp.institutional.getInstitutionalHolders({
|
|
3351
|
+
* symbol: 'MSFT'
|
|
3352
|
+
* });
|
|
3353
|
+
*
|
|
3354
|
+
* // Get Tesla's institutional holders
|
|
3355
|
+
* const teslaHolders = await fmp.institutional.getInstitutionalHolders({
|
|
3356
|
+
* symbol: 'TSLA'
|
|
3357
|
+
* });
|
|
3358
|
+
* ```
|
|
3359
|
+
*
|
|
3360
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#institutional-holder-13f---institutional-stock-ownership|FMP Institutional Holders Documentation}
|
|
1643
3361
|
*/
|
|
1644
|
-
|
|
3362
|
+
getInstitutionalHolders(params: {
|
|
1645
3363
|
symbol: string;
|
|
1646
|
-
}): Promise<APIResponse<
|
|
3364
|
+
}): Promise<APIResponse<InstitutionalHolderResponse[]>>;
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
declare class InsiderEndpoints {
|
|
3368
|
+
private client;
|
|
3369
|
+
constructor(client: FMPClient);
|
|
1647
3370
|
/**
|
|
1648
|
-
* Get
|
|
1649
|
-
*
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
3371
|
+
* Get insider trading RSS feed data
|
|
3372
|
+
*
|
|
3373
|
+
* Provides real-time RSS feed of insider trading activities across all
|
|
3374
|
+
* publicly traded companies. Essential for monitoring insider trading
|
|
3375
|
+
* patterns, corporate governance, and potential market-moving events.
|
|
3376
|
+
*
|
|
3377
|
+
* @param params - RSS feed request parameters
|
|
3378
|
+
* @param params.page - Page number for pagination (default: 0)
|
|
3379
|
+
*
|
|
3380
|
+
* @returns Promise resolving to array of insider trading RSS feed data
|
|
3381
|
+
*
|
|
3382
|
+
* @example
|
|
3383
|
+
* ```typescript
|
|
3384
|
+
* // Get first page of insider trading RSS feed
|
|
3385
|
+
* const rssFeed = await fmp.insider.getInsiderTradingRSS({ page: 0 });
|
|
3386
|
+
* rssFeed.data.forEach(trade => {
|
|
3387
|
+
* console.log(`${trade.date}: ${trade.symbol} - ${trade.insiderName} ${trade.transactionType}`);
|
|
3388
|
+
* });
|
|
3389
|
+
*
|
|
3390
|
+
* // Get second page of RSS feed
|
|
3391
|
+
* const nextPage = await fmp.insider.getInsiderTradingRSS({ page: 1 });
|
|
3392
|
+
* ```
|
|
3393
|
+
*
|
|
3394
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#insider-trades-rss-insider-trading|FMP Insider Trading RSS Documentation}
|
|
3395
|
+
*/
|
|
3396
|
+
getInsiderTradingRSS(params: {
|
|
3397
|
+
page?: number;
|
|
3398
|
+
}): Promise<APIResponse<InsiderTradingRSSResponse[]>>;
|
|
3399
|
+
/**
|
|
3400
|
+
* Search for insider trades with advanced filtering
|
|
3401
|
+
*
|
|
3402
|
+
* Provides comprehensive insider trading data with multiple filtering options
|
|
3403
|
+
* including symbol, CIK numbers, and transaction types. Essential for detailed
|
|
3404
|
+
* analysis of insider trading patterns and corporate governance.
|
|
3405
|
+
*
|
|
3406
|
+
* @param params - Insider trading search parameters
|
|
3407
|
+
* @param params.symbol - Stock symbol to filter by (optional)
|
|
3408
|
+
* @param params.reportingCik - Reporting CIK to filter by (optional)
|
|
3409
|
+
* @param params.companyCik - Company CIK to filter by (optional)
|
|
3410
|
+
* @param params.transactionType - Transaction type to filter by (optional)
|
|
3411
|
+
* @param params.page - Page number for pagination (default: 0)
|
|
3412
|
+
*
|
|
3413
|
+
* @returns Promise resolving to array of insider trading search results
|
|
3414
|
+
*
|
|
3415
|
+
* @example
|
|
3416
|
+
* ```typescript
|
|
3417
|
+
* // Search for Apple insider trades
|
|
3418
|
+
* const appleTrades = await fmp.insider.searchInsiderTrading({
|
|
3419
|
+
* symbol: 'AAPL',
|
|
3420
|
+
* page: 0
|
|
3421
|
+
* });
|
|
3422
|
+
* appleTrades.data.forEach(trade => {
|
|
3423
|
+
* console.log(`${trade.date}: ${trade.insiderName} - ${trade.transactionType} ${trade.sharesTraded} shares`);
|
|
3424
|
+
* });
|
|
3425
|
+
*
|
|
3426
|
+
* // Search by transaction type
|
|
3427
|
+
* const purchases = await fmp.insider.searchInsiderTrading({
|
|
3428
|
+
* transactionType: 'P-Purchase',
|
|
3429
|
+
* page: 0
|
|
3430
|
+
* });
|
|
3431
|
+
*
|
|
3432
|
+
* // Search by CIK
|
|
3433
|
+
* const cikTrades = await fmp.insider.searchInsiderTrading({
|
|
3434
|
+
* companyCik: '0000320193',
|
|
3435
|
+
* page: 0
|
|
3436
|
+
* });
|
|
3437
|
+
* ```
|
|
3438
|
+
*
|
|
3439
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#insider-trades-search-insider-trading|FMP Insider Trading Search Documentation}
|
|
3440
|
+
*/
|
|
3441
|
+
searchInsiderTrading(params: {
|
|
3442
|
+
symbol?: string;
|
|
3443
|
+
reportingCik?: string;
|
|
3444
|
+
companyCik?: string;
|
|
3445
|
+
transactionType?: string;
|
|
3446
|
+
page?: number;
|
|
3447
|
+
}): Promise<APIResponse<InsiderTradingSearchResponse[]>>;
|
|
3448
|
+
/**
|
|
3449
|
+
* Get all available transaction types
|
|
3450
|
+
*
|
|
3451
|
+
* Provides a comprehensive list of all insider trading transaction types
|
|
3452
|
+
* used in SEC filings. Essential for understanding different types of
|
|
3453
|
+
* insider trading activities and filtering search results.
|
|
3454
|
+
*
|
|
3455
|
+
* @returns Promise resolving to array of transaction types with descriptions
|
|
3456
|
+
*
|
|
3457
|
+
* @example
|
|
3458
|
+
* ```typescript
|
|
3459
|
+
* // Get all transaction types
|
|
3460
|
+
* const transactionTypes = await fmp.insider.getTransactionTypes();
|
|
3461
|
+
* transactionTypes.data.forEach(type => {
|
|
3462
|
+
* console.log(`${type.code}: ${type.description}`);
|
|
3463
|
+
* });
|
|
3464
|
+
* ```
|
|
3465
|
+
*
|
|
3466
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#transaction-types-insider-trading|FMP Transaction Types Documentation}
|
|
3467
|
+
*/
|
|
3468
|
+
getTransactionTypes(): Promise<APIResponse<TransactionTypesResponse>>;
|
|
3469
|
+
/**
|
|
3470
|
+
* Get insiders roster for a specific company
|
|
3471
|
+
*
|
|
3472
|
+
* Provides a list of all insiders (officers, directors, and beneficial owners)
|
|
3473
|
+
* for a specific company. Essential for understanding corporate governance
|
|
3474
|
+
* structure and identifying key personnel.
|
|
3475
|
+
*
|
|
3476
|
+
* @param params - Insiders request parameters
|
|
3477
|
+
* @param params.symbol - Stock symbol to get insiders for
|
|
3478
|
+
*
|
|
3479
|
+
* @returns Promise resolving to array of insiders data for the company
|
|
3480
|
+
*
|
|
3481
|
+
* @example
|
|
3482
|
+
* ```typescript
|
|
3483
|
+
* // Get Apple's insiders roster
|
|
3484
|
+
* const appleInsiders = await fmp.insider.getInsidersBySymbol({ symbol: 'AAPL' });
|
|
3485
|
+
* appleInsiders.data.forEach(insider => {
|
|
3486
|
+
* console.log(`${insider.name} - ${insider.title} (${insider.cik})`);
|
|
3487
|
+
* });
|
|
3488
|
+
*
|
|
3489
|
+
* // Get Microsoft's insiders
|
|
3490
|
+
* const msftInsiders = await fmp.insider.getInsidersBySymbol({ symbol: 'MSFT' });
|
|
3491
|
+
* ```
|
|
3492
|
+
*
|
|
3493
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#insiders-by-symbol-insider-trading|FMP Insiders by Symbol Documentation}
|
|
3494
|
+
*/
|
|
3495
|
+
getInsidersBySymbol(params: {
|
|
3496
|
+
symbol: string;
|
|
3497
|
+
}): Promise<APIResponse<InsidersBySymbolResponse[]>>;
|
|
3498
|
+
/**
|
|
3499
|
+
* Get insider trade statistics for a company
|
|
3500
|
+
*
|
|
3501
|
+
* Provides comprehensive statistics on insider trading activity for a
|
|
3502
|
+
* specific company including total trades, volume, and value metrics.
|
|
3503
|
+
* Essential for analyzing insider trading patterns and sentiment.
|
|
3504
|
+
*
|
|
3505
|
+
* @param params - Statistics request parameters
|
|
3506
|
+
* @param params.symbol - Stock symbol to get statistics for
|
|
3507
|
+
*
|
|
3508
|
+
* @returns Promise resolving to array of insider trade statistics data
|
|
3509
|
+
*
|
|
3510
|
+
* @example
|
|
3511
|
+
* ```typescript
|
|
3512
|
+
* // Get Apple's insider trade statistics
|
|
3513
|
+
* const appleStats = await fmp.insider.getInsiderTradeStatistics({ symbol: 'AAPL' });
|
|
3514
|
+
* appleStats.data.forEach(stat => {
|
|
3515
|
+
* console.log(`${stat.insiderName}: ${stat.totalTrades} trades, ${stat.totalShares} shares`);
|
|
3516
|
+
* });
|
|
3517
|
+
*
|
|
3518
|
+
* // Get Microsoft's statistics
|
|
3519
|
+
* const msftStats = await fmp.insider.getInsiderTradeStatistics({ symbol: 'MSFT' });
|
|
3520
|
+
* ```
|
|
3521
|
+
*
|
|
3522
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#insider-trade-statistics-insider-trading|FMP Insider Trade Statistics Documentation}
|
|
3523
|
+
*/
|
|
3524
|
+
getInsiderTradeStatistics(params: {
|
|
3525
|
+
symbol: string;
|
|
3526
|
+
}): Promise<APIResponse<InsiderTradeStatisticsResponse[]>>;
|
|
3527
|
+
/**
|
|
3528
|
+
* Get CIK mapper data
|
|
3529
|
+
*
|
|
3530
|
+
* Provides a mapping between CIK (Central Index Key) numbers and company
|
|
3531
|
+
* names. Essential for converting between CIK numbers and company
|
|
3532
|
+
* identifiers in insider trading analysis.
|
|
3533
|
+
*
|
|
3534
|
+
* @param params - CIK mapper request parameters
|
|
3535
|
+
* @param params.page - Page number for pagination (default: 0)
|
|
3536
|
+
*
|
|
3537
|
+
* @returns Promise resolving to array of CIK mapper data
|
|
3538
|
+
*
|
|
3539
|
+
* @example
|
|
3540
|
+
* ```typescript
|
|
3541
|
+
* // Get first page of CIK mapper
|
|
3542
|
+
* const cikMapper = await fmp.insider.getCikMapper({ page: 0 });
|
|
3543
|
+
* cikMapper.data.forEach(mapping => {
|
|
3544
|
+
* console.log(`CIK: ${mapping.cik} - Company: ${mapping.name}`);
|
|
3545
|
+
* });
|
|
3546
|
+
*
|
|
3547
|
+
* // Get second page
|
|
3548
|
+
* const nextPage = await fmp.insider.getCikMapper({ page: 1 });
|
|
3549
|
+
* ```
|
|
3550
|
+
*
|
|
3551
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#cik-mapper-insider-trading|FMP CIK Mapper Documentation}
|
|
3552
|
+
*/
|
|
3553
|
+
getCikMapper(params: {
|
|
3554
|
+
page?: number;
|
|
3555
|
+
}): Promise<APIResponse<CikMapperResponse[]>>;
|
|
3556
|
+
/**
|
|
3557
|
+
* Get CIK mapper by name search
|
|
3558
|
+
*
|
|
3559
|
+
* Provides CIK numbers and company names matching a search term.
|
|
3560
|
+
* Useful for finding companies by partial name matches and
|
|
3561
|
+
* converting company names to CIK numbers.
|
|
3562
|
+
*
|
|
3563
|
+
* @param params - CIK mapper by name request parameters
|
|
3564
|
+
* @param params.name - Company name or partial name to search for
|
|
3565
|
+
* @param params.page - Page number for pagination (default: 0)
|
|
3566
|
+
*
|
|
3567
|
+
* @returns Promise resolving to array of CIK mapper data matching the search
|
|
3568
|
+
*
|
|
3569
|
+
* @example
|
|
3570
|
+
* ```typescript
|
|
3571
|
+
* // Search for Apple by name
|
|
3572
|
+
* const appleCik = await fmp.insider.getCikMapperByName({
|
|
3573
|
+
* name: 'Apple',
|
|
3574
|
+
* page: 0
|
|
3575
|
+
* });
|
|
3576
|
+
* appleCik.data.forEach(mapping => {
|
|
3577
|
+
* console.log(`CIK: ${mapping.cik} - Company: ${mapping.name}`);
|
|
3578
|
+
* });
|
|
3579
|
+
*
|
|
3580
|
+
* // Search for Microsoft
|
|
3581
|
+
* const msftCik = await fmp.insider.getCikMapperByName({
|
|
3582
|
+
* name: 'Microsoft',
|
|
3583
|
+
* page: 0
|
|
3584
|
+
* });
|
|
3585
|
+
* ```
|
|
3586
|
+
*
|
|
3587
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#cik-mapper-by-name-insider-trading|FMP CIK Mapper by Name Documentation}
|
|
3588
|
+
*/
|
|
3589
|
+
getCikMapperByName(params: {
|
|
3590
|
+
name: string;
|
|
3591
|
+
page?: number;
|
|
3592
|
+
}): Promise<APIResponse<CikMapperResponse[]>>;
|
|
3593
|
+
/**
|
|
3594
|
+
* Get CIK mapper by symbol
|
|
3595
|
+
*
|
|
3596
|
+
* Provides CIK number and company name for a specific stock symbol.
|
|
3597
|
+
* Essential for converting stock symbols to CIK numbers for use
|
|
3598
|
+
* in insider trading searches and analysis.
|
|
3599
|
+
*
|
|
3600
|
+
* @param params - CIK mapper by symbol request parameters
|
|
3601
|
+
* @param params.symbol - Stock symbol to get CIK for
|
|
3602
|
+
*
|
|
3603
|
+
* @returns Promise resolving to CIK mapper data for the symbol
|
|
3604
|
+
*
|
|
3605
|
+
* @example
|
|
3606
|
+
* ```typescript
|
|
3607
|
+
* // Get Apple's CIK by symbol
|
|
3608
|
+
* const appleCik = await fmp.insider.getCikMapperBySymbol({ symbol: 'AAPL' });
|
|
3609
|
+
* console.log(`Apple CIK: ${appleCik.data.cik} - ${appleCik.data.name}`);
|
|
3610
|
+
*
|
|
3611
|
+
* // Get Microsoft's CIK
|
|
3612
|
+
* const msftCik = await fmp.insider.getCikMapperBySymbol({ symbol: 'MSFT' });
|
|
3613
|
+
* ```
|
|
3614
|
+
*
|
|
3615
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#cik-mapper-company-insider-trading|FMP CIK Mapper by Symbol Documentation}
|
|
3616
|
+
*/
|
|
3617
|
+
getCikMapperBySymbol(params: {
|
|
3618
|
+
symbol: string;
|
|
3619
|
+
}): Promise<APIResponse<CikMapperBySymbolResponse>>;
|
|
3620
|
+
/**
|
|
3621
|
+
* Get beneficial ownership acquisitions
|
|
3622
|
+
*
|
|
3623
|
+
* Provides data on acquisitions of beneficial ownership for a specific
|
|
3624
|
+
* company. Essential for tracking significant ownership changes and
|
|
3625
|
+
* corporate governance events.
|
|
3626
|
+
*
|
|
3627
|
+
* @param params - Beneficial ownership request parameters
|
|
3628
|
+
* @param params.symbol - Stock symbol to get beneficial ownership data for
|
|
3629
|
+
*
|
|
3630
|
+
* @returns Promise resolving to array of beneficial ownership acquisition data
|
|
3631
|
+
*
|
|
3632
|
+
* @example
|
|
3633
|
+
* ```typescript
|
|
3634
|
+
* // Get Apple's beneficial ownership acquisitions
|
|
3635
|
+
* const appleOwnership = await fmp.insider.getBeneficialOwnership({ symbol: 'AAPL' });
|
|
3636
|
+
* appleOwnership.data.forEach(acquisition => {
|
|
3637
|
+
* console.log(`${acquisition.date}: ${acquisition.insiderName} acquired ${acquisition.sharesAcquired} shares`);
|
|
3638
|
+
* });
|
|
3639
|
+
*
|
|
3640
|
+
* // Get Microsoft's beneficial ownership
|
|
3641
|
+
* const msftOwnership = await fmp.insider.getBeneficialOwnership({ symbol: 'MSFT' });
|
|
3642
|
+
* ```
|
|
3643
|
+
*
|
|
3644
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#acquisition-of-beneficial-ownership|FMP Beneficial Ownership Documentation}
|
|
3645
|
+
*/
|
|
3646
|
+
getBeneficialOwnership(params: {
|
|
3647
|
+
symbol: string;
|
|
3648
|
+
}): Promise<APIResponse<BeneficialOwnershipResponse[]>>;
|
|
3649
|
+
/**
|
|
3650
|
+
* Get fail to deliver data
|
|
3651
|
+
*
|
|
3652
|
+
* Provides fail to deliver data for a specific company, which indicates
|
|
3653
|
+
* when market participants fail to deliver securities on settlement date.
|
|
3654
|
+
* Important for understanding market mechanics and potential short interest.
|
|
3655
|
+
*
|
|
3656
|
+
* @param params - Fail to deliver request parameters
|
|
3657
|
+
* @param params.symbol - Stock symbol to get fail to deliver data for
|
|
3658
|
+
* @param params.page - Page number for pagination (default: 0)
|
|
3659
|
+
*
|
|
3660
|
+
* @returns Promise resolving to array of fail to deliver data
|
|
3661
|
+
*
|
|
3662
|
+
* @example
|
|
3663
|
+
* ```typescript
|
|
3664
|
+
* // Get Apple's fail to deliver data
|
|
3665
|
+
* const appleFailToDeliver = await fmp.insider.getFailToDeliver({
|
|
3666
|
+
* symbol: 'AAPL',
|
|
3667
|
+
* page: 0
|
|
3668
|
+
* });
|
|
3669
|
+
* appleFailToDeliver.data.forEach(entry => {
|
|
3670
|
+
* console.log(`${entry.date}: ${entry.shares} shares failed to deliver`);
|
|
3671
|
+
* });
|
|
3672
|
+
*
|
|
3673
|
+
* // Get Microsoft's fail to deliver data
|
|
3674
|
+
* const msftFailToDeliver = await fmp.insider.getFailToDeliver({
|
|
3675
|
+
* symbol: 'MSFT',
|
|
3676
|
+
* page: 0
|
|
3677
|
+
* });
|
|
3678
|
+
* ```
|
|
3679
|
+
*
|
|
3680
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#fail-to-deliver|FMP Fail to Deliver Documentation}
|
|
3681
|
+
*/
|
|
3682
|
+
getFailToDeliver(params: {
|
|
3683
|
+
symbol: string;
|
|
3684
|
+
page?: number;
|
|
3685
|
+
}): Promise<APIResponse<FailToDeliverResponse[]>>;
|
|
3686
|
+
/**
|
|
3687
|
+
* Get all insider trades for a symbol (convenience method)
|
|
3688
|
+
* @param symbol - The stock symbol to get insider trades for
|
|
3689
|
+
* @param page - Page number for pagination (default: 0)
|
|
3690
|
+
* @returns A list of insider trades for the specified symbol
|
|
3691
|
+
*/
|
|
3692
|
+
getInsiderTradesBySymbol(symbol: string, page?: number): Promise<APIResponse<InsiderTradingSearchResponse[]>>;
|
|
3693
|
+
/**
|
|
3694
|
+
* Get insider trades by transaction type (convenience method)
|
|
3695
|
+
* @param transactionType - The transaction type to filter by
|
|
3696
|
+
* @param page - Page number for pagination (default: 0)
|
|
3697
|
+
* @returns A list of insider trades filtered by transaction type
|
|
3698
|
+
*/
|
|
3699
|
+
getInsiderTradesByType(transactionType: TransactionType | string, page?: number): Promise<APIResponse<InsiderTradingSearchResponse[]>>;
|
|
3700
|
+
/**
|
|
3701
|
+
* Get insider trades by reporting CIK (convenience method)
|
|
3702
|
+
* @param reportingCik - The reporting CIK to filter by
|
|
3703
|
+
* @param page - Page number for pagination (default: 0)
|
|
3704
|
+
* @returns A list of insider trades filtered by reporting CIK
|
|
3705
|
+
*/
|
|
3706
|
+
getInsiderTradesByReportingCik(reportingCik: string, page?: number): Promise<APIResponse<InsiderTradingSearchResponse[]>>;
|
|
3707
|
+
/**
|
|
3708
|
+
* Get insider trades by company CIK (convenience method)
|
|
3709
|
+
* @param companyCik - The company CIK to filter by
|
|
3710
|
+
* @param page - Page number for pagination (default: 0)
|
|
3711
|
+
* @returns A list of insider trades filtered by company CIK
|
|
3712
|
+
*/
|
|
3713
|
+
getInsiderTradesByCompanyCik(companyCik: string, page?: number): Promise<APIResponse<InsiderTradingSearchResponse[]>>;
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3716
|
+
declare class SECEndpoints {
|
|
3717
|
+
private client;
|
|
3718
|
+
constructor(client: FMPClient);
|
|
3719
|
+
/**
|
|
3720
|
+
* Get RSS feed of SEC filings
|
|
3721
|
+
*
|
|
3722
|
+
* Provides a real-time feed of SEC filings from publicly traded companies,
|
|
3723
|
+
* including filing types, links to SEC pages, and direct links to filings.
|
|
3724
|
+
* Essential for staying up-to-date on the latest SEC filings for all companies
|
|
3725
|
+
* or for monitoring specific companies' regulatory activities.
|
|
3726
|
+
*
|
|
3727
|
+
* @param params - RSS feed parameters (optional)
|
|
3728
|
+
* @returns Promise resolving to array of RSS feed items with SEC filing information
|
|
3729
|
+
*
|
|
3730
|
+
* @example
|
|
3731
|
+
* ```typescript
|
|
3732
|
+
* // Get all recent SEC filings
|
|
3733
|
+
* const allFilings = await fmp.sec.getRSSFeed();
|
|
3734
|
+
* console.log(`Recent SEC filings: ${allFilings.data.length}`);
|
|
3735
|
+
*
|
|
3736
|
+
* // Get specific filing type
|
|
3737
|
+
* const form4Filings = await fmp.sec.getRSSFeed({ type: '4' });
|
|
3738
|
+
* console.log(`Form 4 filings: ${form4Filings.data.length}`);
|
|
3739
|
+
*
|
|
3740
|
+
* // Get filings with date range
|
|
3741
|
+
* const recentFilings = await fmp.sec.getRSSFeed({
|
|
3742
|
+
* from: '2024-01-01',
|
|
3743
|
+
* to: '2024-01-31'
|
|
3744
|
+
* });
|
|
3745
|
+
* console.log(`Recent filings: ${recentFilings.data.length}`);
|
|
3746
|
+
*
|
|
3747
|
+
* // Get limited results
|
|
3748
|
+
* const limitedFilings = await fmp.sec.getRSSFeed({ limit: 10 });
|
|
3749
|
+
* console.log(`Limited filings: ${limitedFilings.data.length}`);
|
|
3750
|
+
* ```
|
|
3751
|
+
*
|
|
3752
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#rss-feed-securities-and-exchange-commission-(s.e.c)|FMP RSS Feed Documentation}
|
|
3753
|
+
*/
|
|
3754
|
+
getRSSFeed(params?: {
|
|
3755
|
+
limit?: number;
|
|
3756
|
+
type?: string;
|
|
3757
|
+
from?: string;
|
|
3758
|
+
to?: string;
|
|
3759
|
+
isDone?: boolean;
|
|
3760
|
+
}): Promise<APIResponse<RSSFeedItem[]>>;
|
|
3761
|
+
/**
|
|
3762
|
+
* Get comprehensive RSS feed of all SEC filings
|
|
3763
|
+
*
|
|
3764
|
+
* Provides a comprehensive real-time feed of all SEC filings from publicly
|
|
3765
|
+
* traded companies in the latest RSS feed format. This endpoint offers the
|
|
3766
|
+
* most complete overview of SEC filings with enhanced metadata and formatting.
|
|
3767
|
+
*
|
|
3768
|
+
* @param params - RSS feed all parameters (optional)
|
|
3769
|
+
* @returns Promise resolving to array of comprehensive RSS feed items with enhanced SEC filing information
|
|
3770
|
+
*
|
|
3771
|
+
* @example
|
|
3772
|
+
* ```typescript
|
|
3773
|
+
* // Get all comprehensive SEC filings
|
|
3774
|
+
* const allFilings = await fmp.sec.getRSSFeedAll();
|
|
3775
|
+
* console.log(`Comprehensive SEC filings: ${allFilings.data.length}`);
|
|
3776
|
+
*
|
|
3777
|
+
* // Get paginated results
|
|
3778
|
+
* const page2Filings = await fmp.sec.getRSSFeedAll({ page: 1 });
|
|
3779
|
+
* console.log(`Page 2 filings: ${page2Filings.data.length}`);
|
|
3780
|
+
*
|
|
3781
|
+
* // Get specific data type
|
|
3782
|
+
* const specificData = await fmp.sec.getRSSFeedAll({ datatype: 'json' });
|
|
3783
|
+
* console.log(`Specific data type filings: ${specificData.data.length}`);
|
|
3784
|
+
* ```
|
|
3785
|
+
*
|
|
3786
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#rss-feed-all-securities-and-exchange-commission-(s.e.c)|FMP RSS Feed All Documentation}
|
|
3787
|
+
*/
|
|
3788
|
+
getRSSFeedAll(params?: {
|
|
3789
|
+
page?: number;
|
|
3790
|
+
datatype?: string;
|
|
3791
|
+
}): Promise<APIResponse<RSSFeedAllItem[]>>;
|
|
3792
|
+
/**
|
|
3793
|
+
* Get RSS feed V3 of SEC filings
|
|
3794
|
+
*
|
|
3795
|
+
* Provides a real-time feed of SEC filings from publicly traded companies
|
|
3796
|
+
* in the V3 RSS feed format. This version offers enhanced metadata and
|
|
3797
|
+
* improved structure for better parsing and analysis of SEC filings.
|
|
3798
|
+
*
|
|
3799
|
+
* @param params - RSS feed V3 parameters (optional)
|
|
3800
|
+
* @returns Promise resolving to array of V3 RSS feed items with enhanced SEC filing information
|
|
3801
|
+
*
|
|
3802
|
+
* @example
|
|
3803
|
+
* ```typescript
|
|
3804
|
+
* // Get V3 format SEC filings
|
|
3805
|
+
* const v3Filings = await fmp.sec.getRSSFeedV3();
|
|
3806
|
+
* console.log(`V3 SEC filings: ${v3Filings.data.length}`);
|
|
3807
|
+
*
|
|
3808
|
+
* // Get paginated V3 results
|
|
3809
|
+
* const page2V3 = await fmp.sec.getRSSFeedV3({ page: 1 });
|
|
3810
|
+
* console.log(`Page 2 V3 filings: ${page2V3.data.length}`);
|
|
3811
|
+
*
|
|
3812
|
+
* // Get specific data type
|
|
3813
|
+
* const specificV3 = await fmp.sec.getRSSFeedV3({ datatype: 'json' });
|
|
3814
|
+
* console.log(`Specific V3 data type: ${specificV3.data.length}`);
|
|
3815
|
+
* ```
|
|
3816
|
+
*
|
|
3817
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#rss-feed-v3-securities-and-exchange-commission-(s.e.c)|FMP RSS Feed V3 Documentation}
|
|
1654
3818
|
*/
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
}): Promise<APIResponse<EarningsCallTranscript[]>>;
|
|
3819
|
+
getRSSFeedV3(params?: {
|
|
3820
|
+
page?: number;
|
|
3821
|
+
datatype?: string;
|
|
3822
|
+
}): Promise<APIResponse<RSSFeedV3Item[]>>;
|
|
1660
3823
|
/**
|
|
1661
|
-
* Get
|
|
1662
|
-
*
|
|
1663
|
-
*
|
|
1664
|
-
*
|
|
3824
|
+
* Get RSS feed of 8-K SEC filings
|
|
3825
|
+
*
|
|
3826
|
+
* Provides a real-time feed specifically for 8-K SEC filings from publicly
|
|
3827
|
+
* traded companies. 8-K filings are used to announce major events that
|
|
3828
|
+
* shareholders should know about, such as earnings releases, mergers,
|
|
3829
|
+
* acquisitions, and other material events.
|
|
3830
|
+
*
|
|
3831
|
+
* @param params - RSS feed 8-K parameters (optional)
|
|
3832
|
+
* @returns Promise resolving to array of 8-K RSS feed items with material event information
|
|
3833
|
+
*
|
|
3834
|
+
* @example
|
|
3835
|
+
* ```typescript
|
|
3836
|
+
* // Get all 8-K filings
|
|
3837
|
+
* const form8KFilings = await fmp.sec.getRSSFeed8K();
|
|
3838
|
+
* console.log(`8-K filings: ${form8KFilings.data.length}`);
|
|
3839
|
+
*
|
|
3840
|
+
* // Get 8-K filings with date range
|
|
3841
|
+
* const recent8K = await fmp.sec.getRSSFeed8K({
|
|
3842
|
+
* from: '2024-01-01',
|
|
3843
|
+
* to: '2024-01-31'
|
|
3844
|
+
* });
|
|
3845
|
+
* console.log(`Recent 8-K filings: ${recent8K.data.length}`);
|
|
3846
|
+
*
|
|
3847
|
+
* // Get 8-K filings with financials
|
|
3848
|
+
* const financial8K = await fmp.sec.getRSSFeed8K({ hasFinancial: true });
|
|
3849
|
+
* console.log(`8-K filings with financials: ${financial8K.data.length}`);
|
|
3850
|
+
*
|
|
3851
|
+
* // Get limited 8-K results
|
|
3852
|
+
* const limited8K = await fmp.sec.getRSSFeed8K({ limit: 10 });
|
|
3853
|
+
* console.log(`Limited 8-K filings: ${limited8K.data.length}`);
|
|
3854
|
+
* ```
|
|
3855
|
+
*
|
|
3856
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#rss-feed-8-k-securities-and-exchange-commission-(s.e.c)|FMP RSS Feed 8-K Documentation}
|
|
1665
3857
|
*/
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
constructor(client: FMPClient);
|
|
3858
|
+
getRSSFeed8K(params?: {
|
|
3859
|
+
page?: number;
|
|
3860
|
+
from?: string;
|
|
3861
|
+
to?: string;
|
|
3862
|
+
hasFinancial?: boolean;
|
|
3863
|
+
limit?: number;
|
|
3864
|
+
}): Promise<APIResponse<RSSFeed8KItem[]>>;
|
|
1674
3865
|
/**
|
|
1675
|
-
* Get
|
|
1676
|
-
*
|
|
1677
|
-
*
|
|
3866
|
+
* Get SEC filings for a specific company
|
|
3867
|
+
*
|
|
3868
|
+
* Provides direct access to SEC filings for a specific company, including
|
|
3869
|
+
* filing types, links to SEC pages, and direct links to specific filings.
|
|
3870
|
+
* Essential for monitoring a company's regulatory compliance and staying
|
|
3871
|
+
* informed about important corporate events and disclosures.
|
|
3872
|
+
*
|
|
3873
|
+
* @param symbol - The stock symbol to get SEC filings for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
3874
|
+
* @param params - SEC filings parameters (optional)
|
|
3875
|
+
* @returns Promise resolving to array of SEC filings with detailed filing information
|
|
3876
|
+
*
|
|
3877
|
+
* @example
|
|
3878
|
+
* ```typescript
|
|
3879
|
+
* // Get all SEC filings for Apple
|
|
3880
|
+
* const appleFilings = await fmp.sec.getSECFilings({ symbol: 'AAPL' });
|
|
3881
|
+
* console.log(`Apple SEC filings: ${appleFilings.data.length}`);
|
|
3882
|
+
*
|
|
3883
|
+
* // Get specific filing type for Microsoft
|
|
3884
|
+
* const msftForm4 = await fmp.sec.getSECFilings({
|
|
3885
|
+
* symbol: 'MSFT',
|
|
3886
|
+
* params: { type: '4' }
|
|
3887
|
+
* });
|
|
3888
|
+
* console.log(`Microsoft Form 4 filings: ${msftForm4.data.length}`);
|
|
3889
|
+
* ```
|
|
3890
|
+
*
|
|
3891
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#sec-filings-securities-and-exchange-commission-(s.e.c)|FMP SEC Filings Documentation}
|
|
1678
3892
|
*/
|
|
1679
|
-
|
|
3893
|
+
getSECFilings({ symbol, params, }: {
|
|
3894
|
+
symbol: string;
|
|
3895
|
+
params?: {
|
|
3896
|
+
type?: string;
|
|
3897
|
+
page?: number;
|
|
3898
|
+
};
|
|
3899
|
+
}): Promise<APIResponse<SECFiling[]>>;
|
|
1680
3900
|
/**
|
|
1681
|
-
* Get
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
3901
|
+
* Get individual industry classification for a company
|
|
3902
|
+
*
|
|
3903
|
+
* Provides the industry classification for a specific company based on the
|
|
3904
|
+
* Standard Industrial Classification (SIC) system. Essential for understanding
|
|
3905
|
+
* a company's business sector, industry peers, and market positioning.
|
|
3906
|
+
*
|
|
3907
|
+
* @param params - Industry classification parameters
|
|
3908
|
+
* @returns Promise resolving to industry classification data with SIC code and description
|
|
3909
|
+
*
|
|
3910
|
+
* @example
|
|
3911
|
+
* ```typescript
|
|
3912
|
+
* // Get Apple's industry classification by symbol
|
|
3913
|
+
* const appleIndustry = await fmp.sec.getIndividualIndustryClassification({ symbol: 'AAPL' });
|
|
3914
|
+
* console.log(`Apple Industry: ${appleIndustry.data.industryTitle}`);
|
|
3915
|
+
* console.log(`SIC Code: ${appleIndustry.data.sicCode}`);
|
|
3916
|
+
*
|
|
3917
|
+
* // Get industry classification by CIK
|
|
3918
|
+
* const cikIndustry = await fmp.sec.getIndividualIndustryClassification({ cik: 320193 });
|
|
3919
|
+
* console.log(`CIK Industry: ${cikIndustry.data.industryTitle}`);
|
|
3920
|
+
*
|
|
3921
|
+
* // Get industry classification by SIC code
|
|
3922
|
+
* const sicIndustry = await fmp.sec.getIndividualIndustryClassification({ sicCode: 3571 });
|
|
3923
|
+
* console.log(`SIC Industry: ${sicIndustry.data.industryTitle}`);
|
|
3924
|
+
* ```
|
|
3925
|
+
*
|
|
3926
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#individual-industry-classification-standard-industrial-classification|FMP Individual Industry Classification Documentation}
|
|
1684
3927
|
*/
|
|
1685
|
-
|
|
3928
|
+
getIndividualIndustryClassification(params: {
|
|
3929
|
+
symbol?: string;
|
|
3930
|
+
cik?: string;
|
|
3931
|
+
sicCode?: number;
|
|
3932
|
+
}): Promise<APIResponse<IndustryClassification>>;
|
|
1686
3933
|
/**
|
|
1687
|
-
* Get
|
|
1688
|
-
*
|
|
1689
|
-
*
|
|
3934
|
+
* Get all industry classifications
|
|
3935
|
+
*
|
|
3936
|
+
* Provides a comprehensive overview of all industries classified according
|
|
3937
|
+
* to the Standard Industrial Classification (SIC) system. Essential for
|
|
3938
|
+
* understanding industry categories, sector analysis, and market research.
|
|
3939
|
+
*
|
|
3940
|
+
* @returns Promise resolving to array of all industry classifications with SIC codes and descriptions
|
|
3941
|
+
*
|
|
3942
|
+
* @example
|
|
3943
|
+
* ```typescript
|
|
3944
|
+
* // Get all industry classifications
|
|
3945
|
+
* const allIndustries = await fmp.sec.getAllIndustryClassifications();
|
|
3946
|
+
* console.log(`Total industries: ${allIndustries.data.length}`);
|
|
3947
|
+
*
|
|
3948
|
+
* allIndustries.data.forEach((industry, index) => {
|
|
3949
|
+
* console.log(`${index + 1}. ${industry.industryTitle}`);
|
|
3950
|
+
* console.log(` SIC Code: ${industry.sicCode}`);
|
|
3951
|
+
* });
|
|
3952
|
+
*
|
|
3953
|
+
* // Find specific industry
|
|
3954
|
+
* const techIndustry = allIndustries.data.find(industry =>
|
|
3955
|
+
* industry.industryTitle.toLowerCase().includes('computer')
|
|
3956
|
+
* );
|
|
3957
|
+
* console.log(`Tech Industry: ${techIndustry?.industryTitle}`);
|
|
3958
|
+
* ```
|
|
3959
|
+
*
|
|
3960
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#all-industry-classification-standard-industrial-classification|FMP All Industry Classifications Documentation}
|
|
1690
3961
|
*/
|
|
1691
|
-
|
|
3962
|
+
getAllIndustryClassifications(): Promise<APIResponse<IndustryClassification[]>>;
|
|
1692
3963
|
/**
|
|
1693
|
-
* Get
|
|
1694
|
-
*
|
|
1695
|
-
*
|
|
3964
|
+
* Get industry classification codes
|
|
3965
|
+
*
|
|
3966
|
+
* Provides detailed information about the Standard Industrial Classification
|
|
3967
|
+
* (SIC) system and helps identify SIC codes for specific industries.
|
|
3968
|
+
* Essential for understanding industry categorization and sector analysis.
|
|
3969
|
+
*
|
|
3970
|
+
* @param params - Industry classification codes parameters
|
|
3971
|
+
* @returns Promise resolving to array of industry classification codes with detailed information
|
|
3972
|
+
*
|
|
3973
|
+
* @example
|
|
3974
|
+
* ```typescript
|
|
3975
|
+
* // Get all industry classification codes
|
|
3976
|
+
* const allCodes = await fmp.sec.getIndustryClassificationCodes({});
|
|
3977
|
+
* console.log(`Total SIC codes: ${allCodes.data.length}`);
|
|
3978
|
+
*
|
|
3979
|
+
* // Search for specific SIC code
|
|
3980
|
+
* const code3571 = await fmp.sec.getIndustryClassificationCodes({ sicCode: 3571 });
|
|
3981
|
+
* console.log(`SIC 3571: ${code3571.data[0]?.industryTitle}`);
|
|
3982
|
+
*
|
|
3983
|
+
* // Search for industry by title
|
|
3984
|
+
* const computerIndustry = await fmp.sec.getIndustryClassificationCodes({ industryTitle: 'Computer' });
|
|
3985
|
+
* console.log(`Computer-related industries: ${computerIndustry.data.length}`);
|
|
3986
|
+
* ```
|
|
3987
|
+
*
|
|
3988
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#industry-classification-codes-standard-industrial-classification|FMP Industry Classification Codes Documentation}
|
|
1696
3989
|
*/
|
|
1697
|
-
|
|
3990
|
+
getIndustryClassificationCodes(params: {
|
|
3991
|
+
industryTitle?: string;
|
|
3992
|
+
sicCode?: number;
|
|
3993
|
+
}): Promise<APIResponse<IndustryClassificationCode[]>>;
|
|
1698
3994
|
}
|
|
1699
3995
|
|
|
1700
|
-
declare class
|
|
3996
|
+
declare class MutualFundEndpoints {
|
|
1701
3997
|
private client;
|
|
1702
3998
|
constructor(client: FMPClient);
|
|
1703
3999
|
/**
|
|
1704
|
-
* Get
|
|
1705
|
-
*
|
|
1706
|
-
*
|
|
1707
|
-
*
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
*
|
|
1712
|
-
* @
|
|
1713
|
-
*
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
*
|
|
1718
|
-
*
|
|
1719
|
-
*
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
*
|
|
1724
|
-
*
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
*
|
|
1731
|
-
*
|
|
1732
|
-
*
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
*
|
|
1737
|
-
*
|
|
1738
|
-
*
|
|
4000
|
+
* Get mutual fund holders of a specific stock
|
|
4001
|
+
*
|
|
4002
|
+
* Provides data on mutual funds that hold shares in a specific stock.
|
|
4003
|
+
* Essential for understanding mutual fund ownership patterns and
|
|
4004
|
+
* which mutual funds are invested in particular companies.
|
|
4005
|
+
*
|
|
4006
|
+
* @param symbol - The stock symbol to get mutual fund holders for (e.g., 'AAPL', 'MSFT', 'GOOGL')
|
|
4007
|
+
*
|
|
4008
|
+
* @returns Promise resolving to array of mutual fund holders with position details
|
|
4009
|
+
*
|
|
4010
|
+
* @example
|
|
4011
|
+
* ```typescript
|
|
4012
|
+
* // Get mutual funds that hold Apple stock
|
|
4013
|
+
* const appleHolders = await fmp.mutualFund.getHolders('AAPL');
|
|
4014
|
+
* console.log(`${appleHolders.data.length} mutual funds hold AAPL`);
|
|
4015
|
+
*
|
|
4016
|
+
* appleHolders.data.forEach((holder, index) => {
|
|
4017
|
+
* console.log(`${index + 1}. ${holder.holder}`);
|
|
4018
|
+
* console.log(` Shares: ${holder.shares?.toLocaleString() || 'N/A'}`);
|
|
4019
|
+
* console.log(` Weight: ${holder.weightPercent}% | Change: ${holder.change}`);
|
|
4020
|
+
* });
|
|
4021
|
+
*
|
|
4022
|
+
* // Get mutual funds that hold Microsoft stock
|
|
4023
|
+
* const msftHolders = await fmp.mutualFund.getHolders('MSFT');
|
|
4024
|
+
*
|
|
4025
|
+
* // Find top mutual fund holders by shares
|
|
4026
|
+
* const topHolders = msftHolders.data
|
|
4027
|
+
* .sort((a, b) => (b.shares || 0) - (a.shares || 0))
|
|
4028
|
+
* .slice(0, 10);
|
|
4029
|
+
* console.log('Top 10 mutual fund holders by shares:');
|
|
4030
|
+
* topHolders.forEach((holder, index) => {
|
|
4031
|
+
* console.log(`${index + 1}. ${holder.holder}: ${holder.shares.toLocaleString()} shares`);
|
|
4032
|
+
* });
|
|
4033
|
+
*
|
|
4034
|
+
* // Get mutual funds that hold Google stock
|
|
4035
|
+
* const googlHolders = await fmp.mutualFund.getHolders('GOOGL');
|
|
4036
|
+
*
|
|
4037
|
+
* // Analyze mutual fund concentration
|
|
4038
|
+
* const totalShares = googlHolders.data.reduce((sum, holder) => sum + (holder.shares || 0), 0);
|
|
4039
|
+
* console.log(`Total shares held by mutual funds: ${totalShares.toLocaleString()}`);
|
|
4040
|
+
*
|
|
4041
|
+
* googlHolders.data.forEach(holder => {
|
|
4042
|
+
* const percentage = ((holder.shares || 0) / totalShares * 100).toFixed(2);
|
|
4043
|
+
* console.log(`${holder.holder}: ${percentage}% of total mutual fund holdings`);
|
|
4044
|
+
* });
|
|
4045
|
+
* ```
|
|
4046
|
+
*
|
|
4047
|
+
* @see {@link https://site.financialmodelingprep.com/developer/docs#mutual-fund-holder-mutual-funds-holdings|FMP Mutual Fund Holders Documentation}
|
|
1739
4048
|
*/
|
|
1740
|
-
|
|
4049
|
+
getHolders(symbol: string): Promise<APIResponse<MutualFundHolding[]>>;
|
|
1741
4050
|
}
|
|
1742
4051
|
|
|
1743
4052
|
/**
|
|
@@ -1747,10 +4056,20 @@ declare class SenateHouseEndpoints {
|
|
|
1747
4056
|
* ```typescript
|
|
1748
4057
|
* import { FMP } from 'fmp-node-api';
|
|
1749
4058
|
*
|
|
4059
|
+
* // Option 1: Provide API key directly
|
|
1750
4060
|
* const fmp = new FMP({ apiKey: 'your-api-key' });
|
|
1751
4061
|
*
|
|
1752
|
-
* //
|
|
1753
|
-
* const
|
|
4062
|
+
* // Option 2: Use environment variable (FMP_API_KEY)
|
|
4063
|
+
* const fmp = new FMP();
|
|
4064
|
+
*
|
|
4065
|
+
* // Option 3: Provide partial config with environment variable fallback
|
|
4066
|
+
* const fmp = new FMP({ timeout: 15000 });
|
|
4067
|
+
*
|
|
4068
|
+
* // Get quote for any asset type
|
|
4069
|
+
* const quote = await fmp.quote.getQuote({ symbol: 'AAPL' });
|
|
4070
|
+
*
|
|
4071
|
+
* // Get stock-specific data
|
|
4072
|
+
* const marketCap = await fmp.stock.getMarketCap({ symbol: 'AAPL' });
|
|
1754
4073
|
*
|
|
1755
4074
|
* // Get financial statements
|
|
1756
4075
|
* const incomeStatement = await fmp.financial.getIncomeStatement({
|
|
@@ -1758,17 +4077,12 @@ declare class SenateHouseEndpoints {
|
|
|
1758
4077
|
* period: 'annual'
|
|
1759
4078
|
* });
|
|
1760
4079
|
*
|
|
1761
|
-
* // Get forex data
|
|
1762
|
-
* const forexQuote = await fmp.forex.getQuote({ symbol: 'EURUSD' });
|
|
1763
4080
|
* ```
|
|
1764
4081
|
*/
|
|
1765
4082
|
declare class FMP {
|
|
1766
4083
|
readonly stock: StockEndpoints;
|
|
1767
4084
|
readonly financial: FinancialEndpoints;
|
|
1768
|
-
readonly forex: ForexEndpoints;
|
|
1769
|
-
readonly crypto: CryptoEndpoints;
|
|
1770
4085
|
readonly etf: ETFEndpoints;
|
|
1771
|
-
readonly mutualFund: MutualFundEndpoints;
|
|
1772
4086
|
readonly economic: EconomicEndpoints;
|
|
1773
4087
|
readonly market: MarketEndpoints;
|
|
1774
4088
|
readonly list: ListEndpoints;
|
|
@@ -1776,71 +4090,17 @@ declare class FMP {
|
|
|
1776
4090
|
readonly company: CompanyEndpoints;
|
|
1777
4091
|
readonly quote: QuoteEndpoints;
|
|
1778
4092
|
readonly senateHouse: SenateHouseEndpoints;
|
|
1779
|
-
|
|
4093
|
+
readonly institutional: InstitutionalEndpoints;
|
|
4094
|
+
readonly insider: InsiderEndpoints;
|
|
4095
|
+
readonly sec: SECEndpoints;
|
|
4096
|
+
readonly mutualFund: MutualFundEndpoints;
|
|
4097
|
+
constructor(config?: FMPConfig);
|
|
1780
4098
|
/**
|
|
1781
4099
|
* Get the underlying client instance for advanced usage
|
|
1782
4100
|
*/
|
|
1783
4101
|
getClient(): FMPClient;
|
|
1784
4102
|
}
|
|
1785
4103
|
|
|
1786
|
-
/**
|
|
1787
|
-
* Validate API key
|
|
1788
|
-
*/
|
|
1789
|
-
declare function validateApiKey(apiKey: string): void;
|
|
1790
|
-
/**
|
|
1791
|
-
* Validate stock symbol
|
|
1792
|
-
*/
|
|
1793
|
-
declare function validateSymbol(symbol: string): void;
|
|
1794
|
-
/**
|
|
1795
|
-
* Validate date format (YYYY-MM-DD)
|
|
1796
|
-
*/
|
|
1797
|
-
declare function validateDate(date: string): void;
|
|
1798
|
-
/**
|
|
1799
|
-
* Validate period parameter
|
|
1800
|
-
*/
|
|
1801
|
-
declare function validatePeriod(period: string): void;
|
|
1802
|
-
/**
|
|
1803
|
-
* Validate limit parameter
|
|
1804
|
-
*/
|
|
1805
|
-
declare function validateLimit(limit: number): void;
|
|
1806
|
-
/**
|
|
1807
|
-
* Validate page parameter
|
|
1808
|
-
*/
|
|
1809
|
-
declare function validatePage(page: number): void;
|
|
1810
|
-
|
|
1811
|
-
/**
|
|
1812
|
-
* Format currency value
|
|
1813
|
-
*/
|
|
1814
|
-
declare function formatCurrency(value: number, currency?: string): string;
|
|
1815
|
-
/**
|
|
1816
|
-
* Format percentage value
|
|
1817
|
-
*/
|
|
1818
|
-
declare function formatPercentage(value: number, decimals?: number): string;
|
|
1819
|
-
/**
|
|
1820
|
-
* Format large numbers with K, M, B suffixes
|
|
1821
|
-
*/
|
|
1822
|
-
declare function formatLargeNumber(value: number): string;
|
|
1823
|
-
/**
|
|
1824
|
-
* Format date to YYYY-MM-DD
|
|
1825
|
-
*/
|
|
1826
|
-
declare function formatDate(date: Date | string): string;
|
|
1827
|
-
/**
|
|
1828
|
-
* Format date to readable format
|
|
1829
|
-
*/
|
|
1830
|
-
declare function formatReadableDate(date: Date | string): string;
|
|
1831
|
-
/**
|
|
1832
|
-
* Format timestamp to readable format
|
|
1833
|
-
*/
|
|
1834
|
-
declare function formatTimestamp(timestamp: number): string;
|
|
1835
|
-
/**
|
|
1836
|
-
* Format number with specified decimal places
|
|
1837
|
-
*/
|
|
1838
|
-
declare function formatNumber(value: number, decimals?: number): string;
|
|
1839
|
-
/**
|
|
1840
|
-
* Format volume with appropriate units
|
|
1841
|
-
*/
|
|
1842
|
-
declare function formatVolume(volume: number): string;
|
|
1843
|
-
|
|
1844
4104
|
declare const DEFAULT_TIMEOUT = 10000;
|
|
1845
4105
|
declare const DEFAULT_LIMIT = 100;
|
|
1846
4106
|
declare const MAX_LIMIT = 1000;
|
|
@@ -1907,4 +4167,373 @@ declare const HTTP_STATUS: {
|
|
|
1907
4167
|
readonly INTERNAL_SERVER_ERROR: 500;
|
|
1908
4168
|
};
|
|
1909
4169
|
|
|
1910
|
-
|
|
4170
|
+
/**
|
|
4171
|
+
* Format currency value
|
|
4172
|
+
*/
|
|
4173
|
+
declare function formatCurrency(value: number, currency?: string): string;
|
|
4174
|
+
/**
|
|
4175
|
+
* Format percentage value
|
|
4176
|
+
*/
|
|
4177
|
+
declare function formatPercentage(value: number, decimals?: number): string;
|
|
4178
|
+
/**
|
|
4179
|
+
* Format large numbers with K, M, B suffixes
|
|
4180
|
+
*/
|
|
4181
|
+
declare function formatLargeNumber(value: number): string;
|
|
4182
|
+
/**
|
|
4183
|
+
* Format date to YYYY-MM-DD
|
|
4184
|
+
*/
|
|
4185
|
+
declare function formatDate(date: Date | string): string;
|
|
4186
|
+
/**
|
|
4187
|
+
* Format date to readable format
|
|
4188
|
+
*/
|
|
4189
|
+
declare function formatReadableDate(date: Date | string): string;
|
|
4190
|
+
/**
|
|
4191
|
+
* Format timestamp to readable format
|
|
4192
|
+
*/
|
|
4193
|
+
declare function formatTimestamp(timestamp: number): string;
|
|
4194
|
+
/**
|
|
4195
|
+
* Format number with specified decimal places
|
|
4196
|
+
*/
|
|
4197
|
+
declare function formatNumber(value: number, decimals?: number): string;
|
|
4198
|
+
/**
|
|
4199
|
+
* Format volume with appropriate units
|
|
4200
|
+
*/
|
|
4201
|
+
declare function formatVolume(volume: number): string;
|
|
4202
|
+
|
|
4203
|
+
/**
|
|
4204
|
+
* Validation utilities for FMP API parameters and responses
|
|
4205
|
+
*/
|
|
4206
|
+
declare class FMPValidation {
|
|
4207
|
+
/**
|
|
4208
|
+
* Validate stock symbol format
|
|
4209
|
+
* @param symbol - The symbol to validate
|
|
4210
|
+
* @returns True if the symbol format is valid
|
|
4211
|
+
*/
|
|
4212
|
+
static isValidSymbol(symbol: string): boolean;
|
|
4213
|
+
/**
|
|
4214
|
+
* Validate crypto symbol format
|
|
4215
|
+
* @param symbol - The crypto symbol to validate
|
|
4216
|
+
* @returns True if the crypto symbol format is valid
|
|
4217
|
+
*/
|
|
4218
|
+
static isValidCryptoSymbol(symbol: string): boolean;
|
|
4219
|
+
/**
|
|
4220
|
+
* Validate forex pair format
|
|
4221
|
+
* @param symbol - The forex pair to validate
|
|
4222
|
+
* @returns True if the forex pair format is valid
|
|
4223
|
+
*/
|
|
4224
|
+
static isValidForexPair(symbol: string): boolean;
|
|
4225
|
+
/**
|
|
4226
|
+
* Validate date format (YYYY-MM-DD)
|
|
4227
|
+
* @param date - The date string to validate
|
|
4228
|
+
* @returns True if the date format is valid
|
|
4229
|
+
*/
|
|
4230
|
+
static isValidDate(date: string): boolean;
|
|
4231
|
+
/**
|
|
4232
|
+
* Validate date range
|
|
4233
|
+
* @param from - Start date
|
|
4234
|
+
* @param to - End date
|
|
4235
|
+
* @returns True if the date range is valid
|
|
4236
|
+
*/
|
|
4237
|
+
static isValidDateRange(from: string, to: string): boolean;
|
|
4238
|
+
/**
|
|
4239
|
+
* Validate API response structure
|
|
4240
|
+
* @param response - The response to validate
|
|
4241
|
+
* @returns True if the response has the expected structure
|
|
4242
|
+
*/
|
|
4243
|
+
static isValidResponse(response: any): response is APIResponse<any>;
|
|
4244
|
+
/**
|
|
4245
|
+
* Validate API key format
|
|
4246
|
+
* @param apiKey - The API key to validate
|
|
4247
|
+
* @returns True if the API key format is valid
|
|
4248
|
+
*/
|
|
4249
|
+
static isValidApiKey(apiKey: string): boolean;
|
|
4250
|
+
/**
|
|
4251
|
+
* Validate period parameter
|
|
4252
|
+
* @param period - The period to validate
|
|
4253
|
+
* @returns True if the period is valid
|
|
4254
|
+
*/
|
|
4255
|
+
static isValidPeriod(period: string): boolean;
|
|
4256
|
+
/**
|
|
4257
|
+
* Validate limit parameter
|
|
4258
|
+
* @param limit - The limit to validate
|
|
4259
|
+
* @returns True if the limit is valid
|
|
4260
|
+
*/
|
|
4261
|
+
static isValidLimit(limit: number): boolean;
|
|
4262
|
+
/**
|
|
4263
|
+
* Get validation errors for quote parameters
|
|
4264
|
+
* @param params - The parameters to validate
|
|
4265
|
+
* @returns Array of validation error messages
|
|
4266
|
+
*/
|
|
4267
|
+
static validateQuoteParams(params: any): string[];
|
|
4268
|
+
/**
|
|
4269
|
+
* Get validation errors for financial statement parameters
|
|
4270
|
+
* @param params - The parameters to validate
|
|
4271
|
+
* @returns Array of validation error messages
|
|
4272
|
+
*/
|
|
4273
|
+
static validateFinancialParams(params: any): string[];
|
|
4274
|
+
/**
|
|
4275
|
+
* Get validation errors for date range parameters
|
|
4276
|
+
* @param params - The parameters to validate
|
|
4277
|
+
* @returns Array of validation error messages
|
|
4278
|
+
*/
|
|
4279
|
+
static validateDateRangeParams(params: any): string[];
|
|
4280
|
+
/**
|
|
4281
|
+
* Validate and throw error if validation fails
|
|
4282
|
+
* @param errors - Array of validation errors
|
|
4283
|
+
* @param context - Context for the error message
|
|
4284
|
+
*/
|
|
4285
|
+
static throwIfInvalid(errors: string[], context?: string): void;
|
|
4286
|
+
}
|
|
4287
|
+
|
|
4288
|
+
/**
|
|
4289
|
+
* Helper utilities for exploring and working with the FMP API client
|
|
4290
|
+
*/
|
|
4291
|
+
declare class FMPHelpers {
|
|
4292
|
+
/**
|
|
4293
|
+
* Get all available endpoint categories from the FMP client
|
|
4294
|
+
* @param fmp - The FMP client instance
|
|
4295
|
+
* @returns Array of endpoint category names
|
|
4296
|
+
*/
|
|
4297
|
+
static getEndpointCategories(fmp: FMP): string[];
|
|
4298
|
+
/**
|
|
4299
|
+
* Get all methods for a specific endpoint category
|
|
4300
|
+
* @param fmp - The FMP client instance
|
|
4301
|
+
* @param endpoint - The endpoint category name
|
|
4302
|
+
* @returns Array of method names
|
|
4303
|
+
*/
|
|
4304
|
+
static getEndpointMethods(fmp: FMP, endpoint: string): string[];
|
|
4305
|
+
/**
|
|
4306
|
+
* Get all available methods across all endpoint categories
|
|
4307
|
+
* @param fmp - The FMP client instance
|
|
4308
|
+
* @returns Object mapping endpoint categories to their methods
|
|
4309
|
+
*/
|
|
4310
|
+
static getAllMethods(fmp: FMP): Record<string, string[]>;
|
|
4311
|
+
/**
|
|
4312
|
+
* Get a summary of the API structure
|
|
4313
|
+
* @param fmp - The FMP client instance
|
|
4314
|
+
* @returns Summary object with endpoint and method counts
|
|
4315
|
+
*/
|
|
4316
|
+
static getApiSummary(fmp: FMP): {
|
|
4317
|
+
totalEndpoints: number;
|
|
4318
|
+
totalMethods: number;
|
|
4319
|
+
categories: string[];
|
|
4320
|
+
methodCounts: Record<string, number>;
|
|
4321
|
+
};
|
|
4322
|
+
/**
|
|
4323
|
+
* Check if a specific method exists on an endpoint
|
|
4324
|
+
* @param fmp - The FMP client instance
|
|
4325
|
+
* @param endpoint - The endpoint category name
|
|
4326
|
+
* @param method - The method name
|
|
4327
|
+
* @returns True if the method exists
|
|
4328
|
+
*/
|
|
4329
|
+
static hasMethod(fmp: FMP, endpoint: string, method: string): boolean;
|
|
4330
|
+
/**
|
|
4331
|
+
* Get method signature information (basic introspection)
|
|
4332
|
+
* @param fmp - The FMP client instance
|
|
4333
|
+
* @param endpoint - The endpoint category name
|
|
4334
|
+
* @param method - The method name
|
|
4335
|
+
* @returns Method information or null if not found
|
|
4336
|
+
*/
|
|
4337
|
+
static getMethodInfo(fmp: FMP, endpoint: string, method: string): {
|
|
4338
|
+
name: string;
|
|
4339
|
+
type: 'function';
|
|
4340
|
+
async: boolean;
|
|
4341
|
+
} | null;
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4344
|
+
/**
|
|
4345
|
+
* Utility functions for common financial data processing and formatting
|
|
4346
|
+
*/
|
|
4347
|
+
declare class FMPUtils {
|
|
4348
|
+
/**
|
|
4349
|
+
* Format currency values
|
|
4350
|
+
* @param value - The numeric value to format
|
|
4351
|
+
* @param currency - The currency code (default: USD)
|
|
4352
|
+
* @param locale - The locale for formatting (default: en-US)
|
|
4353
|
+
* @returns Formatted currency string
|
|
4354
|
+
*/
|
|
4355
|
+
static formatCurrency(value: number, currency?: string, locale?: string): string;
|
|
4356
|
+
/**
|
|
4357
|
+
* Format percentages
|
|
4358
|
+
* @param value - The percentage value (as decimal, e.g., 0.15 for 15%)
|
|
4359
|
+
* @param decimals - Number of decimal places (default: 2)
|
|
4360
|
+
* @returns Formatted percentage string
|
|
4361
|
+
*/
|
|
4362
|
+
static formatPercentage(value: number, decimals?: number): string;
|
|
4363
|
+
/**
|
|
4364
|
+
* Format large numbers with abbreviations (K, M, B, T)
|
|
4365
|
+
* @param value - The numeric value to format
|
|
4366
|
+
* @param decimals - Number of decimal places (default: 1)
|
|
4367
|
+
* @returns Formatted number string
|
|
4368
|
+
*/
|
|
4369
|
+
static formatLargeNumber(value: number, decimals?: number): string;
|
|
4370
|
+
/**
|
|
4371
|
+
* Convert date string to Date object
|
|
4372
|
+
* @param dateString - The date string in YYYY-MM-DD format
|
|
4373
|
+
* @returns Date object or null if invalid
|
|
4374
|
+
*/
|
|
4375
|
+
static parseDate(dateString: string): Date | null;
|
|
4376
|
+
/**
|
|
4377
|
+
* Format date to readable string
|
|
4378
|
+
* @param date - Date object or date string
|
|
4379
|
+
* @param format - Format style ('short', 'long', 'iso')
|
|
4380
|
+
* @returns Formatted date string
|
|
4381
|
+
*/
|
|
4382
|
+
static formatDate(date: Date | string, format?: 'short' | 'long' | 'iso'): string;
|
|
4383
|
+
/**
|
|
4384
|
+
* Calculate working days between two dates (excluding weekends)
|
|
4385
|
+
* @param from - Start date
|
|
4386
|
+
* @param to - End date
|
|
4387
|
+
* @returns Number of working days
|
|
4388
|
+
*/
|
|
4389
|
+
static getWorkingDays(from: string | Date, to: string | Date): number;
|
|
4390
|
+
/**
|
|
4391
|
+
* Calculate percentage change between two values
|
|
4392
|
+
* @param oldValue - The original value
|
|
4393
|
+
* @param newValue - The new value
|
|
4394
|
+
* @param decimals - Number of decimal places (default: 2)
|
|
4395
|
+
* @returns Percentage change as a number
|
|
4396
|
+
*/
|
|
4397
|
+
static calculatePercentageChange(oldValue: number, newValue: number, decimals?: number): number;
|
|
4398
|
+
/**
|
|
4399
|
+
* Batch API calls with rate limiting
|
|
4400
|
+
* @param calls - Array of async functions to execute
|
|
4401
|
+
* @param delayMs - Delay between calls in milliseconds (default: 100)
|
|
4402
|
+
* @param maxConcurrent - Maximum concurrent calls (default: 1)
|
|
4403
|
+
* @returns Array of results
|
|
4404
|
+
*/
|
|
4405
|
+
static batchCalls<T>(calls: (() => Promise<T>)[], delayMs?: number, maxConcurrent?: number): Promise<T[]>;
|
|
4406
|
+
/**
|
|
4407
|
+
* Split array into chunks
|
|
4408
|
+
* @param array - The array to split
|
|
4409
|
+
* @param chunkSize - Size of each chunk
|
|
4410
|
+
* @returns Array of chunks
|
|
4411
|
+
*/
|
|
4412
|
+
static chunkArray<T>(array: T[], chunkSize: number): T[][];
|
|
4413
|
+
/**
|
|
4414
|
+
* Retry a function with exponential backoff
|
|
4415
|
+
* @param fn - The function to retry
|
|
4416
|
+
* @param maxRetries - Maximum number of retries (default: 3)
|
|
4417
|
+
* @param baseDelay - Base delay in milliseconds (default: 1000)
|
|
4418
|
+
* @returns Function result
|
|
4419
|
+
*/
|
|
4420
|
+
static retryWithBackoff<T>(fn: () => Promise<T>, maxRetries?: number, baseDelay?: number): Promise<T>;
|
|
4421
|
+
/**
|
|
4422
|
+
* Debounce a function
|
|
4423
|
+
* @param func - The function to debounce
|
|
4424
|
+
* @param wait - Wait time in milliseconds
|
|
4425
|
+
* @returns Debounced function
|
|
4426
|
+
*/
|
|
4427
|
+
static debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
|
|
4428
|
+
/**
|
|
4429
|
+
* Throttle a function
|
|
4430
|
+
* @param func - The function to throttle
|
|
4431
|
+
* @param limit - Time limit in milliseconds
|
|
4432
|
+
* @returns Throttled function
|
|
4433
|
+
*/
|
|
4434
|
+
static throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void;
|
|
4435
|
+
}
|
|
4436
|
+
|
|
4437
|
+
/**
|
|
4438
|
+
* Debugging utilities for FMP API development and troubleshooting
|
|
4439
|
+
*/
|
|
4440
|
+
declare class FMPDebug {
|
|
4441
|
+
private static isDevelopment;
|
|
4442
|
+
private static isDebugEnabled;
|
|
4443
|
+
/**
|
|
4444
|
+
* Log API calls for debugging (only in development)
|
|
4445
|
+
* @param endpoint - The endpoint being called
|
|
4446
|
+
* @param params - The parameters passed to the endpoint
|
|
4447
|
+
* @param response - The response received
|
|
4448
|
+
* @param duration - The duration of the call in milliseconds
|
|
4449
|
+
*/
|
|
4450
|
+
static logApiCall(endpoint: string, params: any, response: any, duration?: number): void;
|
|
4451
|
+
/**
|
|
4452
|
+
* Log API errors for debugging
|
|
4453
|
+
* @param endpoint - The endpoint that failed
|
|
4454
|
+
* @param params - The parameters that were passed
|
|
4455
|
+
* @param error - The error that occurred
|
|
4456
|
+
*/
|
|
4457
|
+
static logApiError(endpoint: string, params: any, error: any): void;
|
|
4458
|
+
/**
|
|
4459
|
+
* Get comprehensive API usage statistics
|
|
4460
|
+
* @param fmp - The FMP client instance
|
|
4461
|
+
* @returns Detailed API statistics
|
|
4462
|
+
*/
|
|
4463
|
+
static getApiStats(fmp: FMP): {
|
|
4464
|
+
totalEndpoints: number;
|
|
4465
|
+
totalMethods: number;
|
|
4466
|
+
categories: string[];
|
|
4467
|
+
methodCounts: Record<string, number>;
|
|
4468
|
+
estimatedApiCalls: number;
|
|
4469
|
+
};
|
|
4470
|
+
/**
|
|
4471
|
+
* Validate API key format and provide feedback
|
|
4472
|
+
* @param apiKey - The API key to validate
|
|
4473
|
+
* @returns Validation result with details
|
|
4474
|
+
*/
|
|
4475
|
+
static validateApiKey(apiKey: string): {
|
|
4476
|
+
isValid: boolean;
|
|
4477
|
+
length: number;
|
|
4478
|
+
format: string;
|
|
4479
|
+
suggestions: string[];
|
|
4480
|
+
};
|
|
4481
|
+
/**
|
|
4482
|
+
* Check API key environment variable
|
|
4483
|
+
* @returns Environment check result
|
|
4484
|
+
*/
|
|
4485
|
+
static checkApiKeyEnvironment(): {
|
|
4486
|
+
hasEnvVar: boolean;
|
|
4487
|
+
envVarName: string;
|
|
4488
|
+
isValid: boolean;
|
|
4489
|
+
suggestions: string[];
|
|
4490
|
+
};
|
|
4491
|
+
/**
|
|
4492
|
+
* Get performance metrics for API calls
|
|
4493
|
+
* @param fmp - The FMP client instance
|
|
4494
|
+
* @returns Performance information
|
|
4495
|
+
*/
|
|
4496
|
+
static getPerformanceInfo(): {
|
|
4497
|
+
nodeVersion: string;
|
|
4498
|
+
platform: string;
|
|
4499
|
+
memoryUsage: NodeJS.MemoryUsage;
|
|
4500
|
+
uptime: number;
|
|
4501
|
+
};
|
|
4502
|
+
/**
|
|
4503
|
+
* Create a debug configuration object
|
|
4504
|
+
* @param fmp - The FMP client instance
|
|
4505
|
+
* @returns Debug configuration
|
|
4506
|
+
*/
|
|
4507
|
+
static createDebugConfig(fmp: FMP): {
|
|
4508
|
+
apiStats: ReturnType<typeof FMPDebug.getApiStats>;
|
|
4509
|
+
envCheck: ReturnType<typeof FMPDebug.checkApiKeyEnvironment>;
|
|
4510
|
+
performance: ReturnType<typeof FMPDebug.getPerformanceInfo>;
|
|
4511
|
+
timestamp: string;
|
|
4512
|
+
};
|
|
4513
|
+
/**
|
|
4514
|
+
* Print debug information to console
|
|
4515
|
+
* @param fmp - The FMP client instance
|
|
4516
|
+
*/
|
|
4517
|
+
static printDebugInfo(fmp: FMP): void;
|
|
4518
|
+
/**
|
|
4519
|
+
* Enable debug mode programmatically
|
|
4520
|
+
*/
|
|
4521
|
+
static enableDebugMode(): void;
|
|
4522
|
+
/**
|
|
4523
|
+
* Disable debug mode programmatically
|
|
4524
|
+
*/
|
|
4525
|
+
static disableDebugMode(): void;
|
|
4526
|
+
/**
|
|
4527
|
+
* Check if debug mode is enabled
|
|
4528
|
+
* @returns True if debug mode is enabled
|
|
4529
|
+
*/
|
|
4530
|
+
static isDebugMode(): boolean;
|
|
4531
|
+
/**
|
|
4532
|
+
* Create a debug wrapper for API calls
|
|
4533
|
+
* @param fmp - The FMP client instance
|
|
4534
|
+
* @returns FMP client with debug logging
|
|
4535
|
+
*/
|
|
4536
|
+
static createDebugWrapper(fmp: FMP): FMP;
|
|
4537
|
+
}
|
|
4538
|
+
|
|
4539
|
+
export { type APIResponse, type AvailableIndexesList, type BalanceSheet, type BalanceSheetGrowth, type BeneficialOwnershipResponse, COUNTRIES, CalendarEndpoints, type CashFlowStatement, type CashflowGrowth, type CikMapperBySymbolResponse, type CikMapperResponse, type CompaniesPriceListResponse, CompanyEndpoints, type CompanyNotes, type CompanyProfile, type CompanyTranscriptData, type CryptoList, DEFAULT_LIMIT, DEFAULT_TIMEOUT, type DateRangeParams, type DividendsCalendar, ERROR_MESSAGES, type ETFCountryWeighting, ETFEndpoints, type ETFHolder, type ETFHolding, type ETFHoldingDates, type ETFList, type ETFProfile, type ETFStockExposure, type ETFWeighting, EXCHANGES, type EarningsCalendar, type EarningsCallTranscript, type EarningsConfirmed, type EarningsHistorical, type EarningsSurprises, EconomicEndpoints, type EconomicIndicator, type EconomicIndicatorName, type EconomicsCalendar, type EnterpriseValue, Exchange, type ExecutiveCompensation, FMP, FMPClient, type FMPConfig, FMPDebug, FMPHelpers, FMPUtils, FMPValidation, type FailToDeliverResponse, FinancialEndpoints, type FinancialGrowth, type FinancialRatios, type FinancialStatementBase, type ForexList, type Form13FResponse, type GrowthStatementBase, HTTP_STATUS, type HistoricalEmployeeCount, type HistoricalPriceData, type HistoricalPriceResponse, type HistoricalSharesFloat, type HouseTradingResponse, type IPOCalendar, type IncomeGrowth, type IncomeStatement, type IndividualIndustryClassificationParams, type IndustryClassification, type IndustryClassificationCode, type IndustryClassificationCodesParams, InsiderEndpoints, type InsiderTradeStatisticsResponse, type InsiderTradingRSSResponse, type InsiderTradingSearchResponse, type InsidersBySymbolResponse, InstitutionalEndpoints, type InstitutionalHolderResponse, type KeyMetrics, ListEndpoints, MAX_LIMIT, type MarketCap, MarketEndpoints, type MarketHoliday, type MarketHours, type MarketIndex, type MarketPerformance, type MarketSectorPerformance, MutualFundEndpoints, type MutualFundHolding, PERIODS, type PaginationParams, Period, type PeriodParams, type QueryParams, type Quote, QuoteEndpoints, type RSSFeed8KItem, type RSSFeed8KParams, type RSSFeedAllItem, type RSSFeedItem, type RSSFeedParams, type RSSFeedV3Item, type RSSFeedV3Params, SECEndpoints, type SECFiling, type SECFilingsParams, SECTORS, SenateHouseEndpoints, type SenateHouseTradingByNameResponse, type SenateTradingResponse, type SharesFloat, type SplitsCalendar, type StockDividend, type StockDividendResponse, StockEndpoints, type StockList, type StockListResponse, type StockRealTimePrice, type StockRealTimePriceFull, type StockSplit, type StockSplitResponse, type SymbolParams, TransactionType, type TransactionTypesResponse, type TreasuryRate, formatCurrency, formatDate, formatLargeNumber, formatNumber, formatPercentage, formatReadableDate, formatTimestamp, formatVolume };
|