fmp-ai-tools 0.0.10 → 0.0.11-beta.10
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 +337 -317
- package/dist/providers/openai/index.js +77 -51
- package/dist/providers/openai/index.js.map +1 -1
- package/dist/providers/openai/index.mjs +56 -51
- package/dist/providers/openai/index.mjs.map +1 -1
- package/dist/providers/vercel-ai/index.d.mts +58 -87
- package/dist/providers/vercel-ai/index.d.ts +58 -87
- package/dist/providers/vercel-ai/index.js +4 -5
- package/dist/providers/vercel-ai/index.js.map +1 -1
- package/dist/providers/vercel-ai/index.mjs +4 -5
- package/dist/providers/vercel-ai/index.mjs.map +1 -1
- package/package.json +22 -19
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,317 +1,337 @@
|
|
|
1
|
-
# FMP AI Tools
|
|
2
|
-
|
|
3
|
-
AI tools for Financial Modeling Prep (FMP) Node API - compatible with Vercel AI SDK, OpenAI Agents, and more.
|
|
4
|
-
|
|
5
|
-
This package provides pre-built AI tools that can be used with various AI frameworks. For direct API access, use the `fmp-node-api` package.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install fmp-ai-tools
|
|
11
|
-
# or
|
|
12
|
-
pnpm add fmp-ai-tools
|
|
13
|
-
# or
|
|
14
|
-
yarn add fmp-ai-tools
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
import {
|
|
56
|
-
import { fmpTools } from 'fmp-ai-tools/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
- `
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
- `
|
|
158
|
-
- `
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
- `
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- `
|
|
173
|
-
- `
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
- `
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
import {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
1
|
+
# FMP AI Tools
|
|
2
|
+
|
|
3
|
+
AI tools for Financial Modeling Prep (FMP) Node API - compatible with Vercel AI SDK, OpenAI Agents, and more.
|
|
4
|
+
|
|
5
|
+
This package provides pre-built AI tools that can be used with various AI frameworks. For direct API access, use the `fmp-node-api` package.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install fmp-ai-tools
|
|
11
|
+
# or
|
|
12
|
+
pnpm add fmp-ai-tools
|
|
13
|
+
# or
|
|
14
|
+
yarn add fmp-ai-tools
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Peer Dependencies
|
|
18
|
+
|
|
19
|
+
This package requires the following peer dependencies to be installed in your project:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# For Vercel AI SDK
|
|
23
|
+
npm install ai zod
|
|
24
|
+
# or
|
|
25
|
+
pnpm add ai zod
|
|
26
|
+
# or
|
|
27
|
+
yarn add ai zod
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Required versions:**
|
|
31
|
+
|
|
32
|
+
- `ai`: ^5.0.0
|
|
33
|
+
- `zod`: ^3.25.76 || ^4.0.0
|
|
34
|
+
|
|
35
|
+
**⚠️ Common Issue**: If you encounter the error `Invalid schema for function 'getStockQuote': schema must be a JSON Schema of 'type: "object"', got 'type: "None"'`, it means you have a version mismatch between `ai` and `zod`. Make sure you're using compatible versions as listed above.
|
|
36
|
+
|
|
37
|
+
## Version Compatibility
|
|
38
|
+
|
|
39
|
+
### OpenAI Agents Compatibility
|
|
40
|
+
|
|
41
|
+
**⚠️ Important**: This package requires `@openai/agents` version `^0.0.17` or higher due to breaking changes in the API.
|
|
42
|
+
|
|
43
|
+
If you're using an older version, you'll encounter errors like:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Zod field uses .optional() without .nullable() which is not supported by the API
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
### Vercel AI SDK (Recommended)
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { openai } from '@ai-sdk/openai';
|
|
55
|
+
import { streamText, convertToModelMessages, stepCountIs } from 'ai';
|
|
56
|
+
import { fmpTools } from 'fmp-ai-tools/vercel-ai';
|
|
57
|
+
|
|
58
|
+
export async function POST(req: Request) {
|
|
59
|
+
const { messages } = await req.json();
|
|
60
|
+
|
|
61
|
+
const result = streamText({
|
|
62
|
+
model: openai('gpt-4o-mini'),
|
|
63
|
+
messages: convertToModelMessages(messages),
|
|
64
|
+
tools: fmpTools,
|
|
65
|
+
stopWhen: stepCountIs(5),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
return result.toUIMessageStreamResponse();
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### OpenAI Agents
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { Agent } from '@openai/agents';
|
|
76
|
+
import { fmpTools } from 'fmp-ai-tools/openai';
|
|
77
|
+
|
|
78
|
+
const agent = new Agent({
|
|
79
|
+
name: 'Financial Analyst',
|
|
80
|
+
instructions: 'You are a financial analyst with access to real-time market data.',
|
|
81
|
+
tools: fmpTools,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const result = await agent.run({
|
|
85
|
+
messages: [
|
|
86
|
+
{
|
|
87
|
+
role: 'user',
|
|
88
|
+
content:
|
|
89
|
+
'Get the current stock quote for Apple (AAPL) and show me their latest balance sheet',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
});
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Configuration
|
|
96
|
+
|
|
97
|
+
**Important**: You must set your FMP API key as an environment variable for the tools to work:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
FMP_API_KEY=your_api_key_here
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The tools internally use the `fmp-node-api` library, which reads this environment variable to authenticate with the Financial Modeling Prep API.
|
|
104
|
+
|
|
105
|
+
### Debugging and Logging
|
|
106
|
+
|
|
107
|
+
**⚠️ Development Only**: These logging features are intended for debugging and development, not production use.
|
|
108
|
+
|
|
109
|
+
Two logging modes controlled by environment variables:
|
|
110
|
+
|
|
111
|
+
#### Full Logging Mode
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
FMP_TOOLS_LOG_API_RESULTS=true
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Logs: tool name, input parameters, result summary with token count, execution time.
|
|
118
|
+
|
|
119
|
+
#### Data-Only Logging Mode
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
FMP_TOOLS_LOG_DATA_ONLY=true
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Logs: result summary and formatted JSON response data.
|
|
126
|
+
|
|
127
|
+
#### Example Output
|
|
128
|
+
|
|
129
|
+
**Full Logging:**
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
🔧 getStockQuote: object (~28 tokens)
|
|
133
|
+
⏱️ Execution Time: 245ms
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Data-Only Logging:**
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
📤 Result: { "symbol": "AAPL", "price": 150.25, ... }
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Note**: Both modes are disabled by default. Use only during development.
|
|
143
|
+
|
|
144
|
+
## Available Tools
|
|
145
|
+
|
|
146
|
+
### Quote Tools
|
|
147
|
+
|
|
148
|
+
- `getStockQuote` - Get real-time stock quote for a company
|
|
149
|
+
|
|
150
|
+
### Company Tools
|
|
151
|
+
|
|
152
|
+
- `getCompanyProfile` - Get comprehensive company profile and information
|
|
153
|
+
|
|
154
|
+
### Financial Tools
|
|
155
|
+
|
|
156
|
+
- `getBalanceSheet` - Get balance sheet statements (annual/quarterly)
|
|
157
|
+
- `getIncomeStatement` - Get income statements (annual/quarterly)
|
|
158
|
+
- `getCashFlowStatement` - Get cash flow statements (annual/quarterly)
|
|
159
|
+
- `getFinancialRatios` - Get financial ratios and metrics (annual/quarterly)
|
|
160
|
+
|
|
161
|
+
### Stock Tools
|
|
162
|
+
|
|
163
|
+
- `getMarketCap` - Get market capitalization for a company
|
|
164
|
+
- `getStockSplits` - Get historical stock splits for a company
|
|
165
|
+
- `getDividendHistory` - Get dividend history and payments for a company
|
|
166
|
+
|
|
167
|
+
### Market Tools
|
|
168
|
+
|
|
169
|
+
- `getMarketPerformance` - Get overall market performance data
|
|
170
|
+
- `getSectorPerformance` - Get sector performance data
|
|
171
|
+
- `getGainers` - Get top gaining stocks
|
|
172
|
+
- `getLosers` - Get top losing stocks
|
|
173
|
+
- `getMostActive` - Get most actively traded stocks
|
|
174
|
+
|
|
175
|
+
### Economic Tools
|
|
176
|
+
|
|
177
|
+
- `getTreasuryRates` - Get treasury rates and yields
|
|
178
|
+
- `getEconomicIndicators` - Get economic indicators (GDP, CPI, unemployment, etc.)
|
|
179
|
+
|
|
180
|
+
### ETF Tools
|
|
181
|
+
|
|
182
|
+
- `getETFHoldings` - Get holdings for a specific ETF
|
|
183
|
+
- `getETFProfile` - Get ETF profile and information
|
|
184
|
+
|
|
185
|
+
### Calendar Tools
|
|
186
|
+
|
|
187
|
+
- `getEarningsCalendar` - Get upcoming earnings calendar
|
|
188
|
+
- `getEconomicCalendar` - Get economic calendar events
|
|
189
|
+
|
|
190
|
+
### Senate & House Trading Tools
|
|
191
|
+
|
|
192
|
+
- `getSenateTrading` - Get recent Senate trading activity
|
|
193
|
+
- `getHouseTrading` - Get recent House trading activity
|
|
194
|
+
- `getSenateTradingByName` - Get Senate trading by politician name
|
|
195
|
+
- `getHouseTradingByName` - Get House trading by politician name
|
|
196
|
+
- `getSenateTradingRSSFeed` - Get Senate trading RSS feed
|
|
197
|
+
- `getHouseTradingRSSFeed` - Get House trading RSS feed
|
|
198
|
+
|
|
199
|
+
### Institutional Tools
|
|
200
|
+
|
|
201
|
+
- `getInstitutionalHolders` - Get institutional holders for a company
|
|
202
|
+
|
|
203
|
+
### Insider Trading Tools
|
|
204
|
+
|
|
205
|
+
- `getInsiderTrading` - Get insider trading data for a company
|
|
206
|
+
|
|
207
|
+
## Using Individual Tools
|
|
208
|
+
|
|
209
|
+
You can import and use specific tool categories or individual tools from either provider:
|
|
210
|
+
|
|
211
|
+
### Import Specific Categories (Vercel AI)
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
import { quoteTools, financialTools, marketTools } from 'fmp-ai-tools/vercel-ai';
|
|
215
|
+
|
|
216
|
+
// Use only quote and financial tools
|
|
217
|
+
const selectedTools = {
|
|
218
|
+
...quoteTools,
|
|
219
|
+
...financialTools,
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// Use with Vercel AI SDK
|
|
223
|
+
const result = streamText({
|
|
224
|
+
model: openai('gpt-4o-mini'),
|
|
225
|
+
messages: convertToModelMessages(messages),
|
|
226
|
+
tools: selectedTools,
|
|
227
|
+
});
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Import Specific Categories (OpenAI)
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
import { quoteTools, financialTools, marketTools } from 'fmp-ai-tools/openai';
|
|
234
|
+
|
|
235
|
+
// Use only quote and financial tools
|
|
236
|
+
const selectedTools = [...quoteTools, ...financialTools];
|
|
237
|
+
|
|
238
|
+
// Use with OpenAI Agents
|
|
239
|
+
const agent = new Agent({
|
|
240
|
+
name: 'Financial Analyst',
|
|
241
|
+
instructions: 'You are a financial analyst with access to real-time market data.',
|
|
242
|
+
tools: selectedTools,
|
|
243
|
+
});
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Import Individual Tools
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
// Vercel AI SDK
|
|
250
|
+
import { getStockQuote, getCompanyProfile } from 'fmp-ai-tools/vercel-ai';
|
|
251
|
+
|
|
252
|
+
// OpenAI Agents
|
|
253
|
+
import { getStockQuote, getCompanyProfile } from 'fmp-ai-tools/openai';
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Example Tool Usage
|
|
257
|
+
|
|
258
|
+
Here are some example prompts you can use with the tools:
|
|
259
|
+
|
|
260
|
+
**Stock Analysis:**
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
"Get the current stock quote for Apple (AAPL) and show me their latest balance sheet"
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Market Research:**
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
"What are the top gaining stocks today and show me the overall market performance?"
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Economic Analysis:**
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
"Get the current treasury rates and show me the latest GDP data"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**ETF Research:**
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
"Show me the holdings of SPY ETF and get its profile information"
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Financial Analysis:**
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
"Get Apple's income statement, cash flow statement, and financial ratios for the last year"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Tool Parameters
|
|
291
|
+
|
|
292
|
+
Each tool accepts specific parameters. Here are some common ones:
|
|
293
|
+
|
|
294
|
+
- `symbol` - Stock/ETF symbol (e.g., "AAPL", "SPY")
|
|
295
|
+
- `period` - For financial statements: "annual" or "quarter"
|
|
296
|
+
- `from` - Start date in YYYY-MM-DD format
|
|
297
|
+
- `to` - End date in YYYY-MM-DD format
|
|
298
|
+
- `name` - For economic indicators: specific indicator name
|
|
299
|
+
|
|
300
|
+
## Error Handling
|
|
301
|
+
|
|
302
|
+
The tools handle API errors gracefully and will return informative error messages if:
|
|
303
|
+
|
|
304
|
+
- The API key is invalid or missing
|
|
305
|
+
- The requested data is not available
|
|
306
|
+
- Rate limits are exceeded
|
|
307
|
+
- Invalid parameters are provided
|
|
308
|
+
|
|
309
|
+
## Testing Tools
|
|
310
|
+
|
|
311
|
+
Test individual tools:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Test specific tools
|
|
315
|
+
pnpm test:tool getStockQuote
|
|
316
|
+
pnpm test:tool getCompanyProfile
|
|
317
|
+
pnpm test:tool getBalanceSheet
|
|
318
|
+
pnpm test:tool getMarketPerformance
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## For Direct API Access
|
|
322
|
+
|
|
323
|
+
If you need direct access to the FMP API without AI tools, use the `fmp-node-api` package:
|
|
324
|
+
|
|
325
|
+
```typescript
|
|
326
|
+
import { FMP } from 'fmp-node-api';
|
|
327
|
+
|
|
328
|
+
const fmp = new FMP({ apiKey: 'your_api_key_here' });
|
|
329
|
+
|
|
330
|
+
// Direct API calls
|
|
331
|
+
const quote = await fmp.quote.getQuote('AAPL');
|
|
332
|
+
const profile = await fmp.company.getCompanyProfile('AAPL');
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## License
|
|
336
|
+
|
|
337
|
+
MIT
|