Simple-Binance-Trader
This is a simple trading bot for the binance exchange.
시스템 구조
저장소별 전략/실행 조건 확인 필요
거래소 API 기반 자동 주문 실행
에디터 요약저장소 설명과 공개 메타데이터 기준으로 Python 기반 구현, 암호화폐 거래 봇, 거래소 API/프레임워크, 기술적 분석 성격의 프로젝트로 파악했습니다. 확인 근거는 README, 저장소 토픽, 저장소 설명, GitHub 지표, 파이프라인 필드이며, 주요 데이터는 Binance, OHLCV/호가/체결 데이터입니다. 전략/실행 조건은 저장소별 문서와 코드 확인이 필요하며, 실행 방식은 "거래소 API 기반 자동 주문 실행"라고 보수적으로 기록했습니다. GitHub 지표는 별 200개, 포크 64개입니다.
| 저장소 | EasyAI/Simple-Binance-Trader |
|---|---|
| 제작자 | EasyAI |
| 스타 / 포크 | ★ 200 / 64 |
| 라이선스 | MIT |
| 최근 업데이트 | 2021-09-13 |
| 스냅샷 시점 | 2026-07-08 (아래 README는 이 시점의 사본입니다) |
아래는 제3자가 작성·공개한 오픈소스 코드입니다. QuantField는 해당 코드의 동작과 안전성을 보증하지 않으며, 설치·실행 전 코드를 직접 검토하시기 바랍니다.
README
Simple Binance Trader
Disclaimer
I am not responsible for the trades you make with the script, this script has not been exstensivly tested on live trades.
Please check the following:
- Make sure your account uses BNB for the trade fees and that you have plenty of BNB for the trader to use for trades as if not there will be issues with the trader.
- Please clear any cache files when updating the trader as there may be issues if not.
- Please if any updates are also available for binance_api or the technical indicators update those also.
NOTE: The current strtergy is also very weak and will mostlikley return only losses therefore I recomend you create your work or use some which would work. However the trader currently also does not support simulated trades and only support live trading, simulated trades should be added in the future so you may need to wait until then to use this to test stratergies.
NOTE: Trader now supports MARGIN trades allowing the placement of short and long positions. If SPOT trading put your conditions within the "long_entry/long_exit" sections within the trader_configuration.py file.
Description
This is a simple binance trader that uses the REST api and sockets to allow automation or manipulation of account detail/data. The script which in the default configuration uses a basic MACD trading setup to trade. The script however is very customisable and you'll be able to configure it as you with via the help of the document in the usage section.
Repository Contains:
- run.py : This is used to start/setup the bot.
- trader_configuration.py : Here is where you write your conditions using python logic.
- patterns.py : Can be used to trade based on specific patterns.
- Core
- botCore.py : Is used to manage the socket and trader as well as pull data to be displayed.
- trader.py : The main trader inchage or updating and watching orders.
- static : Folder for static files for the website (js/css).
- templates : Folder for HTML page templates.
Setting File:
- PUBLIC_KEY - Your public binanace api key
- PRIVATE_KEY - Your private binanace api key
- IS_TEST - Allow trader to be run in test mode (True/False)
- MARKET_TYPE - Market type to be traded (SPOT/MARGIN)
- UPDATE_BNB_BALANCE - Automatically update the BNB balance when low (for trading fees, only applicable to real trading)
- TRADER_INTERVAL - Interval used for the trader (1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d).
- TRADING_CURRENCY - The currency max the trader will use (in the quote key) also note this scales up with the number of markets i.e. 2 pairs each market will have 0.0015 as their trading currency pair.
- TRADING_MARKETS - The markets that are being traded and seperate with ',' (BTC-ETH,BTC-NEO)
- HOST_IP - The host IP for the web UI (if left blank default is 127.0.0.1)
- HOST_PORT - The host port for the web UI (if left blank default is 5000)
- MAX_CANDLES - Max candles the trader will use (if left brank default is 500)
- MAX_DEPTH - Max market depth the trader will use (if left brank default is 50)
Usage
I recommend setting this all up within a virtual python enviornment: First get the base modules:
- To quickly install all the required modules use 'pip3 install -r requirements'.
Secondly get the required techinal indicators module adn binance api.
- https://github.com/EasyAI/binance_api, This is the binance API that the trader uses.
- https://github.com/EasyAI/Python-Charting-Indicators, This contain