Intraday candle data
GET /intraday/candleData
Gets the Intraday candle data such as Open, high, low, close and volume within specific time period per min for a specific symbol.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
exchange | String | False | Name of the exchange. Valid exchange values (BSE/ NSE/ NFO/ MCX/ CDS). If the user does not provide an exchange name, by default considered as NSE. For trading with BSE, NFO, CDS and MCX, exchange is mandatory. |
symbolName | String | True | Symbol name of the scrip. |
fromDate | String | True | From date in yyyy-MM-dd hh:mm:ss. |
toDate | String | False | To date in yyyy-MM-dd hh:mm:ss. |
interval | String | False | Interval of data. By default, interval is considered as 1 min. |
Sample Code
bash
curl -X GET 'https://tradeapi.samco.in/intraday/candleData?symbolName=INFY&fromDate=2019-11-11%2010%3A00%3A00' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-session-token: <SESSION_TOKEN>'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 {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://tradeapi.samco.in/intraday/candleData?symbolName=INFY&fromDate=2019-11-11%2010%3A00%3A00"))
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-session-token", "<SESSION_TOKEN>")
.GET()
.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 response = await fetch('https://tradeapi.samco.in/intraday/candleData?symbolName=INFY&fromDate=2019-11-11%2010%3A00%3A00', {
method: 'GET',
headers,
});
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>',
}
r = requests.get('https://tradeapi.samco.in/intraday/candleData?symbolName=INFY&fromDate=2019-11-11%2010%3A00%3A00',
headers=headers)
print(r.json())Sample Response
json
{
"serverTime": "12/12/19 16:20:11",
"msgId": "786cdd94-2fc9-4c38-8f14-672ec64dd032",
"status": "Success",
"statusMessage": "Request successful",
"intradayCandleData": [
{
"dateTime": "2019-11-11 10:01:00",
"open": "689.9",
"high": "694.0",
"low": "682.75",
"close": "688.0",
"volume": "600344"
}
]
}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 | Response status. Can be Success or Failure |
statusMessage | String | Status message |
intradayCandleData | Array | Get list of Intraday Candle Data. |
dateTime | String | Date for which Candle Data is shown |
open | String | Opening price of a market snapshot |
high | String | High value of market snapshot |
low | String | Low value of market snapshot |
close | String | Close value of market snapshot |
volume | String | Limit amount of a security traded on the specific day |