Update app.py
Browse files6 unmodified lines789101112131415161718192021222324252627286 unmodified lines# Define the time intervaltimeframe = '4h''''def get_data(symbol):# Fetch OHLCV dataohlcv = exchange.fetch_ohlcv(symbol, timeframe)# Convert the data to a pandas DataFramedf = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])# Convert the timestamp to a datetime objectdf['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms')# Set the timestamp as the indexdf.set_index('timestamp', inplace=True)return df'''def get_data(symbol):# Initialize an empty list to store the datadata = []6 unmodified lines789101112136 unmodified lines# Define the time intervaltimeframe = '4h'def get_data(symbol):# Initialize an empty list to store the datadata = []
app.py-15