Missing upper bound validation for --limit in spot history
Author: MayurK-cmdCreated Aug 26, 2026Updated Aug 26, 2026
The spot history command accepts a --limit option but only validates the lower bound (limit > 0). According to the API documentation, the maximum allowed limit is 15. Currently, users can pass --limit 1000 which may cause silent failures or unexpected API behavior.
Expected behavior:
- Accept --limit values from 1 to 15
- Throw clear error if user exceeds 15
Current behavior:
- Accepts any positive integer without upper bound check
Location: src/commands/SpotCommand.ts:612-615
Suggested fix:
const limit = Number(opts.limit); if (isNaN(limit) || limit <= 0 || limit > 15) { throw new Error("--limit must be between 1 and 15."); }
Type: Bug - Input Validation
Source: jup-ag/cli