SubaccountViewService
Get Subaccount View
Return a single payload containing the sub-account and requested related read models, such as members, API keys, invites, policy, and balances.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/auth/subaccounts/6789012345678?includeApiKeys=false&includeBalances=false&includeInvites=false&includeMembers=false&includePolicy=false&invitesDirection=INCOMING' \ --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
{
"apiKeys": [
{
"color": "#7C3AED",
"createdAt": "2025-01-01T00:00:00Z",
"createdByActor": "dashboard",
"expiresAt": "2025-01-01T00:00:00Z",
"icon": "💰",
"ipWhitelist": [
"203.0.113.0/24"
],
"keyId": "ak_1a3c6de8153d5a5b04cd2a6529779542",
"label": "Trading Bot",
"lastUsedAt": "2025-01-01T00:00:00Z",
"policyId": "3Gxbxht1EK",
"publicKeyEd25519": "AA==",
"revision": "1",
"status": "ACTIVE",
"subaccountId": "37E2o5r2qHk",
"updatedAt": "2025-01-01T00:00:00Z"
}
],
"balances": {
"balances": [
{
"assetId": 100,
"available": {
"hi": "1",
"lo": "1"
},
"funding": {
"hi": "1",
"lo": "1"
},
"fundingRevision": "1",
"reserved": {
"hi": "1",
"lo": "1"
},
"trading": {
"hi": "1",
"lo": "1"
},
"tradingRevision": "1"
}
]
},
"invites": [
{
"createdAt": "2025-01-01T00:00:00Z",
"granteeAccountId": "3LH9o1FBKZC",
"granteeRootSmartAccountAddress": "0x2222222222222222222222222222222222222222",
"granteeUsername": "trader_alpha",
"id": "6MxJavPReT",
"inviterAccountId": "3JowFx91FxT",
"inviterRootSmartAccountAddress": "0x2222222222222222222222222222222222222222",
"inviterUsername": "trader_alpha",
"requireMemberMfa": false,
"respondedAt": "2025-01-01T00:00:00Z",
"role": "VIEWER",
"status": "PENDING",
"subaccountId": "3AS6RGERAUL",
"subaccountLabel": "Market Making"
}
],
"members": [
{
"accountId": "3HRq9SkcwNm",
"avatarUrl": "https://placehold.co/128x128.png",
"mfaEnrolled": false,
"role": "VIEWER",
"smartAccountAddress": "0x2222222222222222222222222222222222222222",
"username": "trader_alpha"
}
],
"policy": {
"actions": [
"TRADE_SPOT"
],
"createdAt": "2025-01-01T00:00:00Z",
"description": "Allow spot trading for selected markets.",
"expiresAt": "2025-01-01T00:00:00Z",
"id": "7gQY8okwBT",
"isTemplate": false,
"locked": false,
"maxOpenOrders": 1,
"maxOrderNotional": "12345",
"name": "Market Maker Policy",
"reviewAt": "2025-01-01T00:00:00Z",
"revision": "1",
"sourceTemplateId": "8gnKtjkL5A",
"spotMarketScope": "ALL",
"spotMarkets": [
{
"symbolId": 1
}
],
"tradingHalted": false,
"updatedAt": "2025-01-01T00:00:00Z"
},
"subaccount": {
"color": "#7C3AED",
"icon": "💰",
"id": "62LGjN2AD8",
"label": "Market Making",
"ownerAvatarUrl": "https://placehold.co/128x128.png",
"ownerRootSmartAccountAddress": "0x2222222222222222222222222222222222222222",
"ownerUsername": "trader_alpha",
"requireMemberMfa": false,
"revision": "1",
"role": "VIEWER",
"smartAccountAddress": "0x2222222222222222222222222222222222222222",
"smartAccountSaltNonce": 1,
"status": "ACTIVE",
"subaccountPolicyId": "8b5f1EAGDm",
"updatedAt": "2025-01-01T00:00:00Z"
}
}Target sub-account (opaque ID).
Include API keys scoped to this sub-account. Only owner and admin callers receive API keys.
Include current balances for this sub-account.
Include invitations visible to the caller.
Include current members for this sub-account. Every current member may receive the roster.
Include the attached sub-account policy, when one is attached. Every current member may receive it.
Optional invitation direction filter. An omitted value includes both scopes.
Sub-account identifier (opaque ID).
62LGjN2AD8Role of the current caller on this sub-account.
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.
8b5f1EAGDmOwner-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 indicate an invariant failure.
2025-01-01T00:00:00ZMonotonic resource revision used for conditional updates.
1Stable opaque identifier used to refer to this key, formatted as "ak_" followed by 32 lowercase hex characters.
ak_1a3c6de8153d5a5b04cd2a6529779542Human-readable label for the key. Maximum length is 64 characters.
Trading BotOptional user-chosen icon/emoji for UI display.
💰Optional user-chosen color token for UI display.
#7C3AEDOptional CIDR whitelist. Empty means no IP restriction. Maximum 32 unique entries.
["203.0.113.0/24"]Current key status.
ACTIVEOptional sub-account this key is scoped to (opaque ID; empty = root-level).
37E2o5r2qHkOptional API policy attached to this key (opaque ID). Empty means no policy is attached and the key has no permissions.
3Gxbxht1EKTime in UTC when this key was created.
2025-01-01T00:00:00ZLast time in UTC when this key authenticated a request. Omitted when the key has not been used.
2025-01-01T00:00:00ZEd25519 public key bytes associated with this API key. The private key or seed is never returned by the API.
AA==Optional expiry time in UTC. When set, the key cannot authenticate requests after this time, regardless of status.
2025-01-01T00:00:00ZRead-only actor label describing who created this key, such as a username or account label.
dashboardTime in UTC when this key's configuration was last changed. For the same key, later is fresher, equal is an idempotent replay, and earlier is stale. Equal timestamps with different configuration indicate an invariant failure. This is independent of last_used_at, which tracks authentication activity.
2025-01-01T00:00:00ZMonotonic resource revision used for conditional updates.
1Identifier for the member's root account (opaque ID).
3HRq9SkcwNmEffective role on this sub-account.
VIEWEROptional username for the member's root account.
trader_alphaSmart Account address for the member's root account, if any.
0x2222222222222222222222222222222222222222Optional avatar URL for the member's root account.
https://placehold.co/128x128.pngTrue when the member has at least one MFA factor enrolled on their root account.
falseInvite identifier (opaque ID).
6MxJavPReTTarget sub-account (opaque ID).
3AS6RGERAULGrantee root account ID the invite is for (opaque ID).
3LH9o1FBKZCInviter root account ID (opaque ID).
3JowFx91FxTRequested role for the grantee.
VIEWERCurrent invitation status.
PENDINGTime when the invitation was created.
2025-01-01T00:00:00ZTime when the invitation was accepted, declined, or cancelled. Empty while pending.
2025-01-01T00:00:00ZOptional usernames for better UX in invite lists.
trader_alphaUsername of the account that sent the invitation, when available.
trader_alphaOptional label for the target sub-account, for display in invite lists.
Market MakingInviter (root account) primary Smart Account address, when available. Useful for displaying a stable identity when no username is set.
0x2222222222222222222222222222222222222222Grantee (root account) primary Smart Account address, when available. Useful for displaying a stable identity when no username is set.
0x2222222222222222222222222222222222222222Current delegated-member MFA requirement on the target sub-account. If true, accepting the invite requires MFA enrollment and fresh step-up.
falsePolicy identifier (opaque ID).
7gQY8okwBTHuman-readable policy name.
Market Maker PolicyOptional policy description for dashboards and audits.
Allow spot trading for selected markets.Stable numeric pair ID.
1Market-level scope for spot markets. When ALL, spot_markets is returned for display only and is not enforced.
ALLEffective high-level actions enabled for the sub-account. Mandatory read-only actions are always included.
["TRADE_SPOT"]True if this policy is a reusable template; false if it is a per-sub-account instance.
falseOptional source template this policy was copied from (opaque ID). This is audit metadata only and does not imply live linkage.
8gnKtjkL5AMaximum notional size allowed for any single order on this sub-account, expressed in canonical quote microunits (one unit is 0.000001 USDT). A value of 0 means "no explicit cap".
12345Maximum number of resting orders allowed on this sub-account at any time. A value of 0 means "no explicit cap".
1When true, new orders and exposure-increasing order or trigger changes are rejected regardless of other settings. Existing orders and triggers may still be canceled or paused by an otherwise authorized caller.
falseWhen true, this policy is write-protected and requires an elevated approval flow to modify it.
falseOptional review time in UTC. This is governance metadata and does not automatically disable the policy.
2025-01-01T00:00:00ZOptional expiry time in UTC. This is governance metadata and does not automatically disable the policy.
2025-01-01T00:00:00ZCreation time in UTC.
2025-01-01T00:00:00ZLast update time in UTC.
2025-01-01T00:00:00ZMonotonic resource revision used for conditional updates.
1Public unified asset id. Resolve symbol from SpotConfig; U128 amounts in this message always use fixed 18-decimal ledger scale.
100Most significant 64 bits.
1Least significant 64 bits.
1Most significant 64 bits.
1Least significant 64 bits.
1Most significant 64 bits.
1Least significant 64 bits.
1Most significant 64 bits.
1Least significant 64 bits.
1Opaque monotonic revision for the atomic trading, reserved, and available values. Higher means newer; zero means no trading state has been observed.
1Opaque monotonic revision for the funding value. Higher means newer; zero means no funding state has been observed.
1| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |