E5BF GitHub - gesine1541ro7/UNICORN-Binance-WebSocket-API: Real-time Binance market data streaming console with WebSocket stream management, live ticker snapshots, and multi-exchange support. · GitHub
[go: up one dir, main page]

Skip to content

gesine1541ro7/UNICORN-Binance-WebSocket-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UNICORN-Binance-WebSocket-API

Real-time Binance market data streaming console with WebSocket stream management, live ticker snapshots, and multi-exchange support.

UNICORN Binance WebSocket API Console

An interactive Python console for real-time market data streaming from Binance using the unicorn-binance-websocket-api library.

Features

  • Real-time streaming — Subscribe to trades, klines, tickers, and more via WebSocket
  • Multi-exchange support — Binance Spot, Margin, Futures (USD-M / Coin-M), US, TR, DEX
  • Stream management — Create, monitor, and stop multiple concurrent streams
  • Market snapshots — Fetch current 24h ticker data for any trading pair
  • Rich TUI — Beautiful terminal interface with formatted tables and panels
  • Configurable — API keys, SOCKS5 proxy, default markets and channels
  • Auto-reconnect — Fully managed WebSocket connections with automatic recovery

Requirements

  • Python 3.8+
  • Internet connection (for Binance API access)

Installation

pip install -r requirements.txt

Or install dependencies from within the console using the "Install Dependencies" option.

Quick Start

python main.py

The interactive menu provides the following options:

Option Description
1 Install Dependencies
2 Configure (exchange, API keys, proxy)
3 Start Stream
4 View Active Streams
5 Market Snapshot
6 About
0 Exit

Configuration

Settings are stored in config.json and can be modified through the console or by editing the file directly:

{
  "exchange": "binance.com",
  "api_key": "",
  "api_secret": "",
  "socks5_proxy": "",
  "default_markets": ["btcusdt", "ethusdt"],
  "default_channels": ["trade", "kline_1m"],
  "output_format": "raw"
}

Supported Exchanges

Exchange Identifier
Binance binance.com
Binance Testnet binance.com-testnet
Binance Margin binance.com-margin
Binance USD-M Futures binance.com-futures
Binance Coin-M Futures binance.com-coin_futures
Binance US binance.us
Binance DEX binance.org

Project Structure

.
├── main.py          # Entry point and TUI menu
├── streamer.py      # WebSocket stream manager
├── config.py        # Configuration management
├── market.py        # Market data models and formatters
├── utils/           # Environment utilities
├── config.json      # User settings
├── requirements.txt # Python dependencies
└── README.md

Disclaimer

This tool is provided for educational and informational purposes only. It does not constitute financial, investment, or trading advice. Use of real funds and API keys is entirely at your own risk.

License

MIT

0