Time Price Series 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/V4/timePriceSeries
Request details
Parameter | Description | Example |
---|---|---|
userId string |
Identifier for the user upon login, unique to each user in the system. | AA1999 |
exchange string |
Exchange on which the order is placed (e.g., NSE, BSE, NFO, BFO) | NSE |
token string |
Encoded trading symbol of the security | RELIANCE-EQ |
startTime string |
Start time (use 24hr Date time) dd/mm/yyyy HH:mm:ss |
17/02/2023 15:29:00 |
endTime string |
End Time (use 24hr Date time) dd/mm/yyyy HH:mm:ss |
20/02/2023 09:20:00 |
jKey string |
Authentication token obtained from the login API | d4180da989ea70885ab0 |
interval string |
Time interval | DAY |
Libraries and SDKs
from thefirstock import thefirstock
timePriceSeries = thefirstock.firstock_TimePriceSeries(
userId="{{userId}}",
exchange="NSE",
tradingSymbol="Nifty 50",
startTime="13/02/2023 09:45:45",
endTime="13/12/2023 13:56:34",
interval="DAY"
)
curl --location --request POST 'https://connect.thefirstock.com/api/V4/timePriceSeries' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": "{{userID}}",
"exchange": "NSE",
"tradingSymbol": "Nifty 50",
"startTime": "13/02/2023 09:45:45",
"endTime": "13/12/2023 13:56:34",
"interval": "DAY",
"jKey": "{{jKey}}"
}'
const Firstock = require("thefirstock");
const firstock = new Firstock();
firstock.timePriceSeries(
{
userId: {{userId}},
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(
userId: {{userId}},
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 | Example | |
---|---|---|---|
Status String |
TP Data success indication | ok | |
data.time String |
Date and time | 25-08-2022 10:58:00 | |
data.ssboe String |
Seconds since epoch | 1661405340 | |
data.into String |
Interval open | 2298.05 | |
data.inth String |
Interval high | 2299.20 | |
data.intl String |
Interval low | 2298.00 | |
data.intc String |
Interval close | 2299.20 | |
data.intvwrap String |
Interval vwap | 2299.02 | |
data.intv String |
Interval volume | 478 | |
data.v String |
Total volume | 92262 | |
data.intoi String |
Interval open interest change | 0 | |
data.oi String |
Open Interest | 0 |
Parameter | Description | Example |
---|---|---|
status String |
Indicates the result status of the API operation | failed |
code String |
HTTP status code associated with the error |
401 |
name String |
Specifies the type or category of the error encountered |
INVALID_USERID |
error.field String |
Field in the request that triggered the error |
userid |
error.message String |
Detailed message describing the error | userid parameter is invalid |
{
"status": "failed",
"code": "401",
"name": "INVALID_USERID",
"error": {
"field": "userid",
"message": "userid parameter is invalid"
}
}