Skip to main content
GET 

/user/kill-switch

Kill Switch Status

API to fetch the current Kill Switch status and segment status for all trading segments associated with the user's account. The segment status represents the account-level state of the segment and is independent of the Kill Switch. While toggling the Kill Switch restricts trading activity as a risk management feature to help traders avoid impulsive decisions, it does not change the segment's underlying ACTIVE or INACTIVE designation.

Request

curl --location 'https://api.upstox.com/v2/user/kill-switch' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'

Additional samples in various languages are available in the Sample Code section on this page.

Responses

Response Body

{
"status": "success",
"data": [
{
"segment": "MCX_FO",
"segment_status": "INACTIVE",
"kill_switch_enabled": false
},
{
"segment": "NCD_FO",
"segment_status": "ACTIVE",
"kill_switch_enabled": false
},
{
"segment": "NSE_EQ",
"segment_status": "ACTIVE",
"kill_switch_enabled": true
},
{
"segment": "BCD_FO",
"segment_status": "ACTIVE",
"kill_switch_enabled": false
},
{
"segment": "BSE_FO",
"segment_status": "ACTIVE",
"kill_switch_enabled": false
},
{
"segment": "NSE_FO",
"segment_status": "ACTIVE",
"kill_switch_enabled": true
},
{
"segment": "BSE_EQ",
"segment_status": "ACTIVE",
"kill_switch_enabled": true
},
{
"segment": "NSE_COM",
"segment_status": "INACTIVE",
"kill_switch_enabled": false
}
]
}
NameTypeDescription
statusstringOutcome of the request. Possible values: success, error
dataarrayList of kill switch status entries for each trading segment
data[].segmentstringExchange segment identifier (e.g. NSE_EQ, BSE_FO, MCX_FO)
data[].segment_statusstringWhether the segment is currently enabled for the user. Possible values: ACTIVE, INACTIVE
data[].kill_switch_enabledbooleantrue if the kill switch is currently engaged for this segment, halting trading activity

Sample Code

Get kill switch status for all trading segments

import requests

url = 'https://api.upstox.com/v2/user/kill-switch'
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {your_access_token}'
}
response = requests.get(url, headers=headers)

print(response.status_code)
print(response.json())