Connect Dhan to ShareKeyX
Connect Dhan v2 with automatic authentication or a manually refreshed access token.
How the connection is provided
ShareKeyX connects to broker and exchange APIs through secure direct integrations and vetted third-party connectivity providers. Your broker or exchange remains the account custodian and final authority for balances, orders, fills, charges and statements.
Broker and exchange names, marks and logos belong to their respective owners. Their appearance here identifies the account connection only and does not imply ownership by ShareKeyX.
Before you start
- Use an active account whose KYC, mobile number and trading access are current.
- Select the exact platform variant shown in your broker API application.
- Create dedicated API credentials for ShareKeyX where the broker permits it.
- Keep order, portfolio and trade access only; never enable withdrawal access.
- Do not place a live order until account identity, balances and timestamps are verified.
Dhan v2 - Automatic token
Uses the broker account details, API application credentials and an external TOTP secret seed for automated session authentication.
Complete setup sequence
- 1
Sign in to your Dhan account and confirm that the account, KYC status and mobile number are active.
- 2
Open the broker's developer, API or trading-platform settings and enable the exact connection method shown below.
- 3
Enable external TOTP for API access and securely record the TOTP secret seed. Do not use the rotating six-digit code as the seed.
- 4
Register the required static API address in the broker portal before validation. It must match the address recorded for this connection.
- 5
Collect the Dhan Client ID, Dhan MPIN, TOTP secret key, Registered phone number, API Key, API Secret.
- 6
In ShareKeyX, open Advanced mode, then Manage accounts, Dhan, and Dhan v2 - Automatic token.
- 7
Enter the details only in the encrypted connection form, choose a clear account nickname, and select Validate & link account.
- 8
Confirm the broker account identifier, connection status and portfolio timestamp before using balances or preparing an order.
Credential checklist
| Field | Requirement | Where to find it | Safe handling |
|---|---|---|---|
| Dhan Client ID | Required | Your broker profile, client master or trading login screen. | Account identifier; verify spelling and do not enter another person's ID. |
| Dhan MPIN | Required | The MPIN configured in the broker application. | Enter the current MPIN only in the encrypted connection form. |
| TOTP secret key | Required | The TOTP seed shown when API two-factor authentication is enabled. | Use the secret seed, not the rotating six-digit authenticator code. |
| Registered phone number | Required | The mobile number registered with the broker account. | Use the broker-registered number, including the correct country code when requested. |
| API Key | Required | The broker developer or API application dashboard. | Use a dedicated ShareKeyX API application where the broker permits it. |
| API Secret | Required | Shown once or issued with the API application key. | Treat as a password. Rotate it immediately if it is exposed. |
| Registered static IP | Optional | The static address registered for API access in the broker portal. | It must exactly match the address approved by the broker. Do not enter a changing home IP. |
Dhan v2 - Manual token
Uses an access token generated in the broker portal. Check its expiry and renewal requirements before each trading session.
Complete setup sequence
- 1
Sign in to your Dhan account and confirm that the account, KYC status and mobile number are active.
- 2
Open the broker's developer, API or trading-platform settings and enable the exact connection method shown below.
- 3
Generate a fresh access token in the broker portal and note its expiry or daily renewal requirement.
- 4
Register the required static API address in the broker portal before validation. It must match the address recorded for this connection.
- 5
Collect the Dhan Client ID, Daily Access Token.
- 6
In ShareKeyX, open Advanced mode, then Manage accounts, Dhan, and Dhan v2 - Manual token.
- 7
Enter the details only in the encrypted connection form, choose a clear account nickname, and select Validate & link account.
- 8
Confirm the broker account identifier, connection status and portfolio timestamp before using balances or preparing an order.
Credential checklist
| Field | Requirement | Where to find it | Safe handling |
|---|---|---|---|
| Dhan Client ID | Required | Your broker profile, client master or trading login screen. | Account identifier; verify spelling and do not enter another person's ID. |
| Daily Access Token | Required | Generated from the broker API dashboard or account login flow. | Tokens can expire or require daily renewal. Never paste them into support messages. |
| Registered static IP | Optional | The static address registered for API access in the broker portal. | It must exactly match the address approved by the broker. Do not enter a changing home IP. |
Validate before trading
Identity
Broker name, platform, account ID and nickname match the intended account.
Status
The account shows Connected, and any broker-hosted authorization has completed.
Freshness
Portfolio, cash, positions and order timestamps reflect the current session.
Permissions
Read and trading access are enabled; withdrawals and unrelated permissions are disabled.
Order review
Symbol, exchange, side, quantity, product, type and limit price are correct before confirmation.
Final record
The broker order book, trade book, contract note and statement remain authoritative.
Troubleshooting
Credentials are rejected
Confirm the selected broker and platform first. A valid key from another broker, application, XTS environment or platform variant is rejected by design.
TOTP validation fails
Enter the TOTP secret seed supplied during API two-factor setup, not the rotating six-digit authenticator code. Confirm the device clock is automatic and accurate.
Static address does not match
Register the address specified by the connection workflow in the broker developer portal and allow the broker time to apply the change before validating again.
Token or OAuth session expired
Generate a fresh token or complete the broker-hosted sign-in again. Some brokers require a new authorization on every trading day.
Portfolio or order status looks delayed
Refresh the account after the broker confirms its session. Use the broker contract note, order book and statement as the final record of balances, fills, charges and positions.
Connection is temporarily unavailable
Do not submit the same order repeatedly. Check the connection state, broker availability and existing order book before retrying to avoid duplicate intent.
Reporting a connection problem
Create an in-app support ticket with the broker name, platform, account nickname, approximate time and a screenshot of the visible error. Redact all passwords, PINs, TOTP seeds, API secrets, tokens and personal identifiers.
Safety and disclosures
Store secrets only through the encrypted account form. Rotate any credential that was exposed outside it and disconnect accounts you no longer use.
ShareKeyX research, AI reports and educational content are for educational research only. They are not investment advice and must not be used as the sole basis for financial, trading or investment decisions.
You remain responsible for every submitted order. Broker availability, exchange conditions, connectivity, risk checks, rate limits and market movement can affect acceptance, sequencing and execution.
Ready to connect?
Return to ShareKeyX Advanced mode, open Manage accounts, select Dhan, and choose the exact platform covered above.
