@skoropletov/binance-api

A package to work Binance REST and WebSocket APIs, forked from Zoey Garveys's binance (zoeyg/binance) js library

Usage no npm install needed!

<script type="module">
  import skoropletovBinanceApi from 'https://cdn.skypack.dev/@skoropletov/binance-api';
</script>

README

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