The issue
I've hit an issue with the Rust SDK where the excluded_dexes parameter isn't functioning as expected. Despite specifying DEXes to exclude, the SDK still tries to route swaps through them. This behavior differs from the TypeScript SDK, where excluded_dexes works correctly.
This is a critical problem for our smart contract, which swaps via a Program Derived Address (PDA). Some exchanges reject transactions from non-system-owned or PDA accounts, leading to failed swaps.
Repro steps
Set up a small project, and do:
jup-swap = { branch = "2.1", git = "https://github.com/jup-ag/jupiter-swap-api-client", package = "jupiter-swap-api-client" }
Then do
let quote_result = jupiter_swap_api_client
.quote(&QuoteRequest {
amount,
input_mint,
output_mint,
excluded_dexes: Some("Obric V2, 1DEX"),
..QuoteRequest::default()
})
.await?;
For some reason this will attempt to send the swap through Obric and 1Dex
The issue
I've hit an issue with the Rust SDK where the
excluded_dexesparameter isn't functioning as expected. Despite specifying DEXes to exclude, the SDK still tries to route swaps through them. This behavior differs from the TypeScript SDK, where excluded_dexes works correctly.This is a critical problem for our smart contract, which swaps via a Program Derived Address (PDA). Some exchanges reject transactions from non-system-owned or PDA accounts, leading to failed swaps.
Repro steps
Set up a small project, and do:
Then do
For some reason this will attempt to send the swap through Obric and 1Dex