Skip to content

BUG in Gamma API /events's closed param which default to true while doc says false (propagates to CLI) #71

Description

@souhailaS

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

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