Overview
Ekiden supports isolated leverage settings per market. This allows users to control risk independently for each trading pair. Adjusting leverage changes how much margin is allocated to your open position in a given market. Increasing leverage frees up margin but increases liquidation risk, while lowering leverage adds margin and decreases risk.Endpoint
POST /api/v1/user/intent
Adjust the leverage multiplier for a specific market. This endpoint applies only to the specified market and cancels any open orders associated with it.
ActionStatus values used across intent processing:
- 0 = Pending — intent accepted and awaiting commitment
- 1 = Success — intent committed successfully
- 2 = Rejected — intent failed; see error message when available
POST /api/v1/user/intent/commit, which blocks until the intent is committed (Success) or rejected and returns the status (0/1/2) and optional error_message.
Headers
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| market | string | Market symbol (e.g. BTC-PERP) | Yes |
| leverage | integer | New leverage (e.g. 10 for 10x) | Yes |
| subAccount | string | Optional subaccount identifier | No |
Example Request
Example
Response
Error Example
Notes
- Leverage is isolated per market
- Min = 1x, Max = varies by market
- Open orders are cancelled when leverage is changed
- Changing leverage affects margin ratio and liquidation price
- Cannot increase leverage if margin requirements would be violated