Cancel Order (TRADE)

Cancel an active order on the SubAccount

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Signature generation

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

{
  EIP712Domain: [
    {
      name: 'name', // ciao
      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
}
Body Params
string
required

The address of the connecting account.

int32
required

The ID of the subaccount from which to cancel the order.

int32
required

The productId of the order to cancel.

string
required

The unique ID of the order you wish to cancel.

string
required

EIP721 signature containing the productId and the orderId

Responses

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