Validate Trading Account Credentials
Check whether a trading account's login credentials are valid, for one account or all your live accounts at once.
https://apix.stocksdeveloper.in/account/validateCredentials These calls check whether a trading account's login credentials are valid. AutoTrader Web tries to log in to the broker's trading platform and reports back success or failure. Run them every morning before the market opens to find accounts with wrong or expired credentials. There are three functions: validate before adding an account, validate one existing account, or validate all your live accounts at once.
This call checks whether a trading account’s login credentials are valid. AutoTrader Web tries to log in to the broker’s trading platform and reports back success or failure. It is useful every morning before the market starts, so you can find accounts with incorrect or expired credentials early.
It is available over the HTTP REST API and is mainly for developers building custom apps on our broker independent trading APIs.
There are three functions:
| Function | When to use it |
|---|---|
| Validate Credentials | Validate credentials before adding an account in the system. |
| Validate Account | Validate credentials of a single trading account already in the system. |
| Validate All Accounts | Validate credentials of all accounts under your user. |
Validate All Accounts only checks LIVE accounts.
HTTP
Example
Validate credentials before adding an account:
curl https://apix.stocksdeveloper.in/account/validateCredentials \
-H "api-key: <your-api-key>" \
-d "broker=YOUR_BROKER" \
-d "platform=PLATFORM" \
-d "loginId=<your-login-id>" \
-d "password=<your-password>" \
-d "totpKey=<your-totp-key>"
Validate a single existing account (by trading account id):
curl https://apix.stocksdeveloper.in/account/validateAccount \
-H "api-key: <your-api-key>" \
-d "tradingAccId=<trading-account-id>"
Validate all your live accounts:
curl https://apix.stocksdeveloper.in/account/validateAllAccounts \
-H "api-key: <your-api-key>"
Response
Validate Credentials and Validate Account return the same structure.
On success:
{
"result": true,
"message": null,
"status": true,
"commandId": "d26a6efb-0690-4fc2-bba1-04fda58db03e"
}
On failure:
{
"result": false,
"message": "Error from broker: [10002 - Incorrect Client ID or Password. Attempt 1 of 5]",
"status": true,
"commandId": "cc577516-0de1-4e1e-bc61-0b8007db1722"
}
Validate All Accounts returns a list, one entry per account:
{
"result": [
{
"tradingAccId": 23409730,
"pseudoAccId": 23409731,
"valid": true,
"result": "SUCCESS",
"message": "SUCCESS",
"tradingAccLoginId": "NM291"
},
{
"tradingAccId": 23502007,
"pseudoAccId": 23502008,
"valid": false,
"result": "FAILURE",
"message": "Error from broker: [Access denied]",
"tradingAccLoginId": "159401"
}
],
"message": null,
"status": true,
"commandId": null
}
Parameters
Validate Credentials
The parameters are the same as the Create Trading Account parameters.
Validate Account
| Parameter | Type | Description |
|---|---|---|
tradingAccId | Number (Long) | Unique trading account id generated by AutoTrader Web. Get it from the Fetch All Trading Accounts API. |
Validate All Accounts
No parameters.
The response fields for Validate Credentials and Validate Account are result (SUCCESS or FAILURE) and message (success or error message). For Validate All Accounts, each item in the result list carries result (SUCCESS or FAILURE), message (failure reason), valid (boolean), tradingAccLoginId, tradingAccId (internal id) and pseudoAccId (internal id).
Return value
The call returns the order id given by your trading platform.
The call returns the library order id. The Desktop Client passes the request on to your broker.
Notes
These calls are not meant to be made repeatedly, so they have stricter limits than the other APIs. See API rate limits for the full list.
Thanks for the feedback. Still stuck? Contact support.
Last updated 20 June 2026