Skip to main content
A Trade is one request on an account’s or user’s Whop-managed wallet. An order places one order from the trading balance, bridging the USDT0 it needs from the wallet first when the balance is short. A close closes the whole position in one market; when the account is then flat, a withdraw trade sends the trading balance back to the wallet. A deposit or withdraw moves money between the wallet and the trading balance. Orders trade Hyperliquid perpetuals and spot pairs priced in USDC. Use the Trades API to place orders, close positions and move funds, and follow each trade until it finishes. Trades run in the background; an order that bridged money in and does not fill sends that money back to the wallet, and funds_location says where the money is. The trading API, including include_trading on accounts and users, is in beta. It can change without a new API version date.

Endpoints

Attributes

string
required
Trade ID, prefixed tint_.
string | null
required
The account that owns the trading wallet, prefixed biz_. null when a user owns it.
string | null
required
The USDT0 that a deposit, or an 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.
string | null
required
The average fill price of the order, in USD, as a decimal string. null when it is not known.
string | null
required
The caller’s own ID for the trade, unique for the account. null when none was sent.
string | null
required
When the trade ended as completed or failed, as an ISO 8601 timestamp. null before that.
string
required
When the trade was created, as an ISO 8601 timestamp.
string | null
required
Why the trade failed, or null.Available options: 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
string | null
required
The size the order filled, in units of the market, as a decimal string. null until it fills.
string | null
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.Available options: wallet, trading_account, unknown
string | null
required
perpetual or spot for an order, perpetual for a close. null for a deposit or withdraw.Available options: perpetual, spot
integer | null
required
The cross leverage set before an opening perpetual order. null for a spot order, close, deposit, withdraw or reduce-only order.
string | null
required
The market, for example BTC for a perpetual or HYPE/USDC for spot. null for a deposit or withdraw.
object
required
Free-form string-to-string annotations stored on the trade.
string
required
string | null
required
market or limit for an order. null otherwise.Available options: market, limit
object | null
required
The limit price of the order in USD. A market order’s price is the mid price moved by slippage_bps. null for other types.

Properties

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.
string
required
Three-letter ISO 4217 currency code, lowercase.
integer
required
How many decimal places the amount CARRIES — the precision the charge itself runs at.
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.
boolean | null
required
Whether the order can only reduce a position. null for other types.
string | null
required
buy or sell for an order. null otherwise.Available options: buy, sell
string | null
required
The order size in units of the market, as a decimal string. null for other types.
string
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.Available options: pending, processing, in_review, completed, failed
string | null
required
partial_fill when the order filled only part of its size. null otherwise.Available options: partial_fill
string
required
order places one order from the trading balance. 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.Available options: close, order, deposit, withdraw
string
required
When the trade last changed, as an ISO 8601 timestamp.
string | null
required
The user who owns the trading wallet, prefixed user_. null when an account owns it.
Trade