Browse docs
Docs / Installation Guide

ThetaPrime — Installation Guide

This guide covers everything you need to install ThetaPrime, activate your license, connect your Zerodha Kite account, and start running strategies.


System Requirements

Requirement Minimum Recommended
Operating System Windows 10 (64-bit, build 1903+) Windows 11 (64-bit)
RAM 4 GB 8 GB
Disk space 500 MB free 1 GB free
Display 1280 × 720 1920 × 1080
Internet Broadband (for Kite API calls) Broadband
Browser Chrome 90+, Edge 90+, Firefox 88+ Chrome (latest)

No Python required. ThetaPrime ships as a self-contained Windows application — Python and all dependencies are bundled inside the installer.

Ports used

Service Port Notes
ThetaPrime Dashboard 5000 Accessible only from localhost

Make sure port 5000 is not blocked by firewall or in use by another application. If you run antivirus software, you may need to add an exception for the ThetaPrime installation folder.

Windows Credential Manager

ThetaPrime stores your credentials (API keys, dashboard password, license key) in the Windows Credential Manager. This is built into Windows — no third-party software is required.


Prerequisites — Before You Install

1. Zerodha Kite Connect API subscription

ThetaPrime requires a Zerodha Kite Connect developer account (not a regular trading account).

  1. Go to developers.kite.trade and sign in with your Zerodha credentials.
  2. Click Create new app.
  3. Fill in the app name (e.g. ThetaPrime) and set the redirect URL to: http://127.0.0.1:5000/callback
  4. Note your API Key and API Secret — you will enter these during first-time setup.

The Kite Connect API subscription has a monthly fee charged by Zerodha directly. ThetaPrime is a separate product and does not charge any API fees.

2. A static IP address (SEBI requirement)

SEBI's API trading rules require a fixed IP address for order placement. Contact your ISP and ask for a static IP add-on for your broadband connection (most ISPs offer this for a small monthly fee), then register that IP with your broker's API portal alongside your redirect URL — Kite Connect and Breeze both ask for it when you create or edit the app. Dhan enforces this server-side on every order regardless of any app-level setting, so it's the easiest one to get caught out by after an IP change.

A dynamic IP that changes on its own will eventually stop matching what's registered with your broker, breaking live order placement until you update it. A static IP avoids that entirely.


Installation

Step 1 — Run the installer

  1. Double-click ThetaPrime-0.32.11-setup.exe (filename matches whatever version you downloaded).
  2. If Windows SmartScreen appears, click More info → Run anyway. (ThetaPrime is not yet code-signed; this prompt is expected.)
  3. Click Next to advance through the welcome screen.

Step 2 — Accept the EULA

Read the End-User License Agreement carefully, then click I accept the agreement and Next.

Key points in the EULA:

  • Your license key is tied to this machine (one key per machine).
  • You are responsible for SEBI compliance and your Kite Connect subscription.
  • Past simulation results do not guarantee future live trading performance.

Step 3 — Choose an install location

The default location is:

C:\Program Files\ThetaPrime

You can change this, but avoid paths with spaces or special characters. Click Next.

Step 4 — Start Menu shortcuts

Leave "Create Start Menu shortcuts" checked so you can open ThetaPrime from the Start Menu. The shortcut launches a native app window, not a browser tab. Click Next, then Install.

Step 5 — Service registration

The installer silently registers ThetaPrimeDashboard as a Windows service using NSSM. The service:

  • Starts automatically when Windows boots.
  • Runs as Local System (no user login required).
  • Logs output to C:\Program Files\ThetaPrime\logs\.

You will see a progress bar during this step — it typically takes 5–15 seconds.

Step 6 — Finish

Click Finish. The installer offers to open ThetaPrime in its own app window right away. After that, open it any time from the Start Menu shortcut ThetaPrime Dashboard, or from its icon in the system tray if it's already running.


The App Window & Tray Icon

ThetaPrime runs as a native desktop app (ThetaPrimeShell.exe), not a browser tab — http://localhost:5000 still works in a regular browser as a fallback, but the app window is the normal way to use it.

  • Closing the window (the X button) minimizes it to the system tray instead of quitting — the backend service keeps running either way, so scheduled strategies aren't affected by closing the window.
  • Tray icon — click it to reopen the window, or right-click for Open ThetaPrime / Quit. The icon and its tooltip turn from green ("Live") to red ("Session Dead / Unreachable") if the backend stops responding.
  • Desktop toast notifications — trade alerts (entries, exits, adjustments) you've enabled on the Auth page's Notifications card also pop up as Windows toast notifications while the app window is running, in addition to any email/Telegram/webhook channels configured.

License Activation (Optional at First Launch)

There's no separate activation gate before the dashboard. On first launch you go straight to setting a dashboard password (below) and get a 15-day trial automatically — simulation/paper strategy runs work fully during the trial; only switching a strategy to Real is blocked. A navbar badge (Trial Nd → Trial Expired → ✓ Licensed) always shows your state and links to the License page (/license).

Once the trial's 15 days run out, all strategy runs are blocked — paper included — until you activate a key. Full details, the revocation check, and the grace period are in docs/licensing.md; the short version:

Step 1 — Open the License page

Open /license (via the navbar badge). It shows your Machine Fingerprint and includes it automatically in the request below — nothing to copy or paste yet.

Step 2 — Request a key

Enter your email (and a coupon code if you have one), then click Request Standard or Request Pro. A valid coupon approves instantly; otherwise your request is queued for review — reload the page any time to check. Once it's ready, your key appears pre-filled in the License Key field below.

No coupon, or no internet access on this machine? Email the fingerprint shown on /license to the address in your purchase confirmation instead — we'll sign and send back a key within one business day.

Step 3 — Paste your license key

Confirm the pre-filled key (or paste one you got by email) into the License Key field on /license and click Activate.

The key is stored in Windows Credential Manager and never needs to be entered again.

License validity & grace period: each key carries an expiry date set when it's issued, with a 7-day grace period afterward before the app falls back to trial-expired behavior. There's no separate advance-warning banner — check the navbar badge's tooltip for days remaining.

Moving to a new machine: Contact us with the new machine's fingerprint. We will issue a replacement key at no charge if you are within your licensed term.


First-Time Setup

Step 1 — Set a dashboard password

The dashboard is protected by a password that you choose. On first access:

  1. Open ThetaPrime from the Start Menu (or click the tray icon if it's already running).
  2. You are prompted to Set Dashboard Password.
  3. Choose a password of at least 8 characters and click Set Password.

This password is stored in Windows Credential Manager. You will be asked for it each time the app window (re)starts. After 3 incorrect attempts, the source IP is locked out for 5 minutes.

To reset the password if you forget it, see Troubleshooting.

Step 2 — Enter your Kite API credentials

  1. Click Auth in the top navigation bar.
  2. In the Kite Connect card, enter your API Key and API Secret (from the Kite developer portal).
  3. Click Save & Start Login.

Step 3 — Complete Kite OAuth login

After saving your credentials, ThetaPrime opens the Zerodha login page inside the same app window:

  1. Enter your Zerodha Client ID and Password.
  2. Complete TOTP (6-digit code from your authenticator app) or PIN.
  3. Zerodha redirects back to the ThetaPrime dashboard automatically.

The status badge in the top-right changes from ● No Token (red) to ● Token OK (green). You are ready to run strategies.


Daily Login — Refreshing the Access Token

The Kite access token expires at midnight every day. You must refresh it each morning before any scheduled strategies run.

  1. Open ThetaPrime (Start Menu shortcut, or the tray icon if it's already running) and log in with your dashboard password.
  2. Click Auth in the top navigation bar.
  3. Click Start Login (your API key is already saved — you do not need to re-enter it).
  4. Complete the Zerodha login as above.
  5. Confirm the badge shows ● Token OK.

Tip: Schedule this as part of your morning routine before market open (09:00 IST). If a strategy runs while the token is stale, it will be blocked and logged as an error — no order will be placed.


Running a Strategy

Manual run (paper mode)

  1. Go to the Dashboard (home page).
  2. Find the strategy card and click Run (Paper).
  3. Click Recent Runs to see the output.

Scheduling a strategy

  1. Click the Schedule icon on a strategy card.
  2. Set the cron schedule (e.g. 30 9 * * 1-5 for 09:30 on weekdays).
  3. Click Save. The scheduler persists across reboots — no action is needed after Windows restarts.

Verifying the Service is Running

Open Task Manager → Services (or run services.msc) and look for ThetaPrimeDashboard. Its status should be Running.

Alternatively, open PowerShell and run:

Get-Service ThetaPrimeDashboard

To restart the service manually:

Restart-Service ThetaPrimeDashboard

Frequently Asked Questions

Does my computer need to stay on during the trading day? Yes. ThetaPrime runs as a Windows service on your own PC, not in any cloud — it can only enter, monitor, and exit positions while that machine is powered on and the service is running. A laptop that sleeps or shuts down stops managing your open trades until it's back.

What happens if my internet connection drops? ThetaPrime needs a live connection to your broker for as long as a position is open — entries, monitoring, and exits all depend on it. Brief blips are retried automatically, but a sustained outage means it can't act on your positions until connectivity returns, the same as if you were watching a terminal yourself. A stable, always-on connection is part of the setup, not optional.

Do I need a static IP address? Yes — see Prerequisites above. SEBI's API trading rules require a fixed IP for order placement, registered with your broker. Ask your ISP for a static IP add-on before setting up your Kite, Breeze, or Dhan API access.


Troubleshooting

Installer's Finished page says the Windows service could not be registered

nssm.exe (the service manager ThetaPrime uses) ships bundled inside the installer — nothing for you to download or place yourself. This error means it went missing from that particular installer build, a packaging defect rather than anything on your end. The install itself still completed; you can run the backend manually with app.exe from the installation folder (the Start Menu shortcut's ThetaPrimeShell.exe only ever starts the service, it can't launch the backend directly), but it won't survive a reboot until re-installed with a fixed build. Contact us with the version number if you hit this.

App window won't open, or shows a blank/error page

  1. Check the backend service is running (Get-Service ThetaPrimeDashboard).
  2. If the service is stopped, start it: Start-Service ThetaPrimeDashboard.
  3. Check C:\Program Files\ThetaPrime\logs\service_stderr.log for startup errors.
  4. Confirm port 5000 is not in use by another app: powershell netstat -ano | findstr :5000
  5. If the window itself never appears, check whether ThetaPrimeShell.exe is already running in the background (Task Manager, or the system tray) — it minimizes to tray on close rather than exiting, so a second launch from the Start Menu just no-ops. Click the tray icon to bring the existing window forward, or right-click it and choose Quit before relaunching.

Forgot dashboard password

The password is stored in Windows Credential Manager. To reset it:

  1. Open Credential Manager (search for it in the Start Menu).
  2. Click Windows Credentials.
  3. Find the entry named kite_dashboard / dashboard_password and delete it.
  4. Restart the ThetaPrime service.
  5. The next time you open ThetaPrime, you're prompted to set a new password.

"Token is stale" error in strategy logs

The Kite access token has expired. Refresh it via Auth → Start Login as described in Daily Login.

Email test fails

  • Confirm SMTP host, port, and credentials are correct.
  • For Gmail: verify you are using an App Password, not your regular Google password.
  • Temporarily disable antivirus / firewall to rule out outbound SMTP being blocked.
  • Check C:\Program Files\ThetaPrime\logs\service_stderr.log for the specific error.

Strategy exits with non-zero return code

Open Dashboard → Recent Runs and click the failed run to see the full output and stderr. Common causes:

  • Stale access token (see above).
  • Market holiday (the strategy skips automatically on NSE holidays — this is normal).
  • Network error reaching the Kite API.

License not accepted — "Invalid key"

  • Ensure you copied the entire key including the expiry date and the | separator.
  • Keys are machine-specific. If you reinstalled Windows or changed your primary network card, your fingerprint has changed — contact us for a replacement key.

Uninstalling

  1. Open Settings → Apps → Installed apps (Windows 11) or Control Panel → Programs → Uninstall a program (Windows 10).
  2. Find ThetaPrime and click Uninstall.
  3. The uninstaller stops and removes the ThetaPrimeDashboard Windows service automatically before deleting files.

Your data files (trade history, run logs, strategy files) are stored in C:\Program Files\ThetaPrime\ and are removed with the uninstall. Back up any files you want to keep before uninstalling.


Rolling Back to a Previous Version

If an update causes a problem, every past installer stays permanently available on the ThetaPrime-Dist Releases page — nothing is ever removed.

  1. Download the -setup.exe for the version you want from that page.
  2. Run it. Installing an older version over a newer one works the same as any upgrade — it's not blocked — and preserves your existing configuration, trade data, and credentials.
  3. The service restarts automatically on the rolled-back version.

Before rolling back across a wide version gap, skim CHANGELOG.md on the Releases page for that range for any data-format or license-format changes (e.g. the license key scheme changed at v0.26.0 — an installer older than that won't recognize a key issued after it). If in doubt, contact support before rolling back.


Data & Privacy

ThetaPrime is entirely self-hosted. All data — credentials, trade history, strategy files, logs — stays on your machine. Nothing is transmitted to ThetaPrime servers except:

  • A one-time version check against the GitHub Releases API (once per day, for the update badge). This sends no personal data.

Your Kite API key and access token are stored in Windows Credential Manager and transmitted only to Zerodha's API over HTTPS.


Getting Help

Channel Details
Email support@thetaprime.in
In-app docs Click Docs in the navigation bar
Logs C:\Program Files\ThetaPrime\logs\

Applies to ThetaPrime v0.35.4 · Page last updated 2026-08-23