Geek7 commited on
Commit
6296cba
·
verified ·
1 Parent(s): 7bb0afd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import pandas as pd
7
  API_KEY = "QR8F9B7T6R2SWTAT"
8
 
9
  def fetch_alpha_vantage_data(api_key):
10
- url = f'https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=IBM&interval=5min&apikey={api_key}'
11
  response = requests.get(url)
12
  alpha_vantage_data = response.json()
13
  return alpha_vantage_data
@@ -31,7 +31,7 @@ def main():
31
  alpha_vantage_data = fetch_alpha_vantage_data(api_key)
32
 
33
  # Extract relevant data from Alpha Vantage response
34
- alpha_vantage_time_series = alpha_vantage_data.get('Time Series (5min)', {})
35
  df = pd.DataFrame(alpha_vantage_time_series).T
36
  df.index = pd.to_datetime(df.index)
37
  df = df.dropna(axis=0)
 
7
  API_KEY = "QR8F9B7T6R2SWTAT"
8
 
9
  def fetch_alpha_vantage_data(api_key):
10
+ url = f'https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=IBM&interval=60min&apikey={api_key}'
11
  response = requests.get(url)
12
  alpha_vantage_data = response.json()
13
  return alpha_vantage_data
 
31
  alpha_vantage_data = fetch_alpha_vantage_data(api_key)
32
 
33
  # Extract relevant data from Alpha Vantage response
34
+ alpha_vantage_time_series = alpha_vantage_data.get('Time Series (60min)', {})
35
  df = pd.DataFrame(alpha_vantage_time_series).T
36
  df.index = pd.to_datetime(df.index)
37
  df = df.dropna(axis=0)