当前位置: 首页 > 软件库 > Web3 > 开源货币/比特币 >

binance-trader

授权协议 Readme
开发语言 Python
所属分类 Web3、 开源货币/比特币
软件类型 开源软件
地区 不详
投 递 者 云鸿达
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

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.


  • 概念解释 法币:法定货币,例如人民币,美元等 usdt:等同于美元的数字代币,兑换比率1:1 现货账户: 又叫做币币账户,主要的作用就是用于数字货币与数字货币的兑换,例如usdt兑换比特币 c2c账户: 又叫做法币账户,主要的作用就是法币与数字货币的兑换,例如人民币兑换比特币 限价单:就是你指定多少价格买这个东西,如果没有低于这个价钱的就不成交 市价单:你只要指定要买的数量,自动用目前挂价的最便宜

  • binance的python API:python-binance C++的API :binance-cpp binance的academy orderbook binance的测试API https://testnet.binance.vision/ binance-tutorials binance-testnet tradingview

 相关资料
  • binance Node.js connector for the Binance APIs and WebSockets, with TypeScript & browser support. Heavy integration testing with real API calls to support implementation stability. Support REST APIs f

  • Node Binance Trader NBT NBT is a Cryptocurrency Trading Strategy & Portfolio Management Development Framework for Binance. Table of contents Documentation �� Technical overview ��‍�� Disclaimer �� Don

  • go-binance A Golang SDK for binance API. All the REST APIs listed in binance API document are implemented, as well as the websocket APIs. For best compatibility, please use Go >= 1.8. Make sure you ha

  • Binance Trading Bot Automated Binance trading bot with trailing buy/sell strategy This is a test project. I am just testing my code. Warnings I cannot guarantee whether you can make money or not. So u

  • Binance to Google Sheets! A lightweight Google Spreadsheets Add-On to GET data directly from Binance API without any intermediaries! This add-on is basically an API client specially hand-crafted to wo

  • 我有一个关于加密市场Binance的问题。他们有公共api,我想我可以用它来创建交易应用程序。 但是我有一些麻烦。使用chrome中的链接,我得到json结果。https://api.binance.com/api/v1/exchangeInfo 但使用角4 http pClient: 我有错误:跨原点请求被阻止:相同原点策略不允许读取远程资源在api.binance.com/api/v1/exc