Skip to content

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

NameTypeRequiredDescription
exchangeStringFalseName 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.
symbolNameStringTrueSymbol name of the scrip.
fromDateStringTrueFrom date in yyyy-MM-dd hh:mm:ss.
toDateStringFalseTo date in yyyy-MM-dd hh:mm:ss.
intervalStringFalseInterval 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

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.
statusStringResponse status. Can be Success or Failure
statusMessageStringStatus message
intradayCandleDataArrayGet list of Intraday Candle Data.
dateTimeStringDate for which Candle Data is shown
openStringOpening price of a market snapshot
highStringHigh value of market snapshot
lowStringLow value of market snapshot
closeStringClose value of market snapshot
volumeStringLimit amount of a security traded on the specific day