Loading...
Loading...
Generates bash/curl commands for fetching sample data from Hyperliquid API. Use when user wants curl examples, bash commands to test the API, or sample data fetch commands for mainnet.
npx skill4agent add cezar-r/hyperliquid-skills hl-api-sampleshttps://api.hyperliquid.xyz/infoContent-Type: application/jsoncurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "meta"}' | jqcurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "allMids"}' | jqcurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "metaAndAssetCtxs"}' | jq# BTC order book
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "l2Book", "coin": "BTC"}' | jq
# ETH order book
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "l2Book", "coin": "ETH"}' | jq
# SOL order book
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "l2Book", "coin": "SOL"}' | jq# BTC recent trades
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "recentTrades", "coin": "BTC"}' | jq
# ETH recent trades
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "recentTrades", "coin": "ETH"}' | jq# BTC 1-hour candles (last 24 hours)
# Replace START_TIME and END_TIME with millisecond timestamps
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "candleSnapshot", "req": {"coin": "BTC", "interval": "1h", "startTime": 1704067200000, "endTime": 1704153600000}}' | jq
# ETH 15-minute candles
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "candleSnapshot", "req": {"coin": "ETH", "interval": "15m", "startTime": 1704067200000, "endTime": 1704153600000}}' | jq1m5m15m1h4h1d0xYOUR_ADDRESScurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "clearinghouseState", "user": "0xYOUR_ADDRESS"}' | jqcurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "openOrders", "user": "0xYOUR_ADDRESS"}' | jqcurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "frontendOpenOrders", "user": "0xYOUR_ADDRESS"}' | jq# Get fills from a start time (milliseconds)
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "userFills", "user": "0xYOUR_ADDRESS", "startTime": 1704067200000}' | jqcurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "userFunding", "user": "0xYOUR_ADDRESS", "startTime": 1704067200000}' | jqcurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "spotClearinghouseState", "user": "0xYOUR_ADDRESS"}' | jqdex# xyz dex metadata
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "meta", "dex": "xyz"}' | jqcurl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "clearinghouseState", "user": "0xYOUR_ADDRESS", "dex": "xyz"}' | jqxyzflxvntlhynakm@{index}curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "spotMeta"}' | jq# HYPE/USDC candles (index 107)
curl -X POST https://api.hyperliquid.xyz/info \
-H "Content-Type: application/json" \
-d '{"type": "candleSnapshot", "req": {"coin": "@107", "interval": "1h", "startTime": 1704067200000, "endTime": 1704153600000}}' | jqjqDate.now()date +%s000date +%s000echo $(($(date +%s) - 86400))000BTCETHSOLHYPEmeta