> For the complete documentation index, see [llms.txt](https://tradesync.gitbook.io/tradesync/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tradesync.gitbook.io/tradesync/fxtr-v2/functions-of-fxtr-v2/open-stream-for-the-account/messages-that-can-be-sent-in-open-stream/modifyorder.md).

# ModifyOrder

**`ModifyOrder -`** request for order modification by id

Example:

`{"id": 11, "type":"ModifyOrder", "body": {"ticket": 969163, "price": 1.001}}`

**Request Body Fields:**

<table><thead><tr><th>Parameter</th><th width="113" data-type="checkbox">Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>ticket</code></td><td>true</td><td><code>unsigned long long</code></td><td>the ticket of order to be closed on Meta Trader Server</td></tr><tr><td><code>price</code></td><td>false</td><td><code>double nullable</code></td><td>new price of activation for pending, limit, stop orders</td></tr><tr><td><code>price_trigger</code></td><td>false</td><td><code>double nullable</code></td><td>new price of triggering for stop limit orders</td></tr><tr><td><code>sl</code></td><td>false</td><td><code>double nullable</code></td><td>new Stop Loss level for trading operations</td></tr><tr><td><code>tp</code> </td><td>false</td><td><code>double nullable</code></td><td>new Take Profit level for trading operations</td></tr><tr><td><code>time_out</code></td><td>false</td><td><code>int64</code></td><td>time in milliseconds that should be wait for async requests results (it can be from 109 msec to 7 sec; if you set <code>time_out &#x3C;109 msec,</code> it will be 109 msec; if you set <code>time_out > 7 sec,</code> it will be 7 sec)</td></tr></tbody></table>

**Responce Type** - `ModifyOrder.`

**Responce Body Fields:**

<table><thead><tr><th>Parameter</th><th width="168" data-type="checkbox">Always retutned</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>result</code></td><td>true</td><td><code>int</code></td><td>result of operation Meta Trader server</td></tr><tr><td><code>ticket</code> </td><td>true</td><td><code>unsigned long long</code></td><td>the ticket of new opened order on Meta Trader Server</td></tr><tr><td><code>price</code></td><td>true</td><td><code>double</code></td><td>price of order execution, in case of pending, limit, stop orders price is 0</td></tr><tr><td><code>time</code></td><td>true</td><td><code>int64</code></td><td>time of order execution, in case of pending, limit, stop orders time is 0</td></tr><tr><td><code>symbol</code></td><td>true</td><td><code>string</code></td><td>a string with the symbol name</td></tr><tr><td><code>type</code></td><td>true</td><td><code>int</code></td><td>type of the order</td></tr><tr><td><code>action</code></td><td>true</td><td><code>int</code></td><td>type of action to which the trade request belongs</td></tr><tr><td><code>price_order</code></td><td>true</td><td><code>double</code></td><td>the price of an order in a trade request</td></tr><tr><td><code>price_trigger</code></td><td>true</td><td><code>double</code></td><td>the price, at which a Limit order is placed when the Stop Limit order triggers</td></tr><tr><td><code>tp</code></td><td>true</td><td><code>double</code></td><td>the Take Profit level</td></tr><tr><td><code>sl</code></td><td>true</td><td><code>double</code></td><td>the Stop Loss level</td></tr><tr><td><code>volume</code></td><td>true</td><td><code>double</code></td><td>the Volume of modified trade requests</td></tr></tbody></table>

**Example:**

```json
{
    "type": "ModifyOrder", 
    "id":11, 
    "body": {
        "result": 10009, 
        "ticket":154187, 
        "symbol": "EURUSD", 
        "type": 2, "action": 203, 
        "price": 0, "price_order": 0, 
        "price_trigger": 0, 
        "tp": 0, 
        "sl": 0, 
        "volume": 0.01,
        "time":0
        }
}
```
