Skip to main content
POST
/
v2
/
global_markets_perps
/
cancel_order
Python (SDK)
from compass_api_sdk import CompassAPI


with CompassAPI(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:

    res = compass_api.global_markets_perps.global_markets_perps_cancel_order(owner="0x01E62835dd7F52173546A325294762143eE4a882", asset="AAPL", order_id=12345)

    # Handle response
    print(res)
{
  "typed_data": {},
  "action": {},
  "nonce": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.compasslabs.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

Request to cancel an open order on a global markets perps market.

owner
string
default:0x01E62835dd7F52173546A325294762143eE4a882
required

Owner of the global markets perps product account

asset
string
default:AAPL
required

Asset ticker symbol (e.g. AAPL, GOLD, EUR)

order_id
integer | null
default:12345

Hyperliquid order ID to cancel

client_order_id
integer | null

Client order ID to cancel (alternative to order_id)

Response

Successful Response

Returned by prepare endpoints — contains EIP-712 typed data for the user to sign.

typed_data
Typed Data · object
required

EIP-712 typed data for wallet signing (domain, types, primaryType, message)

action
Action · object
required

Raw Hyperliquid action (passed back to the execute endpoint)

nonce
integer
required

Timestamp-based nonce used during signing