update
This commit is contained in:
parent
6ca2dd87a2
commit
efaa43722c
Binary file not shown.
@ -84,7 +84,7 @@ class BinanceAPI:
|
||||
print(f"获取交易对大户持仓多空比时出错: {e}")
|
||||
return 0
|
||||
|
||||
def get_historical_klines(self, symbol: str, interval: str, start_str: Optional[str] = None, end_str: Optional[str] = None, limit: int = 100) -> 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线数据
|
||||
|
||||
|
||||
@ -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
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user