Dhan integration: sync F&O and equity trades to TradeLyser

Connect your Dhan account, get options and intraday fills into one journal with charges, and know what to check when F&O rows are missing.

Karthikeyan Anbarasan

Founder, TradeLyser

Reviewed by Shankar Gajendran (CTO, TradeLyser) · Updated 18 Oct 2026

Login

Dhan login

Segments

Cash · F&O · MCX

Fallback

Dhan CSV

Step by step

Dhan uses TradeLyser’s broker authorisation flow. You sign in with the same details you use in the Dhan app or web, grant read access to trade history, and TradeLyser pulls trades on a schedule. Screens can change as Dhan widens its API, but the start is always broker settings.

  1. Choose Dhan in TradeLyser

    Go to Settings → Broker connections and pick Dhan from the broker picker, then press Connect.

    TradeLyser "Choose broker, prop firm or trading platform" window with Dhan among the active brokers
    Figure 1. The broker picker. Dhan sits in the Active Brokers group.
  2. Log in to Dhan

    Sign in on Dhan’s page with mobile OTP or password, whichever your Dhan security setting uses.

  3. Pick the trading account and approve

    If you have several profiles, choose the trading account (most retail traders have one), then approve read access to trade history.

  4. Wait for the backfill

    The first sync can take longer on accounts with a lot of F&O history.

  5. Check yesterday before tagging

    Compare yesterday’s closed trades on Dhan with the imported count. Tag only once they match.

What syncs from Dhan

What syncs

  • Executions in delivery, intraday, futures and options: symbol, side, quantity, time and product type
  • Fees, where Dhan’s API exposes them
  • AMO and GTT orders once they execute and appear in trade history
  • Options spreads, as one row per leg

What does not sync

  • Expiry-week labels. The API does not send them, so tag them.
  • Options fills from before your F&O segment was active
  • Live ticks. Sync runs on a schedule, so review after the session.

How Dhan books land in the journal

Rows carry symbol, side, quantity, execution time, product type and fees where Dhan’s API exposes them. Dhan’s product names differ from older brokers, so tag by what the trade did (closed the same day or carried) rather than by the label you remember from elsewhere.

BookTypical Dhan useJournal note
DeliverySwing and positional equityKeep an investment sleeve apart from tactical swings if you run both.
IntradaySame-day equity and indexUse intraday-only tags. A forced square-off deserves a discipline note.
FuturesIndex and stock futures, carry or intradayLog rupee risk per lot. Keep Bank Nifty and Nifty tags apart.
OptionsWeekly and monthly index options, stock optionsStrike and expiry are on each row. Spreads arrive as legs.

Many Dhan accounts lean heavily on Nifty weeklies and Bank Nifty monthlies. STT and brokerage on the sell side of options can turn a small gross win into a net loss, so read the synced net figure, not the gross number on the Dhan P&L card.

Dhan quirks worth knowing

  • Backfill can run late after a heavy expiry session. Retry the sync the next morning before reaching for a CSV.
  • Segment toggles and bank linking live in the Dhan app. If KYC or a segment is still pending, the connection can fail without a clear error.
  • Phone-only traders still get every fill, but check that AMO and GTT executions appear in the next session’s import.
  • Pledge and MTF positions can carry a different product type from plain delivery. Note it when you tag swing trades.
  • Half-day holiday sessions sometimes import in an odd batch. Reconcile the count against Dhan order history.
Active Accounts table listing each linked broker account with its connection, token status, sync method and last updated date
Figure 2. Active Accounts. The Token column shows when a connection needs re-approval, and Method shows Auto Sync or Import.
Common mistake
Connecting before F&O approval cleared, then deciding sync is broken. Equity imports fine, options stay empty until the segment is active and you run a fresh sync.

Post-market routine with Dhan

  1. Once your Dhan positions are flat, open TradeLyser and check the last sync time.
  2. Give each planned trade one strategy tag. All legs of an options spread share the same tag.
  3. Mark rule breaks while you still remember them. A green day on Dhan can hide a process miss.
  4. On Friday, compare intraday and positional tags, and check how much capital went to index options versus everything else.

CSV fallback when Dhan sync is down

Use a CSV for one-off gaps: a final export from a closed account, an API maintenance window, or history older than the backfill. If sync is working, do not upload a CSV every day. Manual habits drift within a couple of weeks.

  1. In Dhan’s reports section, find the tradebook, ledger or transaction export (the wording depends on the app version).
  2. Pick only the date range missing from TradeLyser and export it as CSV.
  3. Upload it through the CSV import in TradeLyser and map Dhan’s column names.
  4. Match on execution time, symbol and quantity so the rows do not duplicate when sync returns.

Trouble syncing?

Why are my Dhan F&O trades missing after I connected?

Usually the F&O segment was not active at the first sync. Activate F&O on Dhan, then run a manual sync in TradeLyser. Equity-only history will not produce options fills after the fact.

Is Dhan sync real-time during market hours?

No. Sync runs on TradeLyser’s schedule, not tick by tick. Review after you are flat for the day.

Can I import a Dhan CSV after switching from another broker?

Yes. Export Dhan trade history for the gap and import it as CSV. Dhan’s column names differ from Zerodha’s, so use the column mapping rather than assuming the same layout.

Does TradeLyser pick up Dhan AMO and GTT fills?

Executed AMO and GTT orders import like regular fills once they appear in Dhan trade history. Note the session context if the fill time differs from when you placed the order.

How do I avoid duplicate Dhan trades?

Do not upload a CSV for dates that sync already covered. If you must combine the two, match on timestamp, symbol and quantity.

Related guides