Create Trade
Submits perpetual orders from a funded trading wallet. Send several limit orders for a ladder, or attach take_profit and stop_loss to a single entry order. Whop's builder fee is approved and attached automatically. The returned trop_ ID identifies the submission, not a position, and completed doesn't mean filled: check each order acknowledgement, and read live orders and positions from the account's trading field. Requires an Idempotency-Key. Early beta: email support@whop.com for access.
Headers
Required. Reuse the same key when retrying, including after a submission_unknown outcome; a new key submits a new trade.
Request body
Example request
{
"account_id": "biz_xxxxxxxxxxxxxx",
"instrument_type": "perpetual",
"orders": [
{
"market": "ETH",
"order_type": "limit",
"price": "3000",
"side": "buy",
"size": "0.02",
"stop_loss": {
"trigger_price": "3300"
},
"take_profit": {
"trigger_price": "3300"
},
"time_in_force": "add_liquidity_only"
}
],
"provider": "hyperliquid"
}Response
submission recorded
Example response
{
"account_id": "biz_xxxxxxxxxxxxxx",
"cancellations": [
{
"id": "trdcloid_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"status": "canceled"
}
],
"completed_at": "2026-01-01T12:00:00.000Z",
"created_at": "2026-01-01T12:00:00.000Z",
"failure_code": "pre_submission_error",
"id": "trop_xxxxxxxxxxxxxx",
"instrument_type": "perpetual",
"leverage": {
"leverage": 5,
"margin_mode": "isolated",
"market": "ETH"
},
"metadata": {},
"object": "trade",
"operation_type": "cancel_orders",
"orders": [
{
"average_price": {
"amount": "-2.50",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"hyperliquid": {
"trigger_price": {
"amount": "-2.50",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
}
},
"object": "trading_order",
"order_type": "limit",
"price": {
"amount": "-2.50",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"side": "buy",
"status": "open"
}
],
"provider": "hyperliquid",
"requested_orders": [
{
"client_order_id": "trdcloid_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"market": "ETH",
"order_type": "stop_loss",
"parent_client_order_id": "trdcloid_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"price": {
"amount": "-2.50",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"side": "sell",
"size": "0.02",
"trigger_price": {
"amount": "-2.50",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
}
}
],
"status": "completed",
"trade_id": "trop_xxxxxxxxxxxxxx",
"updated_at": "2026-01-01T12:00:00.000Z"
}Changes
Changed in 3 of the 74 revisions of this API.5
- ○
the security scope
crypto_wallet:tradewas added to the endpoint's security schemebearerAuthapi-security-scope-added
- ○
the security scope
crypto_wallet:managewas removed from the endpoint's security schemebearerAuthapi-security-scope-removed
- ○
- ○
the security scope
crypto_wallet:tradewas added to the endpoint's security schemebearerAuthapi-security-scope-added
- ○
the security scope
crypto_wallet:managewas removed from the endpoint's security schemebearerAuthapi-security-scope-removed
- ○
- ○
endpoint added
endpoint-added
- ○
Of the 74 revisions, 1 has no diff computed.