Skip to main content

Build Cancel REST API Endpoint

Build cancel action. Returns hash to sign with summary of orders to cancel.

Updated on
May 19, 2026
info

Exchange API calls do not consume Quicknode API credits. Transactions through this endpoint are appended with a builder fee. See hyperliquidapi.com for a full breakdown. To white-label with your own builder code, contact us.


Body Parameters

action
object
REQUIRED

Cancel action object

type
string

Action type ("cancel")

cancels
array

Array of orders to cancel

a
string

Asset name (e.g., "BTC", "ETH") or asset index as integer (0, 1, etc.)

o
integer

Order ID

f
boolean

Optional. Set to true to request a Hyperliquid fast cancel. Omit when not using fast cancel; f: false is removed before the action is signed.

vaultAddress
string

Optional vault address

expiresAfter
integer

Optional expiration timestamp (ms)

Returns

hash
string

Hash to sign with wallet (0x-prefixed hex string)

nonce
integer

Unique nonce for this action (timestamp in milliseconds)

action
object

Processed cancel action object in wire format

type
string

Action type ("cancel")

cancels
array

Array of orders to cancel in wire format

a
integer

Asset index (0 for BTC, 1 for ETH, etc.)

o
integer

Order ID

summary
string

Human-readable summary of orders being cancelled (e.g., "Canceling 1 BTC order (OID: 123456789)")

assets
array

Array of asset information for the orders being cancelled

index
integer

Asset index (0 for BTC, 1 for ETH, etc.)

name
string

Asset name (e.g., "BTC", "ETH")

isSpot
boolean

Whether this is a spot market asset

szDecimals
integer

Number of decimal places for size/quantity

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free