Balances API
The Balances API allows you to retrieve balance information for all instruments held by your organization or a specific entity via the /v1/balances endpoint.
Authentication
This endpoint requires an API key with either the FundManager or TransactionViewer role. Contact Superstate for an API key.
Sending a Request
For information on how to send a request, please see the API key section on the API page.
Example
import { superstateApiKeyRequest } from '@superstateinc/api-key-request';
const balances = await superstateApiKeyRequest({
apiKey: SUPERSTATE_API_KEY,
apiSecret: SUPERSTATE_API_SECRET,
endpoint: "/v1/balances",
});
console.log(balances);Query Parameters
entity_id
Filter the response to only include balances for a specific entity. Contact Superstate to get entity ID(s) associated with your organization.
Type
integer
Required
No
Note: When using an entity-scoped API key, the entity_id parameter must match the entity ID associated with the API key.
Response
The response contains balance information organized by entity, with optional organization-level aggregations.
Response Structure
entities
object
Map of entity IDs to their balance data
total_portfolio_value
object
Total portfolio value across all entities (organization-scoped keys only)
org_balances
object
Aggregated balances by instrument across the organization (organization-scoped keys only)
Entity Balance Data
Each entity in the entities map contains:
entity_id
integer
The entity's unique identifier
entity_name
string
The entity's display name
balances
object
Map of instrument symbols to balance details
subaccounts
object
(Optional) Map of subaccount IDs to their balance data
Asset Balance Details
Each instrument in the balances map contains:
instrument_symbol
string
The instrument ticker (e.g., "USTB", "USCC")
instrument_domain
string
Category: "Funds", "Equities", or "FiatCurrencies"
total_shares
string
Total shares/units held
total_notional
object
Total value in USD (when available)
price
object
Current price per share (when available)
balances
array
Detailed breakdown by balance type
Balance Entry Types
Each entry in the balances array represents a specific type of holding:
BookEntryAvailable
Book-entry shares available for transactions
BookEntryRestricted
Book-entry shares with transfer restrictions
Token
On-chain tokenized shares
Protocol
Shares deposited in DeFi protocols (Aave, Morpho, etc.)
Example Response
Error Responses
401
Invalid or missing API key
403
API key does not have the required permissions (FundManager or TransactionViewer role)
404
The specified entity was not found or is not accessible with this API key
500
Internal server error
Last updated