OPEN-SOURCE SCRIPT
Binance Spot vs Perpetual Price index by BIGTAKER

📌 Overview
This indicator calculates the premium (%) between Binance Perpetual Futures and Spot prices in real time and visualizes it as a column-style chart.
It automatically detects numeric prefixes in futures symbols—such as `1000PEPE`, `1MFLUX`, etc.—and applies the appropriate scaling factor to ensure accurate 1:1 price comparisons with corresponding spot pairs, without requiring manual configuration.
Rather than simply showing raw price differences, this tool highlights potential imbalances in supply and demand, helping to identify phases of market overheating or panic selling.
🔧 Component Breakdown
1. ✅ Auto Symbol Mapping & Prefix Scaling
Automatically identifies and processes common numeric prefixes (`1000`, `1M`, etc.) used in Binance perpetual futures symbols.
Example:
`1000PEPEUSDT.P` → Spot symbol: `PEPEUSDT`, Scaling factor: `1000`
This ensures precise alignment between futures and spot prices by adjusting the scale appropriately.
2. 📈 Premium Calculation Logic
Formula:
(Scaled Futures Price − Spot Price) / Spot Price × 100
Interpretation:
* Positive (+) → Futures are priced higher than spot: indicates possible long-side euphoria
* Negative (−) → Futures are priced lower than spot: indicates possible panic selling or oversold conditions
* Zero → Equilibrium between futures and spot pricing
3. 🎨 Visualization Style
* Rendered as column plots (bar chart) on each candle
* Color-coded based on premium polarity:
* 🟩 Positive premium: Light green (`#52ff7d`)
* 🟥 Negative premium: Light red (`#f56464`)
* ⬜ Neutral / NA: Gray
* A dashed horizontal line at 0% is included to indicate the neutral zone for quick visual reference
💡 Strategic Use Cases
| Market Behavior | Strategy / Interpretation |
| ----------------------------------------- | ------------------------------------------------------------------------ |
| 📈 Premium surging | Strong futures demand → Overheated longs (short setup) |
| 📉 Premium dropping | Aggressive selling in futures → Oversold signal (long setup) |
| 🔄 Near-zero premium | Balanced market → Wait and observe or reassess |
| 🧩 Combined with funding rate or OI delta | Enables multi-factor confirmation for short-term or mid-term signals |
🧠 Technical Advantages
* Fully automated scaling for prefixes like `1000`, `1M`, etc.
* Built-in error handling for inactive or missing symbols (`ignore_invalid_symbol=true`)
* Broad compatibility with Binance USDT Spot & Perpetual Futures markets
🔍 Target Use Cases & Examples
Compatible symbols:
`1000PEPEUSDT.P`, `DOGEUSDT.P`, `1MFLUXUSDT.P`, `ETHUSDT.P`, and most other Binance USDT-margined perpetual futures
Works seamlessly with:
* Binance Spot Market
* Binance Perpetual Futures Market
This indicator calculates the premium (%) between Binance Perpetual Futures and Spot prices in real time and visualizes it as a column-style chart.
It automatically detects numeric prefixes in futures symbols—such as `1000PEPE`, `1MFLUX`, etc.—and applies the appropriate scaling factor to ensure accurate 1:1 price comparisons with corresponding spot pairs, without requiring manual configuration.
Rather than simply showing raw price differences, this tool highlights potential imbalances in supply and demand, helping to identify phases of market overheating or panic selling.
🔧 Component Breakdown
1. ✅ Auto Symbol Mapping & Prefix Scaling
Automatically identifies and processes common numeric prefixes (`1000`, `1M`, etc.) used in Binance perpetual futures symbols.
Example:
`1000PEPEUSDT.P` → Spot symbol: `PEPEUSDT`, Scaling factor: `1000`
This ensures precise alignment between futures and spot prices by adjusting the scale appropriately.
2. 📈 Premium Calculation Logic
Formula:
(Scaled Futures Price − Spot Price) / Spot Price × 100
Interpretation:
* Positive (+) → Futures are priced higher than spot: indicates possible long-side euphoria
* Negative (−) → Futures are priced lower than spot: indicates possible panic selling or oversold conditions
* Zero → Equilibrium between futures and spot pricing
3. 🎨 Visualization Style
* Rendered as column plots (bar chart) on each candle
* Color-coded based on premium polarity:
* 🟩 Positive premium: Light green (`#52ff7d`)
* 🟥 Negative premium: Light red (`#f56464`)
* ⬜ Neutral / NA: Gray
* A dashed horizontal line at 0% is included to indicate the neutral zone for quick visual reference
💡 Strategic Use Cases
| Market Behavior | Strategy / Interpretation |
| ----------------------------------------- | ------------------------------------------------------------------------ |
| 📈 Premium surging | Strong futures demand → Overheated longs (short setup) |
| 📉 Premium dropping | Aggressive selling in futures → Oversold signal (long setup) |
| 🔄 Near-zero premium | Balanced market → Wait and observe or reassess |
| 🧩 Combined with funding rate or OI delta | Enables multi-factor confirmation for short-term or mid-term signals |
🧠 Technical Advantages
* Fully automated scaling for prefixes like `1000`, `1M`, etc.
* Built-in error handling for inactive or missing symbols (`ignore_invalid_symbol=true`)
* Broad compatibility with Binance USDT Spot & Perpetual Futures markets
🔍 Target Use Cases & Examples
Compatible symbols:
`1000PEPEUSDT.P`, `DOGEUSDT.P`, `1MFLUXUSDT.P`, `ETHUSDT.P`, and most other Binance USDT-margined perpetual futures
Works seamlessly with:
* Binance Spot Market
* Binance Perpetual Futures Market
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Crypto trader. 암호화폐 트레이더.
Indicator Dashboard for Futures Market Analysis. 선물 시장 분석을 위한 지표 대시보드
펀딩비 급변동 무료 시그널
Signal of rapid change in funding rate : t.me/binanceFRsignal
실시간 김치프리미엄 모니터링
Real-time premiumgap : bigtaker.com
Indicator Dashboard for Futures Market Analysis. 선물 시장 분석을 위한 지표 대시보드
펀딩비 급변동 무료 시그널
Signal of rapid change in funding rate : t.me/binanceFRsignal
실시간 김치프리미엄 모니터링
Real-time premiumgap : bigtaker.com
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Crypto trader. 암호화폐 트레이더.
Indicator Dashboard for Futures Market Analysis. 선물 시장 분석을 위한 지표 대시보드
펀딩비 급변동 무료 시그널
Signal of rapid change in funding rate : t.me/binanceFRsignal
실시간 김치프리미엄 모니터링
Real-time premiumgap : bigtaker.com
Indicator Dashboard for Futures Market Analysis. 선물 시장 분석을 위한 지표 대시보드
펀딩비 급변동 무료 시그널
Signal of rapid change in funding rate : t.me/binanceFRsignal
실시간 김치프리미엄 모니터링
Real-time premiumgap : bigtaker.com
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.