SSALGODocs
Website ↗Open app
Connect your broker

Connect Dhan

Save your own Dhan app credentials in SSAlgo, then complete Dhan's consent login.

Before you begin#

Dhan connects through an app that you create in your own Dhan account. You need your Dhan Client ID, plus the App ID and App secret from that app.

Open Broker settings in SSAlgo and locate the Dhan card. If the card says it is not available on this deployment yet, Dhan cannot be connected for your account at the moment.

Configure the connection#

  1. On the Dhan card, choose Connect Dhan. The setup panel opens because app credentials are needed first.
  2. Copy the Redirect URL shown in the panel. It is specific to your account, so do not reuse one from another user or an older setup.
  3. Paste that URL into the redirect setting of your Dhan app.
  4. Enter your Client ID, App ID, and App secret in SSAlgo and save.
  5. Choose Continue to Dhan and complete Dhan's consent login.
  6. On return, check that the card shows the account you intended and its connection status.

Broker-side screens and requirements can change. Follow Dhan's current instructions for creating and configuring an app.

Live orders through Dhan#

At the time of this review, SSAlgo places Live orders through Alice Blue and Fyers. A Dhan connection can be authorized, but Live order placement through Dhan is not yet supported. Run strategies in Paper mode, or connect a supported broker for Live.

If the card shows Live trading isn't available for this broker yet, that is the reason the Use Dhan for Live button is disabled. Check documentation updates for changes to broker support.

Updating or removing credentials#

Use Edit credentials on the card. Your current session keeps working; new credentials are used the next time you reconnect.

Removing saved credentials also logs Dhan out. If Dhan is your Live broker, disconnect it first, which switches you to Paper.

Common setup issues#

Check for a redirect URL that does not exactly match the one shown in SSAlgo, a mistyped Client ID, or an App ID and secret from a different app. Copy values exactly and remove accidental spaces. For a repeated failure, note the error and time, then follow broker troubleshooting.

Search the handbook