Skip to main content

Parameters

chainId
string
default:"300"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"zks_getAllAccountBalances"
required
JSON-RPC method name.
params
object
required
Positional parameters for zks_getAllAccountBalances:
  • params[]: The account address to retrieve confirmed token balances for.

Returns

result
object
Key-value pairs of token addresses and their corresponding balances (in hex).
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=300 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "zks_getAllAccountBalances",
    "params": [
      "0x98E9D288743839e96A8005a6B51C770Bbf7788C0"
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "0x0000000000000000000000000000000000000000": "0x2fbd72a1121b3100"
  }
}