|
1 | | -# Yeah |
| 1 | +# Binance Trader (RC 2) |
2 | 2 |
|
3 | | -Ruby video game framework, work in progress |
| 3 | +This is an experimental bot for auto trading the binance.com exchange. [@yasinkuyu](https://twitter.com/yasinkuyu) |
4 | 4 |
|
5 | | -[Games & demos](https://github.com/yeahrb/yeah/wiki/Games-&-demos) |
| 5 | + |
6 | 6 |
|
7 | | -[Latest release (0.4.2)](https://github.com/yeahrb/yeah/tree/0.4.2#readme) |
| 7 | +## Configuration |
8 | 8 |
|
9 | | -## Platforms |
| 9 | +1. [Signup](https://www.binance.com/?ref=10701111) for Binance |
| 10 | +2. Enable Two-factor Authentication |
| 11 | +3. Go API Center, [Create New](https://www.binance.com/en/my/settings/api-management?ref=10701111) Api Key |
10 | 12 |
|
11 | | -[Web](https://github.com/yeahrb/yeah-web) |
| 13 | + [✓] Read Info [✓] Enable Trading [X] Enable Withdrawals |
| 14 | + |
| 15 | +4. Rename **config.sample.py** to `config.py` / **orders.sample.db** to `orders.db` |
| 16 | +5. Get an API and Secret Key, insert into `config.py` |
| 17 | + |
| 18 | + API key for account access |
| 19 | + api_key = '' |
| 20 | + Secret key for account access |
| 21 | + api_secret = '' |
| 22 | + |
| 23 | + [API Docs](https://www.binance.com/restapipub.html) |
| 24 | + |
| 25 | +6. Optional: Modify recv_window value (not recommended) |
| 26 | + |
| 27 | +7. Optional: run as an excutable application in Docker containers |
| 28 | + |
| 29 | +## Support |
| 30 | + |
| 31 | +[https://www.binance.com/?ref=10701111](https://www.binance.com/?ref=10701111) |
| 32 | + |
| 33 | +## Requirements |
| 34 | + |
| 35 | + sudo pip install requests |
| 36 | + |
| 37 | + Python 3 |
| 38 | + import os |
| 39 | + import sys |
| 40 | + import time |
| 41 | + import config |
| 42 | + import argparse |
| 43 | + import threading |
| 44 | + import sqlite3 |
| 45 | + |
| 46 | +## Usage (trading module) |
| 47 | + |
| 48 | + python trader.py --symbol XVGBTC |
| 49 | + |
| 50 | + Example parameters |
| 51 | + |
| 52 | + # Profit mode (default) |
| 53 | + python trader.py --symbol XVGBTC --quantity 300 --profit 1.3 |
| 54 | + or by amount |
| 55 | + python trader.py --symbol XVGBTC --amount 0.0022 --profit 3 |
| 56 | + |
| 57 | + # Range mode |
| 58 | + python trader.py --symbol XVGBTC --mode range --quantity 300 --buyprice 0.00000780 --sellprice 0.00000790 |
| 59 | + or by amount |
| 60 | + python trader.py --symbol XVGBTC --mode range --amount 0.0022 --buyprice 0.00000780 --sellprice 0.00000790 |
| 61 | + |
| 62 | + --quantity Buy/Sell Quantity (default 0) (If zero, auto calc) |
| 63 | + --amount Buy/Sell BTC Amount (default 0) |
| 64 | + --symbol Market Symbol (default XVGBTC or XVGETH) |
| 65 | + --profit Target Profit Percentage (default 1.3) |
| 66 | + --stop_loss Decrease sell price at loss Percentage (default 0) |
| 67 | + --orderid Target Order Id (default 0) |
| 68 | + --wait_time Wait Time (seconds) (default 0.7) |
| 69 | + --increasing Buy Price Increasing +(default 0.00000001) |
| 70 | + --decreasing Sell Price Decreasing -(default 0.00000001) |
| 71 | + --prints Scanning Profit Screen Print (default True) |
| 72 | + --loop Loop (default 0 unlimited) |
| 73 | + |
| 74 | + --mode Working modes profit or range (default profit) |
| 75 | + profit: Profit Hunter. Find defined profit, buy and sell. (Ex: 1.3% profit) |
| 76 | + range: Between target two price, buy and sell. (Ex: <= 0.00000780 buy - >= 0.00000790 sell ) |
| 77 | + |
| 78 | + --buyprice Buy price (Ex: 0.00000780) |
| 79 | + --sellprice Buy price (Ex: 0.00000790) |
| 80 | + |
| 81 | + Symbol structure; |
| 82 | + XXXBTC (Bitcoin) |
| 83 | + XXXETH (Ethereum) |
| 84 | + XXXBNB (Binance Coin) |
| 85 | + XXXUSDT (Tether) |
| 86 | + |
| 87 | + All binance symbols are supported. |
| 88 | + |
| 89 | + Every coin can be different in --profit and --quantity. |
| 90 | + If quantity is empty --quantity is automatically calculated to the minimum qty. |
| 91 | + |
| 92 | + Variations; |
| 93 | + trader.py --symbol TBNBTC --quantity 50 --profit 3 |
| 94 | + trader.py --symbol NEOBTC --amount 0.1 --profit 1.1 |
| 95 | + trader.py --symbol ETHUSDT --quantity 0.3 --profit 1.5 |
| 96 | + ... |
| 97 | + |
| 98 | +## Usage (balances module) |
| 99 | + |
| 100 | + python balance.py |
| 101 | + |
| 102 | +## Run in a Docker container |
| 103 | + |
| 104 | + docker build -t trader . |
| 105 | + |
| 106 | + docker run trader |
| 107 | + |
| 108 | +## DISCLAIMER |
| 109 | + |
| 110 | + I am not responsible for anything done with this bot. |
| 111 | + You use it at your own risk. |
| 112 | + There are no warranties or guarantees expressed or implied. |
| 113 | + You assume all responsibility and liability. |
| 114 | + |
| 115 | +## Contributing |
| 116 | + |
| 117 | + Fork this Repo |
| 118 | + Commit your changes (git commit -m 'Add some feature') |
| 119 | + Push to the changes (git push) |
| 120 | + Create a new Pull Request |
| 121 | + |
| 122 | + Thanks all for your contributions... |
| 123 | + |
| 124 | + Contributors |
| 125 | + @WeSpeakCrypto |
| 126 | + @afoke |
| 127 | + @omerfarukz |
| 128 | + @plgonzalezrx8 |
| 129 | + |
| 130 | +## Troubleshooting |
| 131 | + |
| 132 | + Filter failure: MIN_NOTIONAL |
| 133 | + https://support.binance.com/hc/en-us/articles/115000594711-Trading-Rule |
| 134 | + |
| 135 | + Filter failure: PRICE_FILTER |
| 136 | + https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md |
| 137 | + |
| 138 | + Timestamp for this request was 1000ms ahead of the server's time. |
| 139 | + https://github.com/yasinkuyu/binance-trader/issues/63#issuecomment-355857901 |
| 140 | + |
| 141 | +## Roadmap |
| 142 | + |
| 143 | + - MACD indicator (buy/sell) |
| 144 | + - Stop-Loss implementation |
| 145 | + - Working modes |
| 146 | + - profit: Find defined profit, buy and sell. (Ex: 1.3% profit) |
| 147 | + - range: Between target two price, buy and sell. (Ex: <= 0.00100 buy - >= 0.00150 sell ) |
| 148 | + - Binance/Bittrex/HitBTC Arbitrage |
| 149 | + |
| 150 | + ... |
| 151 | + |
| 152 | + - October 7, 2017 Beta |
| 153 | + - January 6, 2018 RC |
| 154 | + - January 15, 2018 RC 1 |
| 155 | + - January 20, 2018 RC 2 |
| 156 | + |
| 157 | +## License |
| 158 | + |
| 159 | +Code released under the [MIT License](https://opensource.org/licenses/MIT). |
| 160 | + |
| 161 | +--- |
0 commit comments