Skip to content

data activity: response missing side, price, and other fields present in REST API #29

@coolestowl

Description

@coolestowl

Summary

The `polymarket data activity ` command returns a subset of fields compared to the underlying REST API (`https://data-api.polymarket.com/activity\`). Most notably, the `side` field (BUY/SELL) is absent from the CLI output, making it impossible to distinguish buy trades from sell trades for non-CLOB activity records.

Fields missing from CLI output

The REST API returns these fields for `TRADE` activity records, none of which appear in the CLI JSON output:

Field Example value
`side` `"BUY"` / `"SELL"`
`price` `0.55`
`asset` `"76696946120120342..."`
`outcomeIndex` `1`
`outcome` `"Down"`
`conditionId` `"0xdc2a86ae..."`
`slug` `"bitcoin-up-or-down-..."`

Impact

Without the `side` field, scripts and agents consuming `data activity` output cannot determine whether a non-CLOB trade is a buy or a sell. This caused a non-CLOB sell to be misclassified as a buy cost, inflating reported position cost by ~90%.

Non-CLOB trades (those not appearing in `data trades`) are the only records where `side` is needed — CLOB trades already have `side` available via `data trades`. But since `data activity` is the only source for non-CLOB activity, the missing field is critical.

Reproduction

# REST API — includes side, price, outcome, etc.
curl "https://data-api.polymarket.com/activity?user=<wallet>&limit=5"

# CLI — same data but side/price/outcome fields stripped
polymarket -o json data activity <wallet> --limit 5

Expected behavior

`polymarket -o json data activity` should pass through all fields returned by the underlying REST API, or at minimum include `side`, `price`, `outcome`, `outcomeIndex`, `conditionId`, and `slug`.

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