Skip to content

Multi Quote

POST /quote/multiQuote

Parameters

NameTypeRequiredDescription
BSEarrayfalseAssign the array of BSE symbol names to the BSE key.
NSEarrayfalseAssign the array of NSE symbol names to the NSE key.
BFOarrayfalseAssign the array of trading symbols to the BFO key.
NFOarrayfalseInclude the NFO trading symbol in the array and assign it to the NFO key.
CDSarrayfalseAssign the array of CDS trading symbols to the CDS key.
MCXarrayfalseAssign the array of MCX trading symbols to the MCX key.
MFOarrayfalseAssign the array of MFO trading symbols to the MFO key.
INDEXarrayfalseAssign the array of index names to the INDEX key.

Sample Request Body

json

requestBody={
  "NSE":["TCS"],
  "MFO" :["SILVER24APR76250PE"] 
}

Sample Code

bash
curl -X POST 'https://tradeapi.samco.in/quote/multiQuote' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'x-session-token: <SESSION_TOKEN>' \
  -d '{"NSE":["TCS"],"MFO":["SILVER24APR76250PE"]}'
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Sample {
  public static void main(String[] args) throws Exception {
    String requestBody = """
        {
          "NSE": [
            "TCS"
          ],
          "MFO": [
            "SILVER24APR76250PE"
          ]
        }
        """;

    HttpClient client = HttpClient.newHttpClient();

    HttpRequest request = HttpRequest.newBuilder()
        .uri(URI.create("https://tradeapi.samco.in/quote/multiQuote"))
        .header("Content-Type", "application/json")
        .header("Accept", "application/json")
        .header("x-session-token", "<SESSION_TOKEN>")
        .POST(HttpRequest.BodyPublishers.ofString(requestBody))
        .build();

    HttpResponse<String> response =
        client.send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.body());
  }
}
js
(async () => {
  const headers = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'x-session-token': '<SESSION_TOKEN>',
  };

  const requestBody = {
    NSE: [
      "TCS"
    ],
    MFO: [
      "SILVER24APR76250PE"
    ]
  };

  const response = await fetch('https://tradeapi.samco.in/quote/multiQuote', {
    method: 'POST',
    headers,
    body: JSON.stringify(requestBody),
  });

  const data = await response.json();
  console.log(data);
})();
py
import requests
import json

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'x-session-token': '<SESSION_TOKEN>',
}

requestBody = {
  "NSE": [
    "TCS"
  ],
  "MFO": [
    "SILVER24APR76250PE"
  ]
}

r = requests.post('https://tradeapi.samco.in/quote/multiQuote',
  data=json.dumps(requestBody),
  headers=headers)

print(r.json())

Sample Responses

json
{
    "serverTime": "05/04/24 10:46:55",
    "msgId": "6dd6d540-33a5-4516-9818-e223370f4846",
    "status": "Success",
    "statusMessage": "Multiquotes data retrieved successfully",
    "multiQuotes": [
        {
            "exchange": "NSE",
            "symbolName": "TCS",
            "tradingSymbol": "TCS-EQ",
            "companyName": "TATA CONSULTANCY SERV LT",
            "isin": "INE467B01029",
            "lotSize": "1",
            "averagePrice": "3840.50",
            "totalTradeVolume": "4311783",
            "symbol": "11536_NSE",
            "lastTradeTime": "28 Mar 2024, 07:11:43 PM",
            "lastTradeQuantity": "1",
            "lastTradePrice": "3876.30",
            "misMultiplier": "4.00",
            "change": "35.40",
            "changePercent": "0.92",
            "open": "3850.10",
            "close": "3876.30",
            "previousClose": "3840.90",
            "low": "3840.50",
            "high": "3915.00",
            "tickSize": "0.05",
            "bidSize": "782",
            "bidPrice": "3876.30",
            "totalTradedValue": "16732176051.06",
            "askSize": "0",
            "askPrice": "0.00",
            "iv": "0.00"
        },
        {
            "exchange": "MCX",
            "symbolName": "SILVER",
            "tradingSymbol": "SILVER24APR76250PE",
            "optionType": "PE",
            "instrumentType": "OPTCOM",
            "companyName": "SILVER",
            "lotSize": "30",
            "strikePrice": "76250.0000",
            "expiry": "24 Apr 24",
            "averagePrice": "0.00",
            "totalTradeVolume": "0",
            "symbol": "256981_MFO",
            "lastTradeTime": "01 Apr 2024, 04:34:41 PM",
            "lastTradeQuantity": "0",
            "lastTradePrice": "0.00",
            "misMultiplier": "100.00",
            "multiplier": "30",
            "openInterest": "0",
            "previousOpenInterest": "0",
            "change": "0.00",
            "changePercent": "0.00",
            "open": "0.00",
            "close": "1656.00",
            "previousClose": "0.00",
            "low": "0.00",
            "high": "0.00",
            "tickSize": "0.5",
            "bidSize": "0",
            "bidPrice": "0.00",
            "totalTradedValue": "0.00",
            "askSize": "0",
            "askPrice": "0.00",
            "delta": "0.00",
            "vega": "0.00",
            "theta": "0.00",
            "gamma": "0.0000",
            "iv": "0.00"
        }
    ]
}

Response Schema

Status Code 200

NameTypeDescription
serverTimestringTime at Server.
msgIdstringThis is a unique identifier for every request into the system. Please quote this identifier to the support team if you face issues with the API request.
statusstringThe status of the API response. It can be either 'Success' or 'Failure'.
statusMessagestringA message describing the result of the API call.
multiQuotesobjectGet list of multiQuote.
exchangestringName of the exchange.
symbolNamestringSymbol name of the scrip.
tradingSymbolstringTrading Symbol of the scrip.
optionTypestringOption Type (PE/CE).
instrumentTypestringInstrument Name.
companyNamestringFull name of the trading company.
isinstringThe standard ISIN representing stocks uniquely at an international level. It is the same for every exchange.
lotSizestringLot size of the symbol to be traded. At the time of placing an order, the quantity should be in multiples of the Broadlot Qty only.
strikePricestringThe strike price is the predetermined price at which a put buyer can sell the underlying asset.
expirystringShows expiry date of a trading symbol.
averagePricestringAverage trading price of the equity or derivative.
totalTradeVolumestringThe total amount of shares or contracts that have been traded.
symbolstringActual symbol name of the scrip.
lastTradeTimestringLast transaction time in milliseconds.
lastTradeQuantitystringQuantity of last transaction.
lastTradePricestringPrice at which the last transaction/trade is done.
misMultiplierstringThe MIS multiplier indicates how many times a trader can exceed their available funds when purchasing shares.
changestringChange value is the difference between the current value and the previous day's market close.
changePercentstringPercentage of change between the current value and the previous day's market close.
openstringOpening price of a market snapshot.
closestringClose value of market snapshot.
previousClosestringPrevious close refers to the prior day's final price of security when the market officially closes for the day.
lowstringLow value of market snapshot.
highstringHigh value of market snapshot.
tickSizestringThe value of a single price tick. Default value is 0.05.
bidSizestringThe number of shares investors are trying to buy at a given price.
bidPricestringThe price at which investors are seeking to purchase shares.
totalTradedValuestringThe total monetary value of all trades executed for the scrip.
askSizestringThe number of shares investors are willing to sell at a given price.
askPricestringThe price at which sellers are willing to sell the scrip.
ivstringImplied Volatility.