API-235: document global --limit/--page pagination flags in nansen schema - #500
Conversation
…hema buildPagination(options) reads --limit/--page across the smart-money, profiler, token, perp, points, and prediction-market handlers (plus the research historical-* commands), but schema.json globalOptions never listed them. Add limit and page entries whose descriptions carry the API-side split: general endpoints default per_page 10 (max 1000), profiler address endpoints default 20 (max 100), so the distinction is discoverable from `nansen schema --full` without reading source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pr-reviewer Summary for #9ccf8a2✅ No issues found The code review completed successfully with no findings. Review effort: 1/5 (Trivial) SummaryThis PR adds The descriptions are accurate: the endpoint-type split (general default 10/max 1000 vs. profiler default 20/max 100), the carve-outs for commands with their own Token usage: 1,284 input, 3,137 output, 263,263 cache read, 23,501 cache write | Usage Guide New pushes are reviewed automatically with a 10-minute cooldown between reviews. To request a review at any time, comment |
There was a problem hiding this comment.
Auto-approved
This PR was automatically approved because:
- Claude recommends approval
- Claude assessed this as a minimal effort change
- The effort level is within the auto-approval threshold of 2
- No high or critical issues were detected
If you have any concerns, please request a manual review.
Problem
buildPagination(options)insrc/cli.jsreads--limit/--pageat six shared call sites (smart-money,profiler,token,perp,points,prediction-market), plus a local copy insrc/commands/research.jsfor thehistorical-*commands — butschema.jsonglobalOptionsnever listed either flag. Agents consumingnansen schema(the machine-readable CLI contract) could not discover pagination at all, nor the API-side fact that profiler endpoints and general endpoints have differentper_pagerules.Change
Docs-only: adds
limitandpagetoglobalOptionsinsrc/schema.json.limit→pagination.per_page. Description states the split verified against the live OpenAPI spec at docs.nansen.ai: general endpoints (PaginationRequest) default 10, max 1000; profiler address endpoints (ProfilerPaginationRequest) default 20, max 100. It also names the commands that declare their ownlimitwith different semantics (search,token top-tokens,trade limit-order list), the endpoints that reject/ignore pagination (token ohlcv,profiler perp-positions,historical-token-flow-summary), and the CLI-sideper_page: 100default onprofiler labels.page→pagination.page, 1-based, default 1.No runtime code touched —
nansen schema --fullandnansen schema <cmd>already renderglobalOptions, so the entries surface automatically. Changeset included (patch).Not a duplicate of #491, which adds command-specific options (alerts/batch/screener) and does not touch
globalOptions. Related: ECINT-6899 tracks the API side; this PR is the CLI side.Validation
npm test: 2031 passed, 2 skippednpm run lint: cleannode src/index.js schema --fullexposes both new entries with descriptions--limit, contradictingtrade limit-order list)🤖 Generated with Claude Code