Dmitry Beresnev
commited on
Commit
·
2671ab5
1
Parent(s):
59845f6
fix the requests to the FMP API
Browse files
src/api/insiders/insider_trading_aggregator.py
CHANGED
|
@@ -20,7 +20,7 @@ class InsiderTradingAggregator:
|
|
| 20 |
# API configurations
|
| 21 |
self.apis = {
|
| 22 |
'fmp': {
|
| 23 |
-
'base_url': 'https://financialmodelingprep.com/
|
| 24 |
'api_key': Config.FMP_API_KEY,
|
| 25 |
'rate_limit': 250, # Daily limit
|
| 26 |
'requests_per_minute': 10
|
|
@@ -131,7 +131,7 @@ class InsiderTradingAggregator:
|
|
| 131 |
|
| 132 |
# Inner Loop: Handle pagination for the current day.
|
| 133 |
while True:
|
| 134 |
-
endpoint = "insider-trading"
|
| 135 |
params = {
|
| 136 |
'symbol': symbol,
|
| 137 |
'date': date_str,
|
|
|
|
| 20 |
# API configurations
|
| 21 |
self.apis = {
|
| 22 |
'fmp': {
|
| 23 |
+
'base_url': 'https://financialmodelingprep.com/stable',
|
| 24 |
'api_key': Config.FMP_API_KEY,
|
| 25 |
'rate_limit': 250, # Daily limit
|
| 26 |
'requests_per_minute': 10
|
|
|
|
| 131 |
|
| 132 |
# Inner Loop: Handle pagination for the current day.
|
| 133 |
while True:
|
| 134 |
+
endpoint = "insider-trading/latest"
|
| 135 |
params = {
|
| 136 |
'symbol': symbol,
|
| 137 |
'date': date_str,
|