Tools · finance

Perp market + funding (Hyperliquid, Binance, Bybit)

Hyperliquid perpetuals in one call: mark/oracle/mid price, 24h change, funding rate and its annualised APR, open interest in coins and USD, 24h volume, max leverage - plus the same coin's next funding on Binance and Bybit for cross-venue comparison. Name a coin (BTC, ETH, SOL, HYPE…) or send {} for the most-traded markets. Pay-per-call via x402.

$0.001 per call, paid in USDC on Base or Solana with x402 — no account, no API key. POST https://fiatdock.com/v1/market/perp (or GET with the same fields as query parameters) · MCP tool perp_market. An answer the tool cannot produce is refused with 4xx/5xx and is not charged.

Inputs

FieldTypeDescriptionExample
coinstringPerpetual's coin as Hyperliquid names it (BTC, ETH, SOL, HYPE, kPEPE, …). Omit for the most-traded markets"BTC"
limitintegerHow many markets when no coin is given (by 24h volume), 1-50, default 1010

Example

Request body

{"coin":"BTC"}

Answer (the published example)

{"venue":"Hyperliquid","coin":"BTC","markets":[{"coin":"BTC","markPx":86167,"oraclePx":86186,"midPx":86192.5,"prevDayPx":84677,"change24hPct":1.76,"fundingRate":0.0000125,"intervalHours":1,"fundingAprPct":10.95,"premium":0,"openInterest":37822.58736,"openInterestUsd":3259051564,"volume24hUsd":799529819,"maxLeverage":40}],"crossVenueFunding":[{"venue":"Binance","fundingRate":0.00005937,"intervalHours":8,"fundingAprPct":6.5,"nextFundingTime":"2026-10-05T00:00:00.000Z"},{"venue":"Hyperliquid","fundingRate":0.0000125,"intervalHours":1,"fundingAprPct":10.95,"nextFundingTime":"2026-10-05T00:00:00.000Z"}],"source":"Hyperliquid public info API (metaAndAssetCtxs, predictedFundings)","asOf":"2026-10-05T00:00:00.000Z","note":"fundingRate is per funding interval (intervalHours), as a decimal; fundingAprPct annualises it, not compounded. Not financial advice."}

Call it

curl

# 1) ask: an unpaid call answers 402 with the exact price (free)
curl -i -X POST https://fiatdock.com/v1/market/perp -H 'content-type: application/json' -d '{"coin":"BTC"}'
# 2) pay: any x402 client signs that 402 and resends — see Node or Python below

Node

// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:*", client: new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_PRIVATE_KEY)) }],
});
const r = await pay("https://fiatdock.com/v1/market/perp", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"coin":"BTC"}),
});
console.log(r.status, await r.json());

Python

# pip install "x402[httpx,evm]"
import asyncio, json, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm.exact import register_exact_evm_client

async def main():
    client = register_exact_evm_client(x402Client(), Account.from_key(os.environ["AGENT_PRIVATE_KEY"]))
    async with x402HttpxClient(client) as http:
        r = await http.post("https://fiatdock.com/v1/market/perp", json=json.loads("{\"coin\":\"BTC\"}"))
        print(r.status_code, r.json())

asyncio.run(main())

MCP (Claude, Cursor, any MCP client)

{"mcpServers":{"fiatdock":{"command":"npx","args":["-y","fiatdock-mcp"],"env":{"AGENT_PRIVATE_KEY":"0x<your agent wallet key>"}}}}
// then call the tool "perp_market" — the package pays each call from that wallet

The wallet needs USDC on Base. Prefer no install? The remote server https://fiatdock.com/mcp answers the 402 as tool output for an agent that signs its own payments.

Related tools

Machine-readable: OpenAPI · tools.json · llms.txt · /.well-known/x402