The Gamma docs for GET /events say closed defaults to false, but the API actually defaults to closed=true (returns only settled events when the param is omitted).
What the docs say --> https://docs.polymarket.com/developers/gamma-markets-api/get-events
Quick test of the problem:
curl -s "https://gamma-api.polymarket.com/events?series_id=10345&limit=100" \
| jq '[.[] | .closed] | group_by(.) | map({(.[0]|tostring): length}) | add'
Should return {"true": 0} but will show {"true": 100} as it defaults to closed == true when no param is set.
This reflects on the CLI too. Running polymarket-cli events list --tag nba with no flags returns only closed/settled events instead of active ones, because the CLI omits the closed query param when no --closed/--active flag is passed.
The --help does not document the defaults
The Gamma docs for GET /events say closed defaults to false, but the API actually defaults to closed=true (returns only settled events when the param is omitted).
What the docs say --> https://docs.polymarket.com/developers/gamma-markets-api/get-events
Quick test of the problem:
Should return {"true": 0} but will show {"true": 100} as it defaults to
closed == truewhen no param is set.This reflects on the CLI too. Running
polymarket-cli events list --tag nbawith no flags returns only closed/settled events instead of active ones, because the CLI omits the closed query param when no --closed/--active flag is passed.The
--helpdoes not document the defaults