DefiLlama icon

DefiLlama

Access DeFi protocols data using the DefiLlama API

Overview

The node integrates with the DefiLlama API to retrieve detailed data about DeFi protocols. Specifically, for the Get Protocol Details operation under the Protocol resource, it fetches comprehensive information about a single DeFi protocol identified by its slug (a unique string identifier like "aave" or "uniswap"). This includes metadata such as TVL (Total Value Locked), category, description, and other relevant statistics.

This node is beneficial when you want to programmatically access up-to-date details about specific DeFi protocols for analytics, reporting, or integration into dashboards. For example, you could use it to:

  • Display detailed info about a protocol in a DeFi portfolio tracker.
  • Automate monitoring of protocol stats for investment decisions.
  • Enrich datasets with protocol metadata for research purposes.

Properties

Name Meaning
Protocol Slug The unique identifier of the protocol to query (e.g., "aave", "uniswap", "curve-dao"). Required field.
Additional Fields A collection of optional parameters (not specifically used in this operation) but available generally.

Note: For this operation, only the Protocol Slug is required and used.

Output

The output JSON contains detailed information about the specified protocol, including but not limited to:

  • name: Protocol name.
  • tvl: Total Value Locked (numeric).
  • tvl_formatted: Human-readable formatted TVL (e.g., "$1.23B").
  • category: Protocol category.
  • description: Textual description of the protocol.
  • Other protocol-specific metrics and metadata.

Additionally, the output includes a _metadata object with:

  • resource: The resource queried ("protocol").
  • operation: The operation performed ("getProtocol").
  • fetched_at: Timestamp of data retrieval.

If the node is configured with AI Agent Mode enabled, the output can include a simplified structured summary optimized for AI consumption.

Dependencies

  • Requires internet access to call the DefiLlama public API at https://api.llama.fi.
  • Optionally supports an API key credential for authenticated requests, though it is not mandatory.
  • Uses the Axios HTTP client internally for API calls.

Troubleshooting

  • Missing or invalid Protocol Slug: The node requires a valid protocol slug. If missing or containing invalid characters (only lowercase letters, numbers, hyphens, and underscores allowed), it will throw an error.
  • Protocol Not Found (404): If the slug does not correspond to any known protocol on DefiLlama, an error indicating "Protocol not found" will be thrown.
  • Invalid Slug Format (400): If the slug format is incorrect, the node will prompt to check the slug format.
  • Network or API errors: General HTTP errors from the API are surfaced as node errors. Ensure network connectivity and that the DefiLlama API is reachable.

To resolve these issues, verify the protocol slug correctness, ensure network connectivity, and optionally provide a valid API key if rate limits or access restrictions apply.

Links and References

Discussion