> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notional.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Leverage

## Endpoint

```
POST /exchange
```

## Request Body

| Parameter           | Type    | Description                                           |
| ------------------- | ------- | ----------------------------------------------------- |
| `action`\*          | object  | See below                                             |
| `action.type`\*     | string  | Must be `"updateLeverage"`                            |
| `action.asset`\*    | string  | Perp AssetId as 8-char hex string, e.g., `"00020000"` |
| `action.isCross`\*  | boolean | Must be `true` (isolated margin not supported)        |
| `action.leverage`\* | number  | New leverage value (integer)                          |
| `nonce`\*           | number  | Timestamp in milliseconds for replay protection       |
| `expiresAfter`      | number  | Optional expiration timestamp (ms)                    |
| `signature`\*       | object  | EIP-712 signature (r, s, v)                           |

## Response

```json theme={null}
{
  "status": "ok",
  "response": {
    "type": "updateLeverage"
  }
}
```

## Example Request

```bash theme={null}
curl -X POST https://api.notional.xyz/exchange \
  -H "Content-Type: application/json" \
  -d '{
    "action": {
      "type": "updateLeverage",
      "asset": "00020000",
      "isCross": true,
      "leverage": 5
    },
    "nonce": 1701234567890,
    "signature": {
      "r": "0x1234...",
      "s": "0x5678...",
      "v": 27
    }
  }'
```

## Notes

<Note>
  * Only cross margin is supported (`isCross` must be `true`) - Leverage bounds are validated
    against market metadata
</Note>
