zaifbot


Namezaifbot JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/techbureau/zaifbot
Summarytrading bot framework for zaif exchange
upload_time2017-09-05 07:00:23
maintainer
docs_urlNone
authorAkiraTaniguchi DaikiShiroi Monji
requires_python
licenseMIT
keywords zaif bit coin btc xem mona jpy virtual currency block chain bot
VCS
bugtrack_url
requirements Cerberus certifi chardet click Flask future idna itsdangerous Jinja2 MarkupSafe numpy pandas python-dateutil pytz requests six slack-logger slackclient SQLAlchemy urllib3 websocket-client Werkzeug zaifapi
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ZaifBot
=======

:chart\_with\_upwards\_trend: algorithmic trading bot for zaif exchange

|Python version| |PyPI version| |License: MIT|

| ZaifBot is a Pythonic algorithmic trading library that run on `Zaif
  Exchange <https://zaif.jp/?lang=en>`__.
| It is developed by using Python 3.5.3 and tested in Python 3.4, 3.5,
  3.6.

Features
--------

-  Easy to use: Zaifbot is library for trading beginners, so designed
   simple.
-  Support all currency pairs dealt with `Zaif
   Exchange <https://zaif.jp/?lang=en>`__
-  Technical indicators like SMA, EMA, Bollinger Bands, RSI, ADX
-  You don't have to prepare market data. Zaifbot internal get data from
   `zaif
   API <http://techbureau-api-document.readthedocs.io/ja/latest/index.html>`__

| To get started with Zaifbot take a look at the
  `tutorial <https://github.com/techbureau/zaifbot/wiki/%E3%83%81%E3%83%A5%E3%83%BC%E3%83%88%E3%83%AA%E3%82%A2%E3%83%AB1>`__
  and the `full
  documentation <https://github.com/techbureau/zaifbot/wiki>`__.
| `『ZaifBotドキュメント』 <https://github.com/techbureau/zaifbot/wiki>`__

**Note:** ZaifBot is unofficial library of `Tech Bureau,
Inc. <http://techbureau.jp/>`__ Please use it at your own risk.

Installation
------------

instaling with pip
~~~~~~~~~~~~~~~~~~

After activating an isolated Python environment, run

.. code:: bash

    $ pip install zaifbot

currently supported platforms includes:

-  Linux 64-bits
-  OSX 64-bits
-  Windows 64-bits

**Note:** if you use **OSX**, we assume
`homebrew <https://brew.sh/index.html>`__ is installed.

Setup
-----

After installing Zaifbot, run

.. code:: bash

    $ install_ta_lib

| TA-Lib is open-source library of technical analysis indicators that
  ZaifBot is depending on.
| This command install TA-Lib in your operating system.

then,

.. code:: bash

    $ init_database

| When ``init_database`` command is executed,
| ``db/zaifbot.db`` is created for SQLite and schema is migrated.
| Your Trade records will be saved in this file.

Quick Start
-----------

See our `getting started
tutorial <https://github.com/techbureau/zaifbot/wiki/%E3%83%81%E3%83%A5%E3%83%BC%E3%83%88%E3%83%AA%E3%82%A2%E3%83%AB1>`__

The following code implements a simple trading algorithm using zaifbot

.. code:: python

    from zaifbot.trade import Strategy
    from zaifbot.rules import Entry, Exit
    from zaifbot.config import set_keys
    from zaifbot.trade.tools import last_price

    # setting your Zaif API key
    set_keys(key='your_key', secret='your_secret')


    # creating rule to buy
    class BuyWhenCheap(Entry):
        def can_entry(self):
            if last_price(self._currency_pair.name) < 25000:
                return True
            return False

    # creating rule to exit
    class ExitWhenPriceGoUp(Exit):
        def can_exit(self, trade):
            # 'trade' has the entry information
            current_price = last_price(trade.currency_pair.name)
            if current_price > trade.entry_price + 5000:
                return True
            return False

    my_entry = BuyWhenCheap(currency_pair='btc_jpy',
                            amount=0.01,
                            action='bid')
    my_exit = ExitWhenPriceGoUp()

    # strategy is an unite of automated trading
    my_strategy = Strategy(entry_rule=my_entry,
                           exit_rule=my_exit)

    my_strategy.start(sec_wait=1)

Feedback
--------

If you have a question, or find a bug, feel free to open an issue.

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

| Any kind of contributions are welcome.
| Please contribute by following the steps below.

1. Fork and clone this repository to your computer
2. Run ``docker build -t zaifbot .`` to create development environment
3. Edit source code and make pull request to ``depelop`` branch

.. |Python version| image:: https://img.shields.io/badge/python-3.4%2C%203.5%2C%203.6-blue.svg
   :target: https://pypi.python.org/pypi/zaifbot
.. |PyPI version| image:: https://badge.fury.io/py/zaifbot.svg
   :target: https://badge.fury.io/py/zaifbot
.. |License: MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
   :target: https://opensource.org/licenses/MIT

            

Raw data

            {
    "_id": null,
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "cheesecake_code_kwalitee_id": null,
    "keywords": "zaif bit coin btc xem mona jpy virtual currency block chain bot",
    "upload_time": "2017-09-05 07:00:23",
    "requirements": [
        {
            "name": "Cerberus",
            "specs": [
                [
                    "==",
                    "1.1"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2017.7.27.1"
                ]
            ]
        },
        {
            "name": "chardet",
            "specs": [
                [
                    "==",
                    "3.0.4"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "6.7"
                ]
            ]
        },
        {
            "name": "Flask",
            "specs": [
                [
                    "==",
                    "0.12.2"
                ]
            ]
        },
        {
            "name": "future",
            "specs": [
                [
                    "==",
                    "0.16.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "2.6"
                ]
            ]
        },
        {
            "name": "itsdangerous",
            "specs": [
                [
                    "==",
                    "0.24"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "2.9.6"
                ]
            ]
        },
        {
            "name": "MarkupSafe",
            "specs": [
                [
                    "==",
                    "1.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.13.1"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "0.20.3"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.6.1"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2017.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.18.4"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.10.0"
                ]
            ]
        },
        {
            "name": "slack-logger",
            "specs": [
                [
                    "==",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "slackclient",
            "specs": [
                [
                    "==",
                    "1.0.7"
                ]
            ]
        },
        {
            "name": "SQLAlchemy",
            "specs": [
                [
                    "==",
                    "1.1.13"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.22"
                ]
            ]
        },
        {
            "name": "websocket-client",
            "specs": [
                [
                    "==",
                    "0.44.0"
                ]
            ]
        },
        {
            "name": "Werkzeug",
            "specs": [
                [
                    "==",
                    "0.12.2"
                ]
            ]
        },
        {
            "name": "zaifapi",
            "specs": [
                [
                    "==",
                    "1.5.5"
                ]
            ]
        }
    ],
    "author": "AkiraTaniguchi DaikiShiroi Monji",
    "home_page": "https://github.com/techbureau/zaifbot",
    "github_user": "techbureau",
    "download_url": "https://pypi.python.org/packages/ec/ce/5abd6e57030f7d3558b01035582aa4db46500a03f60dd23f443f18150438/zaifbot-0.0.8.tar.gz",
    "platform": "",
    "version": "0.0.8",
    "cheesecake_documentation_id": null,
    "description": "ZaifBot\n=======\n\n:chart\\_with\\_upwards\\_trend: algorithmic trading bot for zaif exchange\n\n|Python version| |PyPI version| |License: MIT|\n\n| ZaifBot is a Pythonic algorithmic trading library that run on `Zaif\n  Exchange <https://zaif.jp/?lang=en>`__.\n| It is developed by using Python 3.5.3 and tested in Python 3.4, 3.5,\n  3.6.\n\nFeatures\n--------\n\n-  Easy to use: Zaifbot is library for trading beginners, so designed\n   simple.\n-  Support all currency pairs dealt with `Zaif\n   Exchange <https://zaif.jp/?lang=en>`__\n-  Technical indicators like SMA, EMA, Bollinger Bands, RSI, ADX\n-  You don't have to prepare market data. Zaifbot internal get data from\n   `zaif\n   API <http://techbureau-api-document.readthedocs.io/ja/latest/index.html>`__\n\n| To get started with Zaifbot take a look at the\n  `tutorial <https://github.com/techbureau/zaifbot/wiki/%E3%83%81%E3%83%A5%E3%83%BC%E3%83%88%E3%83%AA%E3%82%A2%E3%83%AB1>`__\n  and the `full\n  documentation <https://github.com/techbureau/zaifbot/wiki>`__.\n| `\u300eZaifBot\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u300f <https://github.com/techbureau/zaifbot/wiki>`__\n\n**Note:** ZaifBot is unofficial library of `Tech Bureau,\nInc. <http://techbureau.jp/>`__ Please use it at your own risk.\n\nInstallation\n------------\n\ninstaling with pip\n~~~~~~~~~~~~~~~~~~\n\nAfter activating an isolated Python environment, run\n\n.. code:: bash\n\n    $ pip install zaifbot\n\ncurrently supported platforms includes:\n\n-  Linux 64-bits\n-  OSX 64-bits\n-  Windows 64-bits\n\n**Note:** if you use **OSX**, we assume\n`homebrew <https://brew.sh/index.html>`__ is installed.\n\nSetup\n-----\n\nAfter installing Zaifbot, run\n\n.. code:: bash\n\n    $ install_ta_lib\n\n| TA-Lib is open-source library of technical analysis indicators that\n  ZaifBot is depending on.\n| This command install TA-Lib in your operating system.\n\nthen,\n\n.. code:: bash\n\n    $ init_database\n\n| When ``init_database`` command is executed,\n| ``db/zaifbot.db`` is created for SQLite and schema is migrated.\n| Your Trade records will be saved in this file.\n\nQuick Start\n-----------\n\nSee our `getting started\ntutorial <https://github.com/techbureau/zaifbot/wiki/%E3%83%81%E3%83%A5%E3%83%BC%E3%83%88%E3%83%AA%E3%82%A2%E3%83%AB1>`__\n\nThe following code implements a simple trading algorithm using zaifbot\n\n.. code:: python\n\n    from zaifbot.trade import Strategy\n    from zaifbot.rules import Entry, Exit\n    from zaifbot.config import set_keys\n    from zaifbot.trade.tools import last_price\n\n    # setting your Zaif API key\n    set_keys(key='your_key', secret='your_secret')\n\n\n    # creating rule to buy\n    class BuyWhenCheap(Entry):\n        def can_entry(self):\n            if last_price(self._currency_pair.name) < 25000:\n                return True\n            return False\n\n    # creating rule to exit\n    class ExitWhenPriceGoUp(Exit):\n        def can_exit(self, trade):\n            # 'trade' has the entry information\n            current_price = last_price(trade.currency_pair.name)\n            if current_price > trade.entry_price + 5000:\n                return True\n            return False\n\n    my_entry = BuyWhenCheap(currency_pair='btc_jpy',\n                            amount=0.01,\n                            action='bid')\n    my_exit = ExitWhenPriceGoUp()\n\n    # strategy is an unite of automated trading\n    my_strategy = Strategy(entry_rule=my_entry,\n                           exit_rule=my_exit)\n\n    my_strategy.start(sec_wait=1)\n\nFeedback\n--------\n\nIf you have a question, or find a bug, feel free to open an issue.\n\nContributing\n------------\n\n| Any kind of contributions are welcome.\n| Please contribute by following the steps below.\n\n1. Fork and clone this repository to your computer\n2. Run ``docker build -t zaifbot .`` to create development environment\n3. Edit source code and make pull request to ``depelop`` branch\n\n.. |Python version| image:: https://img.shields.io/badge/python-3.4%2C%203.5%2C%203.6-blue.svg\n   :target: https://pypi.python.org/pypi/zaifbot\n.. |PyPI version| image:: https://badge.fury.io/py/zaifbot.svg\n   :target: https://badge.fury.io/py/zaifbot\n.. |License: MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg\n   :target: https://opensource.org/licenses/MIT\n",
    "lcname": "zaifbot",
    "name": "zaifbot",
    "github": true,
    "coveralls": false,
    "bugtrack_url": null,
    "license": "MIT",
    "travis_ci": false,
    "github_project": "zaifbot",
    "summary": "trading bot framework for zaif exchange",
    "split_keywords": [
        "zaif",
        "bit",
        "coin",
        "btc",
        "xem",
        "mona",
        "jpy",
        "virtual",
        "currency",
        "block",
        "chain",
        "bot"
    ],
    "author_email": "a.taniguchi@techbureau.jp daikishiroi@gmail.com",
    "urls": [
        {
            "has_sig": false,
            "upload_time": "2017-09-05T07:00:23",
            "comment_text": "",
            "python_version": "source",
            "url": "https://pypi.python.org/packages/ec/ce/5abd6e57030f7d3558b01035582aa4db46500a03f60dd23f443f18150438/zaifbot-0.0.8.tar.gz",
            "md5_digest": "dd54f57252908a5d41c1d2acd6ee3973",
            "downloads": 0,
            "filename": "zaifbot-0.0.8.tar.gz",
            "packagetype": "sdist",
            "path": "ec/ce/5abd6e57030f7d3558b01035582aa4db46500a03f60dd23f443f18150438/zaifbot-0.0.8.tar.gz",
            "size": 6335028
        }
    ],
    "cheesecake_installability_id": null
}
        
Elapsed time: 0.10211s