Read what the environment is worth

GET/balances/total-asset-value

Return 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 without balance.read answers 403 permission_denied naming 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 description

    It is required under a person's session, exactly as EnvironmentHeader describes: a session request that omits it answers 400 with environment required, and one naming an environment the caller holds no membership of answers 404.

    An API key names its own environment, so a request made with one omits this header. A key request that sends it answers 400 with environment 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 0 and 100. It is reported rather than left to the client to divide, so every surface rounds the same way.

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.

Request
curl "https://api.stridge.com/v2/balances/total-asset-value" \
  -H "Authorization: Bearer $STRIDGE_SECRET_KEY"

Set your secret key as STRIDGE_SECRET_KEY (sent as Authorization: Bearer).

Response200
"total_usd_value": "18420.55",
"asset_symbol": "USDC",
"amount": "12480.10",
"percentage": 67.8
}
]
}