fmp-node-api 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/index.d.mts +94 -43
- package/dist/index.d.ts +94 -43
- package/dist/index.js +78 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +78 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -1
package/dist/index.js
CHANGED
|
@@ -148,16 +148,19 @@ var StockEndpoints = class {
|
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* Get real-time stock quote
|
|
151
|
-
*
|
|
151
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.
|
|
152
152
|
* @param symbol - The stock symbol to get the quote for
|
|
153
153
|
* @returns This endpoint gives you the latest bid and ask prices for a stock, as well as the volume and last trade price in real time.
|
|
154
154
|
*/
|
|
155
155
|
async getQuote({ symbol }) {
|
|
156
|
+
console.warn(
|
|
157
|
+
"\u26A0\uFE0F StockEndpoints.getQuote() is deprecated. Use fmp.quote.getQuote() instead. This method will be removed in version 0.1.0."
|
|
158
|
+
);
|
|
156
159
|
return this.client.getSingle(`/quote/${symbol}`, "v3");
|
|
157
160
|
}
|
|
158
161
|
/**
|
|
159
162
|
* Get historical stock prices
|
|
160
|
-
*
|
|
163
|
+
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
161
164
|
* @param symbol - The stock symbol to get the historical prices for
|
|
162
165
|
* @param from - The start date to get the historical prices for
|
|
163
166
|
* @param to - The end date to get the historical prices for
|
|
@@ -168,6 +171,9 @@ var StockEndpoints = class {
|
|
|
168
171
|
from,
|
|
169
172
|
to
|
|
170
173
|
}) {
|
|
174
|
+
console.warn(
|
|
175
|
+
"\u26A0\uFE0F StockEndpoints.getHistoricalPrice() is deprecated. Use fmp.quote.getHistoricalPrice() instead. This method will be removed in version 0.1.0."
|
|
176
|
+
);
|
|
171
177
|
const params = {};
|
|
172
178
|
if (from) params.from = from;
|
|
173
179
|
if (to) params.to = to;
|
|
@@ -405,14 +411,19 @@ var ForexEndpoints = class {
|
|
|
405
411
|
}
|
|
406
412
|
/**
|
|
407
413
|
* Get forex quote
|
|
414
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.
|
|
408
415
|
* @param params - Parameters for the forex quote request
|
|
409
416
|
* @returns Forex quote data
|
|
410
417
|
*/
|
|
411
418
|
async getQuote(params) {
|
|
419
|
+
console.warn(
|
|
420
|
+
"\u26A0\uFE0F ForexEndpoints.getQuote() is deprecated. Use fmp.quote.getQuote() instead. This method will be removed in version 0.1.0."
|
|
421
|
+
);
|
|
412
422
|
return this.client.get("/quote", "v3", params);
|
|
413
423
|
}
|
|
414
424
|
/**
|
|
415
425
|
* Get historical forex prices
|
|
426
|
+
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
416
427
|
* @param symbol - The forex symbol to get the historical prices for
|
|
417
428
|
* @param from - The start date to get the historical prices for
|
|
418
429
|
* @param to - The end date to get the historical prices for
|
|
@@ -423,6 +434,9 @@ var ForexEndpoints = class {
|
|
|
423
434
|
from,
|
|
424
435
|
to
|
|
425
436
|
}) {
|
|
437
|
+
console.warn(
|
|
438
|
+
"\u26A0\uFE0F ForexEndpoints.getHistoricalPrice() is deprecated. Use fmp.quote.getHistoricalPrice() instead. This method will be removed in version 0.1.0."
|
|
439
|
+
);
|
|
426
440
|
const params = {};
|
|
427
441
|
if (from) params.from = from;
|
|
428
442
|
if (to) params.to = to;
|
|
@@ -452,16 +466,19 @@ var CryptoEndpoints = class {
|
|
|
452
466
|
}
|
|
453
467
|
/**
|
|
454
468
|
* Get crypto quote
|
|
455
|
-
*
|
|
469
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.
|
|
456
470
|
* @param symbol - The crypto symbol to get the quote for
|
|
457
471
|
* @returns Crypto quote data
|
|
458
472
|
*/
|
|
459
473
|
async getQuote({ symbol }) {
|
|
474
|
+
console.warn(
|
|
475
|
+
"\u26A0\uFE0F CryptoEndpoints.getQuote() is deprecated. Use fmp.quote.getQuote() instead. This method will be removed in version 0.1.0."
|
|
476
|
+
);
|
|
460
477
|
return this.client.getSingle(`/quote/${symbol}`, "v3");
|
|
461
478
|
}
|
|
462
479
|
/**
|
|
463
480
|
* Get historical crypto prices
|
|
464
|
-
*
|
|
481
|
+
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.
|
|
465
482
|
* @param symbol - The crypto symbol to get the historical prices for
|
|
466
483
|
* @param from - The start date to get the historical prices for
|
|
467
484
|
* @param to - The end date to get the historical prices for
|
|
@@ -472,6 +489,9 @@ var CryptoEndpoints = class {
|
|
|
472
489
|
from,
|
|
473
490
|
to
|
|
474
491
|
}) {
|
|
492
|
+
console.warn(
|
|
493
|
+
"\u26A0\uFE0F CryptoEndpoints.getHistoricalPrice() is deprecated. Use fmp.quote.getHistoricalPrice() instead. This method will be removed in version 0.1.0."
|
|
494
|
+
);
|
|
475
495
|
const params = {};
|
|
476
496
|
if (from) params.from = from;
|
|
477
497
|
if (to) params.to = to;
|
|
@@ -567,6 +587,7 @@ var MutualFundEndpoints = class {
|
|
|
567
587
|
}
|
|
568
588
|
/**
|
|
569
589
|
* Get mutual fund quote
|
|
590
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in a future release.
|
|
570
591
|
* @param params - Parameters for the mutual fund quote request
|
|
571
592
|
* @returns Mutual fund quote data
|
|
572
593
|
*/
|
|
@@ -594,6 +615,7 @@ var BondEndpoints = class {
|
|
|
594
615
|
}
|
|
595
616
|
/**
|
|
596
617
|
* Get bond quote
|
|
618
|
+
* @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in a future release.
|
|
597
619
|
* @param params - Parameters for the bond quote request
|
|
598
620
|
* @returns Bond quote data
|
|
599
621
|
*/
|
|
@@ -602,6 +624,7 @@ var BondEndpoints = class {
|
|
|
602
624
|
}
|
|
603
625
|
/**
|
|
604
626
|
* Get historical bond prices
|
|
627
|
+
* @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in a future release.
|
|
605
628
|
* @param symbol - The bond symbol to get the historical prices for
|
|
606
629
|
* @param from - The start date to get the historical prices for
|
|
607
630
|
* @param to - The end date to get the historical prices for
|
|
@@ -924,6 +947,55 @@ var CompanyEndpoints = class {
|
|
|
924
947
|
}
|
|
925
948
|
};
|
|
926
949
|
|
|
950
|
+
// src/endpoints/quote.ts
|
|
951
|
+
var QuoteEndpoints = class {
|
|
952
|
+
constructor(client) {
|
|
953
|
+
this.client = client;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Get quote for any asset type (stock, crypto, forex, commodity, ETF)
|
|
957
|
+
* @param params - Parameters for the quote request
|
|
958
|
+
* @returns Quote data for the specified asset
|
|
959
|
+
*/
|
|
960
|
+
async getQuote(params) {
|
|
961
|
+
const { symbol } = params;
|
|
962
|
+
return this.client.getSingle(`/quote/${symbol}`, "v3");
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Get historical prices for any asset type
|
|
966
|
+
* @param params - Parameters for the historical price request
|
|
967
|
+
* @returns Historical price data for the specified asset
|
|
968
|
+
*/
|
|
969
|
+
async getHistoricalPrice(params) {
|
|
970
|
+
const { symbol, from, to } = params;
|
|
971
|
+
const queryParams = {};
|
|
972
|
+
if (from) queryParams.from = from;
|
|
973
|
+
if (to) queryParams.to = to;
|
|
974
|
+
return this.client.getSingle(`/historical-price-full/${symbol}`, "v3", queryParams);
|
|
975
|
+
}
|
|
976
|
+
/**
|
|
977
|
+
* Get multiple quotes for any asset type
|
|
978
|
+
* @param symbols - Array of symbols to get quotes for
|
|
979
|
+
* @returns Array of quote data
|
|
980
|
+
*/
|
|
981
|
+
async getQuotes(symbols) {
|
|
982
|
+
const symbolsParam = symbols.join(",");
|
|
983
|
+
return this.client.get(`/quote/${symbolsParam}`, "v3");
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* Get intraday data for any asset type
|
|
987
|
+
* @param params - Parameters for the intraday request
|
|
988
|
+
* @returns Intraday price data for the specified asset
|
|
989
|
+
*/
|
|
990
|
+
async getIntraday(params) {
|
|
991
|
+
const { symbol, interval, from, to } = params;
|
|
992
|
+
const queryParams = {};
|
|
993
|
+
if (from) queryParams.from = from;
|
|
994
|
+
if (to) queryParams.to = to;
|
|
995
|
+
return this.client.get(`/historical-chart/${interval}/${symbol}`, "v3", queryParams);
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
|
|
927
999
|
// src/fmp.ts
|
|
928
1000
|
var FMP = class {
|
|
929
1001
|
constructor(config) {
|
|
@@ -937,6 +1009,7 @@ var FMP = class {
|
|
|
937
1009
|
this.list = new ListEndpoints(client);
|
|
938
1010
|
this.calendar = new CalendarEndpoints(client);
|
|
939
1011
|
this.company = new CompanyEndpoints(client);
|
|
1012
|
+
this.quote = new QuoteEndpoints(client);
|
|
940
1013
|
this.forex = new ForexEndpoints(client);
|
|
941
1014
|
this.economic = new EconomicEndpoints(client);
|
|
942
1015
|
this.bond = new BondEndpoints(client);
|
|
@@ -1110,6 +1183,7 @@ exports.MarketEndpoints = MarketEndpoints;
|
|
|
1110
1183
|
exports.MutualFundEndpoints = MutualFundEndpoints;
|
|
1111
1184
|
exports.PERIODS = PERIODS;
|
|
1112
1185
|
exports.Period = Period;
|
|
1186
|
+
exports.QuoteEndpoints = QuoteEndpoints;
|
|
1113
1187
|
exports.SECTORS = SECTORS;
|
|
1114
1188
|
exports.StockEndpoints = StockEndpoints;
|
|
1115
1189
|
exports.formatCurrency = formatCurrency;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts","../src/shared.ts","../src/utils/validation.ts","../src/endpoints/stock.ts","../src/endpoints/financial.ts","../src/endpoints/forex.ts","../src/endpoints/crypto.ts","../src/endpoints/etf.ts","../src/endpoints/mutual-fund.ts","../src/endpoints/bond.ts","../src/endpoints/economic.ts","../src/endpoints/market.ts","../src/endpoints/list.ts","../src/endpoints/calendar.ts","../src/endpoints/company.ts","../src/fmp.ts","../src/types/common.ts","../src/utils/formatting.ts","../src/utils/constants.ts"],"names":["axios","Period","Exchange"],"mappings":";;;;;;;;;AAQA,SAAS,mBAAsB,IAAA,EAAY;AACzC,EAAA,IAAI,MAAM,OAAA,CAAQ,IAAI,CAAA,IAAK,IAAA,CAAK,WAAW,CAAA,EAAG;AAC5C,IAAA,OAAO,KAAK,CAAC,CAAA;AAAA;AAEf,EAAA,OAAO,IAAA;AACT;AAEO,IAAM,YAAN,MAAgB;AAAA,EAMrB,YAAY,MAAA,EAAmB;AAC7B,IAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AAGrB,IAAA,IAAA,CAAK,QAAA,GAAW,IAAA,CAAK,YAAA,CAAa,0CAAA,EAA4C,OAAO,OAAO,CAAA;AAC5F,IAAA,IAAA,CAAK,QAAA,GAAW,IAAA,CAAK,YAAA,CAAa,0CAAA,EAA4C,OAAO,OAAO,CAAA;AAC5F,IAAA,IAAA,CAAK,eAAe,IAAA,CAAK,YAAA;AAAA,MACvB,8CAAA;AAAA,MACA,MAAA,CAAO;AAAA,KACT;AAAA;AACF,EAEQ,YAAA,CAAa,SAAiB,OAAA,EAAiC;AACrE,IAAA,MAAM,MAAA,GAASA,uBAAM,MAAA,CAAO;AAAA,MAC1B,OAAA;AAAA,MACA,SAAS,OAAA,IAAW,GAAA;AAAA,MACpB,OAAA,EAAS,EAAE,cAAA,EAAgB,kBAAA;AAAmB,KAC/C,CAAA;AAED,IAAA,MAAA,CAAO,YAAA,CAAa,OAAA,CAAQ,GAAA,CAAI,CAAA,MAAA,KAAU;AACxC,MAAA,MAAA,CAAO,SAAS,EAAE,GAAG,OAAO,MAAA,EAAQ,MAAA,EAAQ,KAAK,MAAA,EAAO;AACxD,MAAA,OAAO,MAAA;AAAA,KACR,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AA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI;AACN;AAGO,IAAM,cAAA,GAAiB;AAAA,EAC5B,gBAAA,EAAkB,qBAAA;AAAA,EAClB,eAAA,EAAiB,oBAAA;AAAA,EACjB,cAAA,EAAgB,uBAAA;AAAA,EAChB,YAAA,EAAc,qCAAA;AAAA,EACd,cAAA,EAAgB,6CAAA;AAAA,EAChB,aAAA,EAAe,kCAAA;AAAA,EACf,YAAA,EAAc,oCAAA;AAAA,EACd,cAAA,EAAgB,gBAAA;AAAA,EAChB,mBAAA,EAAqB,qBAAA;AAAA,EACrB,YAAA,EAAc,gCAAA;AAAA,EACd,SAAA,EAAW;AACb;AAGO,IAAM,WAAA,GAAc;AAAA,EACzB,EAAA,EAAI,GAAA;AAAA,EACJ,OAAA,EAAS,GAAA;AAAA,EACT,WAAA,EAAa,GAAA;AAAA,EACb,YAAA,EAAc,GAAA;AAAA,EACd,SAAA,EAAW,GAAA;AAAA,EACX,SAAA,EAAW,GAAA;AAAA,EACX,iBAAA,EAAmB,GAAA;AAAA,EACnB,qBAAA,EAAuB;AACzB","file":"index.js","sourcesContent":["import axios, { AxiosInstance } from 'axios';\nimport { FMPConfig, APIResponse } from './types';\n\n/**\n * Utility function to unwrap single objects from arrays\n * Only unwraps if the response is an array with exactly one item\n * Otherwise, returns the original response\n */\nfunction unwrapSingleObject<T>(data: T): T {\n if (Array.isArray(data) && data.length === 1) {\n return data[0];\n }\n return data;\n}\n\nexport class FMPClient {\n private v3Client: AxiosInstance;\n private v4Client: AxiosInstance;\n private stableClient: AxiosInstance;\n private apiKey: string;\n\n constructor(config: FMPConfig) {\n this.apiKey = config.apiKey;\n\n // Create separate clients for each version\n this.v3Client = this.createClient('https://financialmodelingprep.com/api/v3', config.timeout);\n this.v4Client = this.createClient('https://financialmodelingprep.com/api/v4', config.timeout);\n this.stableClient = this.createClient(\n 'https://financialmodelingprep.com/api/stable',\n config.timeout,\n );\n }\n\n private createClient(baseURL: string, timeout?: number): AxiosInstance {\n const client = axios.create({\n baseURL,\n timeout: timeout || 10000,\n headers: { 'Content-Type': 'application/json' },\n });\n\n client.interceptors.request.use(config => {\n config.params = { ...config.params, apikey: this.apiKey };\n return config;\n });\n\n return client;\n }\n\n // Standard get method - returns raw API response\n async get<T>(\n endpoint: string,\n version: 'v3' | 'v4' | 'stable' = 'v3',\n params?: Record<string, any>,\n ): Promise<APIResponse<T>> {\n const client = this.getClientForVersion(version);\n\n try {\n const response = await client.get(endpoint, { params });\n return {\n success: true,\n data: response.data,\n status: response.status,\n };\n } catch (error: any) {\n return {\n success: false,\n error: error.message || 'Unknown error occurred',\n status: error.response?.status || 500,\n };\n }\n }\n\n // Get method for single-object endpoints - unwraps single-item arrays\n async getSingle<T>(\n endpoint: string,\n version: 'v3' | 'v4' | 'stable' = 'v3',\n params?: Record<string, any>,\n ): Promise<APIResponse<T>> {\n const client = this.getClientForVersion(version);\n\n try {\n const response = await client.get(endpoint, { params });\n return {\n success: true,\n data: unwrapSingleObject(response.data),\n status: response.status,\n };\n } catch (error: any) {\n return {\n success: false,\n error: error.message || 'Unknown error occurred',\n status: error.response?.status || 500,\n };\n }\n }\n\n private getClientForVersion(version: 'v3' | 'v4' | 'stable'): AxiosInstance {\n switch (version) {\n case 'v3':\n return this.v3Client;\n case 'v4':\n return this.v4Client;\n case 'stable':\n return this.stableClient;\n default:\n return this.v3Client; // Default to v3\n }\n }\n}\n","// Shared types and utilities for FMP API wrapper\n\n// Common error types\nexport class FMPError extends Error {\n constructor(\n message: string,\n public status?: number,\n public code?: string,\n ) {\n super(message);\n this.name = 'FMPError';\n }\n}\n","// Validation utilities for FMP API\n\nimport { FMPError } from '../shared';\n\n/**\n * Validate API key\n */\nexport function validateApiKey(apiKey: string): void {\n if (!apiKey || typeof apiKey !== 'string' || apiKey.trim().length === 0) {\n throw new FMPError('API key is required and must be a non-empty string');\n }\n}\n\n/**\n * Validate stock symbol\n */\nexport function validateSymbol(symbol: string): void {\n if (!symbol || typeof symbol !== 'string' || symbol.trim().length === 0) {\n throw new FMPError('Symbol is required and must be a non-empty string');\n }\n\n // Basic symbol validation (alphanumeric and common symbols)\n const symbolRegex = /^[A-Z0-9.-]+$/;\n if (!symbolRegex.test(symbol.toUpperCase())) {\n throw new FMPError(\n 'Invalid symbol format. Symbols should contain only letters, numbers, dots, and hyphens',\n );\n }\n}\n\n/**\n * Validate date format (YYYY-MM-DD)\n */\nexport function validateDate(date: string): void {\n if (!date || typeof date !== 'string') {\n throw new FMPError('Date is required and must be a string');\n }\n\n const dateRegex = /^\\d{4}-\\d{2}-\\d{2}$/;\n if (!dateRegex.test(date)) {\n throw new FMPError('Invalid date format. Use YYYY-MM-DD format');\n }\n\n const parsedDate = new Date(date);\n if (isNaN(parsedDate.getTime())) {\n throw new FMPError('Invalid date');\n }\n}\n\n/**\n * Validate period parameter\n */\nexport function validatePeriod(period: string): void {\n if (period && !['annual', 'quarter'].includes(period)) {\n throw new FMPError('Period must be either \"annual\" or \"quarter\"');\n }\n}\n\n/**\n * Validate limit parameter\n */\nexport function validateLimit(limit: number): void {\n if (limit !== undefined && (typeof limit !== 'number' || limit < 1 || limit > 1000)) {\n throw new FMPError('Limit must be a number between 1 and 1000');\n }\n}\n\n/**\n * Validate page parameter\n */\nexport function validatePage(page: number): void {\n if (page !== undefined && (typeof page !== 'number' || page < 0)) {\n throw new FMPError('Page must be a non-negative number');\n }\n}\n","import { FMPClient } from '@/client';\nimport { APIResponse, DateRangeParams, HistoricalPriceResponse } from '@/types/common';\nimport { MarketCap, StockSplitResponse, StockQuote, StockDividendResponse } from '@/types/stock';\n\nexport class StockEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get real-time stock quote\n * https://site.financialmodelingprep.com/developer/docs#full-quote-quote\n * @param symbol - The stock symbol to get the quote for\n * @returns This endpoint gives you the latest bid and ask prices for a stock, as well as the volume and last trade price in real time.\n */\n async getQuote({ symbol }: { symbol: string }): Promise<APIResponse<StockQuote | null>> {\n return this.client.getSingle(`/quote/${symbol}`, 'v3');\n }\n\n /**\n * Get historical stock prices\n * https://site.financialmodelingprep.com/developer/docs#daily-chart-charts\n * @param symbol - The stock symbol to get the historical prices for\n * @param from - The start date to get the historical prices for\n * @param to - The end date to get the historical prices for\n * @returns The FMP Daily Chart endpoint provides daily stock data for a specified company, including opening, high, low, and closing prices, with a default limit of 5 years of historical data. To access data beyond this limit, use the from and to parameters for custom date ranges, each with a 5-year limit\n */\n async getHistoricalPrice({\n symbol,\n from,\n to,\n }: {\n symbol: string;\n from?: string;\n to?: string;\n }): Promise<APIResponse<HistoricalPriceResponse>> {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.getSingle(`/historical-price-full/${symbol}`, 'v3', params);\n }\n\n /**\n * Get market cap\n * https://site.financialmodelingprep.com/developer/docs#market-cap-company-information\n * @param symbol - The stock symbol to get the market cap for\n * @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.\n */\n async getMarketCap({ symbol }: { symbol: string }): Promise<APIResponse<MarketCap | null>> {\n return this.client.getSingle(`/market-capitalization/${symbol}`, 'v3');\n }\n\n /**\n * Get stock splits\n * https://site.financialmodelingprep.com/developer/docs#splits-historical-splits\n * @param symbol - The stock symbol to get the splits for\n * @returns A list of historical stock splits for publicly traded companies, including the date of the stock split, the split ratio, and the type of stock split.\n */\n async getStockSplits({ symbol }: { symbol: string }): Promise<APIResponse<StockSplitResponse>> {\n return this.client.get(`/historical-price-full/stock_split/${symbol}`, 'v3');\n }\n\n /**\n * Get dividend history\n * https://site.financialmodelingprep.com/developer/docs#dividends-historical-dividends\n * @param symbol - The stock symbol to get the dividend history for\n * @returns A list of historical dividend payments for publicly traded companies, including the date of the dividend payment, the ex-dividend date, and the dividend per share.\n */\n async getDividendHistory({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<StockDividendResponse>> {\n return this.client.getSingle(`/historical-price-full/stock_dividend/${symbol}`, 'v3');\n }\n}\n","import { APIResponse } from '@/types';\nimport { FMPClient } from '@/client';\nimport {\n FinancialStatementsParams,\n KeyMetrics,\n FinancialRatios,\n EnterpriseValue,\n CashflowGrowth,\n IncomeGrowth,\n BalanceSheetGrowth,\n FinancialGrowth,\n IncomeStatement,\n BalanceSheet,\n CashFlowStatement,\n EarningsSurprises,\n EarningsHistorical,\n} from '@/types/financial';\n\nexport class FinancialEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get income statement\n * https://site.financialmodelingprep.com/developer/docs#income-statements-financial-statements\n * @param symbol - The stock symbol to get the income statement for\n * @param period - The period to get the income statement for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns FMP's Income Statement API provides access to real-time income statement data for a wide range of companies, including public companies, private companies, and ETFs. This data can be used to track a company's profitability over time, to compare a company to its competitors, and to identify trends in a company's business.\n */\n async getIncomeStatement({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<IncomeStatement[]>> {\n return this.client.get(`/income-statement/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get balance sheet\n * https://site.financialmodelingprep.com/developer/docs#balance-sheet-statements-financial-statements\n * @param symbol - The stock symbol to get the balance sheet for\n * @param period - The period to get the balance sheet for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns The balance sheet is a financial statement that displays a company's total assets, liabilities, and shareholder equity over a specific timeframe (quarterly or yearly). Investors can use this statement to determine if the company can fund its operations, meet its debt obligations, and pay a dividend.\n */\n async getBalanceSheet({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<BalanceSheet[]>> {\n return this.client.get(\n `/balance-sheet-statement/${symbol}?period=${period}&limit=${limit}`,\n 'v3',\n );\n }\n\n /**\n * Get cash flow statement\n * https://site.financialmodelingprep.com/developer/docs#cashflow-statements-financial-statements\n * @param symbol - The stock symbol to get the cash flow statement for\n * @param period - The period to get the cash flow statement for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns The cash flow statement is a financial statement that highlights how cash moves through the company, including both cash inflows and outflows. This statement shows the cash flows in 3 main categories \"Operating Cash Flows\", \"Investing Cash Flows\", and \"Financing Cash Flows\", which help investors to understand if the company is making money or losing money by conducting business.\n */\n async getCashFlowStatement({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<CashFlowStatement[]>> {\n return this.client.get(`/cash-flow-statement/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get key metrics\n * https://site.financialmodelingprep.com/developer/docs#key-metrics-statement-analysis\n * @param symbol - The stock symbol to get the key metrics for\n * @param period - The period to get the key metrics for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get key financial metrics for a company, including revenue, net income, and price-to-earnings ratio (P/E ratio). Assess a company's financial performance and compare it to its competitors.\n */\n async getKeyMetrics({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<KeyMetrics[]>> {\n return this.client.get(`/key-metrics/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get financial ratios\n * https://site.financialmodelingprep.com/developer/docs#ratios-statement-analysis\n * @param symbol - The stock symbol to get the financial ratios for\n * @param period - The period to get the financial ratios for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get financial ratios for a company, such as the P/B ratio and the ROE. Assess a company's financial health and compare it to its competitors.\n */\n async getFinancialRatios({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<FinancialRatios[]>> {\n return this.client.get(`/ratios/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get enterprise value\n * https://site.financialmodelingprep.com/developer/docs#enterprise-values-statement-analysis\n * @param symbol - The stock symbol to get the enterprise value for\n * @param period - The period to get the enterprise value for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get the enterprise value of a company, which is the total value of a company, including its equity and debt. Assess a company's overall value and compare it to its peers.\n */\n async getEnterpriseValue({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<EnterpriseValue[]>> {\n return this.client.get(`/enterprise-value/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get cashflow growth\n * https://site.financialmodelingprep.com/developer/docs#cashflow-growth-statement-analysis\n * @param symbol - The stock symbol to get the cashflow growth for\n * @param period - The period to get the cashflow growth for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get the cash flow growth rate for a company. Measure how quickly a company's cash flow is growing.\n */\n async getCashflowGrowth({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<CashflowGrowth[]>> {\n return this.client.get(\n `/cash-flow-statement-growth/${symbol}?period=${period}&limit=${limit}`,\n 'v3',\n );\n }\n\n /**\n * Get income growth\n * https://site.financialmodelingprep.com/developer/docs#income-growth-statement-analysis\n * @param symbol - The stock symbol to get the income growth for\n * @param period - The period to get the income growth for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get the income growth rate for a company. Measure how quickly a company's income is growing.\n */\n async getIncomeGrowth({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<IncomeGrowth[]>> {\n return this.client.get(\n `/income-statement-growth/${symbol}?period=${period}&limit=${limit}`,\n 'v3',\n );\n }\n\n /**\n * Get balance sheet growth\n * https://site.financialmodelingprep.com/developer/docs#balance-sheet-growth-statement-analysis\n * @param symbol - The stock symbol to get the balance sheet growth for\n * @param period - The period to get the balance sheet growth for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get the balance sheet growth rate for a company. Measure how quickly a company's assets and liabilities are growing.\n */\n async getBalanceSheetGrowth({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<BalanceSheetGrowth[]>> {\n return this.client.get(\n `/balance-sheet-statement-growth/${symbol}?period=${period}&limit=${limit}`,\n 'v3',\n );\n }\n\n /**\n * Get financial growth\n * https://site.financialmodelingprep.com/developer/docs#financial-growth-statement-analysis\n * @param symbol - The stock symbol to get the financial growth for\n * @param period - The period to get the financial growth for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Financial Growth Get the financial growth rate for a company. Measure how quickly a company's overall financial performance is improving.\n */\n async getFinancialGrowth({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<FinancialGrowth[]>> {\n return this.client.get(`/financial-growth/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get earnings historical\n * https://site.financialmodelingprep.com/developer/docs#earnings-historical-earnings\n * @param symbol - The stock symbol to get the earnings historical for\n * @param limit - The number of periods to get\n * @returns A list of historical & upcoming earnings announcements for a specific company, including the date, estimated EPS, and actual EPS.\n */\n async getEarningsHistorical({\n symbol,\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<EarningsHistorical[]>> {\n return this.client.get(`/historical/earning_calendar/${symbol}?limit=${limit}`, 'v3');\n }\n\n /**\n * Get earnings surprises\n * https://site.financialmodelingprep.com/developer/docs#earnings-surprises-earnings\n * @param symbol - The stock symbol to get the earnings surprises for\n * @param limit - The number of periods to get\n * @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.\n */\n async getEarningsSurprises({\n symbol,\n }: FinancialStatementsParams): Promise<APIResponse<EarningsSurprises[]>> {\n return this.client.get(`/earnings-surprises/${symbol}`, 'v3');\n }\n}\n","// Forex endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse, HistoricalPriceResponse, QueryParams } from '@/types/common';\nimport { ForexQuote, ForexQuoteParams } from '@/types/forex';\n\nexport class ForexEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get forex quote\n * @param params - Parameters for the forex quote request\n * @returns Forex quote data\n */\n async getQuote(params: ForexQuoteParams): Promise<APIResponse<ForexQuote[]>> {\n return this.client.get('/quote', 'v3', params);\n }\n\n /**\n * Get historical forex prices\n * @param symbol - The forex symbol to get the historical prices for\n * @param from - The start date to get the historical prices for\n * @param to - The end date to get the historical prices for\n * @returns Historical forex price data\n */\n async getHistoricalPrice({\n symbol,\n from,\n to,\n }: {\n symbol: string;\n from?: string;\n to?: string;\n }): Promise<APIResponse<HistoricalPriceResponse>> {\n const params: QueryParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get(`/historical-price-full/${symbol}`, 'v3', params);\n }\n\n /**\n * Get forex rates for a specific base currency\n * @param baseCurrency - The base currency to get forex rates for\n * @returns Forex rates data\n */\n async getForexRates(baseCurrency: string = 'USD'): Promise<APIResponse<Record<string, number>>> {\n return this.client.get(`/forex/${baseCurrency}`, 'v3');\n }\n\n /**\n * Get all forex rates\n * @returns All forex rates data\n */\n async getAllForexRates(): Promise<APIResponse<Record<string, Record<string, number>>>> {\n return this.client.get('/forex', 'v3');\n }\n}\n","// Cryptocurrency endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse, DateRangeParams, HistoricalPriceResponse } from '@/types/common';\nimport { CryptoQuote } from '@/types/crypto';\n\nexport class CryptoEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get crypto quote\n * https://site.financialmodelingprep.com/developer/docs#full-quote-crypto\n * @param symbol - The crypto symbol to get the quote for\n * @returns Crypto quote data\n */\n async getQuote({ symbol }: { symbol: string }): Promise<APIResponse<CryptoQuote | null>> {\n return this.client.getSingle(`/quote/${symbol}`, 'v3');\n }\n\n /**\n * Get historical crypto prices\n * https://site.financialmodelingprep.com/developer/docs#cryptocurrency-daily-crypto\n * @param symbol - The crypto symbol to get the historical prices for\n * @param from - The start date to get the historical prices for\n * @param to - The end date to get the historical prices for\n * @returns Provides daily price data for all cryptocurrencies that are traded on exchanges around the world.\n */\n async getHistoricalPrice({\n symbol,\n from,\n to,\n }: {\n symbol: string;\n from?: string;\n to?: string;\n }): Promise<APIResponse<HistoricalPriceResponse>> {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.getSingle(`/historical-price-full/${symbol}`, 'v3', params);\n }\n}\n","// ETF endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse, SymbolParams } from '@/types/common';\nimport {\n ETFProfile,\n ETFHolding,\n ETFHoldingDates,\n ETFHolder,\n ETFStockExposure,\n ETFWeighting,\n ETFCountryWeighting,\n} from '@/types/etf';\n\nexport class ETFEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get ETF holding dates\n * https://site.financialmodelingprep.com/developer/docs#etf-holding-dates-etf-holdings\n * @param symbol - The symbol of the ETF to get the holding dates for\n * @returns The FMP ETF Holding Dates endpoint provides a list of the dates on which ETF holdings are updated. For example, an investor may want to know when an ETF's holdings are updated in order to make sure that they are still aligned with their investment goals.\n */\n async getHoldingDates({ symbol }: SymbolParams): Promise<APIResponse<ETFHoldingDates[]>> {\n const params: { symbol?: string } = {};\n if (symbol) params.symbol = symbol;\n return this.client.get('/etf-holdings/portfolio-date', 'v4', params);\n }\n\n /**\n * Get ETF holdings\n * https://site.financialmodelingprep.com/developer/docs#etf-holdings-etf-holdings\n * @param symbol - The symbol of the ETF to get the holdings for\n * @param date - The date to get the holdings for\n * @returns The FMP ETF Holdings endpoint provides a list of all the institutional investors that own shares of an ETF. For example, an investor may want to know which ETF has the highest exposure to a particular industry or sector.\n */\n async getHoldings({\n symbol,\n date,\n }: {\n symbol: string;\n date: string;\n }): Promise<APIResponse<ETFHolding[]>> {\n const params: { symbol?: string; date?: string } = {};\n if (symbol) params.symbol = symbol;\n if (date) params.date = date;\n return this.client.get('/etf-holdings', 'v4', params);\n }\n\n /**\n * Get ETF holder\n * https://site.financialmodelingprep.com/developer/docs#etf-holder-etf-holdings\n * @param symbol - The symbol of the ETF to get the holder for\n * @returns This endpoint returns all stocks held by a specific ETF. Assets, share number, and weight are among the fields returned. For example you can get components of SPY, VOO and more.\n */\n async getHolder({ symbol }: SymbolParams): Promise<APIResponse<ETFHolder[]>> {\n return this.client.get(`/etf-holder/${symbol}`, 'v3');\n }\n\n /**\n * Get ETF profile\n * https://site.financialmodelingprep.com/developer/docs#etf-information-etf-holdings\n * @param symbol - The symbol of the ETF to get the profile for\n * @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.\n */\n async getProfile({ symbol }: SymbolParams): Promise<APIResponse<ETFProfile | null>> {\n const params: { symbol?: string } = {};\n if (symbol) params.symbol = symbol;\n return this.client.getSingle('/etf-info', 'v4', params);\n }\n\n /**\n * Get ETF sector weighting\n * https://site.financialmodelingprep.com/developer/docs#etf-sector-weighting-etf-holdings\n * @param symbol - The symbol of the ETF to get the sector exposure for\n * @returns The FMP ETF Sector Weighting endpoint provides a breakdown of the percentage of an ETF's assets that are invested in each sector. For example, an investor may want to invest in an ETF that has a high exposure to the technology sector if they believe that the technology sector is poised for growth.\n */\n async getSectorWeighting({ symbol }: SymbolParams): Promise<APIResponse<ETFWeighting[]>> {\n return this.client.get(`/etf-sector-weightings/${symbol}`, 'v3');\n }\n\n /**\n * Get ETF country weighting\n * https://site.financialmodelingprep.com/developer/docs#etf-country-weighting-etf-holdings\n * @param symbol - The symbol of the ETF to get the country weighting for\n * @returns The FMP ETF Country Weighting endpoint provides a breakdown of the percentage of an ETF's assets that are invested in each country. For example, an investor may want to invest in an ETF that has a high exposure to China if they believe that the Chinese economy is poised for growth.\n */\n async getCountryWeighting({ symbol }: SymbolParams): Promise<APIResponse<ETFCountryWeighting[]>> {\n return this.client.get(`/etf-country-weightings/${symbol}`, 'v3');\n }\n\n /**\n * Get ETF Stock exposure\n * https://site.financialmodelingprep.com/developer/docs#etf-sector-exposure-etf-holdings\n * @param symbol - The symbol of the ETF to get the stock exposure for\n * @returns This endpoint returns asset exposure from all ETFs that have it in their holdings. It has properties like market value, share number or weight percentage. It can be useful for looking up stock you like to check what ETF has it on their portfolio.\n */\n async getStockExposure({ symbol }: SymbolParams): Promise<APIResponse<ETFStockExposure[]>> {\n return this.client.get(`/etf-stock-exposure/${symbol}`, 'v3');\n }\n}\n","// Mutual fund endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse } from '../types/common';\nimport {\n MutualFundQuote,\n MutualFundProfile,\n MutualFundHolding,\n MutualFundQuoteParams,\n MutualFundProfileParams,\n MutualFundHoldersParams,\n} from '../types/mutual-fund';\n\nexport class MutualFundEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get mutual fund quote\n * @param params - Parameters for the mutual fund quote request\n * @returns Mutual fund quote data\n */\n async getQuote(params: MutualFundQuoteParams): Promise<APIResponse<MutualFundQuote[]>> {\n return this.client.get('/quote', 'v3', params);\n }\n\n /**\n * Get mutual fund profile\n */\n async getProfile(params: MutualFundProfileParams): Promise<APIResponse<MutualFundProfile[]>> {\n return this.client.get('/profile', 'v3', params);\n }\n\n /**\n * Get mutual fund holdings\n */\n async getHoldings(params: MutualFundHoldersParams): Promise<APIResponse<MutualFundHolding[]>> {\n return this.client.get('/holdings', 'v3', params);\n }\n}\n","// Bond endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse, HistoricalPriceResponse } from '../types/common';\nimport { BondQuote, BondQuoteParams } from '../types/bond';\n\nexport class BondEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get bond quote\n * @param params - Parameters for the bond quote request\n * @returns Bond quote data\n */\n async getQuote(params: BondQuoteParams): Promise<APIResponse<BondQuote[]>> {\n return this.client.get('/quote', 'v3', params);\n }\n\n /**\n * Get historical bond prices\n * @param symbol - The bond symbol to get the historical prices for\n * @param from - The start date to get the historical prices for\n * @param to - The end date to get the historical prices for\n * @returns Historical bond price data\n */\n async getHistoricalPrice({\n symbol,\n from,\n to,\n }: {\n symbol: string;\n from?: string;\n to?: string;\n }): Promise<APIResponse<HistoricalPriceResponse>> {\n const params: Record<string, any> = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get(`/historical-price-full/${symbol}`, 'v3', params);\n }\n}\n","// Economic endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse } from '@/types/common';\nimport {\n TreasuryRate,\n TreasuryRateParams,\n FederalFundsRate,\n FederalFundsRateParams,\n CPI,\n CPIParams,\n GDP,\n GDPParams,\n Unemployment,\n UnemploymentParams,\n} from '@/types/economic';\n\nexport class EconomicEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get treasury rates\n */\n async getTreasuryRates(params: TreasuryRateParams = {}): Promise<APIResponse<TreasuryRate[]>> {\n return this.client.get('/treasury-rates', 'v3', params);\n }\n\n /**\n * Get federal funds rate\n */\n async getFederalFundsRate(\n params: FederalFundsRateParams = {},\n ): Promise<APIResponse<FederalFundsRate[]>> {\n return this.client.get('/federal-funds-rate', 'v3', params);\n }\n\n /**\n * Get CPI data\n */\n async getCPI(params: CPIParams = {}): Promise<APIResponse<CPI[]>> {\n return this.client.get('/economic/cpi', 'v3', params);\n }\n\n /**\n * Get GDP data\n */\n async getGDP(params: GDPParams = {}): Promise<APIResponse<GDP[]>> {\n return this.client.get('/economic/gdp', 'v3', params);\n }\n\n /**\n * Get unemployment data\n */\n async getUnemployment(params: UnemploymentParams = {}): Promise<APIResponse<Unemployment[]>> {\n return this.client.get('/economic/unemployment', 'v3', params);\n }\n}\n","// Market endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse } from '@/types/common';\nimport {\n MarketHours,\n MarketPerformance,\n MarketSectorPerformance,\n MarketIndex,\n} from '@/types/market';\n\nexport class MarketEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get market hours\n */\n async getMarketHours(): Promise<APIResponse<MarketHours>> {\n return this.client.get('/market-hours', 'v3');\n }\n\n /**\n * Get market performance\n */\n async getMarketPerformance(): Promise<APIResponse<MarketPerformance[]>> {\n return this.client.get('/market-performance', 'v3');\n }\n\n /**\n * Get top gainers\n * https://site.financialmodelingprep.com/developer/docs#market-biggest-gainers-market-overview\n * @returns The FMP Market Biggest Gainers endpoint provides a list of the stocks that have gained the most value on a given day. This information can be used by investors to identify stocks that are momentum and to potential investment opportunities.\n */\n async getGainers(): Promise<APIResponse<MarketPerformance[]>> {\n return this.client.get('/stock_market/gainers', 'v3');\n }\n\n /**\n * Get top losers\n * https://site.financialmodelingprep.com/developer/docs#market-biggest-losers-market-overview\n * @returns The FMP Market Biggest Losers endpoint provides a list of the stocks that have lost the most value on a given day. This information can be used by investors to identify stocks that are underperforming and to potential trading opportunities.\n */\n async getLosers(): Promise<APIResponse<MarketPerformance[]>> {\n return this.client.get('/stock_market/losers', 'v3');\n }\n\n /**\n * Get most active stocks\n */\n async getMostActive(): Promise<APIResponse<MarketPerformance[]>> {\n return this.client.get('/stock_market/actives', 'v3');\n }\n\n /**\n * Get sector performance\n * https://site.financialmodelingprep.com/developer/docs#sector-performance-market-overview\n * @returns The FMP Sector Performance endpoint provides the performance of each sector of the stock market over a specified period of time. This information can be used by investors to identify sectors that are outperforming or underperforming the market.\n */\n async getSectorPerformance(): Promise<APIResponse<MarketSectorPerformance[]>> {\n return this.client.get('/sector-performance', 'v3');\n }\n\n /**\n * Get market indices\n * https://site.financialmodelingprep.com/developer/docs#market-index-market-overview\n * @returns The FMP Market Index endpoint provides a list of all the major stock market indices, such as the S&P 500, the Dow Jones Industrial Average, and the Nasdaq Composite Index. This information can be used by investors to track the performance of the overall stock market and to identify sectors and industries that are outperforming or underperforming the market.\n */\n async getMarketIndex(): Promise<APIResponse<MarketIndex[]>> {\n return this.client.get('/quotes/index', 'v3');\n }\n}\n","import { FMPClient } from '@/client';\nimport { APIResponse } from '@/types';\nimport { StockList, ETFList, CryptoList, ForexList, AvailableIndexesList } from '@/types/list';\n\nexport class ListEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get stock list\n * https://site.financialmodelingprep.com/developer/docs#symbol-list-stock-list\n * @returns The stock list\n */\n async getStockList(): Promise<APIResponse<StockList[]>> {\n return this.client.get('/stock/list');\n }\n\n /**\n * Get ETF list\n * https://site.financialmodelingprep.com/developer/docs#exchange-traded-fund-search-stock-list\n * @returns The ETF list\n */\n async getETFList(): Promise<APIResponse<ETFList[]>> {\n return this.client.get('/etf/list');\n }\n\n /**\n * Get crypto list\n * https://site.financialmodelingprep.com/developer/docs#cryptocurrencies-list-crypto\n * @returns The crypto list\n */\n async getCryptoList(): Promise<APIResponse<CryptoList[]>> {\n return this.client.get('/symbol/available-cryptocurrencies');\n }\n\n /**\n * Get forex list\n * https://site.financialmodelingprep.com/developer/docs#forex-list-forex\n * @returns The forex list\n */\n async getForexList(): Promise<APIResponse<ForexList[]>> {\n return this.client.get('/symbol/available-forex-currency-pairs');\n }\n\n /**\n * Get available indexes list\n * https://site.financialmodelingprep.com/developer/docs#available-indexes\n * @returns The available indexes list\n */\n async getAvailableIndexes(): Promise<APIResponse<AvailableIndexesList[]>> {\n return this.client.get('/symbol/available-indexes');\n }\n}\n","import { APIResponse, DateRangeParams } from '@/types';\nimport { FMPClient } from '@/client';\nimport {\n EarningsCalendar,\n DividendsCalendar,\n EconomicsCalendar,\n IPOCalendar,\n SplitsCalendar,\n} from '@/types/calendar';\n\nexport class CalendarEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get earnings calendar\n * https://site.financialmodelingprep.com/developer/docs#earnings-calendar-earnings\n * @param from - The start date to get the earnings calendar for\n * @param to - The end date to get the earnings calendar for\n * @returns The earnings calendar\n */\n async getEarningsCalendar({ from, to }: DateRangeParams = {}): Promise<\n APIResponse<EarningsCalendar[]>\n > {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/earning_calendar', 'v3', params);\n }\n\n /**\n * Get dividends calendar\n * https://site.financialmodelingprep.com/developer/docs#dividends-calendar-dividends\n * @param from - The start date to get the dividends calendar for\n * @param to - The end date to get the dividends calendar for\n * @returns The dividends calendar\n */\n async getDividendsCalendar({ from, to }: DateRangeParams = {}): Promise<\n APIResponse<DividendsCalendar[]>\n > {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/stock_dividend_calendar', 'v3', params);\n }\n\n /**\n * Get economics calendar\n * https://site.financialmodelingprep.com/developer/docs#economics-calendar-economics-data\n * @param from - The start date to get the economics calendar for\n * @param to - The end date to get the economics calendar for\n * @returns The economics calendar\n */\n async getEconomicsCalendar({ from, to }: DateRangeParams = {}): Promise<\n APIResponse<EconomicsCalendar[]>\n > {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/economic_calendar', 'v3', params);\n }\n\n /**\n * Get IPO calendar\n * https://site.financialmodelingprep.com/developer/docs#ipo-calender-by-ipo-calendar\n * @param from - The start date to get the IPO calendar for\n * @param to - The end date to get the IPO calendar for\n * @returns The IPO calendar\n */\n async getIPOCalendar({ from, to }: DateRangeParams = {}): Promise<APIResponse<IPOCalendar[]>> {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/ipo_calendar', 'v3', params);\n }\n\n /**\n * Get stock splits calendar\n * https://site.financialmodelingprep.com/developer/docs#splits-calendar-splits\n * @param from - The start date to get the stock splits calendar for\n * @param to - The end date to get the stock splits calendar for\n * @returns The stock splits calendar\n */\n async getSplitsCalendar({ from, to }: DateRangeParams = {}): Promise<\n APIResponse<SplitsCalendar[]>\n > {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/stock_split_calendar', 'v3', params);\n }\n}\n","import { APIResponse } from '@/types';\nimport { FMPClient } from '@/client';\nimport {\n CompanyNotes,\n CompanyProfile,\n EarningsCallTranscript,\n ExecutiveCompensation,\n HistoricalEmployeeCount,\n HistoricalSharesFloat,\n SharesFloat,\n} from '@/types/company';\n\nexport class CompanyEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get company profile\n * https://site.financialmodelingprep.com/developer/docs#company-profile-company-information\n * @param symbol - The stock symbol to get the profile for\n * @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.\n */\n async getCompanyProfile({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<CompanyProfile | null>> {\n return this.client.getSingle(`/profile/${symbol}`, 'v3');\n }\n\n /**\n * Get executive compensation\n * https://site.financialmodelingprep.com/developer/docs#executive-compensation-company-information\n * @param symbol - The stock symbol to get the executive compensation for\n * @returns Understand how a company compensates its executives with our Executive Compensation endpoint. This endpoint provides information such as salary, bonus, and stock options for each executive.\n */\n async getExecutiveCompensation({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<ExecutiveCompensation[] | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.get(`/governance/executive_compensation`, 'v4', params);\n }\n\n /**\n * Get company notes\n * https://site.financialmodelingprep.com/developer/docs#company-notes-company-information\n * @param symbol - The stock symbol to get the notes for\n * @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.\n */\n async getCompanyNotes({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<CompanyNotes[] | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.get(`/company-notes`, 'v4', params);\n }\n\n /**\n * Get historical employee count\n * https://site.financialmodelingprep.com/developer/docs#historical-employee-company-information\n * @param symbol - The stock symbol to get the historical employee count for\n * @returns Track a company's employee count over time with our Historical Employee Count endpoint. This endpoint provides information about the number of employees a company has had each year.\n */\n async getHistoricalEmployeeCount({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<HistoricalEmployeeCount[] | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.get(`/historical/employee_count`, 'v4', params);\n }\n\n /**\n * Get shares float\n * https://site.financialmodelingprep.com/developer/docs#company-share-float-share-float\n * @param symbol - The stock symbol to get the shares float for\n * @returns The FMP Company Share Float endpoint provides the total number of shares that are publicly traded for a given company. This is also known as the company's float. The float is calculated by subtracting the number of restricted shares from the total number of outstanding shares.\n */\n async getSharesFloat({ symbol }: { symbol: string }): Promise<APIResponse<SharesFloat | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.getSingle(`/shares_float`, 'v4', params);\n }\n\n /**\n * Get historical shares float\n * https://site.financialmodelingprep.com/developer/docs#company-historical-share-float\n * @param symbol - The stock symbol to get the historical shares float for\n * @returns The FMP Historical Share Float endpoint provides historical data on the number of shares that are publicly traded for a given company. This is also known as the company's float. The float is calculated by subtracting the number of restricted shares from the total number of outstanding shares.\n */\n async getHistoricalSharesFloat({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<HistoricalSharesFloat[] | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.get(`/historical/shares_float`, 'v4', params);\n }\n\n /**\n * Get earnings call transcript\n * https://site.financialmodelingprep.com/developer/docs#earnings-transcript-earnings-transcripts\n * @param symbol - The stock symbol to get the earnings call transcript for\n * @param year - The year of the earnings call\n * @param quarter - The quarter of the earnings call\n * @returns The FMP Earnings Call Transcript endpoint provides the transcript of a company's earnings call.\n */\n async getEarningsCallTranscript({\n symbol,\n year,\n quarter,\n }: {\n symbol: string;\n year: number;\n quarter: number;\n }): Promise<APIResponse<EarningsCallTranscript[] | null>> {\n const params: { year: number; quarter: number } = { year, quarter };\n return this.client.getSingle(`/earning_call_transcript/${symbol}`, 'v3', params);\n }\n}\n","// Main FMP API client that combines all endpoints\n\nimport { FMPClient } from './client';\nimport { FMPConfig } from './types/common';\nimport { validateApiKey } from './utils/validation';\nimport { StockEndpoints } from './endpoints/stock';\nimport { FinancialEndpoints } from './endpoints/financial';\nimport { ForexEndpoints } from './endpoints/forex';\nimport { CryptoEndpoints } from './endpoints/crypto';\nimport { ETFEndpoints } from './endpoints/etf';\nimport { MutualFundEndpoints } from './endpoints/mutual-fund';\nimport { BondEndpoints } from './endpoints/bond';\nimport { EconomicEndpoints } from './endpoints/economic';\nimport { MarketEndpoints } from './endpoints/market';\nimport { ListEndpoints } from './endpoints/list';\nimport { CalendarEndpoints } from './endpoints/calendar';\nimport { CompanyEndpoints } from './endpoints/company';\n\n/**\n * Main FMP API client that provides access to all endpoints\n *\n * @example\n * ```typescript\n * import { FMP } from 'fmp-node-api';\n *\n * const fmp = new FMP({ apiKey: 'your-api-key' });\n *\n * // Get stock quote\n * const quote = await fmp.stock.getQuote({ symbol: 'AAPL' });\n *\n * // Get financial statements\n * const incomeStatement = await fmp.financial.getIncomeStatement({\n * symbol: 'AAPL',\n * period: 'annual'\n * });\n *\n * // Get forex data\n * const forexQuote = await fmp.forex.getQuote({ symbol: 'EURUSD' });\n * ```\n */\nexport class FMP {\n public readonly stock: StockEndpoints;\n public readonly financial: FinancialEndpoints;\n public readonly forex: ForexEndpoints;\n public readonly crypto: CryptoEndpoints;\n public readonly etf: ETFEndpoints;\n public readonly mutualFund: MutualFundEndpoints;\n public readonly bond: BondEndpoints;\n public readonly economic: EconomicEndpoints;\n public readonly market: MarketEndpoints;\n public readonly list: ListEndpoints;\n public readonly calendar: CalendarEndpoints;\n public readonly company: CompanyEndpoints;\n\n constructor(config: FMPConfig) {\n // Validate API key at construction time\n validateApiKey(config.apiKey);\n\n const client = new FMPClient(config);\n\n this.stock = new StockEndpoints(client);\n this.financial = new FinancialEndpoints(client);\n this.crypto = new CryptoEndpoints(client);\n this.etf = new ETFEndpoints(client);\n this.market = new MarketEndpoints(client);\n this.list = new ListEndpoints(client);\n this.calendar = new CalendarEndpoints(client);\n this.company = new CompanyEndpoints(client);\n\n this.forex = new ForexEndpoints(client);\n this.economic = new EconomicEndpoints(client);\n this.bond = new BondEndpoints(client);\n this.mutualFund = new MutualFundEndpoints(client);\n }\n\n /**\n * Get the underlying client instance for advanced usage\n */\n getClient(): FMPClient {\n return this.stock['client'];\n }\n}\n","// Common types used across all FMP API endpoints\n\n// Base API response wrapper - more type-safe without any default\nexport interface APIResponse<T = unknown> {\n success: boolean;\n data?: T;\n error?: string;\n status?: number;\n}\n\n// More specific response types for better type safety\nexport interface SuccessResponse<T> extends APIResponse<T> {\n success: true;\n data: T;\n status: number;\n}\n\nexport interface ErrorResponse extends APIResponse<never> {\n success: false;\n error: string;\n status: number;\n}\n\n// FMP API configuration\nexport interface FMPConfig {\n apiKey: string;\n baseURL?: string;\n timeout?: number;\n}\n\n// Common parameter interfaces\nexport interface SymbolParams {\n symbol: string;\n}\n\nexport interface DateRangeParams {\n from?: string;\n to?: string;\n}\n\nexport interface PaginationParams {\n limit?: number;\n page?: number;\n}\n\nexport interface PeriodParams {\n period?: 'annual' | 'quarter';\n}\n\n// Common historical price data structure\nexport interface HistoricalPriceData {\n date: string;\n open: number;\n high: number;\n low: number;\n close: number;\n adjClose: number;\n volume: number;\n unadjustedVolume: number;\n change: number;\n changePercent: number;\n vwap: number;\n label: string;\n changeOverTime: number;\n}\n\n// Historical price response wrapper\nexport interface HistoricalPriceResponse {\n symbol: string;\n historical: HistoricalPriceData[];\n}\n\n// Type-safe query parameters\nexport interface QueryParams {\n [key: string]: string | number | boolean | undefined;\n}\n\n// Common financial data types\nexport interface Quote {\n symbol: string;\n price: number;\n change: number;\n changePercent: number;\n dayLow: number;\n dayHigh: number;\n yearLow: number;\n yearHigh: number;\n marketCap: number;\n priceAvg50: number;\n priceAvg200: number;\n volume: number;\n avgVolume: number;\n exchange: string;\n open: number;\n previousClose: number;\n eps: number;\n pe: number;\n earningsAnnouncement: string;\n sharesOutstanding: number;\n timestamp: number;\n}\n\n// Common enums\nexport enum Period {\n ANNUAL = 'annual',\n QUARTER = 'quarter',\n}\n\nexport enum Exchange {\n NYSE = 'NYSE',\n NASDAQ = 'NASDAQ',\n AMEX = 'AMEX',\n TSX = 'TSX',\n LSE = 'LSE',\n ASX = 'ASX',\n NSE = 'NSE',\n BSE = 'BSE',\n}\n","// Formatting utilities for FMP API\n\n/**\n * Format currency value\n */\nexport function formatCurrency(value: number, currency: string = 'USD'): string {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: currency,\n }).format(value);\n}\n\n/**\n * Format percentage value\n */\nexport function formatPercentage(value: number, decimals: number = 2): string {\n return `${value.toFixed(decimals)}%`;\n}\n\n/**\n * Format large numbers with K, M, B suffixes\n */\nexport function formatLargeNumber(value: number): string {\n if (value >= 1e12) {\n return `${(value / 1e12).toFixed(2)}T`;\n } else if (value >= 1e9) {\n return `${(value / 1e9).toFixed(2)}B`;\n } else if (value >= 1e6) {\n return `${(value / 1e6).toFixed(2)}M`;\n } else if (value >= 1e3) {\n return `${(value / 1e3).toFixed(2)}K`;\n }\n return value.toString();\n}\n\n/**\n * Format date to YYYY-MM-DD\n */\nexport function formatDate(date: Date | string): string {\n const d = typeof date === 'string' ? new Date(date) : date;\n return d.toISOString().split('T')[0];\n}\n\n/**\n * Format date to readable format\n */\nexport function formatReadableDate(date: Date | string): string {\n const d = typeof date === 'string' ? new Date(date) : date;\n return d.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n}\n\n/**\n * Format timestamp to readable format\n */\nexport function formatTimestamp(timestamp: number): string {\n const date = new Date(timestamp * 1000);\n return date.toLocaleString('en-US');\n}\n\n/**\n * Format number with specified decimal places\n */\nexport function formatNumber(value: number, decimals: number = 2): string {\n return value.toFixed(decimals);\n}\n\n/**\n * Format volume with appropriate units\n */\nexport function formatVolume(volume: number): string {\n if (volume >= 1e9) {\n return `${(volume / 1e9).toFixed(2)}B`;\n } else if (volume >= 1e6) {\n return `${(volume / 1e6).toFixed(2)}M`;\n } else if (volume >= 1e3) {\n return `${(volume / 1e3).toFixed(2)}K`;\n }\n return volume.toString();\n}\n","// Constants for FMP API\n\n// Default configuration\nexport const DEFAULT_TIMEOUT = 10000;\nexport const DEFAULT_LIMIT = 100;\nexport const MAX_LIMIT = 1000;\n\n// Common periods\nexport const PERIODS = {\n ANNUAL: 'annual',\n QUARTER: 'quarter',\n} as const;\n\n// Common exchanges\nexport const EXCHANGES = {\n NYSE: 'NYSE',\n NASDAQ: 'NASDAQ',\n AMEX: 'AMEX',\n TSX: 'TSX',\n LSE: 'LSE',\n ASX: 'ASX',\n NSE: 'NSE',\n BSE: 'BSE',\n} as const;\n\n// Common sectors\nexport const SECTORS = {\n TECHNOLOGY: 'Technology',\n HEALTHCARE: 'Healthcare',\n FINANCIAL: 'Financial',\n CONSUMER_DISCRETIONARY: 'Consumer Discretionary',\n CONSUMER_STAPLES: 'Consumer Staples',\n INDUSTRIALS: 'Industrials',\n ENERGY: 'Energy',\n MATERIALS: 'Materials',\n UTILITIES: 'Utilities',\n REAL_ESTATE: 'Real Estate',\n COMMUNICATION_SERVICES: 'Communication Services',\n} as const;\n\n// Common countries\nexport const COUNTRIES = {\n US: 'US',\n CA: 'CA',\n GB: 'GB',\n AU: 'AU',\n IN: 'IN',\n DE: 'DE',\n FR: 'FR',\n JP: 'JP',\n CN: 'CN',\n BR: 'BR',\n} as const;\n\n// Error messages\nexport const ERROR_MESSAGES = {\n API_KEY_REQUIRED: 'API key is required',\n SYMBOL_REQUIRED: 'Symbol is required',\n INVALID_SYMBOL: 'Invalid symbol format',\n INVALID_DATE: 'Invalid date format. Use YYYY-MM-DD',\n INVALID_PERIOD: 'Period must be either \"annual\" or \"quarter\"',\n INVALID_LIMIT: 'Limit must be between 1 and 1000',\n INVALID_PAGE: 'Page must be a non-negative number',\n REQUEST_FAILED: 'Request failed',\n RATE_LIMIT_EXCEEDED: 'Rate limit exceeded',\n UNAUTHORIZED: 'Unauthorized - Invalid API key',\n NOT_FOUND: 'Resource not found',\n} as const;\n\n// HTTP status codes\nexport const HTTP_STATUS = {\n OK: 200,\n CREATED: 201,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TOO_MANY_REQUESTS: 429,\n INTERNAL_SERVER_ERROR: 500,\n} as const;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/client.ts","../src/shared.ts","../src/utils/validation.ts","../src/endpoints/stock.ts","../src/endpoints/financial.ts","../src/endpoints/forex.ts","../src/endpoints/crypto.ts","../src/endpoints/etf.ts","../src/endpoints/mutual-fund.ts","../src/endpoints/bond.ts","../src/endpoints/economic.ts","../src/endpoints/market.ts","../src/endpoints/list.ts","../src/endpoints/calendar.ts","../src/endpoints/company.ts","../src/endpoints/quote.ts","../src/fmp.ts","../src/types/common.ts","../src/utils/formatting.ts","../src/utils/constants.ts"],"names":["axios","Period","Exchange"],"mappings":";;;;;;;;;AAQA,SAAS,mBAAsB,IAAA,EAAY;AACzC,EAAA,IAAI,MAAM,OAAA,CAAQ,IAAI,CAAA,IAAK,IAAA,CAAK,WAAW,CAAA,EAAG;AAC5C,IAAA,OAAO,KAAK,CAAC,CAAA;AAAA;AAEf,EAAA,OAAO,IAAA;AACT;AAEO,IAAM,YAAN,MAAgB;AAAA,EAMrB,YAAY,MAAA,EAAmB;AAC7B,IAAA,IAAA,CAAK,SAAS,MAAA,CAAO,MAAA;AAGrB,IAAA,IAAA,CAAK,QAAA,GAAW,IAAA,CAAK,YAAA,CAAa,0CAAA,EAA4C,OAAO,OAAO,CAAA;AAC5F,IAAA,IAAA,CAAK,QAAA,GAAW,IAAA,CAAK,YAAA,CAAa,0CAAA,EAA4C,OAAO,OAAO,CAAA;AAC5F,IAAA,IAAA,CAAK,eAAe,IAAA,CAAK,YAAA;AAAA,MACvB,8CAAA;AAAA,MACA,MAAA,CAAO;AAAA,KACT;AAAA;AACF,EAEQ,YAAA,CAAa,SAAiB,OAAA,EAAiC;AACrE,IAAA,MAAM,MAAA,GAASA,uBAAM,MAAA,CAAO;AAAA,MAC1B,OAAA;AAAA,MACA,SAAS,OAAA,IAAW,GAAA;AAAA,MACpB,OAAA,EAAS,EAAE,cAA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;AAAA,EAChB,aAAA,EAAe,kCAAA;AAAA,EACf,YAAA,EAAc,oCAAA;AAAA,EACd,cAAA,EAAgB,gBAAA;AAAA,EAChB,mBAAA,EAAqB,qBAAA;AAAA,EACrB,YAAA,EAAc,gCAAA;AAAA,EACd,SAAA,EAAW;AACb;AAGO,IAAM,WAAA,GAAc;AAAA,EACzB,EAAA,EAAI,GAAA;AAAA,EACJ,OAAA,EAAS,GAAA;AAAA,EACT,WAAA,EAAa,GAAA;AAAA,EACb,YAAA,EAAc,GAAA;AAAA,EACd,SAAA,EAAW,GAAA;AAAA,EACX,SAAA,EAAW,GAAA;AAAA,EACX,iBAAA,EAAmB,GAAA;AAAA,EACnB,qBAAA,EAAuB;AACzB","file":"index.js","sourcesContent":["import axios, { AxiosInstance } from 'axios';\nimport { FMPConfig, APIResponse } from './types';\n\n/**\n * Utility function to unwrap single objects from arrays\n * Only unwraps if the response is an array with exactly one item\n * Otherwise, returns the original response\n */\nfunction unwrapSingleObject<T>(data: T): T {\n if (Array.isArray(data) && data.length === 1) {\n return data[0];\n }\n return data;\n}\n\nexport class FMPClient {\n private v3Client: AxiosInstance;\n private v4Client: AxiosInstance;\n private stableClient: AxiosInstance;\n private apiKey: string;\n\n constructor(config: FMPConfig) {\n this.apiKey = config.apiKey;\n\n // Create separate clients for each version\n this.v3Client = this.createClient('https://financialmodelingprep.com/api/v3', config.timeout);\n this.v4Client = this.createClient('https://financialmodelingprep.com/api/v4', config.timeout);\n this.stableClient = this.createClient(\n 'https://financialmodelingprep.com/api/stable',\n config.timeout,\n );\n }\n\n private createClient(baseURL: string, timeout?: number): AxiosInstance {\n const client = axios.create({\n baseURL,\n timeout: timeout || 10000,\n headers: { 'Content-Type': 'application/json' },\n });\n\n client.interceptors.request.use(config => {\n config.params = { ...config.params, apikey: this.apiKey };\n return config;\n });\n\n return client;\n }\n\n // Standard get method - returns raw API response\n async get<T>(\n endpoint: string,\n version: 'v3' | 'v4' | 'stable' = 'v3',\n params?: Record<string, any>,\n ): Promise<APIResponse<T>> {\n const client = this.getClientForVersion(version);\n\n try {\n const response = await client.get(endpoint, { params });\n return {\n success: true,\n data: response.data,\n status: response.status,\n };\n } catch (error: any) {\n return {\n success: false,\n error: error.message || 'Unknown error occurred',\n status: error.response?.status || 500,\n };\n }\n }\n\n // Get method for single-object endpoints - unwraps single-item arrays\n async getSingle<T>(\n endpoint: string,\n version: 'v3' | 'v4' | 'stable' = 'v3',\n params?: Record<string, any>,\n ): Promise<APIResponse<T>> {\n const client = this.getClientForVersion(version);\n\n try {\n const response = await client.get(endpoint, { params });\n return {\n success: true,\n data: unwrapSingleObject(response.data),\n status: response.status,\n };\n } catch (error: any) {\n return {\n success: false,\n error: error.message || 'Unknown error occurred',\n status: error.response?.status || 500,\n };\n }\n }\n\n private getClientForVersion(version: 'v3' | 'v4' | 'stable'): AxiosInstance {\n switch (version) {\n case 'v3':\n return this.v3Client;\n case 'v4':\n return this.v4Client;\n case 'stable':\n return this.stableClient;\n default:\n return this.v3Client; // Default to v3\n }\n }\n}\n","// Shared types and utilities for FMP API wrapper\n\n// Common error types\nexport class FMPError extends Error {\n constructor(\n message: string,\n public status?: number,\n public code?: string,\n ) {\n super(message);\n this.name = 'FMPError';\n }\n}\n","// Validation utilities for FMP API\n\nimport { FMPError } from '../shared';\n\n/**\n * Validate API key\n */\nexport function validateApiKey(apiKey: string): void {\n if (!apiKey || typeof apiKey !== 'string' || apiKey.trim().length === 0) {\n throw new FMPError('API key is required and must be a non-empty string');\n }\n}\n\n/**\n * Validate stock symbol\n */\nexport function validateSymbol(symbol: string): void {\n if (!symbol || typeof symbol !== 'string' || symbol.trim().length === 0) {\n throw new FMPError('Symbol is required and must be a non-empty string');\n }\n\n // Basic symbol validation (alphanumeric and common symbols)\n const symbolRegex = /^[A-Z0-9.-]+$/;\n if (!symbolRegex.test(symbol.toUpperCase())) {\n throw new FMPError(\n 'Invalid symbol format. Symbols should contain only letters, numbers, dots, and hyphens',\n );\n }\n}\n\n/**\n * Validate date format (YYYY-MM-DD)\n */\nexport function validateDate(date: string): void {\n if (!date || typeof date !== 'string') {\n throw new FMPError('Date is required and must be a string');\n }\n\n const dateRegex = /^\\d{4}-\\d{2}-\\d{2}$/;\n if (!dateRegex.test(date)) {\n throw new FMPError('Invalid date format. Use YYYY-MM-DD format');\n }\n\n const parsedDate = new Date(date);\n if (isNaN(parsedDate.getTime())) {\n throw new FMPError('Invalid date');\n }\n}\n\n/**\n * Validate period parameter\n */\nexport function validatePeriod(period: string): void {\n if (period && !['annual', 'quarter'].includes(period)) {\n throw new FMPError('Period must be either \"annual\" or \"quarter\"');\n }\n}\n\n/**\n * Validate limit parameter\n */\nexport function validateLimit(limit: number): void {\n if (limit !== undefined && (typeof limit !== 'number' || limit < 1 || limit > 1000)) {\n throw new FMPError('Limit must be a number between 1 and 1000');\n }\n}\n\n/**\n * Validate page parameter\n */\nexport function validatePage(page: number): void {\n if (page !== undefined && (typeof page !== 'number' || page < 0)) {\n throw new FMPError('Page must be a non-negative number');\n }\n}\n","import { FMPClient } from '@/client';\nimport { APIResponse, DateRangeParams } from '@/types/common';\nimport { HistoricalPriceResponse } from '@/types/quote';\nimport { MarketCap, StockSplitResponse, StockQuote, StockDividendResponse } from '@/types/stock';\n\nexport class StockEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get real-time stock quote\n * @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.\n * @param symbol - The stock symbol to get the quote for\n * @returns This endpoint gives you the latest bid and ask prices for a stock, as well as the volume and last trade price in real time.\n */\n async getQuote({ symbol }: { symbol: string }): Promise<APIResponse<StockQuote | null>> {\n console.warn(\n '⚠️ StockEndpoints.getQuote() is deprecated. Use fmp.quote.getQuote() instead. This method will be removed in version 0.1.0.',\n );\n return this.client.getSingle(`/quote/${symbol}`, 'v3');\n }\n\n /**\n * Get historical stock prices\n * @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.\n * @param symbol - The stock symbol to get the historical prices for\n * @param from - The start date to get the historical prices for\n * @param to - The end date to get the historical prices for\n * @returns The FMP Daily Chart endpoint provides daily stock data for a specified company, including opening, high, low, and closing prices, with a default limit of 5 years of historical data. To access data beyond this limit, use the from and to parameters for custom date ranges, each with a 5-year limit\n */\n async getHistoricalPrice({\n symbol,\n from,\n to,\n }: {\n symbol: string;\n from?: string;\n to?: string;\n }): Promise<APIResponse<HistoricalPriceResponse>> {\n console.warn(\n '⚠️ StockEndpoints.getHistoricalPrice() is deprecated. Use fmp.quote.getHistoricalPrice() instead. This method will be removed in version 0.1.0.',\n );\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.getSingle(`/historical-price-full/${symbol}`, 'v3', params);\n }\n\n /**\n * Get market cap\n * https://site.financialmodelingprep.com/developer/docs#market-cap-company-information\n * @param symbol - The stock symbol to get the market cap for\n * @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.\n */\n async getMarketCap({ symbol }: { symbol: string }): Promise<APIResponse<MarketCap | null>> {\n return this.client.getSingle(`/market-capitalization/${symbol}`, 'v3');\n }\n\n /**\n * Get stock splits\n * https://site.financialmodelingprep.com/developer/docs#splits-historical-splits\n * @param symbol - The stock symbol to get the splits for\n * @returns A list of historical stock splits for publicly traded companies, including the date of the stock split, the split ratio, and the type of stock split.\n */\n async getStockSplits({ symbol }: { symbol: string }): Promise<APIResponse<StockSplitResponse>> {\n return this.client.get(`/historical-price-full/stock_split/${symbol}`, 'v3');\n }\n\n /**\n * Get dividend history\n * https://site.financialmodelingprep.com/developer/docs#dividends-historical-dividends\n * @param symbol - The stock symbol to get the dividend history for\n * @returns A list of historical dividend payments for publicly traded companies, including the date of the dividend payment, the ex-dividend date, and the dividend per share.\n */\n async getDividendHistory({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<StockDividendResponse>> {\n return this.client.getSingle(`/historical-price-full/stock_dividend/${symbol}`, 'v3');\n }\n}\n","import { APIResponse } from '@/types';\nimport { FMPClient } from '@/client';\nimport {\n FinancialStatementsParams,\n KeyMetrics,\n FinancialRatios,\n EnterpriseValue,\n CashflowGrowth,\n IncomeGrowth,\n BalanceSheetGrowth,\n FinancialGrowth,\n IncomeStatement,\n BalanceSheet,\n CashFlowStatement,\n EarningsSurprises,\n EarningsHistorical,\n} from '@/types/financial';\n\nexport class FinancialEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get income statement\n * https://site.financialmodelingprep.com/developer/docs#income-statements-financial-statements\n * @param symbol - The stock symbol to get the income statement for\n * @param period - The period to get the income statement for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns FMP's Income Statement API provides access to real-time income statement data for a wide range of companies, including public companies, private companies, and ETFs. This data can be used to track a company's profitability over time, to compare a company to its competitors, and to identify trends in a company's business.\n */\n async getIncomeStatement({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<IncomeStatement[]>> {\n return this.client.get(`/income-statement/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get balance sheet\n * https://site.financialmodelingprep.com/developer/docs#balance-sheet-statements-financial-statements\n * @param symbol - The stock symbol to get the balance sheet for\n * @param period - The period to get the balance sheet for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns The balance sheet is a financial statement that displays a company's total assets, liabilities, and shareholder equity over a specific timeframe (quarterly or yearly). Investors can use this statement to determine if the company can fund its operations, meet its debt obligations, and pay a dividend.\n */\n async getBalanceSheet({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<BalanceSheet[]>> {\n return this.client.get(\n `/balance-sheet-statement/${symbol}?period=${period}&limit=${limit}`,\n 'v3',\n );\n }\n\n /**\n * Get cash flow statement\n * https://site.financialmodelingprep.com/developer/docs#cashflow-statements-financial-statements\n * @param symbol - The stock symbol to get the cash flow statement for\n * @param period - The period to get the cash flow statement for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns The cash flow statement is a financial statement that highlights how cash moves through the company, including both cash inflows and outflows. This statement shows the cash flows in 3 main categories \"Operating Cash Flows\", \"Investing Cash Flows\", and \"Financing Cash Flows\", which help investors to understand if the company is making money or losing money by conducting business.\n */\n async getCashFlowStatement({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<CashFlowStatement[]>> {\n return this.client.get(`/cash-flow-statement/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get key metrics\n * https://site.financialmodelingprep.com/developer/docs#key-metrics-statement-analysis\n * @param symbol - The stock symbol to get the key metrics for\n * @param period - The period to get the key metrics for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get key financial metrics for a company, including revenue, net income, and price-to-earnings ratio (P/E ratio). Assess a company's financial performance and compare it to its competitors.\n */\n async getKeyMetrics({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<KeyMetrics[]>> {\n return this.client.get(`/key-metrics/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get financial ratios\n * https://site.financialmodelingprep.com/developer/docs#ratios-statement-analysis\n * @param symbol - The stock symbol to get the financial ratios for\n * @param period - The period to get the financial ratios for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get financial ratios for a company, such as the P/B ratio and the ROE. Assess a company's financial health and compare it to its competitors.\n */\n async getFinancialRatios({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<FinancialRatios[]>> {\n return this.client.get(`/ratios/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get enterprise value\n * https://site.financialmodelingprep.com/developer/docs#enterprise-values-statement-analysis\n * @param symbol - The stock symbol to get the enterprise value for\n * @param period - The period to get the enterprise value for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get the enterprise value of a company, which is the total value of a company, including its equity and debt. Assess a company's overall value and compare it to its peers.\n */\n async getEnterpriseValue({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<EnterpriseValue[]>> {\n return this.client.get(`/enterprise-value/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get cashflow growth\n * https://site.financialmodelingprep.com/developer/docs#cashflow-growth-statement-analysis\n * @param symbol - The stock symbol to get the cashflow growth for\n * @param period - The period to get the cashflow growth for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get the cash flow growth rate for a company. Measure how quickly a company's cash flow is growing.\n */\n async getCashflowGrowth({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<CashflowGrowth[]>> {\n return this.client.get(\n `/cash-flow-statement-growth/${symbol}?period=${period}&limit=${limit}`,\n 'v3',\n );\n }\n\n /**\n * Get income growth\n * https://site.financialmodelingprep.com/developer/docs#income-growth-statement-analysis\n * @param symbol - The stock symbol to get the income growth for\n * @param period - The period to get the income growth for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get the income growth rate for a company. Measure how quickly a company's income is growing.\n */\n async getIncomeGrowth({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<IncomeGrowth[]>> {\n return this.client.get(\n `/income-statement-growth/${symbol}?period=${period}&limit=${limit}`,\n 'v3',\n );\n }\n\n /**\n * Get balance sheet growth\n * https://site.financialmodelingprep.com/developer/docs#balance-sheet-growth-statement-analysis\n * @param symbol - The stock symbol to get the balance sheet growth for\n * @param period - The period to get the balance sheet growth for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Get the balance sheet growth rate for a company. Measure how quickly a company's assets and liabilities are growing.\n */\n async getBalanceSheetGrowth({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<BalanceSheetGrowth[]>> {\n return this.client.get(\n `/balance-sheet-statement-growth/${symbol}?period=${period}&limit=${limit}`,\n 'v3',\n );\n }\n\n /**\n * Get financial growth\n * https://site.financialmodelingprep.com/developer/docs#financial-growth-statement-analysis\n * @param symbol - The stock symbol to get the financial growth for\n * @param period - The period to get the financial growth for (annual or quarter)\n * @param limit - The number of periods to get\n * @returns Financial Growth Get the financial growth rate for a company. Measure how quickly a company's overall financial performance is improving.\n */\n async getFinancialGrowth({\n symbol,\n period = 'annual',\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<FinancialGrowth[]>> {\n return this.client.get(`/financial-growth/${symbol}?period=${period}&limit=${limit}`, 'v3');\n }\n\n /**\n * Get earnings historical\n * https://site.financialmodelingprep.com/developer/docs#earnings-historical-earnings\n * @param symbol - The stock symbol to get the earnings historical for\n * @param limit - The number of periods to get\n * @returns A list of historical & upcoming earnings announcements for a specific company, including the date, estimated EPS, and actual EPS.\n */\n async getEarningsHistorical({\n symbol,\n limit = 5,\n }: FinancialStatementsParams): Promise<APIResponse<EarningsHistorical[]>> {\n return this.client.get(`/historical/earning_calendar/${symbol}?limit=${limit}`, 'v3');\n }\n\n /**\n * Get earnings surprises\n * https://site.financialmodelingprep.com/developer/docs#earnings-surprises-earnings\n * @param symbol - The stock symbol to get the earnings surprises for\n * @param limit - The number of periods to get\n * @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.\n */\n async getEarningsSurprises({\n symbol,\n }: FinancialStatementsParams): Promise<APIResponse<EarningsSurprises[]>> {\n return this.client.get(`/earnings-surprises/${symbol}`, 'v3');\n }\n}\n","// Forex endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse, QueryParams } from '@/types/common';\nimport { HistoricalPriceResponse } from '@/types/quote';\nimport { ForexQuote, ForexQuoteParams } from '@/types/forex';\n\nexport class ForexEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get forex quote\n * @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.\n * @param params - Parameters for the forex quote request\n * @returns Forex quote data\n */\n async getQuote(params: ForexQuoteParams): Promise<APIResponse<ForexQuote[]>> {\n console.warn(\n '⚠️ ForexEndpoints.getQuote() is deprecated. Use fmp.quote.getQuote() instead. This method will be removed in version 0.1.0.',\n );\n return this.client.get('/quote', 'v3', params);\n }\n\n /**\n * Get historical forex prices\n * @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.\n * @param symbol - The forex symbol to get the historical prices for\n * @param from - The start date to get the historical prices for\n * @param to - The end date to get the historical prices for\n * @returns Historical forex price data\n */\n async getHistoricalPrice({\n symbol,\n from,\n to,\n }: {\n symbol: string;\n from?: string;\n to?: string;\n }): Promise<APIResponse<HistoricalPriceResponse>> {\n console.warn(\n '⚠️ ForexEndpoints.getHistoricalPrice() is deprecated. Use fmp.quote.getHistoricalPrice() instead. This method will be removed in version 0.1.0.',\n );\n const params: QueryParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get(`/historical-price-full/${symbol}`, 'v3', params);\n }\n\n /**\n * Get forex rates for a specific base currency\n * @param baseCurrency - The base currency to get forex rates for\n * @returns Forex rates data\n */\n async getForexRates(baseCurrency: string = 'USD'): Promise<APIResponse<Record<string, number>>> {\n return this.client.get(`/forex/${baseCurrency}`, 'v3');\n }\n\n /**\n * Get all forex rates\n * @returns All forex rates data\n */\n async getAllForexRates(): Promise<APIResponse<Record<string, Record<string, number>>>> {\n return this.client.get('/forex', 'v3');\n }\n}\n","// Cryptocurrency endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse, DateRangeParams } from '@/types/common';\nimport { HistoricalPriceResponse } from '@/types/quote';\nimport { CryptoQuote } from '@/types/crypto';\n\nexport class CryptoEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get crypto quote\n * @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in version 0.1.0.\n * @param symbol - The crypto symbol to get the quote for\n * @returns Crypto quote data\n */\n async getQuote({ symbol }: { symbol: string }): Promise<APIResponse<CryptoQuote | null>> {\n console.warn(\n '⚠️ CryptoEndpoints.getQuote() is deprecated. Use fmp.quote.getQuote() instead. This method will be removed in version 0.1.0.',\n );\n return this.client.getSingle(`/quote/${symbol}`, 'v3');\n }\n\n /**\n * Get historical crypto prices\n * @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in version 0.1.0.\n * @param symbol - The crypto symbol to get the historical prices for\n * @param from - The start date to get the historical prices for\n * @param to - The end date to get the historical prices for\n * @returns Provides daily price data for all cryptocurrencies that are traded on exchanges around the world.\n */\n async getHistoricalPrice({\n symbol,\n from,\n to,\n }: {\n symbol: string;\n from?: string;\n to?: string;\n }): Promise<APIResponse<HistoricalPriceResponse>> {\n console.warn(\n '⚠️ CryptoEndpoints.getHistoricalPrice() is deprecated. Use fmp.quote.getHistoricalPrice() instead. This method will be removed in version 0.1.0.',\n );\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.getSingle(`/historical-price-full/${symbol}`, 'v3', params);\n }\n}\n","// ETF endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse, SymbolParams } from '@/types/common';\nimport {\n ETFProfile,\n ETFHolding,\n ETFHoldingDates,\n ETFHolder,\n ETFStockExposure,\n ETFWeighting,\n ETFCountryWeighting,\n} from '@/types/etf';\n\nexport class ETFEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get ETF holding dates\n * https://site.financialmodelingprep.com/developer/docs#etf-holding-dates-etf-holdings\n * @param symbol - The symbol of the ETF to get the holding dates for\n * @returns The FMP ETF Holding Dates endpoint provides a list of the dates on which ETF holdings are updated. For example, an investor may want to know when an ETF's holdings are updated in order to make sure that they are still aligned with their investment goals.\n */\n async getHoldingDates({ symbol }: SymbolParams): Promise<APIResponse<ETFHoldingDates[]>> {\n const params: { symbol?: string } = {};\n if (symbol) params.symbol = symbol;\n return this.client.get('/etf-holdings/portfolio-date', 'v4', params);\n }\n\n /**\n * Get ETF holdings\n * https://site.financialmodelingprep.com/developer/docs#etf-holdings-etf-holdings\n * @param symbol - The symbol of the ETF to get the holdings for\n * @param date - The date to get the holdings for\n * @returns The FMP ETF Holdings endpoint provides a list of all the institutional investors that own shares of an ETF. For example, an investor may want to know which ETF has the highest exposure to a particular industry or sector.\n */\n async getHoldings({\n symbol,\n date,\n }: {\n symbol: string;\n date: string;\n }): Promise<APIResponse<ETFHolding[]>> {\n const params: { symbol?: string; date?: string } = {};\n if (symbol) params.symbol = symbol;\n if (date) params.date = date;\n return this.client.get('/etf-holdings', 'v4', params);\n }\n\n /**\n * Get ETF holder\n * https://site.financialmodelingprep.com/developer/docs#etf-holder-etf-holdings\n * @param symbol - The symbol of the ETF to get the holder for\n * @returns This endpoint returns all stocks held by a specific ETF. Assets, share number, and weight are among the fields returned. For example you can get components of SPY, VOO and more.\n */\n async getHolder({ symbol }: SymbolParams): Promise<APIResponse<ETFHolder[]>> {\n return this.client.get(`/etf-holder/${symbol}`, 'v3');\n }\n\n /**\n * Get ETF profile\n * https://site.financialmodelingprep.com/developer/docs#etf-information-etf-holdings\n * @param symbol - The symbol of the ETF to get the profile for\n * @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.\n */\n async getProfile({ symbol }: SymbolParams): Promise<APIResponse<ETFProfile | null>> {\n const params: { symbol?: string } = {};\n if (symbol) params.symbol = symbol;\n return this.client.getSingle('/etf-info', 'v4', params);\n }\n\n /**\n * Get ETF sector weighting\n * https://site.financialmodelingprep.com/developer/docs#etf-sector-weighting-etf-holdings\n * @param symbol - The symbol of the ETF to get the sector exposure for\n * @returns The FMP ETF Sector Weighting endpoint provides a breakdown of the percentage of an ETF's assets that are invested in each sector. For example, an investor may want to invest in an ETF that has a high exposure to the technology sector if they believe that the technology sector is poised for growth.\n */\n async getSectorWeighting({ symbol }: SymbolParams): Promise<APIResponse<ETFWeighting[]>> {\n return this.client.get(`/etf-sector-weightings/${symbol}`, 'v3');\n }\n\n /**\n * Get ETF country weighting\n * https://site.financialmodelingprep.com/developer/docs#etf-country-weighting-etf-holdings\n * @param symbol - The symbol of the ETF to get the country weighting for\n * @returns The FMP ETF Country Weighting endpoint provides a breakdown of the percentage of an ETF's assets that are invested in each country. For example, an investor may want to invest in an ETF that has a high exposure to China if they believe that the Chinese economy is poised for growth.\n */\n async getCountryWeighting({ symbol }: SymbolParams): Promise<APIResponse<ETFCountryWeighting[]>> {\n return this.client.get(`/etf-country-weightings/${symbol}`, 'v3');\n }\n\n /**\n * Get ETF Stock exposure\n * https://site.financialmodelingprep.com/developer/docs#etf-sector-exposure-etf-holdings\n * @param symbol - The symbol of the ETF to get the stock exposure for\n * @returns This endpoint returns asset exposure from all ETFs that have it in their holdings. It has properties like market value, share number or weight percentage. It can be useful for looking up stock you like to check what ETF has it on their portfolio.\n */\n async getStockExposure({ symbol }: SymbolParams): Promise<APIResponse<ETFStockExposure[]>> {\n return this.client.get(`/etf-stock-exposure/${symbol}`, 'v3');\n }\n}\n","// Mutual fund endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse } from '../types/common';\nimport {\n MutualFundQuote,\n MutualFundProfile,\n MutualFundHolding,\n MutualFundQuoteParams,\n MutualFundProfileParams,\n MutualFundHoldersParams,\n} from '../types/mutual-fund';\n\nexport class MutualFundEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get mutual fund quote\n * @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in a future release.\n * @param params - Parameters for the mutual fund quote request\n * @returns Mutual fund quote data\n */\n async getQuote(params: MutualFundQuoteParams): Promise<APIResponse<MutualFundQuote[]>> {\n return this.client.get('/quote', 'v3', params);\n }\n\n /**\n * Get mutual fund profile\n */\n async getProfile(params: MutualFundProfileParams): Promise<APIResponse<MutualFundProfile[]>> {\n return this.client.get('/profile', 'v3', params);\n }\n\n /**\n * Get mutual fund holdings\n */\n async getHoldings(params: MutualFundHoldersParams): Promise<APIResponse<MutualFundHolding[]>> {\n return this.client.get('/holdings', 'v3', params);\n }\n}\n","// Bond endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse } from '@/types/common';\nimport { BondQuote, BondQuoteParams } from '@/types/bond';\nimport { HistoricalPriceResponse } from '@/types/quote';\n\nexport class BondEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get bond quote\n * @deprecated Use `fmp.quote.getQuote()` instead. This method will be removed in a future release.\n * @param params - Parameters for the bond quote request\n * @returns Bond quote data\n */\n async getQuote(params: BondQuoteParams): Promise<APIResponse<BondQuote[]>> {\n return this.client.get('/quote', 'v3', params);\n }\n\n /**\n * Get historical bond prices\n * @deprecated Use `fmp.quote.getHistoricalPrice()` instead. This method will be removed in a future release.\n * @param symbol - The bond symbol to get the historical prices for\n * @param from - The start date to get the historical prices for\n * @param to - The end date to get the historical prices for\n * @returns Historical bond price data\n */\n async getHistoricalPrice({\n symbol,\n from,\n to,\n }: {\n symbol: string;\n from?: string;\n to?: string;\n }): Promise<APIResponse<HistoricalPriceResponse>> {\n const params: Record<string, any> = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get(`/historical-price-full/${symbol}`, 'v3', params);\n }\n}\n","// Economic endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse } from '@/types/common';\nimport {\n TreasuryRate,\n TreasuryRateParams,\n FederalFundsRate,\n FederalFundsRateParams,\n CPI,\n CPIParams,\n GDP,\n GDPParams,\n Unemployment,\n UnemploymentParams,\n} from '@/types/economic';\n\nexport class EconomicEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get treasury rates\n */\n async getTreasuryRates(params: TreasuryRateParams = {}): Promise<APIResponse<TreasuryRate[]>> {\n return this.client.get('/treasury-rates', 'v3', params);\n }\n\n /**\n * Get federal funds rate\n */\n async getFederalFundsRate(\n params: FederalFundsRateParams = {},\n ): Promise<APIResponse<FederalFundsRate[]>> {\n return this.client.get('/federal-funds-rate', 'v3', params);\n }\n\n /**\n * Get CPI data\n */\n async getCPI(params: CPIParams = {}): Promise<APIResponse<CPI[]>> {\n return this.client.get('/economic/cpi', 'v3', params);\n }\n\n /**\n * Get GDP data\n */\n async getGDP(params: GDPParams = {}): Promise<APIResponse<GDP[]>> {\n return this.client.get('/economic/gdp', 'v3', params);\n }\n\n /**\n * Get unemployment data\n */\n async getUnemployment(params: UnemploymentParams = {}): Promise<APIResponse<Unemployment[]>> {\n return this.client.get('/economic/unemployment', 'v3', params);\n }\n}\n","// Market endpoints for FMP API\n\nimport { FMPClient } from '@/client';\nimport { APIResponse } from '@/types/common';\nimport {\n MarketHours,\n MarketPerformance,\n MarketSectorPerformance,\n MarketIndex,\n} from '@/types/market';\n\nexport class MarketEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get market hours\n */\n async getMarketHours(): Promise<APIResponse<MarketHours>> {\n return this.client.get('/market-hours', 'v3');\n }\n\n /**\n * Get market performance\n */\n async getMarketPerformance(): Promise<APIResponse<MarketPerformance[]>> {\n return this.client.get('/market-performance', 'v3');\n }\n\n /**\n * Get top gainers\n * https://site.financialmodelingprep.com/developer/docs#market-biggest-gainers-market-overview\n * @returns The FMP Market Biggest Gainers endpoint provides a list of the stocks that have gained the most value on a given day. This information can be used by investors to identify stocks that are momentum and to potential investment opportunities.\n */\n async getGainers(): Promise<APIResponse<MarketPerformance[]>> {\n return this.client.get('/stock_market/gainers', 'v3');\n }\n\n /**\n * Get top losers\n * https://site.financialmodelingprep.com/developer/docs#market-biggest-losers-market-overview\n * @returns The FMP Market Biggest Losers endpoint provides a list of the stocks that have lost the most value on a given day. This information can be used by investors to identify stocks that are underperforming and to potential trading opportunities.\n */\n async getLosers(): Promise<APIResponse<MarketPerformance[]>> {\n return this.client.get('/stock_market/losers', 'v3');\n }\n\n /**\n * Get most active stocks\n */\n async getMostActive(): Promise<APIResponse<MarketPerformance[]>> {\n return this.client.get('/stock_market/actives', 'v3');\n }\n\n /**\n * Get sector performance\n * https://site.financialmodelingprep.com/developer/docs#sector-performance-market-overview\n * @returns The FMP Sector Performance endpoint provides the performance of each sector of the stock market over a specified period of time. This information can be used by investors to identify sectors that are outperforming or underperforming the market.\n */\n async getSectorPerformance(): Promise<APIResponse<MarketSectorPerformance[]>> {\n return this.client.get('/sector-performance', 'v3');\n }\n\n /**\n * Get market indices\n * https://site.financialmodelingprep.com/developer/docs#market-index-market-overview\n * @returns The FMP Market Index endpoint provides a list of all the major stock market indices, such as the S&P 500, the Dow Jones Industrial Average, and the Nasdaq Composite Index. This information can be used by investors to track the performance of the overall stock market and to identify sectors and industries that are outperforming or underperforming the market.\n */\n async getMarketIndex(): Promise<APIResponse<MarketIndex[]>> {\n return this.client.get('/quotes/index', 'v3');\n }\n}\n","import { FMPClient } from '@/client';\nimport { APIResponse } from '@/types';\nimport { StockList, ETFList, CryptoList, ForexList, AvailableIndexesList } from '@/types/list';\n\nexport class ListEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get stock list\n * https://site.financialmodelingprep.com/developer/docs#symbol-list-stock-list\n * @returns The stock list\n */\n async getStockList(): Promise<APIResponse<StockList[]>> {\n return this.client.get('/stock/list');\n }\n\n /**\n * Get ETF list\n * https://site.financialmodelingprep.com/developer/docs#exchange-traded-fund-search-stock-list\n * @returns The ETF list\n */\n async getETFList(): Promise<APIResponse<ETFList[]>> {\n return this.client.get('/etf/list');\n }\n\n /**\n * Get crypto list\n * https://site.financialmodelingprep.com/developer/docs#cryptocurrencies-list-crypto\n * @returns The crypto list\n */\n async getCryptoList(): Promise<APIResponse<CryptoList[]>> {\n return this.client.get('/symbol/available-cryptocurrencies');\n }\n\n /**\n * Get forex list\n * https://site.financialmodelingprep.com/developer/docs#forex-list-forex\n * @returns The forex list\n */\n async getForexList(): Promise<APIResponse<ForexList[]>> {\n return this.client.get('/symbol/available-forex-currency-pairs');\n }\n\n /**\n * Get available indexes list\n * https://site.financialmodelingprep.com/developer/docs#available-indexes\n * @returns The available indexes list\n */\n async getAvailableIndexes(): Promise<APIResponse<AvailableIndexesList[]>> {\n return this.client.get('/symbol/available-indexes');\n }\n}\n","import { APIResponse, DateRangeParams } from '@/types';\nimport { FMPClient } from '@/client';\nimport {\n EarningsCalendar,\n DividendsCalendar,\n EconomicsCalendar,\n IPOCalendar,\n SplitsCalendar,\n} from '@/types/calendar';\n\nexport class CalendarEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get earnings calendar\n * https://site.financialmodelingprep.com/developer/docs#earnings-calendar-earnings\n * @param from - The start date to get the earnings calendar for\n * @param to - The end date to get the earnings calendar for\n * @returns The earnings calendar\n */\n async getEarningsCalendar({ from, to }: DateRangeParams = {}): Promise<\n APIResponse<EarningsCalendar[]>\n > {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/earning_calendar', 'v3', params);\n }\n\n /**\n * Get dividends calendar\n * https://site.financialmodelingprep.com/developer/docs#dividends-calendar-dividends\n * @param from - The start date to get the dividends calendar for\n * @param to - The end date to get the dividends calendar for\n * @returns The dividends calendar\n */\n async getDividendsCalendar({ from, to }: DateRangeParams = {}): Promise<\n APIResponse<DividendsCalendar[]>\n > {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/stock_dividend_calendar', 'v3', params);\n }\n\n /**\n * Get economics calendar\n * https://site.financialmodelingprep.com/developer/docs#economics-calendar-economics-data\n * @param from - The start date to get the economics calendar for\n * @param to - The end date to get the economics calendar for\n * @returns The economics calendar\n */\n async getEconomicsCalendar({ from, to }: DateRangeParams = {}): Promise<\n APIResponse<EconomicsCalendar[]>\n > {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/economic_calendar', 'v3', params);\n }\n\n /**\n * Get IPO calendar\n * https://site.financialmodelingprep.com/developer/docs#ipo-calender-by-ipo-calendar\n * @param from - The start date to get the IPO calendar for\n * @param to - The end date to get the IPO calendar for\n * @returns The IPO calendar\n */\n async getIPOCalendar({ from, to }: DateRangeParams = {}): Promise<APIResponse<IPOCalendar[]>> {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/ipo_calendar', 'v3', params);\n }\n\n /**\n * Get stock splits calendar\n * https://site.financialmodelingprep.com/developer/docs#splits-calendar-splits\n * @param from - The start date to get the stock splits calendar for\n * @param to - The end date to get the stock splits calendar for\n * @returns The stock splits calendar\n */\n async getSplitsCalendar({ from, to }: DateRangeParams = {}): Promise<\n APIResponse<SplitsCalendar[]>\n > {\n const params: DateRangeParams = {};\n if (from) params.from = from;\n if (to) params.to = to;\n\n return this.client.get('/stock_split_calendar', 'v3', params);\n }\n}\n","import { APIResponse } from '@/types';\nimport { FMPClient } from '@/client';\nimport {\n CompanyNotes,\n CompanyProfile,\n EarningsCallTranscript,\n ExecutiveCompensation,\n HistoricalEmployeeCount,\n HistoricalSharesFloat,\n SharesFloat,\n} from '@/types/company';\n\nexport class CompanyEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get company profile\n * https://site.financialmodelingprep.com/developer/docs#company-profile-company-information\n * @param symbol - The stock symbol to get the profile for\n * @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.\n */\n async getCompanyProfile({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<CompanyProfile | null>> {\n return this.client.getSingle(`/profile/${symbol}`, 'v3');\n }\n\n /**\n * Get executive compensation\n * https://site.financialmodelingprep.com/developer/docs#executive-compensation-company-information\n * @param symbol - The stock symbol to get the executive compensation for\n * @returns Understand how a company compensates its executives with our Executive Compensation endpoint. This endpoint provides information such as salary, bonus, and stock options for each executive.\n */\n async getExecutiveCompensation({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<ExecutiveCompensation[] | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.get(`/governance/executive_compensation`, 'v4', params);\n }\n\n /**\n * Get company notes\n * https://site.financialmodelingprep.com/developer/docs#company-notes-company-information\n * @param symbol - The stock symbol to get the notes for\n * @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.\n */\n async getCompanyNotes({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<CompanyNotes[] | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.get(`/company-notes`, 'v4', params);\n }\n\n /**\n * Get historical employee count\n * https://site.financialmodelingprep.com/developer/docs#historical-employee-company-information\n * @param symbol - The stock symbol to get the historical employee count for\n * @returns Track a company's employee count over time with our Historical Employee Count endpoint. This endpoint provides information about the number of employees a company has had each year.\n */\n async getHistoricalEmployeeCount({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<HistoricalEmployeeCount[] | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.get(`/historical/employee_count`, 'v4', params);\n }\n\n /**\n * Get shares float\n * https://site.financialmodelingprep.com/developer/docs#company-share-float-share-float\n * @param symbol - The stock symbol to get the shares float for\n * @returns The FMP Company Share Float endpoint provides the total number of shares that are publicly traded for a given company. This is also known as the company's float. The float is calculated by subtracting the number of restricted shares from the total number of outstanding shares.\n */\n async getSharesFloat({ symbol }: { symbol: string }): Promise<APIResponse<SharesFloat | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.getSingle(`/shares_float`, 'v4', params);\n }\n\n /**\n * Get historical shares float\n * https://site.financialmodelingprep.com/developer/docs#company-historical-share-float\n * @param symbol - The stock symbol to get the historical shares float for\n * @returns The FMP Historical Share Float endpoint provides historical data on the number of shares that are publicly traded for a given company. This is also known as the company's float. The float is calculated by subtracting the number of restricted shares from the total number of outstanding shares.\n */\n async getHistoricalSharesFloat({\n symbol,\n }: {\n symbol: string;\n }): Promise<APIResponse<HistoricalSharesFloat[] | null>> {\n const params: { symbol: string } = { symbol };\n\n return this.client.get(`/historical/shares_float`, 'v4', params);\n }\n\n /**\n * Get earnings call transcript\n * https://site.financialmodelingprep.com/developer/docs#earnings-transcript-earnings-transcripts\n * @param symbol - The stock symbol to get the earnings call transcript for\n * @param year - The year of the earnings call\n * @param quarter - The quarter of the earnings call\n * @returns The FMP Earnings Call Transcript endpoint provides the transcript of a company's earnings call.\n */\n async getEarningsCallTranscript({\n symbol,\n year,\n quarter,\n }: {\n symbol: string;\n year: number;\n quarter: number;\n }): Promise<APIResponse<EarningsCallTranscript[] | null>> {\n const params: { year: number; quarter: number } = { year, quarter };\n return this.client.getSingle(`/earning_call_transcript/${symbol}`, 'v3', params);\n }\n}\n","// Unified quote endpoints for FMP API - handles stocks, crypto, forex, commodities, and ETFs\n\nimport { FMPClient } from '@/client';\nimport { APIResponse, DateRangeParams } from '@/types/common';\nimport {\n Quote,\n QuoteParams,\n HistoricalPriceParams,\n HistoricalPriceResponse,\n HistoricalPriceData,\n IntradayParams,\n} from '@/types/quote';\n\nexport class QuoteEndpoints {\n constructor(private client: FMPClient) {}\n\n /**\n * Get quote for any asset type (stock, crypto, forex, commodity, ETF)\n * @param params - Parameters for the quote request\n * @returns Quote data for the specified asset\n */\n async getQuote(params: QuoteParams): Promise<APIResponse<Quote | null>> {\n const { symbol } = params;\n\n // All asset types use the same /quote/{symbol} endpoint\n return this.client.getSingle(`/quote/${symbol}`, 'v3');\n }\n\n /**\n * Get historical prices for any asset type\n * @param params - Parameters for the historical price request\n * @returns Historical price data for the specified asset\n */\n async getHistoricalPrice(\n params: HistoricalPriceParams,\n ): Promise<APIResponse<HistoricalPriceResponse>> {\n const { symbol, from, to } = params;\n\n const queryParams: DateRangeParams = {};\n if (from) queryParams.from = from;\n if (to) queryParams.to = to;\n\n return this.client.getSingle(`/historical-price-full/${symbol}`, 'v3', queryParams);\n }\n\n /**\n * Get multiple quotes for any asset type\n * @param symbols - Array of symbols to get quotes for\n * @returns Array of quote data\n */\n async getQuotes(symbols: string[]): Promise<APIResponse<Quote[]>> {\n const symbolsParam = symbols.join(',');\n return this.client.get(`/quote/${symbolsParam}`, 'v3');\n }\n\n /**\n * Get intraday data for any asset type\n * @param params - Parameters for the intraday request\n * @returns Intraday price data for the specified asset\n */\n async getIntraday(params: IntradayParams): Promise<APIResponse<HistoricalPriceData[]>> {\n const { symbol, interval, from, to } = params;\n\n const queryParams: DateRangeParams = {};\n if (from) queryParams.from = from;\n if (to) queryParams.to = to;\n\n return this.client.get(`/historical-chart/${interval}/${symbol}`, 'v3', queryParams);\n }\n}\n","// Main FMP API client that combines all endpoints\n\nimport { FMPClient } from './client';\nimport { FMPConfig } from './types/common';\nimport { validateApiKey } from './utils/validation';\nimport { StockEndpoints } from './endpoints/stock';\nimport { FinancialEndpoints } from './endpoints/financial';\nimport { ForexEndpoints } from './endpoints/forex';\nimport { CryptoEndpoints } from './endpoints/crypto';\nimport { ETFEndpoints } from './endpoints/etf';\nimport { MutualFundEndpoints } from './endpoints/mutual-fund';\nimport { BondEndpoints } from './endpoints/bond';\nimport { EconomicEndpoints } from './endpoints/economic';\nimport { MarketEndpoints } from './endpoints/market';\nimport { ListEndpoints } from './endpoints/list';\nimport { CalendarEndpoints } from './endpoints/calendar';\nimport { CompanyEndpoints } from './endpoints/company';\nimport { QuoteEndpoints } from './endpoints/quote';\n\n/**\n * Main FMP API client that provides access to all endpoints\n *\n * @example\n * ```typescript\n * import { FMP } from 'fmp-node-api';\n *\n * const fmp = new FMP({ apiKey: 'your-api-key' });\n *\n * // Get stock quote\n * const quote = await fmp.stock.getQuote({ symbol: 'AAPL' });\n *\n * // Get financial statements\n * const incomeStatement = await fmp.financial.getIncomeStatement({\n * symbol: 'AAPL',\n * period: 'annual'\n * });\n *\n * // Get forex data\n * const forexQuote = await fmp.forex.getQuote({ symbol: 'EURUSD' });\n * ```\n */\nexport class FMP {\n public readonly stock: StockEndpoints;\n public readonly financial: FinancialEndpoints;\n public readonly forex: ForexEndpoints;\n public readonly crypto: CryptoEndpoints;\n public readonly etf: ETFEndpoints;\n public readonly mutualFund: MutualFundEndpoints;\n public readonly bond: BondEndpoints;\n public readonly economic: EconomicEndpoints;\n public readonly market: MarketEndpoints;\n public readonly list: ListEndpoints;\n public readonly calendar: CalendarEndpoints;\n public readonly company: CompanyEndpoints;\n public readonly quote: QuoteEndpoints;\n\n constructor(config: FMPConfig) {\n // Validate API key at construction time\n validateApiKey(config.apiKey);\n\n const client = new FMPClient(config);\n\n this.stock = new StockEndpoints(client);\n this.financial = new FinancialEndpoints(client);\n this.crypto = new CryptoEndpoints(client);\n this.etf = new ETFEndpoints(client);\n this.market = new MarketEndpoints(client);\n this.list = new ListEndpoints(client);\n this.calendar = new CalendarEndpoints(client);\n this.company = new CompanyEndpoints(client);\n this.quote = new QuoteEndpoints(client);\n\n this.forex = new ForexEndpoints(client);\n this.economic = new EconomicEndpoints(client);\n this.bond = new BondEndpoints(client);\n this.mutualFund = new MutualFundEndpoints(client);\n }\n\n /**\n * Get the underlying client instance for advanced usage\n */\n getClient(): FMPClient {\n return this.stock['client'];\n }\n}\n","// Common types used across all FMP API endpoints\n\n// Base API response wrapper - more type-safe without any default\nexport interface APIResponse<T = unknown> {\n success: boolean;\n data?: T;\n error?: string;\n status?: number;\n}\n\n// More specific response types for better type safety\nexport interface SuccessResponse<T> extends APIResponse<T> {\n success: true;\n data: T;\n status: number;\n}\n\nexport interface ErrorResponse extends APIResponse<never> {\n success: false;\n error: string;\n status: number;\n}\n\n// FMP API configuration\nexport interface FMPConfig {\n apiKey: string;\n baseURL?: string;\n timeout?: number;\n}\n\n// Common parameter interfaces\nexport interface SymbolParams {\n symbol: string;\n}\n\nexport interface DateRangeParams {\n from?: string;\n to?: string;\n}\n\nexport interface PaginationParams {\n limit?: number;\n page?: number;\n}\n\nexport interface PeriodParams {\n period?: 'annual' | 'quarter';\n}\n\n// Type-safe query parameters\nexport interface QueryParams {\n [key: string]: string | number | boolean | undefined;\n}\n\n// Common enums\nexport enum Period {\n ANNUAL = 'annual',\n QUARTER = 'quarter',\n}\n\nexport enum Exchange {\n NYSE = 'NYSE',\n NASDAQ = 'NASDAQ',\n AMEX = 'AMEX',\n TSX = 'TSX',\n LSE = 'LSE',\n ASX = 'ASX',\n NSE = 'NSE',\n BSE = 'BSE',\n}\n","// Formatting utilities for FMP API\n\n/**\n * Format currency value\n */\nexport function formatCurrency(value: number, currency: string = 'USD'): string {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: currency,\n }).format(value);\n}\n\n/**\n * Format percentage value\n */\nexport function formatPercentage(value: number, decimals: number = 2): string {\n return `${value.toFixed(decimals)}%`;\n}\n\n/**\n * Format large numbers with K, M, B suffixes\n */\nexport function formatLargeNumber(value: number): string {\n if (value >= 1e12) {\n return `${(value / 1e12).toFixed(2)}T`;\n } else if (value >= 1e9) {\n return `${(value / 1e9).toFixed(2)}B`;\n } else if (value >= 1e6) {\n return `${(value / 1e6).toFixed(2)}M`;\n } else if (value >= 1e3) {\n return `${(value / 1e3).toFixed(2)}K`;\n }\n return value.toString();\n}\n\n/**\n * Format date to YYYY-MM-DD\n */\nexport function formatDate(date: Date | string): string {\n const d = typeof date === 'string' ? new Date(date) : date;\n return d.toISOString().split('T')[0];\n}\n\n/**\n * Format date to readable format\n */\nexport function formatReadableDate(date: Date | string): string {\n const d = typeof date === 'string' ? new Date(date) : date;\n return d.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n}\n\n/**\n * Format timestamp to readable format\n */\nexport function formatTimestamp(timestamp: number): string {\n const date = new Date(timestamp * 1000);\n return date.toLocaleString('en-US');\n}\n\n/**\n * Format number with specified decimal places\n */\nexport function formatNumber(value: number, decimals: number = 2): string {\n return value.toFixed(decimals);\n}\n\n/**\n * Format volume with appropriate units\n */\nexport function formatVolume(volume: number): string {\n if (volume >= 1e9) {\n return `${(volume / 1e9).toFixed(2)}B`;\n } else if (volume >= 1e6) {\n return `${(volume / 1e6).toFixed(2)}M`;\n } else if (volume >= 1e3) {\n return `${(volume / 1e3).toFixed(2)}K`;\n }\n return volume.toString();\n}\n","// Constants for FMP API\n\n// Default configuration\nexport const DEFAULT_TIMEOUT = 10000;\nexport const DEFAULT_LIMIT = 100;\nexport const MAX_LIMIT = 1000;\n\n// Common periods\nexport const PERIODS = {\n ANNUAL: 'annual',\n QUARTER: 'quarter',\n} as const;\n\n// Common exchanges\nexport const EXCHANGES = {\n NYSE: 'NYSE',\n NASDAQ: 'NASDAQ',\n AMEX: 'AMEX',\n TSX: 'TSX',\n LSE: 'LSE',\n ASX: 'ASX',\n NSE: 'NSE',\n BSE: 'BSE',\n} as const;\n\n// Common sectors\nexport const SECTORS = {\n TECHNOLOGY: 'Technology',\n HEALTHCARE: 'Healthcare',\n FINANCIAL: 'Financial',\n CONSUMER_DISCRETIONARY: 'Consumer Discretionary',\n CONSUMER_STAPLES: 'Consumer Staples',\n INDUSTRIALS: 'Industrials',\n ENERGY: 'Energy',\n MATERIALS: 'Materials',\n UTILITIES: 'Utilities',\n REAL_ESTATE: 'Real Estate',\n COMMUNICATION_SERVICES: 'Communication Services',\n} as const;\n\n// Common countries\nexport const COUNTRIES = {\n US: 'US',\n CA: 'CA',\n GB: 'GB',\n AU: 'AU',\n IN: 'IN',\n DE: 'DE',\n FR: 'FR',\n JP: 'JP',\n CN: 'CN',\n BR: 'BR',\n} as const;\n\n// Error messages\nexport const ERROR_MESSAGES = {\n API_KEY_REQUIRED: 'API key is required',\n SYMBOL_REQUIRED: 'Symbol is required',\n INVALID_SYMBOL: 'Invalid symbol format',\n INVALID_DATE: 'Invalid date format. Use YYYY-MM-DD',\n INVALID_PERIOD: 'Period must be either \"annual\" or \"quarter\"',\n INVALID_LIMIT: 'Limit must be between 1 and 1000',\n INVALID_PAGE: 'Page must be a non-negative number',\n REQUEST_FAILED: 'Request failed',\n RATE_LIMIT_EXCEEDED: 'Rate limit exceeded',\n UNAUTHORIZED: 'Unauthorized - Invalid API key',\n NOT_FOUND: 'Resource not found',\n} as const;\n\n// HTTP status codes\nexport const HTTP_STATUS = {\n OK: 200,\n CREATED: 201,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TOO_MANY_REQUESTS: 429,\n INTERNAL_SERVER_ERROR: 500,\n} as const;\n"]}
|