Skip to main content

Endpoint

POST /exchange

Request Body

ParameterTypeDescription
action*objectSee below
action.type*stringMust be "updateLeverage"
action.asset*stringAsset ID as 8-char hex string (4 bytes), e.g., "01000000"
action.isCross*booleanMust be true (isolated margin not supported)
action.leverage*numberNew leverage value (integer)
nonce*numberTimestamp in milliseconds for replay protection
expiresAfternumberOptional expiration timestamp (ms)
signature*objectEIP-712 signature (r, s, v)

Response

{
  "status": "ok",
  "response": {
    "type": "updateLeverage"
  }
}

Example Request

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

Notes

  • Only cross margin is supported (isCross must be true)
  • Leverage bounds are validated against market metadata