# HL Portfolio API MCP server

Hyperliquid account analysis: positions, PnL, fills, orders, funding. x402 pay-per-call.

## Links
- Registry page: https://www.getdrio.com/mcp/io-github-br0ski777-hl-portfolio
- Repository: https://github.com/Br0ski777/hl-portfolio-x402
- Website: https://github.com/Br0ski777/hl-portfolio-x402

## Install
- Endpoint: https://hl-portfolio.api.klymax402.com/mcp
- Auth: Not captured

## Setup notes
- Remote endpoint: https://hl-portfolio.api.klymax402.com/mcp

## Tools
- hyperliquid_get_account_state - Use this when you need to retrieve the full portfolio state of a Hyperliquid perpetuals account. Returns the complete clearinghouse state for any wallet address including account-level metrics and per-position details.

Returns:
1. accountValue: total account equity in USD
2. totalNtlPos: total notional position size across all open positions
3. totalMarginUsed: margin currently locked in positions
4. withdrawable: available balance that can be withdrawn
5. positions[]: array of open positions, each with coin, size, entryPrice, unrealizedPnl, leverage, liquidationPrice, marginType (cross/isolated)

Example output: { accountValue: "125430.50", totalNtlPos: "89200.00", withdrawable: "36230.50", positions: [{ coin: "BTC", size: "1.5", entryPrice: "67500.00", unrealizedPnl: "2340.00", leverage: 5, liquidationPrice: "54200.00", marginType: "cross" }] }

Use this BEFORE analyzing a trader's risk exposure, checking margin health, or evaluating portfolio allocation on Hyperliquid. Essential for copy-trading evaluation and risk monitoring.

Do NOT use for trade history -- use hyperliquid_get_trade_fills instead. Do NOT use for open orders -- use hyperliquid_get_open_orders instead. Do NOT use for funding payments -- use hyperliquid_get_user_funding instead. Do NOT use for vault performance -- use hyperliquid_get_vault_details instead. Do NOT use for whale tracking -- use hyperliquid_detect_whale_trades instead. Endpoint: https://hl-portfolio.api.klymax402.com/mcp
- hyperliquid_get_trade_fills - Use this when you need to retrieve recent trade executions (fills) for a Hyperliquid perpetuals account. Returns the most recent trades with full execution details including realized PnL on closed positions.

Returns:
1. coin: the perpetual market (BTC, ETH, SOL, etc.)
2. side: buy or sell (A = sell/ask, B = buy/bid)
3. size: position size filled
4. price: execution price
5. fee: trading fee paid in USD
6. closedPnl: realized PnL if the trade closed a position (0 if opening)
7. timestamp: execution time in milliseconds
8. hash: transaction hash for the fill
9. crossed: whether the order crossed the spread (taker)

Example output: { fills: [{ coin: "ETH", side: "buy", size: "10.0", price: "3450.50", fee: "0.69", closedPnl: "0.00", timestamp: 1712000000000 }], count: 20 }

Use this to analyze a trader's recent activity, calculate realized PnL, evaluate trading frequency, or audit trade execution quality on Hyperliquid.

Do NOT use for current positions -- use hyperliquid_get_account_state instead. Do NOT use for open/pending orders -- use hyperliquid_get_open_orders instead. Do NOT use for funding payments -- use hyperliquid_get_user_funding instead. Do NOT use for market-wide whale trades -- use hyperliquid_detect_whale_trades instead. Endpoint: https://hl-portfolio.api.klymax402.com/mcp
- hyperliquid_get_open_orders - Use this when you need to see all pending/open orders for a Hyperliquid perpetuals account. Returns every resting order on the book with full order parameters.

Returns:
1. coin: the perpetual market (BTC, ETH, SOL, etc.)
2. side: buy (bid) or sell (ask)
3. limitPx: limit price of the order
4. sz: order size
5. orderType: limit, stop-market, stop-limit, take-profit, etc.
6. reduceOnly: whether the order can only reduce an existing position
7. timestamp: when the order was placed
8. oid: unique order ID

Example output: { orders: [{ coin: "BTC", side: "buy", limitPx: "65000.00", sz: "0.5", orderType: "limit", reduceOnly: false, oid: 123456 }], count: 3 }

Use this to understand a trader's pending strategy, detect limit orders near current price, evaluate order-to-position ratio, or monitor stop-loss placement on Hyperliquid.

Do NOT use for executed trades -- use hyperliquid_get_trade_fills instead. Do NOT use for current positions -- use hyperliquid_get_account_state instead. Do NOT use for market-level orderbook -- use hyperliquid_get_market_data instead. Endpoint: https://hl-portfolio.api.klymax402.com/mcp
- hyperliquid_get_user_funding - Use this when you need to retrieve funding payment history for a Hyperliquid perpetuals account. Returns all funding rate payments received or paid, useful for calculating funding income/expense and evaluating carry trade profitability.

Returns:
1. coin: the perpetual market (BTC, ETH, SOL, etc.)
2. fundingRate: the funding rate applied (positive = longs pay shorts)
3. payment: USD amount received (positive) or paid (negative)
4. timestamp: when the funding payment occurred
5. positionSize: the position size at time of funding

Example output: { funding: [{ coin: "BTC", fundingRate: "0.0001", payment: "-1.35", timestamp: 1712000000000, positionSize: "1.5" }], totalReceived: "45.20", totalPaid: "-12.30", netFunding: "32.90" }

Use this to evaluate funding income for carry/basis trades, calculate total cost of holding positions, or analyze the profitability of a delta-neutral funding strategy on Hyperliquid.

Do NOT use for current positions -- use hyperliquid_get_account_state instead. Do NOT use for market-wide funding rates -- use hyperliquid_get_funding_rates instead. Do NOT use for funding arbitrage opportunities -- use funding_arb_find_opportunities instead. Do NOT use for trade execution history -- use hyperliquid_get_trade_fills instead. Endpoint: https://hl-portfolio.api.klymax402.com/mcp

## Resources
Not captured

## Prompts
Not captured

## Metadata
- Owner: io.github.Br0ski777
- Version: 1.1.0
- Runtime: Sse
- Transports: HTTP
- License: Not captured
- Language: Not captured
- Stars: Not captured
- Updated: May 16, 2026
- Source: https://registry.modelcontextprotocol.io
