fix(data): include missing fields in activity output#30
Open
RajMandaliya wants to merge 3 commits intoPolymarket:mainfrom
Open
fix(data): include missing fields in activity output#30RajMandaliya wants to merge 3 commits intoPolymarket:mainfrom
RajMandaliya wants to merge 3 commits intoPolymarket:mainfrom
Conversation
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"
There was a problem hiding this comment.
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.
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.
Fixes #29
Problem
The
data activitycommand was silently dropping several fields that arepresent on the
Activitystruct and returned by the underlying REST API.Most critically, the
sidefield (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,slugTable output now includes:
Side,Outcome,PricecolumnsTesting
upgradeunrelated to this change)data activitysubcommandNotes
All added fields are
Option<_>on theActivitystruct so this is fullybackwards 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 activityJSON/table schema may need to tolerate the new fields/columns.Overview
Fixes
data activityoutput to stop droppingActivityfields needed to interpret trades and market/outcome identity.print_activitynow includes additional optional fields in JSON output (side,price,asset,outcome,outcome_index,condition_id,slug) and addsSide/Outcome/Pricecolumns to the table output, with new CLI integration tests coveringdata activity --helpand requiredaddressvalidation.Written by Cursor Bugbot for commit 2f7b1dd. This will update automatically on new commits. Configure here.