项目作者: yasinkuyu

项目描述 :
💰 Cryptocurrency Trading Bot for Binance (Experimental)
高级语言: Python
项目地址: git://github.com/yasinkuyu/binance-trader.git
创建时间: 2017-10-06T21:22:47Z
项目社区:https://github.com/yasinkuyu/binance-trader

开源协议:

下载


Binance Trader (RC 2)

This is an experimental bot for auto trading the binance.com exchange. @yasinkuyu

Screenshot

Configuration

  1. Signup for Binance
  2. Enable Two-factor Authentication
  3. Go API Center, Create New Api Key

    1. [✓] Read Info [✓] Enable Trading [X] Enable Withdrawals
  4. Rename config.sample.py to config.py / orders.sample.db to orders.db

  5. Get an API and Secret Key, insert into config.py

    1. API key for account access
    2. api_key = ''
    3. Secret key for account access
    4. api_secret = ''
    5. [API Docs](https://www.binance.com/restapipub.html)
  6. Optional: Modify recv_window value (not recommended)

  7. Optional: run as an excutable application in Docker containers

Support

https://www.binance.com/?ref=10701111

Requirements

  1. sudo pip install requests
  2. Python 3
  3. import os
  4. import sys
  5. import time
  6. import config
  7. import argparse
  8. import threading
  9. import sqlite3

Usage (trading module)

  1. python trader.py --symbol XVGBTC
  2. Example parameters
  3. # Profit mode (default)
  4. python trader.py --symbol XVGBTC --quantity 300 --profit 1.3
  5. or by amount
  6. python trader.py --symbol XVGBTC --amount 0.0022 --profit 3
  7. # Range mode
  8. python trader.py --symbol XVGBTC --mode range --quantity 300 --buyprice 0.00000780 --sellprice 0.00000790
  9. or by amount
  10. python trader.py --symbol XVGBTC --mode range --amount 0.0022 --buyprice 0.00000780 --sellprice 0.00000790
  11. --quantity Buy/Sell Quantity (default 0) (If zero, auto calc)
  12. --amount Buy/Sell BTC Amount (default 0)
  13. --symbol Market Symbol (default XVGBTC or XVGETH)
  14. --profit Target Profit Percentage (default 1.3)
  15. --stop_loss Decrease sell price at loss Percentage (default 0)
  16. --orderid Target Order Id (default 0)
  17. --wait_time Wait Time (seconds) (default 0.7)
  18. --increasing Buy Price Increasing +(default 0.00000001)
  19. --decreasing Sell Price Decreasing -(default 0.00000001)
  20. --prints Scanning Profit Screen Print (default True)
  21. --loop Loop (default 0 unlimited)
  22. --mode Working modes profit or range (default profit)
  23. profit: Profit Hunter. Find defined profit, buy and sell. (Ex: 1.3% profit)
  24. range: Between target two price, buy and sell. (Ex: <= 0.00000780 buy - >= 0.00000790 sell )
  25. --buyprice Buy price (Ex: 0.00000780)
  26. --sellprice Buy price (Ex: 0.00000790)
  27. Symbol structure;
  28. XXXBTC (Bitcoin)
  29. XXXETH (Ethereum)
  30. XXXBNB (Binance Coin)
  31. XXXUSDT (Tether)
  32. All binance symbols are supported.
  33. Every coin can be different in --profit and --quantity.
  34. If quantity is empty --quantity is automatically calculated to the minimum qty.
  35. Variations;
  36. trader.py --symbol TBNBTC --quantity 50 --profit 3
  37. trader.py --symbol NEOBTC --amount 0.1 --profit 1.1
  38. trader.py --symbol ETHUSDT --quantity 0.3 --profit 1.5
  39. ...

Usage (balances module)

  1. python balance.py

Run in a Docker container

  1. docker build -t trader .
  2. docker run trader

DISCLAIMER

  1. I am not responsible for anything done with this bot.
  2. You use it at your own risk.
  3. There are no warranties or guarantees expressed or implied.
  4. You assume all responsibility and liability.

Contributing

  1. Fork this Repo
  2. Commit your changes (git commit -m 'Add some feature')
  3. Push to the changes (git push)
  4. Create a new Pull Request
  5. Thanks all for your contributions...
  6. Contributors
  7. @WeSpeakCrypto
  8. @afoke
  9. @omerfarukz
  10. @plgonzalezrx8

Troubleshooting

  1. Filter failure: MIN_NOTIONAL
  2. https://support.binance.com/hc/en-us/articles/115000594711-Trading-Rule
  3. Filter failure: PRICE_FILTER
  4. https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md
  5. Timestamp for this request was 1000ms ahead of the server's time.
  6. https://github.com/yasinkuyu/binance-trader/issues/63#issuecomment-355857901

Roadmap

  1. - MACD indicator (buy/sell)
  2. - Stop-Loss implementation
  3. - Working modes
  4. - profit: Find defined profit, buy and sell. (Ex: 1.3% profit)
  5. - range: Between target two price, buy and sell. (Ex: <= 0.00100 buy - >= 0.00150 sell )
  6. - Binance/Bittrex/HitBTC Arbitrage
  7. ...
  8. - October 7, 2017 Beta
  9. - January 6, 2018 RC
  10. - January 15, 2018 RC 1
  11. - January 20, 2018 RC 2

License

Code released under the MIT License.