price or better — never worse. A buy limit fills at your limit price or lower; a sell limit fills at your limit price or higher. You trade certainty of execution for control over price: you’re guaranteed the price, but not that the order fills at all.
This page walks the full lifecycle end-to-end — place the order over REST, then follow it to a fill over the WebSocket — so you can use it as the template for every other order type.
New to the module? Start with Order Flow. The subscribe handshake shown here is the same for all order types.
When to use it
- You have a target entry or exit price and are willing to wait.
- The spread is wide or the name is volatile, and a market order could fill at a bad price.
- You want to rest an order on the book (often with
GTC) and let the market come to you.
How it works
- You
POST /v1/orderswithtype: "LIMIT"and aprice. - The order rests on the book as
NEWuntil the market reaches your price. - When it trades through your price it fills — fully (
FILLED) or in pieces (PARTIALLY_FILLED). - If it never reaches your price, a
DAYorder ends the sessionEXPIRED; aGTCorder keeps resting until filled or cancelled.
Request
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | Must be "LIMIT". |
price | string | yes | Your limit price as a decimal string. The order fills at this price or better. |
side | string | yes | BUY, SELL, SELL_SHORT, or BUY_TO_COVER. |
qty | string | yes | Number of shares as a decimal string. |
timeInForce | string | yes | DAY, GTC, IOC, or FOK. Use DAY to expire at the close, GTC to rest until cancelled. |
stopPrice | string | — | Do not send for a plain limit order. (That would make it a stop-limit.) |
Step 1 — Place the order
cURL
Request body
Response
cumQty is 0 and leavesQty is the full quantity. Fills arrive over the WebSocket.
Listen for updates
This is the WebSocket half of the round-trip. The handshake below is identical for every order type — only theaccount.order payload differs.
Step 2 — Connect & authenticate
Open the connection and authenticate within 5 seconds:authSuccess event:
Step 3 — Subscribe to the account topic
Subscribe request
Step 4 — Receive order events
As the limit order works and fills, you getaccount.order events. Watch ordStatus, cumQty, and leavesQty:
- Working (NEW)
- Partially filled
- Filled
Match events to your order by
clOrdId. Drive your UI off ordStatus and the cumQty/leavesQty pair: cumQty is what’s filled, leavesQty is what’s still working. After the first snapshot, later updates may include only the fields that changed.Modify or cancel a resting limit order
Because a limit order can rest for a while, you’ll often want to re-price or cancel it.Replace — move the limit to 150.25
Cancel
Next steps
Stop order
Trigger a market order when a price level is breached.
Stop-limit order
Combine a trigger with a price cap.
Single-leg option
Apply a limit price to a single call or put.
Account Updates WebSocket
The full streaming reference for order, position, and balance events.