Analyzing Historical Funding Rates on Bitcoin and Ether Perpetuals
Summary
This overview describes a Python program for retrieving and charting historical funding rates for perpetual contracts on Deribit. Users choose an instrument and date range; the program requests the history in monthly chunks and limits request frequency. The guide notes that the public API endpoint requires no separate API keys, and that production data must be selected when moving from testnet, whose data differs.
The output combines the eight-hour funding rate with cumulative funding over time, which can help estimate the total funding paid or received as a percentage of position size. A second chart aggregates funding by month to make longer-term patterns and costs or revenues easier to compare. The author recommends retaining retrieved data locally for ongoing tracking and fetching only new observations. This is a data collection and visualization utility, not a trading strategy or performance study; funding history alone does not capture price changes, execution costs, or other risks of a perpetual position.
Key ideas
- Historical perpetual funding can be collected through a public exchange API over a chosen date range.
- Cumulative funding helps estimate the funding paid or received relative to position size over a period.
- Monthly aggregation can reveal broader funding patterns while reducing the noise in interval-level data.
- Request limits and monthly data chunks affect retrieval time for long histories.
- Local storage can reduce repeated API requests when tracking funding over time.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.