Skip to content

Javascript client for accessing the coinray.io API

License

Notifications You must be signed in to change notification settings

coinrayio/coinrayjs

Repository files navigation

Coinray.js - Official JavaScript client library for Coinray.io

Usage

import { Coinray } from "coinrayjs"

let coinray = new Coinray(token);

Subscribe to trades

const handle = coinray.subscribeTrades({coinraySymbol: "BINA_BTC_ETH"}, (msg) => console.log("BINA_BTC_ETH:", msg));
coinray.unsubscribeTrades({coinraySymbol: "BINA_BTC_ETH"}, handle);

Subscribe to candles

const handle = coinray.subscribeCandles({coinraySymbol: "BINA_BTC_ETH", resolution: "60"}, (msg) => console.log("BINA_BTC_ETH:", msg));
coinray.subscribeCandles({coinraySymbol: "BINA_BTC_ETH", resolution: "60"}, handle);

License

MIT