[parity] add the missing research smart-money pnl-leaderboard command - #550
[parity] add the missing research smart-money pnl-leaderboard command#550gulshngill wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pr-reviewer Summary for #2e44b74📝 1 finding Review completed. Please address the findings below. Findings by Severity
Review effort: 2/5 (Simple) SummaryThis PR adds the Findings
|
There was a problem hiding this comment.
Auto-approved
This PR was automatically approved because:
- Claude recommends approval
- Claude assessed this as a moderate effort change
- The effort level is within the auto-approval threshold of 2
- No high or critical issues were detected
- Review comment contains non-blocking feedback
If you have any concerns, please request a manual review.
What
The parity checker reports
POST /api/v1/smart-money/pnl-leaderboardas a public API endpointwith no CLI command. Its six sibling smart-money endpoints all have one. This adds it:
Ranks smart money wallets by realized / unrealized PnL.
--timeframeaccepts the spec's1, 7, 30, 90, 180(days), default7.Parity report line addressed
Re-running the checker with this branch as the CLI repo takes
cli_missingfrom 8 → 7,closing exactly
/api/v1/smart-money/pnl-leaderboardand introducing no new findings in anycategory (no new stale, no method mismatch, drift unchanged).
Request shape
Derived from the public OpenAPI spec (
SmartMoneyPnlLeaderboardRequest), not guessed. Wire bodywith defaults —
cleanBodystrips the emptyfilters, exactly as every sibling does:{ "chains": ["solana"], "timeframe": 7 }Fully populated:
{ "chains": ["all"], "timeframe": 30, "filters": { "include_smart_money_labels": ["Fund"] }, "order_by": [{ "field": "total_pnl_usd", "direction": "DESC" }], "pagination": { "page": 1, "per_page": 10 } }--chain/--chains,--labels,--sort/--order-byand pagination all come from the existingshared
smart-moneyhandler — no new option plumbing.Live validation
No API key was available to this run, so no request was made to
api.nansen.ai. This is amissing-coverage finding, not a removal: the endpoint's existence and its request/response
contract come from the curated public OpenAPI spec at nansen-api
1b2d057, so nothing heredepends on a probe. What a probe would have added is confirmation that the assembled body is
accepted end-to-end — that check is outstanding, and a reviewer with a key should run the command
above once before merging.
Verification
Run in the pinned
origin/mainworktree with credentials stripped from the environment(
env -u NANSEN_API_KEY -u GH_TOKEN -u GITHUB_TOKEN):npm test— 62 files passed, 2545 passed, 2 skipped, 0 failednpm run lint— cleanJSON.parse(src/schema.json)— validNew tests:
src/__tests__/api.test.jsasserts the POST path and body (defaults and fullypopulated);
src/__tests__/coverage.test.jsgains the endpoint so the coverage guard nowenforces it.
Scope
src/api.js,src/cli.js,src/schema.json, the two test files, and aminorchangeset —insertions only apart from the one-line
helpcommand list.No docs changed: no README or
skills/*/SKILL.mdenumerates the smart-money subcommand set as acontract (
nansen-smart-money-tracker/SKILL.mddocuments four of the six existing subcommands andomits
dcas), andskills.test.jsasserts only the limit-orders skill.--timeframeis parsed as an integer but not validated client-side against the enum — no siblingvalidates locally either, and the API returns its own error. Left as-is deliberately.
The other 7 CLI gaps, the 15 MCP gaps, and the schema-drift items are not touched here.
Pinned SHAs audited by this run
1b2d05709f3f747b4a1b0a4264c9ce680a838584425394130e5ea1130056fa9edbf0c63cf5a0132772e71231e22dad83c3d8b5a9a7a8708d19e2c0ffFound by the
parity-checkskill (nansen-api) forAPI-311.
Opened by the parity agent as a proposal for human review — auto-merge is not enabled.
🤖 Generated with Claude Code