Skip to navigation

Portfolio, balances, and fills

HIP-4 positions are token balances, not perpetual positions. Query spotClearinghouseState and select entries whose coin is +<encoding>.

For a normalized public view, use Predict’s account REST endpoints for positions, current orders, fills, activity, cashflows, statistics, PnL, volume, and fees, or subscribe to the matching realtime channels. Use the direct Hyperliquid reads below when you need venue-native balances, bounded history, role, limit, or builder state.

Balance fieldMeaning
totalTotal token balance
holdAmount reserved by open orders
total - holdAvailable balance
entryNtlTracked entry notional

Join the token name back to the Predict outcome and label with the identifier mapping. Do not query a perpetual clearinghouseState and expect HIP-4 positions.

Account reads

typePurposeRetention or behavior
openOrdersCurrent ordersSnapshot
frontendOpenOrdersOrders plus display fieldsSnapshot
orderStatusOne order by order ID or client IDReturns unknownOid when absent
historicalOrdersRecent terminal and open order recordsAt most 2,000
userFillsRecent executionsAt most 2,000
userFillsByTimeExecutions in a time rangeAt most 2,000 per response and 10,000 most recent available
userNonFundingLedgerUpdatesDeposits, withdrawals, transfers, and other ledger changesTime-bounded pages return at most 500 records or blocks
userFeesFee tier and ratesAddress scoped
userRateLimitAction allowance and usageAddress scoped
subAccountsAccounts controlled by a masterQuery with master address
userRoleMaster, agent, vault, subaccount, or missingHigh request weight
approvedBuildersApproved builder addressesAddress scoped
maxBuilderFeeApproved ceiling for one builderReturned in tenths of a basis point

Account reads use the master or subaccount address. Passing an agent-wallet address normally returns empty state because an agent signs but does not own the balances.

Durable history

Hyperliquid’s live account endpoints are bounded. Persist order intents, responses, order updates, fills, and ledger updates if your product promises a complete archive. On reconnect, query the latest HTTP snapshot and fill any time range before resuming stream processing.