TradingView
CryptoPlebbi
٢٧ تموز يوليو ٢٠٢١ ٠٠:٣٤

FTX Funding Rates 

BTC Perpetual Futures ContractBinance

الوصف

Indexes updated: 2021-07-27

This study tries to estimate the FTX funding rate using historical data and index definitions provided by FTX. The funding rate calculated is not exactly the same as FTX reports due to underlying limitations in TV.

Limitations

1. TWAP
FTX calculates the index price by TWAP which is average every 5s over the the whole hour. As far as I know, it's not possible to do this in Tradingview.

2. Change in INDEX definition
If a definition of an index changes in FTX, then this script is of course not up-to-date. Also, if a security is added to an index, then the historical funding rate will also change, even though said security wasn't apart of the past funding rate.

3. Supported tickers
The supported tickers are: BTC, ETH, SOL, ALGO, SAND, CLV and AXS

ملاحظات الأخبار

Version 0.2
Added more tickers, current supported tickers are: BTC, ETH, SOL, ALGO, SAND, CLV, AXS, THETA, GRT, LINK, SC, LUNA, PERP, FTT, PUNDIX, SUSHI
Added more options for average line

ملاحظات الأخبار

Added almost all the PERPS from FTX.

  • Did not add BTC/ETH/USD* pairs
  • Some exchanges used in the PERP index by FTX are not available on TV

ملاحظات الأخبار

Removed redundant inputs

ملاحظات الأخبار

Update chart.

ملاحظات الأخبار

Change plot style and color.
* Green bar = Positive funding and agrees with funding SMA
* Red bar = Negative funding and agrees with funding SMA
* Yellow bar = Goes against the funding SMA

ملاحظات الأخبار

Fixed the Dawn pair calculation.

ملاحظات الأخبار

Fixed RAY (They dropped the USDT pair from their index)

ملاحظات الأخبار

Update chart.

ملاحظات الأخبار

Updated XRP funding calculation.
Please send me a message if there seems to be an issue, FTX index's are constantly changing and I don't have the time to check every single perp for errors :)

FYI!!
Past data for funding is not accurate! I.e, if funding was negative for example on 21. January 2020 it might actually have been positive at that time, it's just that the underlying index has changed, which affects the past calculations as well.

ملاحظات الأخبار

[2022-04-14]
  • Added newest index data from FTX.
  • Added BTC and ETH pairs for funding calculation (Previously only USD pairs where available)


Please note!
On the FTX Index site they state that "All elements are capped at 30bp divergence from the median" - I am not doing this step, so there is going to be more variations in this funding indicator vs theirs.
I don't use BITTREX TUSD

ملاحظات الأخبار

Fix missing values when looking very far back (Will only give approximate values here, FTX hasn't been around long)

ملاحظات الأخبار

Reverted the fix - This will only show funding for the time-range of FTX - Maybe I can create a fix for the future later.

ملاحظات الأخبار

Remove graphics from chart - This part is annoying..

ملاحظات الأخبار

Removed Coinbase from index (Some price issues seems to be going on there, showing 19k BTC when FTX is showing 20k)

ملاحظات الأخبار

  • Removed all Coinbase USDC pairs (Coinbase merged all USD and USDC pairs)

ملاحظات الأخبار

Removed Binance - USDC pairs

ملاحظات الأخبار

Updated chart
التعليقات
KC43va
Does not seem to be working anymore...
I am getting a Study Error; Invalid symbol: COINBASE:BTCUSDC
CryptoPlebbi
@KC43va, Hmmm, what pair were you looking at? It works on my end for COINBASE:BTCUSDC at least
KC43va
@CryptoPlebbi, Sometimes it works and sometimes it does not.
e.g. when I ETHUSD (Coinbase) it does not work. As well as ETHPERP (FTX) does not work.

However some of the perpetual futures do work.
e.g. STXPERP (FTX), AXSPERP (FTX), FLOWPERP (FTX).

I was just wanting to know why it works on some instruments and not others.
I was expecting ETHPERP (FTX) to work. BTCPERP (FTX) does not work either.

My TV does not have COINBASE:BTCUSDC...
CryptoPlebbi
@KC43va, good catch, looks like some Coinbase pairs have been removed, I'll try to update the indicator and remove these :)
CryptoPlebbi
@KC43va, Fixed, thanks for letting me know!
CenovAnalyzy
Please update to Binance/Bybit or publish the source code so anyone can update.
Funding rates from FTX are way off as they don't allow withdrawals (eg BTC funding rates on FTX are huge above zero while everywhere else below zero atm).

There are some good alternatives but this was the best OI Funding Rates script so far.
CryptoPlebbi
@CenovAnalyzy, Yeah it's on my list of things to do for sure. I'll have to create my own version of this essentially, as this one was based on how FTX calculated indexes of each pair.
I will try to get this up and running over the weekend, but it won't be "Binance" or "Bybit" funding rates, as they use the orderbooks to calculate funding rates, and those are unavailable, but I will choose the major markets and create an index which can be applied to (almost) any pair
tradinggenius12344
@CryptoPlebbi, XD still waiting
CryptoPlebbi
@tradinggenius12344, Working on it, not trivial to know what index vs perp I should use now :D
CryptoPlebbi
المزيد