Features
Now, let’s take a look at how to add Sharekhan account in Stocks Developer.
Demo
Step 1 – Enable TOTP
Log In: Go to the Sharekhan website and log in with your credentials.
Navigate to Security: Click on your profile/menu button and select “Change My 2FA / TOTP”.
Install Authenticator: Ensure you have Google Authenticator or Microsoft Authenticator installed on your smartphone.
Scan QR Code: Click on “Enable TOTP” and scan the displayed QR code using your authenticator app. Note: You will see TOTP Key copy option next to QR code, please copy and save this TOTP Key.
Enter Code & Activate: Type the 6-digit code from the app into the Sharekhan website and click “Enable”.
Step 2 – Create API Key
Access the Dashboard: Go to the official Sharekhan Trading API portal.
Login: Log in with your Sharekhan trading credentials and complete the 2FA authentication.
Create New App: Click on the “Create New App” button.
Select App Type: Choose “Self App” (intended for individual users).
Fill Details: (see screenshot below)
- App Name: Enter any name (e.g., “MyTradingApp“).
- Redirect URL: https://webx.stocksdeveloper.in/auth/sharekhan
- Postback URL: https://apix.stocksdeveloper.in/postback/sharekhan
- Static IP: Start with Step 3 below to get static IP. Enter that static IP here.
- Description: Enter any description
Submit: Click “Create” to generate your API Key and Secret
Step 3 – Add Sharekhan Account
- Go to AutoTrader Web menu (Settings -> Trading Accounts)
- Click Create button
- Select Broker as Sharekhan
- Select SHAREKHAN_API as the platform
- Enter following:
- Login ID (after this click “Auto Assign IP” button to get static IP)
- If you do not know what your Login ID is then it is available under your Profile on Sharekhan (see screenshot below)
- Password
- Totp Key
- API Key (see screenshot below)
- API Secure Key (see screenshot below)
- Login ID (after this click “Auto Assign IP” button to get static IP)
- Click Validate & Save
Images
Static IP Setup
There are two ways to get a Static IP for your trading account:
- Option A β Auto-assign IP (recommended for most users): Our system assigns a dedicated Static IP from our pool.
- Option B β Bring Your Own IP (BYOIP): You supply your own proxy or IPv6 address. Use this if you already have a dedicated VPS or IPv6 block.
Both options are described below.
Option A β Auto-assign IP
This is a 2-step process:
1. Get your Static IP from our system first
Before creating your broker API, get your static IP from us:
- In our system, go to Accounts β Trading Accounts β Edit or Create Account
- Select your Broker and enter your Login ID
- Click “Auto-Assign IP” button β the system will immediately reserve a static IP for you
- Note down the IP shown:
- IPv4 β One primary IP is provided
- IPv6 β Both primary and secondary IPs are provided
Your IP is reserved for 24 hours. Save your account within this time to permanently assign it.
2. Create your Broker API using the Static IP from Step 1
Now go to your broker’s API creation screen and fill in the details:
- IP Type: IPv4 or IPv6 (as assigned in Step 1)
- Primary Static IP: (shown in Step 1)
- Secondary Static IP: (shown in Step 1 β only for IPv6)
- Algo Registration Type: Non-Registered
- API/Algo Category: “Below” or “Less than” 10 orders per second
Once the broker API is created, go back to our system, add any API credentials which may be pending, click Validate and Save the account. The static IP will be automatically applied to your account.
For further help, check this YouTube video showing “How to map Static IP?“
Option B β Bring Your Own IP (BYOIP)
Use this option if you have a dedicated VPS or proxy server that you want to use instead of an IP from our system.
Note: Only one IP source can be active at a time. Activating BYOIP will automatically remove any system-assigned IP, and vice versa.
Proxy Vendors: You can purchase proxy static IP from any vendor. Please refer to this document to understand what criteria to use while buying a proxy static IP.
Step 1: Save your proxy in “My Proxies”
Before assigning a proxy to an account, register it once in your proxy library:
- Go to Settings β My Proxies
- Click “Add Proxy”
- Fill in the details:
| Field | Description |
|---|---|
| Label | Give name of account you are going to use this proxy for (helps identify easily) |
| Proxy Host | IP address or hostname of your proxy server |
| Port | Port number (1β65535) |
| Username | Proxy authentication username |
| Password | Proxy authentication password |
- Click Save
You can add multiple proxies here and reuse them across accounts.
Step 2: Assign the proxy to your trading account
For a new account (before saving):
- While adding a new account, enter your Broker and Login ID
- Click “Bring Your Own IP”
- Select the proxy from your saved list
- The proxy is reserved immediately β proceed to fill in remaining account details and Save
For an existing account:
- Go to Accounts β Trading Accounts
- Click the pencil icon to edit your account
- Click “Bring Your Own IP”
- Select the proxy from your saved list and click “Apply”
- You will see the proxy displayed with a “Your IP” badge
Changing your proxy
- Click “Bring Your Own IP” again on the account edit screen
- Select a different proxy from your list and click “Apply”
Removing your proxy
- Click the “Remove” button next to the IP display
- The system will clear your proxy and return the account to unassigned state
- You can then use “Auto-Assign IP” to get a system IP instead
Managing your proxy library
- Go to Settings β My Proxies at any time to add, edit, or delete saved proxies
- Deleting a proxy from “My Proxies” does not affect accounts already using it