Class Account
Contains all user's account information
Namespace: TradingPlatform.BusinessLayer
Syntax
public class Account : BusinessObject
Properties
AccountCurrency
Gets base currency of account. Account CCY is always equal to the server CCY in AlgoStudio
Declaration
public Asset AccountCurrency { get; }
Property Value
Type | Description |
---|---|
Asset |
Balance
Gets current balance of the account.
Declaration
public double Balance { get; }
Property Value
Type | Description |
---|---|
double |
Id
Gets account unique code.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
string |
Name
Obtaining account name.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
NettingType
Contains all user's account information
Declaration
public NettingType NettingType { get; set; }
Property Value
Type | Description |
---|---|
NettingType |
Methods
CompareTo(object)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | An object to compare with this instance. |
Returns
Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
int | A value that indicates the relative order of the objects being compared. The return value has these meanings:
|
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
CompareTo(Account)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Declaration
public int CompareTo(Account other)
Parameters
Type | Name | Description |
---|---|---|
Account | other | An object to compare with this instance. |
Returns
Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
int | A value that indicates the relative order of the objects being compared. The return value has these meanings:
|
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(Account)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(Account other)
Parameters
Type | Name | Description |
---|---|---|
Account | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Events
Updated
Will be triggered on each account information updating
Declaration
public event Action<Account> Updated
Event Type
Type | Description |
---|---|
Action<Account> |