Skip to content

Conversation

@t00ts
Copy link
Contributor

@t00ts t00ts commented Feb 1, 2026

The current implementation limits the TWS server version to 173, which means execution timestamps are still returned without explicit timezone information. This forces the client to rely on the (manually set) timezone of TWS or Gateway.

Bumping to version 200 enables TWS to return timezone-aware execution timestamps (e.g., 20260130 10:46:26 America/New_York).

This also required adding two new fields to ExecutionFilter that TWS expects at version 200:

  • last_n_days: filter for last N days (0 = no filter)
  • specific_dates: filter for specific dates

t00ts and others added 4 commits February 1, 2026 16:28
Tests verify:
- Version < 200: date fields not encoded
- Version >= 200: last_n_days and specific_dates encoded
- Mock server responses now return v200 to match advertised range
- Add format spec and example to specific_dates doc
Copy link
Owner

@wboayue wboayue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this.

Server version 200 >= BOND_ISSUERID (176), so encoder adds issuer_id.
Test helper was missing this field, causing packet mismatch with mock.
@wboayue wboayue merged commit 68e5525 into wboayue:main Feb 1, 2026
3 checks passed
AdAstraPerAsperaMX pushed a commit to AdAstraPerAsperaMX/subscribe_to_group_events that referenced this pull request Feb 4, 2026
* feat(orders): add `last_n_days` and `specific_dates` to `ExecutionFilter`

* feat(connection): bump server `max_version` to `200` (PARAMETRIZED_DAYS_OF_EXECUTIONS)

* Add tests for encode_executions version-gated date fields

Tests verify:
- Version < 200: date fields not encoded
- Version >= 200: last_n_days and specific_dates encoded

* Update mock version responses to 200, improve doc comment

- Mock server responses now return v200 to match advertised range
- Add format spec and example to specific_dates doc

* Fix test helper to include issuer_id field for v200

Server version 200 >= BOND_ISSUERID (176), so encoder adds issuer_id.
Test helper was missing this field, causing packet mismatch with mock.

---------

Co-authored-by: Wil Boayue <wil.boayue@gmail.com>
AdAstraPerAsperaMX pushed a commit to AdAstraPerAsperaMX/subscribe_to_group_events that referenced this pull request Feb 7, 2026
* feat(orders): add `last_n_days` and `specific_dates` to `ExecutionFilter`

* feat(connection): bump server `max_version` to `200` (PARAMETRIZED_DAYS_OF_EXECUTIONS)

* Add tests for encode_executions version-gated date fields

Tests verify:
- Version < 200: date fields not encoded
- Version >= 200: last_n_days and specific_dates encoded

* Update mock version responses to 200, improve doc comment

- Mock server responses now return v200 to match advertised range
- Add format spec and example to specific_dates doc

* Fix test helper to include issuer_id field for v200

Server version 200 >= BOND_ISSUERID (176), so encoder adds issuer_id.
Test helper was missing this field, causing packet mismatch with mock.

---------

Co-authored-by: Wil Boayue <wil.boayue@gmail.com>
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.

2 participants