Skip to content

maxisoft/binance-dumper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binance Dumper

Save binance futures's long short ratios, open interst, buy sell ratio of futures markets.

TL;DR minimal recommended usage

# save csv into a binancedumper folder (into current directory !)
mkdir -p binancedumper
chown -R 1001 binancedumper
docker run -it --rm -v `pwd`/binancedumper:/binancedumper ghcr.io/maxisoft/binance-dumper/binance-dumper:latest

Description

This project save multiples multiple binance futures data sources into csv files.

The program target data source with no permanent retention on binance side.
Such csv may allow one to develop investment strategies, charts, analysis, ... without relying on external services (ie just from your own and raw data from the cex).

Data sources

Currently all those data are collected from the api:

The resulting csv files use the same columns (but the pair column) as specified by the api docs.

Requirement

Docker container

Just a running docker daemon (or docker compatible like podman) with network configured.

Building from source

A standard working nim environment with

  • recent nim version (tested with nim 1.6)
  • C compiler
  • nimble
  • sqlite devel lib
  • ssl devel lib

Dependencies

nimble install ws asynctools sorta

Compilation

nim c -d:release --stackTrace:on --opt:speed -d:ssl --app:console --filenames:canonical -o:binance_dumper ./src/main.nim

Usage

Start ./binance_dumper and it'll write csv files into the current working directory.

One should use external restart mechanical/loop such as

  • systemd
  • docker to restart the soft in case of crash (eg internet disconnections)

FAQ

How can I configure tracked pairs ?

Zero configuration mode for now so all pairs found at program startup are tracked.

Program use too much cpu/ram

By default the program use a pool of 20 http connections to do his tasks.
In some case (like a fresh program start) it may use a larger usage resource than usual to download all the data. To reduce this, one can set the environment variable BINANCE_SCHEDULER_CONCURRENT_TASK=4