DeFi API

❗️

Disclaimer

The cost and speed of transacting with blockchain-based systems are varied and may change significantly at any time, resulting in price and fee fluctuations. The actual prices and fees may vary from the information shown.

The Blockdaemon DeFi API is a unified and standardized interface that enables seamless DeFi integration across 50+ blockchains and protocols. With an exhaustive set of endpoints covering DEXs, bridges, lending, liquid staking, yield aggregators, RWAs, oracles, NFTs, synthetics, stablecoins, and account abstraction, we connect developers, traders, wallets, institutions, and applications to the entire DeFi ecosystem.

Whether you need to perform same-chain token swaps, transfer assets across blockchains, integrate lending and staking, or query DeFi from an AI assistant over MCP, Blockdaemon provides the tools to support a wide range of decentralized application workflows.

Features

Card Group

💰 Token Swaps

Swap tokens within or across chains for seamless and optimized asset transfers.

📈 Tokens, NFTs & Oracles

Retrieve balances, metadata, ownership, and price data for tokens, NFTs, and oracles.

🏦 Lending & Borrowing

Integrate lending protocols for liquidity management and yield generation.

💧 Liquid Staking

Stake, unstake, wrap, and track rewards and APR across liquid staking protocols.

🌾 Yield Aggregators

Deposit, withdraw, and manage vault and pool positions across yield aggregators.

🏛️ RWA & Synthetics

Issue and transfer RWAs, and trade synthetic assets.

⚙️ Account Abstraction

Build ERC-4337 flows: signature messages, paymasters, and bundled user operations.

🤖 DeFi MCP

Connect an AI assistant or IDE to DeFi APIs over MCP — no HTTP client code required.

🔗 Single API Integration

Transact and source data across EVM and Non-EVM chains (e.g., Ethereum, Solana, Bitcoin).

🔒 Security

Private keys never leave your environment; transactions are signed locally.

🛒 Transaction Status

Monitor and fetch the status of cross-chain transactions.

🏢 Institutional-Scale

Backed by Blockdaemon, a leader in blockchain infrastructure.

API categories

The DeFi API is organized into the following public categories. Start with Authentication, then pick the category that matches your workflow.

CategoryWhat you can do
AuthenticationGet an API key and authenticate requests
Account AbstractionSignature messages, paymaster data, and ERC-4337 user operations
AccountAllowances and account-level DeFi data
BridgeCross-chain routes, quotes, swaps, and liquidity
ChainBalances, blocks, gas, transactions, and contract calls
DEXQuotes, swaps, pools, orders, and liquidity
Fungible TokenTransfers, approvals, supply, and token details
Lend & BorrowDeposits, borrows, repayments, and user positions
Liquid StakingStake, unstake, wrap, rewards, and APR
NFTBalances, metadata, ownership, and history
OraclePrice feeds and supported tokens
RWAIssue, transfer, freeze, and query real-world assets
StablecoinStablecoin price data
SupportSupported chains, protocols, and API metadata
SyntheticSynthetic prices and pegged-token deposit/withdraw
WETHWrapped ETH balances and historical logs
Yield AggregatorVaults, pools, deposits, withdrawals, and liquidity

DeFi MCP

Connect an AI assistant or IDE to Blockdaemon's DeFi APIs over the Model Context Protocol (MCP) so you can query balances, request swap quotes, and build transactions conversationally — without writing HTTP client code.

  • Endpoint: https://svc.blockdaemon.com/defi/v1/mcp/http
  • Transport: Streamable HTTP
  • Auth: X-Api-Key header, same key as other Blockdaemon APIs
  • Clients: Claude Code, VS Code, Codex CLI, Cursor, and Claude Desktop (via proxy)

See the DeFi MCP guide for setup, example prompts, and troubleshooting.

Use Cases

Trade - Execute swaps via DEXs like Uniswap, PancakeSwap, Curve, and more, and cross-chain swaps via bridges such as Squid Router, Stargate, AllBridge, KyberSwap, and more.

Lending & Borrowing - Integrate Aave, Compound, Morpho, Pendle, and others for liquidity management and yield strategies.

Liquid Staking & Yield - Stake and unstake through liquid staking protocols, and deposit or withdraw from yield aggregator vaults and pools.

RWA & Synthetics - Issue and transfer tokenized real-world assets, and trade synthetic assets.

Portfolio - Track performance across chains by pulling real-time balance data, NFT holdings, and oracle prices.

Account Abstraction - Build gasless and batched user operations with paymasters and ERC-4337 flows.

Build with AI - Connect Cursor, Claude Code, VS Code, or Codex to the DeFi MCP server and call DeFi tools from natural-language prompts.

Data Sourcing - Access price data for tax compliance or risk analysis, monitor liquidity pools, and analyze transaction trends for trading strategies.

Getting Started

To get started and retrieve your API key, follow these steps:

  1. Log into your Blockdaemon Dashboard at https://app.blockdaemon.com/
  2. Navigate to the API Suite section and copy your free API Key
  3. Navigate to the DeFi APIs section and click on any quickstart examples to test your key

Once you have your key, you can immediately begin:

  • Generating transactions for DEX swaps or bridge transfers
  • Integrating lending, liquid staking, and yield aggregators
  • Working with RWAs, NFTs, oracles, and synthetics
  • Receiving and signing transaction payloads
  • Broadcasting transactions to the network
  • Monitoring status across chains
  • Connecting an AI client to the DeFi MCP endpoint

Example cURL request:

curl -X GET "https://svc.blockdaemon.com/defi/v1/[ENDPOINT]" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Tutorials

Explore step-by-step workflows to integrate DeFi capabilities into your applications:

TutorialDescription
Same-Chain SwapExecute token swaps on a single blockchain
Cross-Chain SwapBridge assets across different blockchains
Deposit & WithdrawLend and borrow using DeFi lending protocols
DeFi MCPConnect an AI assistant or IDE to DeFi APIs over MCP

Reference

Supported Protocols

See the complete list of supported blockchains, DEXs, bridges, and lending protocols here.

DeFi MCP

Connect AI assistants and IDEs using the DeFi MCP server.

Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.


Did this page help you?