Skip to content

Fix invalid order field names in help text and README#6

Open
rursache wants to merge 1 commit intoPolymarket:mainfrom
rursache:fix/order-field-names
Open

Fix invalid order field names in help text and README#6
rursache wants to merge 1 commit intoPolymarket:mainfrom
rursache:fix/order-field-names

Conversation

@rursache
Copy link
Contributor

@rursache rursache commented Feb 24, 2026

Summary

  • Fixes --order volume_num--order volume in README example and CLI help text
  • The API rejects volume_num and liquidity_num as order parameters with a 422 error; the valid values are volume and liquidity

Root cause

volume_num and liquidity_num are field names on the Market response object (used for display), but the API /markets endpoint expects volume and liquidity as order query parameter values. The README and CLI help text were using the response field names instead of the query parameter names.

Test plan

  • cargo test — all tests pass
  • polymarket markets list --active true --order volume returns results
  • polymarket markets list --active true --order volume_num returns 422 (before fix, this was the documented usage)

Note

Low Risk
Documentation/help-text only; no runtime logic changes beyond the displayed usage guidance.

Overview
Fixes markets list --order documentation to use API-valid sort fields: updates the README example and the CLI flag help text from volume_num/liquidity_num to volume/liquidity to avoid 422 errors from the /markets endpoint.

Written by Cursor Bugbot for commit 1306510. This will update automatically on new commits. Configure here.

The API accepts `volume` and `liquidity` as order fields, not
`volume_num` and `liquidity_num` (those are response fields).
Using the documented examples produced a 422 validation error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant