probe-gate
Demonstrates fetching the most recent funding rate for a linear perpetual contract.
curl 'https://api.bybit.com/v5/market/funding/history?category=linear&symbol=BTCUSDT&limit=1'
import requests
resp = requests.get(
"https://api.bybit.com/v5/market/funding/history",
params={
'category': 'linear',
'symbol': 'BTCUSDT',
'limit': '1',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("bybit")
result = api.fetch("v5/market/funding-rate", category="linear", symbol="BTCUSDT", limit=1)
for item in result:
print(item)
const resp = await fetch("https://api.bybit.com/v5/market/funding/history?category=linear&symbol=BTCUSDT&limit=1");
const data = await resp.json();