Hi @Ketan ,
Thanks for looking into the issue. I did some debugging and here are my observations.
Since the placeorder was taking minutes to go through using python sdk, I tried making direct post request. I was getting TimeOut Exception, when making direct post request to https://api-hft.upstox.com/v2/order/place.
So it seems the SDK has timeout=None
Since other API endpoints were working fine. So I thought there must be some difference in the place order API.
Placeorder API uses api-hft.upstox.com while other API endpoints that were working fine were using api.upstox.com
I tried placing orders using https://api.upstox.com/v2/order/place, and it worked, without timing out.
So there is some issue with https://api-hft.upstox.com/. I even tried the v3 place order API, but it was having the same issue as it also uses https://api-hft.upstox.com/
I tried ping api-hft.upstox.com and here are the results
ping api-hft.upstox.com
PING p-udapi-order-gateway--ext-ngav2-2147028156.ap-south-1.elb.amazonaws.com (3.111.191.11): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
Request timeout for icmp_seq 10
Request timeout for icmp_seq 11
- I am not sure if this is intentional or the server is misconfigured.
Regarding your observation that the orders are going through fine, yes, it is going through fine once it reaches your system, but here the issue is the order is not being able to reach your system.
The issue is not 100 percent reproducible at my end, it occurs erratically, one out of 5 orders sometimes 2 out of 5 orders.
I can understand that the issue might not be reproducible at your end, so if you need me to debug further, please let me know.
This is an unusual behavior; this is the first time itās been reported to the community. Weāve tested it across multiple networks, but we havenāt been able to reproduce the issue. Meanwhile, other vendors and clients successfully use the same URL without any problems.
Regarding the ping timeout, it seems that ICMP (ping) traffic for the HFT URL is blocked. Could you try running a traceroute to api-hft.upstox.com and share the output?
traceroute api-hft.upstox.com
Also, could you provide the response for the following curl command:
curl -v https://api-hft.upstox.com
Additionally, could you please provide more information about your current setup? Specifically:
From which geolocation are you accessing the API?
What network are you using to reach the API? (If youāre using an office network, please mention that as well.)
We are looking forward to your response. The goal is to understand why this is only affecting you and to find a solution to resolve the issue.
This is an unusual behavior; this is the first time itās been reported to the community.
Here are similar posts, which report delay in execution, but there is no delay in execution on server side. so these delays are attributable to connectivity issue between the user and upstox, similar to mine.