• Stars
    star
    2,429
  • Rank 18,233 (Top 0.4 %)
  • Language
    Python
  • Created over 6 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

💰 Cryptocurrency Trading Bot for Binance (Experimental)

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: Modify recv_window value (not recommended)

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

Support

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

Requirements

sudo pip install requests

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

Usage (trading module)

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
    ...

Usage (balances module)

python balance.py

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.


More Repositories

1

omnipay-nestpay

NestPay (EST) (İş Bankası, Akbank, Finansbank, Denizbank, Kuveytturk, Halkbank, Anadolubank, ING Bank, Citibank, Cardplus, Ziraat Bankası) gateway for Omnipay payment processing library
PHP
67
star
2

NetDash

Small web-based monitoring dashboard for windows in C# and MVC
C#
66
star
3

brackets-tools

Brackets developer tools extension
JavaScript
62
star
4

Turkish.php

Turkish Suffix Library for PHP - Türkçe Çekim ve Yapım Ekleri
PHP
60
star
5

Turkish.js

Turkish Suffix Library for Javascript - Türkçe Çekim ve Yapım Ekleri
JavaScript
41
star
6

Localization

🔥 Create multi-language structure with ASP.NET MVC
C#
39
star
7

brackets-units

Brackets Inline Units Conversion Extension (px to em /em to px etc.)
JavaScript
37
star
8

Turkish.cs

Turkish Suffix Library for C# & .NET- Türkçe Çekim ve Yapım Ekleri
C#
24
star
9

omnipay-gvp

GVP (Garanti, Denizbank, TEB, ING, Åžekerbank, TFKB) gateway for Omnipay payment processing library
PHP
23
star
10

omnipay-posnet

Posnet (Yapı Kredi, Vakıfbank, Anadolubank) gateway for Omnipay payment processing library
PHP
20
star
11

omnipay-paratika

Paratika (Asseco) MOTO/3D gateway for Omnipay payment processing library
PHP
14
star
12

omnipay-bkm

BKM Express gateway for Omnipay payment processing library
PHP
12
star
13

omnipay-iyzico

Iyzico gateway for Omnipay payment processing library
PHP
11
star
14

omnipay-paytr

PayTR (Bonus, World, Axess, Cardfinans, Maximum, AsyaCard, Paraf sanal pos) gateway for Omnipay payment processing library
PHP
7
star
15

coinekonomiwp

CryptoCompare.com real time CryptoCurrency list with vuejs (Wordpress plugin)
JavaScript
4
star
16

brackets-newdoc

Brackets new html5 document extension
JavaScript
4
star
17

pos_api_docs

İşbank Api ve Halk Bank Dökümanları
ASP
4
star
18

brackets-atom-dark

GitHub Atom editor default dark theme (Adobe Brackets Theme Extension)
CSS
3
star
19

Girogate

NestPay GiroGate dökümanlar
3
star
20

YemekSepetiApi

Yemeksepeti.com Company List (JSON or CSV)
PHP
2
star
21

Uniform-Chart-of-Accounts

The Uniform Chart of Accounts (Muhasebe Tek Düzen Hesap Planı) tr/en
HTML
2
star
22

Bijou

Bijou Minimal CSS Sprites, Icon Set
CSS
2
star
23

PayU-TR

PayU TR CS Cart 3.x / 4.x Payment Processor
PHP
2
star
24

InStats

A fast, very simple statistics script for PHP
PHP
1
star
25

vscode-google-translate

A extension uses to translate words between english and turkish by Google Translate.
JavaScript
1
star
26

Sanal-Pos-Turk

Türkiye'de sanal pos hizmeti veren bankalar için ödeme kütüphaneleri.
1
star
27

vscode-units

VSCode Inline Units Conversion Extension (px to em /em to px etc.)
JavaScript
1
star
28

InStats-WP

A fast, very simple statistics script for Wordpress
1
star
29

PayTR-Opencart-4

PayTR Opencart 4 payment processor (Iframe)
PHP
1
star
30

Detube-Video-for-AMP

Wordpress Detube Theme video for AMP Plugin
PHP
1
star
31

Opencart-Barcode-System

Opencart Barcode & Label Print System
PHP
1
star