update
This commit is contained in:
parent
0f280508ae
commit
6610457f8b
@ -104,7 +104,7 @@ class AllTickAPI:
|
||||
df = pd.DataFrame(kline_data)
|
||||
|
||||
# 转换列类型
|
||||
df["timestamp"] = pd.to_datetime(df["timestamp"].astype(int), unit="s")
|
||||
df["timestamp"] = df["timestamp"].astype(int)
|
||||
df["open"] = df["open_price"].astype(float)
|
||||
df["high"] = df["high_price"].astype(float)
|
||||
df["low"] = df["low_price"].astype(float)
|
||||
@ -112,10 +112,10 @@ class AllTickAPI:
|
||||
df["volume"] = df["volume"].astype(float)
|
||||
|
||||
# 设置索引
|
||||
df.set_index("timestamp", inplace=True)
|
||||
# df.set_index("timestamp", inplace=True)
|
||||
|
||||
# 选择需要的列
|
||||
df = df[["open", "high", "low", "close", "volume"]]
|
||||
df = df[["open", "high", "low", "close", "volume","timestamp"]]
|
||||
|
||||
return df
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ services:
|
||||
cryptoai-api:
|
||||
build: .
|
||||
container_name: cryptoai-api
|
||||
image: cryptoai-api:0.1.37
|
||||
image: cryptoai-api:0.1.38
|
||||
restart: always
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user