Back to LiveQuery Integrations

    DefiLlama DeFi Data API

    DefiLlama DeFi Data API from DefiLlamaDefiLlama
    Log in to Manage

    The DefiLlama DeFi Data API grants developers real-time access to a comprehensive range of decentralized finance (DeFi) protocols' TVL (Total Value Locked), asset information, yield data, and more, facilitating informed decision-making within the dynamic DeFi ecosystem.

    -- without api_key:
    SELECT defillama.get('/protocols', {}) as resp
    -- with api key:
    SELECT defillama.get('/protocols', {'api_key': '{api_key}'}) as resp
    Getting Started

    The DefiLlama DeFi Data API stands as a vital conduit for developers, analysts, and enthusiasts seeking real-time insights into the ever-evolving landscape of decentralized finance (DeFi). With a commitment to fostering informed decision-making, this API offers a seamless gateway to a wealth of DeFi protocols' data, encompassing Total Value Locked (TVL), asset information, yield data, and more.

    • Account Creation: To commence the integration process, users are required to create an account on the DefiLlama website. This account establishes the foundation for API access.

    • API Key Generation: Upon successful account creation and login, users can proceed to generate a unique API key. This key serves as the gateway to accessing the API's wealth of DeFi data. It plays a pivotal role in authenticating API requests and ensuring data security.

    • Subscription Selection: The API offers various subscription tiers catering to diverse needs. Users have the flexibility to select a subscription plan that aligns with their usage requirements. A chosen plan initiates the path to comprehensive DeFi insights.

    • Terms Acceptance: Prior to delving into the API's offerings, users are expected to review and accept the DefiLlama API Terms of Use. These terms delineate the acceptable usage of API data, including attribution guidelines and other essential aspects.

    • API Documentation: The API documentation emerges as an invaluable companion on the journey. It elucidates the spectrum of available endpoints, detailed explanations of request parameters, response formats, and authentication mechanisms. This documentation equips users with the knowledge needed to craft effective API queries.


    The DefiLlama DeFi Data API furnishes a comprehensive suite of features and data, allowing applications to flourish with DeFi insights. Here are the key features and data sets available:

    1. Total Value Locked (TVL) Access real-time and historical data on the Total Value Locked (TVL) across a multitude of DeFi protocols. Monitor TVL fluctuations and trends to gauge the health of the DeFi ecosystem.

    2. Asset Information Retrieve detailed information about DeFi assets, including names, symbols, contract addresses, and more. Keep users informed about the diverse range of assets within the DeFi space.

    3. Yield Data Access yield-related data, including annual percentage yields (APYs), lending and borrowing rates, and other yield farming metrics. Empower users with insights into potential income streams within the DeFi realm.

    4. Protocol Analytics Obtain protocol-specific analytics, such as user activity, transaction volumes, and governance parameters. Gain a deeper understanding of the dynamics driving DeFi protocols.

    5. Historical Data Access historical data to perform in-depth analyses of TVL, asset performance, and yield trends over specific timeframes. Uncover patterns and make informed decisions based on historical insights.

    6. Data Customization Fine-tune API requests using filters, parameters, and query options to tailor data retrieval to specific requirements. Provide users with precisely the information they need.