Samco
Samco Securities is a leading discount broker in India offering equity, derivatives, commodity, and currency trading. Samco Trade API is a powerful RESTful API that allows traders to build customized trading applications, automate their strategies, and integrate with various algorithmic trading platforms.
Steps for Integration
Step 1: Login to Samco website
Visit https://web.samco.in/ and login with your client ID/Mobile number.
Step 2: Navigate to Login to Back Office
From the dashboard, navigate to the profile dropdown and then to Login to Back Office

Step 3: Activate Trade API
Navigate to subscription menu , Samco Trade API

Now activate your subscription
Step 4 : Environment Configuration
After activating Samco Trade API , configure your samco login crdentials in .env file
Step 5 : Process of Static IP Whitelisting
When you select Samco from the broker selection page, you will see a multi-step wizard with four steps:

Step A : Generate OTP
Click the Send OTP button
An OTP will be sent to your registered mobile number and email
Enter the OTP you received and click Generate Secret Key
Note :If you have already completed the one-time setup before, this step will show a warning that a Secret API Key is already saved. You only need to repeat this step if you want to generate a new secret key.
Step B : Save Secret API Key

After entering the OTP, Samco will send a Secret API Key to your registered email
Open your email, copy the Secret API Key
Paste it in the input field and click Save Secret Key

Important: The Secret API Key never expires. Keep it secure and do not share it with anyone. You only need to do this step once. If you generate a new OTP and create a new secret key, you must update the saved key as well.
Step 3: IP Management

Enter your server's Primary IP Address (the static IP of the machine running OpenAlgo)
Optionally enter a Secondary IP Address as a backup
Click Register IP (or Update IP if already registered)
A confirmation dialog will appear before submitting
IP Update Restriction: Samco allows IP changes only once per calendar week. If you have already updated your IP this week, the fields will be locked and a message will show the next available edit date. Make sure you enter the correct IP before confirming.
Note: Only IPv4 addresses are supported. After registration, Samco will reject API requests from any IP address that is not registered.
Step D: Login

Click Login to Samco
OpenAlgo will automatically generate an access token using your stored Secret API Key and log you in
On success, you will be redirected to the Trading Dashboard
Daily Login
Once the one-time setup is complete (Steps 1-3), your daily login is simple:
Select Samco from the broker selection page
The wizard will skip directly to the IP Management step (showing your registered IPs)
Click Continue to Login, then click Login to Samco
You will be logged in and redirected to the dashboard
Troubleshooting
OTP not received
Check your registered mobile and email. Wait a minute and try Resend OTP.
Secret API Key email not received
Check your spam/junk folder. The OTP and secret key use different not received email services. Wait a few minutes.
"Secret key does not match"
The saved key may be incorrect. Go to Step 1, generate a new OTP, match" get a fresh secret key from email, and save it again.
"The IP is not the registered static IP"
Your server's public IP does not match what is registered with registered static IP" Samco. Check your server's IP and update it in Step 3 (if the weekly lock has expired).
IP fields are locked
IPs can only be updated once per calendar week. Wait until the date shown in the warning message.
"Failed to save secret API key"
Make sure you are logged into OpenAlgo first (via the login page) before starting the Samco auth wizard.
Integrating with Samco APIs unlocks the ability to automate strategies, execute trades, and analyze data directly within your own infrastructure. When used with OpenAlgo, you can self-host and run your entire algo trading stack — with full control and zero vendor lock-in.
Last updated