Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
img
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Bitfinex Websocket Crawler

A Bitfinex websocket (v1.1) crawler, save ticker data to MySQL, run with supervisor.

Requirements

  • Python3
  • MySQL
  • virtualenv (install via pip)

Installation

# Create virtual environment
virtualenv -p `which python3` venv

# Use virtual environment
. venv/bin/activate

# Install packages
pip install -r requirements.txt

# Build database (assume user is root without password)
mysql -u root -e "CREATE DATABASE bitfinex"

# (Optional) Change database url in alembic.ini and server.py for your customize database
vim alembic.ini
vim server.py

# Build tables
alembic upgrade head

Execute

python server.py

Execute via supervisor (Run in background on your server)

# Install supervisor
sudo apt-get install -y supervisor

# Change supervisor paths
sudo vim supervisor/bitfinex-socket-crawler.conf

# Add script for supervisor
sudo cp ./supervisor/bitfinex-socket-crawler.conf /etc/supervisor/conf.d/

# Load script
sudo supervisorctl reread
sudo supervisorctl update

# Execute supervisor
sudo supervisorctl start bitfinex-socket-crawler

Contribution

Any issues or PRs are very welcome, or contact with me azx754@gmail.com.

License

MIT

Donation

BTC Wallet: 3QB4Liv4Yp1ttpHnk8DT135juhKTBEWDc7

About

A Bitfinex websocket (v1.1) crawler, save ticker data to MySQL, run with supervisor.

Topics

Resources

License

Releases

No releases published

Packages

No packages published