Overview

Details about how to obtain access tokens using OAuth 2.0

Fetch positions, balances and other account related details.

Place equity and complex option trades including advanced orders.

Fetch quotes, chains and historical data via REST and streaming APIs.

Stream market data events in real-time.

Create and update custom watchlists.

Examples, response types, property details and explanations.

Preview an order

Previewing an order provides insight into validation and cost an order might have on an account. We recommend most developers and platforms leverage previews before placing orders.

When previewing an order, all order validation rules are run, including buying power checks. All applicable fees and commissions are delivered in the response.

Parameters

Parameter Type Param Type Required Values/Example Default
preview Form String Optional true
Whether to preview the order (should be sent with all other order parameters)

Response

Response Definition

{
  "order": {
    "status": "ok",
    "commission": 3.49000000,
    "cost": 34.715100000000,
    "fees": 0,
    "symbol": "T",
    "quantity": 1,
    "side": "buy",
    "type": "market",
    "duration": "day",
    "result": true,
    "order_cost": 31.225100000000,
    "margin_change": 0,
    "request_date": "2019-05-14T15:56:47.371",
    "extended_hours": false,
    "class": "equity",
    "strategy": "equity",
    "day_trades": 3
  }
}