Skip to main content

A cryptocurrency trading bot

Project description

.. image:: https://travis-ci.org/karma0/nombot.svg?branch=master
:target: https://travis-ci.org/karma0/nombot

.. image:: https://readthedocs.org/projects/nombot/badge/?version=latest
:target: https://nombot.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://pyup.io/repos/github/karma0/nombot/shield.svg
:target: https://pyup.io/repos/github/karma0/nombot/
:alt: Updates

.. image:: https://pyup.io/repos/github/karma0/nombot/python-3-shield.svg
:target: https://pyup.io/repos/github/karma0/nombot/
:alt: Python 3


nombot
======

A flexible cryptocurrency trading bot written in Python and ``bors``.

NOTE: This project is currently awaiting any major changes until `ccxt` support
for websockets comes out.

Dependencies
------------

Some assumptions are made that you are familiar with Python and operate
in Linux. There is currently no way to test on Windows or Apple
operating systems, and while you may use the OTS strategies that come
with this repository, in order to expand on your strategy development
time is a likely requirement.

If you are able to use ``docker``, this will solve the first problem. If
you are able to pay for development services, that will solve the
second.

Python Dependencies
~~~~~~~~~~~~~~~~~~~

- Python 3.6+ is assumed
- ``bors``
- ``ccxt``
- ``dataclasses``

Key Features
------------

Exchanges
~~~~~~~~~

- Extensible for any exchange using CCXT.
- Exchange helper facilities; \_connection pooling, websockets, shared
contexts.
- Mutiple exchange connectivity allowing for arbitrage.
- Strive toward dynamic, forward-compatible interfaces.

Currencies
~~~~~~~~~~

All currencies supported; *if the exchange supports it, it will
work*. \* Wallet support, allowing for automated coin transfers.
*(coming soon)*

Algorithms
~~~~~~~~~~

Implementation is independent of strategy, allowing for maximal
reuse, flexibility, and enforcing DRY principles.

Strategies
~~~~~~~~~~

- "Plugable" *strategy* architecture using ``IStrategy`` inheritance.
- "Stackable" architecture allows you to isolate grouped functionality
for reuse.
- Utilizes a middleware pipeline for processing.
- Shared context objects allow for maximum versatility in complex
scenarios.
- Utilization of algorithms as backend functional libraries (strategy
equates to "business logic").
- Automatic configuration pass-through.
- See ``bors`` for more information.

Configuration
~~~~~~~~~~~~~

Flexible modularized configuration using JSON. See ``config.json.example``.

Security
~~~~~~~~

- Namespaced immutable configuration will greatly reduce your chance of
information leakage and manipulation between middlewares.
- File system storage & security (requires careful consideration of
file permissions; see install notes below).

Coming soon...
~~~~~~~~~~~~~~

- Backtesting and supporting documentation.
- More documentation around creating exchanges, algorithms, and
strategies.
- Tests, tests, tests!
- For a deployment example, see ``siphonexchange``.

Setup
-----

Installation from PyPi
~~~~~~~~~~~~~~~~~~~~~~

.. code:: bash

pip install nombot

Upgrading to the latest from PyPi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: bash

pip install -U nombot

Installation from source
~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: bash

git clone https://github.com/karma0/nombot.git nombot && cd $_
pip install -U .

Upgrading to the latest from source
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``master`` branch will contain the latest release. ``develop`` will
contain the latest developments and may break things.

.. code:: bash

git pull

Configuration
~~~~~~~~~~~~~

1. Create your strategy class, using any available algorithms, or
creating your own algorithms.
2. Copy ``config.json.example`` to ``config.json`` and execute
``chmod 600 config.json``.
3. Change the configuration required for your strategy, exchange(s), API
calls, etc. based on the examples.

Execution
~~~~~~~~~

.. code:: bash

./trader.py

Contributing
------------

Options: 1. Follow the instructions here:
https://help.github.com/articles/fork-a-repo/ 2. Submit an issue or
feature request
`here <https://help.github.com/articles/fork-a-repo/>`__.


=======
History
=======

2.2.8 (2018-06-26)
------------------

* Added `ccxt` to the requirements.

2.2.7 (2018-06-26)
------------------

* Update README with badges.
* Upgraded dependencies.
* Added several unit tests.

2.2.6 (2018-06-26)
------------------

* Fixed CI and added some tests around configuration.

2.2.5 (2018-06-25)
------------------

* Setup readthedocs.org.

2.2.4 (2018-06-25)
------------------

* Replaced packaging with cookiecutter-pypackage.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

nombot-2.2.9-py2.py3-none-any.whl (21.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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