All posts

How to Connect Dhan to WickLog

Import your Dhan trades and open positions into WickLog in one click via secure, read-only OAuth login. Full setup guide, troubleshooting, and FAQ inside.

Sachin Sharma4 min read

TL;DR: Connect your Dhan account to WickLog in 3 steps using a secure, read-only login — no credentials are stored. Once connected, import trades for any timeframe, including open positions, in one click, and they'll flow straight into your Dashboard, Journals, and Ticker AI.

If you're logging trades manually from your Dhan console, connecting it to WickLog turns that into a one-click import. This guide walks through the full setup — connecting your account, importing trades, and where those trades show up once they're in.

What You'll Need

  • An active WickLog Pro account
  • An active Dhan trading account
  • Your Dhan login credentials and the TOTP from your authenticator app

Step-by-Step

Step 1: Go to the Connect Demat screen

From your WickLog dashboard, navigate to the Connect Demat screen. This is where all supported broker connections live.

WickLog DashboardWickLog Dashboard

Step 2: Connect your Dhan account

Click Connect on the Dhan card. This takes you to Dhan's own official login page — not a WickLog-branded screen — where you'll enter your Dhan credentials and complete TOTP validation directly with Dhan. WickLog never sees or stores this login information; it only receives read access to your tradebook through this login flow. On success, you're redirected back to the WickLog Trades screen.

WickLog Connect DematWickLog Connect Demat

Step 3: Import your trades

On the Trades screen, click Import from Demat dropdown and select Dhan in the top-right corner. WickLog Trades WickLog Trades

A popup will ask you to select what you want to import — past trades, current trades, or your open positions.

WickLog Trades WickLog Trades

Step 4: Confirm your trades have landed

Once the import finishes, your trades appear on the WickLog Trades screen. From there, they automatically feed into your Dashboard (performance stats), your Journals (so you can write notes and link trades to entries), and Ticker AI (so you can ask questions about your own trading data).

Why the Connection Expires (And Why That's a Good Thing)

Like WickLog's other broker connections, your Dhan session expires and needs to be reconnected periodically rather than staying linked forever. WickLog only ever holds a temporary, read-only session — not a permanent stored credential. A shorter-lived session means there's less standing access to your demat account at any given time, which lowers the exposure if anything ever went wrong on either end. The trade-off is you'll reconnect more often; the upside is meaningfully lower risk.

Common Mistakes / Troubleshooting

  • "Connect" doesn't redirect anywhere — check for a popup blocker; Dhan's login opens as part of the same flow but browser extensions can interfere.
  • TOTP rejected — make sure the code is current; the validation window is short, so a delay of even a few seconds can invalidate it.
  • Open positions not showing — make sure you selected "open positions" specifically in the import popup rather than a closed date range.
  • Trades not showing on Dashboard/Journals after import — give it a moment to sync, then refresh; if trades appear on the Trades screen but not elsewhere, that's a sync delay, not a failed import.
  • Session expired mid-use — this isn't an error, it's the read-only session timing out. Just reconnect from the Connect Demat screen and re-import.

FAQ

Does WickLog get write access to my Dhan account? No. The connection is strictly read-only — WickLog can fetch your tradebook and positions but cannot place, modify, or cancel orders on your behalf.

Can I import my open positions, not just closed trades? Yes. The import popup lets you pull past trades, current trades, or your open positions specifically.

Why do I have to reconnect Dhan so often? Sessions expire by design. It's a deliberate security trade-off: a short-lived, read-only session reduces the window in which your account data could be exposed, compared to a permanent stored connection.

Is Dhan import available on the free plan? This guide assumes a WickLog Pro account, since Dhan import currently requires Pro.

Try It

Connect your Dhan account and see your full trade history, including open positions, in WickLog in under two minutes — connect Dhan now.

Suggested reads