Skip to content

User Details

This allows to fetch the complete information of the logged in user.

POST: /userDetails

https://connect.thefirstock.com/api/userDetails

Request Details

Parameter Description
userId User Id of the login user
jKey Token Received from Login API

Code

from thefirstock import thefirstock

clientDetails = thefirstock.firstock_userDetails()
curl -X POST 'https://connect.thefirstock.com/api/userDetails'' \
     -H 'Content-Type: application/json' \
     -d '{
            "userId": "",
            "jKey": ""
         }'
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.getUserDetails((err, result)=>{
    console.log("Error, ",err)
    console.log("Result: ",result)
})
using thefirstock;

class Program
{
public static void Main()
{
    Firstock firstock = new Firstock();
    var userDetails = firstock.getUserDetails();
}
}

Response Details

Parameter Description
requestTime It will be present only in a successful response.
userName Name given to the user during registration.
actid Account id
exchange Json array of strings with enabled, allowed exchange names
orarr Json array of Product Obj with enabled products, as defined below.
uprev Always it will be an INVESTOR, other types of user not allowed to login using this API.
stat Ok or Not_Ok
email E-mail given by the user

Sample Response

{
    "requestTime": "23:38:02 29-05-2022",
    "userName": "",
    "exchange": [
                    "NFO"
                ],
    "orarr": [
                    "LMT",
                    "MKT",
                    "SL-LMT",
                    "SL-MKT"
             ],
     "email": "",
     "actid": "",
     "uprev": "INVESTOR",
     "stat": "Ok"
}
{
    "stat": "Not_Ok",
    "emsg": "Session Expired : Invalid Session Key"
}