Class RiskInfo
- Namespace
- ATAS.DataFeedsCore
- Assembly
- ATAS.DataFeedsCore.dll
Contains information about marginal trading for a position null fields values means value is not received
public record RiskInfo
- Inheritance
-
objectRiskInfo
- Extension Methods
Constructors
RiskInfo()
public RiskInfo()
RiskInfo(RiskInfo)
protected RiskInfo(RiskInfo original)
Parameters
originalRiskInfo
Properties
CanAddLeverage
Use this value to control behaviour of the user UI controls
public virtual bool CanAddLeverage { get; }
Property Value
- bool
CanChangeMarginType
Use this value to control behaviour of the user UI controls
public virtual bool CanChangeMarginType { get; }
Property Value
- bool
CanReduceLeverage
Use this value to control behaviour of the user UI controls
public virtual bool CanReduceLeverage { get; }
Property Value
- bool
CantAddLeverageMessage
Description for a user why he cannot add the leverage if CantAddLeverageMessage is false
public virtual string? CantAddLeverageMessage { get; }
Property Value
- string
CantChangeMarginTypeMessage
Description for a user why he cannot change the margin if CanChangeMarginType is false
public virtual string? CantChangeMarginTypeMessage { get; }
Property Value
- string
CantReduceLeverageMessage
Description for a user why he cannot reduce the leverage if CanReduceLeverage is false
public virtual string? CantReduceLeverageMessage { get; }
Property Value
- string
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
- Type
InitialMargin
Gets automatic margin amount used on position opening
public decimal? InitialMargin { get; init; }
Property Value
- decimal?
IsIsolated
null - not yet known True - in isolated-margin mode. (separate account to maintain a position) False - Cross-margin mode (all account funds used as margin)
public bool? IsIsolated { get; init; }
Property Value
- bool?
Leverage
Gets current leverage, null means value is not received yet
public decimal? Leverage { get; init; }
Property Value
- decimal?
LeverageIncrement
Minimal change value of the leverage parameter
public decimal LeverageIncrement { get; init; }
Property Value
- decimal
LeverageRange
Possible range of the leverage parameter
public (decimal, decimal) LeverageRange { get; init; }
Property Value
- (decimal, decimal)
LeverageSections
Gets slider labels for leverage user control
public decimal[]? LeverageSections { get; init; }
Property Value
- decimal[]
LiquidationPrice
Gets a price when liquidation will happen according to current margin
public decimal? LiquidationPrice { get; init; }
Property Value
- decimal?
MaintenanceMargin
Gets the minimum required margin value to keep a position open
public decimal? MaintenanceMargin { get; init; }
Property Value
- decimal?
Margin
Gets current margin for a position, null if not received yet
public decimal? Margin { get; init; }
Property Value
- decimal?
MarginRate
Gets a percentage value 0-1. If this value reaches 1 the position will be liquidated and user will lost all his margin.
public decimal? MarginRate { get; }
Property Value
- decimal?
ParentPosition
Gets the position this information belongs to; set when the object is assigned to Risk. Its unrealized PnL is used to calculate the margin ratio.
public Position? ParentPosition { get; }
Property Value
Methods
Equals(RiskInfo?)
public virtual bool Equals(RiskInfo? other)
Parameters
otherRiskInfo
Returns
- bool
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
- bool
ToString()
public override string ToString()
Returns
- string
Operators
operator ==(RiskInfo?, RiskInfo?)
public static bool operator ==(RiskInfo? left, RiskInfo? right)
Parameters
Returns
- bool
operator !=(RiskInfo?, RiskInfo?)
public static bool operator !=(RiskInfo? left, RiskInfo? right)
Parameters
Returns
- bool