Function calculateWeightedTokenValue
- calculateWeightedTokenValue(tokenAmount: BN, tokenValue: BN, oraclePrice: BN, spotMarket: SpotMarketAccount, marginCategory: MarginCategory, customMarginRatio?: number): {
weight: BN;
weightedTokenValue: BN;
}
-
Parameters
-
tokenAmount: BN
-
tokenValue: BN
-
oraclePrice: BN
-
-
-
Optional
customMarginRatio: number
Returns {
weight: BN;
weightedTokenValue: BN;
}
-
weight: BN
-
weightedTokenValue: BN