Skip to main content
POST /api/v1/account/leverage

Operation Type (for Signing)

Header FieldTypeContent
"type"string"update_leverage"
Request Body
FieldTypeNeedDescriptionExample
”account”stringrequiredUser’s wallet address42trU9A5…
“symbol”stringrequiredTrading pair symbolBTC
”leverage”integerrequiredNew leverage value10
”timestamp”integerrequiredCurrent timestamp in milliseconds1716200000000
”expiry_window”integeroptionalSignature expiry in milliseconds30000
”agent_wallet”stringoptionalAgent wallet address69trU9A5…
“signature”stringrequiredCryptographic signature5j1Vy9Uq…
{
  "account": "42trU9A5...",
  "symbol": "BTC",
  "leverage": 10,
  "timestamp": 1716200000000,
  "expiry_window": 30000,
  "agent_wallet": "69trU9A5...",
  "signature": "5j1Vy9UqY..."
}

Response

  • Status 200: Leverage updated successfully
 {
    "success": true
  }
  • Status 400: Invalid request parameters
  {
    "error": "Invalid leverage",
    "code": 400
  }
  • Status 500: Internal server error

Code Example (Python)

import requests

payload = {
    "account": "42trU9A5...",
    "signature": "5j1Vy9Uq...",
    "timestamp": 1716200000000,
    "symbol": "BTC",
    "leverage": 10
}

response = requests.post(
    "/api/v1/account/leverage",
    json=payload,
    headers={"Content-Type": "application/json"}
)

data = response.json()