Code examples

The same request in twelve languages, ready to copy and run. On JavaScript or TypeScript, the open-source client covers REST and WebSocket in one package.

Last updated:

JavaScript / TypeScript client

On JavaScript or TypeScript, the open-source harem-altin-api client handles REST and WebSocket for you. npm · View on GitHub

harem-altin-api
// npm install harem-altin-api
import { createClient } from "harem-altin-api";

const client = createClient({ apiKey: process.env.PIXCHARP_API_KEY });

const has = await client.getPrice("HAS");
console.log(has.symbol, has.alis, has.satis);

REST request samples

A GET /v1/prices/HAS call for one symbol's price, in twelve languages. Keep the key in the PIXCHARP_API_KEY environment variable instead of in your code.

curl https://api.pixcharp.com/v1/prices/HAS \
  -H "X-API-Key: $PIXCHARP_API_KEY"

WebSocket samples in the same languages are on the WebSocket stream page.