feat: add DexPaprika tool node (keyless DEX market data)#6639
Conversation
Adds a new tool node under packages/components/nodes/tools/DexPaprika with three agent tools backed by the free, keyless DexPaprika API: - dexpaprika_get_token_price: token price and market stats by contract address - dexpaprika_search_pools: pools on a network with ordering and token filter - dexpaprika_get_pool_ohlcv: historical OHLCV candles for a pool No credential input: the API needs no key, so the node works with zero configuration. Follows the existing multi-action tool pattern (core.ts with DynamicStructuredTool subclasses plus a factory). Co-located jest tests included. All endpoint parameters and enums verified against the live API.
There was a problem hiding this comment.
Code Review
This pull request introduces the DexPaprika tool integration, enabling agents to fetch on-chain DEX market data such as token prices, liquidity pools, and historical OHLCV candles across multiple blockchain networks. The implementation includes the tool definitions, core API request handling, unit tests, and an icon. Feedback on the changes highlights a potential runtime issue in GetTokenPriceTool where parsing an unexpected API response format could lead to a TypeError when deleting the description property; it is recommended to validate that the parsed response is a non-null object and throw an error for invalid formats to promote fail-fast behavior.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| try { | ||
| const parsed = JSON.parse(data) | ||
| // The long-form project description adds noise without market data value | ||
| delete parsed.description | ||
| return JSON.stringify(parsed) |
There was a problem hiding this comment.
If JSON.parse(data) returns null or a primitive value (e.g., if the API returns an unexpected response format), attempting to delete a property on it will throw a TypeError in strict mode. When handling potentially invalid data from external sources, we should prefer throwing an error for invalid input types rather than silently returning or bypassing the logic to promote fail-fast behavior. Additionally, use loose equality (== null) to check for nullish values.
try {
const parsed = JSON.parse(data)
if (parsed == null || typeof parsed !== 'object') {
throw new Error('Invalid response format: expected an object')
}
// The long-form project description adds noise without market data value
delete parsed.description
return JSON.stringify(parsed)References
- When handling potentially invalid data from external sources (like an API response), prefer throwing an error for invalid input types rather than silently returning a default or empty value. This promotes fail-fast behavior.
- In JavaScript/TypeScript, use loose equality (
== null) as a standard idiom for a 'nullish' check that covers bothnullandundefined.
What this adds
A new tool node under
packages/components/nodes/tools/DexPaprika/that gives agents onchain DEX market data from the DexPaprika API: 36 blockchain networks, 33M+ tokens, 36M+ pools.The node needs no credential. The API is free and keyless, so this is one of the few tool nodes in the catalog you can drop on the canvas and use immediately, with zero configuration. If no actions are selected, all three are enabled.
Three actions, each a separate structured tool for the agent:
dexpaprika_get_token_pricedexpaprika_search_poolsdexpaprika_get_pool_ohlcvFollows the existing multi-action tool pattern (Gmail/Teams style:
core.tswith tool classes extendingDynamicStructuredToolfromOpenAPIToolkit/core, plus a factory), minus the credential handling since there is none.Why
Crypto agent flows currently need an API key signup for basically every market data tool node. DexPaprika is keyless and free, which makes it a good fit for tutorials, demos and production flows alike. Disclosure: I do DevRel for CoinPaprika/DexPaprika. Happy to keep this node updated as the API evolves.
How I tested it
Co-located unit tests in
DexPaprika.test.ts(node init, action filtering, URL building, description stripping, error path, fetch mocked), following the pattern fromJSONPathExtractor.test.ts:Lint and build:
I also loaded the compiled node from
distand exercised all three tools through the realtool.call()path against the live API (schema parsing and zod defaults included):Every endpoint the node calls was verified live against the real API before writing the schemas. The
order_byenum,intervalenum andlimitbounds in the zod schemas are taken from the API's own validation errors, not guessed:Real response per action:
Token price (
/networks/{network}/tokens/{address}):The tool strips the
descriptionfield from this response (a multi-paragraph project writeup) so it does not waste agent context.Pools search (
/networks/{network}/pools/search):One design note: I tested a free-text
queryparam on this endpoint and the API silently ignores it (the echoed query object in the response does not even include it), so the tool intentionally does not expose one. Thetoken_addressfilter is exposed instead, verified working.Pool OHLCV (
/networks/{network}/pools/{pool}/ohlcv):Also verified the Solana path (non-hex mint addresses):
Test limits, stated honestly: I ran the full
pnpm buildlocally on node 23.10 (CI uses 24.15). Every TypeScript compile step passed with zero errors across all packages, including the server compiling against the changed components package. The one local failure was the server's gulp email-template copy step, which is a node 23 type-stripping interop quirk when gulp loadsgulpfile.ts(SyntaxError: The requested module 'gulp' does not provide an export named 'dest'), unrelated to this change (main's Node CI on node 24 is green as of the commit this branch is based on). I did not run the Cypress e2e suite locally. The repo's pre-commit hooks (pretty-quick and lint-staged) ran and passed on commit.Icon
dexpaprika.svgis the official DexPaprika brand symbol (2.5 KB, in line with other node icons in the folder).