/hypercore JSON-RPC methods requires a Build plan or higher. View pricing to upgrade. For complete stream type definitions and filtering options, see the datasets documentation. This method consolidates data from the clearinghouseState, spotClearinghouseState, and userAbstraction endpoints into a single request, providing complete portfolio information for a user. Use the optional dex parameter with value "ALL_DEXES" to retrieve data across all DEXes (native, xyz, flx, vntl, hyna, km, abcd, cash, para).Parameters
- userstringREQUIRED
Ethereum wallet address (0x-prefixed, 42 characters)
- dexstring
Optional. Omit for native DEX only, or use 'ALL_DEXES' to fetch data across all dexes. When using ALL_DEXES, clearinghouseState will be organized by DEX name (native, xyz, flx, vntl, hyna, km, abcd, cash, para)
Returns
- resultobject
Portfolio state containing perp positions, spot balances, and account mode
- clearinghouseStateobject
When dex parameter is omitted: returns clearinghouse state object directly with keys marginSummary, crossMarginSummary, crossMaintenanceMarginUsed, withdrawable, assetPositions, time. When dex='ALL_DEXES': returns an object keyed by DEX names (native, xyz, flx, vntl, hyna, km, abcd, cash, para), where each value is a clearinghouse state object with the same structure
- dexName (when using ALL_DEXES)object
DEX-specific clearinghouse state (e.g., native, xyz, flx). Each DEX contains the following structure
- marginSummaryobject
Summary of margin metrics
- accountValuestring
Total account value as a stringified number
- totalNtlPosstring
Total notional position value as a stringified number
- totalRawUsdstring
Total raw USD value as a stringified number
- totalMarginUsedstring
Total margin used across all positions as a stringified number
- crossMarginSummaryobject
Summary of cross-margin metrics with same structure as marginSummary
- accountValuestring
Total account value as a stringified number
- totalNtlPosstring
Total notional position value as a stringified number
- totalRawUsdstring
Total raw USD value as a stringified number
- totalMarginUsedstring
Total margin used across all positions as a stringified number
- crossMaintenanceMarginUsedstring
Cross maintenance margin used as a stringified number
- withdrawablestring
Amount available for withdrawal as a stringified number
- assetPositionsarray
Array of asset position objects
- assetPositionobject
Asset position wrapper
- typestring
Position type (e.g., oneWay)
- positionobject
Position details
- coinstring
Asset symbol (e.g., BTC, ETH, HYPE). For non-native DEXes, prefixed with dex name (e.g., flx:USDE)
- szistring
Signed position size as a stringified number (negative for short, positive for long)
- leverageobject
Leverage configuration
- typestring
Leverage type (e.g., cross, isolated)
- valueinteger
Leverage multiplier value
- entryPxstring
Entry price as a stringified number
- positionValuestring
Current position value as a stringified number
- unrealizedPnlstring
Unrealized profit and loss as a stringified number
- returnOnEquitystring
Return on equity as a stringified number
- liquidationPxstring
Liquidation price as a stringified number
- marginUsedstring
Margin used for this position as a stringified number
- maxLeverageinteger
Maximum allowed leverage for this asset
- cumFundingobject
Cumulative funding information
- allTimestring
All-time cumulative funding as a stringified number
- sinceOpenstring
Cumulative funding since position opened as a stringified number
- sinceChangestring
Cumulative funding since last position change as a stringified number
- timeinteger
Timestamp in milliseconds since Unix epoch
- spotClearinghouseStateobject
Spot balances and available amounts
- balancesarray
Array of spot balance objects
- balanceobject
Individual spot balance data
- coinstring
Coin symbol (e.g., USDC, HYPE, USDE)
- tokeninteger
Token index number
- totalstring
Total balance as a stringified number
- holdstring
Amount on hold as a stringified number
- entryNtlstring
Entry notional value as a stringified number
- tokenToAvailableAfterMaintenancearray
Array of [tokenId, availableAmount] tuples showing available balance after maintenance margin
- tuplearray
[tokenId, availableAmount] tuple
- tokenIdinteger
Token index number
- availableAmountstring
Available amount after maintenance margin as a stringified number
- userAbstractionstring
Account mode: unifiedAccount, portfolioMargin, disabled, default, or dexAbstraction