Skip to main content
GET
{EP_NET_WORTH}
Get Net Worth
curl --request GET \
  --url https://api.example.com/{EP_NET_WORTH}
{
  "data": {
    "assets": {
      "clientId": "<string>",
      "assets": [
        {
          "currency": {
            "id": "<string>",
            "name": "<string>",
            "decimals": 123,
            "allowTransfers": true,
            "disabled": true,
            "priority": 123
          },
          "quoteCurrency": {},
          "available": "<string>",
          "locked": "<string>",
          "total": "<string>",
          "staking": {
            "initial": "<string>",
            "accrued": "<string>"
          },
          "estPrice": "<string>",
          "estValue": "<string>"
        }
      ],
      "estTotalValue": "<string>"
    },
    "liabilities": {
      "liabilities": [
        {
          "currency": {},
          "quoteCurrency": {},
          "amount": "<string>",
          "debt": "<string>",
          "interest": "<string>",
          "estPrice": "<string>",
          "estValue": "<string>",
          "estInterestValue": "<string>"
        }
      ],
      "estTotalValue": "<string>",
      "estTotalInterestValue": "<string>"
    },
    "estTotalValue": "<string>"
  },
  "status": 123
}
Retrieve the complete net worth summary for a client, including all assets, liabilities, and estimated total value. This endpoint provides detailed information about each cryptocurrency holding, staking positions, and outstanding loans.

Polling Configuration

This endpoint supports automatic polling for real-time updates:
  • Stale Time: 5 minutes (300,000ms)
  • Default Poll Interval: Configurable via pollIntervalMs parameter
  • Background Polling: Enabled when pollIntervalMs > 0

Authentication

Requires valid session authentication. The endpoint automatically includes credentials from the active session.

Response

The response includes three main sections: assets, liabilities, and total estimated value.
data
object
required
The main data container for net worth information
status
number
required
HTTP status codeExample: 200

Example Response

{
  "data": {
    "assets": {
      "clientId": "79f970d7-3b2f-492c-a358-6c1f1c2fd429",
      "assets": [
        {
          "currency": {
            "id": "BTC",
            "name": "Bitcoin",
            "decimals": 8,
            "allowTransfers": true,
            "disabled": false,
            "priority": 3
          },
          "quoteCurrency": {
            "id": "USDT",
            "name": "Tether",
            "decimals": 2,
            "allowTransfers": true,
            "disabled": false,
            "priority": 3
          },
          "available": "0.0083506",
          "locked": "0.00016514",
          "total": "0.00851574",
          "staking": {
            "initial": "0",
            "accrued": "0"
          },
          "estPrice": "94040.55",
          "estValue": "800.82"
        },
        {
          "currency": {
            "id": "ETH",
            "name": "Ethereum",
            "decimals": 8,
            "allowTransfers": true,
            "disabled": false,
            "priority": 2
          },
          "quoteCurrency": {
            "id": "USDT",
            "name": "Tether",
            "decimals": 2,
            "allowTransfers": true,
            "disabled": false,
            "priority": 3
          },
          "available": "0.04256646",
          "locked": "0.04683954",
          "total": "0.089406",
          "staking": {
            "initial": "0",
            "accrued": "0"
          },
          "estPrice": "3202.515",
          "estValue": "286.32"
        },
        {
          "currency": {
            "id": "USDT",
            "name": "Tether",
            "decimals": 2,
            "allowTransfers": true,
            "disabled": false,
            "priority": 3
          },
          "quoteCurrency": {
            "id": "USDT",
            "name": "Tether",
            "decimals": 2,
            "allowTransfers": true,
            "disabled": false,
            "priority": 3
          },
          "available": "34.49",
          "locked": "34.54",
          "total": "69.03",
          "staking": {
            "initial": "33.3",
            "accrued": "0.24"
          },
          "estPrice": "1",
          "estValue": "69.03"
        }
      ],
      "estTotalValue": "1350.89"
    },
    "liabilities": {
      "liabilities": [
        {
          "currency": {
            "id": "USDT",
            "name": "Tether",
            "decimals": 2,
            "allowTransfers": true,
            "disabled": false,
            "priority": 3
          },
          "quoteCurrency": {
            "id": "USDT",
            "name": "Tether",
            "decimals": 2,
            "allowTransfers": true,
            "disabled": false,
            "priority": 3
          },
          "amount": "32.48",
          "debt": "32.48",
          "interest": "0.36",
          "estPrice": "1",
          "estValue": "32.48",
          "estInterestValue": "0.36"
        }
      ],
      "estTotalValue": "32.48",
      "estTotalInterestValue": "0.36"
    },
    "estTotalValue": "1318.41"
  },
  "status": 200
}

TypeScript Types

import { z } from "zod";

export const CurrencySchema = z.object({
  id: z.string(),
  name: z.string(),
  decimals: z.number(),
  allowTransfers: z.boolean(),
  disabled: z.boolean(),
  priority: z.number(),
});

export const StakingSchema = z.object({
  initial: z.string(),
  accrued: z.string(),
});

export const AssetSchema = z.object({
  currency: CurrencySchema,
  quoteCurrency: CurrencySchema,
  available: z.string(),
  locked: z.string(),
  total: z.string(),
  staking: StakingSchema,
  estPrice: z.string(),
  estValue: z.string(),
});

export type Asset = z.infer<typeof AssetSchema>;

export const LiabilitySchema = z.object({
  currency: CurrencySchema,
  quoteCurrency: CurrencySchema,
  amount: z.string(),
  debt: z.string(),
  interest: z.string(),
  estPrice: z.string(),
  estValue: z.string(),
  estInterestValue: z.string(),
});

export type Liability = z.infer<typeof LiabilitySchema>;

export const NetWorthDataSchema = z.object({
  assets: z.object({
    clientId: z.string(),
    assets: z.array(AssetSchema),
    estTotalValue: z.string(),
  }),
  liabilities: z.object({
    liabilities: z.array(LiabilitySchema),
    estTotalValue: z.string(),
    estTotalInterestValue: z.string(),
  }),
  estTotalValue: z.string(),
});

export type NetWorthData = z.infer<typeof NetWorthDataSchema>;

export const netWorthDataResponseSchema = z.object({
  data: NetWorthDataSchema,
  status: z.number(),
});

export type NetWorthDataResponse = z.infer<typeof netWorthDataResponseSchema>;

Usage Example

import { useNetWorth } from '@/services/hooks/use-net-worth';

function PortfolioComponent() {
  const userId = "user-123";
  const pollInterval = 30000; // Poll every 30 seconds
  
  const { data: netWorthData, isLoading, error } = useNetWorth(
    userId,
    pollInterval
  );
  
  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error loading portfolio</div>;
  
  return (
    <div>
      <h1>Net Worth: ${netWorthData?.estTotalValue}</h1>
      <h2>Total Assets: ${netWorthData?.assets.estTotalValue}</h2>
      <h2>Total Liabilities: ${netWorthData?.liabilities.estTotalValue}</h2>
    </div>
  );
}

Error Handling

The endpoint gracefully handles errors by falling back to mock data when:
  • Network requests fail
  • Authentication is invalid
  • The session mode is set to “mock”

Build docs developers (and LLMs) love