-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Summary
The markets list and events list commands sort results in ascending order by default. The --ascending flag exists but only reinforces ascending — there is no --descending flag or way to reverse the sort direction.
The help text implies descending should be the default ("Sort ascending instead of descending"), but results are always ascending regardless of whether --ascending is passed.
Steps to reproduce
# Without --ascending flag (should default to descending per help text)
polymarket markets list --active true --order volume --limit 5
# Returns markets with $0.00 volume (ascending order)
# With --ascending flag (no difference)
polymarket markets list --active true --order volume --limit 5 --ascending
# Same result — still ascendingExpected behavior
- Default sort direction should be descending (as the help text implies)
- Or: add a
--descendingflag to allow explicit control
Actual behavior
Sort is always ascending. The --ascending flag is a no-op since ascending is already the default. There is no way to retrieve e.g. the highest-volume markets without fetching a large result set and sorting client-side.
Workaround
polymarket -o json markets list --active true --order volume --limit 100 | \
jq 'sort_by(.volume | gsub("[^0-9.]";"" ) | tonumber) | reverse | .[:10]'Environment
- polymarket v0.1.4 (Homebrew, macOS arm64)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels