1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7pub struct Quote {
8 pub input_mint: String,
10 pub output_mint: String,
12 pub in_amount: u64,
14 pub out_amount: u64,
16 pub price_impact_pct: f64,
18 pub slot: u64,
20 pub timestamp_ms: u64,
22 pub route_plan: Vec<serde_json::Value>,
24 #[serde(skip_serializing_if = "Option::is_none")]
26 pub other_amount_threshold: Option<u64>,
27 #[serde(default = "default_swap_mode")]
29 pub swap_mode: String,
30}
31
32fn default_swap_mode() -> String {
33 "ExactIn".to_string()
34}