Difficulty Placing Limit Order with Trigger Price on DHAN HQ API

In a trading api, I want to place a gtt order, but gtt order is not available in that api, so I am trying to mimic the same using a limit order, but while placing a limit order to buy high, it executes at market price, but order has to trigger at higher price than market price which is the trigger price . Also I don’t have any stop loss. How to do the same.

Example
stock : ASIANPAINT
CMP: 3070
TRIGGER PRICE: 3100 ( I want to buy at 3100)

I can place it daily through api if it doesn’t execute on a particular day.

There is no stop loss anything. Since there is no forever order in API, how to place an order like this using API. Please give python code

Hello @thiru

In this scenario, what you can do is try placing Trigger Order, which will place a Market or Limit order whenever your desired BUY price is reached.

You can use dhan.SL or dhan.SLM in Python library and add Trigger Price. This will only trigger your order if the desired price is reached and then execute the order in Market or Limit as per your order type.

Hope this helps!