Skip to main content
POST
Python (SDK)

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

Request to place a limit order on a perpetual trading market.

owner
string
default:0x06A9aF046187895AcFc7258450B15397CAc67400
required

Owner of the perpetual trading product account

Example:

"0x06A9aF046187895AcFc7258450B15397CAc67400"

asset
string
default:AAPL
required

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

Example:

"AAPL"

side
string
default:buy
required

Order side: 'buy' or 'sell'

Example:

"buy"

size
string
default:10.0
required

Number of contracts (human-readable)

Example:

"10.0"

price
string
default:190.00
required

Limit price (human-readable)

Example:

"190.00"

time_in_force
string
default:gtc

Time-in-force: 'gtc' (good til cancel) or 'alo' (add liquidity only)

Example:

"gtc"

reduce_only
boolean
default:false

If true, order can only reduce an existing position

Example:

false

client_order_id
integer | null

Optional client order ID for idempotency (uint128)

builder
Builder · object | null

Optional builder fee. When provided, the order action carries the builder address and fee — the end-user must have already approved this builder via /approve_builder_fee up to at least this rate. Omit (or pass null) to place the order with no builder fee.

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