A "hello world" per supported language. Each one:
- Reads a bearer token from
$CRYPTOHOPPER_TOKEN. - Calls
user.get(authenticated) and prints who's logged in. - Calls
exchange.tickerforbinance:BTC/USDTand prints the last price. - Catches the SDK's typed error and exits with a non-zero status on failure.
Pick your language. Each directory has its own README.md with the run command.
| Language | Directory | SDK package |
|---|---|---|
| Node.js | nodejs/ |
@cryptohopper/sdk on npm |
| Python | python/ |
cryptohopper on PyPI |
| Go | go/ |
github.com/cryptohopper/cryptohopper-go-sdk |
| Ruby | ruby/ |
cryptohopper on RubyGems |
| Rust | rust/ |
cryptohopper on crates.io |
| PHP | php/ |
cryptohopper/sdk on Packagist |
| Dart | dart/ |
cryptohopper (resolved via git: until pub.dev publish) |
| Swift | swift/ |
cryptohopper-swift-sdk via SwiftPM |
| Kotlin | kotlin/ |
com.cryptohopper:cryptohopper (Maven Central pending — uses mavenLocal() for now) |
| curl | curl/ |
(none — raw HTTP, language-agnostic reference) |
Every quickstart needs an OAuth bearer in $CRYPTOHOPPER_TOKEN. Three ways:
- CLI —
cryptohopper login(cryptohopper-cli) walks you through the browser consent and stores the token at~/.cryptohopper/config.json.catit from there. - Manual OAuth flow — see the
oauth/directory or the curl quickstart for the underlying HTTP calls. - Developer dashboard — for some app types you can issue a long-lived token directly without driving the consent flow.
The Cryptohopper public API expects access-token: <token> (with a hyphen), not Authorization: Bearer. Every SDK in the table above sends the right header automatically. If you're hand-rolling HTTP, see the curl quickstart for the rule.