-
-
Notifications
You must be signed in to change notification settings - Fork 508
Description
Hi Jeroen,
thanks a lot for your great work on this project and sharing with the community. I was trying to include the FinanceToolkit in my application and all of a sudden it stopped working during development due to FMP cancelling some endpoints. I've forked the project to patch the URL issue, but it would be great, if it would be fixed here as well.
Best,
Heiner
The following analysis is AI generated after an analysis with Github Agent + Claude sonnet 4:
Bug Report: FinanceToolkit API Calls Hanging Due to FMP Legacy Endpoint Deprecation
Summary
FinanceToolkit API calls are stalling indefinitely instead of handling HTTP 403 errors gracefully when FMP's legacy endpoints were deprecated on August 31, 2025.
Problem Description
All Financial Modeling Prep API calls through FinanceToolkit hang forever without returning errors or timeouts, causing application freezes.
Root Cause
FMP deprecated all /api/v3/ endpoints on August 31, 2025. These now return HTTP 403 errors, but FinanceToolkit doesn't handle this gracefully.
API Endpoint Changes Required
Legacy Endpoints (❌ Deprecated - Returns HTTP 403)
https://financialmodelingprep.com/api/v3/profile/AAPL?apikey=YOUR_KEY
https://financialmodelingprep.com/api/v3/income-statement/AAPL?apikey=YOUR_KEY
https://financialmodelingprep.com/api/v3/balance-sheet-statement/AAPL?apikey=YOUR_KEY
Modern Endpoints (✅ Working)
https://financialmodelingprep.com/stable/profile?symbol=AAPL&apikey=YOUR_KEY
https://financialmodelingprep.com/stable/income-statement?symbol=AAPL&apikey=YOUR_KEY
https://financialmodelingprep.com/stable/balance-sheet-statement?symbol=AAPL&apikey=YOUR_KEY
Exact Error Message from FMP
{
"Error Message": "Legacy Endpoint : Due to Legacy endpoints being no longer supported - This endpoint is only available for legacy users who have valid subscriptions prior August 31, 2025. Please visit our subscription page to upgrade your plan or contact us at https://site.financialmodelingprep.com/developer/docs/pricing"
}HTTP Status Code: 403 Forbidden
FMP Release Reference
According to FMP's announcement, legacy /api/v3/ endpoints were deprecated on August 31, 2025 in favor of /stable/ endpoints.
Expected vs Actual Behavior
Expected: FinanceToolkit should either:
- Handle HTTP 403 errors gracefully with informative error messages
- Implement timeout mechanisms to prevent indefinite hanging
- Update to use modern
/stable/endpoints
Actual: API calls hang forever without any error handling, causing:
- Application freezes requiring force termination
- No error messages or diagnostic information
- Inability to catch exceptions for fallback handling
Impact
- FMP-dependent functionality is broken
- Applications freeze instead of showing helpful error messages
- Debugging is extremely difficult due to hanging calls
Suggested Fix
- Add proper HTTP error handling and timeout mechanisms
- Migrate all endpoints from
/api/v3/to/stable/with updated parameter structures
Files Affected
financetoolkit/fmp_model.py(primary API interface)financetoolkit/discovery/discovery_model.py- All functions calling FMP endpoints with api/v3 or not using the symbol parameter yet
Test Case to Reproduce
from financetoolkit import Toolkit
# This will hang indefinitely instead of raising an error
companies = Toolkit(["AAPL"], api_key="YOUR_API_KEY")
profile = companies.get_profile() # Hangs foreverEnvironment: All FinanceToolkit versions using FMP as data source
Date Identified: August 29, 2025