Skip to content

fix(data): include missing fields in activity output#30

Open
RajMandaliya wants to merge 3 commits intoPolymarket:mainfrom
RajMandaliya:fix/activity-missing-fields
Open

fix(data): include missing fields in activity output#30
RajMandaliya wants to merge 3 commits intoPolymarket:mainfrom
RajMandaliya:fix/activity-missing-fields

Conversation

@RajMandaliya
Copy link

@RajMandaliya RajMandaliya commented Mar 6, 2026

Fixes #29

Problem

The data activity command was silently dropping several fields that are
present on the Activity struct and returned by the underlying REST API.
Most critically, the side field (BUY/SELL) was absent from JSON output,
making it impossible for scripts and agents to distinguish buy trades from
sell trades for non-CLOB activity records.

Changes

Single change to src/output/data.rs:

JSON output now includes: side, price, asset, outcome, outcome_index, condition_id, slug
Table output now includes: Side, Outcome, Price columns

Testing

  • All 93 existing tests pass (1 pre-existing failure in upgrade unrelated to this change)
  • Added 2 integration tests for the data activity subcommand

Notes

All added fields are Option<_> on the Activity struct so this is fully
backwards compatible. No changes to the SDK, commands layer, or request types.


Note

Low Risk
Low risk, additive CLI output changes only; main impact is that scripts depending on the exact data activity JSON/table schema may need to tolerate the new fields/columns.

Overview
Fixes data activity output to stop dropping Activity fields needed to interpret trades and market/outcome identity.

print_activity now includes additional optional fields in JSON output (side, price, asset, outcome, outcome_index, condition_id, slug) and adds Side/Outcome/Price columns to the table output, with new CLI integration tests covering data activity --help and required address validation.

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

Add side, price, outcome, outcome_index, condition_id, slug, and asset to both JSON and table output for the data activity command. All fields were present on the Activity struct but not included in the output renderer. This caused side (BUY/SELL) to be absent from JSON output, making it impossible to distinguish buys from sells for non-CLOB activity records. Fixes Polymarket#29
Add side, price, outcome, outcome_index, condition_id, slug, and asset to both JSON and table output for the data activity command. All fields were present on the Activity struct but not included in the output renderer. This caused side (BUY/SELL) to be absent from JSON output, making it impossible to distinguish buys from sells for non-CLOB activity records. Fixes Polymarket#29"
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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.

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

1 participant