Place Order

POST/accounts/{accountId}/orders

Place a new order for the specified account. Call Preview Order first to pre-validate and show the results to the user, and then use confirmId in this request.

Path Parameters

accountIdstringrequired

The account identifier.

Body Parameters

instrumentstringrequired

Security symbol. Example: AAPL.

sidestringrequired

Order direction.

typestringrequired

Order type.

quantityTypestringrequired

Whether the order size is specified by quantity or notional amount.

categorystringrequired

Asset class.

durationTypestringrequired

Order time-in-force.

extendHoursstringrequired

Trading session.

qtystringoptional

Order quantity. Required when quantityType is qty.

amountstringoptional

Order notional amount. Required when quantityType is amount.

limitPricestringoptional

Limit price. Required for limit and stopLimit order types.

stopPricestringoptional

Stop trigger price. Required for stop and stopLimit order types.

openClosestringoptional

Position direction.

takeProfitobjectoptional

Take-profit leg.

stopLossobjectoptional

Stop-loss leg.

confirmIdstringoptional

The confirmId returned from a prior preview request.

Request Example

Place Order
JSON
{
  "instrument": "BAC",
  "side": "buy",
  "type": "limit",
  "quantityType": "qty",
  "qty": "100",
  "limitPrice": "30.0",
  "category": "stock",
  "durationType": "day",
  "extendHours": "reg",
  "confirmId": "0000001"
}

Response

200application/json

Order accepted.

sstring

Status indicator. ok on success.

dobject
d.orderIdstring

The identifier of the newly created order.

Response

errorapplication/json

Error response.

sstring

Error code string, e.g. invalid_grant.

errmsgstring

Human-readable error message.

Response Example

{
  "s": "ok",
  "d": {
    "orderId": "112358"
  }
}