Cambrian Total Value Locked API

By Cambrian Network base

GET /api/v1/evm/tvl/status

EVM Total Value Locked Status

Returns the tokens held by a specific EVM wallet address, showing portfolio balance information for tokens currently owned by that address. This endpoint provides comprehensive token holdings data including raw and UI-formatted amounts with USD valuations.

Business Value

  • Portfolio Analytics: Track complete token holdings across EVM wallets for investment monitoring
  • Risk Assessment: Analyze wallet token diversification and concentration risks for due diligence
  • Balance Verification: Confirm token holdings for audit, compliance, and verification purposes
  • Value Tracking: Monitor USD values of all token positions in real-time
  • Token Discovery: Identify all tokens held by a wallet including lesser-known or new tokens

Endpoint Details

URL:

https://opabinia.cambrian.network/api/v1/evm/tvl/status

Method: GET
Authentication: Required via X-API-Key header

Query Parameters

Parameter Type Required Default Description
wallet_address string Yes - Address that holds tokens prefixed with 0x
whitelisted boolean No false If true, only whitelisted tokens will be returned

Response Field Descriptions

Response Field Type Description
ownerAddress FixedString(42) The wallet address that owns the tokens
tokenAddress FixedString(42) The contract address of the token
tokenSymbol String The symbol/ticker of the token
tokenDecimals UInt8 Number of decimal places for the token
tokenAmountRaw Int256 Raw token amount in smallest unit (wei equivalent)
tokenAmountUI Float64 Human-readable token amount adjusted for decimals
valueUSD Float64 USD value of the token holding

Examples

1. Get All Token Holdings for Wallet

This example demonstrates retrieving all token holdings for a specific EVM wallet address.

curl -X GET "https://opabinia.cambrian.network/api/v1/evm/tvl/status?wallet_address=0xfBB6Eed8e7aa03B138556eeDaF5D271A5E1e43ef" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response:

[{
  "columns": [
    {"name": "ownerAddress", "type": "FixedString(42)"},
    {"name": "tokenAddress", "type": "FixedString(42)"},
    {"name": "tokenSymbol", "type": "String"},
    {"name": "tokenDecimals", "type": "UInt8"},
    {"name": "tokenAmountRaw", "type": "Int256"},
    {"name": "tokenAmountUI", "type": "Float64"},
    {"name": "valueUSD", "type": "Float64"}
  ],
  "data": [
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "4811805792", 48.11805792, 4341844.026892705],
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "3119811016458", 3119811.016458, 3119811.016458],
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x3d63825b0d8669307366e6c8202f656b9e91d368", "WGC", 6, "200010000", 200.01, 0.012028710676836933],
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x4b6104755afb5da4581b81c552da3a25608c73b8", "SKITTEN", 18, "16802760000000000000", 16.80276, 0.0116606483051986],
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0xc438b0c0e80a8fa1b36898d1b36a3fc2ec371c54", "BLEP", 18, "100000000000000000000", 100.0, 0.003914016905260998]
  ],
  "rows": 298
  // ... additional rows omitted for brevity
}]

This response shows the wallet holds 298 different tokens, with major holdings including 48.12 cbBTC worth $4.34M and 3.12M USDC. The data includes both high-value and small-value token positions.

2. Get Whitelisted Token Holdings Only

This example demonstrates filtering to show only whitelisted tokens to focus on major/verified tokens.

curl -X GET "https://opabinia.cambrian.network/api/v1/evm/tvl/status?wallet_address=0xfBB6Eed8e7aa03B138556eeDaF5D271A5E1e43ef&whitelisted=true" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response:

[{
  "columns": [
    {"name": "ownerAddress", "type": "FixedString(42)"},
    {"name": "tokenAddress", "type": "FixedString(42)"},
    {"name": "tokenSymbol", "type": "String"},
    {"name": "tokenDecimals", "type": "UInt8"},
    {"name": "tokenAmountRaw", "type": "Int256"},
    {"name": "tokenAmountUI", "type": "Float64"},
    {"name": "valueUSD", "type": "Float64"}
  ],
  "data": [
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "4811805792", 48.11805792, 4341844.026892705],
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "3119811016458", 3119811.016458, 3119811.016458],
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x3d63825b0d8669307366e6c8202f656b9e91d368", "WGC", 6, "200010000", 200.01, 0.012028710676836933],
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x4b6104755afb5da4581b81c552da3a25608c73b8", "SKITTEN", 18, "16802760000000000000", 16.80276, 0.0116606483051986],
    ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0xc438b0c0e80a8fa1b36898d1b36a3fc2ec371c54", "BLEP", 18, "100000000000000000000", 100.0, 0.003914016905260998]
  ],
  "rows": 298
  // ... additional rows omitted for brevity
}]

The whitelisted filter helps focus on established tokens while filtering out potential spam or low-value tokens from the complete holdings list.

x402 Payment Option

This endpoint supports pay-per-use access via the x402 payment protocol (v2) — pay $0.05 USDC per request using blockchain micropayments. No API key required.

Quick Start (TypeScript)

npm install @x402/fetch @x402/evm viem
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));

const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const response = await fetchWithPayment(
  "https://deep42.cambrian.network/api/v1/evm/tvl/status"
);
const data = await response.json();

Quick Start (Python)

pip install "x402[httpx]"
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

async def main():
    client = x402Client()
    account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
    register_exact_evm_client(client, EthAccountSigner(account))

    async with x402HttpxClient(client) as http:
        response = await http.get("https://deep42.cambrian.network/api/v1/evm/tvl/status")
        print(response.json())

asyncio.run(main())

Payment Flow

  1. Send a normal request to the endpoint (no API key needed)
  2. Server returns 402 Payment Required with payment details
  3. The x402 SDK automatically signs a payment authorization with your wallet
  4. The SDK resubmits the request with the signed payment
  5. Server verifies payment and returns the API response

The x402 SDK handles steps 2–5 automatically.

Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request