SubaccountService
List Subaccounts
List sub-accounts owned by or shared with the caller, including role and label.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/auth/subaccounts' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"subaccounts": [
{
"color": "#7C3AED",
"icon": "💰",
"id": "9eLaFXwP59",
"label": "Market Making",
"ownerAvatarUrl": "https://placehold.co/128x128.png",
"ownerRootSmartAccountAddress": "0x2222222222222222222222222222222222222222",
"ownerUsername": "trader_alpha",
"removed": false,
"requireMemberMfa": false,
"revision": "1",
"role": "VIEWER",
"smartAccountAddress": "0x2222222222222222222222222222222222222222",
"smartAccountSaltNonce": 1,
"status": "ACTIVE",
"subaccountPolicyId": "627BigpnRg",
"updatedAt": "2025-01-01T00:00:00Z"
}
],
"totalCreated": 1
}Sub-account identifier (opaque ID).
9eLaFXwP59Role of the current caller on this sub-account. SUBACCOUNT_ROLE_UNSPECIFIED when removed is true.
VIEWEROptional human-readable label for this sub-account.
Market MakingOptional user-chosen icon/emoji for UI display.
💰Optional user-chosen color token for UI display. Tokens use lowercase letters, numbers, underscores, or hyphens.
#7C3AEDCurrent public lifecycle status of the sub-account.
ACTIVESmart Account EVM address backing this sub-account.
0x2222222222222222222222222222222222222222Owner (root account) public username, if set. Useful for shared views.
trader_alphaOwner (root account) avatar URL, if set.
https://placehold.co/128x128.pngOwner (root account) primary Smart Account address, when available. Allows clients to display a stable identity even when no username is set.
0x2222222222222222222222222222222222222222Optional sub-account policy identifier (opaque ID). 0 means no explicit policy attached.
627BigpnRgOwner-controlled security baseline for delegated interactive members on protected sub-account actions. This does not apply to read-only real-time subscriptions.
falseSmart-account derivation salt nonce assigned when this sub-account was created. Present only when the caller owns the sub-account and can use it for direct chain signing.
1Time in UTC when this sub-account's configuration was last changed. For the same sub-account, later is fresher, equal is an idempotent replay, and earlier is stale. Equal timestamps with different configuration, other than role and removed, indicate an invariant failure.
2025-01-01T00:00:00ZMonotonic resource revision used for conditional updates.
1True when the caller no longer has access to this sub-account, for example after its owner removed the caller as a member: remove the sub-account from the caller's list. Only real-time updates set it; responses list only sub-accounts the caller can access. A change of the caller's role or access does not change revision or updated_at, so real-time updates deliver such changes in order and each one applies as it arrives. Ending access also ends the caller's subscriptions to this sub-account's real-time channels, and can, rarely, also end a subscription made after access was granted again. When the server ends a subscription to one of this sub-account's channels while the latest update lists this sub-account with a role and removed false, subscribe again: access is checked again on subscribe.
falseTotal number of sub-accounts that have ever been created for this root, including soft-deleted ones. Request CreateSubaccountChallenge to obtain the canonical next smart-account address and salt.
1| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |