| Crates.io | noah-sdk |
| lib.rs | noah-sdk |
| version | 1.1.0 |
| created_at | 2025-11-12 19:36:04.772906+00 |
| updated_at | 2025-11-26 09:30:34.583695+00 |
| description | A modern, type-safe Rust SDK for the Noah Business API |
| homepage | |
| repository | https://github.com/yezz123/noah-rust-sdk |
| max_upload_size | |
| id | 1929839 |
| size | 345,377 |

A modern, type-safe Rust SDK for the Noah Business API.
reqwestApi-Signature) and API key (X-Api-Key) authenticationAdd this to your Cargo.toml:
[dependencies]
noah-sdk = { version = "1.0", features = ["rustls-tls"] }
For native TLS:
[dependencies]
noah-sdk = { version = "1.0", features = ["native-tls"] }
use noah_sdk::apis::configuration::{ApiKey, Configuration};
use noah_sdk::apis::utilities_api;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create configuration for sandbox environment
let mut config = Configuration::default();
config.base_path = "https://api.sandbox.noah.com/v1".to_string();
config.api_key = Some(ApiKey {
prefix: None,
key: "your-api-key-here".to_string(),
});
// Get balances
let balances = utilities_api::balances_get(&config, None, None, None).await?;
println!("Found {} balances", balances.items.len());
Ok(())
}
The SDK supports two authentication methods:
use noah_sdk::apis::configuration::{ApiKey, Configuration};
let mut config = Configuration::default();
config.api_key = Some(ApiKey {
prefix: None,
key: "your-api-key".to_string(),
});
let mut config = Configuration::default();
config.bearer_access_token = Some("your-jwt-token".to_string());
// Or pass api_signature parameter to API calls
You can use both by setting both api_key and passing api_signature to individual API calls.
See the examples directory for more detailed examples:
Run an example:
cargo run --example basic_client
The SDK provides typed methods for all major Noah API endpoints:
utilities_api::balances_get)utilities_api::channels_sell_get, utilities_api::channels_channel_id_get)onboarding_api::customers_customer_id_put, utilities_api::customers_customer_id_get)payout_api::transactions_sell_prepare_post, payout_api::transactions_sell_post)payin_api::checkout_payin_crypto_post, payout_api::checkout_payout_fiat_post)onboarding_api::onboarding_customer_id_post)utilities_api::payment_methods_get)payin_api::workflows_bank_deposit_to_onchain_address_post)The SDK uses comprehensive error types for each API endpoint:
use noah_sdk::apis::utilities_api;
match utilities_api::balances_get(&config, None, None, None).await {
Ok(balances) => println!("Success: {:?}", balances),
Err(noah_sdk::apis::Error::ResponseError(err)) => {
println!("API error: status={}, content={}", err.status, err.content);
}
Err(noah_sdk::apis::Error::Reqwest(err)) => println!("HTTP error: {}", err),
Err(noah_sdk::apis::Error::Serde(err)) => println!("Serialization error: {}", err),
Err(e) => println!("Other error: {}", e),
}
use noah_sdk::apis::configuration::Configuration;
// Sandbox (default)
let mut config = Configuration::default();
config.base_path = "https://api.sandbox.noah.com/v1".to_string();
// Production
let mut config = Configuration::default();
config.base_path = "https://api.noah.com/v1".to_string();
// Custom URL
let mut config = Configuration::default();
config.base_path = "https://api.custom.com/v1".to_string();
let mut config = Configuration::default();
config.base_path = "https://api.sandbox.noah.com/v1".to_string();
config.user_agent = Some("my-app/1.0".to_string());
config.api_key = Some(ApiKey {
prefix: None,
key: "your-api-key".to_string(),
});
default: Enables native-tlsrustls-tls: Use rustls for TLSnative-tls: Use native TLS implementation (default)Licensed under the MIT license (LICENSE).
Contributions are welcome! Please feel free to submit a Pull Request.