Login
To successfully authenticate, a user must have a valid Firstock Trading Account and an active subscription to Firstock API Services. Login APIs facilitate the authentication process.
Method: POST
https://connect-go.thefirstock.tech/api/V5/login
Request details
Parameter | Value | Mandatory |
---|---|---|
userId | NP0097 | Yes |
password | be5628d7f2d0d3109ca31 | Yes |
TOTP | 1007 | Yes |
source | API | Yes |
vendorCode | NP2007_API | Yes |
apiKey | 2b57e30562c8bf0ffcee | Yes |
Libraries and SDKs
curl --location 'https://connect-go.thefirstock.tech/api/V5/login' \
--header 'Content-Type: application/json' \
--data '{
"userId": "NP2007",
"password": "56b9fced7d6703edb6d55b77f476ed",
"TOTP": "1007",
"source": "API",
"vendorCode": "NP2007_API",
"apiKey": "34ffc45878ce6801f3c8"
}'
Success response details
Parameter | Description | Example |
---|---|---|
status string |
Provides the result of the API | success |
data.actid string |
actid is the identity given during registration with Firstock |
NP2007 |
data.userName string |
Name of the user | ABCDEFGH |
data.susertoken string |
It used for authenticate and access other API and is also called jKey |
ce1c4471eb95dd566b4c5e72aa7 |
data.email string |
Email Id of the user | [email protected] |
{
"data": {
"actid": "NP2007",
"userName": "ABCDEFGH",
"susertoken":"ce1c4471e66b4c5e72aa7",
"email": "[email protected]"
},
"status": "Success"
}
Failure response details
Parameter | Description | Example |
---|---|---|
status String |
Provides the status of the API | failed |
code String |
Povides the HTTP code of the API | 401 |
name String |
Provides the type of error | INVALID_PASSWORD |
error.field String |
Tell in which the error was caused | password |
error.message String |
Provides the reason for the error | password parameter is invalid |
{
"status": "failed",
"code": "401",
"name": "INVALID_PASSWORD",
"error": {
"field": "password",
"message": "password parameter is invalid"
}
}