IP Register
POST /ip/ipRegistration
DEPRECATED
This endpoint is deprecated and will be removed in a future release. It authenticates with the trading-account password, which is no longer SEBI-compliant for API access (Feb 2025 guidelines).
Please migrate to the new flow:
- Use the Web Dashboard to register and manage your Static IPs with
apiKey+apiSecret-based authentication.
The endpoint below continues to work for existing integrations but should not be used for new ones.
The Ip Register API is used to register the primary and secondary static IP addresses for a client. Once IPs are registered, the client can access the APIs only from these IP addresses.
The IP address must be a valid IPv4 address.
If a user tries to access the API from any other IP address, the request will be rejected with an error.
Parameter
| Name | Type | Required | Description |
|---|---|---|---|
clientId | string | true | The unique identification code assigned to you by SAMCO upon the successful opening of your trading account. |
password | string | true | Use the password set via any SAMCO platform (SAMCO Mobile App, SAMCO Web, or Stockbasket). If no password was set, use the one sent to you in the welcome email when you opened your account. |
primaryIp | string | true | The primary static IP address from which API access is allowed. |
secondaryIp | string | false | The secondary static IP address from which API access is allowed. This acts as a backup IP. |
Sample Request Body
json
requestBody={
"clientId" : "DV99999",
"primaryIp" : "XXX.XX.XX.XXX",
"secondaryIp" : "XXX.XX.XX.XXX",
"password" : "abc1234"
}Sample Code
js
var headers = {
'Content-Type' : 'application/json',
'Accept' : 'application/json'
};
$.ajax({
url : 'https://tradeapi.samco.in/ip/ipRegistration',
method : 'post',
data : JSON.stringify(requestBody),
headers : headers,
success : function(data){
console.log(JSON.stringify(data));
},
error : function(error){
console.log(error);
}
})py
import requests
import json
headers = {
'Content-Type' : 'application/json',
'Accept' : 'application/json'
}
r = requests.post('https://tradeapi.samco.in/ip/ipRegistration',
data=json.dumps(requestBody),
headers = headers)
print (r.json())Sample Response
json
{
"serverTime": "29/01/26 10:46:06",
"msgId": "d5f083f3-1b04-4b97-9385-1e578fdfeb7a",
"status": "Success",
"statusMessage": "Client IPs registered successfully",
"data": {
"user_id": "DV99999",
"primary_ip": "XXX.XX.XX.XXX",
"secondary_ip": "XXX.XX.XX.XXX",
"ip_updated_at": "2026-01-29T05:16:07.000Z"
}
}json
{
"serverTime": "29/01/26 10:48:56",
"msgId": "3c08efeb-8c2b-4f91-ae93-8343a764beb6",
"status": "Failure",
"statusMessage": "clientId and primaryIp are required"
}json
{
"serverTime": "29/01/26 10:48:08",
"msgId": "7e7674d0-65e8-43f7-8e66-a681fb60bfb2",
"status": "Failure",
"statusMessage": "Incorrect Password"
}json
{
"serverTime": "29/01/26 10:49:29",
"msgId": "62130e11-740d-401c-b020-a5474aa70d4d",
"status": "Failure",
"statusMessage": "Both primary and secondary IP already registered"
}Response Schema
Status Code 200
| Name | Type | Description |
|---|---|---|
serverTime | string | The date and time when the server generated the response. |
msgId | string | A unique identifier for the API response message. Useful for tracking or debugging purposes. |
status | string | The status of the API response. Possible values are 'Success', 'Error', or 'Failure'. |
statusMessage | string | A message describing the result of the API call. |
data | Object | Contains the registered IP details of the user. |
user_id | string | The unique client ID provided by SAMCO after account creation. |
primary_ip | string | The registered primary static IP address of the user. |
secondary_ip | string | The registered secondary static IP address of the user. |
ip_updated_at | string | The date and time when the IP address was last updated. |