Has api_ltp repsonse format changed?

Hi Team,

my get_ltp function was working right till yesterday.
today when it tried to get ltp using symbol HCLTECH24MAY1320PE and token NSE_FO|95506 api gave me different response than usual were option name is now split with spaces

{‘data’: {‘NSE_FO:HCLTECH 1320 PE 30 MAY 24’: {‘instrument_token’: ‘NSE_FO|95506’, ‘last_price’: 10.1}},‘status’: ‘success’}

def get_ltp(symbol,inst_token):
    api_ltp_instance = upstox_client.MarketQuoteApi(upstox_client.ApiClient(configuration))
    try:
        api_ltp_response = api_ltp_instance.ltp(inst_token, api_version)
        print(symbol,inst_token,api_ltp_response)
        return api_ltp_response.to_dict()['data']['NSE_FO:'+symbol]['last_price']
    except ApiException as e:
        print("Exception when calling MarketQuoteApi->ltp: %s\n" % e)

Can you please share if there were any permanent changes so that i can change code at my side ?

Thank you, @deeeepak, for reaching out. I’m verifying this with the concerned team and will update you shortly.

1 Like

Hi @deeeepak, The issue has been resolved and the symbol format has been reverted to its original state.
you will get below response for instrumentKey = NSE_FO|95506

{
  "status": "success",
  "data": {
    "NSE_FO:HCLTECH24MAY1320PE": {
      "last_price": 11.5,
      "instrument_token": "NSE_FO|95506"
    }
  }
}

Thanks for your patience.

1 Like

Thanks @Pradeep_Jaiswar @Anand_Sajankar for quick fix. I highly appreciate your help. You are best !!!

Hi upstox Team.
Today i saw my sentry and its filled with full of exception it came from Quote because of the responce payload change,. this Quote is primary basic thing in algo, upstox production server is not your local machine if you want to deploy your toy code lot of place is there, production server at market open time is not a proper place and after deployment Qa has to do atleast proper basic sanity this is feel like testing is not done or you guys not capable to do, Today market has one of good opportunity to earn but you guys simply changed the responce data then until some user come and comment the issue you guys dont event know issue is there after deployment post monitoring also not done, if you guys dont know anything please dont touch production server go to office play cards and go home

its feel like you guys are not serious, please tell us know openly if you guys are not serious about this am glad to move to any other platform but this is not acceptable you guys solving issue after market closes its too big disappointment, getting this from big company like upstox

Hi @santhosh_kumar

Don’t feel bad that you missed opportunity, there is always another day to trade.

Upstox api team is really working hard. They are really fixing issues which are reported.
They reply to each post professional and periodically update if they have information.
They are not even charging you brokerage when you trade via api.
Upstox api has more features than any other api in Indian market

My experience - other broker api team will take ages to reply and understand the problem.

Please support them. Building a good quality product takes time.

PS. I am retail trader, just like everyone else.

We know that this type of errors may occurred. But what about losses caused because of their mistakes? Because of their issues many of the traders have ended up in big losses. If you are justifying by saying that they are not charging 47 RS brokerage hence we need to understand them. Why don’t you see you have closed that trade on loss of 50000? Even if it is loss of 1 Rupee but loss is made by someone other than you, This is not justifiable.