How to automate order modifications based on change in Bid/Ask price?

Hi Team,

Can you please suggest a possibility with Dhan where the orders can be automatically modified based on change in Best Bid/Ask price.

For example: Say for NiftyDec2024 20000 call option I want to place a buy order and want to ensure that my order stays at top. So that if anyone places a bid higher than my order, then my order gets modified to that price+1 Rs upto a certain price. This feature would be really really helpful for dealing in less liquid secuities. Kindly suggest please.
Thank you!

1 Like

Hi @Jgarg, guessing you are referring here to order matching based on bids/ask. This is core exchange platform’s order matching, in India can happen on exchanges itself. Brokers have to simply send orders to exchange for execution, all order matching happens there.

Thank you @PravinJ for responding. No, I am not referring to that and I completely understand what you have mentioned. What I am asking for is something entirely different, let me pls clarify - So there are many securities where there is a huge gap in best Bid price and best Ask Price.
Example below:

Here the best bid price available is 2009 and best ask price is 5169. Suppose I need to buy this option and I am ready to buy it maximum for 2500. So what I want is, instead of directly placing a limit order for 2500, I want to stay as the top bidder for whatever minimum price possible upto 2500.
So that whenever a seller comes with a market order or a limit order for then best bid price, my order gets executed being the top bidder.

So in this case I will place a buy order for say 2010 and would become the top bidder. But the problem is later on some one else will increase his bid after say 1 hour and my bid would go to second place. What I want is whenever any bid is placed above my bid, my buy order gets automatically modified with that price+1 Rs so it stay at top and wait for any seller in need to come.

I understand this might not be everyone’s problem but for me it would be of greatest help as I deal in long term options which are normally highly illiquid. And as a matter of fact this automation do exist, but t is proprietary with prop desks. Further I understand that, with own coding and using api’s this requirement can be achieved, but I don’t know that much coding and use of api’s as yet. It would be helpful if dhan can help us with anything on this.

One suggestion how it can be done is with a feature - let’s say named “Stay on top” for securities which are less liquid. It will ask user for just two things:

  1. Incremental price (a rupee unit to be added to the second best bid price. Ex: if the second best bid price is 100 and user has enter this “incremental price unit” as Rs1 then user’s buy order will be modified with limit price of 101)

  2. Max price (at which user is ready to enter, for example if in above case, user has entered max price as 110 then order modification will go till 110 only and will not be increased further).

I hope I made my ask clear with this. Happy to connect with you or anyone in your team if you need more inputs and all the cases where this feature would be highly beneficial for traders and could be of great value.

At developing end, I know it’s a highly complex infrastructure and systems with exchanges and all, but I do understand it to some extent and building this feature is quite possible at broker’s end. Hopeful on this.

1 Like


Also ChatGPT has a solution for this :slight_smile:

It also specifies for the benefits I am looking for.

Yes, One can write algos using APIs and modify limit orders possibly based on market depth and try to do bit of this.

As a broker we are not allowed to do this, it is core order matching that happens at exchange. We cannot modify your orders based on the changes in market depth - we are only permitted to execute your orders at your instructions. If you modify using APIs, we will execute them - but cannot modify on your behalf.

I understand you may be referring to brokers with prop desk, running proprietary algos - we do not run that, have no prop desk and do not have intentions to run one. Its important that we stay a neutral execution platform :slight_smile: