{
  "openapi": "3.0.0",
  "info": {
    "description": "> [!WARNING]\n> The free yield endpoints `/pools` and `/chart/{pool}` shut down on **November 13, 2026**. The same data remains available on the [API plan](https://defillama.com/subscription) at `/yields/v1/pools` and `/yields/v1/chart/{pool}`.\n\n## Using AI?\n\nDefiLlama offers two ways to use our data with AI:\n\n| Resource | For | Description |\n|---|---|---|\n| <a href='/llms.txt'><b>llms.txt</b></a> | AI assistants (ChatGPT, Claude, Cursor, etc.) | Paste this link into your AI assistant for LLM-optimized docs |\n| <a href='https://defillama.com/mcp'><b>MCP Server</b></a> | AI agents | Connect your agent directly to DefiLlama data — 23 tools, requires an API plan |\n\n**Quick start (MCP)** — paste this into your AI agent:\n```\nRead https://raw.githubusercontent.com/DefiLlama/defillama-skills/refs/heads/master/defillama-setup/SKILL.md and follow the instructions to connect to DefiLlama MCP\n```\n\n---\n\n## Authentication\n\nThe free API needs no key. If you have an API plan, use `https://pro-api.llama.fi/{YOUR_API_KEY}/...` with the key between the base URL and the endpoint. Do NOT send the key as a query parameter (`?apikey=`) or header.\n\nA 200 from `/protocols` or `/overview/fees` here does not validate your API key. Those endpoints require no authentication. A 402 here does not prove your subscription expired. It means the endpoint needs an API plan. There are only two tiers: free (no key) and the API plan. One API plan key unlocks every Pro endpoint. There are no add-ons or separate keys for volumes, derivatives, or other data.\n\nTo check that your key works, call `https://pro-api.llama.fi/usage/{YOUR_API_KEY}` (key at the end, for this endpoint only). It returns your remaining credits, like `{\"creditsLeft\": 1000000}`.\n\nNeed higher rate limits or priority support? We offer a premium plan for 300$/mo. To get it, go to https://defillama.com/subscription\n\n## SDK\n\n**JavaScript** — `npm install @defillama/api` — [GitHub](https://github.com/DefiLlama/api-sdk)\n\n**Python** — `pip install defillama-sdk` — [GitHub](https://github.com/DefiLlama/python-sdk)\n\nQuick start (JavaScript):\n```ts\nimport { DefiLlama } from '@defillama/api'\n\nconst client = new DefiLlama()\nconst protocols = await client.tvl.getProtocols()\n```\n\nQuick start (Python):\n```py\nfrom defillama_sdk import DefiLlama\n\nclient = DefiLlama()\nprotocols = client.tvl.getProtocols()\n```",
    "version": "1.0.0-oas3",
    "title": "DefiLlama API",
    "x-scalar-sdk-installation": [
      {
        "lang": "node",
        "description": "Install the DefiLlama JavaScript SDK:",
        "source": "npm install @defillama/api"
      },
      {
        "lang": "js",
        "description": "Install the DefiLlama JavaScript SDK:",
        "source": "npm install @defillama/api"
      },
      {
        "lang": "python",
        "description": "Install the DefiLlama Python SDK:",
        "source": "pip install defillama-sdk"
      }
    ]
  },
  "tags": [
    {
      "name": "TVL",
      "description": "Retrieve TVL data"
    },
    {
      "name": "coins",
      "description": "General blockchain data used by defillama and open-sourced"
    },
    {
      "name": "stablecoins",
      "description": "Data from our stablecoins dashboard"
    },
    {
      "name": "yields",
      "description": "Data from our yields/APY dashboard\n\n> [!WARNING]\n> **The yield endpoints on the left of the arrows below stop working on November 13, 2026.** Migrate before then. From that date the yield API requires the [API plan](https://defillama.com/subscription).\n\n### How to migrate\n\n**Option 1, minimal: swap the URL.** The `/yields/v1/` routes serve the same response format as the endpoints they replace, so the URL is the only thing you change. They exist for compatibility only: all new features land on v2.\n\n- `/pools`, `/yields/pools`, `/yields/poolsOld`, `/yields/poolsPro` → `/yields/v1/pools`\n- `/chart/{pool}`, `/yields/chart/{pool}` → `/yields/v1/chart/{pool}`\n- `/yields/poolsBorrow` → `/yields/v1/poolsBorrow`\n- `/yields/chartLendBorrow/{pool}` → `/yields/v1/chartLendBorrow/{pool}`\n- `/yields/lsdRates` → `/api/lstRates`\n\n**Option 2, recommended: move to v2.** New response format, so this takes some integration work, but you get all the new features: Verified APY, 10-minute refreshes, the borrow router, and APYs split into components.\n\n- `/pools`, `/yields/pools`, `/yields/poolsOld`, `/yields/poolsPro` → `/yields/v2/earn`\n- `/chart/{pool}`, `/yields/chart/{pool}` → `/yields/v2/earn/{id}/history`\n- `/yields/poolsBorrow` → `/yields/v2/borrow/markets`\n- `/yields/chartLendBorrow/{pool}` → `/yields/v2/borrow/markets/{id}/history` (borrow side) and `/yields/v2/earn/{id}/history` (lend side)\n- `/yields/lsdRates` → `/api/lstRates` (no v2 version)\n\nGood to know:\n\n- Pool IDs are unchanged, so nothing needs re-mapping.\n- Values are computed by the new pipeline, so numbers may differ slightly from the legacy endpoints; the response format is unchanged.\n- `/yields/v1/pools` serves the `/poolsOld` format, which contains all the `/pools` fields, so parsers for either endpoint keep working.\n- Some legacy statistics fields (e.g. `predictions`) are always null on the `/yields/v1/` routes."
    },
    {
      "name": "volumes",
      "description": "Data from our volumes dashboards"
    },
    {
      "name": "fees and revenue",
      "description": "Data from our fees and revenue dashboard"
    }
  ],
  "servers": [
    {
      "url": "https://api.llama.fi"
    }
  ],
  "paths": {
    "/protocols": {
      "get": {
        "tags": ["TVL"],
        "summary": "List all protocols on defillama along with their tvl",
        "responses": {
          "200": {
            "description": "Array of all protocols with their TVL data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "2269"
                      },
                      "name": {
                        "type": "string",
                        "example": "Aave"
                      },
                      "symbol": {
                        "type": "string",
                        "example": "AAVE"
                      },
                      "category": {
                        "type": "string",
                        "example": "Lending"
                      },
                      "chains": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "example": ["Ethereum", "Polygon"]
                      },
                      "tvl": {
                        "type": "number",
                        "example": 5200000000
                      },
                      "chainTvls": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "number"
                        },
                        "example": {
                          "Ethereum": 3200000000,
                          "Polygon": 2000000000
                        }
                      },
                      "change_1d": {
                        "type": "number",
                        "example": 2.1
                      },
                      "change_7d": {
                        "type": "number",
                        "example": -5.3
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.tvl.getProtocols()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.tvl.getProtocols()"
          }
        ]
      }
    },
    "/protocol/{protocol}": {
      "get": {
        "tags": ["TVL"],
        "summary": "Get historical TVL of a protocol and breakdowns by token and chain",
        "parameters": [
          {
            "name": "protocol",
            "in": "path",
            "description": "protocol slug",
            "required": true,
            "schema": {
              "type": "string",
              "example": "aave"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Protocol details with historical TVL data and chain breakdowns",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "parent#aave"
                    },
                    "name": {
                      "type": "string",
                      "example": "AAVE"
                    },
                    "symbol": {
                      "type": "string",
                      "example": "AAVE"
                    },
                    "category": {
                      "type": "string",
                      "example": "Lending"
                    },
                    "chains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": ["Ethereum", "Polygon", "Avalanche"]
                    },
                    "currentChainTvls": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "number"
                      },
                      "example": {
                        "Ethereum": 3200000000,
                        "Polygon": 1500000000
                      }
                    },
                    "chainTvls": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "tvl": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "number",
                                  "example": 1609459200
                                },
                                "totalLiquidityUSD": {
                                  "type": "number",
                                  "example": 1000000
                                }
                              }
                            }
                          },
                          "tokens": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "number",
                                  "example": 1609459200
                                },
                                "tokens": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "number"
                                  },
                                  "example": {
                                    "USDC": 1000000,
                                    "USDT": 800000
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Protocol not found"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.tvl.getProtocol('<protocol>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.tvl.getProtocol('<protocol>')"
          }
        ]
      }
    },
    "/v2/historicalChainTvl": {
      "get": {
        "tags": ["TVL"],
        "summary": "Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains",
        "responses": {
          "200": {
            "description": "Historical TVL data for all chains combined",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "number",
                        "description": "Unix timestamp",
                        "example": 1609459200
                      },
                      "tvl": {
                        "type": "number",
                        "description": "Total Value Locked in USD across all chains",
                        "example": 15000000000
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.tvl.getHistoricalChainTvl()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.tvl.getHistoricalChainTvl()"
          }
        ]
      }
    },
    "/v2/historicalChainTvl/{chain}": {
      "get": {
        "tags": ["TVL"],
        "summary": "Get historical TVL (excludes liquid staking and double counted tvl) of a chain",
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "description": "chain slug, you can get these from /chains or the chains property on /protocols",
            "schema": {
              "type": "string",
              "example": "Ethereum"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical TVL data for the specified chain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "number",
                        "description": "Unix timestamp",
                        "example": 1609459200
                      },
                      "tvl": {
                        "type": "number",
                        "description": "Total Value Locked in USD for this chain",
                        "example": 45000000000
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Chain not found"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.tvl.getHistoricalChainTvl('<chain>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.tvl.getHistoricalChainTvl()"
          }
        ]
      }
    },
    "/tvl/{protocol}": {
      "get": {
        "tags": ["TVL"],
        "summary": "Simplified endpoint to get current TVL of a protocol",
        "description": "Simplified endpoint that only returns a number, the current TVL of a protocol",
        "parameters": [
          {
            "name": "protocol",
            "in": "path",
            "required": true,
            "description": "protocol slug",
            "schema": {
              "type": "string",
              "example": "uniswap"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current TVL of the protocol in USD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "number",
                  "description": "Total Value Locked in USD",
                  "example": 4962012809.795062
                }
              }
            }
          },
          "404": {
            "description": "Protocol not found"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.tvl.getTvl('<protocol>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.tvl.getTvl('<protocol>')"
          }
        ]
      }
    },
    "/v2/chains": {
      "get": {
        "tags": ["TVL"],
        "summary": "Get current TVL of all chains",
        "responses": {
          "200": {
            "description": "Array of all chains with their TVL data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "gecko_id": {
                        "type": "string",
                        "nullable": true,
                        "description": "CoinGecko ID for the chain's native token",
                        "example": "ethereum"
                      },
                      "tvl": {
                        "type": "number",
                        "description": "Total Value Locked in USD",
                        "example": 65998652431.40251
                      },
                      "tokenSymbol": {
                        "type": "string",
                        "nullable": true,
                        "description": "Native token symbol",
                        "example": "ETH"
                      },
                      "cmcId": {
                        "type": "string",
                        "nullable": true,
                        "description": "CoinMarketCap ID",
                        "example": "1027"
                      },
                      "name": {
                        "type": "string",
                        "description": "Chain name",
                        "example": "Ethereum"
                      },
                      "chainId": {
                        "type": "number",
                        "nullable": true,
                        "description": "Chain ID number",
                        "example": 1
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.tvl.getChains()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.tvl.getChains()"
          }
        ]
      }
    },
    "/prices/current/{coins}": {
      "get": {
        "tags": ["coins"],
        "summary": "Get current prices of tokens by contract address",
        "description": "The goal of this API is to price as many tokens as possible, including exotic ones that never get traded, which makes them impossible to price by looking at markets.\n\nThe base of our data are prices pulled from coingecko, which is then extended through multiple means:\n- We price all bridged tokens by using the price of the token in it's original chain, so we fetch all bridged versions of USDC on arbitrum, fantom, avax... and price all them using the price for the token on Ethereum, which we know. Right now we support 10 different bridging protocols.\n- We have multiple adapters to price specialized sets of tokens by running custom code:\n  - We price yearn's yToken LPs by checking how much underlying token can be withdrawn for each LP\n  - Aave, compound and euler LP tokens are also priced based on their relationship against underlying tokens\n  - Uniswap, curve, balancer and stargate LPs are priced using the underlying tokens in each pair\n  - GMX's GLP token is priced based on the value of tokens given on withdrawal (which includes calculations based on trader's PnL)\n  \n  - Synthetix tokens are priced using forex prices of the coin they are pegged to\n- For tokens that we haven't been able to price in any other way, we find the pool with most liquidity for each on uniswap, curve and serum and then use the prices provided on those exchanges.\n  \n  Unlike all the other tokens, we can't confirm that these prices are correct, so we only ingest the ones that have sufficient liquidity and, even in that case, we attach a `confidence` value to them that is related to the depth of liquidity and which represents our confidence in the quality of each price. API consumers can choose to filter out prices with low confidence values.\n  \n Our API server is fully open source and we are constantly adding more pricing adapters, extending the amount of tokens we support.\n  \nTokens are queried using {chain}:{address}, where chain is an identifier such as ethereum, bsc, polygon, avax... You can also get tokens by coingecko id by setting `coingecko` as the chain, eg: coingecko:ethereum, coingecko:bitcoin. Examples:\n  - ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1\n  - bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878\n  - coingecko:ethereum\n  - arbitrum:0x4277f8f2c384827b5273592ff7cebd9f2c1ac258\n",
        "servers": [
          {
            "url": "https://coins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "coins",
            "in": "path",
            "required": true,
            "description": "set of comma-separated tokens defined as {chain}:{address}",
            "schema": {
              "type": "string",
              "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "coins": {
                      "type": "object",
                      "properties": {
                        "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
                          "type": "object",
                          "required": ["price", "symbol", "timestamp"],
                          "properties": {
                            "decimals": {
                              "type": "number",
                              "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
                              "example": 8
                            },
                            "price": {
                              "type": "number",
                              "example": 0.022053735051098835
                            },
                            "symbol": {
                              "type": "string",
                              "example": "cDAI"
                            },
                            "timestamp": {
                              "type": "number",
                              "example": 0.99
                            },
                            "confidence": {
                              "type": "number",
                              "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
                              "example": 0.99
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Internal error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.prices.getCurrentPrices(['<coins>'])"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.prices.getCurrentPrices(['<coins>'])"
          }
        ]
      }
    },
    "/prices/historical/{timestamp}/{coins}": {
      "get": {
        "tags": ["coins"],
        "summary": "Get historical prices of tokens by contract address",
        "description": "See /prices/current for explanation on how prices are sourced.",
        "servers": [
          {
            "url": "https://coins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "coins",
            "in": "path",
            "required": true,
            "description": "set of comma-separated tokens defined as {chain}:{address}",
            "schema": {
              "type": "string",
              "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
            }
          },
          {
            "name": "timestamp",
            "in": "path",
            "required": true,
            "description": "UNIX timestamp of time when you want historical prices",
            "schema": {
              "type": "number",
              "example": 1648680149
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "coins": {
                      "type": "object",
                      "properties": {
                        "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
                          "type": "object",
                          "required": ["price", "symbol", "timestamp"],
                          "properties": {
                            "decimals": {
                              "type": "number",
                              "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
                              "example": 8
                            },
                            "price": {
                              "type": "number",
                              "example": 0.022053735051098835
                            },
                            "symbol": {
                              "type": "string",
                              "example": "cDAI"
                            },
                            "timestamp": {
                              "type": "number",
                              "example": 1648680149
                            },
                            "confidence": {
                              "type": "number",
                              "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
                              "example": 0.99
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Internal error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.prices.getHistoricalPrices(1704067200, ['<coins>'])"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.prices.getHistoricalPrices(1704067200, ['<coins>'])"
          }
        ]
      }
    },
    "/batchHistorical": {
      "get": {
        "tags": ["coins"],
        "summary": "Get historical prices for multiple tokens at multiple different timestamps",
        "servers": [
          {
            "url": "https://coins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "coins",
            "in": "query",
            "required": true,
            "description": "object where keys are coins in the form {chain}:{address}, and values are arrays of requested timestamps",
            "schema": {
              "type": "string",
              "example": "{\"avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e\": [1666876743, 1666862343], \"coingecko:ethereum\": [1666869543, 1666862343]}\n"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "coins": {
                      "type": "object",
                      "properties": {
                        "avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e": {
                          "type": "object",
                          "properties": {
                            "symbol": {
                              "type": "string",
                              "example": "USDC"
                            },
                            "prices": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "timestamp": {
                                    "type": "number",
                                    "example": 1666876674
                                  },
                                  "price": {
                                    "type": "number",
                                    "example": 0.999436
                                  },
                                  "confidence": {
                                    "type": "number",
                                    "example": 0.99
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Internal error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.prices.getBatchHistoricalPrices({ '<coins>': [1704067200] })"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.prices.getBatchHistoricalPrices(['<coins>'], '<List[int]]>')"
          }
        ]
      }
    },
    "/chart/{coins}": {
      "get": {
        "tags": ["coins"],
        "summary": "Get token prices at regular time intervals",
        "description": "Strings accepted by period:\nCan use regular chart candle notion like ‘4h’ etc where:\nW = week, D = day, H = hour, M = minute (not case sensitive)\n",
        "servers": [
          {
            "url": "https://coins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "coins",
            "in": "path",
            "required": true,
            "description": "set of comma-separated tokens defined as {chain}:{address}",
            "schema": {
              "type": "string",
              "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "unix timestamp of earliest data point requested",
            "schema": {
              "type": "number",
              "example": 1664364537
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "unix timestamp of latest data point requested",
            "schema": {
              "type": "number",
              "example": null
            }
          },
          {
            "name": "span",
            "in": "query",
            "required": false,
            "description": "number of data points returned, defaults to 0",
            "schema": {
              "type": "number",
              "example": 10
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "duration between data points, defaults to 24 hours",
            "schema": {
              "type": "string",
              "example": "2d"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "coins": {
                      "type": "object",
                      "properties": {
                        "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
                          "type": "object",
                          "required": ["confidence", "prices", "symbol"],
                          "properties": {
                            "decimals": {
                              "type": "number",
                              "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
                              "example": 8
                            },
                            "confidence": {
                              "type": "number",
                              "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
                              "example": 0.99
                            },
                            "prices": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "timestamp": {
                                    "type": "number",
                                    "example": 1666790570
                                  },
                                  "price": {
                                    "type": "number",
                                    "example": 0.984519
                                  }
                                }
                              }
                            },
                            "symbol": {
                              "type": "string",
                              "example": "HUSD"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Internal error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.prices.getChart(['<coins>'])"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.prices.getChart(['<coins>'])"
          }
        ]
      }
    },
    "/percentage/{coins}": {
      "get": {
        "tags": ["coins"],
        "summary": "Get percentage change in price over time",
        "description": "Strings accepted by period:\nCan use regular chart candle notion like ‘4h’ etc where:\nW = week, D = day, H = hour, M = minute (not case sensitive)\n",
        "servers": [
          {
            "url": "https://coins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "coins",
            "in": "path",
            "required": true,
            "description": "set of comma-separated tokens defined as {chain}:{address}",
            "schema": {
              "type": "string",
              "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "required": false,
            "description": "timestamp of data point requested, defaults to time now",
            "schema": {
              "type": "number",
              "example": 1664364537
            }
          },
          {
            "name": "lookForward",
            "in": "query",
            "required": false,
            "description": "whether you want the duration after your given timestamp or not, defaults to false (looking back)",
            "schema": {
              "type": "boolean",
              "example": false
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "duration between data points, defaults to 24 hours",
            "schema": {
              "type": "string",
              "example": "3w"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "coins": {
                      "type": "object",
                      "properties": {
                        "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
                          "type": "number",
                          "example": -2.3009954568977147
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Internal error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.prices.getPercentageChange(['<coins>'])"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.prices.getPercentageChange(['<coins>'])"
          }
        ]
      }
    },
    "/prices/first/{coins}": {
      "get": {
        "tags": ["coins"],
        "summary": "Get earliest timestamp price record for coins",
        "servers": [
          {
            "url": "https://coins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "coins",
            "in": "path",
            "required": true,
            "description": "set of comma-separated tokens defined as {chain}:{address}",
            "schema": {
              "type": "string",
              "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "coins": {
                      "type": "object",
                      "properties": {
                        "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
                          "type": "object",
                          "properties": {
                            "price": {
                              "type": "number",
                              "example": 0.9992047673109988
                            },
                            "symbol": {
                              "type": "string",
                              "example": "HUSD"
                            },
                            "timestamp": {
                              "type": "number",
                              "example": 1568883821
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Internal error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.prices.getFirstPrices(['<coins>'])"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.prices.getFirstPrices(['<coins>'])"
          }
        ]
      }
    },
    "/block/{chain}/{timestamp}": {
      "get": {
        "tags": ["coins"],
        "summary": "Get the closest block to a timestamp",
        "description": "Runs binary search over a blockchain's blocks to get the closest one to a timestamp.\nEvery time this is run we add new data to our database, so each query permanently speeds up future queries.\n",
        "servers": [
          {
            "url": "https://coins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "description": "Chain which you want to get the block from",
            "required": true,
            "schema": {
              "type": "string",
              "example": "ethereum"
            }
          },
          {
            "name": "timestamp",
            "in": "path",
            "description": "UNIX timestamp of the block you are searching for",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 1603964988
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "height": {
                      "type": "integer",
                      "format": "uint",
                      "example": 11150916
                    },
                    "timestamp": {
                      "type": "integer",
                      "format": "uint",
                      "example": 1603964988
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid chain or timestamp provided"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.prices.getBlockAtTimestamp('<chain>', 1704067200)"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.prices.getBlockAtTimestamp('<chain>', 1704067200)"
          }
        ]
      }
    },
    "/stablecoins": {
      "get": {
        "tags": ["stablecoins"],
        "summary": "List all stablecoins along with their circulating amounts",
        "servers": [
          {
            "url": "https://stablecoins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "includePrices",
            "in": "query",
            "required": false,
            "description": "set whether to include current stablecoin prices",
            "schema": {
              "type": "boolean",
              "example": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of all stablecoins with their circulation data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "peggedAssets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "1"
                          },
                          "name": {
                            "type": "string",
                            "example": "Tether"
                          },
                          "symbol": {
                            "type": "string",
                            "example": "USDT"
                          },
                          "pegType": {
                            "type": "string",
                            "example": "peggedUSD"
                          },
                          "pegMechanism": {
                            "type": "string",
                            "example": "fiat-backed"
                          },
                          "circulating": {
                            "type": "object",
                            "properties": {
                              "peggedUSD": {
                                "type": "number",
                                "example": 159510682147.76874
                              }
                            }
                          },
                          "chains": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": ["Ethereum", "Tron", "BSC"]
                          },
                          "chainCirculating": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "current": {
                                  "type": "object",
                                  "properties": {
                                    "peggedUSD": {
                                      "type": "number",
                                      "example": 50000000000
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "price": {
                            "type": "number",
                            "example": 1.001
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.stablecoins.getStablecoins()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.stablecoins.getStablecoins()"
          }
        ]
      }
    },
    "/stablecoincharts/all": {
      "get": {
        "tags": ["stablecoins"],
        "summary": "Get historical mcap sum of all stablecoins",
        "servers": [
          {
            "url": "https://stablecoins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "stablecoin",
            "in": "query",
            "required": false,
            "description": "stablecoin ID, you can get these from /stablecoins",
            "schema": {
              "type": "integer",
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical market cap data for all stablecoins",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "number",
                        "example": 1609459200
                      },
                      "totalCirculating": {
                        "type": "object",
                        "properties": {
                          "peggedUSD": {
                            "type": "number",
                            "example": 45000000000
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.stablecoins.getAllCharts()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.stablecoins.getAllCharts()"
          }
        ]
      }
    },
    "/stablecoincharts/{chain}": {
      "get": {
        "tags": ["stablecoins"],
        "summary": "Get historical mcap sum of all stablecoins in a chain",
        "servers": [
          {
            "url": "https://stablecoins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "description": "chain slug, you can get these from /chains or the chains property on /protocols",
            "schema": {
              "type": "string",
              "example": "Ethereum"
            }
          },
          {
            "name": "stablecoin",
            "in": "query",
            "required": false,
            "description": "stablecoin ID, you can get these from /stablecoins",
            "schema": {
              "type": "integer",
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical market cap data for stablecoins on specified chain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "number",
                        "example": 1609459200
                      },
                      "totalCirculating": {
                        "type": "object",
                        "properties": {
                          "peggedUSD": {
                            "type": "number",
                            "example": 12000000000
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.stablecoins.getChartsByChain('<chain>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.stablecoins.getChartsByChain('<chain>')"
          }
        ]
      }
    },
    "/stablecoin/{asset}": {
      "get": {
        "tags": ["stablecoins"],
        "summary": "Get historical mcap and historical chain distribution of a stablecoin",
        "servers": [
          {
            "url": "https://stablecoins.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "asset",
            "in": "path",
            "required": true,
            "description": "stablecoin ID, you can get these from /stablecoins",
            "schema": {
              "type": "integer",
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical market cap and chain distribution for specific stablecoin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "1"
                    },
                    "name": {
                      "type": "string",
                      "example": "Tether"
                    },
                    "symbol": {
                      "type": "string",
                      "example": "USDT"
                    },
                    "totalCirculating": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "number",
                            "example": 1609459200
                          },
                          "totalCirculating": {
                            "type": "number",
                            "example": 50000000000
                          }
                        }
                      }
                    },
                    "chainCirculating": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "number",
                              "example": 1609459200
                            },
                            "circulating": {
                              "type": "number",
                              "example": 20000000000
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.stablecoins.getStablecoin('<asset>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.stablecoins.getStablecoin('<asset>')"
          }
        ]
      }
    },
    "/stablecoinchains": {
      "get": {
        "tags": ["stablecoins"],
        "summary": "Get current mcap sum of all stablecoins on each chain",
        "servers": [
          {
            "url": "https://stablecoins.llama.fi"
          }
        ],
        "responses": {
          "200": {
            "description": "Current market cap of stablecoins by chain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "example": "Ethereum"
                      },
                      "totalCirculating": {
                        "type": "object",
                        "properties": {
                          "peggedUSD": {
                            "type": "number",
                            "example": 75000000000
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.stablecoins.getChains()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.stablecoins.getChains()"
          }
        ]
      }
    },
    "/stablecoinprices": {
      "get": {
        "tags": ["stablecoins"],
        "summary": "Get historical prices of all stablecoins",
        "servers": [
          {
            "url": "https://stablecoins.llama.fi"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical prices for all stablecoins",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "number",
                        "example": 1609459200
                      },
                      "prices": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "number"
                        },
                        "example": {
                          "USDT": 1.001,
                          "USDC": 0.999,
                          "DAI": 1.002
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.stablecoins.getPrices()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.stablecoins.getPrices()"
          }
        ]
      }
    },
    "/pools": {
      "get": {
        "tags": ["yields"],
        "summary": "Retrieve the latest data for all pools, including enriched information such as predictions",
        "deprecated": true,
        "description": "**This endpoint shuts down on November 13, 2026.** The same data remains available at `/yields/v1/pools` on the [API plan](https://defillama.com/subscription).",
        "servers": [
          {
            "url": "https://yields.llama.fi"
          }
        ],
        "responses": {
          "200": {
            "description": "Array of all yield farming pools with their data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "chain": {
                            "type": "string",
                            "example": "Ethereum"
                          },
                          "project": {
                            "type": "string",
                            "example": "lido"
                          },
                          "symbol": {
                            "type": "string",
                            "example": "STETH"
                          },
                          "tvlUsd": {
                            "type": "number",
                            "example": 32493036117
                          },
                          "apyBase": {
                            "type": "number",
                            "example": 2.84
                          },
                          "apyReward": {
                            "type": ["number", "null"],
                            "example": null
                          },
                          "apy": {
                            "type": "number",
                            "example": 2.84
                          },
                          "rewardTokens": {
                            "type": ["array", "null"],
                            "items": {
                              "type": "string"
                            },
                            "example": null
                          },
                          "pool": {
                            "type": "string",
                            "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
                          },
                          "apyPct1D": {
                            "type": "number",
                            "example": -0.04
                          },
                          "apyPct7D": {
                            "type": "number",
                            "example": -0.056
                          },
                          "apyPct30D": {
                            "type": ["number", "null"],
                            "example": null
                          },
                          "stablecoin": {
                            "type": "boolean",
                            "example": false
                          },
                          "ilRisk": {
                            "type": "string",
                            "example": "no"
                          },
                          "exposure": {
                            "type": "string",
                            "example": "single"
                          },
                          "predictions": {
                            "type": "object",
                            "properties": {
                              "predictedClass": {
                                "type": "string",
                                "example": "Stable/Up"
                              },
                              "predictedProbability": {
                                "type": "number",
                                "example": 74
                              },
                              "binnedConfidence": {
                                "type": "number",
                                "example": 2
                              }
                            }
                          },
                          "poolMeta": {
                            "type": ["string", "null"],
                            "example": null
                          },
                          "mu": {
                            "type": "number",
                            "example": 3.7747
                          },
                          "sigma": {
                            "type": "number",
                            "example": 0.05236
                          },
                          "count": {
                            "type": "number",
                            "example": 1141
                          },
                          "outlier": {
                            "type": "boolean",
                            "example": false
                          },
                          "underlyingTokens": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": ["0x0000000000000000000000000000000000000000"]
                          },
                          "il7d": {
                            "type": ["number", "null"],
                            "example": null
                          },
                          "apyBase7d": {
                            "type": ["number", "null"],
                            "example": null
                          },
                          "apyMean30d": {
                            "type": "number",
                            "example": 2.73539
                          },
                          "volumeUsd1d": {
                            "type": ["number", "null"],
                            "example": null
                          },
                          "volumeUsd7d": {
                            "type": ["number", "null"],
                            "example": null
                          },
                          "apyBaseInception": {
                            "type": ["number", "null"],
                            "example": null
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await proClient.yields.getPools()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = pro_client.yields.getPools()"
          }
        ]
      }
    },
    "/chart/{pool}": {
      "get": {
        "tags": ["yields"],
        "summary": "Get historical APY and TVL of a pool",
        "deprecated": true,
        "description": "**This endpoint shuts down on November 13, 2026.** The same data remains available at `/yields/v1/chart/{pool}` on the [API plan](https://defillama.com/subscription).",
        "servers": [
          {
            "url": "https://yields.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "pool",
            "in": "path",
            "required": true,
            "description": "pool id, can be retrieved from /pools (property is called pool)",
            "schema": {
              "type": "string",
              "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical APY and TVL data for specified pool",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "timestamp": {
                            "type": "string",
                            "example": "2024-01-01T00:00:00.000Z"
                          },
                          "tvlUsd": {
                            "type": "number",
                            "example": 1500000000
                          },
                          "apy": {
                            "type": "number",
                            "example": 5.2
                          },
                          "apyBase": {
                            "type": "number",
                            "example": 3.1
                          },
                          "apyReward": {
                            "type": "number",
                            "example": 2.1
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await proClient.yields.getPoolChart('<pool>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = pro_client.yields.getPoolChart('<pool>')"
          }
        ]
      }
    },
    "/overview/dexs": {
      "get": {
        "tags": ["volumes"],
        "summary": "List all dexs along with summaries of their volumes and dataType history data",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "excludeTotalDataChart",
            "in": "query",
            "required": true,
            "description": "true to exclude aggregated chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "excludeTotalDataChartBreakdown",
            "in": "query",
            "required": true,
            "description": "true to exclude broken down chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overview of all DEXs with volume data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "protocols": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Uniswap"
                          },
                          "displayName": {
                            "type": "string",
                            "example": "Uniswap V3"
                          },
                          "total24h": {
                            "type": "number",
                            "example": 1500000000
                          },
                          "total7d": {
                            "type": "number",
                            "example": 10000000000
                          },
                          "change_1d": {
                            "type": "number",
                            "example": 5.2
                          },
                          "change_7d": {
                            "type": "number",
                            "example": -2.1
                          },
                          "chains": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": ["Ethereum", "Polygon"]
                          }
                        }
                      }
                    },
                    "totalDataChart": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "object"
                            }
                          ]
                        },
                        "example": [1640995200, 2500000000]
                      }
                    },
                    "allChains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": ["Ethereum", "BSC", "Polygon"]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.volumes.getDexOverview()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.volumes.getDexOverview()"
          }
        ]
      }
    },
    "/overview/dexs/{chain}": {
      "get": {
        "tags": ["volumes"],
        "summary": "List all dexs along with summaries of their volumes and dataType history data filtering by chain",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/dexs response",
            "schema": {
              "type": "string",
              "example": "ethereum"
            }
          },
          {
            "name": "excludeTotalDataChart",
            "in": "query",
            "required": true,
            "description": "true to exclude aggregated chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "excludeTotalDataChartBreakdown",
            "in": "query",
            "required": true,
            "description": "true to exclude broken down chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overview of DEXs on specified chain with volume data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "protocols": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Uniswap"
                          },
                          "total24h": {
                            "type": "number",
                            "example": 800000000
                          },
                          "change_1d": {
                            "type": "number",
                            "example": 3.2
                          }
                        }
                      }
                    },
                    "totalDataChart": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "example": [1640995200, 1200000000]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.volumes.getDexOverviewByChain('<chain>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.volumes.getDexOverviewByChain('<chain>')"
          }
        ]
      }
    },
    "/summary/dexs/{protocol}": {
      "get": {
        "tags": ["volumes"],
        "summary": "Get summary of dex volume with historical data",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "protocol",
            "in": "path",
            "required": true,
            "description": "protocol slug",
            "schema": {
              "type": "string",
              "example": "uniswap"
            }
          },
          {
            "name": "excludeTotalDataChart",
            "in": "query",
            "required": true,
            "description": "true to exclude aggregated chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "excludeTotalDataChartBreakdown",
            "in": "query",
            "required": true,
            "description": "true to exclude broken down chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DEX protocol volume summary with historical data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Uniswap"
                    },
                    "total24h": {
                      "type": "number",
                      "example": 1500000000
                    },
                    "totalAllTime": {
                      "type": "number",
                      "example": 500000000000
                    },
                    "totalDataChart": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "example": [1640995200, 1500000000]
                      }
                    },
                    "totalDataChartBreakdown": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "example": [
                          1640995200,
                          {
                            "Uniswap V3": 1200000000,
                            "Uniswap V2": 300000000
                          }
                        ]
                      }
                    },
                    "chains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": ["Ethereum", "Polygon"]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.volumes.getDexSummary('<protocol>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.volumes.getDexSummary('<protocol>')"
          }
        ]
      }
    },
    "/overview/options": {
      "get": {
        "tags": ["volumes"],
        "summary": "List all options dexs along with summaries of their volumes and dataType history data",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "excludeTotalDataChart",
            "in": "query",
            "required": true,
            "description": "true to exclude aggregated chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "excludeTotalDataChartBreakdown",
            "in": "query",
            "required": true,
            "description": "true to exclude broken down chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "dataType",
            "in": "query",
            "required": false,
            "description": "Desired data type, dailyNotionalVolume by default.",
            "schema": {
              "type": "string",
              "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
              "example": "dailyPremiumVolume"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overview of all options DEXs with volume data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "protocols": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Deribit"
                          },
                          "total24h": {
                            "type": "number",
                            "example": 500000000
                          },
                          "change_1d": {
                            "type": "number",
                            "example": 8.5
                          }
                        }
                      }
                    },
                    "totalDataChart": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "example": [1640995200, 750000000]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.volumes.getOptionsOverview()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.volumes.getOptionsOverview()"
          }
        ]
      }
    },
    "/overview/options/{chain}": {
      "get": {
        "tags": ["volumes"],
        "summary": "List all options dexs along with summaries of their volumes and dataType history data filtering by chain",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/options response",
            "schema": {
              "type": "string",
              "example": "ethereum"
            }
          },
          {
            "name": "excludeTotalDataChart",
            "in": "query",
            "required": true,
            "description": "true to exclude aggregated chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "excludeTotalDataChartBreakdown",
            "in": "query",
            "required": true,
            "description": "true to exclude broken down chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "dataType",
            "in": "query",
            "required": false,
            "description": "Desired data type, dailyNotionalVolume by default.",
            "schema": {
              "type": "string",
              "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
              "example": "dailyPremiumVolume"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.volumes.getOptionsOverviewByChain('<chain>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.volumes.getOptionsOverviewByChain('<chain>')"
          }
        ]
      }
    },
    "/summary/options/{protocol}": {
      "get": {
        "tags": ["volumes"],
        "summary": "Get summary of options dex volume with historical data",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "protocol",
            "in": "path",
            "required": true,
            "description": "protocol slug",
            "schema": {
              "type": "string",
              "example": "derive"
            }
          },
          {
            "name": "dataType",
            "in": "query",
            "required": false,
            "description": "Desired data type, dailyNotionalVolume by default.",
            "schema": {
              "type": "string",
              "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
              "example": "dailyPremiumVolume"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation"
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.volumes.getOptionsSummary('<protocol>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.volumes.getOptionsSummary('<protocol>')"
          }
        ]
      }
    },
    "/overview/open-interest": {
      "get": {
        "tags": ["perps"],
        "summary": "List all open interest dex exchanges along with summaries of their open interest",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "excludeTotalDataChart",
            "in": "query",
            "required": true,
            "description": "true to exclude aggregated chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "excludeTotalDataChartBreakdown",
            "in": "query",
            "required": true,
            "description": "true to exclude broken down chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overview of all open interest DEXs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "protocols": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Hyperliquid Perps"
                          },
                          "displayName": {
                            "type": "string",
                            "example": "Hyperliquid Perps"
                          },
                          "total24h": {
                            "type": "number",
                            "example": 14304709847
                          },
                          "total7d": {
                            "type": "number",
                            "example": 93112774041
                          },
                          "change_1d": {
                            "type": "number",
                            "example": 3.62
                          },
                          "change_7d": {
                            "type": "number",
                            "example": 12.63
                          },
                          "chains": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": ["Hyperliquid L1"]
                          }
                        }
                      }
                    },
                    "totalDataChart": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "object"
                            }
                          ]
                        },
                        "example": [1654819200, 607785941]
                      }
                    },
                    "allChains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": ["Hyperliquid L1", "Off Chain", "zkLighter"]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/overview/fees": {
      "get": {
        "tags": ["fees and revenue"],
        "summary": "List all protocols along with summaries of their fees and revenue and dataType history data",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "excludeTotalDataChart",
            "in": "query",
            "required": true,
            "description": "true to exclude aggregated chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "excludeTotalDataChartBreakdown",
            "in": "query",
            "required": true,
            "description": "true to exclude broken down chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "dataType",
            "in": "query",
            "required": false,
            "description": "Desired data type, dailyFees by default.",
            "schema": {
              "type": "string",
              "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
              "example": "dailyFees"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overview of all protocols with fees and revenue data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "protocols": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Uniswap"
                          },
                          "total24h": {
                            "type": "number",
                            "example": 5000000
                          },
                          "revenue24h": {
                            "type": "number",
                            "example": 2000000
                          },
                          "change_1d": {
                            "type": "number",
                            "example": 12.5
                          },
                          "chains": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": ["Ethereum", "Polygon"]
                          }
                        }
                      }
                    },
                    "totalDataChart": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "example": [1640995200, 25000000]
                      }
                    },
                    "totalDataChartBreakdown": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "example": [
                          1640995200,
                          {
                            "Uniswap": 5000000,
                            "Compound": 3000000
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.fees.getOverview()"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.fees.getOverview()"
          }
        ]
      }
    },
    "/overview/fees/{chain}": {
      "get": {
        "tags": ["fees and revenue"],
        "summary": "List all protocols along with summaries of their fees and revenue and dataType history data by chain",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/fees response",
            "schema": {
              "type": "string",
              "example": "ethereum"
            }
          },
          {
            "name": "excludeTotalDataChart",
            "in": "query",
            "required": true,
            "description": "true to exclude aggregated chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "excludeTotalDataChartBreakdown",
            "in": "query",
            "required": true,
            "description": "true to exclude broken down chart from response",
            "schema": {
              "type": "boolean",
              "example": true
            }
          },
          {
            "name": "dataType",
            "in": "query",
            "required": false,
            "description": "Desired data type, dailyFees by default.",
            "schema": {
              "type": "string",
              "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
              "example": "dailyFees"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Overview of all protocols with fees and revenue data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "protocols": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Uniswap"
                          },
                          "total24h": {
                            "type": "number",
                            "example": 5000000
                          },
                          "revenue24h": {
                            "type": "number",
                            "example": 2000000
                          },
                          "change_1d": {
                            "type": "number",
                            "example": 12.5
                          },
                          "chains": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": ["Ethereum", "Polygon"]
                          }
                        }
                      }
                    },
                    "totalDataChart": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "example": [1640995200, 25000000]
                      }
                    },
                    "totalDataChartBreakdown": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "example": [
                          1640995200,
                          {
                            "Uniswap": 5000000,
                            "Compound": 3000000
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.fees.getOverviewByChain('<chain>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.fees.getOverviewByChain('<chain>')"
          }
        ]
      }
    },
    "/summary/fees/{protocol}": {
      "get": {
        "tags": ["fees and revenue"],
        "summary": "Get summary of protocol fees and revenue with historical data",
        "servers": [
          {
            "url": "https://api.llama.fi"
          }
        ],
        "parameters": [
          {
            "name": "protocol",
            "in": "path",
            "required": true,
            "description": "protocol slug",
            "schema": {
              "type": "string",
              "example": "derive"
            }
          },
          {
            "name": "dataType",
            "in": "query",
            "required": false,
            "description": "Desired data type, dailyFees by default.",
            "schema": {
              "type": "string",
              "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
              "example": "dailyFees"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Protocol ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Protocol name"
                    },
                    "url": {
                      "type": "string",
                      "description": "Protocol URL"
                    },
                    "referralUrl": {
                      "type": "string",
                      "description": "Referral URL"
                    },
                    "description": {
                      "type": "string",
                      "description": "Protocol description"
                    },
                    "logo": {
                      "type": "string",
                      "description": "Protocol logo URL"
                    },
                    "gecko_id": {
                      "type": "string",
                      "description": "CoinGecko ID"
                    },
                    "cmcId": {
                      "type": "string",
                      "description": "CoinMarketCap ID"
                    },
                    "chains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Supported chains"
                    },
                    "twitter": {
                      "type": "string",
                      "description": "Twitter handle"
                    },
                    "github": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "GitHub repositories"
                    },
                    "symbol": {
                      "type": "string",
                      "description": "Token symbol"
                    },
                    "address": {
                      "type": "string",
                      "description": "Protocol address"
                    },
                    "childProtocols": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Child protocols"
                    },
                    "linkedProtocols": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Linked protocols"
                    },
                    "defillamaId": {
                      "type": "string",
                      "description": "DefiLlama protocol ID"
                    },
                    "disabled": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "Whether protocol is disabled"
                    },
                    "displayName": {
                      "type": "string",
                      "description": "Display name"
                    },
                    "module": {
                      "type": "string",
                      "nullable": true,
                      "description": "Module name"
                    },
                    "category": {
                      "type": "string",
                      "nullable": true,
                      "description": "Protocol category"
                    },
                    "methodologyURL": {
                      "type": "string",
                      "nullable": true,
                      "description": "Methodology URL"
                    },
                    "methodology": {
                      "type": "object",
                      "nullable": true,
                      "description": "Methodology details"
                    },
                    "forkedFrom": {
                      "type": "string",
                      "nullable": true,
                      "description": "Forked from protocol"
                    },
                    "audits": {
                      "type": "array",
                      "nullable": true,
                      "description": "Audit information"
                    },
                    "audit_links": {
                      "type": "array",
                      "nullable": true,
                      "description": "Audit links"
                    },
                    "versionKey": {
                      "type": "string",
                      "nullable": true,
                      "description": "Version key"
                    },
                    "governanceID": {
                      "type": "string",
                      "nullable": true,
                      "description": "Governance ID"
                    },
                    "treasury": {
                      "type": "string",
                      "nullable": true,
                      "description": "Treasury address"
                    },
                    "parentProtocol": {
                      "type": "string",
                      "nullable": true,
                      "description": "Parent protocol"
                    },
                    "previousNames": {
                      "type": "array",
                      "nullable": true,
                      "description": "Previous names"
                    },
                    "latestFetchIsOk": {
                      "type": "boolean",
                      "description": "Latest fetch status"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Protocol slug"
                    },
                    "protocolType": {
                      "type": "string",
                      "description": "Protocol type"
                    },
                    "total24h": {
                      "type": "number",
                      "description": "24 hour fees"
                    },
                    "total48hto24h": {
                      "type": "number",
                      "description": "48h to 24h fees"
                    },
                    "total7d": {
                      "type": "number",
                      "description": "7 day fees"
                    },
                    "totalAllTime": {
                      "type": "number",
                      "description": "All time fees"
                    },
                    "change_1d": {
                      "type": "number",
                      "description": "1 day change percentage"
                    },
                    "totalDataChart": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": [
                          {
                            "type": "integer",
                            "description": "Timestamp"
                          },
                          {
                            "type": "number",
                            "description": "Fee value"
                          }
                        ]
                      },
                      "description": "Total data chart with timestamps and fees"
                    },
                    "totalDataChartBreakdown": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": [
                          {
                            "type": "integer",
                            "description": "Timestamp"
                          },
                          {
                            "type": "object",
                            "description": "Chain and protocol breakdown"
                          }
                        ]
                      },
                      "description": "Total data chart breakdown by chain and protocol"
                    }
                  }
                },
                "example": {
                  "id": "parent#hyperliquid",
                  "name": "Hyperliquid",
                  "url": "https://hyperliquid.xyz",
                  "referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO",
                  "description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price",
                  "logo": "https://icons.llama.fi/hyperliquid.png",
                  "gecko_id": "hyperliquid",
                  "cmcId": "32196",
                  "chains": ["Hyperliquid L1"],
                  "twitter": "HyperliquidX",
                  "github": ["hyperliquid-dex"],
                  "symbol": "HYPE",
                  "address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec",
                  "childProtocols": [{}],
                  "linkedProtocols": ["Hyperliquid", "Hyperliquid Spot Orderbook"],
                  "defillamaId": "parent#hyperliquid",
                  "disabled": null,
                  "displayName": "Hyperliquid",
                  "module": null,
                  "category": null,
                  "methodologyURL": null,
                  "methodology": null,
                  "forkedFrom": null,
                  "audits": null,
                  "audit_links": null,
                  "versionKey": null,
                  "governanceID": null,
                  "treasury": null,
                  "parentProtocol": null,
                  "previousNames": null,
                  "latestFetchIsOk": true,
                  "slug": "hyperliquid",
                  "protocolType": "protocol",
                  "total24h": 4890250,
                  "total48hto24h": 4550411,
                  "total7d": 26184696,
                  "totalAllTime": 499292857,
                  "change_1d": 7.47,
                  "totalDataChart": [[1734912000, 1472923]],
                  "totalDataChartBreakdown": [
                    [
                      1734912000,
                      {
                        "Hyperliquid L1": {
                          "Hyperliquid Spot Orderbook": 1472923
                        }
                      }
                    ]
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "javascript",
            "label": "JavaScript SDK",
            "source": "const result = await client.fees.getSummary('<protocol>')"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "result = client.fees.getSummary('<protocol>')"
          }
        ]
      }
    }
  }
}
