Preview Orders
Changed onPreview the impact of orders without submitting them. For each order the engine evaluates every pre-trade risk check and projects the account's balances and positions as if the order were fully filled — at the limit price for limit orders and at the current reference price for market orders. Orders are evaluated independently: they do not see each other's projected fills. Nothing is submitted and no account state changes.
The response carries one result per requested order, in request order. When the request contains more than one order, every order must carry a unique id, which is echoed on its result. An order that cannot be previewed gets an error on its own result without affecting the rest of the batch; the response is still 200 OK — per-order outcomes live only in the rows, and non-2xx statuses are reserved for request-level failures (invalid batch, authorization, engine unavailable).
Request
- Base URLhttps://api.clearstreet.com
- AuthHTTP bearer
Path parameters
Account identifier
Request body
Example request
[
{
"order_type": "MARKET",
"quantity": "1",
"side": "BUY",
"symbol": "TSLA",
"time_in_force": "DAY"
}
]Response
Batch evaluated: one result per order, in request order, each carrying either a preview or that order's error
Example response
{
"error": {
"code": 400,
"message": "Order quantity must be greater than zero"
},
"metadata": {
"page_number": 1,
"total_items": 42,
"total_pages": 5
},
"data": [
{
"preview": {
"account_id": 19816,
"amount": {
"gross_amount": "10000.00",
"net_amount": "10000.00"
},
"buying_power": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
},
"currency": "USD",
"equity": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
},
"errors": [
{
"description": "Insufficient buying power",
"metadata": {
"available": "5000",
"required_total": "10000"
},
"type": "BUYING_POWER"
}
],
"margin_details": {
"initial_margin_excess": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
},
"initial_margin_requirement": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
},
"maintenance_margin_excess": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
},
"maintenance_margin_requirement": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
},
"overnight_margin_excess": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
},
"overnight_margin_requirement": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
}
},
"positions": [
{
"instrument_id": "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8",
"quantity": {
"after": "190000.00",
"before": "200000.00",
"change": "-10000.00"
},
"symbol": "AAPL"
}
]
},
"id": "my-ref-id-20251001-002"
}
]
}Changes
- info
endpoint added
- info