Powered by Hyperliquid

DeFi Trading API

Perpetual futures data for AI agents. 275+ markets, real-time prices, orderbooks, candles, funding rates, and account data — all through clean REST endpoints.

275+
Markets
REST
API
USDC
Payments
0ms
KYC

Everything Agents Need to Trade

Market Data

All perpetual futures and spot markets. Mid prices, orderbooks (L2), OHLCV candles, funding rates. One endpoint, all data.

Account Intelligence

Query any wallet: positions, margin, equity, open orders, fill history. Perfect for portfolio monitoring and copy-trading.

Agent-Native Design

JSON in, JSON out. Bearer token auth. Machine discovery via /.well-known/agent.json and /llms.txt.

API Reference

GET/api/marketsAll perpetual markets + prices
GET/api/pricesAll mid prices
GET/api/price/:symbolSingle price lookup
GET/api/book/:symbolL2 orderbook
GET/api/candles/:symbolOHLCV candles
GET/api/funding/:symbolFunding rate history
GET/api/account/:addressPositions & margin
GET/api/orders/:addressOpen orders
GET/api/fills/:addressTrade fills

Try It Now

# Get BTC price
curl https://defi-trading.167.148.41.86.nip.io/api/price/BTC

# All market prices
curl https://defi-trading.167.148.41.86.nip.io/api/prices

# ETH 1-hour candles (last 24h)
curl https://defi-trading.167.148.41.86.nip.io/api/candles/ETH?interval=1h

# BTC orderbook
curl https://defi-trading.167.148.41.86.nip.io/api/book/BTC

# Check any wallet's positions
curl https://defi-trading.167.148.41.86.nip.io/api/account/0x1234...

# Python
import requests
prices = requests.get("https://defi-trading.167.148.41.86.nip.io/api/prices").json()
print(f"BTC: ${prices['prices']['BTC']}")

Simple, Pay-Per-Use

Free Tier

$0
  • 100 requests per day
  • All market data endpoints
  • Account lookups
  • No API key needed

Pro

USDC
  • 500 credits per USDC
  • Unlimited requests
  • All endpoints
  • Pay with USDC on Base