Update isolated margin

Add or remove margin from an isolated position. Positive amount adds margin, negative removes. Gas sponsored by API service.

Permit: Client signs an EIP-712 VerifyWitness permit; the server recovers the signer off-chain and matches it to permit_params.signer (server holds no keys).

Prerequisites:

  1. GET /v1/auth/eip712-domain — EIP-712 domain (name, version, chainId, verifyingContract = Authorization contract)
  2. GET /v1/nonce-state/{account}nonce_anchor and current_bitmap_index (pass it as permit_params.nonce_bitmap_index; if 208 the anchor is full — use nonce_anchor+1 with bitmap index 0)
  3. GET /v1/system/configrouter address (RISExUniversalRouter), used as the target field below

Action hash: (amount is the signed integer sent in the request; sign the exact same value)

actionHash = keccak256(abi.encode(
  keccak256("RISE_PERPS_UPDATE_ISOLATED_MARGIN_V1"),  // bytes32 action selector
  uint16(marketId),
  int128(amount)))

Permit digest (EIP-712):

VerifyWitness(address account,address target,bytes32 hash,uint48 nonceAnchor,uint8 nonceBitmap,uint32 deadline)

Sign as standard EIP-712 typed data (e.g. ethers signTypedData) with hash = actionHash, target = RISExUniversalRouter address (NOT the account, NOT the domain verifyingContract), nonceBitmap = permit_params.nonce_bitmap_index.

Signature: 64-byte EIP-2098 compact (r + yParityAndS) or 65-byte (r+s+v, auto-converted).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
string
permit_params
object

Permit parameters for v3 authenticated operations.
Client signs EIP-712 VerifyWitness; server builds byte-packed permit suffix.
Uses bitmap nonces for replay protection.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json