To get the total open interest, use the endpoint GET /futures/data/openInterestHist
for share of volumes in short and long positions, you can use GET /futures/data/topLongShortAccountRatio and GET /futures/data/topLongShortPositionRatio
funding rates for short and long positions for each asset using GET /dapi/v1/fundingInfo
For a detailed exploration of Binance Futures API, refer to (Binance API Documentation)
I have got some additional informtion, so sharing with you and it may help:
----script fetches data and outputs results to a Google Sheetâ
A repository by seanhung07
provides a Python script for analyzing open interest data and funding rates from Binance futures markets GitHub - seanhung07/Binance-Open-Interest-Analyzer
----can help you fetch and process funding rates dataâ
QuantConnect/Lean.DataSource.BinanceFundingRate repository could be beneficial for integrating Binance futures funding rates into your trading algorithms GitHub - QuantConnect/Lean.DataSource.BinanceFundingRate: Binance futures funding rate
----a simplified Python example that demonstrates how you might start fetching this data using the Binance API-----
from binance.client import Client
from binance.enums import *
client = Client(api_key=âyour_api_keyâ, api_secret=âyour_api_secretâ)
Fetch open interest
open_interest = client.futures_coin_open_interest(symbol=âBTCUSD_200925â, contractType=âCURRENT_QUARTERâ)
Fetch funding rates
funding_rates = client.futures_funding_rate(symbol=âBTCUSDTâ, limit=5)
print(âOpen Interest:â, open_interest)
print(âRecent Funding Rates:â, funding_rates)
âlet me know if it helpsâ