{"uid":"cap_0wo0cbfQSlFENx4LKgF1l","slug":"x402stock-perpetuals-account-lookup-85b71ce5","name":"x402stock Perpetuals Account Lookup","description":"Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.","url":"https://x402stock.xyz/api/v1/perps/account/%7Baddress%7D","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["limit"],"properties":{"limit":{"type":"integer","default":200,"maximum":1000,"minimum":0}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["source","as_of","venue","market","address","account_value","total_notional_position","total_raw_usd","total_margin_used","maintenance_margin_used","withdrawable","positions","open_orders_count","open_orders"],"properties":{"as_of":{"type":"string"},"venue":{"type":"string"},"market":{"type":"string","const":"perp"},"source":{"type":"string","const":"x402stock"},"address":{"type":"string"},"positions":{"type":"array","items":{"type":"object","required":["coin","size","side","leverage","leverage_type","entry_price","position_value","unrealized_pnl","return_on_equity","liquidation_price","margin_used","max_leverage","funding_since_open"],"properties":{"coin":{"type":"string"},"side":{"anyOf":[{"enum":["long","short"],"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"leverage":{"anyOf":[{"type":"number"},{"type":"null"}]},"entry_price":{"anyOf":[{"type":"number"},{"type":"null"}]},"margin_used":{"anyOf":[{"type":"number"},{"type":"null"}]},"max_leverage":{"type":"number"},"leverage_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"position_value":{"anyOf":[{"type":"number"},{"type":"null"}]},"unrealized_pnl":{"anyOf":[{"type":"number"},{"type":"null"}]},"return_on_equity":{"anyOf":[{"type":"number"},{"type":"null"}]},"liquidation_price":{"anyOf":[{"type":"number"},{"type":"null"}]},"funding_since_open":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}},"open_orders":{"type":"array","items":{"type":"object","required":["coin","side","limit_price","size","orig_size","order_id","timestamp"],"properties":{"coin":{"type":"string"},"side":{"anyOf":[{"enum":["buy","sell"],"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"number"},{"type":"null"}]},"order_id":{"type":"number"},"orig_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}]},"limit_price":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}},"withdrawable":{"anyOf":[{"type":"number"},{"type":"null"}]},"account_value":{"anyOf":[{"type":"number"},{"type":"null"}]},"total_raw_usd":{"anyOf":[{"type":"number"},{"type":"null"}]},"open_orders_count":{"type":"number"},"total_margin_used":{"anyOf":[{"type":"number"},{"type":"null"}]},"maintenance_margin_used":{"anyOf":[{"type":"number"},{"type":"null"}]},"total_notional_position":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}}}}},"responseSchema":{"type":"json","example":{"as_of":"2026-06-06T00:00:00.000Z","venue":"hyperliquid","market":"perp","source":"x402stock","address":"0x31ca8395cf837de08b24da3f660e77761dfb974b","positions":[{"coin":"BTC","side":"short","size":-0.59864,"leverage":20,"entry_price":61691.7,"margin_used":1851.62,"max_leverage":50,"leverage_type":"cross","position_value":37032.47,"unrealized_pnl":-101.3,"return_on_equity":-0.0548573051,"liquidation_price":5078920.58,"funding_since_open":-54.32}],"open_orders":[{"coin":"WLD","side":"buy","size":555,"order_id":461295382727,"orig_size":555,"timestamp":"2026-06-06T00:00:00.000Z","limit_price":0.45186}],"withdrawable":2739294.87,"account_value":3066130.2,"total_raw_usd":2840711.89,"open_orders_count":1,"total_margin_used":163417.67,"maintenance_margin_used":32683.53,"total_notional_position":3268353.3}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_d4_K-5SY5I6R6RgorI78x","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the full on-chain perpetuals account snapshot for a given wallet address on Hyperliquid, including positions, margin, PnL, and open orders","exampleAgentPrompt":"Pull up my Hyperliquid perpetuals account snapshot for wallet 0x31ca8395cf837de08b24da3f660e77761dfb974b — I want to see my open positions, unrealized PnL, margin used, liquidation prices, and any open orders.","exampleUseCases":[{"title":"Check liquidation risk on positions","prompt":"I'm worried about getting liquidated — can you pull the full account snapshot for my Hyperliquid perps wallet 0x4a7b2c9d1e3f5a8b6c0d2e4f7a1b3c5d and tell me how close I am to liquidation on each position, what my maintenance margin looks like, and whether I have enough withdrawable balance to add more margin if needed?"},{"title":"Monitor leverage and funding costs","prompt":"For my on-chain perps wallet 0x8d3f1a2b4c6e9f0a7b5c3d1e2f4a6b8c, pull up the latest account snapshot and break down the leverage I'm using on each position, what funding payments I've accumulated since open, and flag any positions where my margin usage seems dangerously high."},{"title":"Review open orders before market open","prompt":"Before trading kicks off, grab the full Hyperliquid perpetuals snapshot for wallet 0x2e5f7a9b1c3d4e6f8a0b2c4d6e8f0a1b and show me all my open limit orders alongside my current positions — I want to make sure my orders are still priced sensibly relative to my entry prices and unrealized PnL."}],"resultDescription":"A JSON snapshot of the wallet's perpetuals account on Hyperliquid, including: account value, withdrawable balance, total margin used, maintenance margin, total notional position, an array of open positions (coin, side, size, leverage, entry price, position value, unrealized PnL, ROE, liquidation price, margin used, max leverage, funding since open), and an array of open orders (coin, side, size, order ID, timestamp, limit price).","failureModes":["Invalid or malformed wallet address returns an error or empty positions array","Address with no perps activity returns empty positions and orders arrays","Hyperliquid data source temporarily unavailable causing upstream timeout","limit parameter out of range (>1000 or <0) returns validation error","Missing address path parameter causes 404 or 400 response"],"whenToPreferThis":"Use this endpoint when you need a real-time snapshot of a specific wallet's on-chain perpetuals account on Hyperliquid — including positions, margin, PnL, and open orders — without needing an API key or account. Prefer this over exchange-specific APIs when you want pay-per-call pricing in USDC and no authentication overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-08T12:58:04.680Z","isFirstParty":false}