hl_batchPortfolioStates JSON-RPC Method
This method consolidates clearinghouse states, spot balances, and account abstraction modes for up to 500 users in a single request. The response includes both successful portfolio states and any failed wallet addresses. Use the optional
dex parameter with value "ALL_DEXES" to retrieve data across all DEXes (native, xyz, flx, vntl, hyna, km, abcd, cash, para). Credits are charged dynamically based on the number of users in the request.Parameters
users
array
REQUIRED
Loading...
dex
string
Loading...
Returns
result
object
Loading...
successful_states
array
Loading...
address
string
Loading...
data
object
Loading...
clearinghouseState
object
Loading...
marginSummary
object
Loading...
accountValue
string
Loading...
totalMarginUsed
string
Loading...
totalNtlPos
string
Loading...
totalRawUsd
string
Loading...
withdrawable
string
Loading...
crossMarginSummary
object
Loading...
assetPositions
array
Loading...
position
object
Loading...
coin
string
Loading...
entryPx
string
Loading...
leverage
object
Loading...
liquidationPx
string
Loading...
marginUsed
string
Loading...
unrealizedPnl
string
Loading...
time
integer
Loading...
spotClearinghouseState
object
Loading...
balances
array
Loading...
coin
string
Loading...
token
integer
Loading...
total
string
Loading...
hold
string
Loading...
entryNtl
string
Loading...
tokenToAvailableAfterMaintenance
array
Loading...
userAbstraction
string
Loading...
failed_wallets
array
Loading...
address
string
Loading...
Request
1curl https://docs-demo.hype-mainnet.quiknode.pro/evm \2-X POST \3-H "Content-Type: application/json" \4--data '{5"jsonrpc": "2.0",6"method": "hl_batchPortfolioStates",7"params": {8"users": [9"0x0165f157c689aed3ce179cc9eb2cfa1745b29684",10"0x01664d5e024d45bfcd405bce38acddba795c178d",11"0x01676c9d76fe3794ac94b8c44309c466e622e135",12"0x0167d85a1ec9b914cdc3bcb3bdf5c51340e21c99",13"0x0169105b8eab9865bb3cc5f8ad45d950a57bca06"14],15"dex": "ALL_DEXES"16},17"id": 118}'19
1curl https://docs-demo.hype-mainnet.quiknode.pro/evm \2-X POST \3-H "Content-Type: application/json" \4--data '{5"jsonrpc": "2.0",6"method": "hl_batchPortfolioStates",7"params": {8"users": [9"0x0165f157c689aed3ce179cc9eb2cfa1745b29684",10"0x01664d5e024d45bfcd405bce38acddba795c178d",11"0x01676c9d76fe3794ac94b8c44309c466e622e135",12"0x0167d85a1ec9b914cdc3bcb3bdf5c51340e21c99",13"0x0169105b8eab9865bb3cc5f8ad45d950a57bca06"14],15"dex": "ALL_DEXES"16},17"id": 118}'19
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free