Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,7 @@ def fetch_data(symbol='ETHUSDT', interval='1h', start_date='2021-01-01'):
|
|
| 73 |
print("Fetched data successfully.")
|
| 74 |
print(data)
|
| 75 |
klines += data
|
| 76 |
-
|
| 77 |
|
| 78 |
df = pd.DataFrame(klines, columns=['timestamp', 'Open', 'High', 'Low', 'Close', 'Volume', 'Close_time', 'Quote_asset_volume', 'Number_of_trades', 'Taker_buy_base_asset_volume', 'Taker_buy_quote_asset_volume', 'Ignore'])
|
| 79 |
df['Close'] = df['Close'].astype(float)
|
|
|
|
| 73 |
print("Fetched data successfully.")
|
| 74 |
print(data)
|
| 75 |
klines += data
|
| 76 |
+
start_date = datetime.fromtimestamp(data[-1][6] / 1000, timezone.utc) + timedelta(milliseconds=1)
|
| 77 |
|
| 78 |
df = pd.DataFrame(klines, columns=['timestamp', 'Open', 'High', 'Low', 'Close', 'Volume', 'Close_time', 'Quote_asset_volume', 'Number_of_trades', 'Taker_buy_base_asset_volume', 'Taker_buy_quote_asset_volume', 'Ignore'])
|
| 79 |
df['Close'] = df['Close'].astype(float)
|