Do "Upstox Generated SDK's" perform faster than "python / requests"

Hi Upstox team,

Currently I am using request module to query the API URLs inorder to retreive the JSON responses.

Ex:-

def getFullMarket_GET(symbolList):
    url = 'https://api.upstox.com/v2/market-quote/quotes'
    headers = \
        {
            'accept': 'application/json',
            'Authorization': f'Bearer {accessToken}'
        }
    params = \
        {
            'symbol': symbolList
        }

    try:
        response = requests.get(url=url, headers=headers, params=params)
    except requests.exceptions.RequestException as e:
        print(f'An error occurred: {e}')
        return None

    return response.json()

But while fetching the Market data using above code, it takes on an average of almost 1 second for single symbol.

I am trying to fetch market depth from above API, and using the same to place IOC LIMIT orders in realtime.

For trading in options 1 second of delay is too much, half of my IOC orders are getting cancelled due to this.

I was wondering if ā€œUpstox Generated SDKā€™sā€ will work faster than the above code.

Please suggest a better way of handling this.

Thanks

@CE5464

The response time youā€™re experiencing is unusually high; typically, our APIs respond in less than 100ms. This delay might be due to local network performance issues. Using our SDK wouldnā€™t significantly improve the response time compared to direct REST API calls. I recommend trying a different, low-latency network to see if that improves the response speed.

Thanks!!

1 Like