/mirra:hypertradefrom mirra
Integrates with Hyperliquid DEX via Mirra API for perpetual futures trading operations including order placement, position management, market data, and account queries.
Ships in mirra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Hyperliquid DEX integration for perpetual futures trading
You need the user's API key. Ask for these if not provided:
API_KEY: Mirra API key (generated in Mirra app > Settings > API Keys)API_URL: Defaults to https://api.fxn.world (only ask if they mention a custom server)All operations use a single POST endpoint with the resource ID and method in the body:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{
"resourceId": "hypertrade",
"method": "{operation}",
"params": { ...args }
}' | jq .
Replace {operation} with the operation name from the table below.
Legacy alternative:
POST ${API_URL}/api/sdk/v1/hypertrade/{operation}with args as the request body also works but is not recommended for new integrations.
| Operation | Description |
|---|---|
placeOrder | Place an order on Hyperliquid DEX. Returns a pending order for the user to sign in delegated mode... |
cancelOrder | Cancel an open order on Hyperliquid DEX. Can cancel by orderId, clientOrderId, or cancel all orde... |
getPositions | Get current perpetual positions for a wallet. Returns normalized FLAT array of positions with ass... |
getOpenOrders | Get open orders for a wallet. Returns normalized FLAT array of orders. |
getBalances | Get account balances including perp margin and spot balances. Returns normalized FLAT structure. |
getMarketInfo | Get market information for perpetual assets. Returns normalized FLAT array of market info. If ass... |
getOrderbook | Get the L2 orderbook for an asset. Returns normalized FLAT structure with bids and asks arrays. |
getCandles | Get candlestick/OHLCV data for an asset. Returns normalized FLAT array of candles. |
setLeverage | Set leverage for an asset on Hyperliquid. Returns a pending action for the user to sign. |
getTradeHistory | Get trade fill history for a wallet. Returns normalized FLAT array of trades. |
placeOrderPlace an order on Hyperliquid DEX. Returns a pending order for the user to sign in delegated mode, or submits directly in standard mode. FLAT response.
Arguments:
asset (string, required): Asset/coin symbol (e.g. "ETH", "BTC")isBuy (boolean, required): True for long/buy, false for short/sellsize (number, required): Order size in asset unitslimitPrice (number, optional): Limit price (required for limit orders)orderType (string, optional): Order type: "limit" or "market" (default: "market")triggerPrice (number, optional): Trigger price for stop/take-profit ordersreduceOnly (boolean, optional): Whether order can only reduce position (default: false)postOnly (boolean, optional): Whether order should only be maker (default: false)clientOrderId (string, optional): Custom client order ID for trackingReturns:
AdapterOperationResult: Returns pending order details. FLAT structure.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"placeOrder","params":{"asset":"<value>","isBuy":true,"size":10}}' | jq .
Warning: This is a destructive operation. Confirm with the user before executing.
cancelOrderCancel an open order on Hyperliquid DEX. Can cancel by orderId, clientOrderId, or cancel all orders for an asset.
Arguments:
asset (string, required): Asset/coin symbol (e.g. "ETH", "BTC")orderId (number, optional): Order ID to cancelclientOrderId (string, optional): Client order ID to cancelcancelAll (boolean, optional): Cancel all orders for this asset (default: false)Returns:
AdapterOperationResult: Returns cancellation result. FLAT structure.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"cancelOrder","params":{"asset":"<value>"}}' | jq .
Warning: This is a destructive operation. Confirm with the user before executing.
getPositionsGet current perpetual positions for a wallet. Returns normalized FLAT array of positions with asset, size, entryPrice, markPrice, unrealizedPnl, leverage, liquidationPrice, marginUsed, positionValue, returnOnEquity, side.
Arguments:
walletAddress (string, optional): EVM wallet address (uses context wallet if not provided)Returns:
AdapterOperationResult: Returns { positions[] }. Each position has FLAT fields. No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"getPositions","params":{}}' | jq .
getOpenOrdersGet open orders for a wallet. Returns normalized FLAT array of orders.
Arguments:
walletAddress (string, optional): EVM wallet address (uses context wallet if not provided)asset (string, optional): Filter by asset/coin symbolReturns:
AdapterOperationResult: Returns { orders[] }. Each order has FLAT fields: asset, orderId, side, size, originalSize, price, orderType, reduceOnly, timestamp, triggerCondition, triggerPrice, isTrigger. No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"getOpenOrders","params":{}}' | jq .
getBalancesGet account balances including perp margin and spot balances. Returns normalized FLAT structure.
Arguments:
walletAddress (string, optional): EVM wallet address (uses context wallet if not provided)Returns:
AdapterOperationResult: Returns { accountValue, totalMarginUsed, withdrawable, perpEquity, spotBalances[] }. Each spotBalance has FLAT fields: coin, total, hold, available. No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"getBalances","params":{}}' | jq .
getMarketInfoGet market information for perpetual assets. Returns normalized FLAT array of market info. If asset is provided, returns only that asset.
Arguments:
asset (string, optional): Specific asset/coin symbol to get info for (returns all if omitted)Returns:
AdapterOperationResult: Returns { markets[] }. Each market has FLAT fields: asset, markPrice, midPrice, oraclePrice, openInterest, funding, dayVolume, prevDayPrice, maxLeverage, szDecimals. No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"getMarketInfo","params":{}}' | jq .
getOrderbookGet the L2 orderbook for an asset. Returns normalized FLAT structure with bids and asks arrays.
Arguments:
asset (string, required): Asset/coin symbol (e.g. "ETH", "BTC")depth (number, optional): Number of levels to return (default: all)Returns:
AdapterOperationResult: Returns { asset, bids[], asks[], spread, midPrice, timestamp }. Each level has FLAT fields: price, size, numOrders. No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"getOrderbook","params":{"asset":"<value>"}}' | jq .
getCandlesGet candlestick/OHLCV data for an asset. Returns normalized FLAT array of candles.
Arguments:
asset (string, required): Asset/coin symbol (e.g. "ETH", "BTC")interval (string, optional): Candle interval (e.g. "1m", "5m", "1h", "1d"). Default: "1h"startTime (number, optional): Start time in milliseconds (default: 24h ago)endTime (number, optional): End time in milliseconds (default: now)limit (number, optional): Max number of candles to returnReturns:
AdapterOperationResult: Returns { asset, interval, candles[] }. Each candle has FLAT fields: timestamp, open, high, low, close, volume, numTrades. No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"getCandles","params":{"asset":"<value>"}}' | jq .
setLeverageSet leverage for an asset on Hyperliquid. Returns a pending action for the user to sign.
Arguments:
asset (string, required): Asset/coin symbol (e.g. "ETH", "BTC")leverage (number, required): Leverage multiplier (e.g. 5 for 5x)isCrossMargin (boolean, optional): Use cross margin (default: true). False for isolated margin.Returns:
AdapterOperationResult: Returns leverage update result. FLAT structure.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"setLeverage","params":{"asset":"<value>","leverage":10}}' | jq .
Warning: This is a destructive operation. Confirm with the user before executing.
getTradeHistoryGet trade fill history for a wallet. Returns normalized FLAT array of trades.
Arguments:
walletAddress (string, optional): EVM wallet address (uses context wallet if not provided)asset (string, optional): Filter by asset/coin symbollimit (number, optional): Max number of trades to returnReturns:
AdapterOperationResult: Returns { trades[] }. Each trade has FLAT fields: asset, tradeId, orderId, side, price, size, fee, feeToken, closedPnl, timestamp, direction, crossed, hash. No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"hypertrade","method":"getTradeHistory","params":{}}' | jq .
All SDK responses return the operation payload wrapped in a standard envelope:
{
"success": true,
"data": { ... }
}
The data field contains the operation result. Error responses include:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message"
}
}
jq . to pretty-print responses, jq .data to extract just the payloaddata.results or directly in data (check examples)--fail-with-body to curl to see error details on HTTP failuresexport API_KEY="your-key"What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub oz-networks/mirra-sdk --plugin mirra39 skills in this plugin
/aiUse Mirra to access ai services for chat, decisions, and streaming with multi-provider support. Covers all AI Services SDK operations via REST API./channelsUse Mirra to the places a space publishes to — its corporate x, blog, newsletter — and the drafted copy waiting to go out to them. use listchannels to see what this space.... Covers all Space Channels SDK operations via REST API./contactsUse Mirra to manage user contacts - list, add, remove, search, block, and unblock contacts. Covers all Contacts SDK operations via REST API./coworkCowork with another person's Claude Code over a shared Mirra group chat. Post questions, wait for replies in near-real-time (long-poll), and hand off follow-ups. Rides the Mirra Messaging adapter — no extra integration to install./cryptoUse Mirra to cryptocurrency price monitoring and token transfers. Covers all Crypto SDK operations via REST API./dashboardsUse Mirra to living dashboards — natively-rendered grids of typed widgets (stat, image_card, list, progress, sparkline) that flows keep current by pushing data into them..... Covers all Dashboards SDK operations via REST API.