Day Interval
The Get Time Price Series APIs enable you to get chart data for analysis day wise.
Method: POST
https://connect.thefirstock.com/api/V3/timePriceSeries
Request details
Parameter | Description | Data types | Example |
---|---|---|---|
userId | Logged in User Id | String | "AA1999" |
exchange | Exchange | String | "NSE" |
token | Trading Symbol | String | "RELIANCE-EQ" |
startTime | Start time (use 24hr Date time) dd/mm/yyyy HH:mm:ss | String | "17/02/2023 15:29:00" |
endTime | End Time (use 24hr Date time) dd/mm/yyyy HH:mm:ss | String | "20/02/2023 09:20:00" |
jKey | Key Obtained on login success. | String | "d4180da989ea70885ab0d 0fb38f0f225796352b57de0 641d4442294b87f0b7310" |
interval | time interval | String | "DAY" |
- cURL
curl -X POST 'https://connect.thefirstock.com/api/V3/timePriceSeries'
-H 'Content-Type: application/json'
--data '{
"userId": "AA123",
"exchange": "NSE",
"token": "RELIANCE-EQ",
"startTime": "17/01/2023 15:29:00",
"endTime": "21/03/2023 09:20:00",
"interval": "DAY",
"jKey": "e6a211bea63adff386578988e1cf4a9521c4744e6a39ad63174c8797e2af8c38"
}'
from thefirstock import thefirstock
timePriceSeries = thefirstock.firstock_TimePriceSeries(
exchange="NSE",
token="RELIANCE-EQ",
startTime="16/08/2022 09:45:32",
endTime="15/02/2023 13:45:32",
interval="DAY"
)
const Firstock = require("thefirstock");
const firstock = new Firstock();
firstock.timePriceSeries(
{
exchange: "NSE",
token: "RELIANCE-EQ",
endTime: "22/02/2023 09:20:00",
startTime: "21/02/2023 15:29:00",
interval: "DAY",
},
(err, result) => {
console.log("Error, ", err);
console.log("Result: ", result);
}
);
using thefirstock;
class Program
{
public static void Main()
{
Firstock firstock = new Firstock();
var result = firstock.timePriceSeries(
exchange: "NSE",
token: "RELIANCE-EQ",
endTime: "02/08/2022 15:30:08",
startTime: "05/07/2022 10:30:08",
interval: "DAY"
);
}
}
Success response details
Parameter | Description | Data Type | Example |
---|---|---|---|
status | Ok or Not_Ok TP Data success indication. | String | "ok" |
data.time | DD/MM/CCYY hh:mm:ss | String | "25-08-2022 10:58:00" |
data.ssboe | second since begin of epoch | String | "1661405340" |
data.into | Interval open | String | "2298.05" |
data.inth | Interval high | String | "2299.20" |
data.intl | Interval low | String | "2298.00" |
data.intc | Interval close | String | "2299.20" |
data.intvwrap | Interval vwrap | String | "2299.02" |
data.intv | Interval volume | String | "478" |
data.v | volume | String | "92262" |
data.intoi | Interval io change | String | "0" |
data.oi | oi | String | "0" |
Failure response details
Parameter | Description | Data Type | Example |
---|---|---|---|
status | Failed | String | "Failed" |
code | HTTP Code | String | "401" |
name | Type of error | String | "INVALID_USERID" |
error.field | Error field | String | "userid" |
error.message | Error message | String | "userid parameter is invalid" |
Sample response
- Success response
- Failure response
{
"status": "Success",
"data": [
{
"stat": "Ok",
"time": "25-08-2022 10:59:00",
"ssboe": "1661405340",
"into": "2298.05",
"inth": "2299.20",
"intl": "2298.00",
"intc": "2299.20",
"intvwap": "2299.02",
"intv": "478",
"intoi": "0",
"v": "92740",
"oi": "0"
},
{
"stat": "Ok",
"time": "25-08-2022 10:58:00",
"ssboe": "1661405280",
"into": "2298.60",
"inth": "2299.00",
"intl": "2298.30",
"intc": "2298.70",
"intvwap": "2299.02",
"intv": "326",
"intoi": "0",
"v": "92262",
"oi": "0"
},
]
}
{
"status": "Failed",
"code": "401",
"name": "INVALID_USERID",
"error": {
"field": "userid",
"message": "userid parameter is invalid"
}
}