Official client libraries for the Cryptohopper API in seven languages, and a command-line tool. They send your access token and build the requests for you, so you call ch.user.get() instead of writing HTTP calls.

The SDKs and the CLI are in alpha: their interfaces can still change between versions.

Packages

LanguageRegistryPackageSource
JavaScript / TypeScriptnpm@cryptohopper/sdkGitHub
PythonPyPIcryptohopperGitHub
GoGo modulesgithub.com/cryptohopper/cryptohopper-go-sdkGitHub
PHPPackagistcryptohopper/sdkGitHub
RubyRubyGemscryptohopperGitHub
Rustcrates.iocryptohopperGitHub
SwiftSwift Package Managercryptohopper-swift-sdkGitHub

Install

npm install @cryptohopper/sdk

First request

Every SDK takes the OAuth access token of a user. See Authentication for how your app gets one.

import { CryptohopperClient } from "@cryptohopper/sdk";

const ch = new CryptohopperClient({
  apiKey: process.env.CRYPTOHOPPER_TOKEN,
});

const me = await ch.user.get();
console.log(me.email);

Command-line tool

The cryptohopper CLI manages your hoppers, positions and backtests from a terminal or a CI job. cryptohopper login opens your browser to authorize the CLI with OAuth; every command accepts --json for scripting. Standalone binaries for macOS, Linux and Windows are on the releases page.

npm install -g @cryptohopper/cli

cryptohopper login          # authorize in your browser with OAuth
cryptohopper whoami
cryptohopper hoppers list
cryptohopper positions <hopper-id>

Prefer plain HTTP? Every endpoint is documented in the API reference with cURL, JavaScript, Python and PHP examples.