Skip to main content

jup_ag_sdk/
lib.rs

1//! # Jupiter Client
2//!
3//! A Rust client library for interacting with Jupiter Aggregator APIs.
4//!
5//! This library provides a convenient interface to:
6//! - Get swap quotes and execute swaps
7//! - Access Ultra API features (orders, balances, shield)
8//! - Fetch token prices and router information
9//!
10//! ## Example
11//!
12//! ```rust
13//! use jup_ag_sdk::JupiterClient;
14//! use jup_ag_sdk::types::QuoteRequest;
15//!
16//! #[tokio::main]
17//! async fn main() {
18//!     let client = JupiterClient::new("https://lite-api.jup.ag");
19//!     
20//!     let quote_request = QuoteRequest::new(
21//!         "So11111111111111111111111111111111111111112", // SOL
22//!         "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", // JUP
23//!         1_000_000_000 // 1 SOL
24//!     );
25//!     
26//!     let quote = client.get_quote(&quote_request).await?;
27//!     println!("Quote: {:?}", quote);
28//!     
29//!     Ok(())
30//! }
31//! ```
32
33pub use client::JupiterClient;
34pub use error::JupiterClientError;
35
36pub mod client;
37pub mod error;
38pub mod types;