Back to Docs

DeFi Data

DefiLlama Integration

Access DefiLlama's comprehensive DeFi analytics through Obolo. Pay per call with USDC and get TVL, token prices, yield data, and stablecoin analytics — all optimized for AI agent consumption.

Why Use DefiLlama Through Obolo?

Agent-Native Payments

AI agents pay per API call with USDC on Base. No API keys, no rate limit negotiations, no billing accounts. The x402 protocol handles everything.

Structured for LLMs

Responses are formatted for agent consumption with optional Markdown transformation. Agents spend fewer tokens parsing data.

Skills Compatible

Each endpoint has a YAML skill file that matches the format used by DefiLlama and other agent platforms. Drop-in compatible with any skill-aware agent.

Unified Marketplace

DeFi data alongside 26+ other endpoints. Agents discover, compare, and chain APIs together — call DefiLlama TVL then a pricing oracle in one workflow.

Available Endpoints

defillama-tvl$0.001/call

Total value locked for any DeFi protocol, with chain breakdowns and historical data.

defillama-chains$0.001/call

Compare TVL across all blockchain networks. Rankings, market share, and growth trends.

defillama-prices$0.0005/call

Current and historical token prices across DEXs. Aggregated from on-chain sources.

defillama-yields$0.001/call

APY data for lending, staking, and LP pools across protocols and chains.

defillama-stablecoins$0.001/call

Market cap, peg deviation, and flow data for USDC, USDT, DAI, and 50+ stablecoins.

Code Example

Call a DefiLlama endpoint through Obolo using the TypeScript SDK. The agent wallet pays USDC automatically via the x402 protocol.

import { GateFlowClient } from '@gateflow/sdk';

const gf = new GateFlowClient({
  walletKey: process.env.GATEFLOW_WALLET_KEY,
});

// Get total TVL across all DeFi protocols
const tvl = await gf.call('defillama-tvl', {
  method: 'GET',
  params: { protocol: 'aave-v3' },
});

console.log(tvl.data);
// { name: "Aave V3", tvl: 12400000000, chains: [...] }

Skills Compatibility

Obolo publishes YAML skill files in the same format used by DefiLlama and other agent platforms. Any agent framework that reads skill definitions can discover and call these endpoints automatically.

# skills/defillama-tvl.yaml
name: defillama-tvl
description: Get total value locked for any DeFi protocol
endpoint: /v1/defillama-tvl
method: GET
parameters:
  - name: protocol
    type: string
    required: false
    description: Protocol slug (e.g. "aave-v3", "uniswap")
price: 0.001 USDC
chains: [base, ethereum]

All 5 DefiLlama endpoints have corresponding skill files at /skills/.

How Agents Use Obolo + DefiLlama Together

  1. 1
    Discover. Agent browses Obolo marketplace (free, no payment required) and finds DefiLlama endpoints via skill files or catalog search.
  2. 2
    Pay. Agent sends a request with an x402 USDC payment proof. Obolo proxy verifies the on-chain transfer in under 2 seconds.
  3. 3
    Call. Proxy forwards the request to DefiLlama, returns the response with payment receipt headers. The agent has DeFi data and a verifiable proof of payment.
  4. 4
    Chain. Agent can compose DefiLlama data with other Obolo endpoints — check TVL, then call a pricing oracle, then execute a trade — all in one workflow with per-call payments.

Payment Options

MethodTokenChain
x402 Payment ProofUSDC, USDT, USD1, PYUSDBase (primary), Ethereum, Solana, +5 more
AP2 MandateUSDCBase
SubscriptionCredits (Stripe)N/A