Orders

Cancel a resting order via RISExUniversalRouter. Client signs the permit.

Prerequisites: same as POST /v1/orders/place — EIP-712 domain, nonce state, and the router address from GET /v1/system/config.

Action hash: orderId is the resting_order_id returned by GET /v1/orders/open (= wide_order_id >> 1), not the composite order_id string sent in the request body.

actionHash = keccak256(abi.encode(
  keccak256("RISE_PERPS_CANCEL_ORDER_V1"),  // bytes32 action selector
  uint256(marketId),
  uint256(restingOrderId)))

Permit digest (EIP-712):

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

hash = actionHash, target = RISExUniversalRouter address (NOT the OrdersManager, NOT the account, NOT the domain verifyingContract).

Signature: 64-byte EIP-2098 compact (r + yParityAndS) or 65-byte (r+s+v, auto-converted). permit.signature is a protobuf bytes field — send it base64 over REST, not 0x hex.

post/v1/orders/cancel

Request

Request body

market_idinteger

Market ID (uint16)

order_idstring

Composite OrderID (hex 0x...)

no_retryboolean

Example request

{
  "order_id": "0x000000380000000900000000000000640000000000000000",
  "permit": {
    "account": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "signer": "0x1234567890123456789012345678901234567890",
    "nonce_anchor": "0"
  }
}

Response

A successful response.

tx_hashstring
block_numberstring uint64
successboolean

true if receipt.Status == 1

Changes