ISSUE : SDK : GetOrderDetails not working as expected?

Hi Team / @Pradeep_Jaiswar

I am using the the get_order_details method to fetch the order details for the order places however I am getting an empty response. Could you please suggest what is wrong?

Order ID : 240202025029285

Code

ipdb>         configuration = upstox_client.Configuration()

ipdb>         configuration.access_token = self.TradingAccountsList.loc[self.TradingAccountsList['ACCOUNT'] == TradeAccount,['ACCESSTOKEN']].values[0][0]

ipdb>         api_instance = upstox_client.OrderApi(upstox_client.ApiClient(configuration))

ipdb>         api_version = self.api_version # str | API Version Header

ipdb>         order_id = order_id

ipdb> order_id
'240202025029285'

ipdb> type(order_id)
<class 'str'>

ipdb>         tag = 'UPSTOX' # str | The unique tag of the order for which the order history is being requested (optional)

ipdb>             api_response =  api_instance.get_order_details(api_version, order_id=str(order_id), tag=tag)

ipdb> pprint(api_response)
{'data': [], 'status': 'success'}

ipdb> self.CurrentTime
'10:38:07'

ipdb>  self.CompareDate
'02-Feb-2024'

Order Screenshot:

@RahulMittal87

Iā€™m currently investigating this issue. Iā€™ll provide an update when I have more information.

Thanks!

1 Like

HI @shanmu , Any updates on this? I again observe the same issue today

ipdb> self.TradeBookOpenTrades.loc[rowref,"SLOrderId"]
'240209025048706'
ipdb>                         GetOrderDetailsResponse = self.Upstox_GetOrderDetails(self.TradeBookOpenTrades.loc[rowref,"SLOrderId"],self.TradeBookOpenTrades.loc[rowref,"TradeAccount"])

self.upstoxCallcounter : 12
ipdb> GetOrderDetailsResponse
{'data': [], 'status': 'success'}
ipdb>         configuration = upstox_client.Configuration()

ipdb>         configuration.access_token = self.TradingAccountsList.loc[self.TradingAccountsList['ACCOUNT'] == TradeAccount,['ACCESSTOKEN']].values[0][0]

ipdb>         api_instance = upstox_client.OrderApi(upstox_client.ApiClient(configuration))

ipdb>         api_version = self.api_version # str | API Version Header

ipdb> order_id = self.TradeBookOpenTrades.loc[rowref,"SLOrderId"]
ipdb> order_id
'240209025048706'
ipdb> type(order_id)
<class 'str'>
ipdb>         tag = 'UPSTOX' # str | The unique tag of the order for which the order history is being requested (optional)

ipdb>             api_response =  api_instance.get_order_details(api_version, order_id=int(order_id), tag=tag)

ipdb> api_response
{'data': [], 'status': 'success'}
ipdb>