trading bot framework for zaif exchange
Project description
- chart_with_upwards_trend:
algorithmic trading bot for zaif exchange
Features
Easy to use: Zaifbot is library for trading beginners, so designed simple.
Support all currency pairs dealt with Zaif Exchange
Technical indicators like SMA, EMA, Bollinger Bands, RSI, ADX
You don’t have to prepare market data. Zaifbot internal get data from zaif API
Note: ZaifBot is unofficial library of Tech Bureau, Inc. Please use it at your own risk.
Installation
instaling with pip
After activating an isolated Python environment, run
$ pip install zaifbot
currently supported platforms includes:
Linux 64-bits
OSX 64-bits
Windows 64-bits
Note: if you use OSX, we assume homebrew is installed.
Setup
After installing Zaifbot, run
$ install_ta_lib
then,
$ init_database
Quick Start
See our getting started tutorial
The following code implements a simple trading algorithm using zaifbot
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
Fork and clone this repository to your computer
Run docker build -t zaifbot . to create development environment
Edit source code and make pull request to depelop branch
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file zaifbot-0.0.8.tar.gz
.
File metadata
- Download URL: zaifbot-0.0.8.tar.gz
- Upload date:
- Size: 6.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43fc13f6a844e9e980b32ea2a9dae9dec7d2b72876b8c9a831e7753a91eecd29 |
|
MD5 | dd54f57252908a5d41c1d2acd6ee3973 |
|
BLAKE2b-256 | ecce5abd6e57030f7d3558b01035582aa4db46500a03f60dd23f443f18150438 |