User APIs¶
This section covers endpoints for retrieving user-specific information like account profile and funds.
| Request Type | Path | Description |
|---|---|---|
| GET | /user/profile | Get the profile information for the logged-in user. |
| GET | /funds | Fetches the user's available and utilized funds. |
For Individual Traders¶
Individual traders can directly get their Access Token from web.indstocks.com. All INDstocks users are eligible to get free access to Trading APIs. Here's how to get your Access Token:
- Login to indstocks.com
- Click on API section and navigate to 'Get Started with INDstocks APIs.'
User Profile¶
Retrieves the profile information for the authenticated user. This is a useful endpoint to test if your access token is valid.
Endpoint
Example Request
Bash
curl --location 'https://api.indstocks.com/user/profile' \
--header 'Authorization: YOUR_ACCESS_TOKEN'
Response Payload (Success)
JSON
{
"status": "success",
"data": {
"user_id": "5960668",
"email": "[email protected]",
"first_name": "Aditya",
"last_name": "Mishra",
"demat_id": "",
"is_nse_onboarded": true,
"is_bse_onboarded": true,
"is_nse_fno_onboarded": true,
"is_bse_fno_onboarded": true
}
}
Get Funds¶
Retrieves the funds utilization and availability for the authenticated user.
Endpoint
Example Request
Response Payload (Success)
JSON
{
"status": "success",
"data": {
"sod_balance": 4996.47,
"pledge_received": 0,
"pledge_remained": 0,
"detailed_avl_balance": {
"option_sell": 2980.40,
"future": 2980.40,
"option_buy": 4449.65,
"eq_mis": 2980.40,
"eq_cnc": 2980.40,
"eq_mtf": 2980.40
},
"withdrawal_balance": 2983.47,
"funds_added": 0,
"funds_withdrawn": 0,
"realized_pnl": -751.92,
"unrealized_pnl": 62.15
}
}