Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Binance Money Flow Scanner

A lightweight real-time money flow scanner for Binance Spot markets, built with Node.js.

The scanner monitors Binance USDT trading pairs, collects live aggTrade data through WebSocket, and calculates buy volume, sell volume, net flow, and buying/selling pressure.

It also provides a 24-hour market volume ranking to help identify the most actively traded Binance USDT pairs.

Features

  • Binance Spot market scanning
  • Automatic USDT pair discovery
  • 24-hour volume filtering
  • Top 100 USDT markets by 24-hour volume
  • Real-time trade monitoring using WebSocket
  • Buy volume tracking
  • Sell volume tracking
  • Buy/sell trade count
  • Net flow calculation
  • Buy pressure percentage
  • Basic market flow signals
  • 24-hour volume ranking
  • Automatic WebSocket reconnect
  • No API key required for public Binance market data

How It Works

The application uses two Binance REST API endpoints to initialize the market list:

/api/v3/exchangeInfo
/api/v3/ticker/24hr

It first retrieves all currently tradable Binance Spot symbols and filters them to USDT pairs.

It then retrieves 24-hour market statistics and sorts the pairs by quote volume.

By default, only the top 100 markets are monitored.

const MAX_SYMBOLS = 100;

Markets with less than the configured minimum 24-hour volume are ignored:

const MIN_24H_VOLUME = 1_000_000;

After initialization, the application connects to Binance WebSocket streams using:

@aggTrade

This allows the scanner to process trades in real time.


Trade Flow Calculation

For every incoming trade, the scanner calculates its USD value:

Trade Value = Price × Quantity

The Binance aggTrade field m is then used to determine the trade side.

if (trade.m === false) {
    // Buy pressure
} else {
    // Sell pressure
}

The application accumulates both values:

Buy Volume
Sell Volume

Net Flow

Net flow is calculated as:

Net Flow = Buy Volume - Sell Volume

Example:

Buy Volume  = $15M
Sell Volume = $10M

Net Flow = +$5M

A positive net flow means that buy-side taker volume is higher than sell-side taker volume during the period since the application started.

A negative value indicates higher sell-side taker volume.


Buy Pressure

Buy pressure is calculated using:

Buy Pressure =
Buy Volume / (Buy Volume + Sell Volume) × 100

Example:

Buy Volume  = $7M
Sell Volume = $3M

Buy Pressure = 70%

The scanner uses this value to generate a basic market signal.


Signals

The current signal logic is:

BUY >= 65% + strong flow ratio
    → 🟢 STRONG BUY

BUY >= 55%
    → 🟢 BUY PRESSURE

SELL <= 35% + strong flow ratio
    → 🔴 STRONG SELL

SELL <= 45%
    → 🔴 SELL PRESSURE

Otherwise
    → 🟡 NEUTRAL

The flow ratio is calculated as:

Flow Ratio =
|Buy Volume - Sell Volume|
/
(Buy Volume + Sell Volume)

The application requires a flow ratio of at least 0.25 for the strongest signals.


24-Hour Volume Ranking

The scanner also maintains a separate ranking of the top Binance USDT markets by 24-hour quote volume.

Example:

🔥 TOP BINANCE VOLUME 24H

01. BTCUSDT       $42.8B
02. ETHUSDT       $21.4B
03. SOLUSDT        $8.7B
04. XRPUSDT        $6.2B
05. DOGEUSDT       $4.8B

The ranking is refreshed every 5 minutes.


Live Flow Output

The main scanner displays the top markets based on current net flow.

Example:

======================================================================
                 BINANCE MONEY FLOW SCANNER
======================================================================

COIN                BUY         SELL          NET     BUY %  SIGNAL
---------------------------------------------------------------------------
BTC             $82.4M       $61.2M       $21.2M      57.4%  🟢 BUY PRESSURE
ETH             $51.7M       $42.1M        $9.6M      55.1%  🟢 BUY PRESSURE
SOL             $37.8M       $18.2M       $19.6M      67.5%  🟢 STRONG BUY
XRP             $21.4M       $28.7M       -$7.3M      42.7%  🔴 SELL PRESSURE
DOGE            $19.2M       $31.4M      -$12.2M      37.9%  🔴 SELL PRESSURE

The main flow table is refreshed every:

const REFRESH_MS = 60_000;

which is 60 seconds by default.


Requirements

  • Node.js 18+
  • Internet connection
  • Access to Binance public market data

No Binance API key is required for the public endpoints used by this project.


Installation

Clone the repository:

git clone https://github.com/RadinAnsari/Binance_Money-_Flow-Scanner.git

Enter the project directory:

cd binance-money-flow

Install dependencies:

npm install

Dependencies

The project uses two main packages:

Axios

Used for Binance REST API requests.

npm install axios

WebSocket

Used to receive real-time Binance trade data.

npm install ws

Run

Start the scanner with:

node index.js

When the application starts, it will:

  1. Load Binance Spot markets.
  2. Filter USDT pairs.
  3. Load 24-hour statistics.
  4. Sort markets by volume.
  5. Select the top configured markets.
  6. Connect to Binance WebSocket.
  7. Start processing live trades.
  8. Calculate buy/sell flow.
  9. Display the current rankings.

Configuration

The main settings are located at the top of index.js.

Maximum Number of Markets

const MAX_SYMBOLS = 100;

This controls how many USDT markets are monitored.

For example:

const MAX_SYMBOLS = 200;

will monitor the top 200 markets by 24-hour volume.


Minimum 24-Hour Volume

const MIN_24H_VOLUME = 1_000_000;

This removes markets with less than $1 million in 24-hour quote volume.

For a more active-market-only scanner:

const MIN_24H_VOLUME = 10_000_000;

For a broader scan:

const MIN_24H_VOLUME = 100_000;

Flow Refresh Interval

const REFRESH_MS = 60_000;

The default value is 60 seconds.

For a 10-second refresh:

const REFRESH_MS = 10_000;

For a 30-second refresh:

const REFRESH_MS = 30_000;

Project Structure

Binance_Money-_Flow-Scanner/
│
├── index.js
├── package.json
├── package-lock.json
└── README.md

Architecture

                    Binance REST API
                          │
              ┌───────────┴───────────┐
              │                       │
              ▼                       ▼
        exchangeInfo              ticker/24hr
              │                       │
              └───────────┬───────────┘
                          ▼
                    Market Filter
                          │
                          ▼
                  Top USDT Markets
                          │
                          ▼
                 Binance WebSocket
                          │
                       aggTrade
                          │
                          ▼
                   Trade Processor
                          │
                  ┌───────┴───────┐
                  ▼               ▼
              Buy Volume      Sell Volume
                  │               │
                  └───────┬───────┘
                          ▼
                      Net Flow
                          │
                          ▼
                    Buy Pressure
                          │
                          ▼
                       Signal

Important Limitations

Flow Is Not Historical

The current buy/sell flow starts accumulating when the application starts.

For example, if the scanner has been running for only 10 minutes:

BUY = $5M
SELL = $3M
NET = +$2M

means approximately $5M of buy-side and $3M of sell-side volume has been observed by this running instance.

It does not represent the full 24-hour buy/sell flow.

The 24-hour volume shown separately comes directly from Binance's ticker/24hr endpoint.


Top 100 Markets Only

The current implementation does not monitor every Binance USDT pair.

It first ranks markets by 24-hour volume and then selects:

.slice(0, MAX_SYMBOLS)

With the default configuration, that means 100 markets.


Buy/Sell Does Not Mean Capital Inflow/Outflow

The scanner measures trade execution pressure.

For example:

BUY PRESSURE: 65%

does not necessarily mean that 65% of new capital entered the asset.

It means that the calculated taker-side trade volume is weighted toward buys.


No Wallet Tracking

This project does not identify individual traders, wallets, institutions, or known whales.

It analyzes Binance trade data only.


Spot Only

The current version monitors:

Binance Spot

Binance Futures are not included.

Disclaimer

This project is intended for market-data analysis and research purposes only.

The calculated flow values and generated signals are based on Binance trade data and a simple algorithm. They should not be considered financial advice or a guarantee of future price movement.

Always perform your own analysis before making trading decisions.

About

A lightweight real-time money flow scanner for Binance Spot markets, built with Node.js.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages