v1

latestOpenAPI 3.0.32026-07-2613529376.3 KB
Collateral Trading

Change Collateral Account Leverage

The endpoint changes the leverage level for the collateral trading account. Leverage determines the ratio of borrowed funds to collateral and directly affects margin requirements and liquidation thresholds. Accepted values: 1, 2, 3, 5, 10, 20, 50, 100.

Each leverage level has a corresponding bracket defining the maximum position size for the tier. When a position exceeds the bracket limit, the system applies higher tiers with progressively lower leverage. Query market-specific brackets via GET /api/v4/public/futures.

<Warning> Rate limit: 1000 requests/10 sec. </Warning> <Note> A market's `max_leverage` field (from `GET /api/v4/public/futures`) may be lower than `100`. Setting leverage above a market's maximum results in an error. </Note> <Warning> Changing leverage affects **all open positions** across margin and futures trading. Decreasing leverage increases margin requirements — if available funds are insufficient to support the new level, the request returns an error. </Warning> <Accordion title="Error Codes"> - `30` - invalid `leverage` value (out of range, non-integer, or wrong type). Setting leverage above a market's `max_leverage` also surfaces here as an out-of-range value - `17` - the requested leverage is valid but available balance is insufficient to support it - `113` - leverage cannot be changed while open positions or orders exist </Accordion>
post/api/v4/collateral-account/leverage

Request body

leverageinteger required

Target leverage level. Accepted values: 1, 2, 3, 5, 10, 20, 50, 100. The effective maximum depends on the market's max_leverage.

requeststring required
nonceinteger required

Example request

{
  "leverage": 5,
  "request": "{{request}}",
  "nonce": 1594297865000
}

Response

Successful response - leverage changed

leverageinteger

Active leverage level for the collateral account after the update, from 1 (no leverage) to 100

Example response

{
  "leverage": 5
}