GithubHelp home page GithubHelp logo

whitepoplar022 / binance-trader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yasinkuyu/binance-trader

0.0 2.0 0.0 3.87 MB

๐Ÿ’ฐ Cryptocurrency Trading Bot for Binance (Experimental)

Python 100.00%

binance-trader's Introduction

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

     [โœ“] 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

     API key for account access
     api_key = ''
     Secret key for account access
     api_secret = ''
    
     [API Docs](https://www.binance.com/restapipub.html) 
    
  6. Optional: run as an excutable application in Docker containers

Requirements

sudo pip install requests

Python 2.7
    import os
    import sys
    import time
    import config
    import argparse
    import threading
    import sqlite3

Usage

python trader.py --symbol XVGBTC

Example parameters

# Profit mode (default)
python trader.py --symbol XVGBTC --quantity 300 --profit 1.3
or by amount
python trader.py --symbol XVGBTC --amount 0.0022 --profit 3

# Range mode
python trader.py --symbol XVGBTC --mode range --quantity 300 --buyprice 0.00000780 --sellprice 0.00000790
or by amount
python trader.py --symbol XVGBTC --mode range --amount 0.0022 --buyprice 0.00000780 --sellprice 0.00000790

--quantity     Buy/Sell Quantity (default 0) (If zero, auto calc)
--amount       Buy/Sell BTC Amount (default 0)
--symbol       Market Symbol (default XVGBTC or XVGETH)
--profit       Target Profit Percentage (default 1.3)
--stop_loss    Decrease sell price at loss Percentage (default 0)
--orderid      Target Order Id (default 0)
--wait_time    Wait Time (seconds) (default 0.7)
--increasing   Buy Price Increasing  +(default 0.00000001)
--decreasing   Sell Price Decreasing -(default 0.00000001)
--prints       Scanning Profit Screen Print (default True)
--loop         Loop (default 0 unlimited)

--mode         Working modes profit or range (default profit)
               profit: Profit Hunter. Find defined profit, buy and sell. (Ex: 1.3% profit)
               range: Between target two price, buy and sell. (Ex: <= 0.00000780 buy - >= 0.00000790 sell )
               
--buyprice     Buy price (Ex: 0.00000780)
--sellprice    Buy price (Ex: 0.00000790)

Symbol structure;
    XXXBTC  (Bitcoin)
    XXXETH  (Ethereum)
    XXXBNB  (Binance Coin)
    XXXUSDT (Tether)

All binance symbols are supported.

Every coin can be different in --profit and --quantity.
If quantity is empty --quantity is automatically calculated to the minimum qty.

Variations;
    trader.py --symbol TBNBTC --quantity 50 --profit 3
    trader.py --symbol NEOBTC --amount 0.1 --profit 1.1
    trader.py --symbol ETHUSDT --quantity 0.3 --profit 1.5
    ...

Run in a Docker container

docker build -t trader .

docker run trader

DISCLAIMER

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

Contributing

Fork this Repo
Commit your changes (git commit -m 'Add some feature')
Push to the changes (git push)
Create a new Pull Request

Thanks all for your contributions...

Contributors
    @WeSpeakCrypto
    @afoke
    @omerfarukz
    @plgonzalezrx8

Troubleshooting

Filter failure: MIN_NOTIONAL
https://support.binance.com/hc/en-us/articles/115000594711-Trading-Rule

Filter failure: PRICE_FILTER
https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md

Timestamp for this request was 1000ms ahead of the server's time.
https://github.com/yasinkuyu/binance-trader/issues/63#issuecomment-355857901

Roadmap

- MACD indicator (buy/sell)
- Stop-Loss implementation
- Working modes
  - profit: Find defined profit, buy and sell. (Ex: 1.3% profit)
  - range:  Between target two price, buy and sell. (Ex: <= 0.00100 buy - >= 0.00150 sell )
- Binance/Bittrex/HitBTC Arbitrage  

...

- October 7, 2017 Beta
- January 6, 2018 RC
- January 15, 2018 RC 1
- January 20, 2018 RC 2

License

Code released under the MIT License.


binance-trader's People

Contributors

yasinkuyu avatar ykartal avatar omerfarukz avatar piscue avatar plgonzalezrx8 avatar

Watchers

James Cloos avatar ่ฎฐๅฟ†่€… avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.