updateLeverage

post
/exchange

Update cross or isolated leverage on a coin.

Body

Update cross or isolated leverage on a coin.

nonceintegerRequired

Unique request identifier (current timestamp in ms).

vaultAddressstring · min: 42 · max: 42Optional

Vault address (for vault trading).

Pattern: ^0[xX][0-9a-fA-F]+$
expiresAfterintegerOptional

Expiration time of the action.

Responses
200

Successful response without specific data or error response.

application/json
Responseany of

Successful response without specific data or error response.

or
post
/exchange
POST /exchange HTTP/1.1
Host: api.hyperliquid.xyz
Content-Type: application/json
Accept: */*
Content-Length: 166

{
  "action": {
    "type": "updateLeverage",
    "asset": 1,
    "isCross": true,
    "leverage": 1
  },
  "nonce": 1,
  "signature": {
    "r": "text",
    "s": "text",
    "v": 27
  },
  "vaultAddress": "text",
  "expiresAfter": 1
}
{
  "status": "ok",
  "response": {
    "type": "default"
  }
}

Last updated