Multi Quote
POST /quote/multiQuote
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
BSE | array | false | Assign the array of BSE symbol names to the BSE key. |
NSE | array | false | Assign the array of NSE symbol names to the NSE key. |
BFO | array | false | Assign the array of trading symbols to the BFO key. |
NFO | array | false | Include the NFO trading symbol in the array and assign it to the NFO key. |
CDS | array | false | Assign the array of CDS trading symbols to the CDS key. |
MCX | array | false | Assign the array of MCX trading symbols to the MCX key. |
MFO | array | false | Assign the array of MFO trading symbols to the MFO key. |
INDEX | array | false | Assign 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
| Name | Type | Description |
|---|---|---|
serverTime | string | Time at Server. |
msgId | string | This 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. |
status | string | The status of the API response. It can be either 'Success' or 'Failure'. |
statusMessage | string | A message describing the result of the API call. |
multiQuotes | object | Get list of multiQuote. |
exchange | string | Name of the exchange. |
symbolName | string | Symbol name of the scrip. |
tradingSymbol | string | Trading Symbol of the scrip. |
optionType | string | Option Type (PE/CE). |
instrumentType | string | Instrument Name. |
companyName | string | Full name of the trading company. |
isin | string | The standard ISIN representing stocks uniquely at an international level. It is the same for every exchange. |
lotSize | string | Lot 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. |
strikePrice | string | The strike price is the predetermined price at which a put buyer can sell the underlying asset. |
expiry | string | Shows expiry date of a trading symbol. |
averagePrice | string | Average trading price of the equity or derivative. |
totalTradeVolume | string | The total amount of shares or contracts that have been traded. |
symbol | string | Actual symbol name of the scrip. |
lastTradeTime | string | Last transaction time in milliseconds. |
lastTradeQuantity | string | Quantity of last transaction. |
lastTradePrice | string | Price at which the last transaction/trade is done. |
misMultiplier | string | The MIS multiplier indicates how many times a trader can exceed their available funds when purchasing shares. |
change | string | Change value is the difference between the current value and the previous day's market close. |
changePercent | string | Percentage of change between the current value and the previous day's market close. |
open | string | Opening price of a market snapshot. |
close | string | Close value of market snapshot. |
previousClose | string | Previous close refers to the prior day's final price of security when the market officially closes for the day. |
low | string | Low value of market snapshot. |
high | string | High value of market snapshot. |
tickSize | string | The value of a single price tick. Default value is 0.05. |
bidSize | string | The number of shares investors are trying to buy at a given price. |
bidPrice | string | The price at which investors are seeking to purchase shares. |
totalTradedValue | string | The total monetary value of all trades executed for the scrip. |
askSize | string | The number of shares investors are willing to sell at a given price. |
askPrice | string | The price at which sellers are willing to sell the scrip. |
iv | string | Implied Volatility. |