Plugin.Account
property · Plugin · cAlgo.API
DesktopCLICloud
Contains all Account information
Environment behaviour
CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.
Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.
Definition
public IAccount Account {get;}
api.Account: IAccount
Returns IAccount
Examples
Print("Balance: {0} {1}", Account.Balance, Account.Asset.Name);
Print("Equity: {0}, free margin: {1}", Account.Equity, Account.FreeMargin);
Print("Margin: {0}, margin level: {1}, leverage: {2}", Account.Margin, Account.MarginLevel, Account.PreciseLeverage);
api.Print(f"Balance: {api.Account.Balance} {api.Account.Asset.Name}")
api.Print(f"Equity: {api.Account.Equity}, free margin: {api.Account.FreeMargin}")
api.Print(f"Margin: {api.Account.Margin}, margin level: {api.Account.MarginLevel}, leverage: {api.Account.PreciseLeverage}")