Skip to content

AndreaZero/binance-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binance Stream Monitor

Features

  • ✅ Real-time trade stream for any cryptocurrency pair
  • ✅ Ticker stream with current price, 24h changes, high/low and volume
  • ✅ Professional colored terminal visualization
  • ✅ Modular and scalable architecture for future features
  • ✅ Automatic error handling and reconnection
  • ✅ Cross-platform (Windows, Linux, macOS)
  • ✅ Interactive menu for symbol selection
  • ✅ Support for 15+ popular cryptocurrency pairs

Installation

  1. Install dependencies:
pip install -r requirements.txt

Usage

Run the program:

python main.py

The program will show an interactive menu where you can:

  • Select a cryptocurrency symbol (BTC, ETH, SOL, etc.)
  • Choose which streams to activate (Trade, Ticker, or both)
  • Monitor real-time data with colored output

Press Ctrl+C to stop the stream.

Project Structure

python-binance/
├── src/
│   ├── config/
│   │   └── settings.py          # Global configurations
│   ├── utils/
│   │   └── colors.py            # Terminal color management
│   ├── ui/
│   │   └── menu.py              # Interactive menu system
│   └── stream/
│       ├── manager.py           # WebSocket manager
│       └── handlers.py         # Trade and ticker handlers
├── main.py                      # Entry point
├── requirements.txt             # Dependencies
├── api.md                       # Binance API documentation
└── websocket.md                 # Binance WebSocket documentation

Configuration

Modify src/config/settings.py to customize:

  • Default symbol to monitor (default: BTCUSDT)
  • API Keys (optional for public streams)
  • Testnet mode
  • Value formatting

Extensibility

The project is structured to be easily extensible:

  • Add new streams: Add methods in BinanceStreamManager

  • New handlers: Create new classes in handlers.py

  • New display formats: Extend colors.py

  • New commands: Add logic in main.py or create a CLI

Example Output

================================================================================
  Binance Stream Monitor
================================================================================

Configuration:
  Symbol: BTCUSDT
  Active streams: Trade | Ticker

Press Ctrl+C to stop

--------------------------------------------------------------------------------

✓ Trade stream started
✓ Ticker stream started

14:23:15 │ BUY │ BTCUSDT │ Price: 43,250.50 │ Volume: 0.00125000
14:23:16 │ BTCUSDT │ Price: 43,251.20 (+0.15%) │ 24h High: 43,500.00 │ 24h Low: 42,800.00 │ 24h Volume: 1250.50000000
14:23:17 │ SELL │ BTCUSDT │ Price: 43,250.00 │ Volume: 0.00250000

Dependencies

  • python-binance: Python client for Binance API
  • colorama: Cross-platform terminal colors

Notes

  • Public streams do not require API keys
  • The program automatically handles reconnections
  • Messages are formatted and colored for better readability

License

This project is open source and available for use and modification.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Professional real-time stream monitor for Binance trades and prices via WebSocket.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages