Skip to main content

Open Trading APIs

Phase 2 · API Keys starts here.

On Dhan:

  1. Click your profile icon (top right).
  2. Open Get Trading & Data APIs (or DhanHQ Trading APIs).

Profile menu open on the home screen

Profile menu — click Get Trading & Data APIs

Switch Access Token → API Key​

On the Trading APIs page, slide the toggle to API Key (not Access Token).

Click DhanHQ Trading APIs, then slide the toggle to API Key

Wrong — Access Token (left). Expires in ~24 hours.Correct — API Key (right). Lasts ~12 months.

Wrong — toggle is on Access Token

Correct — toggle is on API Key

Full page if you need to find the toggle (top right of the API card):

Access Token mode — full page

API Key mode — full page

Next: Copy Redirect URL & Postback URL · same toggle detail: Switch to API Key mode