update
This commit is contained in:
parent
3c697a304c
commit
8e6f06025c
@ -34,6 +34,11 @@ class CryptoAnalysisRequest(BaseModel):
|
|||||||
@router.get("/kline/{symbol}")
|
@router.get("/kline/{symbol}")
|
||||||
async def get_crypto_kline(symbol: str, timeframe: Optional[str] = None, limit: Optional[int] = 200):
|
async def get_crypto_kline(symbol: str, timeframe: Optional[str] = None, limit: Optional[int] = 200):
|
||||||
|
|
||||||
|
if symbol.endswith("USDT"):
|
||||||
|
symbol = symbol
|
||||||
|
else:
|
||||||
|
symbol = symbol + "USDT"
|
||||||
|
|
||||||
binance_api = get_binance_api()
|
binance_api = get_binance_api()
|
||||||
|
|
||||||
kline = binance_api.get_historical_klines(symbol=symbol, interval=timeframe, limit=limit, ts_transform=False).to_dict(orient="records")
|
kline = binance_api.get_historical_klines(symbol=symbol, interval=timeframe, limit=limit, ts_transform=False).to_dict(orient="records")
|
||||||
|
|||||||
@ -29,7 +29,7 @@ services:
|
|||||||
cryptoai-api:
|
cryptoai-api:
|
||||||
build: .
|
build: .
|
||||||
container_name: cryptoai-api
|
container_name: cryptoai-api
|
||||||
image: cryptoai-api:0.1.1
|
image: cryptoai-api:0.1.2
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user