Skip to content

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

Open
mvanhorn wants to merge 1 commit intoPolymarket:mainfrom
mvanhorn:osc/29-activity-missing-fields
Open

fix(data): include missing fields in activity output#41
mvanhorn wants to merge 1 commit intoPolymarket:mainfrom
mvanhorn:osc/29-activity-missing-fields

Conversation

@mvanhorn
Copy link

@mvanhorn mvanhorn commented Mar 10, 2026

Summary

Adds missing fields to polymarket data activity output that are present in the underlying REST API (https://data-api.polymarket.com/activity).

Fixes #29

Fields added

Field JSON output Table output
side "BUY" / "SELL" / null Side column
price "0.55" / null Price column
outcome "Yes" / "No" / null Outcome column
outcome_index 0 / 1 / null -
asset token ID string / null -
condition_id "0xdc2a..." / null -
slug "market-slug" / null -

The side field is critical for distinguishing buys from sells in non-CLOB activity records, which was the core issue reported.

Changes

File Change
src/output/data.rs Add 7 fields to JSON output, add Side/Outcome/Price columns to table output

Test plan

  • cargo fmt --check passes
  • cargo clippy -- -D warnings passes
  • cargo test — all 131 tests pass

This contribution was developed with AI assistance (Claude Code).


Note

Low Risk
Output-only changes that add fields/columns without altering request logic or persistence; risk is limited to minor formatting/compatibility impacts for consumers parsing the CLI output.

Overview
Updates print_activity output to surface previously omitted activity metadata.

Table output now includes new Side, Outcome, and Price columns (with - for missing values), and JSON output now includes side, outcome, outcome_index, price, asset, condition_id, and slug fields in addition to the existing activity data.

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

Add side, price, outcome, outcome_index, asset, condition_id, and slug
to the JSON output of `data activity`. Also add Side, Outcome, and
Price columns to the table output.

Without the `side` field, scripts cannot distinguish BUY from SELL
for non-CLOB activity records.

Fixes Polymarket#29

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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