Skip to main content
GET 

/market/status/:exchange

Exchange Status

API to retrieve the market status for a particular exchange.

Path Parameters

NameRequiredTypeDescription
exchangeRequiredstringThe unique identifier for an exchange for which market status data is being queried. For the regex pattern applicable to this field, see the Field Pattern Appendix.

Request

curl --location 'https://api.upstox.com/v2/market/status/NSE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'

For additional samples in various languages, please refer to the Sample code section on this page.

Responses

Response Body

{
"status": "success",
"data": {
"exchange": "NSE",
"status": "NORMAL_OPEN",
"last_updated": 1705549500000,
"cas_eligible_status": {
"status": "CTS_CLOSE",
"last_updated": 1705570500000
}
}
}
NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobjectData object holding market status information for an exchange.
data.exchangestringExchange to which the market status is associated. Valid exchanges can be found in the Exchange Appendix
data.statusstringCurrent exchange status. Valid market statuses can be found in the Market Status Appendix
data.last_updatednumberThe timestamp at which the market status was last updated.
data.cas_eligible_statusobject(Optional.) Closing Auction Session (CAS) status for the segment. Present only for CAS-eligible segments (for example, NSE_EQ); absent where CAS does not exist.
data.cas_eligible_status.statusstringCurrent CAS status for eligible securities. Valid values can be found in the CAS statuses section of the Market Status Appendix.
data.cas_eligible_status.last_updatednumberThe timestamp at which the CAS status was last updated.

The cas_eligible_status object appears only for CAS-eligible segments such as NSE_EQ. For segments where the Closing Auction Session does not exist (for example, NSE_FO), the field is omitted from the response. See the CAS statuses reference for the full list of values.


Sample Code

Get market status for a particular exchange

import requests

url = 'https://api.upstox.com/v2/market/status/NSE'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {your_access_token}'
}

response = requests.get(url, headers=headers)

print(response.json())