Skip to content

Samco Trade API Documentation v3.2


Info Icon The Login, Generate OTP, Generate Secret Key, and Generate Access Token APIs are deprecated. Please migrate to the latest V3.2 APIs — use Generate Session Token for direct authentication or OAuth 2.1 Authorization-Code Flow.

The SAMCO Trade API is a set of REST APIs that allows users to build customized applications based on their trading requirements. It enables users to log in, search for symbols, place and execute orders, view order status, and check their positions and holdings, among other functions. This documentation provides all the necessary details to understand the SAMCO Trade API collection. The APIs ship ready-to-run code samples in cURL, Java, Node.js, and Python — see Supported Client Runtimes for tested versions.

For reference, you can download the Postman collection by Click here Excel Icon.

For downloading a list of all tradeable scrips across exchanges please Click here Excel Icon. This is a CSV file which you can import into your database.

NOTE: To ensure stability and there by provide seamless services to our customers, Samco may set limits on your use of the Trade APIs (for example, limit on the number of requests sent to a specific API) . If you have additional questions regarding the rate limits on APIs, please reach out to us using the support link and we will be happy to assist you.

APIs will work intermittently over the weekends/holidays and outside market hours due to maintenance activity.

What's new in V3.2

See the full Trade API v3.2.0 release notes for highlights, new endpoints, deprecated APIs, and the migration guide.

Deprecated APIs

API NameRequest URL
Login/login
Generate OTP/otp/generateOtp
Generate Secret Key/otp/secretKeyGenerator
Generate Access Token/accessToken/token
IP Register/ip/ipRegistration
IP Update/ip/ipUpdate

Note: Generate Access Token API is used to generate the access token required for login.

NEW: Samco Trade API Web Dashboard

We have launched the Samco Trade API Web Dashboard — the recommended self-service portal for:

  • Creating OAuth apps and generating your API Key and API Secret (OTP-protected)
  • Registering and managing your Static IPs (OTP-protected)

The dashboard replaces the legacy password-based IP registration flow. The older /ip/ipRegistration and /ip/ipUpdate endpoints continue to work but are deprecated. New integrations should manage Static IPs via the Web Dashboard.

Supports the list of following index names:

BSE CGSENSEXBSE CDNIFTY50 PR 1x INVBSE ITMETALOILGASNIFTY50 PR 2x LEV
BSEIPOGREENXPOWERNIFTY50 TR 1x INVCARBONBASMTRCDGSNIFTY50 TR 2x LEV
BSEFMCBSE HCALLCAPNIFTY50 TR 2x LEVREALTYSMEIPODOL30NIFTY Mid LIQ 15
LRGCAPMIDSELSMLSELNIFTY100 LIQ 15SNXT50SNSX50NIFTY 50NIFTY Quality 30
NIFTY BANKNIFTY NEXT 50DOL100NIFTY MIDCAP 50NIFTY 100NIFTY 200NIFTY 500NIFTY FIN SERVICE
NIFTY AUTONIFTY FMCGNIFTY ITNIFTY COMMODITIESNIFTY MEDIANIFTY METALNIFTY PHARMANIFTY CONSUMPTION
NIFTY PSU BANKNIFTY PVT BANKNIFTY REALTYNIFTY GROWSECT 15NIFTY CPSENIFTY ENERGYNIFTY INFRANIFTY DIV OPPS 50
NIFTY MNCNIFTY PSENIFTY SERV SECTORNIFTY MID100 FREEDOL200TECKBSEPSUNIFTY SML100 FREE
AUTOBANKEXINDIA VIXNIFTY50 VALUE 20NIFTY MID SELECT

APIs That Do Not Require Session Token

The following APIs can be accessed without a session token:

FunctionEndpoint
Generate Session Token (direct)/session/token
Login (deprecated)/login
Generate OTP (deprecated)/otp/generateOtp
Generate Secret Key (deprecated)/otp/secretKeyGenerator
Generate Access Token (deprecated)/accessToken/token
IP Register (deprecated)/ip/ipRegistration
IP Update (deprecated)/ip/ipUpdate

HTTP Request Header

This is the request header which should be included in every API request.

ℹ️ Note: The session token is required for all APIs except the ones listed above.

NameRequiredDescription
AcceptfalseAccept indicates what the format of the response will be. If the user does not provide an accept, by default it is considered as application/json. Only application/json, */*, or blank are acceptable.
Content-TypefalseContent-Type refers to the media type or MIME type of the data in an HTTP message, indicating the type of content being sent. By default, it is considered as application/json. Only application/json, */*, or blank are acceptable.
x-session-tokentrueWhen one hits the login API, it receives a session token in response. The same token is used here for validation for all API requests.

Http Response Code

The HTTP response code indicates the success or failure of an HTTP request. Below is a list

NameMeaningDescription
200OKAPI response received successfully
400Bad RequestInput validation Failed. Check the validation errors in response object.
406Not AcceptableClient's request headers unacceptable. Server can't provide desired response.
415Unsupported Media TypeUnsupported media type in request. Server cannot process the content.
429Too Many RequestsRate limiting.
500Internal Server ErrorServer Error

Rate Limits - April 2026

We have implemented two types of rate limits on our server: session-based and IP-based.

Session-based rate limit : When a client logs in, they receive a session token. This token represents one session. For example, if the client is using the personal index API, they can make 3 requests per second with this session token.

IP-based rate limit : If a client is in an organization where many clients are using the trade API, we apply an IP-based rate limit. This means that from that organization's IP address, only a limited number of requests to each API are allowed.

For example, the personal index API has a IP rate limit of 20 requests per second. If 5 employees in an organization are using the personal index API from the same IP address, each employee can make up to 4 requests per second. If any employee exceeds their limit and makes 5 requests per second, one of the requests from the other employees will fail.This means that no client can exceed their session limit, and no client from a single IP address can exceed the IP-based limit.

API NameRequests URLSessionIP
Generate Session Token/session/token5 req/sec200 req/sec
User Login (deprecated)/login5 req/sec200 req/sec
Generate OTP/otp/generateOtp1 req/sec200 req/sec
Generate Secret Key/otp/secretKeyGenerator1 req/sec200 req/sec
Generate Access Token/accessToken/token5 req/sec200 req/sec
IP Register (deprecated)/ip/ipRegistration1 req/sec200 req/sec
IP Update (deprecated)/ip/ipUpdate1 req/sec200 req/sec
Login Code/webSecretCode5 req/sec200 req/sec
Personal Index/indexData3 req/sec20 req/sec
Market Depth/marketDepth3 req/sec20 req/sec
Contract Analyser/contractsAnalyser1 req/sec5 req/sec
Add GTT/gttoco/addGtt3 req/sec20 req/sec
Modify GTT/gttoco/modifyGtt3 req/sec20 req/sec
Delete GTT/gttoco/deleteGtt3 req/sec20 req/sec
Add OCO/gttoco/addOco3 req/sec20 req/sec
Modify OCO/gttoco/modifyOco3 req/sec20 req/sec
Delete OCO/gttoco/deleteOco3 req/sec20 req/sec
List GTT OCO/gttoco/listGttOco3 req/sec20 req/sec
Span Margin/spanMargin3 req/sec20 req/sec
Get Quote/quote/getQuote10 req/sec500 req/sec
Index Quote/quote/indexQuote10 req/sec500 req/sec
Multi Quote/quote/multiQuote10 req/sec500 req/sec
Search Equity & Derivative/eqDervSearch/search5 req/sec500 req/sec
Option Chain/option/optionChain1 req/sec20 req/sec
Future Chain/future/futureChain1 req/sec20 req/sec
User Limits/limit/getLimits2 req/sec200 req/sec
Place Order/order/placeOrder10 req/sec200 req/sec
Place BO Order/order/placeOrderBO10 req/sec200 req/sec
Place CO Order/order/placeOrderCO10 req/sec200 req/sec
Bulk Orderorder/bulkOrder10 req/sec200 req/sec
Get Order Status/order/getOrderStatus100 req/sec200 req/sec
Order Book/order/orderBook100 req/sec200 req/sec
TriggerOrders/order/getTriggerOrders20 req/sec200 req/sec
Modify Order/order/modifyOrder10 req/sec200 req/sec
Cancel BO Order/order/exitBO10 req/sec200 req/sec
Cancel CO Order/order/exitCO10 req/sec200 req/sec
Cancel Order/order/cancelOrder10 req/sec200 req/sec
Trade Book/trade/tradeBook5 req/sec20 req/sec
User Positions/position/getPositions5 req/sec200 req/sec
Position Conversion/position/convertPosition5 req/sec200 req/sec
Position Square Off/position/squareOff20 req/sec200 req/sec
User Holdings/holding/getHoldings2 req/sec200 req/sec
Intraday candle data/intraday/candleData5 req/sec20 req/sec
Index IntraDay candle data/intraday/indexCandleData5 req/sec20 req/sec
Historical candle data/history/candleData5 req/sec20 req/sec
Index Historical CandleData/history/indexCandleData5 req/sec20 req/sec
Create Basketbasket/createBasket5 req/sec20 req/sec
Modify Basketbasket/modifyBasket5 req/sec20 req/sec
Delete Basketbasket/deleteBasket5 req/sec20 req/sec
List Basketbasket/listBasket5 req/sec20 req/sec
Create Orderbasket/createOrder5 req/sec20 req/sec
List Basket Orderbasket/listBasketOrder5 req/sec20 req/sec
Delete basket Orderbasket/deleteBasketOrder5 req/sec20 req/sec
Span Calculatorbasket/spanCalculator5 req/sec20 req/sec
Execute Basket Orderbasket/executeBasketOrder5 req/sec20 req/sec
Modify basket Orderbasket/modifyBasketOrder5 req/sec20 req/sec
Rearrange Basket Orderbasket/rearrangeBasketOrder5 req/sec20 req/sec

Go to API Documentation →