Introducing: MTF APIs for Trading - now execute orders with Margin Trading Facility over Dhan APIs

Just a few days back, we launched MTF (Margin Trading Facility) on Dhan and we have received an overwhelming response from swing traders and short term investors. With MTF on Dhan, users can trade with up to 4X margin and over 950+ stocks on all Dhan - easily one of the highest coverage of stocks under MTF.

We have already executed thousands of orders in these last 30 days, and now as a practice to ensure we bring most of our capabilities on APIs - we are now extending MTF or Margin Trading Facility on Dhan HQ trading APIs. We feel this will open up new avenues for systematic swing traders who want to take short term trading positions and lower margins.

So if you are already wondering about how you will have to integrate more APIs in your system, don’t worry, we have got this covered.

We are adding a new product type for MTF in the Orders API category, so you don’t have to put in any extra effort to integrate a whole set of APIs just for MTF. You can choose productType: β€œMTF” to place MTF orders, it is that simple.

To help you track and manage your MTF positions better, we have added MTF positions API as well. On the Positions API, you will now get stocks marked with product type as MTF, wherever applicable.

This is live on DhanHQ APIs [Documentation]. You can directly try out MTF on APIs by heading over to - webpage where you can try these APIs directly from your browser. Also, we will be adding MTF to our Python library soon, so don’t forget to check that out - here.

To know more about how MTFs work on Dhan, we have a detailed video explanation of the same:

Trade better, with Dhan

– Hardik


Hi,Great to hear that.It works with json code generator too right??.By replacing"c" with β€œmtf”?


JSON Code generator is for Trading View Webhooks, which are configured separately to consume alert messages from Trading View. API and Webhooks have different backend systems and for now, MTF orders won’t work for webhooks.

However, we will evaluate the need for MTF on webhooks. Can you point out if you are looking to use this and what could be the use cases here?

Have you integrated webhooks with β€œMTF” order now???it is very much needed to place stoploss or Target orders using tradingview alerts for β€œMTF” Stocks.

Coz 20 baskets are not enough for MTF order requirement.


Not yet. We will take it in the subsequent webhook enhancement where we can try to add different order types. Meanwhile, you can continue using baskets for this.

Atleast increase basket number to 50