fmp-node-api 0.0.8 → 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 +2960 -773
- package/dist/index.d.ts +2960 -773
- package/dist/index.js +3324 -790
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3321 -783
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -3
package/dist/index.d.mts
CHANGED
|
@@ -5,8 +5,7 @@ interface APIResponse<T = unknown> {
|
|
|
5
5
|
status: number;
|
|
6
6
|
}
|
|
7
7
|
interface FMPConfig {
|
|
8
|
-
apiKey
|
|
9
|
-
baseURL?: string;
|
|
8
|
+
apiKey?: string;
|
|
10
9
|
timeout?: number;
|
|
11
10
|
}
|
|
12
11
|
interface SymbolParams {
|
|
@@ -41,20 +40,6 @@ declare enum Exchange {
|
|
|
41
40
|
BSE = "BSE"
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
interface QuoteParams {
|
|
45
|
-
symbol: string;
|
|
46
|
-
}
|
|
47
|
-
interface HistoricalPriceParams {
|
|
48
|
-
symbol: string;
|
|
49
|
-
from?: string;
|
|
50
|
-
to?: string;
|
|
51
|
-
}
|
|
52
|
-
interface IntradayParams {
|
|
53
|
-
symbol: string;
|
|
54
|
-
interval: '1min' | '5min' | '15min' | '30min' | '1hour' | '4hour';
|
|
55
|
-
from?: string;
|
|
56
|
-
to?: string;
|
|
57
|
-
}
|
|
58
43
|
interface Quote {
|
|
59
44
|
symbol: string;
|
|
60
45
|
name: string;
|
|
@@ -99,30 +84,6 @@ interface HistoricalPriceResponse {
|
|
|
99
84
|
historical: HistoricalPriceData[];
|
|
100
85
|
}
|
|
101
86
|
|
|
102
|
-
interface StockQuote {
|
|
103
|
-
symbol: string;
|
|
104
|
-
name: string;
|
|
105
|
-
price: number;
|
|
106
|
-
changesPercentage: number;
|
|
107
|
-
change: number;
|
|
108
|
-
dayLow: number;
|
|
109
|
-
dayHigh: number;
|
|
110
|
-
yearHigh: number;
|
|
111
|
-
yearLow: number;
|
|
112
|
-
marketCap: number;
|
|
113
|
-
priceAvg50: number;
|
|
114
|
-
priceAvg200: number;
|
|
115
|
-
exchange: string;
|
|
116
|
-
volume: number;
|
|
117
|
-
avgVolume: number;
|
|
118
|
-
open: number;
|
|
119
|
-
previousClose: number;
|
|
120
|
-
eps: number;
|
|
121
|
-
pe: number;
|
|
122
|
-
earningsAnnouncement: string;
|
|
123
|
-
sharesOutstanding: number;
|
|
124
|
-
timestamp: number;
|
|
125
|
-
}
|
|
126
87
|
interface StockSplit {
|
|
127
88
|
date: string;
|
|
128
89
|
label: string;
|
|
@@ -175,9 +136,6 @@ interface CompaniesPriceListResponse<T> {
|
|
|
175
136
|
companiesPriceList: T[];
|
|
176
137
|
}
|
|
177
138
|
|
|
178
|
-
interface FinancialStatementsParams extends SymbolParams, PeriodParams {
|
|
179
|
-
limit?: number;
|
|
180
|
-
}
|
|
181
139
|
interface FinancialStatementBase {
|
|
182
140
|
date: string;
|
|
183
141
|
symbol: string;
|
|
@@ -590,63 +548,6 @@ interface EarningsSurprises {
|
|
|
590
548
|
estimatedEarning: number;
|
|
591
549
|
}
|
|
592
550
|
|
|
593
|
-
interface ForexHistoricalParams extends SymbolParams, DateRangeParams {
|
|
594
|
-
timeseries?: number;
|
|
595
|
-
}
|
|
596
|
-
interface ForexQuote {
|
|
597
|
-
symbol: string;
|
|
598
|
-
price: number;
|
|
599
|
-
changesPercentage: number;
|
|
600
|
-
change: number;
|
|
601
|
-
dayLow: number;
|
|
602
|
-
dayHigh: number;
|
|
603
|
-
yearLow: number;
|
|
604
|
-
yearHigh: number;
|
|
605
|
-
marketCap: number;
|
|
606
|
-
priceAvg50: number;
|
|
607
|
-
priceAvg200: number;
|
|
608
|
-
volume: number;
|
|
609
|
-
avgVolume: number;
|
|
610
|
-
exchange: string;
|
|
611
|
-
open: number;
|
|
612
|
-
previousClose: number;
|
|
613
|
-
eps: number;
|
|
614
|
-
pe: number;
|
|
615
|
-
earningsAnnouncement: string;
|
|
616
|
-
sharesOutstanding: number;
|
|
617
|
-
timestamp: number;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
interface CryptoHistoricalParams extends SymbolParams, DateRangeParams {
|
|
621
|
-
timeseries?: number;
|
|
622
|
-
}
|
|
623
|
-
interface CryptoListParams {
|
|
624
|
-
}
|
|
625
|
-
interface CryptoQuote {
|
|
626
|
-
symbol: string;
|
|
627
|
-
name: string;
|
|
628
|
-
price: number;
|
|
629
|
-
changesPercentage: number;
|
|
630
|
-
change: number;
|
|
631
|
-
dayLow: number;
|
|
632
|
-
dayHigh: number;
|
|
633
|
-
yearHigh: number;
|
|
634
|
-
yearLow: number;
|
|
635
|
-
marketCap: number;
|
|
636
|
-
priceAvg50: number;
|
|
637
|
-
priceAvg200: number;
|
|
638
|
-
volume: number;
|
|
639
|
-
avgVolume: number;
|
|
640
|
-
exchange: string;
|
|
641
|
-
open: number;
|
|
642
|
-
previousClose: number;
|
|
643
|
-
eps: number | null;
|
|
644
|
-
pe: number | null;
|
|
645
|
-
earningsAnnouncement: string | null;
|
|
646
|
-
sharesOutstanding: number;
|
|
647
|
-
timestamp: number;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
551
|
interface ETFHoldingDates {
|
|
651
552
|
date: string;
|
|
652
553
|
}
|
|
@@ -723,29 +624,6 @@ interface ETFStockExposure {
|
|
|
723
624
|
marketValue: number;
|
|
724
625
|
}
|
|
725
626
|
|
|
726
|
-
interface MutualFundQuote {
|
|
727
|
-
symbol: string;
|
|
728
|
-
price: number;
|
|
729
|
-
changesPercentage: number;
|
|
730
|
-
change: number;
|
|
731
|
-
dayLow: number;
|
|
732
|
-
dayHigh: number;
|
|
733
|
-
yearLow: number;
|
|
734
|
-
yearHigh: number;
|
|
735
|
-
marketCap: number;
|
|
736
|
-
priceAvg50: number;
|
|
737
|
-
priceAvg200: number;
|
|
738
|
-
volume: number;
|
|
739
|
-
avgVolume: number;
|
|
740
|
-
exchange: string;
|
|
741
|
-
open: number;
|
|
742
|
-
previousClose: number;
|
|
743
|
-
eps: number;
|
|
744
|
-
pe: number;
|
|
745
|
-
earningsAnnouncement: string;
|
|
746
|
-
sharesOutstanding: number;
|
|
747
|
-
timestamp: number;
|
|
748
|
-
}
|
|
749
627
|
interface MutualFundHolding {
|
|
750
628
|
holder: string;
|
|
751
629
|
shares: number;
|
|
@@ -774,11 +652,6 @@ interface TreasuryRate {
|
|
|
774
652
|
year30: number;
|
|
775
653
|
}
|
|
776
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';
|
|
777
|
-
interface EconomicIndicatorParams {
|
|
778
|
-
name: EconomicIndicatorName;
|
|
779
|
-
from?: string;
|
|
780
|
-
to?: string;
|
|
781
|
-
}
|
|
782
655
|
|
|
783
656
|
interface MarketHours {
|
|
784
657
|
stockExchangeName: string;
|
|
@@ -1036,15 +909,6 @@ interface EarningsCallTranscript {
|
|
|
1036
909
|
}
|
|
1037
910
|
type CompanyTranscriptData = [number, number, string];
|
|
1038
911
|
|
|
1039
|
-
interface SenateHouseTradingParams {
|
|
1040
|
-
symbol: string;
|
|
1041
|
-
}
|
|
1042
|
-
interface SenateHouseTradingRSSFeedParams {
|
|
1043
|
-
page: number;
|
|
1044
|
-
}
|
|
1045
|
-
interface SenateHouseTradingByNameParams {
|
|
1046
|
-
name: string;
|
|
1047
|
-
}
|
|
1048
912
|
interface SenateTradingResponse {
|
|
1049
913
|
firstName: string;
|
|
1050
914
|
lastName: string;
|
|
@@ -1092,16 +956,6 @@ interface SenateHouseTradingByNameResponse {
|
|
|
1092
956
|
link: string;
|
|
1093
957
|
}
|
|
1094
958
|
|
|
1095
|
-
interface Form13FParams {
|
|
1096
|
-
cik: string;
|
|
1097
|
-
date: string;
|
|
1098
|
-
}
|
|
1099
|
-
interface Form13FDatesParams {
|
|
1100
|
-
cik: string;
|
|
1101
|
-
}
|
|
1102
|
-
interface InstitutionalHolderParams {
|
|
1103
|
-
symbol: string;
|
|
1104
|
-
}
|
|
1105
959
|
interface Form13FResponse {
|
|
1106
960
|
date: string;
|
|
1107
961
|
fillingDate: string;
|
|
@@ -1202,39 +1056,6 @@ interface FailToDeliverResponse {
|
|
|
1202
1056
|
cusip: string;
|
|
1203
1057
|
name: string;
|
|
1204
1058
|
}
|
|
1205
|
-
interface InsiderTradingRSSParams {
|
|
1206
|
-
page: number;
|
|
1207
|
-
}
|
|
1208
|
-
interface InsiderTradingSearchParams {
|
|
1209
|
-
symbol?: string;
|
|
1210
|
-
reportingCik?: string;
|
|
1211
|
-
companyCik?: string;
|
|
1212
|
-
transactionType?: string;
|
|
1213
|
-
page: number;
|
|
1214
|
-
}
|
|
1215
|
-
interface InsidersBySymbolParams {
|
|
1216
|
-
symbol: string;
|
|
1217
|
-
}
|
|
1218
|
-
interface InsiderTradeStatisticsParams {
|
|
1219
|
-
symbol: string;
|
|
1220
|
-
}
|
|
1221
|
-
interface CikMapperParams {
|
|
1222
|
-
page: number;
|
|
1223
|
-
}
|
|
1224
|
-
interface CikMapperByNameParams {
|
|
1225
|
-
name: string;
|
|
1226
|
-
page?: number;
|
|
1227
|
-
}
|
|
1228
|
-
interface CikMapperBySymbolParams {
|
|
1229
|
-
symbol: string;
|
|
1230
|
-
}
|
|
1231
|
-
interface BeneficialOwnershipParams {
|
|
1232
|
-
symbol: string;
|
|
1233
|
-
}
|
|
1234
|
-
interface FailToDeliverParams {
|
|
1235
|
-
symbol: string;
|
|
1236
|
-
page?: number;
|
|
1237
|
-
}
|
|
1238
1059
|
declare enum TransactionType {
|
|
1239
1060
|
AWARD = "A-Award",
|
|
1240
1061
|
CONVERSION = "C-Conversion",
|
|
@@ -1354,7 +1175,6 @@ declare class FMPClient {
|
|
|
1354
1175
|
private stableClient;
|
|
1355
1176
|
private apiKey;
|
|
1356
1177
|
constructor(config: FMPConfig);
|
|
1357
|
-
private createClient;
|
|
1358
1178
|
/**
|
|
1359
1179
|
* Standard get method - returns raw API response
|
|
1360
1180
|
*
|
|
@@ -1375,372 +1195,1092 @@ declare class StockEndpoints {
|
|
|
1375
1195
|
private client;
|
|
1376
1196
|
constructor(client: FMPClient);
|
|
1377
1197
|
/**
|
|
1378
|
-
* Get
|
|
1379
|
-
*
|
|
1380
|
-
*
|
|
1381
|
-
*
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
*
|
|
1388
|
-
* @
|
|
1389
|
-
*
|
|
1390
|
-
*
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
/**
|
|
1400
|
-
* Get market cap
|
|
1401
|
-
* https://site.financialmodelingprep.com/developer/docs#market-cap-company-information
|
|
1402
|
-
* @param symbol - The stock symbol to get the market cap for
|
|
1403
|
-
* @returns The FMP Market Cap endpoint provides the current market capitalization of a company. Market cap is a measure of the size and relative importance of a company in the stock market. It is calculated by multiplying the current share price by the number of outstanding shares.
|
|
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}
|
|
1404
1219
|
*/
|
|
1405
|
-
getMarketCap(
|
|
1406
|
-
symbol: string;
|
|
1407
|
-
}): Promise<APIResponse<MarketCap>>;
|
|
1220
|
+
getMarketCap(symbol: string): Promise<APIResponse<MarketCap>>;
|
|
1408
1221
|
/**
|
|
1409
|
-
* Get stock splits
|
|
1410
|
-
*
|
|
1411
|
-
*
|
|
1412
|
-
*
|
|
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}
|
|
1413
1245
|
*/
|
|
1414
|
-
getStockSplits(
|
|
1415
|
-
symbol: string;
|
|
1416
|
-
}): Promise<APIResponse<StockSplitResponse>>;
|
|
1246
|
+
getStockSplits(symbol: string): Promise<APIResponse<StockSplitResponse>>;
|
|
1417
1247
|
/**
|
|
1418
|
-
* Get dividend
|
|
1419
|
-
*
|
|
1420
|
-
*
|
|
1421
|
-
*
|
|
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}
|
|
1422
1271
|
*/
|
|
1423
|
-
getDividendHistory(
|
|
1424
|
-
symbol: string;
|
|
1425
|
-
}): Promise<APIResponse<StockDividendResponse>>;
|
|
1272
|
+
getDividendHistory(symbol: string): Promise<APIResponse<StockDividendResponse>>;
|
|
1426
1273
|
/**
|
|
1427
|
-
* Get stock
|
|
1428
|
-
*
|
|
1429
|
-
*
|
|
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
|
+
* ```
|
|
1430
1298
|
*/
|
|
1431
|
-
getRealTimePrice(
|
|
1432
|
-
symbols: string[];
|
|
1433
|
-
}): Promise<APIResponse<StockRealTimePrice[]>>;
|
|
1299
|
+
getRealTimePrice(symbols: string[]): Promise<APIResponse<StockRealTimePrice[]>>;
|
|
1434
1300
|
/**
|
|
1435
|
-
* Get
|
|
1436
|
-
*
|
|
1437
|
-
*
|
|
1438
|
-
*
|
|
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}
|
|
1439
1331
|
*/
|
|
1440
|
-
getRealTimePriceForMultipleStocks(
|
|
1441
|
-
symbols: string[];
|
|
1442
|
-
}): Promise<APIResponse<StockRealTimePriceFull[]>>;
|
|
1332
|
+
getRealTimePriceForMultipleStocks(symbols: string[]): Promise<APIResponse<StockRealTimePriceFull[]>>;
|
|
1443
1333
|
}
|
|
1444
1334
|
|
|
1445
1335
|
declare class FinancialEndpoints {
|
|
1446
1336
|
private client;
|
|
1447
1337
|
constructor(client: FMPClient);
|
|
1448
1338
|
/**
|
|
1449
|
-
* Get income statement
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
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}
|
|
1455
1365
|
*/
|
|
1456
|
-
getIncomeStatement(
|
|
1366
|
+
getIncomeStatement(params: {
|
|
1367
|
+
symbol: string;
|
|
1368
|
+
period?: 'annual' | 'quarter';
|
|
1369
|
+
limit?: number;
|
|
1370
|
+
}): Promise<APIResponse<IncomeStatement[]>>;
|
|
1457
1371
|
/**
|
|
1458
|
-
* Get balance sheet
|
|
1459
|
-
*
|
|
1460
|
-
*
|
|
1461
|
-
*
|
|
1462
|
-
*
|
|
1463
|
-
*
|
|
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}
|
|
1464
1398
|
*/
|
|
1465
|
-
getBalanceSheet(
|
|
1399
|
+
getBalanceSheet(params: {
|
|
1400
|
+
symbol: string;
|
|
1401
|
+
period?: 'annual' | 'quarter';
|
|
1402
|
+
limit?: number;
|
|
1403
|
+
}): Promise<APIResponse<BalanceSheet[]>>;
|
|
1466
1404
|
/**
|
|
1467
|
-
* Get cash flow statement
|
|
1468
|
-
*
|
|
1469
|
-
*
|
|
1470
|
-
*
|
|
1471
|
-
*
|
|
1472
|
-
*
|
|
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}
|
|
1473
1431
|
*/
|
|
1474
|
-
getCashFlowStatement(
|
|
1432
|
+
getCashFlowStatement(params: {
|
|
1433
|
+
symbol: string;
|
|
1434
|
+
period?: 'annual' | 'quarter';
|
|
1435
|
+
limit?: number;
|
|
1436
|
+
}): Promise<APIResponse<CashFlowStatement[]>>;
|
|
1475
1437
|
/**
|
|
1476
|
-
* Get key metrics
|
|
1477
|
-
*
|
|
1478
|
-
*
|
|
1479
|
-
*
|
|
1480
|
-
*
|
|
1481
|
-
*
|
|
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}
|
|
1482
1464
|
*/
|
|
1483
|
-
getKeyMetrics(
|
|
1465
|
+
getKeyMetrics(params: {
|
|
1466
|
+
symbol: string;
|
|
1467
|
+
period?: 'annual' | 'quarter';
|
|
1468
|
+
limit?: number;
|
|
1469
|
+
}): Promise<APIResponse<KeyMetrics[]>>;
|
|
1484
1470
|
/**
|
|
1485
1471
|
* Get financial ratios
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1488
|
-
*
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
*
|
|
1495
|
-
*
|
|
1496
|
-
* @
|
|
1497
|
-
*
|
|
1498
|
-
* @
|
|
1499
|
-
*
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
*
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
*
|
|
1508
|
-
*
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
/**
|
|
1512
|
-
* Get income growth
|
|
1513
|
-
* https://site.financialmodelingprep.com/developer/docs#income-growth-statement-analysis
|
|
1514
|
-
* @param symbol - The stock symbol to get the income growth for
|
|
1515
|
-
* @param period - The period to get the income growth for (annual or quarter)
|
|
1516
|
-
* @param limit - The number of periods to get
|
|
1517
|
-
* @returns Get the income growth rate for a company. Measure how quickly a company's income is growing.
|
|
1518
|
-
*/
|
|
1519
|
-
getIncomeGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<IncomeGrowth[]>>;
|
|
1520
|
-
/**
|
|
1521
|
-
* Get balance sheet growth
|
|
1522
|
-
* https://site.financialmodelingprep.com/developer/docs#balance-sheet-growth-statement-analysis
|
|
1523
|
-
* @param symbol - The stock symbol to get the balance sheet growth for
|
|
1524
|
-
* @param period - The period to get the balance sheet growth for (annual or quarter)
|
|
1525
|
-
* @param limit - The number of periods to get
|
|
1526
|
-
* @returns Get the balance sheet growth rate for a company. Measure how quickly a company's assets and liabilities are growing.
|
|
1527
|
-
*/
|
|
1528
|
-
getBalanceSheetGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<BalanceSheetGrowth[]>>;
|
|
1529
|
-
/**
|
|
1530
|
-
* Get financial growth
|
|
1531
|
-
* https://site.financialmodelingprep.com/developer/docs#financial-growth-statement-analysis
|
|
1532
|
-
* @param symbol - The stock symbol to get the financial growth for
|
|
1533
|
-
* @param period - The period to get the financial growth for (annual or quarter)
|
|
1534
|
-
* @param limit - The number of periods to get
|
|
1535
|
-
* @returns Financial Growth Get the financial growth rate for a company. Measure how quickly a company's overall financial performance is improving.
|
|
1536
|
-
*/
|
|
1537
|
-
getFinancialGrowth({ symbol, period, limit, }: FinancialStatementsParams): Promise<APIResponse<FinancialGrowth[]>>;
|
|
1538
|
-
/**
|
|
1539
|
-
* Get earnings historical
|
|
1540
|
-
* https://site.financialmodelingprep.com/developer/docs#earnings-historical-earnings
|
|
1541
|
-
* @param symbol - The stock symbol to get the earnings historical for
|
|
1542
|
-
* @param limit - The number of periods to get
|
|
1543
|
-
* @returns A list of historical & upcoming earnings announcements for a specific company, including the date, estimated EPS, and actual EPS.
|
|
1544
|
-
*/
|
|
1545
|
-
getEarningsHistorical({ symbol, limit, }: FinancialStatementsParams): Promise<APIResponse<EarningsHistorical[]>>;
|
|
1546
|
-
/**
|
|
1547
|
-
* Get earnings surprises
|
|
1548
|
-
* https://site.financialmodelingprep.com/developer/docs#earnings-surprises-earnings
|
|
1549
|
-
* @param symbol - The stock symbol to get the earnings surprises for
|
|
1550
|
-
* @param limit - The number of periods to get
|
|
1551
|
-
* @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.
|
|
1552
|
-
*/
|
|
1553
|
-
getEarningsSurprises({ symbol, }: FinancialStatementsParams): Promise<APIResponse<EarningsSurprises[]>>;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
declare class ForexEndpoints {
|
|
1557
|
-
private client;
|
|
1558
|
-
constructor(client: FMPClient);
|
|
1559
|
-
/**
|
|
1560
|
-
* Get forex quote
|
|
1561
|
-
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.
|
|
1562
|
-
* @param params - Parameters for the forex quote request
|
|
1563
|
-
* @returns Forex quote data
|
|
1564
|
-
*/
|
|
1565
|
-
getQuote(params: SymbolParams): Promise<APIResponse<ForexQuote[]>>;
|
|
1566
|
-
/**
|
|
1567
|
-
* Get historical forex prices
|
|
1568
|
-
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
1569
|
-
* @param symbol - The forex symbol to get the historical prices for
|
|
1570
|
-
* @param from - The start date to get the historical prices for
|
|
1571
|
-
* @param to - The end date to get the historical prices for
|
|
1572
|
-
* @returns Historical forex price data
|
|
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}
|
|
1573
1497
|
*/
|
|
1574
|
-
|
|
1498
|
+
getFinancialRatios(params: {
|
|
1575
1499
|
symbol: string;
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
}): Promise<APIResponse<
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
declare class CryptoEndpoints {
|
|
1582
|
-
private client;
|
|
1583
|
-
constructor(client: FMPClient);
|
|
1500
|
+
period?: 'annual' | 'quarter';
|
|
1501
|
+
limit?: number;
|
|
1502
|
+
}): Promise<APIResponse<FinancialRatios[]>>;
|
|
1584
1503
|
/**
|
|
1585
|
-
* Get
|
|
1586
|
-
*
|
|
1587
|
-
*
|
|
1588
|
-
*
|
|
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}
|
|
1589
1530
|
*/
|
|
1590
|
-
|
|
1531
|
+
getEnterpriseValue(params: {
|
|
1591
1532
|
symbol: string;
|
|
1592
|
-
|
|
1533
|
+
period?: 'annual' | 'quarter';
|
|
1534
|
+
limit?: number;
|
|
1535
|
+
}): Promise<APIResponse<EnterpriseValue[]>>;
|
|
1593
1536
|
/**
|
|
1594
|
-
* Get
|
|
1595
|
-
*
|
|
1596
|
-
*
|
|
1597
|
-
*
|
|
1598
|
-
*
|
|
1599
|
-
*
|
|
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}
|
|
1600
1563
|
*/
|
|
1601
|
-
|
|
1564
|
+
getCashflowGrowth(params: {
|
|
1602
1565
|
symbol: string;
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
}): Promise<APIResponse<
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
declare class ETFEndpoints {
|
|
1609
|
-
private client;
|
|
1610
|
-
constructor(client: FMPClient);
|
|
1566
|
+
period?: 'annual' | 'quarter';
|
|
1567
|
+
limit?: number;
|
|
1568
|
+
}): Promise<APIResponse<CashflowGrowth[]>>;
|
|
1611
1569
|
/**
|
|
1612
|
-
* Get
|
|
1613
|
-
*
|
|
1614
|
-
*
|
|
1615
|
-
*
|
|
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}
|
|
1616
1596
|
*/
|
|
1617
|
-
|
|
1597
|
+
getIncomeGrowth(params: {
|
|
1598
|
+
symbol: string;
|
|
1599
|
+
period?: 'annual' | 'quarter';
|
|
1600
|
+
limit?: number;
|
|
1601
|
+
}): Promise<APIResponse<IncomeGrowth[]>>;
|
|
1618
1602
|
/**
|
|
1619
|
-
* Get
|
|
1620
|
-
*
|
|
1621
|
-
*
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
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}
|
|
1624
1629
|
*/
|
|
1625
|
-
|
|
1630
|
+
getBalanceSheetGrowth(params: {
|
|
1626
1631
|
symbol: string;
|
|
1627
|
-
|
|
1628
|
-
|
|
1632
|
+
period?: 'annual' | 'quarter';
|
|
1633
|
+
limit?: number;
|
|
1634
|
+
}): Promise<APIResponse<BalanceSheetGrowth[]>>;
|
|
1629
1635
|
/**
|
|
1630
|
-
* Get
|
|
1631
|
-
*
|
|
1632
|
-
*
|
|
1633
|
-
*
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
*
|
|
1638
|
-
*
|
|
1639
|
-
* @param
|
|
1640
|
-
*
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
*
|
|
1645
|
-
*
|
|
1646
|
-
*
|
|
1647
|
-
*
|
|
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}
|
|
1648
1662
|
*/
|
|
1649
|
-
|
|
1663
|
+
getFinancialGrowth(params: {
|
|
1664
|
+
symbol: string;
|
|
1665
|
+
period?: 'annual' | 'quarter';
|
|
1666
|
+
limit?: number;
|
|
1667
|
+
}): Promise<APIResponse<FinancialGrowth[]>>;
|
|
1650
1668
|
/**
|
|
1651
|
-
* Get
|
|
1652
|
-
*
|
|
1653
|
-
*
|
|
1654
|
-
*
|
|
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}
|
|
1655
1694
|
*/
|
|
1656
|
-
|
|
1695
|
+
getEarningsHistorical(params: {
|
|
1696
|
+
symbol: string;
|
|
1697
|
+
limit?: number;
|
|
1698
|
+
}): Promise<APIResponse<EarningsHistorical[]>>;
|
|
1657
1699
|
/**
|
|
1658
|
-
* Get
|
|
1659
|
-
*
|
|
1660
|
-
*
|
|
1661
|
-
*
|
|
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}
|
|
1662
1723
|
*/
|
|
1663
|
-
|
|
1724
|
+
getEarningsSurprises(symbol: string): Promise<APIResponse<EarningsSurprises[]>>;
|
|
1664
1725
|
}
|
|
1665
1726
|
|
|
1666
|
-
declare class
|
|
1727
|
+
declare class ETFEndpoints {
|
|
1667
1728
|
private client;
|
|
1668
1729
|
constructor(client: FMPClient);
|
|
1669
1730
|
/**
|
|
1670
|
-
* Get
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
1673
|
-
*
|
|
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}
|
|
1754
|
+
*/
|
|
1755
|
+
getHoldingDates(symbol: string): Promise<APIResponse<ETFHoldingDates[]>>;
|
|
1756
|
+
/**
|
|
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}
|
|
1782
|
+
*/
|
|
1783
|
+
getHoldings(params: {
|
|
1784
|
+
symbol: string;
|
|
1785
|
+
date: string;
|
|
1786
|
+
}): Promise<APIResponse<ETFHolding[]>>;
|
|
1787
|
+
/**
|
|
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}
|
|
1811
|
+
*/
|
|
1812
|
+
getHolder(symbol: string): Promise<APIResponse<ETFHolder[]>>;
|
|
1813
|
+
/**
|
|
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}
|
|
1836
|
+
*/
|
|
1837
|
+
getProfile(symbol: string): Promise<APIResponse<ETFProfile>>;
|
|
1838
|
+
/**
|
|
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}
|
|
1674
1862
|
*/
|
|
1675
|
-
|
|
1863
|
+
getSectorWeighting(symbol: string): Promise<APIResponse<ETFWeighting[]>>;
|
|
1676
1864
|
/**
|
|
1677
|
-
* Get
|
|
1678
|
-
*
|
|
1679
|
-
*
|
|
1680
|
-
*
|
|
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}
|
|
1888
|
+
*/
|
|
1889
|
+
getCountryWeighting(symbol: string): Promise<APIResponse<ETFCountryWeighting[]>>;
|
|
1890
|
+
/**
|
|
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}
|
|
1681
1914
|
*/
|
|
1682
|
-
|
|
1915
|
+
getStockExposure(symbol: string): Promise<APIResponse<ETFStockExposure[]>>;
|
|
1683
1916
|
}
|
|
1684
1917
|
|
|
1685
1918
|
declare class EconomicEndpoints {
|
|
1686
1919
|
private client;
|
|
1687
1920
|
constructor(client: FMPClient);
|
|
1688
1921
|
/**
|
|
1689
|
-
* Get treasury rates
|
|
1690
|
-
*
|
|
1691
|
-
*
|
|
1692
|
-
*
|
|
1693
|
-
*
|
|
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}
|
|
1694
1953
|
*/
|
|
1695
|
-
getTreasuryRates(params:
|
|
1954
|
+
getTreasuryRates(params: {
|
|
1955
|
+
from?: string;
|
|
1956
|
+
to?: string;
|
|
1957
|
+
}): Promise<APIResponse<TreasuryRate[]>>;
|
|
1696
1958
|
/**
|
|
1697
|
-
* Get economic indicators
|
|
1698
|
-
*
|
|
1699
|
-
*
|
|
1700
|
-
*
|
|
1701
|
-
*
|
|
1702
|
-
*
|
|
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}
|
|
1703
2000
|
*/
|
|
1704
|
-
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[]>>;
|
|
1705
2006
|
}
|
|
1706
2007
|
|
|
1707
2008
|
declare class MarketEndpoints {
|
|
1708
2009
|
private client;
|
|
1709
2010
|
constructor(client: FMPClient);
|
|
1710
2011
|
/**
|
|
1711
|
-
* 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}
|
|
1712
2038
|
*/
|
|
1713
2039
|
getMarketHours(): Promise<APIResponse<MarketHours>>;
|
|
1714
2040
|
/**
|
|
1715
|
-
* 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}
|
|
1716
2069
|
*/
|
|
1717
2070
|
getMarketPerformance(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1718
2071
|
/**
|
|
1719
|
-
* Get top
|
|
1720
|
-
*
|
|
1721
|
-
*
|
|
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}
|
|
1722
2103
|
*/
|
|
1723
2104
|
getGainers(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1724
2105
|
/**
|
|
1725
|
-
* Get top
|
|
1726
|
-
*
|
|
1727
|
-
*
|
|
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}
|
|
1728
2142
|
*/
|
|
1729
2143
|
getLosers(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1730
2144
|
/**
|
|
1731
|
-
* 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}
|
|
1732
2186
|
*/
|
|
1733
2187
|
getMostActive(): Promise<APIResponse<MarketPerformance[]>>;
|
|
1734
2188
|
/**
|
|
1735
|
-
* Get sector performance
|
|
1736
|
-
*
|
|
1737
|
-
*
|
|
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}
|
|
1738
2235
|
*/
|
|
1739
2236
|
getSectorPerformance(): Promise<APIResponse<MarketSectorPerformance[]>>;
|
|
1740
2237
|
/**
|
|
1741
|
-
* Get market indices
|
|
1742
|
-
*
|
|
1743
|
-
*
|
|
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}
|
|
1744
2284
|
*/
|
|
1745
2285
|
getMarketIndex(): Promise<APIResponse<MarketIndex[]>>;
|
|
1746
2286
|
}
|
|
@@ -1749,33 +2289,174 @@ declare class ListEndpoints {
|
|
|
1749
2289
|
private client;
|
|
1750
2290
|
constructor(client: FMPClient);
|
|
1751
2291
|
/**
|
|
1752
|
-
* Get
|
|
1753
|
-
*
|
|
1754
|
-
*
|
|
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}
|
|
1755
2316
|
*/
|
|
1756
2317
|
getStockList(): Promise<APIResponse<StockList[]>>;
|
|
1757
2318
|
/**
|
|
1758
|
-
* Get
|
|
1759
|
-
*
|
|
1760
|
-
*
|
|
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}
|
|
1761
2349
|
*/
|
|
1762
2350
|
getETFList(): Promise<APIResponse<ETFList[]>>;
|
|
1763
2351
|
/**
|
|
1764
|
-
* Get
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
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}
|
|
1767
2384
|
*/
|
|
1768
2385
|
getCryptoList(): Promise<APIResponse<CryptoList[]>>;
|
|
1769
2386
|
/**
|
|
1770
|
-
* Get forex
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
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}
|
|
1773
2421
|
*/
|
|
1774
2422
|
getForexList(): Promise<APIResponse<ForexList[]>>;
|
|
1775
2423
|
/**
|
|
1776
|
-
* Get available indexes
|
|
1777
|
-
*
|
|
1778
|
-
*
|
|
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}
|
|
1779
2460
|
*/
|
|
1780
2461
|
getAvailableIndexes(): Promise<APIResponse<AvailableIndexesList[]>>;
|
|
1781
2462
|
}
|
|
@@ -1784,206 +2465,786 @@ declare class CalendarEndpoints {
|
|
|
1784
2465
|
private client;
|
|
1785
2466
|
constructor(client: FMPClient);
|
|
1786
2467
|
/**
|
|
1787
|
-
* Get earnings calendar
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
1790
|
-
*
|
|
1791
|
-
*
|
|
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}
|
|
1792
2499
|
*/
|
|
1793
|
-
getEarningsCalendar(
|
|
2500
|
+
getEarningsCalendar(params?: {
|
|
2501
|
+
from?: string;
|
|
2502
|
+
to?: string;
|
|
2503
|
+
}): Promise<APIResponse<EarningsCalendar[]>>;
|
|
1794
2504
|
/**
|
|
1795
|
-
* Get earnings
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
1798
|
-
*
|
|
1799
|
-
*
|
|
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}
|
|
1800
2536
|
*/
|
|
1801
|
-
getEarningsConfirmed(
|
|
2537
|
+
getEarningsConfirmed(params?: {
|
|
2538
|
+
from?: string;
|
|
2539
|
+
to?: string;
|
|
2540
|
+
}): Promise<APIResponse<EarningsConfirmed[]>>;
|
|
1802
2541
|
/**
|
|
1803
|
-
* Get dividends calendar
|
|
1804
|
-
*
|
|
1805
|
-
*
|
|
1806
|
-
*
|
|
1807
|
-
*
|
|
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}
|
|
1808
2573
|
*/
|
|
1809
|
-
getDividendsCalendar(
|
|
2574
|
+
getDividendsCalendar(params?: {
|
|
2575
|
+
from?: string;
|
|
2576
|
+
to?: string;
|
|
2577
|
+
}): Promise<APIResponse<DividendsCalendar[]>>;
|
|
1810
2578
|
/**
|
|
1811
|
-
* Get
|
|
1812
|
-
*
|
|
1813
|
-
*
|
|
1814
|
-
*
|
|
1815
|
-
*
|
|
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}
|
|
1816
2610
|
*/
|
|
1817
|
-
getEconomicsCalendar(
|
|
2611
|
+
getEconomicsCalendar(params?: {
|
|
2612
|
+
from?: string;
|
|
2613
|
+
to?: string;
|
|
2614
|
+
}): Promise<APIResponse<EconomicsCalendar[]>>;
|
|
1818
2615
|
/**
|
|
1819
|
-
* Get IPO calendar
|
|
1820
|
-
*
|
|
1821
|
-
*
|
|
1822
|
-
*
|
|
1823
|
-
*
|
|
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}
|
|
1824
2647
|
*/
|
|
1825
|
-
getIPOCalendar(
|
|
2648
|
+
getIPOCalendar(params?: {
|
|
2649
|
+
from?: string;
|
|
2650
|
+
to?: string;
|
|
2651
|
+
}): Promise<APIResponse<IPOCalendar[]>>;
|
|
1826
2652
|
/**
|
|
1827
|
-
* Get stock splits calendar
|
|
1828
|
-
*
|
|
1829
|
-
*
|
|
1830
|
-
*
|
|
1831
|
-
*
|
|
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}
|
|
1832
2684
|
*/
|
|
1833
|
-
getSplitsCalendar(
|
|
2685
|
+
getSplitsCalendar(params?: {
|
|
2686
|
+
from?: string;
|
|
2687
|
+
to?: string;
|
|
2688
|
+
}): Promise<APIResponse<SplitsCalendar[]>>;
|
|
1834
2689
|
}
|
|
1835
2690
|
|
|
1836
2691
|
declare class CompanyEndpoints {
|
|
1837
2692
|
private client;
|
|
1838
2693
|
constructor(client: FMPClient);
|
|
1839
2694
|
/**
|
|
1840
|
-
* Get company profile
|
|
1841
|
-
*
|
|
1842
|
-
*
|
|
1843
|
-
*
|
|
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}
|
|
1844
2719
|
*/
|
|
1845
|
-
getCompanyProfile(
|
|
1846
|
-
symbol: string;
|
|
1847
|
-
}): Promise<APIResponse<CompanyProfile>>;
|
|
2720
|
+
getCompanyProfile(symbol: string): Promise<APIResponse<CompanyProfile>>;
|
|
1848
2721
|
/**
|
|
1849
|
-
* Get executive compensation
|
|
1850
|
-
*
|
|
1851
|
-
*
|
|
1852
|
-
*
|
|
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}
|
|
1853
2748
|
*/
|
|
1854
|
-
getExecutiveCompensation(
|
|
1855
|
-
symbol: string;
|
|
1856
|
-
}): Promise<APIResponse<ExecutiveCompensation[]>>;
|
|
2749
|
+
getExecutiveCompensation(symbol: string): Promise<APIResponse<ExecutiveCompensation[]>>;
|
|
1857
2750
|
/**
|
|
1858
|
-
* Get company notes
|
|
1859
|
-
*
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
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}
|
|
1862
2775
|
*/
|
|
1863
|
-
getCompanyNotes(
|
|
1864
|
-
symbol: string;
|
|
1865
|
-
}): Promise<APIResponse<CompanyNotes[]>>;
|
|
2776
|
+
getCompanyNotes(symbol: string): Promise<APIResponse<CompanyNotes[]>>;
|
|
1866
2777
|
/**
|
|
1867
|
-
* Get historical employee count
|
|
1868
|
-
*
|
|
1869
|
-
*
|
|
1870
|
-
*
|
|
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}
|
|
1871
2801
|
*/
|
|
1872
|
-
getHistoricalEmployeeCount(
|
|
1873
|
-
symbol: string;
|
|
1874
|
-
}): Promise<APIResponse<HistoricalEmployeeCount[]>>;
|
|
2802
|
+
getHistoricalEmployeeCount(symbol: string): Promise<APIResponse<HistoricalEmployeeCount[]>>;
|
|
1875
2803
|
/**
|
|
1876
|
-
* Get shares float
|
|
1877
|
-
*
|
|
1878
|
-
*
|
|
1879
|
-
*
|
|
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}
|
|
1880
2827
|
*/
|
|
1881
|
-
getSharesFloat(
|
|
1882
|
-
symbol: string;
|
|
1883
|
-
}): Promise<APIResponse<SharesFloat>>;
|
|
2828
|
+
getSharesFloat(symbol: string): Promise<APIResponse<SharesFloat>>;
|
|
1884
2829
|
/**
|
|
1885
|
-
* Get historical shares float
|
|
1886
|
-
*
|
|
1887
|
-
*
|
|
1888
|
-
*
|
|
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}
|
|
1889
2853
|
*/
|
|
1890
|
-
getHistoricalSharesFloat(
|
|
1891
|
-
symbol: string;
|
|
1892
|
-
}): Promise<APIResponse<HistoricalSharesFloat[]>>;
|
|
2854
|
+
getHistoricalSharesFloat(symbol: string): Promise<APIResponse<HistoricalSharesFloat[]>>;
|
|
1893
2855
|
/**
|
|
1894
|
-
* Get earnings call transcript
|
|
1895
|
-
*
|
|
1896
|
-
*
|
|
1897
|
-
*
|
|
1898
|
-
*
|
|
1899
|
-
*
|
|
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}
|
|
1900
2888
|
*/
|
|
1901
|
-
getEarningsCallTranscript(
|
|
2889
|
+
getEarningsCallTranscript(params: {
|
|
1902
2890
|
symbol: string;
|
|
1903
2891
|
year: number;
|
|
1904
2892
|
quarter: number;
|
|
1905
2893
|
}): Promise<APIResponse<EarningsCallTranscript[]>>;
|
|
1906
2894
|
/**
|
|
1907
|
-
* Get
|
|
1908
|
-
*
|
|
1909
|
-
*
|
|
1910
|
-
*
|
|
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}
|
|
1911
2918
|
*/
|
|
1912
|
-
getCompanyTranscriptData(
|
|
1913
|
-
symbol: string;
|
|
1914
|
-
}): Promise<APIResponse<CompanyTranscriptData[]>>;
|
|
2919
|
+
getCompanyTranscriptData(symbol: string): Promise<APIResponse<CompanyTranscriptData[]>>;
|
|
1915
2920
|
}
|
|
1916
2921
|
|
|
1917
2922
|
declare class QuoteEndpoints {
|
|
1918
2923
|
private client;
|
|
1919
2924
|
constructor(client: FMPClient);
|
|
1920
2925
|
/**
|
|
1921
|
-
* Get quote for any asset type (
|
|
1922
|
-
*
|
|
1923
|
-
*
|
|
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
|
+
* ```
|
|
1924
2946
|
*/
|
|
1925
|
-
getQuote(
|
|
2947
|
+
getQuote(symbol: string): Promise<APIResponse<Quote>>;
|
|
1926
2948
|
/**
|
|
1927
|
-
* Get historical
|
|
1928
|
-
*
|
|
1929
|
-
*
|
|
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
|
+
* ```
|
|
1930
2976
|
*/
|
|
1931
|
-
getHistoricalPrice(params:
|
|
2977
|
+
getHistoricalPrice(params: {
|
|
2978
|
+
symbol: string;
|
|
2979
|
+
from?: string;
|
|
2980
|
+
to?: string;
|
|
2981
|
+
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1932
2982
|
/**
|
|
1933
|
-
* Get
|
|
1934
|
-
*
|
|
1935
|
-
*
|
|
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
|
+
* ```
|
|
1936
3007
|
*/
|
|
1937
3008
|
getQuotes(symbols: string[]): Promise<APIResponse<Quote[]>>;
|
|
1938
3009
|
/**
|
|
1939
|
-
* Get intraday data
|
|
1940
|
-
*
|
|
1941
|
-
*
|
|
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
|
+
* ```
|
|
1942
3040
|
*/
|
|
1943
|
-
getIntraday(params:
|
|
3041
|
+
getIntraday(params: {
|
|
3042
|
+
symbol: string;
|
|
3043
|
+
interval: '1min' | '5min' | '15min' | '30min' | '1hour' | '4hour';
|
|
3044
|
+
from?: string;
|
|
3045
|
+
to?: string;
|
|
3046
|
+
}): Promise<APIResponse<HistoricalPriceData[]>>;
|
|
1944
3047
|
}
|
|
1945
3048
|
|
|
1946
3049
|
declare class SenateHouseEndpoints {
|
|
1947
3050
|
private client;
|
|
1948
3051
|
constructor(client: FMPClient);
|
|
1949
3052
|
/**
|
|
1950
|
-
* Get senate trading data
|
|
1951
|
-
*
|
|
1952
|
-
*
|
|
1953
|
-
*
|
|
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}
|
|
1954
3079
|
*/
|
|
1955
|
-
getSenateTrading(params:
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
*
|
|
3080
|
+
getSenateTrading(params: {
|
|
3081
|
+
symbol: string;
|
|
3082
|
+
}): Promise<APIResponse<SenateTradingResponse[]>>;
|
|
3083
|
+
/**
|
|
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}
|
|
1960
3113
|
*/
|
|
1961
|
-
getSenateTradingRSSFeed(params:
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
*
|
|
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}
|
|
1966
3145
|
*/
|
|
1967
|
-
getSenateTradingByName(params:
|
|
3146
|
+
getSenateTradingByName(params: {
|
|
3147
|
+
name: string;
|
|
3148
|
+
}): Promise<APIResponse<SenateHouseTradingByNameResponse[]>>;
|
|
1968
3149
|
/**
|
|
1969
|
-
* Get house trading data
|
|
1970
|
-
*
|
|
1971
|
-
*
|
|
1972
|
-
*
|
|
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}
|
|
1973
3177
|
*/
|
|
1974
|
-
getHouseTrading(params:
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
*
|
|
3178
|
+
getHouseTrading(params: {
|
|
3179
|
+
symbol: string;
|
|
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}
|
|
1979
3211
|
*/
|
|
1980
|
-
getHouseTradingRSSFeed(params:
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
*
|
|
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}
|
|
1985
3244
|
*/
|
|
1986
|
-
getHouseTradingByName(params:
|
|
3245
|
+
getHouseTradingByName(params: {
|
|
3246
|
+
name: string;
|
|
3247
|
+
}): Promise<APIResponse<SenateHouseTradingByNameResponse[]>>;
|
|
1987
3248
|
}
|
|
1988
3249
|
|
|
1989
3250
|
declare class InstitutionalEndpoints {
|
|
@@ -1991,100 +3252,437 @@ declare class InstitutionalEndpoints {
|
|
|
1991
3252
|
constructor(client: FMPClient);
|
|
1992
3253
|
/**
|
|
1993
3254
|
* Get Form 13F institutional stock ownership data
|
|
1994
|
-
*
|
|
1995
|
-
*
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
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}
|
|
1998
3289
|
*/
|
|
1999
|
-
getForm13F(params:
|
|
3290
|
+
getForm13F(params: {
|
|
3291
|
+
cik: string;
|
|
3292
|
+
date?: string;
|
|
3293
|
+
}): Promise<APIResponse<Form13FResponse[]>>;
|
|
2000
3294
|
/**
|
|
2001
|
-
* Get Form 13F dates for
|
|
2002
|
-
*
|
|
2003
|
-
*
|
|
2004
|
-
*
|
|
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}
|
|
2005
3323
|
*/
|
|
2006
|
-
getForm13FDates(params:
|
|
3324
|
+
getForm13FDates(params: {
|
|
3325
|
+
cik: string;
|
|
3326
|
+
}): Promise<APIResponse<string[]>>;
|
|
2007
3327
|
/**
|
|
2008
|
-
* Get institutional holders
|
|
2009
|
-
*
|
|
2010
|
-
*
|
|
2011
|
-
*
|
|
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}
|
|
2012
3361
|
*/
|
|
2013
|
-
getInstitutionalHolders(params:
|
|
3362
|
+
getInstitutionalHolders(params: {
|
|
3363
|
+
symbol: string;
|
|
3364
|
+
}): Promise<APIResponse<InstitutionalHolderResponse[]>>;
|
|
2014
3365
|
}
|
|
2015
3366
|
|
|
2016
3367
|
declare class InsiderEndpoints {
|
|
2017
3368
|
private client;
|
|
2018
3369
|
constructor(client: FMPClient);
|
|
2019
3370
|
/**
|
|
2020
|
-
* Get insider trading RSS feed
|
|
2021
|
-
*
|
|
2022
|
-
*
|
|
2023
|
-
*
|
|
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}
|
|
2024
3395
|
*/
|
|
2025
|
-
getInsiderTradingRSS(
|
|
3396
|
+
getInsiderTradingRSS(params: {
|
|
3397
|
+
page?: number;
|
|
3398
|
+
}): Promise<APIResponse<InsiderTradingRSSResponse[]>>;
|
|
2026
3399
|
/**
|
|
2027
|
-
* Search for insider trades
|
|
2028
|
-
*
|
|
2029
|
-
*
|
|
2030
|
-
*
|
|
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}
|
|
2031
3440
|
*/
|
|
2032
|
-
searchInsiderTrading(
|
|
3441
|
+
searchInsiderTrading(params: {
|
|
3442
|
+
symbol?: string;
|
|
3443
|
+
reportingCik?: string;
|
|
3444
|
+
companyCik?: string;
|
|
3445
|
+
transactionType?: string;
|
|
3446
|
+
page?: number;
|
|
3447
|
+
}): Promise<APIResponse<InsiderTradingSearchResponse[]>>;
|
|
2033
3448
|
/**
|
|
2034
|
-
* Get transaction types
|
|
2035
|
-
*
|
|
2036
|
-
*
|
|
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}
|
|
2037
3467
|
*/
|
|
2038
3468
|
getTransactionTypes(): Promise<APIResponse<TransactionTypesResponse>>;
|
|
2039
3469
|
/**
|
|
2040
|
-
* Get insiders
|
|
2041
|
-
*
|
|
2042
|
-
*
|
|
2043
|
-
*
|
|
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}
|
|
2044
3494
|
*/
|
|
2045
|
-
getInsidersBySymbol(
|
|
3495
|
+
getInsidersBySymbol(params: {
|
|
3496
|
+
symbol: string;
|
|
3497
|
+
}): Promise<APIResponse<InsidersBySymbolResponse[]>>;
|
|
2046
3498
|
/**
|
|
2047
|
-
* Get insider trade statistics
|
|
2048
|
-
*
|
|
2049
|
-
*
|
|
2050
|
-
*
|
|
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}
|
|
2051
3523
|
*/
|
|
2052
|
-
getInsiderTradeStatistics(
|
|
3524
|
+
getInsiderTradeStatistics(params: {
|
|
3525
|
+
symbol: string;
|
|
3526
|
+
}): Promise<APIResponse<InsiderTradeStatisticsResponse[]>>;
|
|
2053
3527
|
/**
|
|
2054
|
-
* Get CIK mapper
|
|
2055
|
-
*
|
|
2056
|
-
*
|
|
2057
|
-
*
|
|
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}
|
|
2058
3552
|
*/
|
|
2059
|
-
getCikMapper(
|
|
3553
|
+
getCikMapper(params: {
|
|
3554
|
+
page?: number;
|
|
3555
|
+
}): Promise<APIResponse<CikMapperResponse[]>>;
|
|
2060
3556
|
/**
|
|
2061
|
-
* Get CIK mapper by name
|
|
2062
|
-
*
|
|
2063
|
-
*
|
|
2064
|
-
*
|
|
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}
|
|
2065
3588
|
*/
|
|
2066
|
-
getCikMapperByName(
|
|
3589
|
+
getCikMapperByName(params: {
|
|
3590
|
+
name: string;
|
|
3591
|
+
page?: number;
|
|
3592
|
+
}): Promise<APIResponse<CikMapperResponse[]>>;
|
|
2067
3593
|
/**
|
|
2068
3594
|
* Get CIK mapper by symbol
|
|
2069
|
-
*
|
|
2070
|
-
*
|
|
2071
|
-
*
|
|
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}
|
|
2072
3616
|
*/
|
|
2073
|
-
getCikMapperBySymbol(
|
|
3617
|
+
getCikMapperBySymbol(params: {
|
|
3618
|
+
symbol: string;
|
|
3619
|
+
}): Promise<APIResponse<CikMapperBySymbolResponse>>;
|
|
2074
3620
|
/**
|
|
2075
3621
|
* Get beneficial ownership acquisitions
|
|
2076
|
-
*
|
|
2077
|
-
*
|
|
2078
|
-
*
|
|
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}
|
|
2079
3645
|
*/
|
|
2080
|
-
getBeneficialOwnership(
|
|
3646
|
+
getBeneficialOwnership(params: {
|
|
3647
|
+
symbol: string;
|
|
3648
|
+
}): Promise<APIResponse<BeneficialOwnershipResponse[]>>;
|
|
2081
3649
|
/**
|
|
2082
3650
|
* Get fail to deliver data
|
|
2083
|
-
*
|
|
2084
|
-
*
|
|
2085
|
-
*
|
|
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}
|
|
2086
3681
|
*/
|
|
2087
|
-
getFailToDeliver(
|
|
3682
|
+
getFailToDeliver(params: {
|
|
3683
|
+
symbol: string;
|
|
3684
|
+
page?: number;
|
|
3685
|
+
}): Promise<APIResponse<FailToDeliverResponse[]>>;
|
|
2088
3686
|
/**
|
|
2089
3687
|
* Get all insider trades for a symbol (convenience method)
|
|
2090
3688
|
* @param symbol - The stock symbol to get insider trades for
|
|
@@ -2120,63 +3718,335 @@ declare class SECEndpoints {
|
|
|
2120
3718
|
constructor(client: FMPClient);
|
|
2121
3719
|
/**
|
|
2122
3720
|
* Get RSS feed of SEC filings
|
|
2123
|
-
*
|
|
2124
|
-
*
|
|
2125
|
-
*
|
|
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}
|
|
2126
3753
|
*/
|
|
2127
|
-
getRSSFeed(params?:
|
|
3754
|
+
getRSSFeed(params?: {
|
|
3755
|
+
limit?: number;
|
|
3756
|
+
type?: string;
|
|
3757
|
+
from?: string;
|
|
3758
|
+
to?: string;
|
|
3759
|
+
isDone?: boolean;
|
|
3760
|
+
}): Promise<APIResponse<RSSFeedItem[]>>;
|
|
2128
3761
|
/**
|
|
2129
|
-
* Get RSS feed of all SEC filings
|
|
2130
|
-
*
|
|
2131
|
-
*
|
|
2132
|
-
*
|
|
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}
|
|
2133
3787
|
*/
|
|
2134
|
-
getRSSFeedAll(params?:
|
|
3788
|
+
getRSSFeedAll(params?: {
|
|
3789
|
+
page?: number;
|
|
3790
|
+
datatype?: string;
|
|
3791
|
+
}): Promise<APIResponse<RSSFeedAllItem[]>>;
|
|
2135
3792
|
/**
|
|
2136
3793
|
* Get RSS feed V3 of SEC filings
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
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}
|
|
2140
3818
|
*/
|
|
2141
|
-
getRSSFeedV3(params?:
|
|
3819
|
+
getRSSFeedV3(params?: {
|
|
3820
|
+
page?: number;
|
|
3821
|
+
datatype?: string;
|
|
3822
|
+
}): Promise<APIResponse<RSSFeedV3Item[]>>;
|
|
2142
3823
|
/**
|
|
2143
3824
|
* Get RSS feed of 8-K SEC filings
|
|
2144
|
-
*
|
|
2145
|
-
*
|
|
2146
|
-
*
|
|
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}
|
|
2147
3857
|
*/
|
|
2148
|
-
getRSSFeed8K(params?:
|
|
3858
|
+
getRSSFeed8K(params?: {
|
|
3859
|
+
page?: number;
|
|
3860
|
+
from?: string;
|
|
3861
|
+
to?: string;
|
|
3862
|
+
hasFinancial?: boolean;
|
|
3863
|
+
limit?: number;
|
|
3864
|
+
}): Promise<APIResponse<RSSFeed8KItem[]>>;
|
|
2149
3865
|
/**
|
|
2150
3866
|
* Get SEC filings for a specific company
|
|
2151
|
-
*
|
|
2152
|
-
*
|
|
2153
|
-
*
|
|
2154
|
-
*
|
|
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}
|
|
2155
3892
|
*/
|
|
2156
3893
|
getSECFilings({ symbol, params, }: {
|
|
2157
3894
|
symbol: string;
|
|
2158
|
-
params?:
|
|
3895
|
+
params?: {
|
|
3896
|
+
type?: string;
|
|
3897
|
+
page?: number;
|
|
3898
|
+
};
|
|
2159
3899
|
}): Promise<APIResponse<SECFiling[]>>;
|
|
2160
3900
|
/**
|
|
2161
|
-
* Get individual industry classification
|
|
2162
|
-
*
|
|
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
|
+
*
|
|
2163
3907
|
* @param params - Industry classification parameters
|
|
2164
|
-
* @returns
|
|
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}
|
|
2165
3927
|
*/
|
|
2166
|
-
getIndividualIndustryClassification(params:
|
|
3928
|
+
getIndividualIndustryClassification(params: {
|
|
3929
|
+
symbol?: string;
|
|
3930
|
+
cik?: string;
|
|
3931
|
+
sicCode?: number;
|
|
3932
|
+
}): Promise<APIResponse<IndustryClassification>>;
|
|
2167
3933
|
/**
|
|
2168
3934
|
* Get all industry classifications
|
|
2169
|
-
*
|
|
2170
|
-
*
|
|
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}
|
|
2171
3961
|
*/
|
|
2172
3962
|
getAllIndustryClassifications(): Promise<APIResponse<IndustryClassification[]>>;
|
|
2173
3963
|
/**
|
|
2174
3964
|
* Get industry classification codes
|
|
2175
|
-
*
|
|
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
|
+
*
|
|
2176
3970
|
* @param params - Industry classification codes parameters
|
|
2177
|
-
* @returns
|
|
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}
|
|
3989
|
+
*/
|
|
3990
|
+
getIndustryClassificationCodes(params: {
|
|
3991
|
+
industryTitle?: string;
|
|
3992
|
+
sicCode?: number;
|
|
3993
|
+
}): Promise<APIResponse<IndustryClassificationCode[]>>;
|
|
3994
|
+
}
|
|
3995
|
+
|
|
3996
|
+
declare class MutualFundEndpoints {
|
|
3997
|
+
private client;
|
|
3998
|
+
constructor(client: FMPClient);
|
|
3999
|
+
/**
|
|
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}
|
|
2178
4048
|
*/
|
|
2179
|
-
|
|
4049
|
+
getHolders(symbol: string): Promise<APIResponse<MutualFundHolding[]>>;
|
|
2180
4050
|
}
|
|
2181
4051
|
|
|
2182
4052
|
/**
|
|
@@ -2186,10 +4056,20 @@ declare class SECEndpoints {
|
|
|
2186
4056
|
* ```typescript
|
|
2187
4057
|
* import { FMP } from 'fmp-node-api';
|
|
2188
4058
|
*
|
|
4059
|
+
* // Option 1: Provide API key directly
|
|
2189
4060
|
* const fmp = new FMP({ apiKey: 'your-api-key' });
|
|
2190
4061
|
*
|
|
2191
|
-
* //
|
|
2192
|
-
* 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' });
|
|
2193
4073
|
*
|
|
2194
4074
|
* // Get financial statements
|
|
2195
4075
|
* const incomeStatement = await fmp.financial.getIncomeStatement({
|
|
@@ -2197,17 +4077,12 @@ declare class SECEndpoints {
|
|
|
2197
4077
|
* period: 'annual'
|
|
2198
4078
|
* });
|
|
2199
4079
|
*
|
|
2200
|
-
* // Get forex data
|
|
2201
|
-
* const forexQuote = await fmp.forex.getQuote({ symbol: 'EURUSD' });
|
|
2202
4080
|
* ```
|
|
2203
4081
|
*/
|
|
2204
4082
|
declare class FMP {
|
|
2205
4083
|
readonly stock: StockEndpoints;
|
|
2206
4084
|
readonly financial: FinancialEndpoints;
|
|
2207
|
-
readonly forex: ForexEndpoints;
|
|
2208
|
-
readonly crypto: CryptoEndpoints;
|
|
2209
4085
|
readonly etf: ETFEndpoints;
|
|
2210
|
-
readonly mutualFund: MutualFundEndpoints;
|
|
2211
4086
|
readonly economic: EconomicEndpoints;
|
|
2212
4087
|
readonly market: MarketEndpoints;
|
|
2213
4088
|
readonly list: ListEndpoints;
|
|
@@ -2218,71 +4093,14 @@ declare class FMP {
|
|
|
2218
4093
|
readonly institutional: InstitutionalEndpoints;
|
|
2219
4094
|
readonly insider: InsiderEndpoints;
|
|
2220
4095
|
readonly sec: SECEndpoints;
|
|
2221
|
-
|
|
4096
|
+
readonly mutualFund: MutualFundEndpoints;
|
|
4097
|
+
constructor(config?: FMPConfig);
|
|
2222
4098
|
/**
|
|
2223
4099
|
* Get the underlying client instance for advanced usage
|
|
2224
4100
|
*/
|
|
2225
4101
|
getClient(): FMPClient;
|
|
2226
4102
|
}
|
|
2227
4103
|
|
|
2228
|
-
/**
|
|
2229
|
-
* Validate API key
|
|
2230
|
-
*/
|
|
2231
|
-
declare function validateApiKey(apiKey: string): void;
|
|
2232
|
-
/**
|
|
2233
|
-
* Validate stock symbol
|
|
2234
|
-
*/
|
|
2235
|
-
declare function validateSymbol(symbol: string): void;
|
|
2236
|
-
/**
|
|
2237
|
-
* Validate date format (YYYY-MM-DD)
|
|
2238
|
-
*/
|
|
2239
|
-
declare function validateDate(date: string): void;
|
|
2240
|
-
/**
|
|
2241
|
-
* Validate period parameter
|
|
2242
|
-
*/
|
|
2243
|
-
declare function validatePeriod(period: string): void;
|
|
2244
|
-
/**
|
|
2245
|
-
* Validate limit parameter
|
|
2246
|
-
*/
|
|
2247
|
-
declare function validateLimit(limit: number): void;
|
|
2248
|
-
/**
|
|
2249
|
-
* Validate page parameter
|
|
2250
|
-
*/
|
|
2251
|
-
declare function validatePage(page: number): void;
|
|
2252
|
-
|
|
2253
|
-
/**
|
|
2254
|
-
* Format currency value
|
|
2255
|
-
*/
|
|
2256
|
-
declare function formatCurrency(value: number, currency?: string): string;
|
|
2257
|
-
/**
|
|
2258
|
-
* Format percentage value
|
|
2259
|
-
*/
|
|
2260
|
-
declare function formatPercentage(value: number, decimals?: number): string;
|
|
2261
|
-
/**
|
|
2262
|
-
* Format large numbers with K, M, B suffixes
|
|
2263
|
-
*/
|
|
2264
|
-
declare function formatLargeNumber(value: number): string;
|
|
2265
|
-
/**
|
|
2266
|
-
* Format date to YYYY-MM-DD
|
|
2267
|
-
*/
|
|
2268
|
-
declare function formatDate(date: Date | string): string;
|
|
2269
|
-
/**
|
|
2270
|
-
* Format date to readable format
|
|
2271
|
-
*/
|
|
2272
|
-
declare function formatReadableDate(date: Date | string): string;
|
|
2273
|
-
/**
|
|
2274
|
-
* Format timestamp to readable format
|
|
2275
|
-
*/
|
|
2276
|
-
declare function formatTimestamp(timestamp: number): string;
|
|
2277
|
-
/**
|
|
2278
|
-
* Format number with specified decimal places
|
|
2279
|
-
*/
|
|
2280
|
-
declare function formatNumber(value: number, decimals?: number): string;
|
|
2281
|
-
/**
|
|
2282
|
-
* Format volume with appropriate units
|
|
2283
|
-
*/
|
|
2284
|
-
declare function formatVolume(volume: number): string;
|
|
2285
|
-
|
|
2286
4104
|
declare const DEFAULT_TIMEOUT = 10000;
|
|
2287
4105
|
declare const DEFAULT_LIMIT = 100;
|
|
2288
4106
|
declare const MAX_LIMIT = 1000;
|
|
@@ -2349,4 +4167,373 @@ declare const HTTP_STATUS: {
|
|
|
2349
4167
|
readonly INTERNAL_SERVER_ERROR: 500;
|
|
2350
4168
|
};
|
|
2351
4169
|
|
|
2352
|
-
|
|
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 };
|