# DefiLlama — Get summary of dex volume with historical data

Get DefiLlama DEX Protocol Volume data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by DeFiLlama, pass parameters such as excludeTotalDataChart, and retrieve structured data including DEX protocol display name, chains, total24h, total all time, and total data chart to track dex market share, control payload size, and plot historical venue volume.

Documentation: https://openany.si/defillama/defillama-get-summary-of-dex-volume-with-historical-data/8682b6c3-7237-45de-a8d8-625973356f06/
API ID: 8682b6c3-7237-45de-a8d8-625973356f06
Provider: defillama
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/defillama/summary/dexs/{protocol}
Page update time: 2026-12-03T02:39:15.455Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:39:13.075Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## DefiLlama DEX Protocol Volume API

Provide a DEX `protocol` slug (such as `uniswap`) and the required boolean query flags `excludeTotalDataChart` and `excludeTotalDataChartBreakdown`. The response returns protocol `name`, `chains`, `total24h`, `totalAllTime` and chart arrays when enabled.

## What You Can Build

- **Track DEX market share**: Compare 24h and all-time volume for Uniswap against other protocols from the All DEX Volumes API.
- **Control payload size**: Set excludeTotalDataChart=true when you only need current KPI totals for a lightweight widget.
- **Plot historical venue volume**: Set excludeTotalDataChart=false to fetch time-series volume bars for research charts.

## Returned Data

| Field | Meaning |
| --- | --- |
| `name` | DEX protocol display name |
| `chains` | Array of blockchains where the DEX volume is tracked |
| `total24h` | Total DEX trading volume over the past 24 hours in USD |
| `totalAllTime` | Cumulative all-time DEX trading volume in USD |
| `totalDataChart` | Historical aggregated daily volume chart entries |
| `totalDataChartBreakdown` | Historical daily volume breakdown chart entries |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DefiLlama — Get summary of dex volume with historical data request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "protocol": {
          "type": "string",
          "description": "protocol slug"
        }
      },
      "required": [
        "protocol"
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "excludeTotalDataChart": {
          "type": "boolean",
          "description": "true to exclude aggregated chart from response"
        },
        "excludeTotalDataChartBreakdown": {
          "type": "boolean",
          "description": "true to exclude broken down chart from response"
        }
      },
      "required": [
        "excludeTotalDataChart",
        "excludeTotalDataChartBreakdown"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "chains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "name": {
      "type": "string"
    },
    "total24h": {
      "type": "integer"
    },
    "totalAllTime": {
      "type": "integer"
    },
    "totalDataChart": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "integer"
        }
      }
    },
    "totalDataChartBreakdown": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "object",
              "properties": {
                "Uniswap V2": {
                  "type": "integer"
                },
                "Uniswap V3": {
                  "type": "integer"
                }
              }
            }
          ]
        }
      }
    }
  }
}
```

## Request example
Scenario: Official UI example (not runtime verified)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/defillama/summary/dexs/uniswap?excludeTotalDataChart=true&excludeTotalDataChartBreakdown=true' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "chains": [
    "Ethereum",
    "Polygon"
  ],
  "name": "Uniswap",
  "total24h": 1500000000,
  "totalAllTime": 500000000000,
  "totalDataChart": [
    [
      1640995200,
      1500000000
    ]
  ],
  "totalDataChartBreakdown": [
    [
      1640995200,
      {
        "Uniswap V2": 300000000,
        "Uniswap V3": 1200000000
      }
    ]
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Are excludeTotalDataChart and excludeTotalDataChartBreakdown required?
Yes. Both boolean query parameters are marked required in the live contract.

### How do I include historical chart arrays in the response?
Pass excludeTotalDataChart=false and/or excludeTotalDataChartBreakdown=false in the query string.

### Where can I find valid DEX protocol slugs?
Query the DefiLlama All DEX Volumes API to list tracked DEX protocols and their names.

### What currency are total24h and totalAllTime reported in?
Volume totals are reported in USD.

### Does this endpoint cover options DEXs?
No. Use the DefiLlama Options Protocol Volume API for options DEX volume summaries.

### How do I view all DEXs on a specific chain instead?
Use the DefiLlama Chain DEX Volumes API with a chain path parameter.

## Available implementations
- defillama: https://openany.si/defillama/defillama-get-summary-of-dex-volume-with-historical-data/8682b6c3-7237-45de-a8d8-625973356f06/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
