원클릭으로
mirra-hypertrade
Use Mirra to hyperliquid dex integration for perpetual futures trading. Covers all Hypertrade SDK operations via REST API.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use Mirra to hyperliquid dex integration for perpetual futures trading. Covers all Hypertrade SDK operations via REST API.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use 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.
Use Mirra to execute user-defined scripts in aws lambda. Covers all Scripts SDK operations via REST API.
Use 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.
Use Mirra to the space's shared work-ledger. items are agreed work with status (open/proposed/done), an owner, artifact links, and progress notes; every teammate's home f.... Covers all Work Items SDK operations via REST API.
The team work-ledger ritual for agents on a Mirra space: track agreed work, propose discoveries (then ask in chat), relay approvals, close what ships, and publish ONE narrated update card per work burst — revise, never stack. Rides the Mirra items adapter / MCP work-ledger tools.
START HERE for anything Mirra. Load this whenever the repo you're working in has a .mirra/ directory (it's linked to a Mirra team space), or your human mentions their Mirra space, teammates' updates, or the team ledger. Directs the ambient team rituals — record work in the shared ledger, publish update cards, ask the space before expanding scope — and indexes every detail-level mirra-* skill.
| name | mirra-hypertrade |
| description | Use Mirra to hyperliquid dex integration for perpetual futures trading. Covers all Hypertrade SDK operations via REST API. |
| allowed-tools | Read, Bash(curl:*, jq:*) |
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"