Fetch Live Pseudo Accounts
List the pseudo accounts that are live right now, so your code knows which accounts it can trade.
https://apix.stocksdeveloper.in/account/fetchLivePseudoAccounts This call returns the names of the pseudo accounts that are live under your user. A pseudo account is the nickname you trade under, and it is the value every order function expects as its first argument. Only live accounts can place orders, so calling this at the start of a run tells your code which accounts are usable that day. It is available in Python, Java, C# and the HTTP REST API, and returns a plain list of names.
This call returns the live pseudo accounts under your user.
A pseudo account is the nickname you give a trading account, and it is what every order function takes as its first argument. An account is live when it is logged in and able to trade; an account that is logged out, expired or disabled is not returned.
Calling this once when your strategy starts is the simplest way to know which accounts you can actually place orders against today, instead of discovering it from a rejected order. To get the full details of every account — broker, platform, licence dates, and non-live accounts too — use Fetch All Trading Accounts instead.
Code samples
HTTP
Example
curl https://apix.stocksdeveloper.in/account/fetchLivePseudoAccounts \
-H "api-key: <your-api-key>"Response
On success the result field is a list of pseudo account names:
{
"result": ["ACC_NICK_NAME", "ANOTHER_ACCOUNT"],
"message": null,
"status": true,
"commandId": null
}An empty list means no account is live at the moment. That is a normal answer, not an error — the usual reasons are that the market session has not started, or an account needs its credentials refreshed. Validate Trading Account Credentials tells you which one.
Python
Signature
def fetch_live_pseudo_accounts(self):Example
response = autotrader.fetch_live_pseudo_accounts()
if response.success():
for account in response.result:
print("Live account: {0}".format(account))
else:
print("Message: {0}".format(response.message))Java
Signature
/**
* Provides live pseudo accounts available under your user.
*
* @return live pseudo accounts
*/
IOperationResponse<Set<String>> fetchLivePseudoAccounts();Example
IOperationResponse<Set<String>> response =
autotrader.fetchLivePseudoAccounts();
for (String account : response.getResult()) {
System.out.println("Live account: " + account);
}C#
Signature
/// <summary>
/// Provides live pseudo accounts available under your user.
/// </summary>
/// <returns> live pseudo accounts </returns>
IOperationResponse<ISet<String>> FetchLivePseudoAccounts();Example
IOperationResponse<ISet<string>> response =
autoTrader.FetchLivePseudoAccounts();
foreach (string account in response.Result)
Console.WriteLine("Live account: {0}", account);Notes
- Python needs 1.5.0 or newer, where this call was added. The Java and C# libraries have had it for much longer, so any current version will do. If your editor does not offer the function, upgrade the library — see client setup. The HTTP REST call needs nothing installed.
- Not available in Excel, AmiBroker or MetaTrader. Use the HTTP REST call there.
- The names returned are exactly what the order functions expect, so you can pass them straight through.
Thanks for the feedback. Still stuck? Contact support.
Last updated 8 August 2026