GET /order/trades/get-trades-for-day is returning wrong exchange-timesamp

Here is the API response.
{
“data”:
[
{
“average_price”: 95.1,
“exchange”: “NFO”,
“exchange_order_id”: “1800000098778680”,
“exchange_timestamp”: “2024-11-08 17:18:59”,
“instrument_token”: “NSE_FO|47427”,
“order_id”: “241108025414192”,
“order_ref_id”: “100089333295277”,
“order_timestamp”: “2024-11-08 11:48:59”,
“order_type”: “MARKET”,
“product”: “I”,
“quantity”: 15,
“trade_id”: “628360413”,
“trading_symbol”: “BANKNIFTY24N1350800PE”,
“tradingsymbol”: “BANKNIFTY24N1350800PE”,
“transaction_type”: “SELL”
},
{
“average_price”: 95.1,
“exchange”: “NFO”,
“exchange_order_id”: “1800000098778680”,
“exchange_timestamp”: “2024-11-08 17:18:59”,
“instrument_token”: “NSE_FO|47427”,
“order_id”: “241108025414192”,
“order_ref_id”: “100089333295277”,
“order_timestamp”: “2024-11-08 11:48:59”,
“order_type”: “MARKET”,
“product”: “I”,
“quantity”: 15,
“trade_id”: “628360412”,
“trading_symbol”: “BANKNIFTY24N1350800PE”,
“tradingsymbol”: “BANKNIFTY24N1350800PE”,
“transaction_type”: “SELL”
},
{
“average_price”: 94.1,
“exchange”: “NFO”,
“exchange_order_id”: “1800000094660674”,
“exchange_timestamp”: “2024-11-08 17:06:24”,
“instrument_token”: “NSE_FO|47427”,
“order_id”: “241108025399071”,
“order_ref_id”: “99323383909107”,
“order_timestamp”: “2024-11-08 11:36:24”,
“order_type”: “MARKET”,
“product”: “I”,
“quantity”: 15,
“trade_id”: “628290851”,
“trading_symbol”: “BANKNIFTY24N1350800PE”,
“tradingsymbol”: “BANKNIFTY24N1350800PE”,
“transaction_type”: “BUY”
},
{
“average_price”: 94.0,
“exchange”: “NFO”,
“exchange_order_id”: “1800000094660674”,
“exchange_timestamp”: “2024-11-08 17:06:24”,
“instrument_token”: “NSE_FO|47427”,
“order_id”: “241108025399071”,
“order_ref_id”: “99323383909107”,
“order_timestamp”: “2024-11-08 11:36:24”,
“order_type”: “MARKET”,
“product”: “I”,
“quantity”: 15,
“trade_id”: “628290850”,
“trading_symbol”: “BANKNIFTY24N1350800PE”,
“tradingsymbol”: “BANKNIFTY24N1350800PE”,
“transaction_type”: “BUY”
}
],
“status”: “success”
}

It seems it is adding +5:30 hours to exchange timestamp. Like I suggested earlier here

such bugs will happen if api serves human readable timestamp. It is better to server unix timestamp.

Related thread

Hi @Pradeep_Jaiswar,

That thread was created by me only and I have already referenced it in this post.

I have created this new post as the API returning erroneous timestamp.

“exchange_timestamp”: “2024-11-08 17:18:59”,

Which can’t be possible as NSE is closed at that time.

@Pradeep_Jaiswar Did you get a chance to reproduce this bug?

The timestamp will continue to be provided in GMT +5:30 as of now.

@Pradeep_Jaiswar

There is some misunderstanding. This thread is not about unix timestamp vs human readable timestamp. This thread is about bug in API response by /order/get-trades-for-day endpoint.

Below is snippet from API response.

{
“average_price”: 95.1,
“exchange”: “NFO”,
“exchange_order_id”: “1800000098778680”,
“exchange_timestamp”: “2024-11-08 17:18:59”,
“instrument_token”: “NSE_FO|47427”,
“order_id”: “241108025414192”,
“order_ref_id”: “100089333295277”,
“order_timestamp”: “2024-11-08 11:48:59”,
“order_type”: “MARKET”,
“product”: “I”,
“quantity”: 15,
“trade_id”: “628360413”,
“trading_symbol”: “BANKNIFTY24N1350800PE”,
“tradingsymbol”: “BANKNIFTY24N1350800PE”,
“transaction_type”: “SELL”
},

The order_timestamp correctly has value of 2024-11-08 11:48:59

But the exchange_timestamp has incorrect value of 2024-11-08 17:18:59. The exchange timestamp is erroneously offset by +5:30 hours. The exchange time stamp should also read “2024-11-08 11:48:59”.

I hope I have made my point clear.

Thank you for the clarification. You are correct; the timestamps align with a 5:30-hour offset. You may refer to and use the order_timestamp

The values are delivered as received from the exchange. We have noted this and forwarded it to the relevant team for further review.

@Pradeep_Jaiswar Thank you for forwarding it to the team to fix it.

Although in this example the exchange_timestamp and order_timestamp should be same, but for limit order trades, they might differ, so order_timestamp is not a direct substitute for exchange_timestamp.

@Pradeep_Jaiswar Do we have an update?

This has not yet been addressed due to other items already in the pipeline. It will be prioritized and included in a future release as soon as possible, though we currently do not have a fixed ETA.