Skip to content

fix(data): parse combo trade activity#100

Merged
cesarenaldi merged 2 commits into
mainfrom
feature/dev-270-handle-combo-trade-activity-rows-in-python-sdk
Jun 15, 2026
Merged

fix(data): parse combo trade activity#100
cesarenaldi merged 2 commits into
mainfrom
feature/dev-270-handle-combo-trade-activity-rows-in-python-sdk

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add public ComboTradeActivity for Data API TRADE rows with isCombo=true.
  • Preserve existing CLOB TradeActivity behavior and route trade parsing on isCombo.
  • Re-export ComboTradeActivity from the public package.

Linear

  • DEV-270

Verification

  • uv run pytest tests/unit/test_data_activity.py
  • uv run ruff check .
  • uv run pyright
  • uv run pytest tests/unit

Note

Low Risk
Additive parsing and typing for combo trades; standard TRADE handling is unchanged aside from an explicit is_combo flag.

Overview
Data API TRADE activity rows with isCombo: true are now parsed as ComboTradeActivity instead of failing or mis-mapping CLOB-style fields.

parse_activity branches on type == "TRADE" and isCombo before the existing type map. Combo trades use ComboConditionId, map asset to position_id, and omit CLOB-only fields (outcome, slug, event slug). Standard trades gain an explicit is_combo: false on TradeActivity.

ComboTradeActivity is part of the Activity union and is re-exported from the public package. Unit coverage was added for combo trade parsing.

Reviewed by Cursor Bugbot for commit 20bdcc7. Bugbot is set up for automated code reviews on this repo. Configure here.

@cesarenaldi cesarenaldi merged commit 24d3cf2 into main Jun 15, 2026
7 checks passed
@cesarenaldi cesarenaldi deleted the feature/dev-270-handle-combo-trade-activity-rows-in-python-sdk branch June 15, 2026 12:55
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.

1 participant