OPEN-SOURCE SCRIPT
Updated BTC Multi Exchange Perpetual Premium

This script tracks the premium/discount of Bitcoin perpetual contracts at various exchanges.
The premium/discount is calculated against an index price. The index price is calculated from spot exchange prices and are weighted as follows:
Bitstamp:28,81%
Bittrex:5,5%
Coinbase: 38,07%
Gemini: 7,34%
Kraken: 20,28
The difference between this script and other available scripts, is that exciting script seems to only focus on one exchange. This script is also open source.
The premium/discount is calculated against an index price. The index price is calculated from spot exchange prices and are weighted as follows:
Bitstamp:28,81%
Bittrex:5,5%
Coinbase: 38,07%
Gemini: 7,34%
Kraken: 20,28
The difference between this script and other available scripts, is that exciting script seems to only focus on one exchange. This script is also open source.
Release Notes
Fixed an error showing using spot instead of perpetual price.Release Notes
Fixed a calculation error.Release Notes
Added a few more exchanges.Added the possibility to select the reference price. Choises are Bitmex Indices (as used in previous script) and Tradingviews index. Default is the TradingView index.
Release Notes
Added choice to include OKEX and Houbi exhcanges. These exchanges are on different timezones and produces irratic results on higher timeframes (12 hr and up?). These exchanges are left out by default, but can be included on lower timeframes.Also Bitmex indices are updated (still default to Tradingviews index as reference.
Release Notes
Updated Bitmex IndicesRelease Notes
Fixed calculation errorRelease Notes
Updated Bitmex indices. Also, added Coinbase BTCUSD as a choice for reference price.Release Notes
Updated OKX ticker in scriptUpdated Bitmex indices
Release Notes
Updated BitMEX IndicesRelease Notes
Updated Bitmex indices (incl removal of FTX from indices)Release Notes
Removed FTXRelease Notes
- Fixed some bugs- Updated Bitumen Indices
- Added Coinbase to plot
Release Notes
Updated Bitmex Indices.Updated to Pine v6
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.
For quick access on a chart, add this script to your favorites — learn more here.
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.
For quick access on a chart, add this script to your favorites — learn more here.
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.