Skip to content

feat: add profiler dex-trades command#451

Open
kome12 wants to merge 2 commits into
mainfrom
sonar/pug
Open

feat: add profiler dex-trades command#451
kome12 wants to merge 2 commits into
mainfrom
sonar/pug

Conversation

@kome12
Copy link
Copy Markdown
Contributor

@kome12 kome12 commented Jun 2, 2026

Summary

Adds nansen research profiler dex-trades — a new subcommand that fetches DEX trade history for a wallet address on any supported chain via the POST /api/v1/profiler/dex-trades endpoint.

Files changed:

  • src/api.js — new addressDexTrades() method (follows the same pattern as addressPerpTrades, with chain-scoped address validation and date range support)
  • src/cli.js — wired into the profiler handler alongside existing subcommands; added to the help commands list
  • src/schema.json — documented the new endpoint with required options
  • src/__tests__/api.test.js — 6 unit tests covering endpoint URL, address/chain passthrough, orderBy, date range (default and custom days), filters, and Solana address support
  • src/__tests__/coverage.test.js — added to the profiler endpoint coverage array

Example usage:

nansen research profiler dex-trades --address 0x28c6c06298d514db089934071355e5743bf21d60 --chain ethereum
nansen research profiler dex-trades --address 0x28c6c06298d514db089934071355e5743bf21d60 --chain ethereum --days 7
nansen research profiler dex-trades --address 0x28c6c06298d514db089934071355e5743bf21d60 --chain ethereum --sort trade_value_usd:desc --limit 50
nansen research profiler dex-trades --address Gu29tjXrVr9v5n42sX1DNrMiF3BwbrTm379szgB9qXjc --chain solana

Test plan

  • All 27 test files pass (1486 tests, 2 skipped)
  • npm run lint passes clean
  • New addressDexTrades tests cover: endpoint, address/chain, orderBy, date range (default + custom), filters, and Solana address

🤖 Generated with Claude Code

Ko Miyatake (Openclaw Bot) and others added 2 commits June 2, 2026 08:22
Adds `nansen research profiler dex-trades` to surface DEX trade history
for a wallet address on any supported chain via POST /api/v1/profiler/dex-trades.

Supports --address, --chain, --days, --date, --sort, --page, --limit,
and --filter flags, consistent with other profiler subcommands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kome12 kome12 self-assigned this Jun 2, 2026
@kome12 kome12 requested a review from gulshngill June 2, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant