Intraday Chart Data
Intraday Chart Data APIs
method | path | description |
---|---|---|
GET | https://api.mstock.trade/openapi/typea/instruments/intraday/{exchange}/{scriptName}/{interval} | View intraday Chart Data |
The Intraday Chart data API provides the current data chart data for instruments across various exchange segment based on interval frame.
Intraday Chart Data Limit
Only current date data will be show for that script and exchange based on interval frame
Request Headers -
-
X-Mirae-Version: Specifies the version of the API being used. In this case, it is set to 1.
-
Authorization: A token-based authentication header. The format is token api_key:access_token.
-
Content-Type : Indicated the media type of the resource. For this request, it is set to application/x-www-form-urlencoded, which is used for submiting form data.
curl --location 'https://api.mstock.trade/openapi/typea/instruments/intraday/1/AUBANK/minute' \
--header 'X-Mirae-Version: 1' \
--header 'Authorization: token api_key:access_token'
import axios from 'axios';
const response = await axios.get('https://api.mstock.trade/openapi/typea/instruments/intraday/1/AUBANK/minute', {
params: {
'from': '2024-08-02 09:15:00',
'to': '2024-08-04 09:20:00'
},
headers: {
'X-Mirae-Version': '1',
'Authorization': 'token api_key:access_token'
}
});
import http.client
conn = http.client.HTTPSConnection('api.mstock.trade')
headers = {
'X-Mirae-Version': '1',
'Authorization': 'token api_key:access_token',
}
conn.request(
'GET',
'/openapi/typea/instruments/intraday/1/AUBANK/minute',
headers=headers
)
response = conn.getresponse()
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newBuilder()
.followRedirects(HttpClient.Redirect.NORMAL)
.build();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.mstock.trade/openapi/typea/instruments/intraday/1/AUBANK/minute"))
.GET()
.setHeader("X-Mirae-Version", "1")
.setHeader("Authorization", "token api_key:access_token")
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
Query Parameter -
Field | Type | Description |
---|---|---|
Exchange | string | Exchange segment (1-NSE, 2-NFO, 3-CDS, 4-BSE, 5-BFO) |
scriptName | string | Script Name based on Exchange Security file |
interval | string | Interval frame (minute, 3minute, 5minute, 10minute, 15minute, 30minute, 60minute, day) |
Request Body - This endpoint does not require a request body or additional parameters in the query string for the retrieval of orders.
Request Response -
The response of the request will be based on authentication outcome.
- Success (HTTP Status 200): On successful order update, the server returns a JSON object containing the order ID and status.
{
"status": "success",
"data": {
"candles": [
[
"2025-03-13T12:03:00+05",
502.95,
502.95,
502.6,
502.65,
4634
],
[
"2025-03-13T12:02:00+05",
502.8,
502.95,
502.7,
502.7,
4069
],
[
"2025-03-13T12:01:00+05",
502.85,
503.1,
502.75,
502.75,
5504
],
[
"2025-03-13T12:00:00+05",
502.95,
502.95,
502.65,
502.65,
9583
]
]
}
}
- Failure (HTTP Status 401): If the order fails due to invalid parameters, authentication issues, or other errors, the server will return an error message with below json format.
{
"status": "error",
"message": "Invalid request. Please try again.",
"error_type": "TokenException",
"data": null
}
- Failure (HTTP Status 400): If the API Key is Invalid or expired.
{
"status": "error",
"message": "API is suspended/expired for use. Please check your API subscription and try again.",
"error_type": "APIKeyException",
"data": null
}