Fetch All Trading Accounts
Fetch every trading account under your user, with login id, broker, platform, live status and license details.
https://apix.stocksdeveloper.in/account/fetchAllTradingAccounts This call returns the details of every trading account under your user, such as login id, broker, platform, live status and license dates. It is meant for developers building custom apps on our broker independent trading APIs. It never returns sensitive data like passwords or security answers.
This call fetches the details of all trading accounts available under your user. It is available over the HTTP REST API and is primarily for developers building custom apps on our broker independent trading APIs.
It never returns sensitive details like password, security answer or similar fields.
HTTP
Example
curl https://apix.stocksdeveloper.in/account/fetchAllTradingAccounts \
-H "api-key: <your-api-key>"
The response is JSON, in the format shown under Response. Each account carries the Account fields listed below.
Response
On success the result field is a list of trading account objects:
{
"result": [
{
"loginId": "229004",
"pseudoAccName": "ACC-1",
"broker": "YOUR_BROKER",
"platform": "PLATFORM",
"licenseExpiryDate": "20-Sep-2023",
"live": false,
"systemId": 20739003,
"systemIdOfPseudoAcc": 20739004,
"licenseDaysLeft": 0
},
{
"loginId": "AR291",
"pseudoAccName": "ACC-2",
"broker": "YOUR_BROKER",
"platform": "PLATFORM",
"licenseExpiryDate": "24-Jun-2023",
"live": false,
"systemId": 16638672,
"systemIdOfPseudoAcc": 16638673,
"licenseDaysLeft": 0
}
],
"message": null,
"status": true,
"commandId": null
}
On failure:
{
"result": null,
"message": "429 - Too many requests",
"status": false,
"commandId": null
}
status is true on success. On error it is false, and message holds the error text.
Account fields
Each trading account in the result list carries the fields below.
| Field | Type | Description |
|---|---|---|
loginId | string | Login id of the trading account. |
pseudoAccName | string | Pseudo name (nickname). |
broker | string | Stock broker name. |
platform | string | Stock broker platform. |
live | boolean | Whether the account is live. Non-live accounts are not available for trading. |
licenseExpiryDate | string | License expiry date in dd-MMM-yyyy format. |
licenseDaysLeft | int | License days left. |
systemId | long | Internal id given by AutoTrader Web that uniquely identifies the trading account. |
systemIdOfPseudoAcc | long | Internal id given by AutoTrader Web that uniquely identifies the pseudo account. |
To understand the difference between a trading account and a pseudo account, see the pseudo account guide.
Notes
This call is not expected to be used repeatedly, so it has stricter limits than the other APIs. See API rate limits for the full list.
Python
Signature
def fetch_all_trading_accounts(self):
Example
response = autotrader.fetch_all_trading_accounts()
if response.success():
for account in response.result:
print("{0} | {1} | live={2}".format(
account.loginId, account.broker, account.live))
else:
print("Message: {0}".format(response.message))
Java
Signature
/**
* Provides every trading account under your user, with its broker, platform,
* nickname and licence details. Never returns credentials.
*
* @return the trading accounts under your user
*/
IOperationResponse<Set<TradingAccountPublic>> fetchAllTradingAccounts();
Example
IOperationResponse<Set<TradingAccountPublic>> response =
autotrader.fetchAllTradingAccounts();
for (TradingAccountPublic account : response.getResult()) {
System.out.println(account.getLoginId() + " | " + account.getBroker()
+ " | live=" + account.isLive());
}
C#
Signature
/// <summary>
/// Provides every trading account under your user, with its broker, platform,
/// nickname and licence details. Never returns credentials.
/// </summary>
/// <returns> the trading accounts under your user </returns>
IOperationResponse<ISet<TradingAccountPublic>> FetchAllTradingAccounts();
Example
IOperationResponse<ISet<TradingAccountPublic>> response =
autoTrader.FetchAllTradingAccounts();
foreach (TradingAccountPublic account in response.Result)
Console.WriteLine("{0} | {1} | live={2}",
account.LoginId, account.Broker, account.Live);
Notes
- Needs a recent library version. These calls are available in Python 1.5.0, Java 3.3.0 and C# 1.5.0 or newer. If your editor does not offer the function, upgrade the library — see client setup. The HTTP REST calls need nothing installed.
- Not available in Excel, AmiBroker or MetaTrader. Use the HTTP REST calls there.
Thanks for the feedback. Still stuck? Contact support.
Last updated 8 August 2026