Skip to main content

subAccounts2 Info Endpoint Method

Returns a user’s subaccounts with per-DEX account states, or null when none are returned.

Updated on
Nov 10, 2026

This V2 query returns per-DEX subaccount state. Each dexToClearinghouseState entry is a [DEX name, clearinghouse state] tuple; an empty DEX name represents the main DEX. See clearinghouseState for the account-state fields and spotClearinghouseState for spot balances.

An account with no returned subaccounts can return null instead of an array. For the original query, see subAccounts.

Parameters

type
string
REQUIRED

Info request type.

user
string
REQUIRED

User address in 42-character hexadecimal format.

Returns

result
array|null

Subaccounts with per-DEX account states, or null when no subaccounts are returned.

name
string

Subaccount name.

subAccountUser
string

Subaccount wallet address.

master
string

Master account wallet address.

dexToClearinghouseState
array

Array of [DEX name, clearinghouse state] tuples. The empty DEX name identifies the main DEX. Each state follows the clearinghouseState response schema.

tuple
array

Each array element is a two-element tuple. The numbered entries below are array positions, not object keys.

0
string

[0] dex. Perp DEX name. An empty string identifies the main perp DEX.

1
object

[1] clearinghouseState. Clearinghouse state for this DEX.

marginSummary
object

Overall margin summary for the account

accountValue
string

Total account value in USD

totalNtlPos
string

Total notional position value

totalRawUsd
string

Total raw USD value

totalMarginUsed
string

Total margin currently used

crossMarginSummary
object

Cross margin summary for the account

accountValue
string

Cross margin account value in USD

totalNtlPos
string

Cross margin total notional position value

totalRawUsd
string

Cross margin total raw USD value

totalMarginUsed
string

Cross margin total margin used

crossMaintenanceMarginUsed
string

Cross maintenance margin currently used

withdrawable
string

Amount available for withdrawal

assetPositions
array

Open perpetual positions. Empty when no positions are held. Each position follows the clearinghouseState response schema.

time
integer

Clearinghouse state timestamp in milliseconds.

spotState
object

Spot account state.

balances
array

Spot token balances. Empty when no balances are returned.

Request
Response
1
[
2
{
3
"name": "election",
4
"subAccountUser": "0x1cfd1eb11f24b7be73f3e334a60569a3fb2fafa3",
5
"master": "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
6
"dexToClearinghouseState": [
7
[
8
"",
9
{
10
"marginSummary": {
11
"accountValue": "0.003888",
12
"totalNtlPos": "0.0",
13
"totalRawUsd": "0.003888",
14
"totalMarginUsed": "0.0"
15
},
16
"crossMarginSummary": {
17
"accountValue": "0.003888",
18
"totalNtlPos": "0.0",
19
"totalRawUsd": "0.003888",
20
"totalMarginUsed": "0.0"
21
},
22
"crossMaintenanceMarginUsed": "0.0",
23
"withdrawable": "0.003888",
24
"assetPositions": [],
25
"time": 1794233131469
26
}
27
]
28
],
29
"spotState": {
30
"balances": []
31
}
32
},
33
{
34
"name": "stonks",
35
"subAccountUser": "0x6dbd776da0a23368777d0648f01cccd6b3cb0f8e",
36
"master": "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
37
"dexToClearinghouseState": [
38
[
39
"",
40
{
41
"marginSummary": {
42
"accountValue": "0.000838",
43
"totalNtlPos": "0.0",
44
"totalRawUsd": "0.000838",
45
"totalMarginUsed": "0.0"
46
},
47
"crossMarginSummary": {
48
"accountValue": "0.000838",
49
"totalNtlPos": "0.0",
50
"totalRawUsd": "0.000838",
51
"totalMarginUsed": "0.0"
52
},
53
"crossMaintenanceMarginUsed": "0.0",
54
"withdrawable": "0.000838",
55
"assetPositions": [],
56
"time": 1794233131469
57
}
58
]
59
],
60
"spotState": {
61
"balances": []
62
}
63
}
64
]
1
[
2
{
3
"name": "election",
4
"subAccountUser": "0x1cfd1eb11f24b7be73f3e334a60569a3fb2fafa3",
5
"master": "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
6
"dexToClearinghouseState": [
7
[
8
"",
9
{
10
"marginSummary": {
11
"accountValue": "0.003888",
12
"totalNtlPos": "0.0",
13
"totalRawUsd": "0.003888",
14
"totalMarginUsed": "0.0"
15
},
16
"crossMarginSummary": {
17
"accountValue": "0.003888",
18
"totalNtlPos": "0.0",
19
"totalRawUsd": "0.003888",
20
"totalMarginUsed": "0.0"
21
},
22
"crossMaintenanceMarginUsed": "0.0",
23
"withdrawable": "0.003888",
24
"assetPositions": [],
25
"time": 1794233131469
26
}
27
]
28
],
29
"spotState": {
30
"balances": []
31
}
32
},
33
{
34
"name": "stonks",
35
"subAccountUser": "0x6dbd776da0a23368777d0648f01cccd6b3cb0f8e",
36
"master": "0x2ba553d9f990a3b66b03b2dc0d030dfc1c061036",
37
"dexToClearinghouseState": [
38
[
39
"",
40
{
41
"marginSummary": {
42
"accountValue": "0.000838",
43
"totalNtlPos": "0.0",
44
"totalRawUsd": "0.000838",
45
"totalMarginUsed": "0.0"
46
},
47
"crossMarginSummary": {
48
"accountValue": "0.000838",
49
"totalNtlPos": "0.0",
50
"totalRawUsd": "0.000838",
51
"totalMarginUsed": "0.0"
52
},
53
"crossMaintenanceMarginUsed": "0.0",
54
"withdrawable": "0.000838",
55
"assetPositions": [],
56
"time": 1794233131469
57
}
58
]
59
],
60
"spotState": {
61
"balances": []
62
}
63
}
64
]
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free