fmp-py-client
A fully asynchronous Python client for the Financial Modeling Prep API. Access 180+ financial data endpoints with a modern, type-safe interface.
Features
- Async/await support - Built on
httpxfor high-performance concurrent requests - Fully typed - Complete type hints for IDE autocomplete and static analysis
- 180+ endpoints - Stocks, financials, ETFs, crypto, forex, economics, and more
- Clean API - Intuitive method names that mirror the FMP API structure
- Robust error handling - Custom exceptions with detailed error information
Installation
pip install fmp-py-client
Or with uv:
uv add fmp-py-client
Quick Start
import asyncio
from fmp_py_client import AsyncFMPClient
async def main():
async with AsyncFMPClient("your-api-key") as client:
# Get a stock quote
quote = await client.quote("AAPL")
print(f"Apple: ${quote[0]['price']}")
# Get company profile
profile = await client.profile("AAPL")
print(f"Market Cap: ${profile[0]['mktCap']:,}")
# Search for companies
results = await client.search_name("Tesla", limit=5)
for company in results:
print(f"{company['symbol']}: {company['name']}")
asyncio.run(main())
API Coverage
| Category | Examples |
|---|---|
| Quotes | Real-time quotes, aftermarket, batch quotes |
| Company | Profiles, executives, peers, screener |
| Financials | Income statements, balance sheets, cash flow |
| Metrics | Key metrics, ratios, financial scores |
| Historical | EOD prices, intraday charts (1min to 4hr) |
| Calendar | Dividends, splits, earnings, IPOs |
| Market | Stock lists, ETFs, mutual funds, indices |
| News | Company news, sentiment analysis |
| Technical | SMA, EMA, RSI, MACD, Bollinger Bands |
| Valuation | DCF, enterprise values |
| SEC | Filings, insider trading |
| Economics | Treasury rates, economic calendar |
Error Handling
from fmp_py_client import (
AsyncFMPClient,
FMPAuthenticationError,
FMPRateLimitError,
FMPNotFoundError,
)
async with AsyncFMPClient("your-api-key") as client:
try:
quote = await client.quote("AAPL")
except FMPAuthenticationError:
print("Invalid API key")
except FMPRateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
except FMPNotFoundError:
print("Symbol not found")
Documentation
Full documentation is available at cbian.github.io/fmp-py-client.
Requirements
- Python 3.12+
- An API key from Financial Modeling Prep (free tier available)
License
MIT
Metadata
Release files for fmp-py-client 0.1.0
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 |
|---|---|---|---|---|
| fmp_py_client-0.1.0.tar.gz | 12.3 kB | Without provenance | Details for fmp_py_client-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fmp_py_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fmp_py_client-0.1.0-py3-none-any.whl |
Total release size: 34.9 kB
Release files / fmp_py_client-0.1.0.tar.gz
| Download URL | fmp_py_client-0.1.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40d77cec3de9c5412f674c32d666ec451f1b5e6014b4beeb46dfdc588d7c9029
|
|
BLAKE2b-256 checksum How to use checksums |
9e08eb12e013bf3c0112616f860531bad03031f2ea54b8ae0462ef3a7afe9fee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / fmp_py_client-0.1.0-py3-none-any.whl
| Download URL | fmp_py_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6360387ab33d75216292039ecab6f76ad615d42beb612eb3fa5787cbfaba41d
|
|
BLAKE2b-256 checksum How to use checksums |
bbf28c1c207259874af88e23670b70aa812947dd0c512662539539cc96fdfc82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for fmp-py-client 0.1.0
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.