Jup-Rust-SDK
A Rust SDK to interact with the Jupiter Aggregator APIs.
Easily fetch token quotes and execute swaps programmatically from your Rust applications.
Installation 🛠️
cargo add jup-ag-sdk
or Add this to your Cargo.toml:
[dependencies]
jup-ag-sdk = "1.0.3"
Features
- Complete API Coverage - All Jupiter APIs included Ultra, Swap, Trigger, Recurring, Token and Price
- Strongly typed – Full Rust structs for all request/response types
- Composable builders – Chainable methods to customize request payloads (e.g. taker, referral, fee, excluded routers)
Usage
Below is a simple example that shows how to fetch and execute an Ultra order with the SDK. For detailed example checkout examples/
use jup_ag_sdk::{
JupiterClient,
types::{UltraExecuteOrderRequest, UltraOrderRequest},
};
#[tokio::main]
async fn main() {
let client = JupiterClient::new("https://lite-api.jup.ag");
let ultra = UltraOrderRequest::new(
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"So11111111111111111111111111111111111111112",
10_000_000, ).add_taker("your wallet address");
let quote = client.get_ultra_order(&ultra).await
.expect("Failed to get ultra order");
let execute = UltraExecuteOrderRequest {
signed_transaction: base64_signed_tx,
request_id: quote.request_id,
};
let response = client.ultra_execute_order(&execute).await
.expect("Failed to execute transaction");
println!("Transaction: {}", response.signature);
}
Support
Local
git clone https://github.com/Jupiter-DevRel/jup-rust-sdk
cd jup-rust-sdk
cargo build
open to contributions and suggestions.
License
MIT License