I was busy for past couple of weeks and now when I try to run the Strategy 1 which is Nifty breakout strategy I am getting error from Upstox api in test mode.
upstox_client.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({‘Date’: ‘Mon, 21 Jul 2025 16:42:00 GMT’, ‘Content-Type’: ‘application/json’, ‘Transfer-Encoding’: ‘chunked’, ‘Connection’: ‘keep-alive’, ‘vary’: ‘Origin, Access-Control-Request-Method, Access-Control-Request-Headers’, ‘message’: ‘request failed’, ‘requestid’: ‘8daf5d18-36b7-4c6a-9e35-d1042e4cd66a’, ‘x-content-type-options’: ‘nosniff’, ‘x-xss-protection’: ‘1; mode=block’, ‘Cache-Control’: ‘no-cache, no-store, max-age=0, must-revalidate’, ‘pragma’: ‘no-cache’, ‘expires’: ‘0’, ‘strict-transport-security’: ‘max-age=0; includeSubDomains’, ‘x-frame-options’: ‘DENY’, ‘CF-Cache-Status’: ‘MISS’, ‘Set-Cookie’: ‘__cf_bm=UfREsPwMwKoDC1Hkwv4xKao9HDrQmUl80okB9UjhXnQ-1753116120-1.0.1.1-joZfGNb0Psl8C13dhsk7AERqPwwZnQGb7TQsGnvwnQsdcIv6lqoEQGdYpvQWIrCh; path=/; expires=Mon, 21-Jul-25 17:12:00 GMT; domain=.upstox.com; HttpOnly; Secure; SameSite=None, _cfuvid=fPJcDaed92P8yYMYzGm2pTO2FWEkFBMpdNpMlo5ihzE-1753116120582-0.0.1.1-604800000; path=/; domain=.upstox.com; HttpOnly; Secure; SameSite=None’, ‘Server’: ‘cloudflare’, ‘CF-RAY’: ‘962c26297df13b5b-BOM’, ‘alt-svc’: ‘h3=“:443”; ma=86400’})
HTTP response body: b’{“status”:“error”,“errors”:[{“errorCode”:“UDAPI100500”,“message”:“From and to difference too high for interval”,“propertyPath”:null,“invalidValue”:null,“error_code”:“UDAPI100500”,“property_path”:null,“invalid_value”:null}]}’
This used to work before and I checked documentation seems like api version 2 is getting deprecated. I tried to change to api v3 but still got some more errors. Can someone help in fixing this issue.