---
search:
  tags:
    - Orders
    - POST
seo:
  description: >-
    Submits a new order. It matches against the resting book immediately; any
    unfilled remainder… Reference for the POST /orders endpoint in the REST API
    API.
sidebar:
  badge: POST
  label: Place an Order
title: Place an Order
type: openapi-operation
---
Submits a new order. It matches against the resting book immediately; any unfilled remainder rests per the requested time in force.

### Endpoint

- Method and path: `POST /orders`
- Operation ID: `createOrder`
- API reference: [POST /orders](/api-reference/orders/createorder)

#### Authorization

- Accepted credentials: `UDX-Access-Key` header and `UDX-Access-Timestamp` header and `UDX-Access-Signature` header; or Bearer token in `Authorization`
- Details: [Authentication](/authentication)

#### Parameters

- `UDX-Version` (`header`) — Dated API version (YYYY-MM-DD). Omit to use the oldest supported version. An unknown version returns `400`.
- `UDX-Idempotency-Key` (`header`) — Optional client-generated key that makes a mutation safe to retry. Reuse it only for a byte-identical retry. When present, it is included in the request signature; omitting it disables UDX idempotency for that request.

#### Request body

- Content type: `application/json`
- Schema: `CreateOrderRequest`
- Required: yes
- Fields:
  - `ticker` (Ticker, required)
  - `client_order_id` (ClientId, required)
  - `side` (OrderSide, required)
  - `quantity` (required) — Order quantity, in contracts.
  - `price` (required) — Limit price in YES price space, in dollars, regardless of side.
  - `time_in_force` (TimeInForce, required)
  - `post_only` (boolean) — If true, the order only ever rests (adds liquidity); an order that would cross the book on placement is rejected. Incompatible with ioc/fok.
  - `account_id` — Account to place the order under, by its UDX-assigned public entity identifier. Required for an unrestricted API key; an account-restricted key uses its bound account, and an account_id that names a different account is rejected.
  - `self_trade_prevention_type` — Self-trade-prevention policy. Defaults to `placed`.

#### Responses

- `201` — The placed order.
- `400` — The request doesn't conform to this spec.
- `401` — No valid credential was provided.
- `403` — The credential lacks the `trade` scope.
- `409` — This key is still in use or its response cannot be replayed. The mutation may have run; check `detail` before retrying.
- `422` — This key belongs to a different request.
- `429` — The Member's request rate is exhausted. Wait for `Retry-After`.
- `500` — Something went wrong on UDX's side.
- `503` — Request admission is unavailable. Retry later.
