RapidAPI 経由で金融データを安定的に取得するための、レート制限への自動適応機能を備えた Python ライブラリ。
- レート制限への自動適応:
X-RateLimit-*ヘッダーをリアルタイムに監視し、プロバイダーの制限を遵守しながら効率的にリクエスト。 - インテリジェント・バックオフ: 429 エラーやボディ内の警告(
Burst pattern detected等)を検知すると、自動で待機・リトライ。 - バースト検知回避 (Jitter): リクエスト間隔にランダムなゆらぎを加え、機械的なパターンを排除。
- クォータ(1日上限)管理: 24時間の上限に達した際、正確な回復時刻を算出し、待機するか例外を投げて終了するかを選択可能。
uv add "git+https://github.com/nohikomiso/rapidapi-financial-python.git"from alpha_vantage.fundamentaldata import FundamentalData
# wait_on_quota_exhausted=False にすると、1日の上限到達時にスリープせず例外を投げます
fd = FundamentalData(key='YOUR_RAPIDAPI_KEY', rapidapi=True, wait_on_quota_exhausted=True)
data, meta_data = fd.get_earnings_quarterly('AAPL')🌐 Click here for English Version
A Python library with automatic rate-limit adaptation for stable financial data acquisition via RapidAPI.
- Automatic Rate-Limit Adaptation: Monitors
X-RateLimit-*headers in real-time to ensure efficient requests while respecting provider limits. - Intelligent Backoff: Automatically waits and retries upon detecting 429 errors or in-body warnings (e.g.,
Burst pattern detected). - Burst Avoidance (Jitter): Adds random fluctuations to request intervals to eliminate mechanical patterns and stay under security filters.
- Daily Quota Management: When the 24-hour limit is reached, it calculates the exact recovery time. You can choose to either wait automatically or raise an exception.
uv add "git+https://github.com/nohikomiso/rapidapi-financial-python.git"from alpha_vantage.fundamentaldata import FundamentalData
# Set wait_on_quota_exhausted=False to raise an exception instead of sleeping when the daily limit is hit.
fd = FundamentalData(key='YOUR_RAPIDAPI_KEY', rapidapi=True, wait_on_quota_exhausted=True)
data, meta_data = fd.get_earnings_quarterly('AAPL')git clone https://github.com/nohikomiso/rapidapi-financial-python.git
cd rapidapi-financial-python
uv syncThis project is an enhanced version of the excellent alpha_vantage (v3.0.0) by Romel Torres, with added automatic rate-limiting features for RapidAPI.
MIT License - Copyright (c) 2017 Romel Torres / 2026 nohikomiso