fix(data): include missing fields in activity output#41
Open
mvanhorn wants to merge 1 commit intoPolymarket:mainfrom
Open
fix(data): include missing fields in activity output#41mvanhorn wants to merge 1 commit intoPolymarket:mainfrom
mvanhorn wants to merge 1 commit intoPolymarket:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds missing fields to
polymarket data activityoutput that are present in the underlying REST API (https://data-api.polymarket.com/activity).Fixes #29
Fields added
side"BUY"/"SELL"/nullprice"0.55"/nulloutcome"Yes"/"No"/nulloutcome_index0/1/nullassetnullcondition_id"0xdc2a..."/nullslug"market-slug"/nullThe
sidefield is critical for distinguishing buys from sells in non-CLOB activity records, which was the core issue reported.Changes
src/output/data.rsTest plan
cargo fmt --checkpassescargo clippy -- -D warningspassescargo test— all 131 tests passThis 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_activityoutput to surface previously omitted activity metadata.Table output now includes new
Side,Outcome, andPricecolumns (with-for missing values), and JSON output now includesside,outcome,outcome_index,price,asset,condition_id, andslugfields in addition to the existing activity data.Written by Cursor Bugbot for commit d6baffe. This will update automatically on new commits. Configure here.