PROTECTED SOURCE SCRIPT
Telah dikemas kini

Spot Vs Perp Premium

670
This indicator visualizes the price premium or discount between spot and perpetual futures markets for any crypto asset, using data from Binance, OKX, and Bybit. It helps traders track sentiment shifts, uncover arbitrage signals, and identify potential short-term reversals or continuation moves based on how aggressively traders are positioned in derivatives relative to the spot market.

What It Does

- Calculates the premium:
The difference between spot price and perp price is shown as a histogram. A positive premium (spot > perp) suggests cautious or bearish perp traders, while a negative premium (perp > spot) may indicate aggressive long positioning or speculative activity.

Supports multiple venues:
You can toggle between Binance, OKX, Bybit, or view a 3-exchange average for a more smoothed view.

Automatic pair detection:
The script auto-detects the base and quote currency from your active chart, dynamically tracking the correct spot and perp contracts for the asset you're analyzing.

Invert option:
Flip the calculation to view the perp premium instead of the spot premium, useful for comparing directional funding bias or for personal preference in visual analysis.

Optional moving average:
Smooth the premium signal over time to track sustained shifts in sentiment and filter out noise.

Table display:
Displays the real-time premium value in the corner of the chart for clarity.

Why It's Useful

This tool gives insight into derivatives trader behavior vs real market pricing. Spot prices reflect actual buying/selling of assets, while perpetual futures are often driven by speculation, leverage, and short-term positioning. When these diverge significantly, it often precedes market inflection points:

- Perp trading above spot (negative premium): excessive long exposure, potential for mean reversion or liquidations.
- Perp trading below spot (positive premium): risk-off behavior or hedging, potential for squeeze or unwind.

You can use this indicator to:
- Anticipate liquidation-driven moves
- Spot early signs of trend exhaustion
- Confirm breakout strength with perp alignment
- Monitor crowd positioning in real-time

Inputs

- Exchange – Select from Binance, OKX, Bybit, or average all three
- Inverse Premium – Flip the calculation to see perp - spot instead
- Show MA – Overlay a moving average for premium smoothing
- Show Table – Toggle live premium table display
- MA Period – Customize the smoothing window

Enjoy! Please comment and like!
Nota Keluaran
Update:

Added support for charts displaying a USD pairing.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.