Jump to content
Sign in to follow this  

What is a workflow for orders stream ?

Recommended Posts


I’d like to learn a little about stream of orders. I’d suppose we should recieve a confirmation for every order we placed, shouldn’t we? But look at the example. I placed entry buy order with stop and limit and here is a piece of list active stop-limit orders:


       "Applicability" : 2,
        "Currency" : "CHF",
        "Direction" : "buy",
        "ExpiryDateTimeUTC" : null,
        "LastChangedDateTimeUTC" : "\/Date(1310547947205)\/",
        "LimitOrder" : {
            "OrderId" : 457115863,
            "Quantity" : 10000,
            "TriggerPrice" : 0.7714
        "MarketId" : 400481112,
        "MarketName" : "AUD\/CHF",
        "OcoOrder" : null,
        "OrderId" : 457115862,
        "ParentOrderId" : null,
        "Quantity" : 10000,
        "Status" : 2,
        "StopOrder" : {
            "OrderId" : 457115864,
            "Quantity" : 10000,
            "TriggerPrice" : 0.7686
        "TradingAccountId" : 400189681,
        "TriggerPrice" : 0.77,
        "Type" : 3

The parent order has ID=457115862, limit=457115863 and stop=457115864. So far so good. But in orders stream I got a confirmation only about orderID=457115864, that is only about stop order. Here it is:

PROBE PROBE 0,1|457115864||||||||\u005C/Date(1310547947000)\u005C/|||\u005C/Date(1310547947000)\u005C/||||10000||Pending|1 PROBE PROBE PROBE

Again, after deleting main order I got confirmation only about stop, not main order. I can’t figure out why does it work in such manner, would you please explain what an idea stands behind this logic?

Thank you,

Share this post

Link to post

Check the mode in which you are subscribing to the orders stream. It shouldn’t be MERGE, you should use DISTINCT (you’ll receive only the fields which have been updated) or RAW (which gives you everything).

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this