> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dexpaprika.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DexPaprika tools for LangChain agents

> Give a LangChain agent keyless DEX market data with langchain-dexpaprika: five tools plus a toolkit for search, token details, pools, OHLCV, and networks across every supported blockchain. No API key.

[`langchain-dexpaprika`](https://pypi.org/project/langchain-dexpaprika/) gives a LangChain agent live DEX market data from the [DexPaprika API](https://docs.dexpaprika.com). It is keyless: there is no signup and no environment variable to set, so your agent has DEX data across every supported blockchain (33M+ tokens, 36M+ pools) as soon as you install the package.

The tools are built for LLM consumption: descriptions spell out which parameters exist and where to get their values, error messages quote the API's own allowed-value lists so the model can self-correct, and outputs are compact JSON with long token descriptions trimmed.

## Install

```bash theme={null}
pip install -U langchain-dexpaprika
```

There are no credentials to configure. The DexPaprika API is keyless, so there is no environment variable to set.

## Quickstart

```python theme={null}
from langchain_dexpaprika import DexPaprikaSearch

search = DexPaprikaSearch()
print(search.invoke({"query": "WETH"}))
```

This returns compact JSON with matching tokens (contract address, chain, USD price, liquidity), pools, and DEXes. `search` is the entry point when you only have a ticker: it resolves a symbol into a contract address and network id you can feed into the other tools.

## Tools

| Tool name                  | Class                    | What it returns                                                                                               |
| -------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------- |
| `dexpaprika_search`        | `DexPaprikaSearch`       | Tokens, pools, and DEXes matching a name, symbol, or address. Use it first when you only have a ticker.       |
| `dexpaprika_token_details` | `DexPaprikaTokenDetails` | Price, FDV, liquidity, pool count, and 24h/6h/1h volume with buy/sell breakdown for one token on one network. |
| `dexpaprika_token_pools`   | `DexPaprikaTokenPools`   | Pools where a token trades, sortable by volume, liquidity, transactions, age, price, or 24h price change.     |
| `dexpaprika_pool_ohlcv`    | `DexPaprikaPoolOHLCV`    | Historical OHLCV candles for one pool, intervals from 1m to 24h, up to 366 candles per call.                  |
| `dexpaprika_networks`      | `DexPaprikaNetworks`     | Every supported network with its exact id, 24h volume, transactions, and pool counts.                         |

## Use the toolkit in an agent

`DexPaprikaToolkit` bundles all five tools over one shared HTTP client. This example drives them with an Anthropic model, so install the provider and set its key first (swap in any chat model you prefer):

```bash theme={null}
pip install -U "langchain[anthropic]"
export ANTHROPIC_API_KEY=...
```

```python theme={null}
from langchain.agents import create_agent
from langchain_dexpaprika import DexPaprikaToolkit

toolkit = DexPaprikaToolkit()
agent = create_agent("claude-sonnet-4-5", toolkit.get_tools())
result = agent.invoke(
    {"messages": [("user", "Find the most liquid WETH pool on ethereum")]}
)
```

The tool descriptions chain naturally: the agent starts with `dexpaprika_search` to resolve a ticker into a contract address and network id, then feeds those into the other tools.

## Individual tools

Every tool works standalone, sync and async:

```python theme={null}
from langchain_dexpaprika import DexPaprikaPoolOHLCV

ohlcv = DexPaprikaPoolOHLCV()
candles = ohlcv.invoke(
    {
        "network": "ethereum",
        "pool_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
        "start": "2026-07-10",
        "interval": "24h",
        "limit": 7,
    }
)
```

## Prefer MCP or the raw API?

The MCP server exposes the same data as callable tools for Claude, Cursor, and other MCP clients: see the [hosted MCP server](/ai-integration/hosted-mcp-server) and the [MCP tools reference](/ai-integration/mcp-tools). For any framework we do not ship a package for yet, call the [REST API](/api-reference/introduction) directly.

## Resources

* [Package on PyPI](https://pypi.org/project/langchain-dexpaprika/)
* [Source on GitHub](https://github.com/coinpaprika/langchain-dexpaprika) (MIT)
* [DexPaprika API docs](https://docs.dexpaprika.com)

## FAQs

<AccordionGroup>
  <Accordion title="Do I need an API key for langchain-dexpaprika?">
    No. The DexPaprika API is keyless, so there is nothing to sign up for and no environment variable to set. A free registered key or Pro plan only raises your rate and monthly quota; see [rate limits](/knowledge-base/rate-limits).
  </Accordion>

  <Accordion title="Which chat models work with the toolkit?">
    Any LangChain chat model. `DexPaprikaToolkit().get_tools()` returns standard LangChain tools, so you can pass them to `create_agent` with an Anthropic, OpenAI, or other provider model.
  </Accordion>

  <Accordion title="What is the difference between the tools and the MCP server?">
    Same data, different delivery. Use `langchain-dexpaprika` inside a Python LangChain agent; use the [hosted MCP server](/ai-integration/hosted-mcp-server) to expose the tools to Claude, Cursor, or any MCP client without writing code.
  </Accordion>
</AccordionGroup>

<script type="application/ld+json">
  {JSON.stringify({
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": [
        {"@type": "Question","name": "Do I need an API key for langchain-dexpaprika?","acceptedAnswer": {"@type": "Answer","text": "No. The DexPaprika API is keyless, so there is nothing to sign up for and no environment variable to set. A free registered key or Pro plan only raises your rate and monthly quota."}},
        {"@type": "Question","name": "Which chat models work with the toolkit?","acceptedAnswer": {"@type": "Answer","text": "Any LangChain chat model. DexPaprikaToolkit().get_tools() returns standard LangChain tools, so you can pass them to create_agent with an Anthropic, OpenAI, or other provider model."}},
        {"@type": "Question","name": "What is the difference between the tools and the MCP server?","acceptedAnswer": {"@type": "Answer","text": "Same data, different delivery. Use langchain-dexpaprika inside a Python LangChain agent; use the hosted MCP server to expose the tools to Claude, Cursor, or any MCP client without writing code."}}
      ]
    })}
</script>
