Hi Upstox team,
I am getting below response
<404> Not Found: The specified resource could not be found
while trying to fetch the order details.
I am using below API:-
‘https://api.upstox.com/v2/order/history’
After placing the order, my system is waiting for 2 seconds (Because above URL is not providing order updates in real time) and after that it is trying to fetch the order details using above API
But even after the order got completed and system waited of 2 seconds still the API sent 404 response.
Please find the below code as well as system generated logs for more details.
buyJSON = placeOrder_POST(quantity=lotsToTrade, validity="IOC", order_type="LIMIT", side="BUY", price=bestSeller,
instrument_token=instrumentKey)
print(bestSeller)
buyOrderID = buyJSON['data']['order_id']
print(buyOrderID)
# Sleeping because getOrderDetails_GET() do not work in real time
await asyncio.sleep(2)
print(datetime.now())
responseEntry = getOrderDetails_GET(buyOrderID)
print(responseEntry)
Log:-
2598.3
231228000029628
2023-12-28 09:16:52.384823
<404> Not Found: The specified resource could not be found (*Being printed from getOrderDetails_GET() function)
None
please find the SS for the trade executed:-
I faced similar issue on 12-Dec-2023 also. and after that this is the 2nd time facing this issue.
please let me know why this is happening, and what is the required fix.
Thanks