pub struct CreateTriggerOrder {
pub input_mint: String,
pub output_mint: String,
pub maker: String,
pub payer: String,
pub params: Params,
pub compute_unit_price: Option<String>,
pub fee_account: Option<String>,
pub wrap_and_unwrap_sol: Option<bool>,
}Expand description
Request for a base64-encoded unsigned trigger order creation transaction
Fields§
§input_mint: StringThe mint address of the input token.
Example: "So11111111111111111111111111111111111111112" (SOL)
output_mint: StringThe mint address of the output token.
Example: "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"
maker: StringMaker address
payer: Stringfee payer address
params: Paramsmaking and taking amount inputs
compute_unit_price: Option<String>In microlamports, defaults to 95th percentile of priority fees Default value: auto
fee_account: Option<String>A token account (via the Referral Program) that will receive the fees
wrap_and_unwrap_sol: Option<bool>If either input or output mint is native SOL Default value: true
Implementations§
Source§impl CreateTriggerOrder
impl CreateTriggerOrder
Sourcepub fn new(
input_mint: &str,
output_mint: &str,
maker: &str,
payer: &str,
making_amount: u64,
taking_amount: u64,
) -> Self
pub fn new( input_mint: &str, output_mint: &str, maker: &str, payer: &str, making_amount: u64, taking_amount: u64, ) -> Self
Creates a new trigger order with required parameters
Sourcepub fn compute_unit_price(self, price: &str) -> Self
pub fn compute_unit_price(self, price: &str) -> Self
Sets the compute unit price in microlamports Default value: auto
Sourcepub fn fee_account(self, account: &str) -> Self
pub fn fee_account(self, account: &str) -> Self
Sets the fee account for referral program
Sourcepub fn wrap_and_unwrap_sol(self, wrap: bool) -> Self
pub fn wrap_and_unwrap_sol(self, wrap: bool) -> Self
Sets whether to wrap and unwrap SOL
Sourcepub fn expired_at(self, expired_at: &str) -> Self
pub fn expired_at(self, expired_at: &str) -> Self
Sets the expiration time for the order
Sourcepub fn slippage_bps(self, slippage: &str) -> Self
pub fn slippage_bps(self, slippage: &str) -> Self
Sets the slippage in basis points Default value: 0