SystemSelf reportedCryptoPythonarbitragebinancebitcoinbtccryptocurrency

binance-trader

πŸ’° Cryptocurrency Trading Bot for Binance (Experimental)

System Structure

Data Used
Binance가격/κ±°λž˜λŸ‰ 데이터
Rules / Strategy

μ €μž₯μ†Œλ³„ μ „λž΅/μ‹€ν–‰ 쑰건 확인 ν•„μš”

Execution

κ±°λž˜μ†Œ API 기반 μžλ™ μ£Όλ¬Έ μ‹€ν–‰

Editor Summary

μ €μž₯μ†Œ μ„€λͺ…κ³Ό 곡개 메타데이터 κΈ°μ€€μœΌλ‘œ Python 기반 κ΅¬ν˜„, μ•”ν˜Έν™”ν 거래 봇, κ±°λž˜μ†Œ API/ν”„λ ˆμž„μ›Œν¬, 차읡거래 μ„±κ²©μ˜ ν”„λ‘œμ νŠΈλ‘œ νŒŒμ•…ν–ˆμŠ΅λ‹ˆλ‹€. 확인 κ·Όκ±°λŠ” README, μ €μž₯μ†Œ ν† ν”½, μ €μž₯μ†Œ μ„€λͺ…, GitHub μ§€ν‘œ, νŒŒμ΄ν”„λΌμΈ ν•„λ“œμ΄λ©°, μ£Όμš” λ°μ΄ν„°λŠ” Binance, 가격/κ±°λž˜λŸ‰ λ°μ΄ν„°μž…λ‹ˆλ‹€. μ „λž΅/μ‹€ν–‰ 쑰건은 μ €μž₯μ†Œλ³„ λ¬Έμ„œμ™€ μ½”λ“œ 확인이 ν•„μš”ν•˜λ©°, μ‹€ν–‰ 방식은 "κ±°λž˜μ†Œ API 기반 μžλ™ μ£Όλ¬Έ μ‹€ν–‰"라고 보수적으둜 κΈ°λ‘ν–ˆμŠ΅λ‹ˆλ‹€. GitHub μ§€ν‘œλŠ” 별 2735개, 포크 827κ°œμž…λ‹ˆλ‹€.

Repositoryyasinkuyu/binance-trader
Creatoryasinkuyu
Stars / Forksβ˜… 2735 / 827
Last Updated2026-01-03
Snapshot Date2026-07-08 (README below is a copy from this date)

This is third-party open-source code. QuantField does not guarantee its behavior or safety. Review the code before installing or running it.

README

Binance Trader (v1.1.0)

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

Screenshot

Changelog

v1.1.0 (2026-01-01)

  • πŸ› Fixed: Bot not selling after buy order filled (#66, #134, #166)
  • πŸ› Fixed: KeyError when API returns error (#139, #154)
  • πŸ› Fixed: LOT_SIZE filter precision issues (#159)
  • πŸ› Fixed: Partially filled orders now correctly calculate sell quantity (#133, #178, #200)
  • πŸ› Fixed: NameError for undefined sell_price variable (#172)
  • πŸ”’ Improved: Thread safety with proper locking mechanism
  • ⚑ Improved: Better exception handling throughout the codebase

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 differ