TradingView
Lemrin
2020년 6월 8일 오전 2시 57분

BitMEX Funding Rate Calculation 

Bitcoin / US Dollar Perpetual Inverse Swap ContractBitMEX

설명

This script implements the full funding rate formulas found on the BitMEX site for XBTUSD, ETHUSD, and XRPUSD. It uses the 1-min premium and interest tickers found here on TradingView to calculate an 8-hour TWAP, then uses base initial and maintenance margins to apply caps on absolute rate and delta from prior value. Caps are applicable only to position sizes below 200 XBT. When chart history exceeds the available history of 1min date on TradingView, the indicator switches to 1hr data to provide estimates.

Outputs:
  • Either a check (using 1min data) or a question mark (using 1hr data) upon each new funding period.
  • Current funding rate, every 8 hours.
  • Current funding prediction for the next funding period.
코멘트
Lemrin
Note that this calculation is only as accurate as the respective ticker's premium index on TradingView is, as polled from BitMEX. Particularly in ETHUSDPI, there are sometimes discrepancies between the 8-hour TWAP of 1min data here and the .ETHUSDPI8H value found on BitMEX.
sahibbecker
@Lemrin, Hey, I would love to see the source for this? Would you be able to reveal it please? Thanks!
더보기