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.
- SocketIO Server to broadcast real-time data to clients.
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)
- 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 (Apr-July 2019)
- Implement e-mail and web browser push notifications signals (Aug 2019)
- Integrate platform with Docker and Docker Compose (Aug 2019)
- Build iOS app (Sep-Oct 2019)
- Implement automatic trading (Nov-Dec 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 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
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
dcoin
bitmax
bilaxy
(Drop me an e-mail if you want support for a new exchange 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-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 uses multi-processing as it can take advantage of a multi-core CPU.
It takes 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 mainly depends on used hardware as CPU cores and Internet connection / latency)
RESTFul Server API
Start service
Development:
xt-server --enable-messaging
Production:
DEBUG=0 xt-server --enable-messaging
Website
Start service
Development:
xt-client
Production:
# if using default settings
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.
or
# start all services, xt-all --help
xt-all
# start only client
xt-client
# start only server
xt-server
# start only ticker
xt-ticker
Open the browser with the URL http://127.0.0.1:8000
10 seconds ticker page in the URL http://127.0.0.1:8000/ticker/10s
Displaying Tickers menu
Displaying Pairs menu
10 seconds ticker page for Bitcoin in the URL http://127.0.0.1:8000/ticker/BTCUSDT/10s
Disclaimer
This project is work in progress and when it comes to trading use it at your own risk.
License
Metadata
Release files for XTCryptoSignals 0.1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| XTCryptoSignals-0.1.3.1.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| XTCryptoSignals-0.1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.4 MB
Release files / XTCryptoSignals-0.1.3.1.tar.gz
| Download URL | XTCryptoSignals-0.1.3.1.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f61e593dbb179e37ba14f3f14c931efa51cc19e654d09b6cf056ba0a095810ec
|
|
BLAKE2b-256 checksum How to use checksums |
240f9eee06e532d58d76b26d10b274f92905944b13bd5733ad871fd5e1cb5a47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / XTCryptoSignals-0.1.3.1-py3-none-any.whl
| Download URL | XTCryptoSignals-0.1.3.1-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d239b55a9f32790f8b3b9fd733210c4cdde4e3e128574f42be91ae1a9d94791f
|
|
BLAKE2b-256 checksum How to use checksums |
a3487c5f85bbf866d1a9dbe7a9bdfa4b3f2905d93c18539d3c6d9f0814481448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|