pub fn get_decrease_spot_position_quote(
decrease_amount: u64,
collateral_token: PoolTokenFacade,
leverage: f64,
reduce_only: bool,
position_token: PoolTokenFacade,
position_amount: u64,
position_debt: u64,
protocol_fee_rate: u32,
protocol_fee_rate_on_collateral: u32,
fusion_pool: FusionPoolFacade,
tick_arrays: TickArrays,
) -> Result<DecreaseSpotPositionQuoteResult, CoreError>Expand description
Spot position decrease quote
§Parameters
increase_amount: Position total size in the collateral_token.collateral_token: Collateral token.position_token: Token of the existing position.leverage: Leverage (1.0 or higher).position_amount: Existing position amount in the position_token.position_debt: Existing position debt in the token opposite to the position_token.reduce_only: Only allow reducing the existing position.protocol_fee_rate: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).protocol_fee_rate_on_collateral: Protocol fee rate from a market account represented as hundredths of a basis point (0.01% = 100).fusion_pool: Fusion pool.tick_arrays: Five tick arrays around the current pool price.
§Returns
DecreaseSpotPositionQuoteResult: quote result