risk: add doc comment for MarginLevel method

This commit is contained in:
c9s 2022-07-22 14:54:25 +08:00
parent a9f9fc4e5e
commit 4b7126ce41
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -140,6 +140,8 @@ func (c *AccountValueCalculator) NetValue(ctx context.Context) (fixedpoint.Value
return accountValue, nil
}
// MarginLevel calculates the margin level from the asset market value and the debt value
// See https://www.binance.com/en/support/faq/360030493931
func (c *AccountValueCalculator) MarginLevel(ctx context.Context) (fixedpoint.Value, error) {
marginLevel := fixedpoint.Zero
marketValue, err := c.MarketValue(ctx)