---
title: Understanding Conditional Trigger & Order APIs on DhanHQ
url: https://dhan.co/blog/feature-updates/conditional-trigger-order-apis-on-dhanhq/
page_type: blog_post
last_updated: 2026-05-08
---

# Understanding Conditional Trigger & Order APIs on DhanHQ

While actively trading and strategy-building, you might have come across a problem: missing the setup when it hits your level; creating alerts but needing manual execution; and coding your strategies but getting stuck on loops and recalculations.

These types of issues not only reduce your efficiency but might also result in the loss of significant opportunities. Manual execution and semi-automation (alerts only) usually break down when markets move fast. To tackle this problem, Dhan has built a tool called conditional triggers & order APIs.

## What are conditional trigger & order APIs?

Conditional Trigger & Order APIs allow you to automate both detection and execution of trades. With this feature, you can set the conditions, the system monitors the market and executes the order when the conditions are met.

The Conditional Trigger and Order API is an extension of alerts; it takes action in addition to notifying you. This feature allows you to:

- Set conditions based on price or technical indicators
- Automatically execute one or multiple orders when triggered
- You can modify trigger parameters anytime without cancelling or rebuilding your setup
- You can track every trigger and execution seamlessly with real-time updates

## Why this feature matters

The following are the key reasons behind the existence of the conditional triggers and order APIs:

### Automated execution with conditional triggers

With Conditional Trigger & Order APIs, you can define market conditions based on price or technical indicators and link them directly to order execution. Once the conditions are set, the system will take care of execution.

### Simplified strategy deployment

You can create and manage condition-based strategies without handling complex execution logic separately. This makes strategy deployment easy and straightforward.

### Continuous market monitoring

By using Conditional Triggers, the system monitors the market continuously, allowing traders to run strategies without actively tracing the charts.

## How do conditional triggers & order APIs work?

The process for conditional triggers and order APIs is as follows:

1. Log in to [web.dhan.co](http://web.dhan.co) and go to the profile section. Click on ‘Access DhanHQ APIs’.
2. Generate the access token and log in to your Algo Trading Platform.
3. Use the POST/alerts/orders endpoint to create a trigger based on specific market criteria.
4. Define the comparison type and indicators. Dhan offers 20+ built-in technical indicators, such as RSI, SMA, and Bollinger Bands.
5. Define logic such as CROSSING_UP or GREATER_THAN, and set the frequency to ONCE or RECURRING
6. You can link one or multiple orders to a single trigger condition, allowing for complex entry or exit strategies to be executed simultaneously.
7. Once you send the POST request, the trigger is active on Dhan's infrastructure, meaning your system doesn't need to stay online to monitor the market.

You can always refer to the official documentation of the [Conditional Triggers](https://dhanhq.co/docs/v2/conditional-trigger/) for more details.

## Key benefits

Here are some key benefits.

- With conditional triggers, you don’t need to monitor charts continuously.
- As the trades execute automatically, there is almost zero delay in execution once the condition matches.
- You can update the strategies without rebuilding them from scratch.
- 20+ built-in technical indicators for rule-based strategies.
- Postback tracking gives all updates, offering clear visibility of execution.

## Practical use cases

Below are some strategies which you can build with conditional triggers.

### Breakout strategy

You can set a buy rule if the price crosses over the resistance level; it can be a specific price or an indicator signal. The system will execute the order instantly once the condition is met.

### Indicator-based trading

You can use indicators like SMA crossover or EMA signals to trigger trades automatically based on rules.

## Conclusion

Conditional Trigger & Order APIs bring together condition-based monitoring and order execution into a single workflow. The feature enables strategies to run automatically, by allowing traders to define price or indicator-based triggers and link them directly to execution, without manual intervention.

It solves a key limitation in trading workflows: the gap between signal generation and execution. You can define, deploy and execute the trades automatically, instead of waiting for manual execution.
