LedgerReadService
Get Portfolio Equity Snapshot
Retrieve current root portfolio equity grouped by logical account and asset.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/equity/portfolio/snapshot' \ --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
{
"accounts": [
{
"accountId": "4Rh4iXdT",
"equity": "0.0001",
"topAssetIds": [
100
]
}
],
"assets": [
{
"asset": "USDT",
"balance": "0.0000001",
"equity": "0.0001"
}
],
"btcPrice": "61000.25",
"quoteAsset": "USDT",
"totalEquity": "0.0001"
}Public master-account or subaccount ID.
4Rh4iXdTCurrent equity as a decimal string in USDT with at most 4 decimal places, for example '10250.1234'.
0.0001Up to three assets with the highest current equity value, ordered highest first. Assets without a current value are omitted.
[100]Public unified asset ID.
USDTCombined Funding and Trading balance as a decimal string in asset units with at most 7 decimal places, for example '1.2345678'.
0.0000001Current equity as a decimal string in USDT with at most 4 decimal places, for example '10250.1234'.
0.0001Current BTC-USDT price as a decimal string in USDT, for example '61000.25'. '0' when unavailable.
61000.25Human-readable quote asset symbol (always "USDT").
USDTCurrent equity across the master account and all owned subaccounts as a decimal string in USDT with at most 4 decimal places, for example '10250.1234'.
0.0001| 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. |