# Single Order Request

| Field              | Value                                                                                                                      | Type                                                                                      |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **orderCode**      | Unique order code that identifies the order on an account                                                                  | String, **required**                                                                      |
| **type**           | Order type                                                                                                                 | String, **required**                                                                      |
| **instrument**     | Symbol of the instrument                                                                                                   | String, **required**                                                                      |
| **quantity**       | Initial quantity of the order in units (not in lots)                                                                       | [Number](https://api.swaycharts.io/developers/#/DXtrade-REST-API?id=numbers), *optional*  |
| **positionEffect** | The effect of this order on a position                                                                                     | String, *optional*                                                                        |
| **positionCode**   | ID of a position that should be modified by this order                                                                     | String, *optional*                                                                        |
| **side**           | Order operation                                                                                                            | String, *required*                                                                        |
| **limitPrice**     | Limit order price per unit of quantity. (use **stopPrice** for stop orders). Should be absent for Market and Stop orders   | [Number](https://api.swaycharts.io/developers/#/DXtrade-REST-API?id=numbers), *optional*  |
| **stopPrice**      | Stop order price per unit of quantity. (use **limitPrice** for limit orders). Should be absent for Market and Limit orders | [Number](https://api.swaycharts.io/developers/#/DXtrade-REST-API?id=numbers), *optional*  |
| **priceOffset**    | Price offset for protection orders                                                                                         | [Number](https://api.swaycharts.io/developers/#/DXtrade-REST-API?id=numbers), *optional*  |
| **priceLink**      | Price link for protection orders                                                                                           | String, *optional*                                                                        |
| **tif**            | Time in force (expiration time for the order)                                                                              | String, *optional*                                                                        |
| **expireDate**     | Order expiration date in UTC                                                                                               | [Date](https://api.swaycharts.io/developers/#/DXtrade-REST-API?id=date-times), *optional* |

## *<mark style="color:blue;">string</mark>* Order Code

Order code for new orders is the unique id assigned by the client. The id is expected to be unique among all orders on an account. [See Client-originated Identifiers](https://sway-technologies.gitbook.io/sway-charts-api-documentation/rest-api-specification/getting-started/conditional-requests-and-updates). For modify order requests the order code can be either a client order id (as assigned by the client during order placement) or an internal code assigned by the system ("action key" of the order chain).

## *<mark style="color:blue;">string</mark>* Order Type

Possible values:

* `MARKET`
* `LIMIT`
* `STOP`

Order type cannot be changed after the order is issued. The value must be omitted in ‘Replace’ requests except group requests, which may contain new orders in Replace requests.

## *<mark style="color:blue;">string</mark>* Instrument

Instrument cannot be changed after the order is issued. In 'Modify' requests instrument must be the same as in original order.

## *<mark style="color:blue;">number</mark>* Quantity

Must be omitted or be zero for a ‘closing’ order linked to a position. In this case the *positionCode* field must be present and *positionEffect* should be set to ‘Close’. In this case quantity of the order will equal to the quantity of the position.

## *<mark style="color:blue;">string</mark>* Position Effect

Indicates whether the resulting position after a trade should be a new position or the trade should close an existing position. Required for position-based trading. If the value is ‘Close’, the *positionCode* field must be present.

Possible values:

* `OPEN`
* `CLOSE`

## *<mark style="color:blue;">string</mark>* Position Code

ID of a position that should be modified by this order. Used for position based trading. Must be present when *positionEffect* is ‘Close’ and omitted otherwise.

## *<mark style="color:blue;">string</mark>* Side

Possible values are :

* `BUY`
* `SELL`

## *<mark style="color:blue;">number</mark>* Price Offset

Price offset for protection orders. When parent order is triggered, either stop or limit price of protection order will be taken from parent trigger order's fill price with price offset. If this value is not null, the *priceLink* field must be present.

## *<mark style="color:blue;">string</mark>* Price Link

Price link for protection orders. Possible values:

* `TRIGGERED_STOP` - stop price of the order will be taken from parent trigger order's fill price
* `TRIGGERED_LIMIT` - limit price of the order will be taken from parent trigger order's fill price

## *<mark style="color:blue;">**string**</mark>***&#x20;TIF**

Time in force (expiration time for the order). One of:

* `GTC` (Markets, Limits, Stops)
* `DAY` (Limits, Stops)
* `GTD` (Limits, Stops, requires the *expireDate* field)

Default value depends on the platform configuration.

## *<mark style="color:blue;">**date**</mark>***&#x20;Expiration Date**

Order expiration date in UTC. Must be present if the *tif* field is **GTD**. Otherwise, must be omitted.
