Skip to main content

GetOrderResponse

Struct GetOrderResponse 

Source
pub struct GetOrderResponse {
Show 38 fields pub error: Option<String>, pub error_code: Option<f64>, pub error_message: Option<String>, pub expire_at: Option<String>, pub fee_bps: Option<f64>, pub fee_mint: Option<String>, pub gasless: Option<bool>, pub in_amount: Option<String>, pub in_usd_value: Option<f64>, pub input_mint: Option<String>, pub last_valid_block_height: Option<String>, pub maker: Option<String>, pub mode: Option<String>, pub other_amount_threshold: Option<String>, pub out_amount: Option<String>, pub out_usd_value: Option<f64>, pub output_mint: Option<String>, pub platform_fee: Option<SwapV2PlatformFee>, pub price_impact: Option<f64>, pub price_impact_pct: Option<String>, pub prioritization_fee_lamports: Option<f64>, pub prioritization_fee_payer: Option<String>, pub quote_id: Option<String>, pub referral_account: Option<String>, pub rent_fee_lamports: Option<f64>, pub rent_fee_payer: Option<String>, pub request_id: Option<String>, pub route_plan: Option<Vec<SwapV2RoutePlanStep>>, pub router: Option<GetOrderResponseRouter>, pub signature_fee_lamports: Option<f64>, pub signature_fee_payer: Option<String>, pub slippage_bps: Option<f64>, pub swap_mode: Option<String>, pub swap_type: Option<GetOrderResponseSwapType>, pub swap_usd_value: Option<f64>, pub taker: Option<String>, pub total_time: Option<f64>, pub transaction: Option<String>,
}

Fields§

§error: Option<String>

Duplicate of errorMessage for backwards compatibility

§error_code: Option<f64>

Present when taker is defined and transaction is the empty string. The router quoted a price but could not build a transaction. Match on router + errorCode to identify the error.

Aggregator routers (router is metis, dflow, okx):
- 1: Insufficient funds
- 2: Insufficient SOL for gas
- 3: Swap below minimum for gasless

JupiterZ router (router is jupiterz):
- 1: Insufficient balance to fund the swap
- 2: Missing associated token account
- 3: Quote could not be built into a transaction
§error_message: Option<String>

Human-readable error description. Present when taker is defined and transaction is the empty string. Match on router + errorCode instead of this string, as the message text may be parameterised.

§expire_at: Option<String>

Quote expiration timestamp for RFQ swaps

§fee_bps: Option<f64>

Total fee rate charged for the swap in basis points. This includes the Jupiter platform fee plus any additional charges, such as gasless support cost recoup.

§fee_mint: Option<String>§gasless: Option<bool>

True when signature and priority fees are paid by a wallet other than the taker. Set by three independent paths: - Automatic Jupiter sponsorship: signatureFeePayer = gasTzr94Pmp4Gf8vknQnqxeYxdgwFjbgdJa4msYRpnB - JupiterZ market maker: signatureFeePayer is the MM address (varies per quote); Jupiter’s gas wallet can pay the rent to create the taker’s output token account when referral fees are not set - Integrator payer: signatureFeePayer is your payer parameter For a deterministic opt-out, check signatureFeePayer == taker on every response.

§in_amount: Option<String>§in_usd_value: Option<f64>§input_mint: Option<String>§last_valid_block_height: Option<String>§maker: Option<String>

Market maker address for RFQ swaps

§mode: Option<String>

“ultra” or “manual” based on parameters used

§other_amount_threshold: Option<String>

Minimum output amount after slippage

§out_amount: Option<String>§out_usd_value: Option<f64>§output_mint: Option<String>§platform_fee: Option<SwapV2PlatformFee>§price_impact: Option<f64>

Price impact in percentage points (e.g. -0.1 = -0.1%). Divide by 100 to convert to a decimal fraction.

§price_impact_pct: Option<String>

Deprecated: decimal price impact ratio. Use priceImpact divided by 100 instead.

§prioritization_fee_lamports: Option<f64>

Includes priority fees and tips (Jito, Nozomi)

§prioritization_fee_payer: Option<String>§quote_id: Option<String>

Quote ID for RFQ swaps

§referral_account: Option<String>§rent_fee_lamports: Option<f64>

Estimated rent fee

§rent_fee_payer: Option<String>§request_id: Option<String>

Unique request ID. Pass this to /execute.

§route_plan: Option<Vec<SwapV2RoutePlanStep>>§router: Option<GetOrderResponseRouter>

Which router won the quote

§signature_fee_lamports: Option<f64>§signature_fee_payer: Option<String>§slippage_bps: Option<f64>§swap_mode: Option<String>§swap_type: Option<GetOrderResponseSwapType>

Deprecated: use router instead

§swap_usd_value: Option<f64>§taker: Option<String>§total_time: Option<f64>

Response time in milliseconds

§transaction: Option<String>
  • Base64-encoded transaction. Null if taker is not provided.
    • Empty string if taker is provided but transaction could not be built (check errorCode).

Trait Implementations§

Source§

impl Clone for GetOrderResponse

Source§

fn clone(&self) -> GetOrderResponse

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GetOrderResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GetOrderResponse

Source§

fn default() -> GetOrderResponse

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GetOrderResponse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for GetOrderResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more