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.
Metadata
Release files for at-external-fmp 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| at_external_fmp-1.0.1.tar.gz | 31.3 kB | Without provenance | Details for at_external_fmp-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| at_external_fmp-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for at_external_fmp-1.0.1-py3-none-any.whl |
Total release size: 69.2 kB
Release files / at_external_fmp-1.0.1.tar.gz
| Download URL | at_external_fmp-1.0.1.tar.gz |
|---|---|
| Size | 31.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17201f617d614eb1ca5fa42d9fdac319fec756005ca15ad51e812fee7fe79cc4
|
|
BLAKE2b-256 checksum How to use checksums |
68c815139a4c18877da6410c76ab7d95a4c2a5f8dbb57fe4e963446bfcdf4126
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / at_external_fmp-1.0.1-py3-none-any.whl
| Download URL | at_external_fmp-1.0.1-py3-none-any.whl |
|---|---|
| Size | 37.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cf9244ac92accfa5f529e449dd20f1106935da3171fd9e9dcf3508f9a9f0521
|
|
BLAKE2b-256 checksum How to use checksums |
d0f94567898d240461de98245424ed0ec31e55813959bdbf1aeb411b53f0f0d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for at-external-fmp 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.