pub struct SwapInput {
pub amount: String,
pub dex: SwapInputDex,
pub input_mint: Option<String>,
pub output_mint: Option<String>,
pub pool_address: Option<String>,
pub priority_fee: Option<String>,
pub slippage: i64,
pub swap_mode: SwapInputSwapMode,
pub user_address: SwapInputUserAddress,
}Expand description
SwapInput
JSON schema
{
"type": "object",
"required": [
"amount",
"dex",
"slippage",
"swapMode",
"userAddress"
],
"properties": {
"amount": {
"description": "DTO.DEX.SWAP.AMOUNT",
"examples": [
"1000000000"
],
"type": "string"
},
"dex": {
"description": "DTO.DEX.IDENTIFIER",
"examples": [
"raydium"
],
"type": "string",
"enum": [
"raydium",
"pumpfun",
"moonshot",
"candy",
"launchpad"
]
},
"inputMint": {
"description": "DTO.DEX.SWAP.INPUT_MINT",
"type": "string"
},
"outputMint": {
"description": "DTO.DEX.SWAP.OUTPUT_MINT",
"type": "string"
},
"poolAddress": {
"description": "DTO.DEX.SWAP.POOL_ADDRESS",
"examples": [
"58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2"
],
"type": "string"
},
"priorityFee": {
"description": "DTO.DEX.BASE.PRIORITY_FEE",
"examples": [
"1000"
],
"type": "string"
},
"slippage": {
"description": "DTO.DEX.SWAP.SLIPPAGE",
"default": 10,
"examples": [
10
],
"type": "integer",
"format": "int64",
"maximum": 100.0,
"minimum": 0.0
},
"swapMode": {
"description": "DTO.DEX.SWAP.MODE",
"examples": [
"ExactIn"
],
"type": "string",
"enum": [
"ExactIn",
"ExactOut"
]
},
"userAddress": {
"description": "DTO.DEX.WALLET",
"examples": [
"oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7"
],
"type": "string",
"maxLength": 64,
"minLength": 8
}
}
}Fields§
§amount: StringDTO.DEX.SWAP.AMOUNT
dex: SwapInputDexDTO.DEX.IDENTIFIER
input_mint: Option<String>DTO.DEX.SWAP.INPUT_MINT
output_mint: Option<String>DTO.DEX.SWAP.OUTPUT_MINT
pool_address: Option<String>DTO.DEX.SWAP.POOL_ADDRESS
priority_fee: Option<String>DTO.DEX.BASE.PRIORITY_FEE
slippage: i64DTO.DEX.SWAP.SLIPPAGE
swap_mode: SwapInputSwapModeDTO.DEX.SWAP.MODE
user_address: SwapInputUserAddressDTO.DEX.WALLET
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SwapInput
impl<'de> Deserialize<'de> for SwapInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SwapInput
impl RefUnwindSafe for SwapInput
impl Send for SwapInput
impl Sync for SwapInput
impl Unpin for SwapInput
impl UnwindSafe for SwapInput
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