fmp-node-api 0.0.5 → 0.0.6

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 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, bond) are available in the package-level scripts but not exposed at the root level.
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
@@ -577,13 +577,9 @@ interface EarningsSurprises {
577
577
  estimatedEarning: number;
578
578
  }
579
579
 
580
- interface ForexQuoteParams extends SymbolParams {
581
- }
582
580
  interface ForexHistoricalParams extends SymbolParams, DateRangeParams {
583
581
  timeseries?: number;
584
582
  }
585
- interface ForexListParams {
586
- }
587
583
  interface ForexQuote {
588
584
  symbol: string;
589
585
  price: number;
@@ -714,14 +710,6 @@ interface ETFStockExposure {
714
710
  marketValue: number;
715
711
  }
716
712
 
717
- interface MutualFundQuoteParams extends SymbolParams {
718
- }
719
- interface MutualFundProfileParams extends SymbolParams {
720
- }
721
- interface MutualFundHoldersParams extends SymbolParams, PaginationParams {
722
- }
723
- interface MutualFundListParams {
724
- }
725
713
  interface MutualFundQuote {
726
714
  symbol: string;
727
715
  price: number;
@@ -745,99 +733,17 @@ interface MutualFundQuote {
745
733
  sharesOutstanding: number;
746
734
  timestamp: number;
747
735
  }
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
736
  interface MutualFundHolding {
787
- asset: string;
788
- weightPercent: number;
737
+ holder: string;
789
738
  shares: number;
790
- marketValue: number;
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;
739
+ dateReported: string;
804
740
  change: number;
805
- dayLow: number;
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;
741
+ weightPercent: number;
822
742
  }
823
743
 
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
744
  interface EconomicIndicator {
837
745
  date: string;
838
746
  value: number;
839
- change: number;
840
- changePercent: number;
841
747
  }
842
748
  interface TreasuryRate {
843
749
  date: string;
@@ -854,27 +760,11 @@ interface TreasuryRate {
854
760
  year20: number;
855
761
  year30: number;
856
762
  }
857
- interface FederalFundsRate {
858
- date: string;
859
- value: number;
860
- }
861
- interface CPI {
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;
763
+ 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';
764
+ interface EconomicIndicatorParams {
765
+ name: EconomicIndicatorName;
766
+ from?: string;
767
+ to?: string;
878
768
  }
879
769
 
880
770
  interface MarketHours {
@@ -1122,6 +1012,42 @@ interface EarningsCallTranscript {
1122
1012
  content: string;
1123
1013
  }
1124
1014
 
1015
+ interface SenateHouseTradingParams {
1016
+ symbol: string;
1017
+ }
1018
+ interface SenateHouseTradingRSSFeedParams {
1019
+ page: number;
1020
+ }
1021
+ interface SenateTradingResponse {
1022
+ firstName: string;
1023
+ lastName: string;
1024
+ office: string;
1025
+ link: string;
1026
+ dateRecieved: string;
1027
+ transactionDate: string;
1028
+ owner: string;
1029
+ assetDescription: string;
1030
+ assetType: string;
1031
+ type: string;
1032
+ amount: string;
1033
+ comment: string;
1034
+ symbol: string;
1035
+ }
1036
+ interface HouseTradingResponse {
1037
+ disclosureYear: string;
1038
+ disclosureDate: string;
1039
+ transactionDate: string;
1040
+ owner: string;
1041
+ ticker: string;
1042
+ assetDescription: string;
1043
+ type: string;
1044
+ amount: string;
1045
+ representative: string;
1046
+ district: string;
1047
+ link: string;
1048
+ capitalGainsOver200USD: string;
1049
+ }
1050
+
1125
1051
  declare class FMPClient {
1126
1052
  private v3Client;
1127
1053
  private v4Client;
@@ -1308,7 +1234,7 @@ declare class ForexEndpoints {
1308
1234
  * @param params - Parameters for the forex quote request
1309
1235
  * @returns Forex quote data
1310
1236
  */
1311
- getQuote(params: ForexQuoteParams): Promise<APIResponse<ForexQuote[]>>;
1237
+ getQuote(params: SymbolParams): Promise<APIResponse<ForexQuote[]>>;
1312
1238
  /**
1313
1239
  * Get historical forex prices
1314
1240
  * @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
@@ -1322,17 +1248,6 @@ declare class ForexEndpoints {
1322
1248
  from?: string;
1323
1249
  to?: string;
1324
1250
  }): 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
1251
  }
1337
1252
 
1338
1253
  declare class CryptoEndpoints {
@@ -1429,40 +1344,14 @@ declare class MutualFundEndpoints {
1429
1344
  * @param params - Parameters for the mutual fund quote request
1430
1345
  * @returns Mutual fund quote data
1431
1346
  */
1432
- getQuote(params: MutualFundQuoteParams): Promise<APIResponse<MutualFundQuote[]>>;
1433
- /**
1434
- * Get mutual fund profile
1435
- */
1436
- getProfile(params: MutualFundProfileParams): Promise<APIResponse<MutualFundProfile[]>>;
1347
+ getQuote(params: SymbolParams): Promise<APIResponse<MutualFundQuote[]>>;
1437
1348
  /**
1438
- * Get mutual fund holdings
1349
+ * Get mutual fund holders
1350
+ * https://site.financialmodelingprep.com/developer/docs#mutual-fund-holder-mutual-funds-holdings
1351
+ * @param symbol - The symbol of the mutual fund to get the holders for
1352
+ * @returns Mutual fund holders data
1439
1353
  */
1440
- getHoldings(params: MutualFundHoldersParams): Promise<APIResponse<MutualFundHolding[]>>;
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>>;
1354
+ getHolders({ symbol }: SymbolParams): Promise<APIResponse<MutualFundHolding[]>>;
1466
1355
  }
1467
1356
 
1468
1357
  declare class EconomicEndpoints {
@@ -1470,24 +1359,21 @@ declare class EconomicEndpoints {
1470
1359
  constructor(client: FMPClient);
1471
1360
  /**
1472
1361
  * Get treasury rates
1362
+ * https://site.financialmodelingprep.com/developer/docs#treasury-rates-economics-data
1363
+ * @param from - The start date to get the treasury rates for
1364
+ * @param to - The end date to get the treasury rates for
1365
+ * @returns Treasury rates data
1473
1366
  */
1474
- getTreasuryRates(params?: TreasuryRateParams): Promise<APIResponse<TreasuryRate[]>>;
1367
+ getTreasuryRates(params: DateRangeParams): Promise<APIResponse<TreasuryRate[]>>;
1475
1368
  /**
1476
- * Get federal funds rate
1369
+ * Get economic indicators
1370
+ * https://site.financialmodelingprep.com/developer/docs#economic-indicators-economics-data
1371
+ * @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
1372
+ * @param from - The start date to get the economic indicators for
1373
+ * @param to - The end date to get the economic indicators for
1374
+ * @returns Provides real-time and historical economic data for a variety of economic indicators, such as GDP, unemployment, and inflation.
1477
1375
  */
1478
- getFederalFundsRate(params?: FederalFundsRateParams): Promise<APIResponse<FederalFundsRate[]>>;
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[]>>;
1376
+ getEconomicIndicators(params: EconomicIndicatorParams): Promise<APIResponse<EconomicIndicator[]>>;
1491
1377
  }
1492
1378
 
1493
1379
  declare class MarketEndpoints {
@@ -1712,6 +1598,37 @@ declare class QuoteEndpoints {
1712
1598
  getIntraday(params: IntradayParams): Promise<APIResponse<HistoricalPriceData[]>>;
1713
1599
  }
1714
1600
 
1601
+ declare class SenateHouseEndpoints {
1602
+ private client;
1603
+ constructor(client: FMPClient);
1604
+ /**
1605
+ * Get senate trading data only
1606
+ * https://site.financialmodelingprep.com/developer/docs#senate-trading
1607
+ * @param symbol - The stock symbol to get the senate trading data for
1608
+ * @returns Senate trading data only
1609
+ */
1610
+ getSenateTrading(params: SenateHouseTradingParams): Promise<APIResponse<SenateTradingResponse[]>>;
1611
+ /** Get senate trading RSS feed
1612
+ * https://site.financialmodelingprep.com/developer/docs#senate-trading-rss-feed-senate
1613
+ * @param page - The page number to get
1614
+ * @returns Senate trading RSS feed
1615
+ */
1616
+ getSenateTradingRSSFeed(params: SenateHouseTradingRSSFeedParams): Promise<APIResponse<SenateTradingResponse[]>>;
1617
+ /**
1618
+ * Get house trading data only
1619
+ * https://site.financialmodelingprep.com/developer/docs#house-disclosure
1620
+ * @param symbol - The stock symbol to get the house trading data for
1621
+ * @returns House trading data only
1622
+ */
1623
+ getHouseTrading(params: SenateHouseTradingParams): Promise<APIResponse<HouseTradingResponse[]>>;
1624
+ /** Get house trading RSS feed
1625
+ * https://site.financialmodelingprep.com/developer/docs#house-disclosure-rss-feed-senate
1626
+ * @param page - The page number to get
1627
+ * @returns House trading RSS feed
1628
+ */
1629
+ getHouseTradingRSSFeed(params: SenateHouseTradingRSSFeedParams): Promise<APIResponse<SenateTradingResponse[]>>;
1630
+ }
1631
+
1715
1632
  /**
1716
1633
  * Main FMP API client that provides access to all endpoints
1717
1634
  *
@@ -1741,13 +1658,13 @@ declare class FMP {
1741
1658
  readonly crypto: CryptoEndpoints;
1742
1659
  readonly etf: ETFEndpoints;
1743
1660
  readonly mutualFund: MutualFundEndpoints;
1744
- readonly bond: BondEndpoints;
1745
1661
  readonly economic: EconomicEndpoints;
1746
1662
  readonly market: MarketEndpoints;
1747
1663
  readonly list: ListEndpoints;
1748
1664
  readonly calendar: CalendarEndpoints;
1749
1665
  readonly company: CompanyEndpoints;
1750
1666
  readonly quote: QuoteEndpoints;
1667
+ readonly senateHouse: SenateHouseEndpoints;
1751
1668
  constructor(config: FMPConfig);
1752
1669
  /**
1753
1670
  * Get the underlying client instance for advanced usage
@@ -1879,4 +1796,4 @@ declare const HTTP_STATUS: {
1879
1796
  readonly INTERNAL_SERVER_ERROR: 500;
1880
1797
  };
1881
1798
 
1882
- export { type APIResponse, type AvailableIndexesList, type BalanceSheet, type BalanceSheetGrowth, BondEndpoints, type BondHistoricalParams, type BondListParams, type BondQuote, type BondQuoteParams, COUNTRIES, type CPI, type CPIParams, CalendarEndpoints, type CashFlowStatement, type CashflowGrowth, CompanyEndpoints, type CompanyNotes, type CompanyProfile, CryptoEndpoints, type CryptoHistoricalParams, type CryptoList, type CryptoListParams, type CryptoQuote, DEFAULT_LIMIT, DEFAULT_TIMEOUT, type DateRangeParams, type DividendsCalendar, ERROR_MESSAGES, type ETFCountryWeighting, ETFEndpoints, type ETFHolder, type ETFHolding, type ETFHoldingDates, type ETFList, type ETFProfile, type ETFStockExposure, type ETFWeighting, EXCHANGES, type EarningsCalendar, type EarningsCallTranscript, type EarningsHistorical, type EarningsSurprises, EconomicEndpoints, type EconomicIndicator, type EconomicIndicatorParams, type EconomicsCalendar, type EnterpriseValue, type ErrorResponse, Exchange, type ExecutiveCompensation, FMP, FMPClient, type FMPConfig, type FederalFundsRate, type FederalFundsRateParams, FinancialEndpoints, type FinancialGrowth, type FinancialRatios, type FinancialStatementBase, type FinancialStatementsParams, ForexEndpoints, type ForexHistoricalParams, type ForexList, type ForexListParams, type ForexQuote, type ForexQuoteParams, type GDP, type GDPParams, type GrowthStatementBase, HTTP_STATUS, type HistoricalEmployeeCount, type HistoricalPriceData, type HistoricalPriceParams, type HistoricalPriceResponse, type HistoricalSharesFloat, type IPOCalendar, type IncomeGrowth, type IncomeStatement, type IntradayParams, type KeyMetrics, ListEndpoints, MAX_LIMIT, type MarketCap, MarketEndpoints, type MarketHoliday, type MarketHours, type MarketIndex, type MarketPerformance, type MarketSectorPerformance, MutualFundEndpoints, type MutualFundHoldersParams, type MutualFundHolding, type MutualFundListParams, type MutualFundProfile, type MutualFundProfileParams, type MutualFundQuote, type MutualFundQuoteParams, PERIODS, type PaginationParams, Period, type PeriodParams, type QueryParams, type Quote, QuoteEndpoints, type QuoteParams, SECTORS, type SharesFloat, type SplitsCalendar, type StockDividend, type StockDividendResponse, StockEndpoints, type StockList, type StockQuote, type StockSplit, type StockSplitResponse, type SuccessResponse, type SymbolParams, type TreasuryRate, type TreasuryRateParams, type Unemployment, type UnemploymentParams, formatCurrency, formatDate, formatLargeNumber, formatNumber, formatPercentage, formatReadableDate, formatTimestamp, formatVolume, validateApiKey, validateDate, validateLimit, validatePage, validatePeriod, validateSymbol };
1799
+ export { type APIResponse, type AvailableIndexesList, type BalanceSheet, type BalanceSheetGrowth, COUNTRIES, CalendarEndpoints, type CashFlowStatement, type CashflowGrowth, CompanyEndpoints, type CompanyNotes, type CompanyProfile, CryptoEndpoints, type CryptoHistoricalParams, type CryptoList, type CryptoListParams, type CryptoQuote, DEFAULT_LIMIT, DEFAULT_TIMEOUT, type DateRangeParams, type DividendsCalendar, ERROR_MESSAGES, type ETFCountryWeighting, ETFEndpoints, type ETFHolder, type ETFHolding, type ETFHoldingDates, type ETFList, type ETFProfile, type ETFStockExposure, type ETFWeighting, EXCHANGES, type EarningsCalendar, type EarningsCallTranscript, type EarningsHistorical, type EarningsSurprises, EconomicEndpoints, type EconomicIndicator, type 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 SenateHouseTradingParams, type SenateHouseTradingRSSFeedParams, type SenateTradingResponse, type SharesFloat, type SplitsCalendar, type StockDividend, type StockDividendResponse, StockEndpoints, type StockList, type StockQuote, type StockSplit, type StockSplitResponse, type SuccessResponse, type SymbolParams, type TreasuryRate, formatCurrency, formatDate, formatLargeNumber, formatNumber, formatPercentage, formatReadableDate, formatTimestamp, formatVolume, validateApiKey, validateDate, validateLimit, validatePage, validatePeriod, validateSymbol };