auth.v1.PolicyService
GetSubaccountPolicy
Get a sub-account policy template by id.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/auth.v1.PolicyService/GetSubaccountPolicy' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"policyId": "1",
"subaccountId": "6789012345678"
}'Responses
{
"policy": {
"actions": [
"TRADE_SPOT"
],
"createdAt": "2025-01-01T00:00:00Z",
"description": "Allow spot trading for selected markets.",
"expiresAt": "2025-01-01T00:00:00Z",
"id": "1",
"isTemplate": false,
"locked": false,
"maxOpenOrders": 1,
"maxOrderNotional": "12345",
"name": "Market Maker Policy",
"reviewAt": "2025-01-01T00:00:00Z",
"revision": "1",
"sourceTemplateId": "1",
"spotMarketScope": "ALL",
"spotMarkets": [
{
"symbolId": 1
}
],
"tradingHalted": false,
"updatedAt": "2025-01-01T00:00:00Z"
}
}auth.v1.GetSubaccountPolicyRequestauth.v1.GetSubaccountPolicyResponsePolicy identifier (opaque ID).
Optional sub-account context. When provided, a current member may read the policy attached to that sub-account; the owner may also read another policy owned by their root account. When omitted, the policy must be owned by the caller's root account.
Policy identifier (opaque ID).
Human-readable policy name.
Optional policy description for dashboards and audits.
Stable numeric pair ID.
Market-level scope for spot markets. When ALL, spot_markets is returned for display only and is not enforced.
Effective high-level actions enabled for the sub-account. Mandatory read-only actions are always included.
True if this policy is a reusable template; false if it is a per-sub-account instance.
Optional source template this policy was copied from (opaque ID). This is audit metadata only and does not imply live linkage.
Maximum 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".
Maximum number of resting orders allowed on this sub-account at any time. A value of 0 means "no explicit cap".
When 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.
When true, this policy is write-protected and requires an elevated approval flow to modify it.
Optional review time in UTC. This is governance metadata and does not automatically disable the policy.
Optional expiry time in UTC. This is governance metadata and does not automatically disable the policy.
Creation time in UTC.
Last update time in UTC.
Monotonic resource revision used for conditional updates.
| 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. |