This commit is contained in:
KienVT9 2025-05-22 19:04:57 +07:00
parent ac32800ba7
commit 7cc42ee6a1
7 changed files with 82 additions and 82 deletions

View file

@ -21,9 +21,9 @@ def get_user_api(user_id: str):
@router.get("/positions", tags=["Position"])
def get_positions(
userId: str = Query(..., description="ID của user để lấy API key/secret"),
symbol: Optional[str] = Query(None, description="Mã giao dịch, ví dụ: BTCUSDT"),
category: str = Query("linear", description="Loại lệnh: linear (future) hoặc spot")
userId: str = Query(..., description="User ID to get API key/secret"),
symbol: Optional[str] = Query(None, description="Trading symbol, e.g. BTCUSDT"),
category: str = Query("linear", description="Order type: linear (future) or spot")
):
api_key, api_secret = get_user_api(userId)
client = get_bybit_client(api_key, api_secret)