# webData2

## POST /info

> Request comprehensive user and market data.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid API - info/webData2","version":"1.0.0"},"tags":[{"name":"webData2"}],"servers":[{"url":"https://api.hyperliquid.xyz","description":"Mainnet"},{"url":"https://api.hyperliquid-testnet.xyz","description":"Testnet"}],"paths":{"/info":{"post":{"tags":["webData2"],"description":"Request comprehensive user and market data.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of request.","enum":["webData2"]},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."}},"required":["type","user"],"description":"Request comprehensive user and market data."}}},"required":true},"responses":{"200":{"description":"Comprehensive user and market data.","content":{"application/json":{"schema":{"type":"object","properties":{"clearinghouseState":{"type":"object","properties":{"marginSummary":{"type":"object","properties":{"accountValue":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total account value."},"totalNtlPos":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total notional position value."},"totalRawUsd":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total raw USD value."},"totalMarginUsed":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total margin used."}},"required":["accountValue","totalNtlPos","totalRawUsd","totalMarginUsed"],"description":"Margin summary details."},"crossMarginSummary":{"type":"object","properties":{"accountValue":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total account value."},"totalNtlPos":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total notional position value."},"totalRawUsd":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total raw USD value."},"totalMarginUsed":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total margin used."}},"required":["accountValue","totalNtlPos","totalRawUsd","totalMarginUsed"],"description":"Cross-margin summary details."},"crossMaintenanceMarginUsed":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Maintenance margin used for cross-margin positions."},"withdrawable":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount available for withdrawal."},"assetPositions":{"type":"array","items":{"type":"object","properties":{"type":{"description":"Position type.","enum":["oneWay"]},"position":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"szi":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"Signed position size."},"leverage":{"oneOf":[{"type":"object","properties":{"type":{"description":"Leverage type.","enum":["isolated"]},"value":{"type":"integer","minimum":1,"description":"Leverage value used."},"rawUsd":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount of USD used (1 = $1)."}},"required":["type","value","rawUsd"]},{"type":"object","properties":{"type":{"description":"Leverage type.","enum":["cross"]},"value":{"type":"integer","minimum":1,"description":"Leverage value used."}},"required":["type","value"]}],"description":"Leverage details."},"entryPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Average entry price."},"positionValue":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Position value."},"unrealizedPnl":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"Unrealized profit and loss."},"returnOnEquity":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"Return on equity."},"liquidationPx":{"anyOf":[{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","nullable":true}],"description":"Liquidation price."},"marginUsed":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Margin used."},"maxLeverage":{"type":"integer","minimum":1,"description":"Maximum allowed leverage."},"cumFunding":{"type":"object","properties":{"allTime":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"Total funding paid or received since account opening."},"sinceOpen":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"Funding accumulated since the position was opened."},"sinceChange":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"Funding accumulated since the last change in position size."}},"required":["allTime","sinceOpen","sinceChange"],"description":"Cumulative funding details."}},"required":["coin","szi","leverage","entryPx","positionValue","unrealizedPnl","returnOnEquity","liquidationPx","marginUsed","maxLeverage","cumFunding"],"description":"Position details."}},"required":["type","position"],"description":"Position for a specific asset."},"description":"Array of asset positions."},"time":{"type":"integer","minimum":0,"description":"Timestamp when data was retrieved (in ms since epoch)."}},"required":["marginSummary","crossMarginSummary","crossMaintenanceMarginUsed","withdrawable","assetPositions","time"],"description":"Account summary for perpetual trading."},"leadingVaults":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"Vault address."},"name":{"type":"string","description":"Vault name."}},"required":["address","name"],"description":"Vault that a user is leading."},"description":"Array of leading vaults for a user."},"totalVaultEquity":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total equity in vaults."},"openOrders":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"side":{"enum":["B","A"],"description":"Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell)."},"limitPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Limit price."},"sz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Size."},"oid":{"type":"integer","minimum":0,"description":"Order ID."},"timestamp":{"type":"integer","minimum":0,"description":"Timestamp when the order was placed (in ms since epoch)."},"origSz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Original size at order placement."},"triggerCondition":{"type":"string","description":"Condition for triggering the order."},"isTrigger":{"type":"boolean","description":"Indicates if the order is a trigger order."},"triggerPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Trigger price."},"children":{"type":"array","items":{},"description":"Child orders associated with this order."},"isPositionTpsl":{"type":"boolean","description":"Indicates if the order is a position TP/SL order."},"reduceOnly":{"type":"boolean","description":"Indicates whether the order is reduce-only."},"orderType":{"enum":["Market","Limit","Stop Market","Stop Limit","Take Profit Market","Take Profit Limit"],"description":"Order type for market execution.\n- `\"Market\"`: Executes immediately at the market price.\n- `\"Limit\"`: Executes at the specified limit price or better.\n- `\"Stop Market\"`: Activates as a market order when a stop price is reached.\n- `\"Stop Limit\"`: Activates as a limit order when a stop price is reached.\n- `\"Take Profit Market\"`: Executes as a market order when a take profit price is reached.\n- `\"Take Profit Limit\"`: Executes as a limit order when a take profit price is reached. "},"tif":{"anyOf":[{"enum":["Gtc","Ioc","Alo","FrontendMarket","LiquidationMarket"],"nullable":true}],"description":"Time-in-force.\n- `\"Gtc\"`: Remains active until filled or canceled.\n- `\"Ioc\"`: Fills immediately or cancels any unfilled portion.\n- `\"Alo\"`: Adds liquidity only.\n- `\"FrontendMarket\"`: Similar to Ioc, used in Hyperliquid UI.\n- `\"LiquidationMarket\"`: Similar to Ioc, used in Hyperliquid UI."},"cloid":{"anyOf":[{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":34,"maxLength":34,"nullable":true}],"description":"Client Order ID."}},"required":["coin","side","limitPx","sz","oid","timestamp","origSz","triggerCondition","isTrigger","triggerPx","children","isPositionTpsl","reduceOnly","orderType","tif","cloid"],"description":"Open order with additional display information."},"description":"Array of open orders with additional display information."},"agentAddress":{"anyOf":[{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"nullable":true}],"description":"Agent address if one exists."},"agentValidUntil":{"anyOf":[{"type":"integer","minimum":0,"nullable":true}],"description":"Timestamp until which the agent is valid."},"cumLedger":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Cumulative ledger value."},"meta":{"type":"object","properties":{"universe":{"type":"array","items":{"type":"object","properties":{"szDecimals":{"type":"integer","minimum":0,"description":"Minimum decimal places for order sizes."},"name":{"type":"string","description":"Name of the universe."},"maxLeverage":{"type":"integer","minimum":1,"description":"Maximum allowed leverage."},"marginTableId":{"type":"integer","minimum":0,"description":"Unique identifier for the margin requirements table."},"onlyIsolated":{"description":"Indicates if only isolated margin trading is allowed.","enum":[true]},"isDelisted":{"description":"Indicates if the universe is delisted.","enum":[true]},"marginMode":{"enum":["strictIsolated","noCross"],"description":"Trading margin mode constraint."},"growthMode":{"description":"Indicates if growth mode is enabled.","enum":["enabled"]},"lastGrowthModeChangeTime":{"type":"string","pattern":"^\\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\\d|0[1-9]|3[01])[T ](?:0\\d|1\\d|2[0-3])(?::[0-5]\\d){2}(?:\\.\\d{1,9})?$","description":"Timestamp of the last growth mode change."}},"required":["szDecimals","name","maxLeverage","marginTableId"],"description":"Trading universe parameters for perpetual asset."},"description":"Trading universes available for perpetual trading."},"marginTables":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"object","properties":{"description":{"type":"string","description":"Description of the margin table."},"marginTiers":{"type":"array","items":{"type":"object","properties":{"lowerBound":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Lower position size boundary for this tier."},"maxLeverage":{"type":"integer","minimum":1,"description":"Maximum allowed leverage for this tier."}},"required":["lowerBound","maxLeverage"],"description":"Individual tier in a margin requirements table."},"description":"Array of margin tiers defining leverage limits."}},"required":["description","marginTiers"],"description":"Margin requirements table with multiple tiers."}],"minItems":2,"description":"Tuple of margin table ID and its details."},"description":"Margin requirement tables for different leverage tiers."},"collateralToken":{"type":"integer","minimum":0,"description":"Collateral token index."}},"required":["universe","marginTables","collateralToken"],"description":"Metadata for perpetual assets."},"assetCtxs":{"type":"array","items":{"type":"object","properties":{"prevDayPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Previous day's closing price."},"dayNtlVlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Daily notional volume."},"markPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Mark price."},"midPx":{"anyOf":[{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","nullable":true}],"description":"Mid price."},"funding":{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","description":"Funding rate."},"openInterest":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total open interest."},"premium":{"anyOf":[{"type":"string","pattern":"^-?[0-9]+(\\.[0-9]+)?$","nullable":true}],"description":"Premium price."},"oraclePx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Oracle price."},"impactPxs":{"anyOf":[{"type":"array","items":{"type":"string"},"nullable":true}],"description":"Array of impact prices."},"dayBaseVlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Daily volume in base currency."}},"required":["prevDayPx","dayNtlVlm","markPx","midPx","funding","openInterest","premium","oraclePx","impactPxs","dayBaseVlm"],"description":"Context for a specific perpetual asset."},"description":"Array of contexts for each perpetual asset."},"serverTime":{"type":"integer","minimum":0,"description":"Server timestamp (in ms since epoch)."},"isVault":{"type":"boolean","description":"Whether this account is a vault."},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."},"twapStates":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"executedNtl":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Executed notional value."},"executedSz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Executed size."},"minutes":{"type":"integer","minimum":0,"description":"Duration in minutes."},"randomize":{"type":"boolean","description":"Indicates if the TWAP randomizes execution."},"reduceOnly":{"type":"boolean","description":"Indicates if the order is reduce-only."},"side":{"enum":["B","A"],"description":"Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell)."},"sz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Order size."},"timestamp":{"type":"integer","minimum":0,"description":"Start time of the TWAP order (in ms since epoch)."},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."}},"required":["coin","executedNtl","executedSz","minutes","randomize","reduceOnly","side","sz","timestamp","user"],"description":"State of the TWAP order."}],"minItems":2,"description":"TWAP ID and state."},"description":"Array of TWAP states."},"spotState":{"type":"object","properties":{"balances":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"token":{"type":"integer","minimum":0,"description":"Unique identifier for the token."},"total":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total balance."},"hold":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount on hold."},"entryNtl":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Entry notional value."}},"required":["coin","token","total","hold","entryNtl"],"description":"Balance for a specific spot token."},"description":"Balance for each token."},"evmEscrows":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string","description":"Asset symbol."},"token":{"type":"integer","minimum":0,"description":"Unique identifier for the token."},"total":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total balance."}},"required":["coin","token","total"],"description":"Escrowed balance for a specific asset."},"description":"Escrowed balances."}},"required":["balances"],"description":"Account summary for spot trading."},"spotAssetCtxs":{"type":"array","items":{"type":"object","properties":{"prevDayPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Previous day's closing price."},"dayNtlVlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Daily notional volume."},"markPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Mark price."},"midPx":{"anyOf":[{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","nullable":true}],"description":"Mid price."},"circulatingSupply":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Circulating supply."},"coin":{"type":"string","description":"Asset symbol."},"totalSupply":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Total supply."},"dayBaseVlm":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Daily volume in base currency."}},"required":["prevDayPx","dayNtlVlm","markPx","midPx","circulatingSupply","coin","totalSupply","dayBaseVlm"],"description":"Context for a specific spot asset."},"description":"Asset context for each spot asset."},"optOutOfSpotDusting":{"description":"Whether the user has opted out of spot dusting.","enum":[true]},"perpsAtOpenInterestCap":{"type":"array","items":{"type":"string"},"description":"Assets currently at their open interest cap."}},"required":["clearinghouseState","leadingVaults","totalVaultEquity","openOrders","agentAddress","agentValidUntil","cumLedger","meta","assetCtxs","serverTime","isVault","user","twapStates","spotAssetCtxs"],"description":"Comprehensive user and market data."}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"null"}}}}}}}}}
```
