Skip to content

fix(data): parse combo trade activity#100

Open
cesarenaldi wants to merge 1 commit into
mainfrom
feature/dev-270-handle-combo-trade-activity-rows-in-python-sdk
Open

fix(data): parse combo trade activity#100
cesarenaldi wants to merge 1 commit 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 model changes with explicit routing; existing CLOB TradeActivity paths are preserved and covered by tests.

Overview
Adds ComboTradeActivity so Data API TRADE payloads with isCombo: true parse into a dedicated type instead of failing or mis-typing combo rows as CLOB trades.

parse_activity now branches on type == "TRADE" and isCombo before the generic trade handler: combo trades use ComboConditionId and position_id (from asset), with a slimmer field set (no outcome/slug/event fields). TradeActivity gains an explicit is_combo: False default so non-combo trades stay unchanged.

ComboTradeActivity is re-exported from the public package; a unit test covers combo trade parsing.

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

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