Quickstart

Quickstart

Get up and running with the Data & Wallet API in less than a minute. In this guide, we will fetch the complete token balances for a specific wallet address on Ethereum.

Step 1: Get Your API Endpoint

The Data & Wallet API is enabled by default for all dRPC paid users. No extra activation is required.

  1. Log in to your dRPC Dashboard (opens in a new tab).
  2. Navigate to API Keys and select your active key (or create a new one).
  3. On the key's page, locate the Data & Wallet API card. Copy the base URL provided there.

Your base URL will look like:

https://lb.drpc.live/lambda/<YOUR_API_TOKEN>

For per-chain requests, the base URL includes the network:

https://lb.drpc.live/<CHAIN>/<YOUR_API_TOKEN>/lambda

Step 2: Make Your First Request

Let's fetch token balances for vitalik.eth on Ethereum. We'll use the per-chain endpoint GET /lambda/v2/wallets/{address}/balances:

cURL:

curl --request GET \
     --url 'https://lb.drpc.live/ethereum/<YOUR_API_TOKEN>/lambda/v2
/wallets/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/balances' \
     --header 'Accept: application/json'

JavaScript (Fetch):

const chain = 'ethereum';
const apiToken = '<YOUR_API_TOKEN>';
const address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
 
fetch(`https://lb.drpc.live/${chain}/${apiToken}/lambda/v2/wallets/${address}/balances`, {
  method: 'GET',
  headers: { 'Accept': 'application/json' }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));

Step 3: Understand the Response

You will receive a structured JSON response containing the wallet's total net worth, portfolio allocation, and detailed asset metadata (including current USD values and token amounts):

{
  "data": {
    "total_net_worth_usd": 1012548.06,
    "portfolio_allocation_usd": {
      "wallet": 1007179.94,
      "deposit": 5309.19,
      "borrow": 0.0
    },
    "assets": [
      {
        "type": "token",
        "chain_id": "ethereum",
        "chain_name": "Ethereum",
        "value_usd": 9924.69,
        "value_usd_change_1d": 73.29,
        "attributes": {
          "token_symbol": "ETH",
          "token_name": "Ethereum",
          "decimals": 18,
          "amount": 5.690864,
          "price_usd": 1743.97,
          "icon_url": "https://static.lambda.p2p.org/tokens/ethereum/eth.png"
        },
        "asset_type": "token"
      }
    ]
  }
}

Step 3.5: Try the Global Endpoint

The per-chain endpoint above returns balances for one network. To get cross-chain balances in a single call, use the global endpoint GET /v2/wallets/{address}/balances:

curl --request GET \
     --url 'https://lb.drpc.live/lambda/<YOUR_API_TOKEN>/v2/wallets/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/balances' \
     --header 'Accept: application/json'

This returns balances across all supported chains at once — no need to query each network separately.

Next Steps

Now that you have successfully connected, explore other core endpoints to power your application's DeFi features: