Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 667 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 667 Bytes

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