(self, credentials: BundleCredentials)
| 6 | |
| 7 | class AlphaVantage(BundleHandler): |
| 8 | async def verify(self, credentials: BundleCredentials): |
| 9 | symbol: str = "NVDA" |
| 10 | |
| 11 | alpha_vantage_api_key: str = credentials.credentials.get("ALPHA_VANTAGE_API_KEY") |
| 12 | |
| 13 | url = f'https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol={symbol}&interval=5min&apikey={alpha_vantage_api_key}' |
| 14 | |
| 15 | async with ClientSession() as session: |
| 16 | async with session.get(url=url, proxy=CONFIG.PROXY) as response: |
| 17 | if response.status == 200: |
| 18 | pass |
| 19 | else: |
| 20 | raise_credentials_validation_error() |
| 21 | |
| 22 |
nothing calls this directly
no test coverage detected