System overview
Alibaba Intelligence joins two deliberately separate observations: a wallet tracker watching BNB Chain RPC data, and a market view assembled from public token and pool sources. The website renders their current state; it does not execute trades and it does not hide the underlying wallet.
GeckoTerminal · DexScreener
freshness · source health
transfers · cost basis
Operating rule. If no market source answers with usable data, the market enters offline mode rather than presenting newly invented prices.
Wallet monitoring lifecycle
The tracker uses public JSON-RPC methods against a small rotating set of BNB endpoints. It keeps a block checkpoint and advances it in small batches, while a faster pending pass gives the interface an early signal.
Every second, pending transactions are queried and filtered to the configured wallet address. These records are provisional and appear as pending.
Every second, the latest block is read. Up to ten blocks at a time are inspected; transactions sent by the wallet are matched to their receipts.
Successful receipts are reduced to ERC-20 Transfer logs. Incoming token movement is a buy; outgoing token movement is a sell.
The record is added to the feed, positions are opened or reduced, and a book event is broadcast to connected browsers.
A pending line is removed when its transaction is found in a confirmed block. Failed receipts and transactions without a qualifying token transfer do not become trades.
Trade classification
Classification is intentionally mechanical. It is a useful account of observed wallet movement, not an assertion about the route, intent, or strategy behind a transaction.
The tracker reads token metadata with decimals() and symbol() calls when available. When metadata or a market quote is missing, the UI keeps the event visible but uses conservative fallbacks such as the contract prefix, bsc source, or zero market cap.
Position & P&L accounting
Positions are held per token contract and use a weighted cost basis. A buy adds quantity and cost; a sell removes the proportional basis of the quantity sold. Remaining quantity stays open.
// weighted average entry
position.costUsd += buyUsd
position.qty += boughtQty
position.openPrice = position.costUsd / position.qty
// proportional basis on a sell
soldCost = position.costUsd * (soldQty / position.qty)
realized = sellUsd - soldCost
position.costUsd -= soldCost
position.qty -= soldQtyRealized
Closed-trade P&L is the sell value less the proportional USD cost basis. The feed exposes pnlUsd and pnlPct for sells.
Unrealized
Open P&L is current quantity multiplied by the latest market price, less remaining cost. It changes when quotes refresh.
Important. USD values depend on the current BNB quote and market quote. Gas is considered when estimating sell-side BNB movement, but token transfers, routing, taxes, and complex multi-token receipts are not fully modeled as an execution ledger.
Market radar sources
The radar is a merged, current snapshot. Each source is optional; records are normalized by token address and the largest-liquidity quote is preferred where multiple DexScreener pairs are returned.
Caps are labels derived from market cap or FDV: low below $1M, mid below $10M, and high at or above $10M. A missing cap is treated as low for display, but a token must have a positive cap, price, and at least $1,000 liquidity to be considered tradeable by the market module.
HTTP API
The server is dependency-free and exposes a small read-only surface. Responses are JSON and are sent with cache-control: no-store. There is currently no authentication, rate-limit layer, or write endpoint.
/api/stateCurrent book, open positions, chain, wallet, scanner checkpoints, and market summary.
$ curl -s https://your-host.example/api/state | jq '{
chain, wallet, book: .book,
scanner, market: .market.mode
}'/api/trades?limit=20&before=IDNewest feed records. Limit is clamped to 1–50. Use next as the next before cursor.
/api/radarLow-cap and high-cap arrays, fresh listings, and a market source summary.
/api/eventsServer-sent events for trade, trade-remove, book, and market.
Event stream
Use the browser-native EventSource API for a live view. The server sends a five-second retry hint and a comment ping every 25 seconds to keep the connection warm.
const stream = new EventSource('/api/events')
stream.addEventListener('trade', ({ data }) => {
const trade = JSON.parse(data)
renderFeedLine(trade)
})
stream.addEventListener('trade-remove', ({ data }) => {
const { hash } = JSON.parse(data)
removePending(hash)
})
stream.addEventListener('book', ({ data }) => {
updateBook(JSON.parse(data))
})
stream.onerror = () => showConnectionState('reconnecting')tradeNew pending or confirmed feed record.
trade-removePending record replaced by its confirmed transaction.
bookBook, positions, and market view changed.
marketMarket scan completed and radar counts changed.
Scanner health & freshness
Health is visible in /api/state, not inferred from a green light. The market object reports mode, lastScan, lastQuote, and per-source timestamps and errors. The scanner object reports the last block checkpoint plus pending and confirmed scan times.
At least one source returned usable records and the universe is populated.
No live market source answered with usable data; market activity pauses.
A timestamp is old relative to its polling interval. Treat displayed quotes as historical.
Normal cadence is a market scan about every four minutes, quote refreshes about every 45 seconds, a position quote pass every five seconds, wallet balance refresh every two minutes, and wallet pending/block checks every second. These are defaults; deployment environment variables can change scan, quote, and tick intervals.
Limitations & trust notes
Transparency is a boundary, not a promise of perfect attribution. Read the feed as an observable chain-derived view with market enrichment.
- Read-only by design. The service observes a configured address and does not expose a trade execution or private-key operation.
- Public infrastructure varies. RPCs and market APIs can fail, lag, rate-limit, disagree, or change shape. Source failures are retained in health state.
- Transfer heuristics are not swaps. A receipt can contain several transfers, router activity, taxes, or unrelated movements. The first qualifying incoming/outgoing token movement is the simple classifier used here.
- Quotes are estimates. Market prices, market cap, liquidity, and USD conversion come from public third-party data and can be stale or unavailable.
- Past results are not a forecast. The interface reports wallet activity and calculated P&L; it is not financial advice or a guarantee of future performance.