noesis-api 0.3.0

Official Rust SDK for the Noesis on-chain intelligence API — Solana token & wallet analytics.
Documentation

noesis-rust

Official Rust SDK for the Noesis on-chain intelligence API.

Crates.io Docs.rs License Website


Install

cargo add noesis-api

Or add to Cargo.toml:

[dependencies]
noesis-api = "0.3"
tokio = { version = "1", features = ["full"] }

Quick start

use noesis_api::Noesis;

#[tokio::main]
async fn main() -> Result<(), noesis_api::Error> {
    let client = Noesis::new(std::env::var("NOESIS_API_KEY").unwrap());

    let preview = client.token_preview("<MINT>").await?;
    println!("{:#?}", preview);

    let wallet = client.wallet_profile("<ADDRESS>").await?;
    println!("{:#?}", wallet);

    Ok(())
}

Get an API key at noesisapi.dev/keys.

Methods

Tokens

use noesis_api::{Chain, HoldersOptions};

client.token_preview(mint).await?;
client.token_scan(mint).await?;
client.token_info(mint, Chain::Sol).await?;
client.token_top_holders(mint).await?;
client.token_holders(mint, HoldersOptions { limit: Some(500), ..Default::default() }).await?;
client.token_bundles(mint).await?;
client.token_fresh_wallets(mint).await?;
client.token_team_supply(mint, Chain::Sol).await?;
client.token_entry_price(mint, Chain::Sol).await?;
client.token_dev_profile(mint).await?;
client.token_best_traders(mint).await?;
client.token_early_buyers(mint, 1.0).await?;

Wallets

use noesis_api::{HistoryOptions, ConnectionsOptions, TxType};

client.wallet_profile(addr).await?;
client.wallet_history(addr, HistoryOptions {
    limit: Some(50),
    ty: Some(TxType::Swap),
    ..Default::default()
}).await?;
client.wallet_connections(addr, ConnectionsOptions::default()).await?;
client.wallets_batch_identity(&addresses).await?;
client.cross_holders(&tokens).await?;
client.cross_traders(&tokens).await?;

Chain / on-chain

client.chain_status().await?;
client.account(addr).await?;
client.accounts_batch(&addresses).await?;
client.parse_transactions(&signatures).await?;

Error handling

Non-2xx responses surface as typed [noesis_api::Error] variants:

use noesis_api::{Noesis, Error};

let client = Noesis::new("se_...");
match client.token_preview("<MINT>").await {
    Ok(data) => { /* ... */ }
    Err(Error::RateLimit { retry_after_seconds, limit, limit_type, signed_in, .. }) => {
        // limit      == Some("1 request/5 seconds")
        // limit_type == Some("Heavy")
        // signed_in  == Some(false)
        let wait = retry_after_seconds.unwrap_or(5);
        tokio::time::sleep(std::time::Duration::from_secs(wait)).await;
    }
    Err(Error::Unauthorized { .. }) => eprintln!("Invalid or missing API key"),
    Err(Error::NotFound { .. })     => eprintln!("Wallet/token/route not found"),
    Err(e) => eprintln!("Other error: {e}"),
}

retry_after_seconds reads the JSON body, then falls back to the Retry-After response header.

Custom base URL

let client = Noesis::with_base_url("se_...", "https://custom.example.com");

License

MIT — see LICENSE.

Links