Start for Free
Start for Free

DeFi API for Wallet Positions, Yield & Portfolio Data

Get any wallet’s DeFi positions across 10,000+ protocols and 120+ chains, priced in USD. Staking, lending, LP, and yield in one schema.

CoinStats DeFi API
Staking
Lending
LP Positions
Yield Farming
Priced in USD
10,000+ protocols
Live Demo

What a DeFi API Does

Pass a wallet address and get its DeFi positions back as JSON. Staking, lending, LP, and yield across protocols, priced in USD.

wallet-balance.sh
120 chains
GET api.coinstats.app/wallet/balance?address=0x7a25…f3D9
200 OK · 142ms

Demo data for illustration. Live responses return in ~100-200ms.

10,000+
DeFi protocols
120+
Blockchains
100,000+
Coins priced
20,000
Free credits/mo
GET/wallet/transactionsGET/profit-loss

Portfolio Analytics and P&L

Aggregate DeFi positions with token balances into one portfolio view: total value, allocation, performance, and realized and unrealized P&L.

DeFi Positions 0x7a2…3f9
$11,310.50
+$842.10 ▲ 8.0% (24h) · 3 protocols
Staking
Lido · stETH
$4,206.20
Lending
Aave v3 · supplied
$4,120.00
LP Position
Uniswap v3 · ETH/USDC
$2,984.30
By Protocol Auto-detected
10,000+ protocols
Resolved automatically · priced in USD
Aave v3
Lending · 3.2% APY
$4,120.00
Lido
Staking · 2.9% APY
$4,206.20
Uniswap v3
LP · 14.1% APY
$2,984.30
Yield & P&L All-time
+$1,940.60
▲ 20.7% on $9,369.90 supplied
Yield earned
Rewards accrued
+$612.40
Unrealized
Open positions
+$1,128.20
Realized
Claimed rewards
+$812.40
DeFi positions

DeFi Positions, Auto-Detected Across 10,000+ Protocols

Pass an address and positions surface automatically across 10,000+ protocols and 120+ chains. No protocol-by-protocol integration, resolved to USD values.

0x7a2…3f9
Aave v3
Lending
3.2%
Uniswap v3
ETH/USDC LP
11.4%
Lido
Staking
2.9%
Marinade
SOL Staking
6.8%
Aave v3
Lending
3.2%
GET/portfolioGET/portfolio/charts

Every Position Type, Resolved and Priced in USD

Staking, lending and borrowing, LP shares, and yield farming, each returned with principal, rewards, and current USD value from 100,000+ coins.

PORTFOLIO INSIGHTS 0x7a2…3f9
$13,875.85
+$1,240.50 ▲ 9.8% (24h)
Asset Allocation By position type
4 types
Staking, lending, LP, and yield
Staking
37%
Lending
31%
LP Positions
21%
Yield Farming
11%
PORTFOLIO VS MARKET vs Market
+79.93%
Your portfolio · 1Y
Your Portfolio
+79.93%
BTC Portfolio
+42.10%
S&P 500
+18.40%
MCP Server

One DeFi API for AI Agents and MCP Clients

The CoinStats MCP server exposes wallet, DeFi, and portfolio tools to AI agents over one OAuth-protected URL.

ClaudeCursorClaude CodeCodexVS CodeN8N
Server URL
https://mcp.coinstats.app/mcp
  1. 1Paste the URL into your client's connector settings.
  2. 2Approve the consent screen in your browser.
  3. 3Ask your agent: “what DeFi positions does this wallet hold?”
Read the MCP Docs
Use Cases

Build Anything That Reads DeFi Positions

DeFi Dashboards
Show every staking, lending, LP, and yield position with live USD value.
Yield Aggregators
Surface APY and rewards across protocols a wallet farms.
DeFi Portfolio Trackers
Aggregate positions with token balances into one valued portfolio.
Tax & Accounting
Resolved DeFi positions and rewards with USD values for cost basis.
AI DeFi Assistants
Let agents read a wallet's DeFi positions over MCP.
Risk & Analytics
Monitor protocol exposure and position health across a wallet.
Best for: All-in-one crypto data API with wallet and portfolio intelligence

The Free DeFi API That Scales With You

Get an API key and make your first call in minutes. Free tier includes 20,000 credits a month, with commercial use.

FAQ

DeFi API FAQ

What is a DeFi API?

A DeFi API lets you read decentralized-finance data programmatically. With CoinStats you pass a wallet address and get its DeFi positions back as JSON: staking, lending, LP, and yield across protocols, each resolved to a live USD value, without integrating each protocol yourself.

What is the difference between a DeFi positions API and a DeFi TVL API?

A positions API like CoinStats tells you what a specific wallet holds across DeFi. A TVL API reports protocol-level totals and rankings, not individual wallet positions. Use a positions API to build portfolio, tax, or dashboard features per user.

Does it execute swaps, bridges, or staking?

No. CoinStats is a DeFi data API: it reads and normalizes positions. It does not execute transactions, run swaps or bridges, or stake on your behalf. Pair it with an execution provider if you need to act on positions.

What are examples of DeFi protocols it covers?

10,000+ protocols across lending, DEX and LP, liquid staking, and yield, auto-detected per wallet. Lending and borrowing: Aave, Compound, Morpho, Spark, Venus, Benqi, JustLend. DEX and LP: Uniswap, Curve, PancakeSwap, Balancer, SushiSwap, Aerodrome, Velodrome, QuickSwap, Camelot, Orca, Raydium. Liquid staking: Lido, Rocket Pool, Jito, Marinade. Yield and vaults: Yearn, Convex, Pendle, Beefy. Plus thousands more across Ethereum and EVM chains, Solana, and 120+ networks.

Does it work with AI agents like Claude or ChatGPT?

Yes. The CoinStats MCP Server exposes wallet, DeFi, and portfolio tools over the Model Context Protocol. It works with Claude, Cursor, Claude Code, VS Code, and N8N. The same API key works for REST and MCP.

What DeFi positions can it return?

Staking, lending and borrowing, liquidity-pool (LP) shares, and yield-farming positions, each with principal, rewards owed, and current USD value, auto-detected per wallet across 10,000+ protocols.

How many DeFi protocols and chains does it cover?

10,000+ protocols across 120+ chains, including Ethereum and all major EVM chains plus Solana and other non-EVM networks, through one endpoint format.

Are DeFi positions priced in USD?

Yes. Every position is returned with a live USD value, drawn from price coverage of 100,000+ coins, so portfolio views and dashboards render without a separate pricing integration.

Can it calculate DeFi P&L?

Yes. Aggregate DeFi positions with token balances into a portfolio view with realized and unrealized P&L, calculated with average buy and sell prices, so trackers and tax tools show performance without their own accounting engine.

Does it work for Solana DeFi, not just EVM?

Yes. DeFi positions are covered across Ethereum and EVM chains, Solana, and 120+ networks in total, through one schema. One integration covers DeFi across chains.

How is the response structured?

Clean JSON over REST, with standard HTTP status codes and API-key auth. DeFi positions are pre-enriched with USD values and token metadata, so they map directly to UI components.

Is there a free DeFi API?

Yes. The CoinStats free tier includes 20,000 credits per month at 2 requests per second, no credit card required. It is the same data available on paid plans at a lower limit, enough to prototype and ship.

How does pricing work?

Credit-based. Each plan includes a monthly credit allowance and each endpoint costs credits by complexity, not a flat request cap. Start free with 20,000 credits per month and upgrade for higher limits.

Can I use it in a commercial product?

Yes. Paid plans include commercial use, and the API already powers portfolio apps, tax tools, and dashboards in production. There are no feature gates between tiers.

How do I get started?

Create a free account, generate an API key from the dashboard, and make your first DeFi positions request in minutes using the examples in the docs. The free tier is enough to build and test a full integration.