GetAccountNumberProperty
Syntax
GetAccountNumberProperty(propertyId: ENUM_ACCOUNT_INFO_NUMBER): numberParameters
Return Value
Description
Example
Last updated
GetAccountNumberProperty(propertyId: ENUM_ACCOUNT_INFO_NUMBER): numberLast updated
// Get account balance
const balance = this.api.GetAccountNumberProperty(
ENUM_ACCOUNT_INFO_NUMBER.ACCOUNT_BALANCE_CURRENT
);
console.log(`Balance: ${balance}`);
// Get current profit
const profit = this.api.GetAccountNumberProperty(
ENUM_ACCOUNT_INFO_NUMBER.ACCOUNT_CURRENT_PROFIT
);
console.log(`Current Profit: ${profit}`);
// Check leverage
const leverage = this.api.GetAccountNumberProperty(
ENUM_ACCOUNT_INFO_NUMBER.ACCOUNT_LEVERAGE_RATIO
);
console.log(`Account Leverage: ${leverage}:1`);