Leverage & Margin
Configure leverage and margin type for trading pairs
Set Leverage
Change the leverage for a trading pair. The new leverage is saved to your account and persists across sessions and devices.
POST /v1/futures/leverage
Authorization: Bearer <token>
Content-Type: application/json
{
"symbol": "BTCUSDT",
"leverage": 20
}| Field | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading pair |
leverage | number | Yes | Leverage multiplier (1-125) |
Response:
{
"ok": true,
"data": {
"leverage": 20,
"symbol": "BTCUSDT"
}
}Your default leverage is returned in the authentication response (defaultLeverage) so the UI can display the correct value immediately on page load.
Set Margin Type
Switch between Cross and Isolated margin modes. The selected margin type is saved to your account.
POST /v1/futures/margin-type
Authorization: Bearer <token>
Content-Type: application/json
{
"symbol": "BTCUSDT",
"marginType": "ISOLATED"
}| Field | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading pair |
marginType | string | Yes | CROSSED or ISOLATED |
Margin Types:
| Type | Description |
|---|---|
CROSSED | All positions share the same margin pool. Lower liquidation risk but entire balance is at risk |
ISOLATED | Each position has its own margin. Limits loss to the position's margin only |
Changing margin type saves your preference — it is applied automatically when you place your next order via the marginType parameter. This means the change is instant and never fails.
Set Position Mode
Switch between One-Way and Hedge position modes. The selected mode is saved to your account and applies to all new orders.
POST /v1/futures/position-mode
Authorization: Bearer <token>
Content-Type: application/json
{
"positionMode": "HEDGE"
}| Field | Type | Required | Description |
|---|---|---|---|
positionMode | string | Yes | ONE_WAY or HEDGE |
Position Modes:
| Mode | Description |
|---|---|
ONE_WAY | One net position per symbol. BUY and SELL orders offset each other. Orders use positionSide: "BOTH". Default mode. |
HEDGE | Simultaneous LONG and SHORT positions on the same symbol. Orders use positionSide: "LONG" or "SHORT" and each side is tracked as an independent position with its own id. |
Response — success:
{
"ok": true,
"data": {
"positionMode": "HEDGE"
}
}Response — rejected (open positions exist):
The exchange does not allow switching modes while any position is open. Close all positions first, then retry.
{
"ok": false,
"error": { "code": -4068, "msg": "Cannot change position mode with open positions" }
}Your current position mode is returned in the authentication response as defaultPositionMode.
Default Settings
When you first create an account, the default settings are:
| Setting | Default |
|---|---|
| Leverage | 10x |
| Margin Type | Cross |
| Position Mode | One-Way |
These defaults are returned in the authentication response:
{
"ok": true,
"user": {
"id": "clx...",
"walletAddress": "0x...",
"accountId": "clx...",
"subAccountId": "34696153",
"defaultLeverage": 10,
"defaultMarginType": "CROSSED",
"defaultPositionMode": "ONE_WAY"
}
}When you change leverage, margin type, or position mode, the new values are saved and will be returned on your next login — even from a different device.
