fmp-node-api 0.0.5 → 0.0.7
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 +2 -5
- package/dist/index.d.mts +220 -192
- package/dist/index.d.ts +220 -192
- package/dist/index.js +221 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +221 -94
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -408,7 +408,7 @@ pnpm test:watch # Watch mode for development
|
|
|
408
408
|
pnpm test:coverage # Generate coverage report
|
|
409
409
|
```
|
|
410
410
|
|
|
411
|
-
**Note**: Additional endpoint-specific test scripts (crypto, etf, mutual-fund
|
|
411
|
+
**Note**: Additional endpoint-specific test scripts (crypto, etf, mutual-fund) are available in the package-level scripts but not exposed at the root level.
|
|
412
412
|
|
|
413
413
|
## Development
|
|
414
414
|
|
|
@@ -492,7 +492,6 @@ src/
|
|
|
492
492
|
│ ├── crypto.ts # Crypto types
|
|
493
493
|
│ ├── etf.ts # ETF types
|
|
494
494
|
│ ├── mutual-fund.ts # Mutual fund types
|
|
495
|
-
│ ├── bond.ts # Bond types
|
|
496
495
|
│ ├── economic.ts # Economic types
|
|
497
496
|
│ ├── market.ts # Market types
|
|
498
497
|
│ ├── list.ts # List types
|
|
@@ -506,7 +505,6 @@ src/
|
|
|
506
505
|
│ ├── crypto.ts
|
|
507
506
|
│ ├── etf.ts
|
|
508
507
|
│ ├── mutual-fund.ts
|
|
509
|
-
│ ├── bond.ts
|
|
510
508
|
│ ├── economic.ts
|
|
511
509
|
│ ├── market.ts
|
|
512
510
|
│ ├── list.ts
|
|
@@ -530,7 +528,6 @@ src/
|
|
|
530
528
|
│ │ ├── crypto.test.ts
|
|
531
529
|
│ │ ├── etf.test.ts
|
|
532
530
|
│ │ ├── mutual-fund.test.ts
|
|
533
|
-
│ │ ├── bond.test.ts
|
|
534
531
|
│ │ ├── list.test.ts
|
|
535
532
|
│ │ ├── calendar.test.ts
|
|
536
533
|
│ │ └── company.test.ts
|
|
@@ -577,7 +574,7 @@ pnpm test
|
|
|
577
574
|
|
|
578
575
|
- **📖 [Contributing Guide](https://github.com/e-roy/fmp-node-wrapper/blob/main/CONTRIBUTING.md)**: Detailed guidelines and development setup
|
|
579
576
|
- **🐛 [Issues](https://github.com/e-roy/fmp-node-wrapper/issues)**: Report bugs or request features
|
|
580
|
-
- **📚 [Documentation](https://fmp-node-wrapper.vercel.app)**: Check the docs first
|
|
577
|
+
- **📚 [Documentation](https://fmp-node-wrapper-docs.vercel.app)**: Check the docs first
|
|
581
578
|
|
|
582
579
|
### Before Contributing
|
|
583
580
|
|
package/dist/index.d.mts
CHANGED
|
@@ -161,6 +161,29 @@ interface MarketCap {
|
|
|
161
161
|
date: string;
|
|
162
162
|
marketCap: number;
|
|
163
163
|
}
|
|
164
|
+
interface StockRealTimePrice {
|
|
165
|
+
symbol: string;
|
|
166
|
+
price: number;
|
|
167
|
+
}
|
|
168
|
+
interface StockRealTimePriceFull {
|
|
169
|
+
bidSize: number;
|
|
170
|
+
askPrice: number;
|
|
171
|
+
volume: number;
|
|
172
|
+
askSize: number;
|
|
173
|
+
bidPrice: number;
|
|
174
|
+
lastSalePrice: number;
|
|
175
|
+
lastSaleSize: number;
|
|
176
|
+
lastSaleTime: number;
|
|
177
|
+
fmpLast: number;
|
|
178
|
+
lastUpdated: number;
|
|
179
|
+
symbol: string;
|
|
180
|
+
}
|
|
181
|
+
interface StockListResponse<T> {
|
|
182
|
+
stockList: T[];
|
|
183
|
+
}
|
|
184
|
+
interface CompaniesPriceListResponse<T> {
|
|
185
|
+
companiesPriceList: T[];
|
|
186
|
+
}
|
|
164
187
|
|
|
165
188
|
interface FinancialStatementsParams extends SymbolParams, PeriodParams {
|
|
166
189
|
limit?: number;
|
|
@@ -577,13 +600,9 @@ interface EarningsSurprises {
|
|
|
577
600
|
estimatedEarning: number;
|
|
578
601
|
}
|
|
579
602
|
|
|
580
|
-
interface ForexQuoteParams extends SymbolParams {
|
|
581
|
-
}
|
|
582
603
|
interface ForexHistoricalParams extends SymbolParams, DateRangeParams {
|
|
583
604
|
timeseries?: number;
|
|
584
605
|
}
|
|
585
|
-
interface ForexListParams {
|
|
586
|
-
}
|
|
587
606
|
interface ForexQuote {
|
|
588
607
|
symbol: string;
|
|
589
608
|
price: number;
|
|
@@ -714,14 +733,6 @@ interface ETFStockExposure {
|
|
|
714
733
|
marketValue: number;
|
|
715
734
|
}
|
|
716
735
|
|
|
717
|
-
interface MutualFundQuoteParams extends SymbolParams {
|
|
718
|
-
}
|
|
719
|
-
interface MutualFundProfileParams extends SymbolParams {
|
|
720
|
-
}
|
|
721
|
-
interface MutualFundHoldersParams extends SymbolParams, PaginationParams {
|
|
722
|
-
}
|
|
723
|
-
interface MutualFundListParams {
|
|
724
|
-
}
|
|
725
736
|
interface MutualFundQuote {
|
|
726
737
|
symbol: string;
|
|
727
738
|
price: number;
|
|
@@ -745,99 +756,17 @@ interface MutualFundQuote {
|
|
|
745
756
|
sharesOutstanding: number;
|
|
746
757
|
timestamp: number;
|
|
747
758
|
}
|
|
748
|
-
interface MutualFundProfile {
|
|
749
|
-
symbol: string;
|
|
750
|
-
price: number;
|
|
751
|
-
beta: number;
|
|
752
|
-
volAvg: number;
|
|
753
|
-
marketCap: number;
|
|
754
|
-
lastDiv: number;
|
|
755
|
-
range: string;
|
|
756
|
-
changes: number;
|
|
757
|
-
companyName: string;
|
|
758
|
-
currency: string;
|
|
759
|
-
cik: string;
|
|
760
|
-
isin: string;
|
|
761
|
-
cusip: string;
|
|
762
|
-
exchange: string;
|
|
763
|
-
exchangeShortName: string;
|
|
764
|
-
industry: string;
|
|
765
|
-
website: string;
|
|
766
|
-
description: string;
|
|
767
|
-
ceo: string;
|
|
768
|
-
sector: string;
|
|
769
|
-
country: string;
|
|
770
|
-
fullTimeEmployees: string;
|
|
771
|
-
phone: string;
|
|
772
|
-
address: string;
|
|
773
|
-
city: string;
|
|
774
|
-
state: string;
|
|
775
|
-
zip: string;
|
|
776
|
-
dcfDiff: number;
|
|
777
|
-
dcf: number;
|
|
778
|
-
image: string;
|
|
779
|
-
ipoDate: string;
|
|
780
|
-
defaultImage: boolean;
|
|
781
|
-
isEtf: boolean;
|
|
782
|
-
isActivelyTrading: boolean;
|
|
783
|
-
isAdr: boolean;
|
|
784
|
-
isFund: boolean;
|
|
785
|
-
}
|
|
786
759
|
interface MutualFundHolding {
|
|
787
|
-
|
|
788
|
-
weightPercent: number;
|
|
760
|
+
holder: string;
|
|
789
761
|
shares: number;
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
interface BondQuoteParams extends SymbolParams {
|
|
794
|
-
}
|
|
795
|
-
interface BondHistoricalParams extends SymbolParams, DateRangeParams {
|
|
796
|
-
timeseries?: number;
|
|
797
|
-
}
|
|
798
|
-
interface BondListParams {
|
|
799
|
-
}
|
|
800
|
-
interface BondQuote {
|
|
801
|
-
symbol: string;
|
|
802
|
-
price: number;
|
|
803
|
-
changesPercentage: number;
|
|
762
|
+
dateReported: string;
|
|
804
763
|
change: number;
|
|
805
|
-
|
|
806
|
-
dayHigh: number;
|
|
807
|
-
yearLow: number;
|
|
808
|
-
yearHigh: number;
|
|
809
|
-
marketCap: number;
|
|
810
|
-
priceAvg50: number;
|
|
811
|
-
priceAvg200: number;
|
|
812
|
-
volume: number;
|
|
813
|
-
avgVolume: number;
|
|
814
|
-
exchange: string;
|
|
815
|
-
open: number;
|
|
816
|
-
previousClose: number;
|
|
817
|
-
eps: number;
|
|
818
|
-
pe: number;
|
|
819
|
-
earningsAnnouncement: string;
|
|
820
|
-
sharesOutstanding: number;
|
|
821
|
-
timestamp: number;
|
|
764
|
+
weightPercent: number;
|
|
822
765
|
}
|
|
823
766
|
|
|
824
|
-
interface EconomicIndicatorParams extends DateRangeParams {
|
|
825
|
-
}
|
|
826
|
-
interface TreasuryRateParams extends EconomicIndicatorParams {
|
|
827
|
-
}
|
|
828
|
-
interface FederalFundsRateParams extends EconomicIndicatorParams {
|
|
829
|
-
}
|
|
830
|
-
interface CPIParams extends EconomicIndicatorParams {
|
|
831
|
-
}
|
|
832
|
-
interface GDPParams extends EconomicIndicatorParams {
|
|
833
|
-
}
|
|
834
|
-
interface UnemploymentParams extends EconomicIndicatorParams {
|
|
835
|
-
}
|
|
836
767
|
interface EconomicIndicator {
|
|
837
768
|
date: string;
|
|
838
769
|
value: number;
|
|
839
|
-
change: number;
|
|
840
|
-
changePercent: number;
|
|
841
770
|
}
|
|
842
771
|
interface TreasuryRate {
|
|
843
772
|
date: string;
|
|
@@ -854,27 +783,11 @@ interface TreasuryRate {
|
|
|
854
783
|
year20: number;
|
|
855
784
|
year30: number;
|
|
856
785
|
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
date: string;
|
|
863
|
-
value: number;
|
|
864
|
-
change: number;
|
|
865
|
-
changePercent: number;
|
|
866
|
-
}
|
|
867
|
-
interface GDP {
|
|
868
|
-
date: string;
|
|
869
|
-
value: number;
|
|
870
|
-
change: number;
|
|
871
|
-
changePercent: number;
|
|
872
|
-
}
|
|
873
|
-
interface Unemployment {
|
|
874
|
-
date: string;
|
|
875
|
-
value: number;
|
|
876
|
-
change: number;
|
|
877
|
-
changePercent: number;
|
|
786
|
+
type EconomicIndicatorName = 'GDP' | 'realGDP' | 'nominalPotentialGDP' | 'realGDPPerCapita' | 'federalFunds' | 'CPI' | 'inflationRate' | 'inflation' | 'retailSales' | 'consumerSentiment' | 'durableGoods' | 'unemploymentRate' | 'totalNonfarmPayroll' | 'initialClaims' | 'industrialProductionTotalIndex' | 'newPrivatelyOwnedHousingUnitsStartedTotalUnits' | 'totalVehicleSales' | 'retailMoneyFunds' | 'smoothedUSRecessionProbabilities' | '3MonthOr90DayRatesAndYieldsCertificatesOfDeposit' | 'commercialBankInterestRateOnCreditCardPlansAllAccounts' | '30YearFixedRateMortgageAverage' | '15YearFixedRateMortgageAverage';
|
|
787
|
+
interface EconomicIndicatorParams {
|
|
788
|
+
name: EconomicIndicatorName;
|
|
789
|
+
from?: string;
|
|
790
|
+
to?: string;
|
|
878
791
|
}
|
|
879
792
|
|
|
880
793
|
interface MarketHours {
|
|
@@ -948,6 +861,16 @@ interface EarningsCalendar {
|
|
|
948
861
|
fiscalDateEnding: string;
|
|
949
862
|
updatedFromDate: string;
|
|
950
863
|
}
|
|
864
|
+
interface EarningsConfirmed {
|
|
865
|
+
symbol: string;
|
|
866
|
+
exchange: string;
|
|
867
|
+
time: string;
|
|
868
|
+
when: string;
|
|
869
|
+
date: string;
|
|
870
|
+
publicationDate: string;
|
|
871
|
+
title: string;
|
|
872
|
+
url: string;
|
|
873
|
+
}
|
|
951
874
|
interface DividendsCalendar {
|
|
952
875
|
date: string;
|
|
953
876
|
label: string;
|
|
@@ -1121,6 +1044,63 @@ interface EarningsCallTranscript {
|
|
|
1121
1044
|
date: string;
|
|
1122
1045
|
content: string;
|
|
1123
1046
|
}
|
|
1047
|
+
type CompanyTranscriptData = [number, number, string];
|
|
1048
|
+
|
|
1049
|
+
interface SenateHouseTradingParams {
|
|
1050
|
+
symbol: string;
|
|
1051
|
+
}
|
|
1052
|
+
interface SenateHouseTradingRSSFeedParams {
|
|
1053
|
+
page: number;
|
|
1054
|
+
}
|
|
1055
|
+
interface SenateHouseTradingByNameParams {
|
|
1056
|
+
name: string;
|
|
1057
|
+
}
|
|
1058
|
+
interface SenateTradingResponse {
|
|
1059
|
+
firstName: string;
|
|
1060
|
+
lastName: string;
|
|
1061
|
+
office: string;
|
|
1062
|
+
link: string;
|
|
1063
|
+
dateRecieved: string;
|
|
1064
|
+
transactionDate: string;
|
|
1065
|
+
owner: string;
|
|
1066
|
+
assetDescription: string;
|
|
1067
|
+
assetType: string;
|
|
1068
|
+
type: string;
|
|
1069
|
+
amount: string;
|
|
1070
|
+
comment: string;
|
|
1071
|
+
symbol: string;
|
|
1072
|
+
}
|
|
1073
|
+
interface HouseTradingResponse {
|
|
1074
|
+
disclosureYear: string;
|
|
1075
|
+
disclosureDate: string;
|
|
1076
|
+
transactionDate: string;
|
|
1077
|
+
owner: string;
|
|
1078
|
+
ticker: string;
|
|
1079
|
+
assetDescription: string;
|
|
1080
|
+
type: string;
|
|
1081
|
+
amount: string;
|
|
1082
|
+
representative: string;
|
|
1083
|
+
district: string;
|
|
1084
|
+
link: string;
|
|
1085
|
+
capitalGainsOver200USD: string;
|
|
1086
|
+
}
|
|
1087
|
+
interface SenateHouseTradingByNameResponse {
|
|
1088
|
+
symbol: string;
|
|
1089
|
+
disclosureDate: string;
|
|
1090
|
+
transactionDate: string;
|
|
1091
|
+
firstName: string;
|
|
1092
|
+
lastName: string;
|
|
1093
|
+
office: string;
|
|
1094
|
+
district: string;
|
|
1095
|
+
owner: string;
|
|
1096
|
+
assetDescription: string;
|
|
1097
|
+
assetType: string;
|
|
1098
|
+
type: string;
|
|
1099
|
+
amount: string;
|
|
1100
|
+
capitalGainsOver200USD: string;
|
|
1101
|
+
comment: string;
|
|
1102
|
+
link: string;
|
|
1103
|
+
}
|
|
1124
1104
|
|
|
1125
1105
|
declare class FMPClient {
|
|
1126
1106
|
private v3Client;
|
|
@@ -1129,7 +1109,18 @@ declare class FMPClient {
|
|
|
1129
1109
|
private apiKey;
|
|
1130
1110
|
constructor(config: FMPConfig);
|
|
1131
1111
|
private createClient;
|
|
1112
|
+
/**
|
|
1113
|
+
* Standard get method - returns raw API response
|
|
1114
|
+
*
|
|
1115
|
+
* For endpoints that return arrays, this will always return an array (possibly empty) for `data` when success is true.
|
|
1116
|
+
* For endpoints that return objects, data is returned as-is.
|
|
1117
|
+
*/
|
|
1132
1118
|
get<T>(endpoint: string, version?: 'v3' | 'v4' | 'stable', params?: Record<string, any>): Promise<APIResponse<T>>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Get method for single-object endpoints - unwraps single-item arrays
|
|
1121
|
+
*
|
|
1122
|
+
* For endpoints that return single objects, this will always return an object (possibly empty) for `data` when success is true.
|
|
1123
|
+
*/
|
|
1133
1124
|
getSingle<T>(endpoint: string, version?: 'v3' | 'v4' | 'stable', params?: Record<string, any>): Promise<APIResponse<T>>;
|
|
1134
1125
|
private getClientForVersion;
|
|
1135
1126
|
}
|
|
@@ -1145,7 +1136,7 @@ declare class StockEndpoints {
|
|
|
1145
1136
|
*/
|
|
1146
1137
|
getQuote({ symbol }: {
|
|
1147
1138
|
symbol: string;
|
|
1148
|
-
}): Promise<APIResponse<StockQuote
|
|
1139
|
+
}): Promise<APIResponse<StockQuote>>;
|
|
1149
1140
|
/**
|
|
1150
1141
|
* Get historical stock prices
|
|
1151
1142
|
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
@@ -1167,7 +1158,7 @@ declare class StockEndpoints {
|
|
|
1167
1158
|
*/
|
|
1168
1159
|
getMarketCap({ symbol }: {
|
|
1169
1160
|
symbol: string;
|
|
1170
|
-
}): Promise<APIResponse<MarketCap
|
|
1161
|
+
}): Promise<APIResponse<MarketCap>>;
|
|
1171
1162
|
/**
|
|
1172
1163
|
* Get stock splits
|
|
1173
1164
|
* https://site.financialmodelingprep.com/developer/docs#splits-historical-splits
|
|
@@ -1186,6 +1177,23 @@ declare class StockEndpoints {
|
|
|
1186
1177
|
getDividendHistory({ symbol, }: {
|
|
1187
1178
|
symbol: string;
|
|
1188
1179
|
}): Promise<APIResponse<StockDividendResponse>>;
|
|
1180
|
+
/**
|
|
1181
|
+
* Get stock real time price
|
|
1182
|
+
* @param symbol - The stock symbol to get the real time price for
|
|
1183
|
+
* @returns The real time price for the stock
|
|
1184
|
+
*/
|
|
1185
|
+
getRealTimePrice({ symbols, }: {
|
|
1186
|
+
symbols: string[];
|
|
1187
|
+
}): Promise<APIResponse<StockRealTimePrice[]>>;
|
|
1188
|
+
/**
|
|
1189
|
+
* Get stock real time price full
|
|
1190
|
+
* https://site.financialmodelingprep.com/developer/docs#real-time-full-price-quote
|
|
1191
|
+
* @param symbols - The stock symbols to get the real time price for
|
|
1192
|
+
* @returns The real time price for the stocks
|
|
1193
|
+
*/
|
|
1194
|
+
getRealTimePriceForMultipleStocks({ symbols, }: {
|
|
1195
|
+
symbols: string[];
|
|
1196
|
+
}): Promise<APIResponse<StockRealTimePriceFull[]>>;
|
|
1189
1197
|
}
|
|
1190
1198
|
|
|
1191
1199
|
declare class FinancialEndpoints {
|
|
@@ -1308,7 +1316,7 @@ declare class ForexEndpoints {
|
|
|
1308
1316
|
* @param params - Parameters for the forex quote request
|
|
1309
1317
|
* @returns Forex quote data
|
|
1310
1318
|
*/
|
|
1311
|
-
getQuote(params:
|
|
1319
|
+
getQuote(params: SymbolParams): Promise<APIResponse<ForexQuote[]>>;
|
|
1312
1320
|
/**
|
|
1313
1321
|
* Get historical forex prices
|
|
1314
1322
|
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
@@ -1322,17 +1330,6 @@ declare class ForexEndpoints {
|
|
|
1322
1330
|
from?: string;
|
|
1323
1331
|
to?: string;
|
|
1324
1332
|
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1325
|
-
/**
|
|
1326
|
-
* Get forex rates for a specific base currency
|
|
1327
|
-
* @param baseCurrency - The base currency to get forex rates for
|
|
1328
|
-
* @returns Forex rates data
|
|
1329
|
-
*/
|
|
1330
|
-
getForexRates(baseCurrency?: string): Promise<APIResponse<Record<string, number>>>;
|
|
1331
|
-
/**
|
|
1332
|
-
* Get all forex rates
|
|
1333
|
-
* @returns All forex rates data
|
|
1334
|
-
*/
|
|
1335
|
-
getAllForexRates(): Promise<APIResponse<Record<string, Record<string, number>>>>;
|
|
1336
1333
|
}
|
|
1337
1334
|
|
|
1338
1335
|
declare class CryptoEndpoints {
|
|
@@ -1396,7 +1393,7 @@ declare class ETFEndpoints {
|
|
|
1396
1393
|
* @param symbol - The symbol of the ETF to get the profile for
|
|
1397
1394
|
* @returns The FMP ETF Information endpoint provides basic information about an ETF, such as its ticker symbol, name, expense ratio, and asset under management. For example, an investor may want to compare the expense ratios of different ETFs to find the one that is most cost-effective.
|
|
1398
1395
|
*/
|
|
1399
|
-
getProfile({ symbol }: SymbolParams): Promise<APIResponse<ETFProfile
|
|
1396
|
+
getProfile({ symbol }: SymbolParams): Promise<APIResponse<ETFProfile>>;
|
|
1400
1397
|
/**
|
|
1401
1398
|
* Get ETF sector weighting
|
|
1402
1399
|
* https://site.financialmodelingprep.com/developer/docs#etf-sector-weighting-etf-holdings
|
|
@@ -1429,40 +1426,14 @@ declare class MutualFundEndpoints {
|
|
|
1429
1426
|
* @param params - Parameters for the mutual fund quote request
|
|
1430
1427
|
* @returns Mutual fund quote data
|
|
1431
1428
|
*/
|
|
1432
|
-
getQuote(params:
|
|
1433
|
-
/**
|
|
1434
|
-
* Get mutual fund profile
|
|
1435
|
-
*/
|
|
1436
|
-
getProfile(params: MutualFundProfileParams): Promise<APIResponse<MutualFundProfile[]>>;
|
|
1429
|
+
getQuote(params: SymbolParams): Promise<APIResponse<MutualFundQuote[]>>;
|
|
1437
1430
|
/**
|
|
1438
|
-
* Get mutual fund
|
|
1431
|
+
* Get mutual fund holders
|
|
1432
|
+
* https://site.financialmodelingprep.com/developer/docs#mutual-fund-holder-mutual-funds-holdings
|
|
1433
|
+
* @param symbol - The symbol of the mutual fund to get the holders for
|
|
1434
|
+
* @returns Mutual fund holders data
|
|
1439
1435
|
*/
|
|
1440
|
-
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
declare class BondEndpoints {
|
|
1444
|
-
private client;
|
|
1445
|
-
constructor(client: FMPClient);
|
|
1446
|
-
/**
|
|
1447
|
-
* Get bond quote
|
|
1448
|
-
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in a future release.
|
|
1449
|
-
* @param params - Parameters for the bond quote request
|
|
1450
|
-
* @returns Bond quote data
|
|
1451
|
-
*/
|
|
1452
|
-
getQuote(params: BondQuoteParams): Promise<APIResponse<BondQuote[]>>;
|
|
1453
|
-
/**
|
|
1454
|
-
* Get historical bond prices
|
|
1455
|
-
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in a future release.
|
|
1456
|
-
* @param symbol - The bond symbol to get the historical prices for
|
|
1457
|
-
* @param from - The start date to get the historical prices for
|
|
1458
|
-
* @param to - The end date to get the historical prices for
|
|
1459
|
-
* @returns Historical bond price data
|
|
1460
|
-
*/
|
|
1461
|
-
getHistoricalPrice({ symbol, from, to, }: {
|
|
1462
|
-
symbol: string;
|
|
1463
|
-
from?: string;
|
|
1464
|
-
to?: string;
|
|
1465
|
-
}): Promise<APIResponse<HistoricalPriceResponse>>;
|
|
1436
|
+
getHolders({ symbol }: SymbolParams): Promise<APIResponse<MutualFundHolding[]>>;
|
|
1466
1437
|
}
|
|
1467
1438
|
|
|
1468
1439
|
declare class EconomicEndpoints {
|
|
@@ -1470,24 +1441,21 @@ declare class EconomicEndpoints {
|
|
|
1470
1441
|
constructor(client: FMPClient);
|
|
1471
1442
|
/**
|
|
1472
1443
|
* Get treasury rates
|
|
1444
|
+
* https://site.financialmodelingprep.com/developer/docs#treasury-rates-economics-data
|
|
1445
|
+
* @param from - The start date to get the treasury rates for
|
|
1446
|
+
* @param to - The end date to get the treasury rates for
|
|
1447
|
+
* @returns Treasury rates data
|
|
1473
1448
|
*/
|
|
1474
|
-
getTreasuryRates(params
|
|
1449
|
+
getTreasuryRates(params: DateRangeParams): Promise<APIResponse<TreasuryRate[]>>;
|
|
1475
1450
|
/**
|
|
1476
|
-
* Get
|
|
1451
|
+
* Get economic indicators
|
|
1452
|
+
* https://site.financialmodelingprep.com/developer/docs#economic-indicators-economics-data
|
|
1453
|
+
* @param name - GDP, realGDP, nominalPotentialGDP, realGDPPerCapita, federalFunds, CPI, inflationRate, inflation, retailSales, consumerSentiment, durableGoods, unemploymentRate, totalNonfarmPayroll, initialClaims, industrialProductionTotalIndex, newPrivatelyOwnedHousingUnitsStartedTotalUnits, totalVehicleSales, retailMoneyFunds, smoothedUSRecessionProbabilities, 3MonthOr90DayRatesAndYieldsCertificatesOfDeposit, commercialBankInterestRateOnCreditCardPlansAllAccounts, 30YearFixedRateMortgageAverage, 15YearFixedRateMortgageAverage
|
|
1454
|
+
* @param from - The start date to get the economic indicators for
|
|
1455
|
+
* @param to - The end date to get the economic indicators for
|
|
1456
|
+
* @returns Provides real-time and historical economic data for a variety of economic indicators, such as GDP, unemployment, and inflation.
|
|
1477
1457
|
*/
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* Get CPI data
|
|
1481
|
-
*/
|
|
1482
|
-
getCPI(params?: CPIParams): Promise<APIResponse<CPI[]>>;
|
|
1483
|
-
/**
|
|
1484
|
-
* Get GDP data
|
|
1485
|
-
*/
|
|
1486
|
-
getGDP(params?: GDPParams): Promise<APIResponse<GDP[]>>;
|
|
1487
|
-
/**
|
|
1488
|
-
* Get unemployment data
|
|
1489
|
-
*/
|
|
1490
|
-
getUnemployment(params?: UnemploymentParams): Promise<APIResponse<Unemployment[]>>;
|
|
1458
|
+
getEconomicIndicators(params: EconomicIndicatorParams): Promise<APIResponse<EconomicIndicator[]>>;
|
|
1491
1459
|
}
|
|
1492
1460
|
|
|
1493
1461
|
declare class MarketEndpoints {
|
|
@@ -1577,6 +1545,14 @@ declare class CalendarEndpoints {
|
|
|
1577
1545
|
* @returns The earnings calendar
|
|
1578
1546
|
*/
|
|
1579
1547
|
getEarningsCalendar({ from, to }?: DateRangeParams): Promise<APIResponse<EarningsCalendar[]>>;
|
|
1548
|
+
/**
|
|
1549
|
+
* Get earnings confirmed
|
|
1550
|
+
* https://site.financialmodelingprep.com/developer/docs#earnings-confirmed-earnings
|
|
1551
|
+
* @param from - The start date to get the earnings confirmed for
|
|
1552
|
+
* @param to - The end date to get the earnings confirmed for
|
|
1553
|
+
* @returns The earnings confirmed
|
|
1554
|
+
*/
|
|
1555
|
+
getEarningsConfirmed({ from, to }?: DateRangeParams): Promise<APIResponse<EarningsConfirmed[]>>;
|
|
1580
1556
|
/**
|
|
1581
1557
|
* Get dividends calendar
|
|
1582
1558
|
* https://site.financialmodelingprep.com/developer/docs#dividends-calendar-dividends
|
|
@@ -1620,9 +1596,9 @@ declare class CompanyEndpoints {
|
|
|
1620
1596
|
* @param symbol - The stock symbol to get the profile for
|
|
1621
1597
|
* @returns Get a comprehensive overview of a company with our Company Profile endpoint. This endpoint provides key information such as price, beta, market capitalization, description, headquarters, and more.
|
|
1622
1598
|
*/
|
|
1623
|
-
getCompanyProfile({ symbol
|
|
1599
|
+
getCompanyProfile({ symbol }: {
|
|
1624
1600
|
symbol: string;
|
|
1625
|
-
}): Promise<APIResponse<CompanyProfile
|
|
1601
|
+
}): Promise<APIResponse<CompanyProfile>>;
|
|
1626
1602
|
/**
|
|
1627
1603
|
* Get executive compensation
|
|
1628
1604
|
* https://site.financialmodelingprep.com/developer/docs#executive-compensation-company-information
|
|
@@ -1631,16 +1607,16 @@ declare class CompanyEndpoints {
|
|
|
1631
1607
|
*/
|
|
1632
1608
|
getExecutiveCompensation({ symbol, }: {
|
|
1633
1609
|
symbol: string;
|
|
1634
|
-
}): Promise<APIResponse<ExecutiveCompensation[]
|
|
1610
|
+
}): Promise<APIResponse<ExecutiveCompensation[]>>;
|
|
1635
1611
|
/**
|
|
1636
1612
|
* Get company notes
|
|
1637
1613
|
* https://site.financialmodelingprep.com/developer/docs#company-notes-company-information
|
|
1638
1614
|
* @param symbol - The stock symbol to get the notes for
|
|
1639
1615
|
* @returns Stay up-to-date on a company's financial condition, operations, and risks with our Company Notes endpoint. This endpoint provides information about notes reported by a company in their financial statements.
|
|
1640
1616
|
*/
|
|
1641
|
-
getCompanyNotes({ symbol
|
|
1617
|
+
getCompanyNotes({ symbol }: {
|
|
1642
1618
|
symbol: string;
|
|
1643
|
-
}): Promise<APIResponse<CompanyNotes[]
|
|
1619
|
+
}): Promise<APIResponse<CompanyNotes[]>>;
|
|
1644
1620
|
/**
|
|
1645
1621
|
* Get historical employee count
|
|
1646
1622
|
* https://site.financialmodelingprep.com/developer/docs#historical-employee-company-information
|
|
@@ -1649,7 +1625,7 @@ declare class CompanyEndpoints {
|
|
|
1649
1625
|
*/
|
|
1650
1626
|
getHistoricalEmployeeCount({ symbol, }: {
|
|
1651
1627
|
symbol: string;
|
|
1652
|
-
}): Promise<APIResponse<HistoricalEmployeeCount[]
|
|
1628
|
+
}): Promise<APIResponse<HistoricalEmployeeCount[]>>;
|
|
1653
1629
|
/**
|
|
1654
1630
|
* Get shares float
|
|
1655
1631
|
* https://site.financialmodelingprep.com/developer/docs#company-share-float-share-float
|
|
@@ -1658,7 +1634,7 @@ declare class CompanyEndpoints {
|
|
|
1658
1634
|
*/
|
|
1659
1635
|
getSharesFloat({ symbol }: {
|
|
1660
1636
|
symbol: string;
|
|
1661
|
-
}): Promise<APIResponse<SharesFloat
|
|
1637
|
+
}): Promise<APIResponse<SharesFloat>>;
|
|
1662
1638
|
/**
|
|
1663
1639
|
* Get historical shares float
|
|
1664
1640
|
* https://site.financialmodelingprep.com/developer/docs#company-historical-share-float
|
|
@@ -1667,7 +1643,7 @@ declare class CompanyEndpoints {
|
|
|
1667
1643
|
*/
|
|
1668
1644
|
getHistoricalSharesFloat({ symbol, }: {
|
|
1669
1645
|
symbol: string;
|
|
1670
|
-
}): Promise<APIResponse<HistoricalSharesFloat[]
|
|
1646
|
+
}): Promise<APIResponse<HistoricalSharesFloat[]>>;
|
|
1671
1647
|
/**
|
|
1672
1648
|
* Get earnings call transcript
|
|
1673
1649
|
* https://site.financialmodelingprep.com/developer/docs#earnings-transcript-earnings-transcripts
|
|
@@ -1680,7 +1656,16 @@ declare class CompanyEndpoints {
|
|
|
1680
1656
|
symbol: string;
|
|
1681
1657
|
year: number;
|
|
1682
1658
|
quarter: number;
|
|
1683
|
-
}): Promise<APIResponse<EarningsCallTranscript[]
|
|
1659
|
+
}): Promise<APIResponse<EarningsCallTranscript[]>>;
|
|
1660
|
+
/**
|
|
1661
|
+
* Get company transcript dates
|
|
1662
|
+
* https://site.financialmodelingprep.com/developer/docs#transcript-dates-earnings-transcripts
|
|
1663
|
+
* @param symbol - The stock symbol to get the transcript data for
|
|
1664
|
+
* @returns The FMP Company Transcript Data endpoint provides the transcript data for a company's earnings call.
|
|
1665
|
+
*/
|
|
1666
|
+
getCompanyTranscriptData({ symbol, }: {
|
|
1667
|
+
symbol: string;
|
|
1668
|
+
}): Promise<APIResponse<CompanyTranscriptData[]>>;
|
|
1684
1669
|
}
|
|
1685
1670
|
|
|
1686
1671
|
declare class QuoteEndpoints {
|
|
@@ -1691,7 +1676,7 @@ declare class QuoteEndpoints {
|
|
|
1691
1676
|
* @param params - Parameters for the quote request
|
|
1692
1677
|
* @returns Quote data for the specified asset
|
|
1693
1678
|
*/
|
|
1694
|
-
getQuote(params: QuoteParams): Promise<APIResponse<Quote
|
|
1679
|
+
getQuote(params: QuoteParams): Promise<APIResponse<Quote>>;
|
|
1695
1680
|
/**
|
|
1696
1681
|
* Get historical prices for any asset type
|
|
1697
1682
|
* @param params - Parameters for the historical price request
|
|
@@ -1712,6 +1697,49 @@ declare class QuoteEndpoints {
|
|
|
1712
1697
|
getIntraday(params: IntradayParams): Promise<APIResponse<HistoricalPriceData[]>>;
|
|
1713
1698
|
}
|
|
1714
1699
|
|
|
1700
|
+
declare class SenateHouseEndpoints {
|
|
1701
|
+
private client;
|
|
1702
|
+
constructor(client: FMPClient);
|
|
1703
|
+
/**
|
|
1704
|
+
* Get senate trading data only
|
|
1705
|
+
* https://site.financialmodelingprep.com/developer/docs#senate-trading
|
|
1706
|
+
* @param symbol - The stock symbol to get the senate trading data for
|
|
1707
|
+
* @returns Senate trading data only
|
|
1708
|
+
*/
|
|
1709
|
+
getSenateTrading(params: SenateHouseTradingParams): Promise<APIResponse<SenateTradingResponse[]>>;
|
|
1710
|
+
/** Get senate trading RSS feed
|
|
1711
|
+
* https://site.financialmodelingprep.com/developer/docs#senate-trading-rss-feed-senate
|
|
1712
|
+
* @param page - The page number to get
|
|
1713
|
+
* @returns Senate trading RSS feed
|
|
1714
|
+
*/
|
|
1715
|
+
getSenateTradingRSSFeed(params: SenateHouseTradingRSSFeedParams): Promise<APIResponse<SenateTradingResponse[]>>;
|
|
1716
|
+
/** Get Senate trades by name
|
|
1717
|
+
* https://site.financialmodelingprep.com/developer/docs/stable#senate-trading-by-name
|
|
1718
|
+
* @param name - The name of the senator to get the trades for
|
|
1719
|
+
* @returns Senate trades by name
|
|
1720
|
+
*/
|
|
1721
|
+
getSenateTradingByName(params: SenateHouseTradingByNameParams): Promise<APIResponse<SenateHouseTradingByNameResponse[]>>;
|
|
1722
|
+
/**
|
|
1723
|
+
* Get house trading data only
|
|
1724
|
+
* https://site.financialmodelingprep.com/developer/docs#house-disclosure
|
|
1725
|
+
* @param symbol - The stock symbol to get the house trading data for
|
|
1726
|
+
* @returns House trading data only
|
|
1727
|
+
*/
|
|
1728
|
+
getHouseTrading(params: SenateHouseTradingParams): Promise<APIResponse<HouseTradingResponse[]>>;
|
|
1729
|
+
/** Get house trading RSS feed
|
|
1730
|
+
* https://site.financialmodelingprep.com/developer/docs#house-disclosure-rss-feed-senate
|
|
1731
|
+
* @param page - The page number to get
|
|
1732
|
+
* @returns House trading RSS feed
|
|
1733
|
+
*/
|
|
1734
|
+
getHouseTradingRSSFeed(params: SenateHouseTradingRSSFeedParams): Promise<APIResponse<HouseTradingResponse[]>>;
|
|
1735
|
+
/** Get house trading by name
|
|
1736
|
+
* https://site.financialmodelingprep.com/developer/docs/stable#house-trading-by-name
|
|
1737
|
+
* @param name - The name of the representative to get the trades for
|
|
1738
|
+
* @returns House trading by name
|
|
1739
|
+
*/
|
|
1740
|
+
getHouseTradingByName(params: SenateHouseTradingByNameParams): Promise<APIResponse<SenateHouseTradingByNameResponse[]>>;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1715
1743
|
/**
|
|
1716
1744
|
* Main FMP API client that provides access to all endpoints
|
|
1717
1745
|
*
|
|
@@ -1741,13 +1769,13 @@ declare class FMP {
|
|
|
1741
1769
|
readonly crypto: CryptoEndpoints;
|
|
1742
1770
|
readonly etf: ETFEndpoints;
|
|
1743
1771
|
readonly mutualFund: MutualFundEndpoints;
|
|
1744
|
-
readonly bond: BondEndpoints;
|
|
1745
1772
|
readonly economic: EconomicEndpoints;
|
|
1746
1773
|
readonly market: MarketEndpoints;
|
|
1747
1774
|
readonly list: ListEndpoints;
|
|
1748
1775
|
readonly calendar: CalendarEndpoints;
|
|
1749
1776
|
readonly company: CompanyEndpoints;
|
|
1750
1777
|
readonly quote: QuoteEndpoints;
|
|
1778
|
+
readonly senateHouse: SenateHouseEndpoints;
|
|
1751
1779
|
constructor(config: FMPConfig);
|
|
1752
1780
|
/**
|
|
1753
1781
|
* Get the underlying client instance for advanced usage
|
|
@@ -1879,4 +1907,4 @@ declare const HTTP_STATUS: {
|
|
|
1879
1907
|
readonly INTERNAL_SERVER_ERROR: 500;
|
|
1880
1908
|
};
|
|
1881
1909
|
|
|
1882
|
-
export { type APIResponse, type AvailableIndexesList, type BalanceSheet, type BalanceSheetGrowth,
|
|
1910
|
+
export { type APIResponse, type AvailableIndexesList, type BalanceSheet, type BalanceSheetGrowth, COUNTRIES, CalendarEndpoints, type CashFlowStatement, type CashflowGrowth, type CompaniesPriceListResponse, CompanyEndpoints, type CompanyNotes, type CompanyProfile, type CompanyTranscriptData, CryptoEndpoints, type CryptoHistoricalParams, type CryptoList, type CryptoListParams, type CryptoQuote, DEFAULT_LIMIT, DEFAULT_TIMEOUT, type DateRangeParams, type DividendsCalendar, ERROR_MESSAGES, type ETFCountryWeighting, ETFEndpoints, type ETFHolder, type ETFHolding, type ETFHoldingDates, type ETFList, type ETFProfile, type ETFStockExposure, type ETFWeighting, EXCHANGES, type EarningsCalendar, type EarningsCallTranscript, type EarningsConfirmed, type EarningsHistorical, type EarningsSurprises, EconomicEndpoints, type EconomicIndicator, type EconomicIndicatorName, type EconomicIndicatorParams, type EconomicsCalendar, type EnterpriseValue, type ErrorResponse, Exchange, type ExecutiveCompensation, FMP, FMPClient, type FMPConfig, FinancialEndpoints, type FinancialGrowth, type FinancialRatios, type FinancialStatementBase, type FinancialStatementsParams, ForexEndpoints, type ForexHistoricalParams, type ForexList, type ForexQuote, type GrowthStatementBase, HTTP_STATUS, type HistoricalEmployeeCount, type HistoricalPriceData, type HistoricalPriceParams, type HistoricalPriceResponse, type HistoricalSharesFloat, type HouseTradingResponse, type IPOCalendar, type IncomeGrowth, type IncomeStatement, type IntradayParams, type KeyMetrics, ListEndpoints, MAX_LIMIT, type MarketCap, MarketEndpoints, type MarketHoliday, type MarketHours, type MarketIndex, type MarketPerformance, type MarketSectorPerformance, MutualFundEndpoints, type MutualFundHolding, type MutualFundQuote, PERIODS, type PaginationParams, Period, type PeriodParams, type QueryParams, type Quote, QuoteEndpoints, type QuoteParams, SECTORS, SenateHouseEndpoints, type SenateHouseTradingByNameParams, type SenateHouseTradingByNameResponse, type SenateHouseTradingParams, type SenateHouseTradingRSSFeedParams, type SenateTradingResponse, type SharesFloat, type SplitsCalendar, type StockDividend, type StockDividendResponse, StockEndpoints, type StockList, type StockListResponse, type StockQuote, type StockRealTimePrice, type StockRealTimePriceFull, type StockSplit, type StockSplitResponse, type SuccessResponse, type SymbolParams, type TreasuryRate, formatCurrency, formatDate, formatLargeNumber, formatNumber, formatPercentage, formatReadableDate, formatTimestamp, formatVolume, validateApiKey, validateDate, validateLimit, validatePage, validatePeriod, validateSymbol };
|