v1
latestOpenAPI 3.0.02026-07-26166415635.8 KBTrading
Create an Order for an Account
Creating an order for your end customer. Each trading request must pass in the account_id in the URL.
- Note that when submitting crypto orders, market, limit and stop_limit orders are supported while the supported time_in_force values are gtc, and ioc.
- For equities and crypto we accept fractional orders as well with either notional or qty provided.
- Note that submitting an options order is only available for partners who have been enabled for Options BETA.
- In case of Fixed Income, only market and limit order types with day time_in_force are supported, and order replacement is not supported. Note that submitting Fixed Income orders is only available for partners who have been enabled for Fixed Income.
- Note that submitting DMA orders (using advanced_instructions with algorithm: DMA) is only available for partners/correspondents who have been enabled for DMA.
- For IPO indications of interest (asset_class: "ipo"), the symbol is the offering reference returned by GET /v1/ipos (e.g. FI111225). IPO orders are notional-only (notional required, qty must be omitted), buy-side, market type, and gtc time_in_force. Indications of interest can be replaced or canceled while the offering is open via PATCH /v1/trading/accounts/{account_id}/orders/{order_id} and DELETE /v1/trading/accounts/{account_id}/orders/{order_id}.
post/v1/trading/accounts/{account_id}/orders
Request body
Example request
{
"advanced_instructions": {
"algorithm": "DMA",
"destination": "IEX",
"display_qty": "100"
},
"client_order_id": "eb9e2aaa-f71a-4f51-b5b4-52a6c565dad4",
"commission": "1.0",
"commission_bps": "10",
"commission_type": "qty",
"legs": [
{
"position_intent": "buy_to_open",
"ratio_qty": "1",
"side": "buy"
}
],
"limit_price": "3.14",
"notional": "3",
"position_intent": "buy_to_open",
"qty": "4.124",
"side": "buy",
"stop_loss": {
"limit_price": "3.14",
"stop_price": "3.14"
},
"stop_price": "3.14",
"symbol": "AAPL",
"take_profit": {
"limit_price": "3.14"
},
"time_in_force": "gtc",
"trail_percent": "5.0",
"trail_price": "3.14",
"type": "market"
}Response
OK
Example response
{
"asset_id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"cancel_requested_at": "2021-03-16T18:38:01.942282Z",
"canceled_at": "2021-03-16T18:38:01.942282Z",
"client_order_id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"commission": "3.14",
"commission_bps": "10",
"commission_type": "qty",
"created_at": "2021-03-16T18:38:01.942282Z",
"expired_at": "2021-03-16T18:38:01.942282Z",
"extended_hours": true,
"failed_at": "2021-03-16T18:38:01.942282Z",
"filled_at": "2021-03-16T18:38:01.942282Z",
"filled_avg_price": "4.2",
"filled_qty": "4.2",
"hwm": "3.14",
"id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"legs": [
{
"asset_id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"canceled_at": "2021-03-16T18:38:01.942282Z",
"client_order_id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"commission": "3.14",
"commission_bps": "10",
"commission_type": "qty",
"created_at": "2021-03-16T18:38:01.942282Z",
"expired_at": "2021-03-16T18:38:01.942282Z",
"extended_hours": true,
"failed_at": "2021-03-16T18:38:01.942282Z",
"filled_at": "2021-03-16T18:38:01.942282Z",
"filled_avg_price": "4.2",
"filled_qty": "4.2",
"hwm": "3.14",
"id": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"limit_price": "3.14",
"notional": "4.2",
"order_type": "market",
"position_intent": "buy_to_open",
"qty": "4.2",
"replaced_at": "2021-03-16T18:38:01.942282Z",
"replaced_by": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"replaces": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"side": "buy",
"status": "filled",
"stop_price": "3.14",
"submitted_at": "2021-03-16T18:38:01.942282Z",
"symbol": "AALP",
"time_in_force": "gtc",
"trail_percent": "5.0",
"trail_price": "3.14",
"type": "market",
"updated_at": "2021-03-16T18:38:01.942282Z"
}
],
"limit_price": "3.14",
"notional": "4.2",
"order_type": "market",
"position_intent": "buy_to_open",
"qty": "4.2",
"replaced_at": "2021-03-16T18:38:01.942282Z",
"replaced_by": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"replaces": "61e69015-8549-4bfd-b9c3-01e75843f47d",
"side": "buy",
"status": "filled",
"stop_price": "3.14",
"submitted_at": "2021-03-16T18:38:01.942282Z",
"symbol": "AALP",
"time_in_force": "gtc",
"trail_percent": "5.0",
"trail_price": "3.14",
"type": "market",
"updated_at": "2021-03-16T18:38:01.942282Z"
}