# modifyOrder fails to move stop order, but returns success (s=200)

**URL:** <https://community.tradovate.com/t/modifyorder-fails-to-move-stop-order-but-returns-success-s-200/4641>\
**Category:** API Developers\
**Created:** [May 16, 2022, 3:27am UTC](https://community.tradovate.com/t/modifyorder-fails-to-move-stop-order-but-returns-success-s-200/4641 "2022-05-16T03:27:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cat1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/cat1/32/1328_2.png) [@cat1](https://community.tradovate.com/u/cat1)\
**Post date:** [May 16, 2022, 3:27am UTC](https://community.tradovate.com/t/modifyorder-fails-to-move-stop-order-but-returns-success-s-200/4641/1 "2022-05-16T03:27:08Z")

</div>

Moving a stop order with following code:

url=‘order/modifyorder’  
this.ws = new WebSocket(url)  
this.ws.send(`${url}\n${id}\n${query || ''}\n${JSON.stringify(body)}`)

The reply is success:  
mod ord res:{  
“s”: 200,  
“i”: 27,  
“d”: {  
“commandId”: 861227941  
}  
}

But the stop order in reality fails to move:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/tradingforum/original/2X/d/da26c820e750e5c9c8556d06bf969f799e76b018.png)

This results in the code unable to detect failure to move stop order, which can lead to serious issues. Any advice is appreciated!

---

<div class="post-metadata">

**Author:** ![cat1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/cat1/32/1328_2.png) [@cat1](https://community.tradovate.com/u/cat1)\
**Post date:** [May 16, 2022, 3:34am UTC](https://community.tradovate.com/t/modifyorder-fails-to-move-stop-order-but-returns-success-s-200/4641/2 "2022-05-16T03:34:22Z")

</div>

Also I am thinking to query stop price to confirm move success, before letting the code proceed.  
However documentation shows that /order/item and /order/dependents do not reply with any actual price data for the order.  
I also realize there are different orderVersions for each order.  
How can I quickly check the current stop price of an order?  
Thank you

---

<div class="post-metadata">

**Author:** ![Alexander](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/alexander/32/988_2.png) [@Alexander](https://community.tradovate.com/u/Alexander)\
**Post date:** [May 16, 2022, 12:54pm UTC](https://community.tradovate.com/t/modifyorder-fails-to-move-stop-order-but-returns-success-s-200/4641/3 "2022-05-16T12:54:31Z")

</div>

That’s normal, that just means the API accepted your request to modify the order. Notice that it returns a `commandId`. This is what you need to find out if your modification executed. Look up `/executionReport/deps?masterId=<commandId>` to find the result of the command to modify your order.

To check an order’s stop price, use `/orderVersion/deps?masterid=<orderId>`, that should give you the lastest `orderVersion` entity. One of its fields is `stopPrice`.

> _Edit: Don’t include the angle brackets, just the raw integer ID._

---

<div class="post-metadata">

**Author:** ![Frik](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/frik/32/2627_2.png) [@Frik](https://community.tradovate.com/u/Frik)\
**Post date:** [October 9, 2024, 8:43am UTC](https://community.tradovate.com/t/modifyorder-fails-to-move-stop-order-but-returns-success-s-200/4641/4 "2024-10-09T08:43:31Z")

</div>

It would be better to use userSync to get notified of the change instead.
