Skip to main content
GET
/
api
/
v1
/
accounts
/
leverage
/
{symbol}
curl -X GET "https://api.roxom.com/api/v1/accounts/leverage/CL" \
  -H "X-API-Key: your_api_key_here" \
  -H "X-API-Signature: your_rsa_signature_here" \
  -H "Content-Type: application/json"
{
  "data": {
    "leverage": "10.0"
  }
}

Get Leverage

Retrieve current leverage setting for a specific trading symbol.

Endpoint

GET /api/v1/accounts/leverage/{symbol}

Parameters

symbol
string
required
Trading symbol to get leverage for (e.g., “OIL-BTC”)
X-API-Key
string
required
RSA public key identifier for authentication
X-API-Signature
string
required
Base64-encoded RSA signature of the request payload. Payload format: GET:/api/v1/accounts/leverage/{symbol}

Example Request

curl -X GET "https://api.roxom.com/api/v1/accounts/leverage/CL" \
  -H "X-API-Key: your_api_key_here" \
  -H "X-API-Signature: your_rsa_signature_here" \
  -H "Content-Type: application/json"

Response

{
  "data": {
    "leverage": "10.0"
  }
}
data
object
Leverage information for the requested symbol

Set Leverage

Update leverage setting for a specific trading symbol.

Endpoint

POST /api/v1/accounts/leverage/{symbol}

Parameters

symbol
string
required
Trading symbol to set leverage for (e.g., “OIL-BTC”)
X-API-Key
string
required
RSA public key identifier for authentication
X-API-Signature
string
required
Base64-encoded RSA signature of the request payload. Payload format: POST:/api/v1/accounts/leverage/{symbol}:sorted_body_params

Request Body

leverage
string
required
Desired leverage value as decimal string (must be within allowed range)

Example Request

curl -X POST "https://api.roxom.com/api/v1/accounts/leverage/CL" \
  -H "X-API-Key: your_api_key_here" \
  -H "X-API-Signature: your_rsa_signature_here" \
  -H "Content-Type: application/json" \
  -d '{
    "leverage": "25.0"
  }'

Response

{
  "data": {
    "success": true,
    "leverage": 25,
    "symbol": "OIL-BTC"
  }
}
data
object
Leverage update confirmation

Leverage Limits

Different instruments have different maximum leverage limits:Perpetual Contracts: 1x to 50xSpot Trading: 1x (no leverage)Digital Assets: 1x to 10xEquity Instruments: 1x to 20x
Higher leverage increases both potential profits and losses:
  • 10x leverage: 1% price move = 10% P&L
  • 25x leverage: 1% price move = 25% P&L
  • 50x leverage: 1% price move = 50% P&L
High leverage increases liquidation risk. Use appropriate position sizing.
Initial margin requirements vary by leverage:
  • 10x leverage: 10% initial margin
  • 25x leverage: 4% initial margin
  • 50x leverage: 2% initial margin
Maintenance margin is typically 50% of initial margin.

Error Handling

Invalid Leverage Value

{
  "code": "VALIDATION_ERROR",
  "message": "Invalid leverage value",
  "details": "Leverage must be between 1 and 50 for this symbol"
}

Symbol Not Found

{
  "code": "NOT_FOUND",
  "message": "Symbol not found",
  "details": "Trading symbol 'INVALID' does not exist"
}
I