get https://dapi.api.sui-prod.bluefin.io/fundingRate
Retrieves market funding rate data.
Client Library
import { Networks, BluefinClient, MARKET_SYMBOLS } from "@bluefin-exchange/bluefin-v2-client";
async function main() {
const ed25519Wallet =
"trigger swim reunion gate hen black real deer light nature trial dust";
const client = new BluefinClient(
true,
Networks.TESTNET_SUI,
ed25519Wallet,
"ED25519"
);
await client.init()
// fetch recent trades on BTC market
const resp= await client.getMarketFundingRate({
symbol: MARKET_SYMBOLS.BTC
})
}
main().then().catch(console.error);
from config import TEST_ACCT_KEY, TEST_NETWORK
from pprint import pprint
import asyncio
from bluefin_v2_client import (
BluefinClient,
Networks,
TRADE_TYPE,
MARKET_SYMBOLS,
)
async def main():
client = BluefinClient(True, Networks[TEST_NETWORK], TEST_ACCT_KEY)
await client.init(True)
# gets current funding rate on market
funding_rate = await client.get_funding_rate(MARKET_SYMBOLS.ETH)
pprint(funding_rate)
if __name__ == "__main__":
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
loop.close()
HTTPs
Alternatively, call the GET /fundingRate endpoint using the integrated editor on the right or locally from any language supporting HTTPs network calls.