Skip to main content

Platform that collects crypto-currencies price data, fires alerts based on price sentiment and performs automatic trading.

Project description

XTCryptoSignals

XTCryptoSignals is a Python library that includes the following 3 services:

  • Ticker

    • Data collection of crypto-currencies pairs such as BTC/USDT, ETH/BTC or any other pair that is supported by the Exchange API
    • A Signals service based on setup rules to send real-time alerts about price, price change, trading volume or market sentiment through E-mail or Push Notifications to the browser or mobile app
    • Automatic trading
  • RESTFul Server API

    • Restful interface that exposes API entry points to get desired crypto-currencies data.
    • SocketIO Server to broadcast real-time data to clients.
  • Website

Roadmap

  • Add crypto-currencies exchanges (Dec 2018)
  • Implement RESTFul API and socket.io to access price data in real time (Jan 2019)
  • Build website (From Jan 2019)
  • Add Gunicorn to make it production ready (March 2019)
  • Building Unit, functional and end-to-end testing for existing and future features (From Jan 2019)
  • Setup notification rules for price range, price change, trading volume, price sentiment (From July 2019)
  • Implement e-mail and web browser push notifications signals (Aug-Oct 2019)
  • Implement automatic trading (From 2019)
  • Build iOS app (From 2020)

Getting Started

Pre-requisites

Installation

Install from source

Clone project repository

hg clone ssh://hg@bitbucket.org/pantunes/xtcryptosignals
cd xtcryptosignals

Setup Python virtual environment:

virtualenv venv -p python3
source venv/bin/activate

Install package in develop mode:

pip install -e .

(Dependencies will be installed automatically from requirements.txt)

Running tests

python setup.py test

Install from PyPi

Create folder project:

mkdir xtcryptosignals
cd xtcryptosignals

Setup Python virtual environment:

virtualenv venv -p python3
source venv/bin/activate

Install package:

pip install xtcryptosignals

Ticker

Start service

Development:

xt-ticker --enable-messaging

# to test 1 tick
xt-ticker --testing

Production

xt-ticker --enable-messaging --log-minimal

To get a list of supported exchanges:

xt-ticker --list-config exchanges
binance
binance_dex
uphold
okex
idex
switcheo
hotbit
bibox
okcoin
bithumb
coinbene
dcoin
bitmax
bilaxy

(Drop me an e-mail if you want support for a new exchange or please contribute to this project creating a pull request)

Command line help

xt-ticker --help
Usage: xt-ticker [OPTIONS]

  Use this tool to collect data from configured coins or/and tokens from
  configured crypto-currencies exchanges.

Options:
  --testing                       Execute 1 iteration for all configured coins
                                  and/or tokens without Celery. (Useful for
                                  testing purposes)
  --list-config [exchanges|currencies]
                                  List 'exchanges' or 'currencies' (coins or
                                  tokens) per exchange that the tool currently
                                  supports.
  --enable-messaging              Enable real-time crypto data message broadcasting.
  --log-minimal                   Only log errors and important warnings in
                                  stdout.
  --version                       Show version.
  -h, --help                      Show this message and exit.

Setup

There is already an initial setup with some crypto-currencies (coins and tokens) that can be added or/and removed in settings_exchanges.py.

BIBOX: {
    'pairs': [
        ('ONT', 'USDT'),
        ('ONT', 'BTC'),
        ('ONT', 'ETH'),
        ('NEO', 'USDT'),
        ('NEO', 'BTC'),
        ('NEO', 'ETH'),
        ('LTC', 'USDT'),
        ('LTC', 'BTC'),
        ('CARD', 'ETH'),
    ]
}

UPHOLD: {
    'pairs': [
        ('BTC', 'USD'),
        ('ETH', 'USD'),
        ('LTC', 'USD'),
        ('XRP', 'USD'),
    ]
}

Initial setup to create dynamic MongoDB collections for data segmentation categorized by Exchanges pooling frequency in settings.py.

HISTORY_FREQUENCY = (
    '10s', '30s', '1m', '10m', '30m', '1h', '2h', '3h', '4h', '12h', '1d', '4d', 
    '1w', '2w', '4w', '12w', '24w', '1y',
)

Results

The Ticker service is highly performant as can take advantage of multi-processing multi-core CPU.

RESTFul Server API

Start service

Development:

xt-server

Production:

DEBUG=0 xt-server

Website

Start service

Development:

xt-client

Production:

# if using default settings
DEBUG=0 SERVER_API_BASE_URL=http://127.0.0.1:5000 xt-client --gunicorn

SERVER_API_BASE_URL should contain the public address where xt-server was started.

Run all services at once

xt-all --help
Usage: xt-all [OPTIONS] [start|stop|restart]

Options:
  -h, --help  Show this message and exit.

Screenshots

Open the browser with the URL http://127.0.0.1:8000

Home page Ticker 10 seconds
screen-shot screen-shot
Tickers Pairs
screen-shot screen-shot
BTC-USDT in all Exchanges
screen-shot

Team

  • Paulo Antunes

anyone else interested? :-)

Disclaimer

This project is work in progress and when it comes to trading use it at your own risk.

License

This project is licensed under the GNU License.

Donation

I've been building this open-source project on my free time. Feel free to pay me a coffee :-)

BTC 3QLhxkScrmzbKvUFyesxCkxMaPc7EB9SFK
ETH 0x2bda8e92B42AB005918E5A126E2bD7cC19Bf5fF6

##Contact Us

Through the website xtcryptosignals.com.

Acknowledgments

Thanks to Jetbrains in order to support us with an Open Source license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

XTCryptoSignals-0.1.6.1.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

XTCryptoSignals-0.1.6.1-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file XTCryptoSignals-0.1.6.1.tar.gz.

File metadata

  • Download URL: XTCryptoSignals-0.1.6.1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for XTCryptoSignals-0.1.6.1.tar.gz
Algorithm Hash digest
SHA256 4a64dc8f4485c13a494e77735cdafe8403155a4f9ce4bcd2e329acbc899068ca
MD5 b99d22eca7968563d00cd7d02ab8d9d7
BLAKE2b-256 ee3eae189b8ddfb80342b2d6eab96cc45a5c5cbd673a46a46618ee8bbb62e02e

See more details on using hashes here.

File details

Details for the file XTCryptoSignals-0.1.6.1-py3-none-any.whl.

File metadata

  • Download URL: XTCryptoSignals-0.1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for XTCryptoSignals-0.1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc31761bcc0ad875485ffa29e6e90878b5b5f9d86d71f0b721d9cf3712b918a3
MD5 d0020fde5113708189f239876a628a31
BLAKE2b-256 be46bf005dd2c560a40cc0892988adca364295f49a61606ef88ad8e452ebb41b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page