You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same here. I have a free account and am not nowhere near the limits (https://finnhub.io/docs/api/rate-limit), so probably 95% of data is not available to free accounts, just like any other "free" financial API.
Hi, dear all,
I am a new learner of Finnhub who is trying to do some basic work with Finnhub.
Finnhub-python version: 2.24.20.
Here is the code. API-key I have stored in .env with FINNHUB_KEY=xxxxxxxxxxxxxxxxxxxxxx
from decouple import config
import finnhub
import json
import pandas as pd
from pprint import pprint
import requests
-# Get the tokens for API access
api_key = config("FINNHUB_KEY")
-# Specify params
symbol = 'IBM'
interval = 'D'
start_date = 1609455600 #2021-01-01
end_date = 1612047600 #2021-01-31
-# Specify endpoints
base_url = 'https://finnhub.io/api/v1'
endpoint = '/stock/candle?'
query = f'symbol={symbol}&resolution={interval}&from={start_date}&to={end_date}&token={api_key}'
-# Get request
response = requests.get(base_url + endpoint + query)
pprint(response.json())
-# Convert to DataFrame
data = pd.DataFrame.from_records(response.json())
data['t'] = pd.to_datetime(data['t'], unit='s')
print(data.head())
Error:
{'error': "You don't have access to this resource."}
Could someone help me on this point?
The text was updated successfully, but these errors were encountered: