npm.io
0.1.10 • Published 5 years ago

@skoropletov/binance-api

Licence
MIT
Version
0.1.10
Deps
7
Size
78 kB
Vulns
25
Weekly
0

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);
  });
})();

Keywords