Skip to main content

Get Profile

API to retrieve user profile data, which encompasses details such as supported exchanges, enabled product offerings, and permitted order types. If you're business and developing an application for multi-client API usage, you can utilize this data to display in the user's profile section.

Request

curl --location 'https://api.upstox.com/v2/user/profile' \
--header 'Content-Type: application/json' \
--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

NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobjectResponse data for user profile
data.emailstringE-mail address of the user
data.exchangesstring[]List of exchanges enabled for the user. Valid exchanges can be found in the Exchange Appendix
data.productsstring[]Lists the types of products enabled for the user.
Possible values: I, D, CO, MTF
data.brokerstringThe broker ID
data.user_idstringUniquely identifies the user (commonly referred as UCC)
data.user_namestringName of the user
data.order_typesstring[]Order types enabled for the user.
Possible values: MARKET, LIMIT, SL, SL-M
data.user_typestringIdentifies the user's registered role at the broker. This will be individual for all retail users
data.poabooleanIndicates whether the user has authorized power of attorney for transactions.
data.ddpibooleanIndicates whether the user has authorized DDPI (Demat Debit and Pledge Instruction) for transactions.
data.is_activebooleanIndicates if the account status is active.

Sample Code

Get user profile information using access token

import requests

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

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

Loading...