File ~/Desktop/kite/kite-venv-v1/lib/python3.9/site-packages/dateutil/parser/_parser.py:1235, in parser._build_naive(self, res, default) 1233 repl['day'] = monthrange(cyear, cmonth)[1] -> 1235 naive = default.replace(**repl) 1237 if res.weekday is not None and not res.day:
ValueError: year 0 is out of range
The above exception was the direct cause of the following exception:
KiteConnect latest version failing in order_trades(). kiteconnect version: kiteconnect-5.2.0 kite.order_trades(order_id=) raises: dateutil.parser.ParserError: year 0 is out of range: 0000-01-01 09:15:25 Checked on latest kiteconnect. The API response appears to contain an invalid zero-year timestamp which the SDK attempts to parse in _format_response before returning. kite.orders() works for the same order_id.
Still not working. I am getting 200 and legit response from the API, kite.order_trades python SDK is failing coz order_timestamp ("order_timestamp":"0000-01-01 09:15:25") is malformed. This was working perfectly till yesterday. PLS check python SDK on kiteconnect 5.2.0 (latest), response itself is working (curl might be too). ------ import kiteconnect print(kiteconnect.__version__.__version__) # > 5.2.0
Till Thursday 02-07-2026 the kite.order response had order_timestamp following this format: 2026-06-25T09:15:13; and kite.order_trades following this format: 09:15:13.
On 03-07-2026 the kite.order remained consistent and working but kite.order_trades received order_timestamp in this format: 0000-01-01 09:15:25. The Python SDK using python's dateparser failed - not a SDK issue; the response had bad timestamp. Though, the failure is happening with kiteconnect python package - API/SDK contract issue.
PS: I am surprised with the slow response time here. On a active market day if the order trades function is failing this impacts algo trading/automated systems, why is the dev team not quick to respond/ fix the issue - any faster way to escalate for quicker response time (in future). IDK what the scale of this issue is but it surely happened with >20 orders for me. Are these bad timestamps only received for specific order id/ user id sets?
No way for me to know if this is fixed or not till tomorrow. I hope this issue is resolved.
We've already reported this to the team, and they're checking this and will provide you with an update asap. Until then, we request you to please use the raw HTTP API to fetch the trade details. We're sorry for the inconvenience caused.
kiteconnect version: kiteconnect-5.2.0
kite.order_trades(order_id=) raises: dateutil.parser.ParserError: year 0 is out of range: 0000-01-01 09:15:25
Checked on latest kiteconnect. The API response appears to contain an invalid zero-year timestamp which the SDK attempts to parse in _format_response before returning.
kite.orders() works for the same order_id.
----------------------- Output:
200
{'status': 'success',
'data': [
{
'average_price': 190.13,
'quantity': 5,
'trade_id': '60*******',
'product': 'MIS',
'order_timestamp': '0000-01-01 09:15:25',
'fill_timestamp': '2026-07-03 09:15:25',
'exchange_timestamp': '2026-07-03 09:15:25',
'exchange_order_id': '130****3',
'order_id': '260******',
'transaction_type': 'BUY',
'tradingsymbol': 'TATASTEEL',
'exchange': 'NSE',
'instrument_token': 895745
}
]
}
------
import kiteconnect
print(kiteconnect.__version__.__version__) # > 5.2.0
On 03-07-2026 the kite.order remained consistent and working but kite.order_trades received order_timestamp in this format: 0000-01-01 09:15:25. The Python SDK using python's dateparser failed - not a SDK issue; the response had bad timestamp. Though, the failure is happening with kiteconnect python package - API/SDK contract issue.
PS: I am surprised with the slow response time here. On a active market day if the order trades function is failing this impacts algo trading/automated systems, why is the dev team not quick to respond/ fix the issue - any faster way to escalate for quicker response time (in future). IDK what the scale of this issue is but it surely happened with >20 orders for me. Are these bad timestamps only received for specific order id/ user id sets?
No way for me to know if this is fixed or not till tomorrow. I hope this issue is resolved.