Skip to main content

How to Connect Angel One to TradeLyser

Connect your Angel One account to TradeLyser and your trades land in your trading journal without downloading reports or filling in spreadsheets. TradeLyser uses Angel One's official SmartAPI: you create a SmartAPI app once to get an API key, enter it with your Angel One Client ID, and log in with your MPIN and a TOTP code in a pop-up. There is no separate login window. Setup takes about 10 minutes.

Once connected you can:

  • Sync Angel One trades automatically every weekday night, or with one click whenever you want them sooner.
  • Re-authenticate each day in seconds with your MPIN and TOTP.
  • Track P&L, win rate, fees and tax for every Angel One trade on the TradeLyser dashboard.

What you need​

RequirementWhere to get it
An active Angel One trading account and your Client IDangelone.in
Your 4-digit Angel One MPINThe MPIN you use to log in to Angel One
TOTP enabled for SmartAPI, in an authenticator appsmartapi.angelbroking.com/enable-totp, set up in Step 1
A SmartAPI app (API Key)SmartAPI portal, created in Step 2
A TradeLyser accountapp.tradelyser.com (a free trial is available)
Enable TOTP before you connect

TradeLyser logs in to Angel One with your MPIN and a 6-digit TOTP code. If you haven't enabled TOTP for SmartAPI, you have no code to enter and the connection fails. Do Step 1 first, and make sure your phone's clock is set automatically so the codes are valid.

Step 1: Enable TOTP for Angel One SmartAPI​

This is a one-time setup, described on Angel One's SmartAPI forum.

  1. Open smartapi.angelbroking.com/enable-totp.
  2. Enter your Angel One Client ID and your trading password or PIN.
  3. Enter the OTP sent to your registered email and mobile. A QR code appears.
  4. Scan the QR code with an authenticator app such as Google Authenticator or Microsoft Authenticator.

Your authenticator app now shows a 6-digit Angel One code that refreshes every few seconds. You enter the current code each time you connect or re-authenticate.

Step 2: Create a SmartAPI app and copy the API key​

  1. Go to the SmartAPI portal and click Signup to register (or log in if you already have a SmartAPI login).
  2. Choose Create an App.
  3. Select the Trading APIs type.
  4. Fill in the form:
    • App Name: TradeLyser (or any name you will recognise)
    • Redirect URL: SmartAPI requires one. TradeLyser doesn't use it, because Angel One logs in with MPIN and TOTP. Angel One's own guide suggests http://127.0.0.1.
    • Postback URL and Angel Client ID: optional.
  5. Submit the form and copy the API Key it shows. SmartAPI also shows a Secret Key; TradeLyser doesn't ask for it.

Step 3: Add your Angel One account in TradeLyser​

The Add Account screen in TradeLyser, where you choose Angel One from the list of supported brokers

  1. In TradeLyser, open Accounts and click Add Account.
  2. Choose Angel One. Brokers with a green dot are supported for Auto Sync.
  3. Choose a calculation method. This decides how buys and sells are matched into trades:
    • FIFO (first in, first out) is recommended. It matches how most Indian brokers report P&L.
    • LIFO matches the most recent buy first.
    • WA uses the weighted average price.
  4. Choose Auto Sync as the import method.
  5. Enter an account name (for example Angel One – Intraday), your Angel One Client ID and the API Key from Step 2.
  6. Click Connect and Save Account. The Angel One - TOTP & MPIN pop-up opens.
  7. Enter your 4-digit Angel One MPIN, then the current 6-digit Angel One TOTP from your authenticator app.
  8. Click Validate & Connect. You see Angel One Connected Successfully when the account is ready.
These choices are permanent

The calculation method and import method cannot be changed after the account is created. If you need a different method later, add a second Angel One account in TradeLyser.

Step 4: Sync your Angel One trades​

The actions menu on an Angel One account in TradeLyser, with Sync Trades, Re-Auth and Import Trade

Open the ⋯ actions menu on your Angel One account card:

ActionWhat it does
Sync TradesFetches today's orders from Angel One. You can choose to skip fees, taxes or slippage, then click Fetch Orders. Large syncs run in the background and you get a notification when they finish.
Re-AuthOpens the MPIN and TOTP pop-up again when the login has expired.
Import TradeImports an Angel One trade file, which is how you bring in older trades.

Sync History is not available for Angel One, so past trades come from a file import. TradeLyser also syncs your Angel One account automatically every Monday to Friday at 10:30 pm IST, as long as your Angel One login is still valid at that time. Run Sync Trades whenever you want today's trades in TradeLyser sooner, for example right after the market closes.

tip

After a sync, click the refresh icon in the TradeLyser header so every dashboard widget picks up the new trades straight away.

Import older Angel One trades​

Because Angel One syncs the current day's orders, bring in your earlier trades from a file:

  1. Download your trade history for the date range from Angel One's reports section.
  2. Open the ⋯ actions menu on the Angel One account and choose Import Trade.
  3. Drag in the file, check the preview, click Map Data, review the mapped orders and click Import Trades.

Angel One files go through TradeLyser's generic parser. If a file isn't recognised, copy the rows into the TradeLyser CSV template. To avoid duplicates, end the file's date range on the day before you started using Sync Trades. See Import trades from CSV.

Re-authenticate every trading day​

Angel One SmartAPI logins expire, and the account card then shows Re-auth required. Log in again before 10:30 pm so the nightly sync can run, and before any manual sync:

  1. Open the ⋯ actions menu on the Angel One account and choose Re-Auth.
  2. In Angel One – Re-authenticate, enter your Angel One MPIN and the current Angel One TOTP, then confirm.

The account card's Token field shows how long the current login remains valid.

If your Angel One login has expired, TradeLyser reminds you with a bell notification and an email in the morning (around 8:30 am) and a last call around 9 pm, so you can log in before the 10:30 pm sync. Accounts that are still logged out at 10:30 pm are skipped that night. To stop these reminders for an account, choose Turn off login reminders in its ⋯ actions menu.

Troubleshooting Angel One connection issues​

ProblemFix
"Please enter your 4-digit Angel One MPIN"Enter the 4-digit MPIN you use for Angel One, not your trading password.
"Please enter the 6-digit TOTP" or TOTP is rejectedUse the current code from your authenticator app before it changes. Make sure your phone's clock is set automatically.
You have no Angel One TOTP codeTOTP isn't enabled yet. Complete Step 1 at smartapi.angelbroking.com/enable-totp.
"Invalid API key" or login failsCopy the API Key again from your SmartAPI app and check the Client ID. Remove any spaces before or after them.
Account shows Re-auth requiredThe Angel One login has expired. Use Re-Auth from the ⋯ menu.
Today's trades are missingRun Sync Trades after the order is executed (or wait for the 10:30 pm nightly sync), then click the header refresh icon.
Older trades are missingImport them from an Angel One trade file with Import Trade.

Still stuck? Follow Troubleshoot broker connection or Trades not syncing, or email support@tradelyser.com.

Frequently asked questions​

Does TradeLyser support Angel One?​

Yes. Angel One is supported for Auto Sync through the official SmartAPI, and for File Upload of Angel One trade files.

Why does TradeLyser ask for my MPIN and TOTP?​

Angel One SmartAPI logs in with your Client ID, API key, MPIN and a TOTP code instead of a broker login window. TradeLyser asks for the MPIN and TOTP in a pop-up each time you connect or re-authenticate.

Do I need the SmartAPI Secret Key?​

No. TradeLyser needs only your Client ID and the API Key.

Can I import old Angel One trades?​

Yes. Sync History isn't available for Angel One, so import older trades from a file with Import Trade.

Can I connect more than one Angel One account?​

Yes. Add each Angel One account separately from Accounts → Add Account. The number of accounts you can add depends on your TradeLyser plan. See Add multiple accounts.

Next steps​