DefiLlama icon

DefiLlama

Access DeFi protocols data using the DefiLlama API

Overview

The node provides access to stablecoin data from the DefiLlama API, specifically supporting the operation to list stablecoins. It fetches a list of stablecoins along with their market capitalization and other relevant financial metrics. This node is useful for users who want to monitor or analyze stablecoins in the DeFi ecosystem, such as tracking market caps, prices, and peg types.

Practical examples include:

  • Retrieving a filtered list of stablecoins above a certain market cap threshold.
  • Getting a concise overview of the top stablecoins by market capitalization.
  • Integrating stablecoin market data into dashboards or automated reports.

Properties

Name Meaning
Additional Fields Collection of optional filters and settings:
- Max Results Maximum number of stablecoins to return (1-100). Default is 20.
- Min Market Cap Minimum market capitalization threshold in USD to filter stablecoins.
- Include Pegged Whether to include pegged assets in the results (boolean). Defaults to true (include).
- AI Agent Mode Optimize output format for AI agents with simplified and structured data (boolean).
- Include Summary When AI Agent Mode is enabled, whether to include a human-readable summary (boolean).

Output

The node outputs an array of JSON objects representing stablecoins. Each object contains detailed information about a stablecoin, including but not limited to:

  • name: The name of the stablecoin.
  • symbol: The ticker symbol.
  • circulating.peggedUSD: Market capitalization in USD.
  • price: Current price of the stablecoin.
  • pegType: Type of peg (e.g., fiat, crypto).
  • Formatted fields such as market_cap_formatted and price_formatted for easier readability.
  • Metadata including resource type, operation, and timestamp of data retrieval.

If AI Agent Mode is enabled, the output includes a structured summary (ai_summary) alongside the data, total results count, resource and operation info, and a timestamp.

The node does not output binary data.

Dependencies

  • Requires internet access to call the DefiLlama public APIs at:
    • https://stablecoins.llama.fi/stablecoins
  • Optionally uses an API key credential if provided, sent as a Bearer token in the Authorization header.
  • Uses the Axios HTTP client library internally for API requests.

No special environment variables or additional n8n configurations are required beyond optionally providing an API key credential.

Troubleshooting

  • Empty or no data returned: Check that the filters (e.g., Min Market Cap) are not too restrictive.
  • API request failures: Network issues or API downtime can cause errors; verify connectivity and try again later.
  • Invalid property values: Ensure numeric inputs like Max Results and Min Market Cap are within valid ranges.
  • Credential issues: If using an API key, ensure it is valid and has proper permissions.
  • Unexpected output format: If AI Agent Mode is enabled, output format changes; disable this mode if raw data is preferred.

Common error messages relate to invalid input parameters or network/API errors and will be surfaced as node execution errors with descriptive messages.

Links and References

Discussion