Empty Candles Array for MOTHERSON in Historical Candle API

I’m trying to fetch historical OHLC data for the stock MOTHERSON (NSE_EQ|INE775A08105) using the Upstox v3 Historical Candles API, but I’m getting an empty candles array despite a successful response.

:wrench: Details:

:white_check_mark: Success Case:

Other symbols (e.g., NSE_EQ|INE262H01021for PERSISTENT) return candle data correctly with the same logic and date range.

:cross_mark: Problem:

For MOTHERSON, the response status is 200 OK, but the candles array is empty:

{
  "status": "success",
  "data": {
    "candles": []
  }
}

:laptop: Sample Code Used:

import requests
from datetime import date, timedelta

# Instrument key for MOTHERSON
instrument_key = "NSE_EQ|INE775A08105"

# Date range: last 30 days (excluding today)
to_date = date.today() - timedelta(days=1)
from_date = to_date - timedelta(days=7)

# Construct URL
unit = 'days'
interval = '1'
url = f'https://api.upstox.com/v3/historical-candle/{instrument_key}/{unit}/{interval}/{to_date.strftime("%Y-%m-%d")}/{from_date.strftime("%Y-%m-%d")}'
headers = {'Accept': 'application/json'}

print(f"Fetching from URL: {url}")
response = requests.get(url, headers=headers)

print(f"Status Code: {response.status_code}")
print(f"Response: {response.json()}")

:thinking: Observations:

  • The instrument key appears correct — it matches the one returned by Upstox search instruments endpoint.

  • No error in API syntax; other stocks work fine.

  • Tried multiple date ranges (including known trading periods), still no candles.

  • Symbol wasn’t renamed recently — MOTHERSON has been active.

  • Same problem for this instrument in V2 API as well.

:red_question_mark: Questions:

  1. Is there a known issue with certain NSE symbols like MOTHERSON in the Upstox historical data feed?

  2. Should I use a different instrument key format or endpoint?

Any guidance from Upstox support or community would be greatly appreciated!

@ADITYA_1025350 The correct instrument key for MOTHERSON is NSE_EQ|INE775A01035. I tested it using the URL below, and it is working as expected.

https://api.upstox.com/v3/historical-candle/NSE_EQ%7CINE775A01035/days/1/2026-01-07/2026-01-01

NOTE: We recommend downloading and utilizing the Instrument JSON files as per API documentation.

Thanks

Thanks for your reply. There were multiple trading_symbols with “MOTHERSON”. I have implemented filtering for instrument_type == EQ to fix this.

1 Like