Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 996 Bytes

File metadata and controls

26 lines (17 loc) · 996 Bytes

Node.js quickstart

A 30-line "hello world" that authenticates with the Cryptohopper API and prints your account info plus the BTC/USDT price.

Run it

export CRYPTOHOPPER_TOKEN=your-40-char-bearer
npm install
npm start

What it shows

  • How to construct CryptohopperClient with a bearer token
  • One authenticated call: client.user.get()
  • One market-data call: client.exchange.ticker({ exchange, market })
  • Typed error handling via CryptohopperError

Where to get a token

cryptohopper.com developer dashboard → Create OAuth app → drive the consent flow once. See oauth/nodejs/ for a runnable OAuth example, or use the cryptohopper CLI (cryptohopper login) which handles the flow for you.

Dependencies

Just one — @cryptohopper/sdk. Requires Node 20+ (uses ESM and top-level await).