Place order along with GTT meta info if it succeeds

nimish04

Right now i don't think we can place GTT order along with buy order. I have attached the image that I want to place order by api.
Also i tried placing the exact order from UI and see the order details and there you can see under `meta` tag that GTT information is saved like below

meta: { gttp: [ [ 1, -5 ], [ 1, 5 ] ] },

Could not found this param to be send as part of `placeOrder` function.

Currently what i am thinking is,
- Place normal order via api
- Then keep polling the order until it is placed
- Once it is placed, create a GTT order

Any other solution? or any thing planned to implement this?

Thank you in advance!
  • sujith
    You can place an order and then listen to postback or order updates via Websockets use that as an event to pull orderbook.
    If you see filled_quantity is not zero and order is COMPLETED or OPEN then you can either place GTT for traded quantity or if order is completed then place GTT for original quantity.
  • nimish04
    Thanks for the suggestion I just implemented that it works!
This discussion has been closed.