@2oolkit/hyperliquid-cli
Advanced tools
+50
-61
@@ -1065,4 +1065,3 @@ #!/usr/bin/env node | ||
| { | ||
| description: "Get all mid prices for perpetual and spot assets on Hyperliquid", | ||
| inputSchema: import_zod.z.object({}) | ||
| description: "Get all mid prices for perpetual and spot assets on Hyperliquid" | ||
| }, | ||
@@ -1079,6 +1078,6 @@ async () => withErrorHandling(async () => { | ||
| description: 'Get perpetual market metadata (instruments, max leverage, decimals). Use dex param for HIP-3 builder-deployed perps (e.g., "xyz")', | ||
| inputSchema: import_zod.z.object({ | ||
| inputSchema: { | ||
| spot: import_zod.z.boolean().optional().describe("Get spot metadata instead"), | ||
| dex: import_zod.z.string().optional().describe("HIP-3 dex name (e.g., xyz) for builder-deployed perps") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1095,6 +1094,6 @@ async ({ spot, dex }) => withErrorHandling(async () => { | ||
| description: "Get ticker data for a specific coin including price, volume, funding. Use dex:coin format for HIP-3 (e.g., xyz:CL)", | ||
| inputSchema: import_zod.z.object({ | ||
| inputSchema: { | ||
| coin: import_zod.z.string().describe("Coin name (e.g., BTC, ETH, xyz:CL for HIP-3)"), | ||
| spot: import_zod.z.boolean().optional().describe("Get spot ticker") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1119,6 +1118,6 @@ async ({ coin, spot }) => withErrorHandling(async () => { | ||
| description: "Get L2 order book for a coin", | ||
| inputSchema: import_zod.z.object({ | ||
| inputSchema: { | ||
| coin: import_zod.z.string().describe("Coin name (e.g., BTC, ETH, xyz:CL for HIP-3)"), | ||
| depth: import_zod.z.number().min(2).max(5).optional().describe("Significant figures (2-5)") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1136,7 +1135,7 @@ async ({ coin, depth }) => withErrorHandling(async () => { | ||
| description: "Get OHLCV candlestick data for a coin", | ||
| inputSchema: import_zod.z.object({ | ||
| inputSchema: { | ||
| coin: import_zod.z.string().describe("Coin name (e.g., BTC, ETH, xyz:CL for HIP-3)"), | ||
| interval: import_zod.z.string().describe("Candle interval (1m, 5m, 15m, 1h, 4h, 1d, etc.)"), | ||
| count: import_zod.z.number().min(1).max(5e3).optional().describe("Number of candles (default 50)") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1160,7 +1159,7 @@ async ({ coin, interval, count }) => withErrorHandling(async () => { | ||
| description: "Get funding rate history or predicted funding rates", | ||
| inputSchema: import_zod.z.object({ | ||
| inputSchema: { | ||
| coin: import_zod.z.string().describe("Coin name (e.g., BTC, ETH, xyz:CL for HIP-3)"), | ||
| hours: import_zod.z.number().optional().describe("Hours to look back (default 24)"), | ||
| predicted: import_zod.z.boolean().optional().describe("Get predicted funding instead") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1185,5 +1184,5 @@ async ({ coin, hours, predicted }) => withErrorHandling(async () => { | ||
| description: "Get recent trades for a coin", | ||
| inputSchema: import_zod.z.object({ | ||
| inputSchema: { | ||
| coin: import_zod.z.string().describe("Coin name (e.g., BTC, ETH, xyz:CL for HIP-3)") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1206,3 +1205,3 @@ async ({ coin }) => withErrorHandling(async () => { | ||
| description: "Place an order on Hyperliquid (limit, market, stop-loss, take-profit)", | ||
| inputSchema: import_zod2.z.object({ | ||
| inputSchema: { | ||
| coin: import_zod2.z.string().describe("Coin name (e.g., BTC, ETH)"), | ||
@@ -1217,3 +1216,3 @@ side: import_zod2.z.enum(["buy", "sell"]).describe("Order side"), | ||
| cloid: import_zod2.z.string().optional().describe("Client order ID (128-bit hex)") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1249,6 +1248,6 @@ async (params) => withErrorHandling(async () => { | ||
| description: "Cancel an order by its order ID", | ||
| inputSchema: import_zod2.z.object({ | ||
| inputSchema: { | ||
| coin: import_zod2.z.string().describe("Coin name"), | ||
| oid: import_zod2.z.number().describe("Order ID") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1267,4 +1266,3 @@ async ({ coin, oid }) => withErrorHandling(async () => { | ||
| { | ||
| description: "List all open orders", | ||
| inputSchema: import_zod2.z.object({}) | ||
| description: "List all open orders" | ||
| }, | ||
@@ -1282,5 +1280,5 @@ async () => withErrorHandling(async () => { | ||
| description: "Get the status of a specific order", | ||
| inputSchema: import_zod2.z.object({ | ||
| inputSchema: { | ||
| oid: import_zod2.z.union([import_zod2.z.number(), import_zod2.z.string()]).describe("Order ID or client order ID") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1297,4 +1295,3 @@ async ({ oid }) => withErrorHandling(async () => { | ||
| { | ||
| description: "List historical orders (max 2000)", | ||
| inputSchema: import_zod2.z.object({}) | ||
| description: "List historical orders (max 2000)" | ||
| }, | ||
@@ -1312,5 +1309,5 @@ async () => withErrorHandling(async () => { | ||
| description: "Get recent trade fills", | ||
| inputSchema: import_zod2.z.object({ | ||
| inputSchema: { | ||
| hours: import_zod2.z.number().optional().describe("Hours to look back") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1338,4 +1335,3 @@ async ({ hours }) => withErrorHandling(async () => { | ||
| { | ||
| description: "List all open perpetual positions with PnL, leverage, and liquidation price", | ||
| inputSchema: import_zod3.z.object({}) | ||
| description: "List all open perpetual positions with PnL, leverage, and liquidation price" | ||
| }, | ||
@@ -1353,7 +1349,7 @@ async () => withErrorHandling(async () => { | ||
| description: "Update leverage for a perpetual asset", | ||
| inputSchema: import_zod3.z.object({ | ||
| inputSchema: { | ||
| coin: import_zod3.z.string().describe("Coin name (e.g., BTC, ETH)"), | ||
| leverage: import_zod3.z.number().min(1).describe("Leverage value"), | ||
| isolated: import_zod3.z.boolean().optional().describe("Use isolated margin (default: cross)") | ||
| }) | ||
| } | ||
| }, | ||
@@ -1372,3 +1368,2 @@ async ({ coin, leverage, isolated }) => withErrorHandling(async () => { | ||
| // src/mcp/tools/account.ts | ||
| var import_zod4 = require("zod"); | ||
| function registerAccountTools(server2) { | ||
@@ -1378,4 +1373,3 @@ server2.registerTool( | ||
| { | ||
| description: "Get perpetual account state (positions, margin summary, balances)", | ||
| inputSchema: import_zod4.z.object({}) | ||
| description: "Get perpetual account state (positions, margin summary, balances)" | ||
| }, | ||
@@ -1392,4 +1386,3 @@ async () => withErrorHandling(async () => { | ||
| { | ||
| description: "Get spot token balances", | ||
| inputSchema: import_zod4.z.object({}) | ||
| description: "Get spot token balances" | ||
| }, | ||
@@ -1406,4 +1399,3 @@ async () => withErrorHandling(async () => { | ||
| { | ||
| description: "Get portfolio summary with PnL history", | ||
| inputSchema: import_zod4.z.object({}) | ||
| description: "Get portfolio summary with PnL history" | ||
| }, | ||
@@ -1420,4 +1412,3 @@ async () => withErrorHandling(async () => { | ||
| { | ||
| description: "Get fee schedule and current rates", | ||
| inputSchema: import_zod4.z.object({}) | ||
| description: "Get fee schedule and current rates" | ||
| }, | ||
@@ -1434,4 +1425,3 @@ async () => withErrorHandling(async () => { | ||
| { | ||
| description: "Get current rate limit status", | ||
| inputSchema: import_zod4.z.object({}) | ||
| description: "Get current rate limit status" | ||
| }, | ||
@@ -1448,4 +1438,3 @@ async () => withErrorHandling(async () => { | ||
| { | ||
| description: "List sub-accounts", | ||
| inputSchema: import_zod4.z.object({}) | ||
| description: "List sub-accounts" | ||
| }, | ||
@@ -1462,3 +1451,3 @@ async () => withErrorHandling(async () => { | ||
| // src/mcp/tools/transfer.ts | ||
| var import_zod5 = require("zod"); | ||
| var import_zod4 = require("zod"); | ||
| function registerTransferTools(server2) { | ||
@@ -1469,6 +1458,6 @@ server2.registerTool( | ||
| description: "Send USDC to another address on Hyperliquid", | ||
| inputSchema: import_zod5.z.object({ | ||
| destination: import_zod5.z.string().describe("Destination address"), | ||
| amount: import_zod5.z.string().describe("Amount of USDC") | ||
| }) | ||
| inputSchema: { | ||
| destination: import_zod4.z.string().describe("Destination address"), | ||
| amount: import_zod4.z.string().describe("Amount of USDC") | ||
| } | ||
| }, | ||
@@ -1486,7 +1475,7 @@ async ({ destination, amount }) => withErrorHandling(async () => { | ||
| description: "Send a spot token to another address", | ||
| inputSchema: import_zod5.z.object({ | ||
| destination: import_zod5.z.string().describe("Destination address"), | ||
| token: import_zod5.z.string().describe("Token identifier (e.g., PURR:0x...)"), | ||
| amount: import_zod5.z.string().describe("Amount to send") | ||
| }) | ||
| inputSchema: { | ||
| destination: import_zod4.z.string().describe("Destination address"), | ||
| token: import_zod4.z.string().describe("Token identifier (e.g., PURR:0x...)"), | ||
| amount: import_zod4.z.string().describe("Amount to send") | ||
| } | ||
| }, | ||
@@ -1504,6 +1493,6 @@ async ({ destination, token, amount }) => withErrorHandling(async () => { | ||
| description: "Withdraw USDC to Arbitrum (~5 min finalization, $1 fee)", | ||
| inputSchema: import_zod5.z.object({ | ||
| destination: import_zod5.z.string().describe("Destination address on Arbitrum"), | ||
| amount: import_zod5.z.string().describe("Amount of USDC") | ||
| }) | ||
| inputSchema: { | ||
| destination: import_zod4.z.string().describe("Destination address on Arbitrum"), | ||
| amount: import_zod4.z.string().describe("Amount of USDC") | ||
| } | ||
| }, | ||
@@ -1521,6 +1510,6 @@ async ({ destination, amount }) => withErrorHandling(async () => { | ||
| description: "Transfer USDC between spot and perpetuals accounts", | ||
| inputSchema: import_zod5.z.object({ | ||
| amount: import_zod5.z.string().describe("Amount to transfer"), | ||
| to_perp: import_zod5.z.boolean().describe("true = spot->perp, false = perp->spot") | ||
| }) | ||
| inputSchema: { | ||
| amount: import_zod4.z.string().describe("Amount to transfer"), | ||
| to_perp: import_zod4.z.boolean().describe("true = spot->perp, false = perp->spot") | ||
| } | ||
| }, | ||
@@ -1527,0 +1516,0 @@ async ({ amount, to_perp }) => withErrorHandling(async () => { |
+2
-2
| { | ||
| "name": "@2oolkit/hyperliquid-cli", | ||
| "version": "0.2.3", | ||
| "version": "0.2.4", | ||
| "description": "CLI & MCP server for Hyperliquid DEX — trade perpetuals & spot, manage orders, and query market data", | ||
@@ -63,3 +63,3 @@ "author": "haeminmoon", | ||
| "ethers": "^6.13.5", | ||
| "zod": "^3.24.0" | ||
| "zod": "^3.24.4" | ||
| }, | ||
@@ -66,0 +66,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
379698
-0.51%3420
-0.32%Updated