Provides an API client for retrieving financial data from the Financial Modeling Prep API, organized into structured modules for various financial metrics.
Project description
at-external-fmp
A Python library that provides a structured API client for retrieving financial data from the Financial Modeling Prep (FMP) API. This package organizes various financial metrics and data points into well-structured modules for easy access and integration.
Overview
The at-external-fmp package offers a comprehensive interface to the Financial Modeling Prep API, allowing you to access a wide range of financial data including:
- Company profiles and information
- Stock quotes and price data
- Financial statements
- Market performance metrics
- News and calendar events
- Analyst recommendations
- ESG scores
- Cryptocurrency and forex data
- ETF and mutual fund information
- Economic indicators
- And much more
Installation
pip install at-external-fmp
Requirements
- Python 3.11 or higher
- An API key from Financial Modeling Prep
Configuration
Set your FMP API key as an environment variable:
export FMP_API_KEY="your_api_key_here"
Alternatively, you can use a .env file in your project root:
FMP_API_KEY=your_api_key_here
Usage
The library is designed with an async-first approach, making it suitable for high-performance applications. Each module provides specific functionality for different types of financial data.
Basic Example
import asyncio
from at_common_fmp import company, quote
async def main():
# Get company profile
profile_data = await company.profile("AAPL")
print(f"Company Name: {profile_data[0]['companyName']}")
# Get current stock quote
quote_data = await quote.quote("AAPL")
print(f"Current Price: ${quote_data[0]['price']}")
if __name__ == "__main__":
asyncio.run(main())
Available Modules
- analyst: Access analyst recommendations, price targets, and upgrades/downgrades
- calendar: Retrieve earnings calendars, IPO calendars, stock splits, and dividend dates
- chart: Get historical price data and technical indicators
- company: Access company profiles, executive information, and corporate data
- crypto: Retrieve cryptocurrency quotes and information
- directory: Access directories of stocks, ETFs, and other financial instruments
- economics: Get economic indicators and data
- esg: Access Environmental, Social, and Governance scores
- etf_and_mutual_funds: Retrieve ETF and mutual fund data
- forex: Access foreign exchange rates and data
- index: Get market index data
- market_hours: Check market trading hours and holidays
- market_performance: Access sector performance, gainers, losers, and market metrics
- news: Retrieve financial news and press releases
- quote: Get real-time and historical stock quotes
- search: Search for stocks, ETFs, and other financial instruments
- statements: Access financial statements including income statements, balance sheets, and cash flow statements
Rate Limiting
The library includes built-in rate limiting to prevent exceeding the API's rate limits. By default, it's configured to make a maximum of 5 requests per second.
Error Handling
The client includes automatic retry logic with exponential backoff for handling temporary API issues.
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/apex-trader/at-external-fmp.git
cd at-external-fmp
# Install development dependencies
pip install -e ".[dev]"
Running Tests
pytest
License
[License information]
Contributing
[Contribution guidelines]
Support
For questions and support, please open an issue on the GitHub repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file at_external_fmp-1.0.1.tar.gz.
File metadata
- Download URL: at_external_fmp-1.0.1.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17201f617d614eb1ca5fa42d9fdac319fec756005ca15ad51e812fee7fe79cc4
|
|
| MD5 |
260ce3b1c10f6bd22e09a3cd33f86ce0
|
|
| BLAKE2b-256 |
68c815139a4c18877da6410c76ab7d95a4c2a5f8dbb57fe4e963446bfcdf4126
|
File details
Details for the file at_external_fmp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: at_external_fmp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 37.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cf9244ac92accfa5f529e449dd20f1106935da3171fd9e9dcf3508f9a9f0521
|
|
| MD5 |
b10ee472067fe036dd64f75a2cc264d3
|
|
| BLAKE2b-256 |
d0f94567898d240461de98245424ed0ec31e55813959bdbf1aeb411b53f0f0d7
|