# Order Group Request

Used to issue strategic order groups (e.g. `IF-THEN` or `OCO one-cancels-other`).

| Field               | Value                               | Type                                                                                                                                                                          |
| ------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **orders**          | List of orders in a group           | List of [Single Order Request](https://sway-technologies.gitbook.io/sway-charts-api-documentation/rest-api-specification/cash-transaction/single-order-request), **required** |
| **contingencyType** | Relations between orders in a group | String, **required**                                                                                                                                                          |

## ***Single Order Request*****&#x20;Orders**

Orders in a group should have the same account and instrument.

Order groups can be issued only for Position-based accounts.

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

One of the following values (case-insensitive):

* `OCO` – orders in the group are OCO orders. Once one order gets into a final state, the other ones are cancelled. For this group the `OPEN` position effect and nonzero quantity should be set for both orders. Quantity should be equal for both orders. Note: OCO orders pair can be either traditional Limit/Stop pair with same side or pair with different sides, like Stop-Buy + Stop+Sell.
* `IF-THEN` – orders in the group are parent and contingents. The first order is considered a parent (`IF` order) and the other ones become active after parent is filled. The `IF` order should have OPEN position effect and nonzero quantity. The `THEN` order(s) should have CLOSE position effect and either zero or absent quantity ("position attached"). CLOSE order quantity will be assigned (with opposite sign) when `IF` order is fully filled. In case of order group cancellation, `THEN` orders will remain without quantity. The `THEN` orders should have the opposite SIDE from the `IF` order. `THEN` orders shall have only GTC TIF
