Skip to content

--ascending flag has no counterpart; sort defaults to ascending with no way to sort descending #17

@alan-purring

Description

@alan-purring

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 ascending

Expected behavior

  • Default sort direction should be descending (as the help text implies)
  • Or: add a --descending flag 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions