From efaa43722c7ea66c358fcfcdee4e4f36e52e4b49 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sun, 15 Jun 2025 09:46:24 +0800 Subject: [PATCH] update --- .../__pycache__/binance_api.cpython-313.pyc | Bin 10007 -> 10007 bytes cryptoai/api/binance_api.py | 2 +- cryptoai/routes/crypto.py | 6 ++---- docker-compose.yml | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cryptoai/api/__pycache__/binance_api.cpython-313.pyc b/cryptoai/api/__pycache__/binance_api.cpython-313.pyc index a073857568e8f6cdfbd48ccf6c6f9b42fb6bc205..aac98f7b0f7484a445ddc95526399465630ac542 100644 GIT binary patch delta 93 zcmbR4H{FlxGcPX}0}v>vZsdBb$bSOJ)MU*3!U&>XrfmMB7{koiJ2_G{lyTzZ^{PKq kdVvaxCW43_5TOPl#DK&t4x8Nkl+v73yP{c>PpkO=0Iu&EY5)KL delta 93 zcmbR4H{FlxGcPX}0}xzR*~s-+kv|2<)MU*3!U&>@8aMw@jA3T%nH;Ga$~a;2det8) jJwOFT6F@{ah)@F&VnE^+hfQvNN@-52UD3?Rr`3D_v pd.DataFrame: + def get_historical_klines(self, symbol: str, interval: str, start_str: Optional[str] = None, end_str: Optional[str] = None, limit: int = 200) -> pd.DataFrame: """ 获取历史K线数据 diff --git a/cryptoai/routes/crypto.py b/cryptoai/routes/crypto.py index 96aade1..5235bbc 100644 --- a/cryptoai/routes/crypto.py +++ b/cryptoai/routes/crypto.py @@ -60,7 +60,7 @@ async def get_crypto_kline(symbol: str, timeframe: Optional[str] = None, limit: @router.get("/news") async def get_crypto_news(session: Session = Depends(get_db)): - url = 'https://api.blockbeats.cn/h5v1/newsflash/list?page=1&limit=0&ios=1&end_time=&detective=-2' + url = 'https://api.blockbeats.cn/h5v1/newsflash/list?page=1&limit=15&ios=1&end_time=&detective=-2' response = requests.get(url) data = response.json() @@ -73,9 +73,7 @@ async def get_crypto_news(session: Session = Depends(get_db)): result.append({ "title": item["title"], "content": item["content"], - "timestamp": timestamp, - "add_time": add_time, - "url" : item["url"] + "add_time": add_time }) return result \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 5351d8b..7455f4d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: cryptoai-api: build: . container_name: cryptoai-api - image: cryptoai-api:0.2.19 + image: cryptoai-api:0.2.20 restart: always ports: - "8000:8000"