DefiLlama Pro API Skill

Use this skill to run DefiLlama Pro API operations through uxc + OpenAPI.

Reuse the uxc skill for shared execution, auth, and error-handling guidance.

Prerequisites

Scope

This skill covers a read-first analytics surface:

This skill does not cover:

Authentication

DefiLlama Pro places the API key in the request path, between the host and the endpoint path.

Configure one API-key credential with a request path prefix template:

uxc auth credential set defillama-pro \
  --auth-type api_key \
  --secret-env DEFILLAMA_PRO_API_KEY \
  --path-prefix-template "/{{secret}}"

uxc auth binding add \
  --id defillama-pro \
  --host pro-api.llama.fi \
  --scheme https \
  --credential defillama-pro \
  --priority 100

Validate the active mapping when auth looks wrong:

uxc auth binding match https://pro-api.llama.fi

Core Workflow

  1. Use the fixed link command by default:

    • command -v defillama-pro-openapi-cli
    • If missing, create it: uxc link defillama-pro-openapi-cli https://pro-api.llama.fi --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-pro-openapi-skill/references/defillama-pro.openapi.json
    • defillama-pro-openapi-cli -h
  2. Inspect operation schema first:

    • defillama-pro-openapi-cli get:/api/protocols -h
    • defillama-pro-openapi-cli get:/coins/prices/current/{coins} -h
    • defillama-pro-openapi-cli get:/yields/chart/{pool} -h
  3. Prefer narrow read validation before broader reads:

    • defillama-pro-openapi-cli get:/api/v2/chains
    • defillama-pro-openapi-cli get:/api/protocol/{protocol} protocol=aave
    • defillama-pro-openapi-cli get:/yields/pools
  4. Execute with key/value parameters:

    • defillama-pro-openapi-cli get:/api/protocol/{protocol} protocol=aave
    • defillama-pro-openapi-cli get:/coins/prices/current/{coins} coins=ethereum:0x0000000000000000000000000000000000000000 searchWidth=4h
    • defillama-pro-openapi-cli get:/stablecoins/stablecoindominance/{chain} chain=ethereum

Operation Groups

Protocol And Chain Analytics

Prices, Yields, And Stablecoins

Guardrails

References