pub fn get_decrease_spot_position_estimation(
decrease_amount: u64,
collateral_token: u8,
position_token: u8,
position_amount: u64,
position_debt: u64,
price: f64,
) -> Result<DecreaseSpotPositionEstimationResult, CoreError>Expand description
Spot position decrease estimation
§Parameters
decrease_amount: Position total decrease size in the collateral_token.collateral_token: Collateral token.position_token: Token of the existing position.position_amount: Existing position amount in the position_token.position_debt: Existing position debt in the token opposite to the position_token.price: Pool price.
§Returns
DecreaseSpotPositionQuoteResult: quote result