| Crates.io | pacifica_rust_sdk |
| lib.rs | pacifica_rust_sdk |
| version | 3.0.0 |
| created_at | 2025-09-21 20:37:29.500738+00 |
| updated_at | 2025-10-15 12:33:23.347158+00 |
| description | Rust SDK for pacifica.fi exchange |
| homepage | |
| repository | https://github.com/Neiroleptik/pacifica_rust_sdk |
| max_upload_size | |
| id | 1849163 |
| size | 399,809 |
This is a community Rust SDK for the Pacifica exchange.
It provides both Asynchronous REST and WebSocket clients, utilities for tick/lot handling, signing, etc., and typed models for working with the API.
This SDK interacts with an exchange that is currently in beta.
The API changes frequently and without prior notice, including modifications to fields, methods, and data structures.
Because of this:
The SDK is actively maintained to keep up with upstream changes,
but API instability should be expected while the exchange remains in beta.
Add this SDK as a dependency in Cargo.toml:
For the latest development version from GitHub:
[dependencies]
pacifica_rust_sdk = { git = "https://github.com/Neiroleptik/pacifica_rust_sdk.git", branch = "main" }
For the latest stable version on crates.io:
pacifica_rust_sdk = "x.y.z"
Note: The GitHub version may contain the latest features and fixes, but it could be unstable.
The crates.io version is stable and recommended for production use.
use pacifica_rust_sdk::common::errors::ExchangeError;
use pacifica_rust_sdk::rest::rest_client::RestClient;
use pacifica_rust_sdk::info::info_client::InfoClient;
use pacifica_rust_sdk::models::info::response::market::MarketModel;
#[tokio::main]
async fn main() -> Result<(), ExchangeError> {
// Create InfoClient for mainnet without WebSocket
let info = InfoClient::new(
true, // is_mainnet
false, // enable_ws
None, // api_key
).await?;
// Access market cache
let markets: &std::collections::HashMap<String, MarketModel> = &info.market_cache;
for (symbol, m) in markets {
println!("{}: {:?}", symbol, m);
}
Ok(())
}
If WebSocket is enabled, you can subscribe to channels and receive live updates.
rest - REST client and HTTP utilitiesws - WebSocket client and subscriptionsinfo - information client for market metadataexchange - exchange client (info client included)common - errors, tick/lot utils, helpersmodels - typed request/response structurebin - examples for using all SDK methodsIf you encounter outdated structures, missing fields, or other inconsistencies -
feel free to open an issue or submit a pull request.