Skip to main content
Listen aloud is not supported in this browser.

Upstox

Connect Upstox Pro API using API key, secret, and OAuth login.

How to get here

Navigation: Brokers › Add new Account › Upstox

Prerequisites (Upstox developer portal)​

  • Active Upstox trading account
  • Create an app in the Upstox Developer Console
  • Register Redirect URI exactly as: https://atpalgo.ai/upstox-callback.html (not https://atpalgo.ai/brokers/add)
  • Copy API Key and API Secret from the app settings
  • Enable required API permissions for trading and market data as needed
Redirect URI

Upstox requires an exact match. Register https://atpalgo.ai/upstox-callback.html including .html. /brokers/add is the add-account page, not the OAuth callback.

Step 1 — Open Add Broker and name the account​

  1. Go to Brokers › Add new Account (open Add Broker).
  2. Enter a display name and click Next.

Upstox add broker step 1

Step 1: Account display name.

Step 2 — Select Upstox​

  1. Select Upstox from the broker grid.
  2. Click Next.

Upstox add broker step 2

Step 2: Select Upstox.

Step 3 — Enter API credentials​

  1. Enter API Key and API Secret.
  2. Confirm the Redirect URI shown on the form matches the value in the Upstox app (https://atpalgo.ai/upstox-callback.html).
  3. Click Next.

Upstox add broker step 3

Step 3: API Key and Secret.

Step 4 — OAuth login​

  1. Click Open Upstox Login if the popup did not open automatically.
  2. Approve access in Upstox; the callback page posts the code back to ATPAlgo.
  3. Wait until authentication shows Connected.

Upstox add broker step 4

Step 4: Upstox OAuth login popup.

Step 5 — Finish setup​

  1. Click Finish Setup on the summary step.
  2. Verify the account on My Brokers.

Upstox add broker step 5

Step 5: Complete setup.

Troubleshooting​

IssueWhat to check
Redirect mismatch (UDAPI100068)Redirect URI in Upstox app must be exactly https://atpalgo.ai/upstox-callback.html, not https://atpalgo.ai/brokers/add
code exchange failedAPI secret must match the Upstox app; retry login
Session expiredUse Connect from My Brokers to re-login