Practical, runnable examples for the Cryptohopper API. Pick what you need from the table — every directory has its own README with the run command.
| Directory | Purpose |
|---|---|
quickstart/ |
A "hello world" per language — authenticate and make one API call. Pick this if you're new. |
oauth/ |
Drive the three-leg OAuth2 consent flow end to end (server-side apps that need to obtain tokens for users). |
webhooks/ |
Receive webhook events from Cryptohopper (order fills, signals). |
recipes/ |
Cross-language patterns: poll a backtest, fan out positions, retry strategy, stream new fills. |
cli/ |
Shell scripts that combine cryptohopper CLI commands with jq for ops automation. |
Every official Cryptohopper SDK ships an alpha-quality "0.x" release on its native registry. Each SDK covers all 18 public API domains with the same error taxonomy and retry contract — the Comparison wiki shows the same operations side-by-side.
| Language | Quickstart | OAuth flow | Registry |
|---|---|---|---|
| Node.js | quickstart/nodejs/ |
oauth/nodejs/ |
@cryptohopper/sdk |
| Python | quickstart/python/ |
oauth/python/ |
cryptohopper |
| Go | quickstart/go/ |
oauth/go/ |
cryptohopper-go-sdk |
| Ruby | quickstart/ruby/ |
— | cryptohopper |
| Rust | quickstart/rust/ |
— | cryptohopper |
| PHP | quickstart/php/ |
oauth/php/ |
cryptohopper/sdk |
| Dart | quickstart/dart/ |
— | (git: until pub.dev publish) |
| Swift | quickstart/swift/ |
— | SwiftPM |
| Kotlin | quickstart/kotlin/ |
— | (Maven Central pending) |
| curl | quickstart/curl/ |
— | (no SDK — raw HTTP, language-agnostic reference) |
You'll need a 40-character OAuth bearer token to run any of these. Three ways to obtain one:
- CLI (easiest) —
cryptohopper loginfromcryptohopper-cliwalks you through the browser consent and stores the token at~/.cryptohopper/config.json.catit out from there. - Manual OAuth flow — see the language-specific samples in
oauth/or the protocol-level walkthrough inquickstart/curl/. - Long-lived dev token — for some app types you can issue one directly from the developer dashboard.
Once you have a token, set it in your shell:
export CRYPTOHOPPER_TOKEN=your-40-char-bearerEvery quickstart reads from that env var.
The Cryptohopper public API uses the access-token: <token> header, not Authorization: Bearer. The AWS API Gateway in front of api.cryptohopper.com rejects Authorization: Bearer with 405 Missing Authentication Token. Every official SDK in the table above sends the right header automatically. If you're hand-rolling HTTP, see the curl quickstart.
cryptohopper-resources— OpenAPI spec, public docs, the SDK suite overviewcryptohopper-cli— the official CLI- Public API docs
- Developer dashboard
MIT — see LICENSE.