0.1.1 • Published 5 years ago

binance-scraper v0.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

Node binance scraper

This project allow you to scrape every order available on binance.

Warning. This is still in a Todo state.

Install

npm install binance-scraper

This project directly include Typescript definition 👍.

Features

  • Event based
  • Selection of market
  • Single pair download

Use as a library

const Binance = require("binance-scraper").Binance

async function scrape() {
    const binance = await Binance.init(["ETH", "BTC"]);
    binance.on("trade", trade=>console.log(trade));
    await binance.getAllAggTrades();
    // await binance.getAllAggTradesFor("ETHBTC")
}
scrape().catch(console.error)

Binance.init(market) take an array of market. Available options are :

  • BNB
  • BTC
  • ETH
  • XRP
  • USDT
  • PAX
  • TUSD
  • USDC
  • USDS

event data trade will be an object like in the response of Aggregated API of binance.

Use included script

If you have cloned this repository, you can play included scenario with the help of npm. Don't forget to npm i.

CSV

Download all in a big CSV.

CSV can take up to hundreds of Go.

npm run csv