Trades

Retrieves a trade. Read it until its status is completed, failed or in_review.

get/trades/{id}

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

id, string required

Trade ID, prefixed tint_.

Headers

Api-Version-Date, string
Example:2026-11-30

Pins the request to a dated API version.

Response

trade retrieved

Trade required
account_id, string nullable required

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

amount, string nullable required

The USDT0 that a deposit, a spot buy, or a perpetual order short of trading balance, sends from the wallet, or the USDC that a withdraw sends back, in native units, as a decimal string. A withdraw of all shows what it sent once it finishes. null otherwise.

average_price, string nullable required

The average fill price of the order, in USD, as a decimal string. For spot, the price the swap was quoted at. null when it is not known.

client_order_id, string nullable required

The caller's own ID for the trade, unique for the account. null when none was sent.

completed_at, string nullable required

When the trade ended as completed or failed, as an ISO 8601 timestamp. null before that.

created_at, string required

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

external_order_id, string nullable required

ID Whop sends to the exchange with this trade's order, so the exchange's order updates can be matched to the trade. On Hyperliquid, the order's cloid reported in orderUpdates, a 0x-prefixed 32-character hex string. Not the caller's client_order_id. null for a deposit or withdraw.

failure_code, 'market_unavailable' | 'leverage_too_high' | 'amount_too_small' | 'isolated_position_open' | 'trading_paused' | 'funding_failed' | 'margin_unavailable' | 'builder_fee_unapproved' | 'leverage_rejected' | 'leverage_unconfirmed' | 'order_rejected' | 'close_rejected' | 'return_failed' | 'withdraw_failed' | 'null' nullable required

Why the trade failed, or null.

filled_size, string nullable required

The size the order filled, in units of the market, as a decimal string. For a spot buy, the amount the swap was quoted to deliver. null until it fills.

funds_location, 'wallet' | 'trading_account' | 'unknown' | 'null' nullable required

Where the money is when the trade did not complete as asked: wallet, trading_account, or unknown while a person checks it. null otherwise.

id, string required

Trade ID, prefixed tint_.

instrument_type, 'perpetual' | 'spot' | 'null' nullable required

perpetual or spot for an order, perpetual for a close. null for a deposit or withdraw.

leverage, integer nullable required

The cross leverage set before an opening perpetual order. null for a spot order, close, deposit, withdraw or reduce-only order.

market, string nullable required

The market, for example BTC for a perpetual or XAUT for spot. null for a deposit or withdraw.

metadata, object required

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

object, 'trade' required
order_type, 'market' | 'limit' | 'take_profit' | 'stop_loss' | 'null' nullable required

market, limit, take_profit or stop_loss for an order. null otherwise.

parent_id, string nullable required

For a take-profit or stop-loss sent with an order, that order's trade, prefixed tint_. null otherwise.

price, Money nullable required
reduce_only, boolean nullable required

Whether the order can only reduce a position. null for other types.

side, 'buy' | 'sell' | 'null' nullable required

buy or sell for an order. null otherwise.

size, string nullable required

The order size in units of the market, as a decimal string. null for other types.

status, 'pending' | 'processing' | 'in_review' | 'completed' | 'failed' required

pending until the trade starts. processing while it runs, also while an order that did not fill sends the money it bridged in back to the wallet. completed when it did what was asked. failed when it did not; funds_location says where the money is. in_review when the outcome is unknown and a person checks it.

status_detail, 'partial_fill' | 'null' nullable required

partial_fill when the order filled only part of its size. null otherwise.

step, 'depositing' | 'landing' | 'placing' | 'withdrawing' | 'returning' | 'quoting' | 'swapping' | 'crediting' | 'null' nullable required

What a live trade is doing now: depositing while the wallet's USDT0 is being sent to the bridge, landing once sent and until it reaches the trading balance, placing while the order or close is with the venue, withdrawing while USDC heads back to the wallet, returning while money an unfilled order bridged in goes back. A spot order is quoting while the swap is priced, swapping while it runs onchain, and crediting until the new balance shows in the wallet. null once the trade is no longer pending or processing.

trigger_price, Money nullable required
type, 'close' | 'order' | 'deposit' | 'withdraw' required

order places one order: a perpetual order trades from the trading balance, a spot order swaps between USDT0 and the asset in the wallet. deposit bridges USDT0 from the wallet to the trading balance. withdraw sends USDC from the trading balance back to the wallet. close closes the whole position in one market with a market reduce-only order; when the account is then flat, a withdraw trade sends the trading balance back to the wallet.

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.

Example response

{
  "account_id": "biz_xxxxxxxxxxxxxx",
  "amount": "25",
  "created_at": "2026-01-01T12:00:00.000Z",
  "external_order_id": "0x63cabad10f072c65ad84526e0c33081b",
  "failure_code": "market_unavailable",
  "funds_location": "wallet",
  "id": "tint_xxxxxxxxxxxxxx",
  "instrument_type": "perpetual",
  "leverage": 10,
  "market": "BTC",
  "metadata": {},
  "object": "trade",
  "order_type": "market",
  "price": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "side": "buy",
  "status": "pending",
  "status_detail": "partial_fill",
  "step": "placing",
  "trigger_price": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "type": "order",
  "updated_at": "2026-01-01T12:00:00.000Z"
}

Changes

    • info

      the security scope crypto_wallet:trade:read was added to the endpoint's security scheme bearerAuth

    • info

      the security scope crypto_wallet:manage was removed from the endpoint's security scheme bearerAuth

    • info

      the security scope crypto_wallet:trade:read was added to the endpoint's security scheme bearerAuth

    1 more change in this revision