A short "hello world" that authenticates with the Cryptohopper API and prints your account info plus the BTC/USDT price.
export CRYPTOHOPPER_TOKEN=your-40-char-bearer
cargo run- How to construct a client with
Client::builder().api_key(...).build()? - One authenticated call:
ch.user.get().await?returnsserde_json::Value - One market-data call:
ch.exchange.ticker(&json!({...})).await? - Typed error handling — every error has an
ErrorCodeenum variant
cryptohopper.com developer dashboard → Create OAuth app → drive the consent flow once. See oauth/ for runnable OAuth examples, or use the cryptohopper CLI (cryptohopper login) which handles the flow for you.
cryptohoppertokiofor the async runtime,serde_jsonfor the request payloads.
Requires Rust 1.75+ (2021 edition).