alexskoropletov / binance

A wrapper for the Binance REST and WebSocket APIs. Also beautifies responses

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm downloads testing status code coverage

Binance

A library to work with Binance API, written in typescript. Forked from Zoey Garveys's binance (zoeyg/binance) js library.

Example

import BinanceRest, { BinanceWS, ConfigInterface } from "./index";

(async () => {
  const config: ConfigInterface = {
    key: '<your key goes here>',
    secret: '<your secret goes here>',
  };
  const rest = new BinanceRest(config);
  await rest.ticker24hr({ symbol: 'BTCUSDT' });

  const bws = new BinanceWS();
  bws.onTicker('BTCUSDT', (data) => {
    console.log(data);
  });
})();

About

A wrapper for the Binance REST and WebSocket APIs. Also beautifies responses

License:MIT License


Languages

Language:TypeScript 100.0%