Announcement Introducing Cloud Trader Pro - The Next-Gen Cloud-Based Multi-Broker Algo Trading Platform! Visit Website →
← Back to Manual

Global Configuration

Detailed guide to obtain and set up your Shoonya API credentials.

1

Basic Credentials

SHOONYA_LOGIN_USERNAME

Your Shoonya Login ID (e.g., FN012345). Use the same ID you use to login to the mobile app or web portal.

SHOONYA_PASSWORD

Your Shoonya trading account password.

2

API Keys & Redirect URL (Shoonya Portal)

API Key, Vendor Code, and API Secret Code (SHOONYA_SECRET_CODE) must be obtained from your Shoonya profile portal.

Navigation & Configuration Steps:

  1. Login to trade.shoonya.com.
  2. Click on your Profile/Client ID at the top-right corner and select API Key.
  3. You will find your SHOONYA_SECRET_CODE (API Secret Code), SHOONYA_CLIENT_ID (Vendor Code), and other details.
  4. Set Redirect URL: Enter https://trade.shoonya.com/OAuthlogin/ in the Redirect URL field.
  5. Registered IP: Enter your registered public IP address in the configuration and click update/save settings.
3

SHOONYA_TOTP_SECRET

The TOTP Secret is required for the application to automatically generate 2FA codes during login.

Method A (Trading Site)

Login to trade.shoonya.com

  • Go to Profile
  • Click Security
  • Select TOTP
  • Copy the alphanumeric TOTP Code

Method B (Beta Site)

Login to beta.shoonya.com

  • Go to Profile
  • Click Settings
  • Select Set TOTP
  • Copy the alphanumeric TOTP Code

⚠️ Important Note:

Ensure you copy the Secret Key (alphanumeric string), not the 6-digit dynamic OTP. If you have already enabled TOTP, you might need to disable and re-enable it to see the secret key again.

Can I skip this?

Yes. If you don't provide the TOTP secret, the application will simply ask you to manually enter the 6-digit TOTP code from your mobile authenticator app (Google Authenticator, Microsoft Authenticator, etc.) during every login.

4

Save & Restart

Once you have all the details, you can enter them in the application:

  1. Launch Shoonya Trader application.
  2. Go to User menu at the top.
  3. Select Creds.
  4. Fill in all the fields and click Save.
  5. Close and Restart the application for changes to take effect.

⚠️ Important Note:

All credentials are saved locally in the root .env file. No sensitive data is stored on external servers except Finvasia.

Need Help with Config?

If you are finding it difficult to get your API keys or TOTP secret, our support team can help you remotely via RustDesk.

Security Assurance

All your credentials are stored locally on your computer in the root .env file. We never send your passwords or API keys to our servers. Your trading strategy and account details remain completely private.