HistoryApi issue for some script

Getting issue with few script , NSE_FO|50406, NSE_FO|50405

Reason: Bad Request

HTTP response headers: HTTPHeaderDict({‘Date’: ‘Tue, 19 Nov 2024 05:15:09 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’: ‘f16fc3c1-24ee-49e9-9fda-2eea74ee77c8’, ‘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=GIskwoN27jJuvOUSteudE6xZWbuL._q2YLXWiu4tbt4-1731993309-1.0.1.1-iVyz7Og9tkY.laugAMH7R35LDiKA9y4wdqpb5u65UFSZ7_EnyEyLUMSsFynfFh7X; path=/; expires=Tue, 19-Nov-24 05:45:09 GMT; domain=.upstox.com; HttpOnly; Secure; SameSite=None, _cfuvid=TAaPu.e9L68Let46VKq0tMktz0Hv1EVaavDsi3Yn9yQ-1731993309497-0.0.1.1-604800000; path=/; domain=.upstox.com; HttpOnly; Secure; SameSite=None’, ‘Server’: ‘cloudflare’, ‘CF-RAY’: ‘8e4db8883a3e2e29-BOM’, ‘alt-svc’: ‘h3=“:443”; ma=86400’})

HTTP response body: b’{“status”:“error”,“errors”:[{“errorCode”:“UDAPI100011”,“message”:“Invalid Instrument key”,“propertyPath”:null,“invalidValue”:null,“error_code”:“UDAPI100011”,“property_path”:null,“invalid_value”:null}]}’

It seems you are using an invalid instrument key. Kindly refer to the instrument JSON files for the correct and updated instrument keys.

Can you share which instrument token you are trying to place order?

Thank you.

https://assets.upstox.com/market-quote/instruments/exchange/compete.csv.gz