portfolioState | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"user": "<string>",
"dex": "<string>"
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = {
"type": "<string>",
"user": "<string>",
"dex": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', user: '<string>', dex: '<string>'})
};
fetch('https://hypercore.goldrushdata.com/info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hypercore.goldrushdata.com/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'user' => '<string>',
'dex' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"dex\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"dex\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"dex\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"clearinghouseState": {},
"spotClearinghouseState": {
"balances": [
{
"coin": "<string>",
"token": 123,
"total": "<string>",
"hold": "<string>",
"entryNtl": "<string>"
}
]
},
"userAbstraction": "<string>"
}Info API
portfolioState | Hyperliquid Info API
Hyperliquid portfolioState: fetch a wallet’s perp state, spot balances, and account-abstraction mode in one request.
POST
/
info
portfolioState | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"user": "<string>",
"dex": "<string>"
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = {
"type": "<string>",
"user": "<string>",
"dex": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', user: '<string>', dex: '<string>'})
};
fetch('https://hypercore.goldrushdata.com/info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hypercore.goldrushdata.com/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'user' => '<string>',
'dex' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"dex\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"dex\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"dex\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"clearinghouseState": {},
"spotClearinghouseState": {
"balances": [
{
"coin": "<string>",
"token": 123,
"total": "<string>",
"hold": "<string>",
"entryNtl": "<string>"
}
]
},
"userAbstraction": "<string>"
}Credit Cost
1 per call
Processing
Realtime
type: "portfolioState" is used to fetch a wallet’s perp clearinghouse state, spot balances, and account-abstraction mode in a single request.
Estimate your monthly cost for this API using the Pricing Calculator.
- GoldRush-native composite — not part of the original Hyperliquid API. It bundles three upstream calls into one round-trip: clearinghouseState, spotClearinghouseState, and
userAbstraction. - Pass
dexto scope the perpclearinghouseStateto a single HIP-3 DEX. Passdex: "ALL_DEXES"to return the perp state across the native DEX plus every HIP-3 DEX in one call, keyed by DEX name. spotClearinghouseStateanduserAbstractionare DEX-independent and always returned once.
clearinghouseState), spot balances (spotClearinghouseState), and account-abstraction mode (userAbstraction) — the three calls a portfolio view typically needs, in one round-trip.
Endpoint
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
Request
string
default:"portfolioState"
required
Always
"portfolioState".string
required
Ethereum address (0x-prefixed, 42 characters).
string
Perp DEX name. Omit for the native DEX (default). Use
"ALL_DEXES" to fetch the perp clearinghouseState across the native DEX plus every HIP-3 DEX in one call.Example
curl -X POST https://hypercore.goldrushdata.com/info \
-H "Authorization: Bearer $GOLDRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "portfolioState",
"user": "0x0000000000000000000000000000000000000000"
}'
const response = await fetch("https://hypercore.goldrushdata.com/info", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GOLDRUSH_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "portfolioState",
user: "0x0000000000000000000000000000000000000000",
}),
});
const portfolio = await response.json();
import os, requests
response = requests.post(
"https://hypercore.goldrushdata.com/info",
headers={"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"},
json={
"type": "portfolioState",
"user": "0x0000000000000000000000000000000000000000",
},
)
portfolio = response.json()
Response
An object with three keys — the perp clearinghouse state, spot clearinghouse state, and the account-abstraction mode.{
"clearinghouseState": {
"marginSummary": { "accountValue": "…", "totalNtlPos": "…", "totalRawUsd": "…", "totalMarginUsed": "…" },
"crossMarginSummary": { "…": "…" },
"assetPositions": [],
"time": 1234567890123
},
"spotClearinghouseState": {
"balances": [
{ "coin": "USDC", "token": 0, "total": "0.02221591", "hold": "0.0", "entryNtl": "0.0" }
]
},
"userAbstraction": "unifiedAccount"
}
Field descriptions
object
The wallet’s perp account state — identical to the standalone
clearinghouseState response (marginSummary, crossMarginSummary, assetPositions, time). Scoped to dex when supplied; a per-DEX object when dex: "ALL_DEXES" (see below).object
string
The wallet’s account-abstraction mode. One of:
Show values
Show values
string
Single balance per asset across all DEXes; all cross-margin positions share collateral.
string
Portfolio margin — a single portfolio unifying eligible assets with borrowing / LTV.
string
Abstraction disabled — separate perp and spot balances.
string
Default mode.
string
DEX abstraction mode (legacy, being discontinued).
ALL_DEXES response
When dex: "ALL_DEXES" is passed, clearinghouseState becomes an object keyed by DEX name — the native DEX under "native" plus one key per HIP-3 DEX. spotClearinghouseState and userAbstraction are unchanged.
{
"clearinghouseState": {
"native": { "marginSummary": {}, "crossMarginSummary": {}, "assetPositions": [], "time": 1234567890123 },
"xyz": { "marginSummary": {}, "crossMarginSummary": {}, "assetPositions": [], "time": 1234567890123 }
},
"spotClearinghouseState": { "balances": [] },
"userAbstraction": "unifiedAccount"
}
Related endpoints
batchClearinghouseState
fetch perpetuals account state for up to 50 wallets in a single request.
batchSpotClearinghouseState
fetch spot account balances for up to 50 wallets in a single request.
clearinghouseState
fetch a single user’s perpetuals account state by wallet address.
spotClearinghouseState
fetch a single user’s spot account balances by wallet address.