Add Binance SIM market adapter and exchange switch in settings.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,8 +14,7 @@ router = APIRouter(prefix="/api/market", tags=["market"])
|
||||
async def market_snapshot(_user: Annotated[str, Depends(require_user)]) -> dict:
|
||||
gw = get_gateway()
|
||||
snap = gw.snapshot_dict()
|
||||
if snap.get("pair") is None:
|
||||
raise HTTPException(status_code=503, detail="market not aligned yet")
|
||||
# 切换交易所后短时可能尚未对齐 ATM;仍返回结构便于前端展示交易所
|
||||
return snap
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user