FMP Node API Documentation
Getting Started
Welcome to the FMP Node Wrapper! This guide will help you get up and running quickly.
Installation
Install the package using pnpm (recommended):
Or using npm:
Or using yarn:
API Key Setup
To use the FMP Node Wrapper, you'll need an API key from Financial Modeling Prep:
- Visit Financial Modeling Prep (opens in new tab)
- Sign up for an account
- Navigate to your dashboard to get your API key
Basic Setup
Here's how to initialize the client:
Configuration Options
The FMP
client accepts the following configuration options:
Option | Type | Default | Description |
---|---|---|---|
apiKey | string | FMP_API_KEY env var | Your FMP API key (optional if env var is set) |
timeout | number | 10000 | Request timeout in milliseconds |
Your First API Call
Let's make your first API call to get a stock quote:
Response Format
All API methods return a consistent response format:
success
: Boolean indicating if the request was successfuldata
: The response data (null if unsuccessful)error
: Error message string (null if successful)status
: HTTP status code
Error Handling
Always check the success
property before accessing the
data:
Environment Variables
For security, store your API key in environment variables. The FMP client automatically detects the FMP_API_KEY
environment variable:
Create a .env
file in your project root:
Or set it in your system environment:
⚠️ Security Note: Never commit your .env
file to version control. It should already be in your .gitignore
.
💡 Pro Tip
All code blocks in this documentation include a copy button that appears when you hover over them. Click the copy icon to quickly copy the code to your clipboard!
Next Steps
Now that you have the basics set up, explore:
- Configuration - Detailed configuration options and best practices
- API Reference - Complete endpoint documentation
- Stock Endpoints - Stock-specific API methods
- Financial Endpoints - Financial statement methods
- Examples - Practical code samples
Common Issues
API Key Issues
- Make sure your API key is valid and active
- Check your FMP account for any usage limits
- Verify the API key is correctly passed to the client
Network Issues
- Check your internet connection
- Verify the base URL is accessible
- Consider increasing the timeout for slower connections
TypeScript Issues
- Ensure you're using TypeScript 4.5+ for best type support
- All types are included in the main package
Ready to explore the API? Check out the API Reference for detailed endpoint documentation.
Documentation
Quotes
Information
Resources
Getting Started
Welcome to the FMP Node Wrapper! This guide will help you get up and running quickly.
Installation
Install the package using pnpm (recommended):
Or using npm:
Or using yarn:
API Key Setup
To use the FMP Node Wrapper, you'll need an API key from Financial Modeling Prep:
- Visit Financial Modeling Prep (opens in new tab)
- Sign up for an account
- Navigate to your dashboard to get your API key
Basic Setup
Here's how to initialize the client:
Configuration Options
The FMP
client accepts the following configuration options:
Option | Type | Default | Description |
---|---|---|---|
apiKey | string | FMP_API_KEY env var | Your FMP API key (optional if env var is set) |
timeout | number | 10000 | Request timeout in milliseconds |
Your First API Call
Let's make your first API call to get a stock quote:
Response Format
All API methods return a consistent response format:
success
: Boolean indicating if the request was successfuldata
: The response data (null if unsuccessful)error
: Error message string (null if successful)status
: HTTP status code
Error Handling
Always check the success
property before accessing the
data:
Environment Variables
For security, store your API key in environment variables. The FMP client automatically detects the FMP_API_KEY
environment variable:
Create a .env
file in your project root:
Or set it in your system environment:
⚠️ Security Note: Never commit your .env
file to version control. It should already be in your .gitignore
.
💡 Pro Tip
All code blocks in this documentation include a copy button that appears when you hover over them. Click the copy icon to quickly copy the code to your clipboard!
Next Steps
Now that you have the basics set up, explore:
- Configuration - Detailed configuration options and best practices
- API Reference - Complete endpoint documentation
- Stock Endpoints - Stock-specific API methods
- Financial Endpoints - Financial statement methods
- Examples - Practical code samples
Common Issues
API Key Issues
- Make sure your API key is valid and active
- Check your FMP account for any usage limits
- Verify the API key is correctly passed to the client
Network Issues
- Check your internet connection
- Verify the base URL is accessible
- Consider increasing the timeout for slower connections
TypeScript Issues
- Ensure you're using TypeScript 4.5+ for best type support
- All types are included in the main package
Ready to explore the API? Check out the API Reference for detailed endpoint documentation.