Skip to main content
Function:
ABI Object:
Parameters:
  • auth - The account signer
  • subaccount - The Trading Account object
  • market - The SpotMarket object
  • price - Order price in raw quote units, aligned to tick_size `<u64>`
  • orig_size - Order size in raw base units, aligned to lot_size `<u64>`
  • is_bid - True for a bid (buy), false for an ask (sell)
  • time_in_force - Time in force `<u8>`: 0 = GoodTillCanceled, 1 = PostOnly, 2 = ImmediateOrCancel
  • builder_address - Optional builder/referrer address `<Option<address>>`
  • builder_fees - Optional builder fee cap `<Option<u64>>`
For converting human-readable prices and sizes to raw units, see Formatting Prices and Sizes.
A spot market address is not interchangeable with a perp market address. A spot BTC market and a perp BTC market are separate markets with separate addresses — pass the spot market you want. Spot has no reduce-only flag, client order ID, or TP/SL parameters.

Time in Force Options

  • 0 (GoodTillCanceled) - Order stays active until it is filled or manually canceled
  • 1 (PostOnly) - Order only adds liquidity to the order book (becomes a maker order). If the order would execute immediately, it is canceled
  • 2 (ImmediateOrCancel) - Order executes immediately at the best available price. Any unfilled portion is canceled

Collateral and Funding

Spot orders are fully collateralized before they reach the book: a bid escrows the quote asset, an ask escrows the base asset. Funds are sourced from the subaccount’s primary fungible store (PFS) first, then the remainder from collateral-backed storage (CBS) when the asset is CBS-supported. If the CBS withdrawal is rate-limited, the order is queued in spot_pending_cbs_queue and placed once process_pending_withdrawals drains the request — so a successful transaction does not always mean the order is immediately resting on the book.
Placement aborts with EUNDELIVERABLE_PROCEEDS if the projected maximum fill proceeds could not be delivered to your account (neither CBS nor PFS deposits would succeed). This is a pre-trade gate: check get_max_proceeds_balance and can_make_spot_deposit if you need to predict it.
To trade directly from a wallet instead of a Trading Account, use place_spot_order, which takes the same arguments without the subaccount parameter. Example: