REST API integration
DefiLlama REST API integration for Draftbit
Fetch DeFi TVL and protocol data
What is DefiLlama?
DefiLlama provides public DeFi protocol, chain, and TVL data over REST. It is useful for dashboards and apps that need protocol metrics without exchange credentials.
Use DefiLlama with Draftbit
- Built-in endpoints: List protocols, Get protocol, Chain historical TVL, Protocol chart.
- Bind any DefiLlama endpoint to a screen, list, form, or AI agent action.
- Authentication is configured once per app — secrets stay on the server.
- Add custom request and response transforms without forking DefiLlama's client library.
Example
defillama-example.ts // Example: fetch from DefiLlama
// DefiLlama doesn't require an auth header for this endpoint —
// some providers authenticate via a query param or app-level token.
// Check DefiLlama's docs for auth requirements on protected endpoints.
const response = await fetch("https://api.llama.fi/protocols");
const data = await response.json();Use cases
- Power a mobile app with a hosted database and APIs
- Add search, filtering, and pagination to a list-driven feature
- Read and write app data without managing your own server
Authentication
Add any required auth headers when you connect DefiLlama in Draftbit. Secrets stay on the server side.
Use DefiLlama in a Draftbit app today
Start free, connect DefiLlama in minutes, and ship with AI agents that know how to use it.
Frequently asked questions
What is the DefiLlama REST integration?
DefiLlama provides public DeFi protocol, chain, and TVL data over REST. It is useful for dashboards and apps that need protocol metrics without exchange credentials.
How do I connect DefiLlama to a Draftbit app?
Go to Integrations → REST APIs in your Draftbit app and pick DefiLlama from the catalog. Set any base-URL variables (project IDs, hosts) and the endpoints become available across your screens — no auth header required for the preconfigured calls.
Does DefiLlama require authentication?
DefiLlama's preconfigured endpoints don't require an auth header — some providers authenticate via a query param or app-level token, and others are public read-only APIs. Check DefiLlama's docs before calling protected endpoints. Built-in endpoints include: List protocols, Get protocol, Chain historical TVL, Protocol chart.
What can I build with DefiLlama and Draftbit?
Use DefiLlama as a backend platform for your mobile or web app: Power a mobile app with a hosted database and APIs; Add search, filtering, and pagination to a list-driven feature.