LangChain tools for the DexPaprika API: keyless DEX market data across every supported blockchain
Project description
langchain-dexpaprika
DexPaprika tools for LangChain agents. No API key, no signup: the DexPaprika API is keyless, so your agent gets DEX market data across every supported blockchain (33M+ tokens, 36M+ pools) as soon as you install the package.
We built these tools for LLM consumption: descriptions tell the model exactly 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 multi-kilobyte token descriptions trimmed.
Installation
pip install -U langchain-dexpaprika
No credentials to configure. There is no environment variable to set because there is no API key.
Quickstart
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.
Tools
| Tool name | Class | What it returns |
|---|---|---|
dexpaprika_search |
DexPaprikaSearch |
Tokens, pools, and DEXes matching a name, symbol, or address. The entry point 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. The
example below drives them with an Anthropic model, so install the provider and
set its key first (swap in any chat model you prefer):
pip install -U "langchain[anthropic]"
export ANTHROPIC_API_KEY=...
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: an 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:
from langchain_dexpaprika import DexPaprikaPoolOHLCV
ohlcv = DexPaprikaPoolOHLCV()
candles = ohlcv.invoke(
{
"network": "ethereum",
"pool_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"start": "2026-07-10",
"interval": "24h",
"limit": 7,
}
)
Error handling
We surface API errors as messages the agent can act on:
- 400 responses quote the API's message verbatim, including the exact list of allowed values for the offending parameter.
- 404 responses arrive with an empty body, so we synthesize a message that names the missing identifier and points at the tool that lists valid values.
- 429 responses are retried automatically, honoring the
Retry-Afterheader, before we tell the agent to slow down. - 410 responses (removed endpoints) surface the replacement endpoint the API reports, with a hint to upgrade the package.
Development
uv venv
uv pip install -e '.[test]'
make lint # ruff + mypy
make test # unit tests, sockets blocked
make integration_tests # live API, keyless, run serially
Links
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_dexpaprika-0.1.0.tar.gz.
File metadata
- Download URL: langchain_dexpaprika-0.1.0.tar.gz
- Upload date:
- Size: 155.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1beab3e308eac6042c46df475bf236647a1a79c22292b8fd0dee860040678c7
|
|
| MD5 |
07a78cce9b7884bd763df224466bbc0b
|
|
| BLAKE2b-256 |
1298e82b83d26bc316309d87e6e6a4546c3b69ca380140f4db063c4d30724aeb
|
Provenance
The following attestation bundles were made for langchain_dexpaprika-0.1.0.tar.gz:
Publisher:
release.yml on coinpaprika/langchain-dexpaprika
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_dexpaprika-0.1.0.tar.gz -
Subject digest:
f1beab3e308eac6042c46df475bf236647a1a79c22292b8fd0dee860040678c7 - Sigstore transparency entry: 2205107228
- Sigstore integration time:
-
Permalink:
coinpaprika/langchain-dexpaprika@7bdceac0069ad4510d9822c352eff4b2044b7747 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/coinpaprika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7bdceac0069ad4510d9822c352eff4b2044b7747 -
Trigger Event:
release
-
Statement type:
File details
Details for the file langchain_dexpaprika-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_dexpaprika-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
875570a7669d6de91f184b58aab289ca9785a9c81fc47cf70f1b1b83855d6e5c
|
|
| MD5 |
168891cc4f4753fcc869c122abd5b4e1
|
|
| BLAKE2b-256 |
8069cae0e2f96e0d05c8b90438327ee44c45d8a52cb4ab7d230fc5163c9bc29c
|
Provenance
The following attestation bundles were made for langchain_dexpaprika-0.1.0-py3-none-any.whl:
Publisher:
release.yml on coinpaprika/langchain-dexpaprika
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_dexpaprika-0.1.0-py3-none-any.whl -
Subject digest:
875570a7669d6de91f184b58aab289ca9785a9c81fc47cf70f1b1b83855d6e5c - Sigstore transparency entry: 2205107254
- Sigstore integration time:
-
Permalink:
coinpaprika/langchain-dexpaprika@7bdceac0069ad4510d9822c352eff4b2044b7747 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/coinpaprika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7bdceac0069ad4510d9822c352eff4b2044b7747 -
Trigger Event:
release
-
Statement type: