Skip to main content

Service that collects cryptocurrencies price data, fires alerts based on price sentiment, and performs automatic trading. Exposes Restful API andincludes website showing functionalities.

Project description

XTCryptoSignals

XTCryptoSignals is a Python library that includes the following 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 and runs as well SocketIO Server. (This service must be running to allow the Ticker to send real-time data to the Website, using SocketIO)

Website

  • Website to show some of the platform functionalities.

Roadmap

  • Add crypto-currencies exchanges (Dec 2018)
  • Implement RESTFul API and socket.io to access price data in real time (Jan 2019)
  • Build website to use this platform (From Jan 2019)
  • Setup notification rules for price range, price change, trading volume, price sentiment (Feb 2019)
  • Build Unit, functional and end-to-end testing (From Jan 2019)
  • Implement e-mail and web browser push notifications signals (Mar 2019)
  • Implement automatic trading (Apr 2019)
  • Build iOS app (May-Jul 2019)

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

pip install -e .

(Dependencies will be installed automatically from requirements.txt)

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

xt-ticker

Run without Celery (for testing purposes):

xt-ticker --testing

To get a list of supported exchanges:

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

(Drop me an email if you want a new one to be supported or 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-real-time-messaging    Enable SocketIO real-time crypto-data
                                  message broadcasting.
  --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', '3h', '6h', '12h', '24h', '1w',
)

Results

This service is fast as it uses threading. It takes me around 6 seconds to collect data of 70 crypto-currencies symbols pairs from 7 exchanges and save it in 11 collections in MongoDB. (This performance figure depends on used hardware and Internet connection / latency)

RESTFul Server API

Start service

xt-server

Website

Start service

xt-client

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

Disclaimer

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

License

GNU

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.0.8.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

XTCryptoSignals-0.0.8.1-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: XTCryptoSignals-0.0.8.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for XTCryptoSignals-0.0.8.1.tar.gz
Algorithm Hash digest
SHA256 39aba3443c55a4788f618277892f3d7a276e766494a5f2ff020923b28e4391f4
MD5 d9775c61f64959815a7bb7779fc998da
BLAKE2b-256 fb50240da9711b19f4aa1bb1db85f4c62ff91d439098118d6d39236c1c4e4262

See more details on using hashes here.

File details

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

File metadata

  • Download URL: XTCryptoSignals-0.0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for XTCryptoSignals-0.0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3427d7897939579d93a9ef73dcc2331e2e26e2226e11626d84d82b9a09bba150
MD5 49b7d203be889b46b80877dc604e4a06
BLAKE2b-256 ea30b718daf2a6dd24157e88b9a0b5bfa46886c54e75ca6be1d17a4c008cb111

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