Skip to content

wtfsayo/hyperliquid-info

v0.3.0MIT

Read-only Hyperliquid Info API — perps/spot meta, books, candles, funding, clearinghouse, fills, vaults, staking, HIP-3/4. No signing / no /exchange.

hyperliquid-info

Cursor / Agent Plugin wrapping Hyperliquid’s public Info API (POST /info).

Read-only. No /exchange, no private keys, no order placement.

Docs: Info endpoint · Perpetuals · Spot

Domain types

TypeMeaning
MidMapcoin → mid price string
L2Book{ coin, time, levels: [bids, asks] }
RecentTrade{ coin, side, px, sz, time, tid, users }
AssetMeta / SpotMetauniverse + margin / tokens + spot pairs
AssetCtx / SpotAssetCtxmark / oracle / funding / OI / day volume
ClearinghouseStatemargin + positions for a user
SpotClearinghouseStatespot balances (balances[])
OpenOrder / FrontendOpenOrder / UserFill / Candle / FundingRateas named
Portfolioday/week/month/allTime (+ perp*) PnL & accountValue histories
UserFeesfee schedule + user rates + staking/referral discounts
VaultDetails / UserVaultEquityvault APR, followers, equity
DelegatorSummary / ValidatorSummarystaking state
BorrowLendReserveStatesupply/borrow rates & utilization
OutcomeMeta / SettledOutcomeHIP-4 outcome markets

Install (Cursor IDE)

  1. Clone this repo (or copy the folder).
  2. Copy into a real directory: ~/.cursor/plugins/local/hyperliquid-info
  3. Reload Window / enable local plugins if your org gates imports.

Install (Claude Code)

Clone this repo, then start Claude Code with claude --plugin-dir /path/to/hyperliquid-plugin. .claude-plugin/plugin.json loads the skill and starts the MCP server with node ${CLAUDE_PLUGIN_ROOT}/server/index.mjs. The server has no dependencies, so it needs only Node on PATH and no npm install.

For testnet, export HYPERLIQUID_API_URL before you launch Claude Code.

MCP tools (59)

Every tool is read-only and returns compact JSON as text. List tools return a page: { total, returned, offset, next_offset, truncated, items }, with limit (default 50, max 500) and offset inputs. Market tables also take coins (e.g. ["BTC","ETH"]). No result is larger than 40,000 characters; anything bigger asks you to narrow the request. Upstream errors come back as tool errors (isError) with the HTTP reason and a hint. Each request times out after 15 s (HYPERLIQUID_TIMEOUT_MS).

Market / meta

ToolReturns
get_all_midsMidMap (coins to filter)
get_l2_bookL2Book (coin)
get_recent_tradesRecentTrade[] (coin)
get_metaperp universe + margin tables
get_meta_and_asset_ctxsone row per perp: meta + mark / funding / OI / volume (coins)
get_all_perp_metasmetas across all perp dexs (HIP-3)
get_perp_dexsbuilder-deployed dex list
get_perp_dex_limitsOI / transfer caps (dex required)
get_perp_dex_statusnet deposits etc.
get_perps_at_open_interest_capcoins at OI cap
get_perp_deploy_auction_statusperp deploy auction
get_perp_annotationcategory/description (coin)
get_perp_categories[[coin, category], …]
get_perp_concise_annotationsconcise annotations
get_margin_tablemargin tiers by id
get_candlesOHLCV (coin, interval; default last 100 bars, max 200)
get_funding_historyhistorical funding (coin; default last 24h)
get_predicted_fundingscross-venue predicted funding
get_exchange_statusspecialStatuses + time

Spot / outcomes / borrow-lend

ToolReturns
get_spot_metaspot pairs with base/quote token names and ids (coins)
get_spot_meta_and_asset_ctxsspot pair rows + mid / mark / volume / supply (coins)
get_token_detailssupply / mid / mark + genesis list counts (tokenId; genesis pages one list)
get_spot_pair_deploy_auction_statusspot pair auction
get_spot_deploy_statedeployer auction state (user)
get_spot_clearinghouse_statespot balances (user)
get_outcome_metaHIP-4 questions, deployers, paged outcomes
get_settled_outcomesettled outcome (outcome)
get_all_borrow_lend_reserve_statesall reserve states
get_borrow_lend_reserve_stateone token (token)
get_borrow_lend_user_stateuser borrow/lend (user)

User

ToolReturns
get_clearinghouse_stateperp account (user)
get_open_ordersresting orders (user)
get_frontend_open_ordersorders + trigger/TP-SL fields
get_historical_ordersrecent historical orders
get_user_fillsrecent fills
get_user_fills_by_timefills by time range
get_user_fundingfunding payments ledger
get_user_non_funding_ledger_updatesdeposits/transfers/withdrawals
get_user_twap_slice_fillsTWAP slice fills
get_order_statusstatus by oid / cloid
get_active_asset_dataleverage / trade sizes (user, coin)
get_user_rate_limitrequest / volume caps
get_user_roleuser / agent / vault / subAccount
get_user_feesfees + schedule
get_portfolioportfolio histories (period for one)
get_sub_accountssub-accounts
get_extra_agentsnamed API agents
get_referralreferral / rewards
get_user_abstractionabstraction mode
get_user_dex_abstractionHIP-3 dex abstraction flag
get_approved_buildersapproved builders
get_max_builder_feemax fee (user, builder)

Vault / staking

ToolReturns
get_vault_detailsvault APR / leader / paged followers (vaultAddress; period adds history)
get_user_vault_equitiesvault equities for user
get_delegationsstaking delegations
get_delegator_summarydelegated / pending
get_delegator_historystake events
get_delegator_rewardsrewards
get_validator_summariesvalidators

Pass the master/sub-account address for user queries — not an agent wallet.

Network

Default: https://api.hyperliquid.xyz

Testnet: set HYPERLIQUID_API_URL=https://api.hyperliquid-testnet.xyz in the environment. Claude Code passes it through .claude-plugin/plugin.json; for Cursor, add it under env in mcp.json.

Skill

skills/hyperliquid-info/SKILL.md — address and coin conventions, result sizing, and error handling.

Test

npm test runs test/smoke.mjs. It starts the server over stdio and checks initialize, tools/list, argument validation, timeouts and drain-on-close. Then it calls every tool with the args in test/fixtures.json against the live API and checks that each result fits the size cap and is not an error. The live calls are skipped when the API is unreachable or SMOKE_OFFLINE=1 is set. CI runs it on every push and daily (.github/workflows/smoke.yml).

License

MIT

Repository

https://github.com/wtfsayo/hyperliquid-plugin