Skip to content

Trading Workflow

The canonical workflow for placing a trade follows four steps: Quote → Order → Fill → Positions.

Step 1: Get a Quote

GET /quote/AAPL

Returns current bid, ask, last price, volume, and change data.

Step 2: Place an Order

POST /orders

Request body:

{
  "AccountId": 500123,
  "Symbol": "AAPL",
  "Quantity": 100,
  "PriceType": "Limit",
  "LimitPrice": -150.25,
  "Side": "Buy",
  "TimeInForce": "Day"
}

Sign Conventions

This is critical: LimitPrice is negative for buy orders because buying is a debit (money out). Selling is positive (credit, money in).

FieldBuy (Debit)Sell (Credit)
LimitPriceNegativePositive
FilledPriceNegativePositive
PrincipalNegativePositive

Order Types

  • Market — Execute immediately at best available price
  • Limit — Execute at specified price or better
  • Stop — Trigger a market order when price reaches stop level

Time in Force

  • Day — Cancel at end of trading day if not filled
  • GTC (Good Till Cancelled) — Remains active until filled or cancelled
  • IOC (Immediate or Cancel) — Fill immediately or cancel

Step 3: Check Order Status

GET /order-execution-logs/orders/{OrderId}

Order status lifecycle: Pending → Filled / Cancelled / Rejected

Step 4: Verify Positions

POST /positions

After a fill, your position updates:

  • OpenQuantity: positive = long, negative = short
  • CostBasisPerShare: includes commission
  • UnrealizedPnL: current market value minus cost basis