pub struct DecreaseSpotPositionQuoteResult {
pub decrease_percent: u32,
pub required_swap_amount: u64,
pub estimated_amount: u64,
pub estimated_payable_debt: u64,
pub estimated_collateral_to_be_withdrawn: u64,
pub price_impact: f64,
pub jupiter_swap_ix: Option<SwapInstruction>,
}Fields§
§decrease_percent: u32Position decrease percentage
required_swap_amount: u64The maximum acceptable swap input amount for position decrease according to the provided slippage (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
estimated_amount: u64Estimated total amount of the adjusted position.
estimated_payable_debt: u64Estimated value of a debt that will be repaid.
estimated_collateral_to_be_withdrawn: u64Estimated collateral that will be withdrawn from the position.
price_impact: f64Price impact in percents (100% = 1.0)
jupiter_swap_ix: Option<SwapInstruction>Optional jupiter swap instruction data and accounts.
Auto Trait Implementations§
impl Freeze for DecreaseSpotPositionQuoteResult
impl RefUnwindSafe for DecreaseSpotPositionQuoteResult
impl Send for DecreaseSpotPositionQuoteResult
impl Sync for DecreaseSpotPositionQuoteResult
impl Unpin for DecreaseSpotPositionQuoteResult
impl UnwindSafe for DecreaseSpotPositionQuoteResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more