Skip to main content
POST
Create Trade

Authorizations

Authorization
string
header
required

An Account API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

Headers

Idempotency-Key
string
required

Required. Reuse the same key when retrying, including after a submission_unknown outcome; a new key submits a new trade.

Required string length: 1 - 255
Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-09-24-1"

Body

application/json
account_id
string
required

The account or user that owns the trading wallet, prefixed biz_ or user_.

Example:

"biz_xxxxxxxxxxxxxx"

instrument_type
enum<string>
required

The kind of instrument to trade.

Available options:
perpetual
Example:

"perpetual"

orders
object[]
required

Orders to submit together. Attached take-profit and stop-loss are supported only with a single entry order.

Required array length: 1 - 50 elements
provider
enum<string>
required
Available options:
hyperliquid
Example:

"hyperliquid"

metadata
object | null

Free-form string-to-string annotations stored on the trade.

slippage_bps
integer | null
default:50

Default slippage cap in basis points for market orders and market-triggered take-profit and stop-loss.

Required range: 1 <= x <= 1000

Response

submission recorded

account_id
string | null
required

The account that owns the trading wallet, prefixed biz_. null when a user owns it.

Example:

"biz_xxxxxxxxxxxxxx"

cancellations
object[] | null
required
completed_at
string | null
required

When the submission finished, as an ISO 8601 timestamp, or null while it is pending or its outcome is unknown.

Example:

"2026-01-01T12:00:00.000Z"

created_at
string
required

When the trade was submitted, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"

failure_code
enum<string> | null
required

Why the trade failed or has an unknown outcome, or null otherwise.

Available options:
pre_submission_error,
provider_rejected,
provider_outcome_unknown,
null
Example:

"pre_submission_error"

hyperliquid
object | null
required

Hyperliquid-specific submission details. Present when provider is hyperliquid, otherwise null.

id
string
required

Trade ID, prefixed trop_.

Example:

"trop_xxxxxxxxxxxxxx"

instrument_type
enum<string>
required

The kind of instrument traded.

Available options:
perpetual
Example:

"perpetual"

leverage
object | null
required

The leverage requested by an update_leverage trade. null for other trades.

metadata
object
required

String-to-string annotations you provided when submitting the trade.

Example:
object
enum<string>
required
Available options:
trade
Example:

"trade"

operation_type
enum<string>
required

create_orders places orders, cancel_orders cancels a submitted batch, and update_leverage sets a market's leverage.

Available options:
create_orders,
cancel_orders,
update_leverage
Example:

"cancel_orders"

orders
object[] | null
required
Example:

null

provider
enum<string>
required

Trading venue the trade was submitted to.

Available options:
hyperliquid
Example:

"hyperliquid"

requested_orders
object[] | null
required
status
enum<string>
required

Submission status, not fill status. completed means the provider response was recorded, even if individual orders were rejected. Never resubmit a submission_unknown trade with a new idempotency key.

Available options:
pending,
submitted,
completed,
failed,
submission_unknown
Example:

"completed"

trade_id
string | null
required

For a cancellation, the ID of the canceled trade, prefixed trop_. null otherwise.

Example:

"trop_xxxxxxxxxxxxxx"

updated_at
string
required

When the trade last changed, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"

user_id
string | null
required

The user who owns the trading wallet, prefixed user_. null when an account owns it.

Example:

null