Skip to content

API Ignores excluded dexes #40

@0x7EAB07

Description

@0x7EAB07

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions