---
title: "Create Trade"
method: POST
path: "/trades"
tags: ["Trades"]
---

# Create Trade

`POST /trades`

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

- `Idempotency-Key` string, required

## Request body

- object
  - `account_id` string, required — The account or user that owns the trading wallet, prefixed `biz_` or `user_`.
  - `instrument_type` 'perpetual', required — The kind of instrument to trade.
  - `metadata` object, nullable — Free-form string-to-string annotations stored on the trade.
  - `orders` object[], required — Orders to submit together. Attached take-profit and stop-loss are supported only with a single entry order.
    - `market` string, required — Perpetual market on the selected provider, such as `ETH`.
    - `order_type` 'limit' | 'market' | 'take_profit' | 'stop_loss'
    - `price` string, nullable — Limit price as a decimal string. Required for a limit order; for a take-profit or stop-loss, omit it to trigger a market order.
    - `reduce_only` boolean — Whether the order can only reduce an existing position. Take-profit and stop-loss orders are always reduce-only.
    - `side` 'buy' | 'sell', required
    - `size` string, required — Order size as a decimal string.
    - `slippage_bps` integer, nullable — Slippage cap for this order in basis points, overriding the request's `slippage_bps`.
    - `stop_loss` object, nullable — Stop-loss to attach to a single entry order.
      - `limit_price` string, nullable — Limit price once triggered, as a decimal string. Omit or pass `null` for a market order with the request's slippage cap.
      - `trigger_price` string, required — Price that triggers the order, as a decimal string.
    - `take_profit` object, nullable — Take-profit to attach to a single entry order.
      - `limit_price` string, nullable — Limit price once triggered, as a decimal string. Omit or pass `null` for a market order with the request's slippage cap.
      - `trigger_price` string, required — Price that triggers the order, as a decimal string.
    - `time_in_force` 'add_liquidity_only' | 'good_til_canceled' | 'immediate_or_cancel' — How long a limit order stays active. Ignored for other order types.
    - `trigger_price` string, nullable — Trigger price as a decimal string. Required for standalone take-profit and stop-loss orders.
  - `provider` 'hyperliquid', required
  - `slippage_bps` integer, nullable — Default slippage cap in basis points for market orders and market-triggered take-profit and stop-loss.

## Response `201`

submission recorded

- Trade
  - `account_id` string, nullable, required — The account that owns the trading wallet, prefixed `biz_`. `null` when a user owns it.
  - `cancellations` TradeCancellationResult[], nullable, required
    - `error` string, nullable, required — The provider's rejection reason, or `null` when the order was canceled.
    - `id` string, required — Client order ID of the order the cancellation targeted, prefixed `trdcloid_`.
    - `status` 'canceled' | 'rejected', required — `canceled` when the provider canceled the order; `rejected` when it refused, for example because the order had already filled.
  - `completed_at` string, nullable, required — When the submission finished, as an ISO 8601 timestamp, or `null` while it is pending or its outcome is unknown.
  - `created_at` string, required — When the trade was submitted, as an ISO 8601 timestamp.
  - `failure_code` 'pre_submission_error' | 'provider_rejected' | 'provider_outcome_unknown' | 'null', nullable, required — Why the trade failed or has an unknown outcome, or `null` otherwise.
  - `hyperliquid` TradeHyperliquid, required
    - `builder_fee_bps` string, nullable, required — Builder fee Whop charged on the submitted orders, in basis points as a decimal string, or `null` for trades that place no orders.
  - `id` string, required — Trade ID, prefixed `trop_`.
  - `instrument_type` 'perpetual', required — The kind of instrument traded.
  - `leverage` TradeLeverage, required
    - `leverage` integer, nullable, required — Requested leverage multiplier, such as `10` for 10x, or `null` if the request didn't contain a whole number.
    - `margin_mode` 'cross' | 'isolated' | 'null', nullable, required — `cross` shares margin across positions; `isolated` limits margin to this market's position. `null` if the request didn't contain a supported mode.
    - `market` string, required — Market symbol, such as `ETH`.
  - `metadata` object, required — String-to-string annotations you provided when submitting the trade.
  - `object` 'trade', required
  - `operation_type` 'create_orders' | 'cancel_orders' | 'update_leverage', required — `create_orders` places orders, `cancel_orders` cancels a submitted batch, and `update_leverage` sets a market's leverage.
  - `orders` TradeOrderResult[], nullable, required
    - `average_price` Money, required
      - `amount` string, required — The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit.
      - `currency` string, required — Three-letter ISO 4217 currency code, lowercase.
      - `decimals` integer, required — How many decimal places the amount CARRIES — the precision the charge itself runs at.
      - `display_decimals` integer, required — How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
    - `client_order_id` string, required — Client order ID Whop assigned to the order, prefixed `trdcloid_`.
    - `error` string, nullable, required — The provider's rejection reason, or `null` when the order was accepted.
    - `filled_size` string, nullable, required — Size filled immediately at submission, as a decimal string, or `null` when nothing filled.
    - `hyperliquid` TradingHyperliquidOrder, required
      - `reduce_only` boolean, nullable, required — Whether the order can only reduce an existing position, or `null` when Hyperliquid omits it.
      - `trigger_price` Money, required
        - `amount` string, required — The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit.
        - `currency` string, required — Three-letter ISO 4217 currency code, lowercase.
        - `decimals` integer, required — How many decimal places the amount CARRIES — the precision the charge itself runs at.
        - `display_decimals` integer, required — How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
    - `id` string, required — Trading order ID, prefixed `trdord_` once the provider assigns one, otherwise the client order ID prefixed `trdcloid_`.
    - `market` string, required — Market symbol on the provider, such as `ETH`.
    - `object` 'trading_order', required
    - `order_type` 'limit' | 'market' | 'take_profit' | 'stop_loss', required
    - `parent_client_order_id` string, nullable, required — For an attached take-profit or stop-loss, the client order ID of its entry order, prefixed `trdcloid_`. `null` for other orders.
    - `price` Money, required
      - `amount` string, required — The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit.
      - `currency` string, required — Three-letter ISO 4217 currency code, lowercase.
      - `decimals` integer, required — How many decimal places the amount CARRIES — the precision the charge itself runs at.
      - `display_decimals` integer, required — How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
    - `provider_order_id` string, nullable, required — The provider's own order ID, or `null` until the provider assigns one, such as for a rejected order or a take-profit or stop-loss that hasn't triggered yet.
    - `side` 'buy' | 'sell', required
    - `size` string, required — Submitted size as a decimal string.
    - `status` 'open' | 'filled' | 'rejected', required — The provider's acknowledgement at submission time, not the current fill status.
  - `provider` 'hyperliquid', required — Trading venue the trade was submitted to.
  - `requested_orders` TradeRequestedOrder[], nullable, required
    - `client_order_id` string, required — Client order ID Whop assigned to the order, prefixed `trdcloid_`. Matches the order in `orders` and on the provider.
    - `market` string, required — Market symbol as submitted, such as `ETH`.
    - `order_type` 'limit' | 'market' | 'take_profit' | 'stop_loss' | 'null', nullable, required — Submitted order type, or `null` if the request didn't contain a supported type.
    - `parent_client_order_id` string, nullable, required — For an attached take-profit or stop-loss, the client order ID of its entry order, prefixed `trdcloid_`. `null` for other orders.
    - `price` Money, required
      - `amount` string, required — The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit.
      - `currency` string, required — Three-letter ISO 4217 currency code, lowercase.
      - `decimals` integer, required — How many decimal places the amount CARRIES — the precision the charge itself runs at.
      - `display_decimals` integer, required — How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
    - `side` 'buy' | 'sell' | 'null', nullable, required — Submitted side, or `null` if the request didn't contain a supported side.
    - `size` string, required — Submitted size as a decimal string.
    - `trigger_price` Money, required
      - `amount` string, required — The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit.
      - `currency` string, required — Three-letter ISO 4217 currency code, lowercase.
      - `decimals` integer, required — How many decimal places the amount CARRIES — the precision the charge itself runs at.
      - `display_decimals` integer, required — How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
  - `status` 'pending' | 'submitted' | 'completed' | 'failed' | 'submission_unknown', 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.
  - `trade_id` string, nullable, required — For a cancellation, the ID of the canceled trade, prefixed `trop_`. `null` otherwise.
  - `updated_at` string, required — When the trade last changed, as an ISO 8601 timestamp.
  - `user_id` string, nullable, required — The user who owns the trading wallet, prefixed `user_`. `null` when an account owns it.

## Other responses

- `202` — submission outcome is unknown
- `400` — Invalid Parameters
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Resource not found
- `409` — Conflict

## Changes

> 72 revisions in range; 1 not diffed.

- **2026-09-25** `86b97292852d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/whop/apis/whop-api/changes/trades/post.md)

---

[API](https://skmtc.dev/whop/apis/whop-api.md) · [All operations](https://skmtc.dev/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc.dev/whop/apis/whop-api/revisions/86b97292852d?raw)
