Skip to main content
Every list endpoint accepts an optional filter in the request body. It’s a list of conditions, combined with AND.
That returns positions belonging to that wallet and worth at least $1,000. To express OR, use a group. Fields are addressed by the same names you get back in the response, so you filter on what you see. Each endpoint documents its own filterable fields and the operators each accepts — see the API Reference.

Conditions

A condition names a field, an operator, and a value.
Because conditions are list items rather than object keys, you can use the same field as many times as you like — for example, to bound a value on both sides:

Operators by field type

in and notIn accept either a single value or an array — "value": 1234 and "value": [1234, 5678] both work. ID fields such as marketId and eventId take integers; text fields take strings.

Wallet addresses and cohorts

Address fields accept a list of addresses, or a cohort to filter by membership:
Use notInCohort to return everything outside the cohort.

Time ranges

last accepts day, week, month, quarter, year. since takes either a date or a calendar range (week, month, quarter, year).

Groups

The top-level list is always AND. For OR, add a group — an item with an operator (AND or OR) and its own filters.
That reads as: that wallet, AND (value ≥ 1000 OR PnL > 500). To make the whole query an OR, pass a single group:
Groups nest at most two levels deep. A group may contain groups, but those inner groups must contain only conditions.

A complete request

Activity options

The activity endpoint takes two extra fields that aren’t filters, because they change which rows are built rather than narrowing the ones returned.

Selecting activity types

activityIds restricts the log to certain activity types. The activity column isn’t part of filter — it’s selected here instead.
All activity types are returned when omitted. The API Reference lists each id and its name for the endpoint.

Aggregating into buckets

By default the endpoint returns one row per event. Pass aggregationWindow to get rows grouped by time bucket, activity type, and wallet instead — a summary rather than a log.
Each row then covers one wallet’s activity of one type within one bucket, with the measures aggregated over that window. The available grains — hourly through monthly — are listed in the API Reference; omit the field for the unaggregated log.
activityIds and aggregationWindow apply only to the activity endpoint. Sending them anywhere else returns 400.

Required filters

Some endpoints require a filter on a particular field. The position and holder endpoints, for example, require userId — every query must be scoped to a wallet or a cohort. Omitting one returns 400.

Errors

Filter problems come back as 400 with a machine-readable code and a message naming the field.