There are 2 questions.
- Why do I get a 15:31 candle in minute data?
- Minute candles start at 09:00 AM and not at 09:15?
- Why do minute data prices for trading view and Firstock differ?
This is the request that can be checked for both the questions
timePriceSeries = firstock_TimePriceSeries(
exchange="NSE",
token="REFEX-EQ",
startTime="07/06/2023 00:00:00",
endTime="07/06/2023 16:00:00",
interval="1"
)
timePriceSeries
{'status': 'Success', 'data': [{'stat': 'Ok', 'time': '07-06-2023 15:31:00', 'ssboe': '1686132060', 'into': '525.55', 'inth': '525.55', 'intl': '525.55', 'intc': '525.55', 'intvwap': '0.00', 'intv': '0', 'intoi': '0', 'v': '160550', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:30:18', 'ssboe': '1686132018', 'into': '522.00', 'inth': '522.00', 'intl': '522.00', 'intc': '522.00', 'intvwap': '0.00', 'intv': '0', 'intoi': '0', 'v': '160550', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:29:00', 'ssboe': '1686131940', 'into': '525.40', 'inth': '525.95', 'intl': '522.00', 'intc': '522.00', 'intvwap': '523.40', 'intv': '3457', 'intoi': '0', 'v': '160550', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:28:00', 'ssboe': '1686131880', 'into': '526.90', 'inth': '526.90', 'intl': '525.05', 'intc': '526.45', 'intvwap': '526.08', 'intv': '1091', 'intoi': '0', 'v': '157093', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:27:00', 'ssboe': '1686131820', 'into': '523.80', 'inth': '526.95', 'intl': '523.80', 'intc': '524.20', 'intvwap': '524.21', 'intv': '1002', 'intoi': '0', 'v': '156002', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:26:00', 'ssboe': '1686131760', 'into': '523.85', 'inth': '524.00', 'intl': '523.00', 'intc': '523.00', 'intvwap': '523.66', 'intv': '1810', 'intoi': '0', 'v': '155000', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:25:00', 'ssboe': '1686131700', 'into': '526.70', 'inth': '526.70', 'intl': '523.00', 'intc': '525.70', 'intvwap': '524.83', 'intv': '6944', 'intoi': '0', 'v': '153190', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:24:00', 'ssboe': '1686131640', 'into': '525.20', 'inth': '526.10', 'intl': '525.10', 'intc': '526.10', 'intvwap': '523.76', 'intv': '415', 'intoi': '0', 'v': '146246', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:23:00', 'ssboe': '1686131580', 'into': '525.10', 'inth': '526.85', 'intl': '525.10', 'intc': '525.10', 'intvwap': '527.35', 'intv': '421', 'intoi': '0', 'v': '145831', 'oi': '0'}, {'stat': 'Ok', 'time': '07-06-2023 15:22:00', 'ssboe': '1686131520', 'into': '525.50', 'inth': '526.20', 'intl': '525.00', 'intc': '525.05', 'intvwap': '524.36', 'intv': '895', 'intoi': '0', 'v': '145410', 'oi': '0'},'}]}
Cutting the request short because the website doesn’t allow me to add a complete response.
Suggestions
I believe the first 2 can be added to API docs as these are not assumed by the developers.
The docs should also have a complete request and response example like a file request.json
and response.json
to make it easy to visualize the exact response.
Docs should never have a dummy response unless the response data is sensitive.