不同市场画图的数据单独获取

This commit is contained in:
2025-10-19 10:47:41 +08:00
parent 9e95b1260d
commit 2baf82b748
2 changed files with 56 additions and 0 deletions

12
crypto_chart.py Normal file
View File

@@ -0,0 +1,12 @@
import pandas as pd
from chart import plot_chart
if __name__ == "__main__":
symbol = "ETH_USDT"
timeframe = "1d"
data_path = f"/Users/aszer/Documents/vscode/cta/user_data/data/okx/{symbol}-{timeframe}.feather"
df = pd.read_feather(data_path)
df.rename(columns={"date": "time"}, inplace=True)
print(df.head())
plot_chart(df, symbol=symbol, name=symbol, timeframe=timeframe)