diff --git a/cryptoai/routes/crypto.py b/cryptoai/routes/crypto.py index 798d28e..6954519 100644 --- a/cryptoai/routes/crypto.py +++ b/cryptoai/routes/crypto.py @@ -34,6 +34,11 @@ class CryptoAnalysisRequest(BaseModel): @router.get("/kline/{symbol}") 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() kline = binance_api.get_historical_klines(symbol=symbol, interval=timeframe, limit=limit, ts_transform=False).to_dict(orient="records") diff --git a/docker-compose.yml b/docker-compose.yml index 95c2f13..c933ae7 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.1.1 + image: cryptoai-api:0.1.2 restart: always ports: - "8000:8000"