Session Login
Users are required to provide their API keys during the login process. Upon successful authentication, a JSON Web Token (JWT) is issued, granting access to the API for a period of 24 hours. This JWT token serves as a secure and temporary authentication credential that users must include in the headers of their subsequent API requests. It ensures that each request is valid and authorized, offering both convenience and robust security measures to protect sensitive financial data. This seamless integration of authentication and token-based authorization enhances the overall user experience and safeguards the integrity of the financial data being accessed.
Method: POST
{{SERVER_URL}}/api/V2/accounts/login/
Request Body: URL Encoded
Param | Value |
---|---|
appKey | The app key generated for trading API |
secretKey | The secret key generating for trading API |
accessToken | Required in case of client. It is generated after TOTP validation step. |
source | Required in case of dealer. Possible values: WebAPI |
Response: 200
{
"code": 200,
"description": "Valid User. ",
"result": {
"clientCodes": [
"PRO",
"OABE29",
"SUPNEET1",
"T201",
"CS02",
"TEST1"
],
"enums": {
"OrderSource": [
"WebAPI"
],
"dayOrNet": [
"DAY",
"NET"
],
"exchangeSegment": [
"BSECM",
"NSECM",
"NSEFO"
],
"instrumentType": [
"Futures",
"Options",
"Equity"
],
"orderSide": [
"BUY",
"SELL"
],
"positionSquareOffMode": [
"DayWise",
"NetWise"
]
},
"exchangeSegmentArray": [
{
"key": "BSECM",
"value": "BSECM"
},
{
"key": "NSECM",
"value": "NSECM"
},
{
"key": "NSEFO",
"value": "NSEFO"
}
],
"isInvestorClient": false,
"isOneTouchUser": false,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IkRFQUxFUjEiLCJleHBpcnkiOjE3MTUxNTc2NTQsInJvbGUiOjIsImlwX2FkZHJlc3MiOiIxMC4wLjAuMiIsImlzX21hcmtldF9kYXRhIjpmYWxzZSwic2Vzc2lvbktleSI6InVzTXVibWtxbUh1Y3A2bTNHV01CIiwidG9rZW5UeXBlIjowfQ.y1YuFEKwAhCZRVVpXQ3NqWYZUNPIcyXW06DyRbQ4wFM",
"userID": "DEALER1"
},
"type": "success"
}