ledger.read.v1.LedgerReadService
GetPortfolioEquitySnapshot
Retrieve current root portfolio equity grouped by logical account and asset. Requires an interactive root-account session; API keys are not supported.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/ledger.read.v1.LedgerReadService/GetPortfolioEquitySnapshot' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{}'Responses
{
"accounts": [
{
"accountId": "7563897446546",
"equityQ": "1",
"topAssetIds": [
100
]
}
],
"assets": [
{
"assetId": 100,
"balanceQ": "1",
"equityQ": "1"
}
],
"btcPriceQ": "61000250000000",
"quoteAsset": "USDT",
"totalEquityQ": "1"
}ledger.read.v1.GetPortfolioEquitySnapshotRequestledger.read.v1.GetPortfolioEquitySnapshotResponseHuman-readable quote asset symbol (always "USDT").
Current equity across the master account and all owned subaccounts in USDT, scaled by 1e4 (4 decimals).
Public master-account or subaccount ID.
Current equity in USDT scaled by 1e4 (4 decimals).
Up to three assets with the highest current equity value, ordered highest first. Assets without a current value are omitted.
Public unified asset ID.
Combined Funding and Trading balance in asset units scaled by 1e7 (7 decimals).
Current equity in USDT scaled by 1e4 (4 decimals).
Current BTC-USDT price scaled by 1e9. Zero when unavailable.
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| api-key-action-deny | 403 | permission_denied | API Key Policy Denied | API key policy does not allow this read action. |
| api-key-policy-not-found | 403 | permission_denied | API Key Policy Not Found | API key policy was not found. |
| api-key-policy-required | 403 | permission_denied | API Key Policy Required | API key policy is required for ledger reads. |
| api-key-root-scope-only | 403 | permission_denied | API Key Root Scope Only | This API key is scoped to the root account and cannot read sub-accounts. |
| api-key-subaccount-mismatch | 403 | permission_denied | API Key Sub-account Mismatch | This API key is bound to a different sub-account. |
| api-key-unknown | 403 | permission_denied | API Key Unknown | The authenticated API key has no metadata entry in the API key store. |
| auth-authentication-required | 401 | unauthenticated | Authentication Required | Authentication is required. |
| auth-session-kind-not-allowed | 403 | permission_denied | Interactive Session Required | This read accepts only an interactive session; API keys are refused. |
| bad-request | 400 | invalid_argument | Bad Request | — |
| invalid-account-id | 400 | invalid_argument | Invalid Account ID | — |
| invalid-argument | 400 | invalid_argument | Bad Request | — |
| invalid-subaccount-id | 400 | invalid_argument | Invalid Sub-account ID | — |
| ip-not-allowed | 401 | unauthenticated | API Key IP Not Allowed | API key is not authorized from this IP address. |
| key-disabled | 401 | unauthenticated | API Key Disabled | API key is disabled. |
| key-expired | 401 | unauthenticated | API Key Expired | API key has expired. |
| missing-account-id | 400 | invalid_argument | Missing Account ID | — |
| missing-headers | 400 | invalid_argument | Missing API Key Headers | Missing required API key authentication headers. |
| missing-wallet | 400 | invalid_argument | Missing Wallet | — |
| not-found | 404 | not_found | Not Found | — |
| permission-denied | 403 | permission_denied | Permission Denied | — |
| role-action-deny | 403 | permission_denied | Role Denied | Your role does not allow this read action. |
| server-error | 500 | internal | Server Error | — |
| signature-invalid | 401 | unauthenticated | Invalid API Key Signature | API key signature is invalid. |
| subaccount-policy-deny | 403 | permission_denied | Sub-account Policy Denied | Sub-account policy does not allow this read action. |
| subaccount-read-forbidden | 403 | permission_denied | Sub-account Read Forbidden | You do not have permission to read this sub-account. |
| timestamp-skew | 400 | invalid_argument | API Key Timestamp Skew | API key timestamp is outside the allowed skew window. |
| unauthenticated | 401 | unauthenticated | Unauthenticated | Ledger reads require a valid bearer JWT or signed API-key request. |
| upstream-error | 502 | unavailable | Upstream Error | — |
| wallet-not-found | 404 | not_found | Wallet Not Found | — |
| wallet-resolution-unavailable | 502 | unavailable | Wallet Resolution Unavailable | — |