Skip to main content

What We’re Building

Slimer is a wallet dashboard that displays token balances, portfolio value, and transaction history for any Solana wallet address. Key features:
  • Real-time token balances with USD values
  • Total portfolio calculation
  • Transaction history with labels (DEX trades, transfers, approvals)
  • Live updates via polling

Setup

Before starting, ensure Claude Code has access to Allium MCP. See the Client Setup guide.

Development Workflow

1. Initial Prompt

I want to build a Solana wallet viewer that shows:
- Live token balances with USD values
- Current total wallet value
- Recent transactions

Search Allium's documentation to find which APIs I can use.    

2. Claude Code Discovers APIs

Claude Code uses MCP to search the documentation for wallet-related APIs:
Claude Code searches for wallet-related APIs to understand what data is available:
allium - Search Docs (MCP)(query: "Solana wallet balances USD value     
                                  transactions real-time")
allium - Search Docs (MCP)(query: "real-time developer API wallet       
                                  balances transactions Solana")
allium - Search Docs (MCP)(query: "wallet API get balances endpoint     
                                  parameters REST")
allium - Search Docs (MCP)(query: "wallet transactions API endpoint POST
                                   request body")
MCP Response (filtered to show relevant entries):
{
  "results": [
    {
      "content": "Allium's Wallet APIs provide a comprehensive, wallet-centric view of blockchain data to power wallets and applications...",
      "path": "api/developer/wallets/overview",
      "metadata": {
        "title": "Overview",
        "description": "Build wallet-centric applications with realtime balance, transaction, and activity data.",
        "href": "/api/developer/wallets/overview",
        "hidden": false
      }
    },
    {
      "content": "...",
      "path": "api/developer/wallets/latest-token-balances",                
      "metadata": {                                                         
        "title": "Fetch latest fungible token balances",                    
        "openapi": "_openapi/wallet-api.json post /api/v1/developer/wallet/balances",                                         
        "description": "Get the latest balances for a list of wallets.",                                                                  
        "href": "/api/developer/wallets/latest-token-balances",             
        "hidden": false                                                     
      }   
    },
    {
      "content": "Each transaction in the response includes activities, asset transfers, and labels (where supported).\n\n## Supported Chains\n\n<SupportedChainsList product_name=\"wallet_transactions\" />\n\n## Feature Support by Chain\n\n| Feature         | EVM           | Solana           | Bitcoin       |\n| :-------------- | :------------ | :--------------- | :------------ |\n| History         | Since genesis | Since 2022-01-01 | Since genesis |\n| Asset transfers | ✅             | ✅                | ✅             |\n| Activities      | ✅             | ✅                | ❌             |\n| Labels          | ✅             | ❌                | ❌             |\n\n## Supported Activities by Chain\n\n| Activity               | Type                         | EVM | Solana                 | Bitcoin |\n| :--------------------- | :--------------------------- | :-- | :--------------------- | :------ |\n| Asset Approval         | `asset_approval`             | ✅   | N/A                    | ❌       |\n| Asset Bridge           | `asset_bridge`               | ✅   | N/A                    | ❌       |\n| DEX Trade              | `dex_trade`                  | ✅   | ✅                      | ❌       |\n| Liquidity Pool Burn    | `dex_liquidity_pool_burn`    | ✅   | ❌                      | ❌       |\n| Liquidity Pool Mint    | `dex_liquidity_pool_mint`    | ✅   | ❌                      | ❌       |\n| Liquidity Pool Created | `dex_liquidity_pool_created` | ✅   | ❌                      | ❌       |\n| NFT Trade              | `nft_trade`                  | ✅   | ✅ (Magic Eden v2 only) | ❌       |\n...",
      "path": "api/developer/wallets/transactions",                         
          "metadata": {                                                         
            "title": "Fetch transactions",                                      
            "openapi": "_openapi/wallet-api.json post /api/v1/developer/wallet/transactions",                                     
            "description": "Get rich transaction activity data for wallets, including activities, asset transfers, and labels.",                       
            "href": "/api/developer/wallets/transactions",                      
            "hidden": false                                                     
          }
    },
    {
      "content": "Allium Realtime enables engineers to query both raw and enriched blockchain data to power realtime applications and workflows with **realtime data freshness (3-4s)**.\n\n## API Verticals\n\nAllium Realtime provides pull-based REST APIs to query realtime blockchain data across **20+ blockchains** (including Solana):\n\n<CardGroup cols={2}>\n  <Card title=\"Prices APIs\" icon=\"chart-line\" href=\"/api/developer/prices/overview\">\n    Realtime token prices and historical price data derived from DEX trade feeds\n  </Card>\n\n  <Card title=\"Tokens APIs\" icon=\"coins\" href=\"/api/developer/tokens/list-tokens\">\n    Realtime token data, including prices, balances, and metadata\n  </Card>\n\n  <Card title=\"Holdings APIs\" icon=\"wallet\" href=\"/api/developer/holdings/overview\">\n    Realtime holdings data with Profit & Loss (PnL) calculations\n  </Card>\n\n  <Card title=\"Wallet APIs\" icon=\"user\" href=\"/api/developer/wallets/overview\">\n    Realtime wallet balances, transactions, and historical activity\n  </Card>\n</CardGroup>\n\n## Performance & Reliability\n\n| Feature             | Details                                                                                   |\n| :------------------ | :---------------------------------------------------------------------------------------- |\n| Data Freshness      | p50 of **3-5 seconds**                                                                    |\n| Requests per Second | Up to **1K+ RPS** (during [peak loads](https://x.com/phantom/status/1881190197397692647)) |\n| Re-Org Handling     | **Realtime** re-org detection and correction                                              |\n| SLAs                | **24/7/365** support for Enterprise Customers                                             |\n...",
      "path": "api/developer/overview",
      "metadata": {
        "title": "Overview",
        "description": "Query realtime blockchain data with fast response times and low latency across 13+ blockchains.",
        "href": "/api/developer/overview",
        "hidden": false        
      }
    }
  ]
}
Claude Code discovers the Wallet APIs from these search results, learning
  • The Wallet Balances API fetches latest token balances with USD values
  • The Transactions API gets transaction history with activities (DEX trades, approvals) and asset transfers
  • Solana is fully supported with real-time data freshness of 3-5 seconds
  • Transaction activities include DEX trades, asset transfers, and labels

3. Testing with Real Data

Before writing the full component, Claude Code tests the API with a real Solana wallet address:
json
{
  "name": "realtime_get_wallet_balances",
  "arguments": {
    "address": "MfDuWeqSHEqTFVYZ7LoexgAK9dxk7cy4DFJWjWMGVWa",
    "chain": "solana",
    "with_liquidity_info": false
  }
}
Response snippet:
{
  "items": [
    {
      "chain": "solana",
      "address": "MfDuWeqSHEqTFVYZ7LoexgAK9dxk7cy4DFJWjWMGVWa",
      "token": {
        "object": "token",
        "chain": "solana",
        "address": "cbbtcf3aa214zXHbiAZQwf4122FBYbraNdFqgw4iMij",
        "type": "sol_spl",
        "price": 88804.16649765545,
        "decimals": 8,
        "info": {
          "name": "Coinbase Wrapped BTC",
          "symbol": "cbBTC"
        },
        "attributes": {
          
        }
      },
      "raw_balance": 580131377,
      "raw_balance_str": "580131377",
      "block_timestamp": "2026-01-27T04:12:06Z",
      "block_slot": 396191395,
      "txn_index": 841,
      "token_account": "FjCi6obsKMFUPRGWimrFzfhRzoQGTqzAL1Z44gZNHfoo",
      "block_hash": "AbJCSzzUqLQwt7F98PELskU2Fut6oDsNR7tt4p4yjQRc",
      "txn_id": "3hUvXH24wUEwugNHRv1UsVB6kD2oNgVBo3MtHUf9uxrURJFr5SHQf63UudPG6KYrP2dUTNFnfFqvEYnu5dWog4a7"
    },
    ...
  ]
}
Claude Code now understands:
  • Each balance includes a token object with price, decimals, and info (name/symbol)
  • To calculate USD value: (raw_balance / 10^decimals) * token.price

4. Building the Components

Claude Code generates TypeScript React components with proper types: Generated hook:
interface UseBalancesParams {
	chain: string
	address: string
}

async function fetchBalances(chain: string, address: string) {
	const response = await fetch("https://api.allium.so/api/v1/developer/wallet/balances", {
		method: "POST",
		headers: {
			"Content-Type": "application/json",
			"X-API-Key": process.env.ALLIUM_API_KEY || "",
		},
		body: JSON.stringify([{ chain, address }]),
	})
	
	if (!response.ok) {
		throw new Error(`API error: ${response.status}`)
	}
	
	return response.json()
}

function useBalances(params: UseBalancesParams) {
	const { chain, address } = params
	const query = useQuery({
		queryKey: ["wallet-balances", chain, address],
		queryFn: () => fetchBalances(chain, address),
		refetchInterval: 1000,
	})
	return query
}
Portfolio calculation:
const balancesWithUSD = balances?.map((item) => {
  const actualBalance = item.raw_balance / Math.pow(10, item.token?.decimals ?? 0)
  const usdValue = actualBalance * (item.token?.price ?? 0)
  return { symbol: item.token?.info?.symbol, actualBalance, usdValue }
})

const totalUSD = balancesWithUSD?.reduce((sum, item) => sum + item.usdValue, 0)

5. Adding Transaction History

The developer refines the prompt:
Now add a transactions tab that shows recent DEX trades, 
transfers, and other activities.
Claude Code fetches transaction history for the wallet:
Tool call: Fetching recent transactions for the wallet
{
  "name": "realtime_get_wallet_transactions",
  "arguments": {
    "addresses": [
      {"address": "MfDuWeqSHEqTFVYZ7LoexgAK9dxk7cy4DFJWjWMGVWa", "chain": "solana"}
    ],
    "limit": 10
  }
}
MCP Response snippet:
{
  "items": [
    {
      "transaction_hash": "5x7...",
      "block_timestamp": "2026-01-27T00:15:42Z",
      "activities": [
        {
          "type": "dex_trade",
          "protocol": "jupiter",
          "token_in": "SOL",
          "token_out": "USDC",
          "amount_in": 1.5,
          "amount_out": 185.73
        }
      ],
      "asset_transfers": [
        {
          "transfer_type": "sent",
          "token_symbol": "SOL",
          "amount": 1.5,
          "to_address": "..."
        }
      ]
    }
  ]
}
Claude Code sees the response includes activities (DEX trades, approvals) and asset_transfers (sends/receives), then generates helper functions:
function getTransactionTypeDisplay(transaction) {
  if (transaction.activities.length > 0) {
    const activity = transaction.activities[0]
    switch (activity.type) {
      case "dex_trade":
        return { label: "DEX Trade", icon: <Activity /> }
      case "asset_approval":
        return { label: "Approval", icon: <Check /> }
      // ...
    }
  } else if (transaction.asset_transfers.length > 0) {
    const transfer = transaction.asset_transfers[0]
    return transfer.transfer_type === "sent" 
      ? { label: "Send", icon: <ArrowUp /> }
      : { label: "Receive", icon: <ArrowDown /> }
  }
}

Final Result

See the complete wallet dashboard in action Development time: ~15 minutes from initial prompt to working app MCP tools used:
  • docs_search - Found relevant API documentation
  • realtime_get_wallet_balances - Tested balance endpoint
  • realtime_get_wallet_transactions - Tested transactions endpoint

Key Takeaways

  1. Discovery is seamless - docs_search helps Claude Code find the right APIs without manual documentation searching
  2. Testing with real data - Claude Code can test APIs directly via MCP before writing code, ensuring correct implementation
  3. Type safety from the start - Real API responses inform TypeScript types, reducing bugs
  4. Iterative refinement - Easy to add features by prompting Claude Code, which already understands the data structure

What’s Next?

Try building your own blockchain app with Claude Code + Allium MCP:
  • Portfolio tracker across multiple chains
  • NFT gallery viewer
  • Token price alerts
  • DEX trading dashboard
All without leaving your IDE!