بنقرة واحدة
hyperliquid
Trade perpetual futures & spot on Hyperliquid DEX — market data, orders, positions, and vaults.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Trade perpetual futures & spot on Hyperliquid DEX — market data, orders, positions, and vaults.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Trustless ERC-8183 job evaluation — run Client's verification program inside a zkVM with ZK proof.
Binance official spot trading skill — place orders, manage accounts, and access real-time market data via Binance Spot API. Sourced from github.com/binance/binance-skills-hub.
Create, fund, and settle on-chain agent jobs via ERC-8183 Agentic Commerce Protocol.
Binance Web3 official skill — query any wallet address for token holdings, balances, and portfolio data across BSC, Base, and Solana. Sourced from github.com/binance/binance-skills-hub.
Binance Web3 official skill — crypto market rankings including trending tokens, smart money inflow, social hype, meme ranks, and top trader PnL leaderboards. Sourced from github.com/binance/binance-skills-hub.
Binance Web3 official skill — real-time meme token launchpad tracking and AI-powered trending topic discovery on Solana and BSC. Sourced from github.com/binance/binance-skills-hub.
| name | hyperliquid |
| description | Trade perpetual futures & spot on Hyperliquid DEX — market data, orders, positions, and vaults. |
| metadata | {"cryptoclaw":{"emoji":"💎","always":true}} |
Trade perpetual futures and spot tokens on Hyperliquid — a high-performance DEX built on its own L1 chain. USDC is the primary collateral for perpetuals; the native token is HYPE.
Mainnet:
POST https://api.hyperliquid.xyz/info # read-only queries
POST https://api.hyperliquid.xyz/exchange # signed trading actions
WSS wss://api.hyperliquid.xyz/ws # real-time subscriptions
Testnet:
POST https://api.hyperliquid-testnet.xyz/info
POST https://api.hyperliquid-testnet.xyz/exchange
WSS wss://api.hyperliquid-testnet.xyz/ws
All requests use POST with JSON body Content-Type: application/json.
{ "type": "meta" }
Returns universe array (coin name, szDecimals, maxLeverage) and margin tables.
{ "type": "metaAndAssetCtxs" }
Returns metadata plus per-asset context: mark price, funding rate, open interest, 24h volume.
{ "type": "allMids" }
Returns { "BTC": "62345.5", "ETH": "3012.1", ... } — mid prices for every listed asset.
{ "type": "l2Book", "coin": "BTC", "nSigFigs": 5 }
nSigFigs: 2–5, controls price level groupinglevels: [[{px, sz, n}]] for bids and asks (up to 20 levels per side){
"type": "candleSnapshot",
"req": { "coin": "ETH", "interval": "1h", "startTime": 1700000000000, "endTime": 1700100000000 }
}
Intervals: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 1M
Returns: [{ t, T, s, i, o, c, h, l, v, n }] (open/close/high/low/volume).
{ "type": "fundingHistory", "coin": "BTC", "startTime": 1700000000000 }
Returns array of { coin, fundingRate, premium, time }. Max 500 per query; paginate with last time.
{ "type": "clearinghouseState", "user": "0x..." }
Returns: marginSummary (accountValue, totalMarginUsed, withdrawable), assetPositions array (coin, size, entryPx, unrealizedPnl, leverage, liquidationPx).
{ "type": "openOrders", "user": "0x..." }
Returns array of { coin, side, limitPx, sz, oid, timestamp }.
{ "type": "userFills", "user": "0x..." }
Returns array of { coin, px, sz, side, time, fee, oid, crossed }.
{ "type": "orderStatus", "user": "0x...", "oid": 12345 }
Returns order details and current status (open, filled, cancelled).
{ "type": "spotMeta" }
Returns tokens array and universe (trading pairs with index, name, tokens).
{ "type": "spotMetaAndAssetCtxs" }
Returns spot metadata plus per-pair context: mark price, mid price, 24h volume.
{ "type": "spotClearinghouseState", "user": "0x..." }
Returns user's spot token balances.
{ "type": "vaultDetails", "vaultAddress": "0x..." }
Returns vault info: leader, followers, portfolio, APR, PnL history.
All exchange requests require EIP-712 signatures (see Authentication below).
{
"action": {
"type": "order",
"orders": [{
"a": 0,
"b": true,
"p": "62000",
"s": "0.01",
"r": false,
"t": { "limit": { "tif": "Gtc" } }
}],
"grouping": "na"
},
"nonce": 1700000000000,
"signature": { ... }
}
Fields:
a: asset index (from meta universe)b: true = buy/long, false = sell/shortp: price (string)s: size in base asset (string)r: reduce-onlyt: order type — { "limit": { "tif": "Gtc" } }, { "limit": { "tif": "Ioc" } }, or { "limit": { "tif": "Alo" } }Time-in-force: Gtc (Good-til-Cancel), Ioc (Immediate-or-Cancel), Alo (Add-Liquidity-Only / post-only).
{
"action": {
"type": "cancel",
"cancels": [{ "a": 0, "o": 12345 }]
},
"nonce": 1700000000000,
"signature": { ... }
}
a: asset index, o: order ID{
"action": {
"type": "batchModify",
"modifies": [{
"oid": 12345,
"order": { "a": 0, "b": true, "p": "63000", "s": "0.01", "r": false, "t": { "limit": { "tif": "Gtc" } } }
}]
},
"nonce": 1700000000000,
"signature": { ... }
}
{
"action": {
"type": "twapOrder",
"twap": { "a": 0, "b": true, "s": "1.0", "r": false, "m": 10, "t": true }
},
"nonce": 1700000000000,
"signature": { ... }
}
m: duration in minutes, t: randomize{
"action": {
"type": "updateLeverage",
"asset": 0,
"isCross": true,
"leverage": 10
},
"nonce": 1700000000000,
"signature": { ... }
}
{
"action": {
"type": "updateIsolatedMargin",
"asset": 0,
"isBuy": true,
"ntli": 100
},
"nonce": 1700000000000,
"signature": { ... }
}
ntli: signed integer, positive to add margin, negative to remove{
"action": {
"type": "usdClassTransfer",
"amount": "100",
"toPerp": true
},
"nonce": 1700000000000,
"signature": { ... }
}
{
"action": {
"type": "vaultTransfer",
"vaultAddress": "0x...",
"isDeposit": true,
"usd": 1000000
},
"nonce": 1700000000000,
"signature": { ... }
}
usd: amount in raw units (6 decimals, e.g. 1000000 = 1 USDC)Connect to wss://api.hyperliquid.xyz/ws and send:
{ "method": "subscribe", "subscription": { "type": "<channel>", ... } }
| Channel | Params | Description |
|---|---|---|
allMids | — | All mid prices (streaming) |
trades | coin | Real-time trades for a coin |
l2Book | coin | Order book updates |
candle | coin, interval | Live candle updates |
userEvents | user | Fills, order updates, margin changes for a user |
liquidation | — | Real-time liquidation feed |
Limits per connection: max 1000 subscriptions, max 2000 messages/min sent.
Exchange endpoints require EIP-712 typed data signatures.
nonce: current timestamp in milliseconds — must be unique and increasingsignatureChainId: "0x66eee" for mainnet (chain ID 421614 hex), varies per environmentsign_l1_action (for trading) and sign_user_signed_action (for agent setup)Strongly recommended: Use the official Python SDK (hyperliquid-python-sdk) or a community TypeScript SDK for signing. Manual EIP-712 construction is error-prone.
1 + floor(batch_size / 40)Common tickers (asset index from meta universe):
| Ticker | Description |
|---|---|
| BTC | Bitcoin perpetual |
| ETH | Ethereum perpetual |
| SOL | Solana perpetual |
| BNB | BNB perpetual |
| ARB | Arbitrum perpetual |
| DOGE | Dogecoin perpetual |
| AVAX | Avalanche perpetual |
| MATIC | Polygon perpetual |
| OP | Optimism perpetual |
| APT | Aptos perpetual |
| SUI | Sui perpetual |
| HYPE | Hyperliquid native token perpetual |
For the full list and exact asset indices, query { "type": "meta" }.
Spot assets use index 10000 + spotIndex (from spotMeta universe).
clearinghouseState before orders to verify sufficient marginGtc limit orders — avoid Ioc market orders unless user explicitly requestsUser: "What's the current BTC price on Hyperliquid?"
-> POST /info with { "type": "allMids" }, return BTC mid price
User: "Show me ETH order book"
-> POST /info with { "type": "l2Book", "coin": "ETH", "nSigFigs": 5 }
-> Display top 5 bid/ask levels with size
User: "Show my open positions"
-> POST /info with { "type": "clearinghouseState", "user": "<active_wallet>" }
-> Display positions table: coin, side, size, entry, unrealizedPnl, leverage, liqPx
User: "Long 0.1 BTC at $62,000 with 5x leverage"
-> First set leverage: updateLeverage asset=BTC, leverage=5, isCross=true
-> Then place order: buy 0.1 BTC @ $62,000 GTC
-> Show order summary, ask for confirmation, then execute
User: "Cancel all my open orders"
-> Query openOrders for user -> batch cancel all returned oids
User: "What's the funding rate for ETH?"
-> POST /info with { "type": "metaAndAssetCtxs" }, extract ETH funding from asset context
User: "Show me the 4h ETH chart"
-> POST /info with { "type": "candleSnapshot", "req": { "coin": "ETH", "interval": "4h", ... } }
-> Summarize recent candles: open, close, high, low, volume trend
User: "Transfer 500 USDC from spot to perp wallet"
-> POST /exchange with usdClassTransfer, amount="500", toPerp=true
time as startTime for next page10000 + index from spotMeta universe