Read what the environment is worth
/ balances/ total-asset-valueReturn what everything the environment holds comes to in USD, and which assets make it up. It counts what the environment's vaults, gas stations and deposit addresses hold, each at its confirmed balance less what is locked.
It takes no filter: the aggregate describes everything the environment holds, not a view over it, so any query parameter answers 400 parameter_unknown.
The breakdown is exhaustive — the shares sum to 100 — so a client renders it whole without computing a remainder. An environment holding nothing answers "0.00" and an empty breakdown rather than null, so an empty scope renders through the same code path as a busy one.
A secret key reads it holding
balance.read.It reads its own environment's total and sends no
X-Stridge-Environment; a key withoutbalance.readanswers403permission_deniednaming it.
Header parameters
- X-Stridge-Environmentstring <uuid>optional
Which environment the request acts inside, on an operation a session and an API key both call. Learn more
Show full descriptionShow less
It is required under a person's session, exactly as
EnvironmentHeaderdescribes: a session request that omits it answers400withenvironment required, and one naming an environment the caller holds no membership of answers404.An API key names its own environment, so a request made with one omits this header. A key request that sends it answers
400withenvironment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.
Responses
The portfolio total resolved.
- total_usd_valuestringrequired
What everything the environment holds comes to in USD, as a decimal string.
The share each asset holds of the total, largest first.
- asset_symbolstringrequired
The asset.
- amountstringrequired
What this asset comes to in USD, as a decimal string.
- percentagenumber <double>required
This asset's share of the total, between
0and100. It is reported rather than left to the client to divide, so every surface rounds the same way.
- asset_symbolstringrequired
Errors
The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 403membership_suspendedMembership suspended
- 403permission_deniedPermission denied
- 404environment_not_foundEnvironment not found
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 429rate_limitedToo many requests