akahu-client

Crates.ioakahu-client
lib.rsakahu-client
version0.1.1
created_at2026-01-06 01:24:21.378627+00
updated_at2026-01-17 19:48:44.986162+00
descriptionA non-official Rust client library for the Akahu API, providing access to financial data aggregation services in New Zealand
homepagehttps://github.com/josiahbull/akahu-client
repositoryhttps://github.com/josiahbull/akahu-client
max_upload_size
id2024903
size225,677
Josiah Bull (JosiahBull)

documentation

https://docs.rs/akahu-client

README

akahu-client

A non-offical Rust client library for the Akahu API, providing access to financial data aggregation services in New Zealand.

Installation

Add this to your Cargo.toml:

[dependencies]
akahu-client = "0.1.0"

Quick Start

use akahu_client::{AkahuClient, UserToken};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a client with your app token
    let client = AkahuClient::new(
        reqwest::Client::new(),
        "app_token_...".to_string(),
        None
    );

    // Create a user token from OAuth flow
    let user_token = UserToken::new("user_token_...".to_string());

    // Fetch accounts
    let accounts = client.get_accounts(&user_token).await?;

    for account in accounts.items {
        println!("{}: {} - {:.2}",
            account.name,
            account.kind,
            account.balance.current
        );
    }

    Ok(())
}

Validation

Note that I only use this in a very limited context, mostly for accounts/transactions. If you need APIs that I haven't tested please validate them yourself and open issues/PRs for any problems that you encounter.

Some APIs I have not bothered to port over - but I would welcome PRs or requests.

License

Licensed under either of:

at your option.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Resources

Commit count: 14

cargo fmt