Skip to content

fix(data): track combo costs and pagination limits - #270

Open
kartojal wants to merge 1 commit into
mainfrom
feature/dev-437-track-data-api-contract-changes-from-docs-pr-263-in-python
Open

fix(data): track combo costs and pagination limits#270
kartojal wants to merge 1 commit into
mainfrom
feature/dev-437-track-data-api-contract-changes-from-docs-pr-263-in-python

Conversation

@kartojal

@kartojal kartojal commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose combo gross entry cost and entry fees as precision-preserving Decimal fields
  • enforce the documented inclusive offset limits for trades and activity before an invalid request is sent
  • document bounded start/end windows and cover sync/async pagination boundaries

Validation

  • make check (lint, format, Pyright, 2,271 non-integration tests)
  • relevant live Data API integration tests (5 passed)
  • make build
  • adversarial review: no findings

Linear: DEV-437


Note

Low Risk
Additive model fields and client-side pagination guards; behavior change is failing early with UserInputError instead of a rejected API call when offset limits are exceeded.

Overview
Adds gross_entry_cost_usdc and entry_fees_usdc on ComboPosition as optional Decimal fields (with parsing tests), so combo entry cost breakdown matches the Data API.

Introduces max_offset on OffsetPaginatedSpec and checks it in sync/async offset pagination before HTTP: trades cap at 10,000, activity at 5,000, raising UserInputError with guidance to narrow via start/end. Public and secure client list_trades / list_activity docstrings document those limits; unit tests assert spec limits and boundary rejection without extra requests.

Reviewed by Cursor Bugbot for commit 5467ac2. 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