API Reference

Cancel an active order on the SubAccount

Signature generation

The api expects a EIP712 signature constructed with the following typed data:

{
  EIP712Domain: [
    {
      name: 'name', // rysk
      type: 'string',
    },
    {
      name: 'version', // "0.0.0"
      type: 'string',
    },
    {
      name: 'chainId', 
      type: 'uint256',
    },
    {
      name: 'verifyingContract', // <OrderDispatchAddress> 
      type: 'address',
    },
	],
  CancelOrder: [
		{
			name: "account",
			type: "address",
		},
		{
			name: "subAccountId",
			type: "uint8",
		},
		{
			name: "productId",
			type: "uint32",
		},
		{
			name: "orderId",
			type: "string",
		},
	],
}

Example request:

{
    "account": "0x1234",               // Account address
    "subAccountId": 0,                 // Subaccount id
    "productId": 1002,                 // Identifier for the product
    "orderId": "0x1234",               // Order id to cancel
    "signature": "0x1234..."           // Signature for verifying the order
  }

Example response:

{
  "success": true,
   "error": null
}
Language
Click Try It! to start a request and see the response here!