What is a Pseudo Account?
- A dummy name or an alias to the trading account
- Another way to think about it as a pointer to the trading account
- By default, the system creates a pseudo account automatically for you with the same name as your trading account login id. So if you are confused, use use the same name as your trading account login id whenever you want to place an order.
- You can mark a pseudo-account live/non-live allowing you to enable/disable it’s correspondent trading account
- All api functions work on pseudo account
- Pseudo account screens are explained here
If you use broker specific trading account directly in your strategy code, then you need to modify your code whenever you want to change stock broker. To overcome this problem, our system uses a concept of dummy or pseudo account.
A pseudo account is just a pointer to the actual trading account. You can assign any meaningful name to the pseudo account. A user maps a pseudo account to a trading account through system settings. When he needs to change a stock broker, all he needs to do is to map this pseudo account to another trading account from new broker.
placeOrder("DUMMY_ACC", "NSE", "BANKNIFTY_28-MAY-2020_CE_25000", "BUY", "LIMIT", "INTRADAY", 20, 230.55, 0);
- ABC123 – (Stock Broker: Zerodha)
- XYZ321 – (Stock Broker: Upstox)
- DUMMY_ACC -> ABC123
As you can see, our pseudo account is currently mapped to the trading account of Zerodha. Our strategy is currently running in a Zerodha trading account.
If we need to change the trading account, we simply map it to Upstox trading account. Our strategy will now work with Upstox trading account. There is no need to make any code changes in your strategy.
Note: One pseudo account maps to only one trading account.