MarketTrace
M1PositioningM2Order BookM3LiquidationssoonM4Funding
Methodology · v1.0.0 · published 2026-05-07

Funding & Positioning

How the funding rate percentile, streak counter, and term-structure widgets are computed: sources, formulas, edge cases, limits.

See the live widgets at /perpetuals/funding.

Data sources

MarketTrace funding analytics combine three inputs: Binance's public funding-rate history, the per-asset snapshot daemon, and the tracked-asset roster.

Percentile rank: how it's computed

A funding rate percentile of N means N% of 8-hour cycles in the last two years printed at or below the current rate. We split ties evenly so identical observations rank between strict-less-than and less-or-equal counts.

Concretely, given a sorted list of historical percent values S:

left  = count of elements in S strictly less than current
right = count of elements in S less than or equal to current
rank  = (left + right) / 2
percentile = (rank / |S|) × 100

The result is bounded [0, 100]. A 0th percentile means the current rate is the most negative reading in the window; 100th means it is the most positive.

Percentile rank: edge cases

Streak: how it's computed

A funding streak is the run of consecutive 8-hour cycles that share the same sign as the latest cycle. Streak length, in days, is the elapsed time between the first cycle in the run and the latest cycle. A neutral cycle (rate exactly 0) ends any streak.

direction = sign(latest.rate)         // "neg" | "pos" | "neutral"
walk back through history while sign matches
streak.days = (latest.ts - first_in_streak.ts) / 86_400_000

Direction labels: "neg" (shorts pay longs), "pos" (longs pay shorts), "neutral" (latest cycle is zero or no history).

Streak: rarity flag

The rare flag fires when the current streak length is in the top 10% of historical same-direction streak lengths for that asset. We also require at least 10 prior completed streaks before publishing a rarity claim. Without that floor the threshold can come from a tiny sample and overfire.

Term structure

Funding term structure is a table that shows current funding rate, 2-year percentile, and active streak length for all six tracked perpetual pairs at once. The endpoint returns one row per asset; embeds can override the asset list via ?assets=btc&assets=eth.

Distribution histogram

The funding rate distribution histogram is a 30-bucket frequency chart of every 8-hour cycle in the asset’s 2-year history. Bin width is dynamic per asset across the observed [min, max] range; fixed [-0.1%, +0.1%]would clip DOGE/SOL outlier tails and waste resolution on the BTC body. Each bin reports the timestamp of the most recent cycle that fell in it, so the tooltip can show “last seen YYYY-MM-DD”.

L/S ratio

The Long/Short positioning ratio is intentionally not shipped in this version. The Binance globalLongShortAccountRatioendpoint exposes a single venue’s ratio, but a meaningful divergence read requires Bybit and OKX feeds alongside it. The cross-exchange L/S widget arrives in Phase 3 with the rest of the multi-venue infrastructure, instead of shipping a Binance-only sparkline that misframes the metric.

Caching

Limitations

Versioning

Methodology version v1.0.0 · published 2026-05-07. Material changes (new sources, formula tweaks, threshold changes) bump the version and update dateModified in the structured data above.