set_leverage
Set leverage for a HyperLiquid perpetual asset; because the direct update endpoint returns 404, pass the leverage value to open_perp_position with the order.
Instructions
Set leverage for a specific asset on HyperLiquid. Known broken: /hl/update_leverage has returned 404 in live tests. Pass leverage on open_perp_position instead (sent with the order).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"coin": "<coin>",
"leverage": "<leverage>"
},
"name": "set_leverage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Asset symbol | |
| apiKey | No | GDEX API key for AES encryption | |
| isCross | No | True for cross margin, false for isolated | |
| leverage | Yes | Leverage multiplier (1-50) | |
| accountRef | No | Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat | |
| walletAddress | No | Control wallet address | |
| sessionPrivateKey | No | Session private key from sign-in |