# Place Order Channel

### Description

- Ignore the `tradeSide` parameter when position mode is in one-way-mode<br/>
- hedge position mode: Open long: `"side"=buy, "tradeSide"=open`; Close long: `"side"=buy, "tradeSide"=close`; Open short: `"side"=sell, "tradeSide"=open`; Close short: `"side"=sell, "tradeSide"=close`; one-way position mode: "side"=buy and sell, tradeSide: ignore；

<div className="api-aligning">

```json title="Request Example"
{
   "args":[
      {
         "channel":"place-order",
         "id":"xxxxx-xxx-xxx-xxxx-xxxxxx",
         "instId":"BTCUSDT",
         "instType":"USDT-FUTURES",
         "params":{
            "orderType":"limit",
            "side":"buy",
            "size":"2",
            "tradeSide":"open",
            "price":"501",
            "marginCoin":"USDT",
            "force":"gtc",
            "marginMode":"crossed",
            "clientOid":"xxxxx-xxx-xxx-xxxx-xxxxxx"
         }
      }
   ],
   "op":"trade"
}
```

### Request Parameters

| Parameter                       | Type               | Required | Description                                                                                                                                                                                             | 
|:--------------------------------|:-------------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| op                              | String             | Yes        | "trade"                                                                                                                                                                                                 |
| apiCode                         | String             | No       | API rebate identifier                                                                                                                                                                                   |
| args                            | List&lt;Object&gt; | Yes      | List of channels to request subscription                                                                                                                                                                |
| &gt; id                         | String             | Yes      | Unique Identifier<br/>Length&lt;= 40<br/>("^[0-9A-Za-z_:#\\-+\\s]*$");                                                                                                                                     |
| &gt; instType                   | String             | Yes      | Product line type `USDT-FUTURES`                                                                                                                                                                        |
| &gt; instId                     | String             | Yes      | Product ID, e.g. `ETHUSDT`                                                                                                                                                                              |
| &gt; channel                    | String             | Yes      | Channel name, `place-order`                                                                                                                                                                             |
| &gt; params                     | Object             | Yes      |                                                                                                                                                                                                         |
| &gt;&gt; orderType              | String             | Yes        | Order type<br/>`limit`: Limit order<br/>`market`: Market order                                                                                                                                          |
| &gt;&gt; side                   | String             | Yes        | Trade side<br/>`buy`: Buy(one-way-mode); Long position direction(hedge-mode)<br/>`sell`: Sell(one-way-mode); Short position direction(hedge-mode)                                                       |
| &gt;&gt; size                   | String             | Yes        | Amount (base coin)<br/>To get the decimal places of size:Get Contract Config                                                                                                                            |
| &gt;&gt; force                  | String             | Yes        | Execution strategy(It will be invalid when orderType is market) <br/>`gtc`：Normal limit order, good till cancelled<br/>`post_only`：Post only<br/>`fok`：Fill or kill<br/>`ioc`：Immediate or cancel       |
| &gt;&gt; price                  | String             | No        | Limit price<br/>The decimal places of price and the price step can be returned by the Get Symbol Info interface                                                                                         |
| &gt;&gt; clientOid              | String             | No        | Custom order ID                                                                                                                                                                                         |
| &gt;&gt; marginCoin             | String             | Yes        | Margin coin(capitalized)                                                                                                                                                                                |
| &gt;&gt; marginMode             | String             | Yes        | Position mode<br/>`isolated`: isolated margin<br/>`crossed`: crossed margin                                                                                                                             |
| &gt;&gt; tradeSide              | String             | No        | Trade type<br/>Only required in hedge-mode<br/>`open`: Open position<br/>`close`: Close position                                                                                                        |
| &gt;&gt; reduceOnly             | String             | No        | Whether or not to just reduce the position: `YES, NO`<br/>Default: `NO`.<br/>Applicable only in one-way-position mode                                                                                   |
| &gt;&gt; presetStopSurplusPrice | String             | No        | Take-profit value<br/>No take-profit is set if the field is empty.                                                                                                                                      |
| &gt;&gt; presetStopLossPrice    | String             | No        | Stop-loss value<br/>No stop-loss is set if the field is empty.                                                                                                                                          |
| &gt;&gt; stpMode                | String             | No        | STP Mode(Self Trade Prevention)<br/>`none`：not setting STP(default)<br/>`cancel_taker`：cancel taker order<br/>`cancel_maker`：cancel maker order<br/>`cancel_both`：cancel both of taker and maker orders |

</div>

<div className="api-br-10"></div>

<div className="api-aligning">

```json title="Fail Response Example"
{
  "event":"trade",
  "arg":[
    {
      "id":"xxxxx-xxx-xxx-xxxx-xxxxxx",
      "instType":"USDT-FUTURES",
      "channel":"place-order",
      "instId":"BTCUSDT",
      "params":{
        "orderId":"xxxxxxxxxxx",
        "clientOid":"xxxxx-xxx-xxx-xxxx-xxxxxx"
      }
    }
  ],
  "code":0,
  "msg":"Success"
}
```

### Response Parameters

| Parameter                       | Type           | Description                                                                                                                                                                                             | 
|:--------------------------------|:---------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| event                           | String         | Event<br/>`trade` <br/>`error`                                                                                                                                                                          |
| arg                             | Object         | Channel                                                                                                                                                                                                 |
| &gt; id                         | String         | Unique Identifier<br/>Length&lt;= 40<br/>("^[0-9A-Za-z_:#\\-+\\s]*$");                                                                                                                                     |
| &gt; instType                   | String         | Product line type `USDT-FUTURES`                                                                                                                                                                        |
| &gt; instId                     | String         | Product ID, e.g. `ETHUSDT`                                                                                                                                                                              |
| &gt; channel                    | String         | Channel name, `place-order`                                                                                                                                                                             |
| &gt; params                     | Object         |                                                                                                                                                                                                         |
| &gt;&gt; orderType              | String         | Order type<br/>`limit`: Limit order<br/>`market`: Market order                                                                                                                                          |
| &gt;&gt; OrderId                | String         | Order ID.                                                                                                                                                                                               |
| &gt;&gt; side                   | String         | Trade side<br/>`buy`: Buy(one-way-mode); Long position direction(hedge-mode)<br/>`sell`: Sell(one-way-mode); Short position direction(hedge-mode)                                                       |
| &gt;&gt; size                   | String         | Amount (base coin)<br/>To get the decimal places of size:Get Contract Config                                                                                                                            |
| &gt;&gt; force                  | String         | Execution strategy(It will be invalid when orderType is market) <br/>`gtc`：Normal limit order, good till cancelled<br/>`post_only`：Post only<br/>`fok`：Fill or kill<br/>`ioc`：Immediate or cancel       |
| &gt;&gt; price                  | String         | Limit price<br/>The decimal places of price and the price step can be returned by the Get Symbol Info interface                                                                                         |
| &gt;&gt; clientOid              | String         | Custom order ID                                                                                                                                                                                         |
| &gt;&gt; marginCoin             | String         | Margin coin(capitalized)                                                                                                                                                                                |
| &gt;&gt; marginMode             | String         | Position mode<br/>`isolated`: isolated margin<br/>`crossed`: crossed margin                                                                                                                             |
| &gt;&gt; tradeSide              | String         | Trade type<br/>Only required in hedge-mode<br/>`open`: Open position<br/>`close`: Close position                                                                                                        |
| &gt;&gt; reduceOnly             | String         | Whether or not to just reduce the position: `YES, NO`<br/>Default: `NO`.<br/>Applicable only in one-way-position mode                                                                                   |
| &gt;&gt; presetStopSurplusPrice | String         | Take-profit value<br/>No take-profit is set if the field is empty.                                                                                                                                      |
| &gt;&gt; presetStopLossPrice    | String         | Stop-loss value<br/>No stop-loss is set if the field is empty.                                                                                                                                          |
| &gt;&gt; stpMode                | String         | STP Mode(Self Trade Prevention)<br/>`none`：not setting STP(default)<br/>`cancel_taker`：cancel taker order<br/>`cancel_maker`：cancel maker order<br/>`cancel_both`：cancel both of taker and maker orders |
| code                            | String         | code                                                                                                                                                                                                    |
| msg                             | String         | msg                                                                                                                                                                                                     |

</div>
