Skip to content

Conversation

@AdAstraPerAsperaMX
Copy link
Contributor

Summary

This PR adds support for updating the displayed contract in a TWS Display Group for both sync and async clients.

The new API allows users to:

  1. Subscribe to group events
  2. Read the subscription request ID
  3. Send an update for the group’s displayed contract using that request ID

Changes

  • Added update_display_group to:
    • Client (async)
    • client::blocking::Client (sync)
  • Added display group update request functions in:
    • display_groups::async
    • display_groups::sync
  • Added encoder support:
    • encode_update_display_group(request_id, contract_info)
  • Added request_id() accessors to subscription types:
    • async Subscription<T>
    • sync Subscription<T>
  • Added/updated unit tests for update display group encoding.

Alignment with prior display-group work

This follows the same structure introduced in:

  • c551bd01ffa6c8c6a35db36d55b5d009f6d8651c
  • 2c75486b8cc908cc7da266e27288f1d54619255e

Specifically:

  • Client methods delegate into display_groups::{async,sync} modules
  • Message construction remains centralized in display_groups/common/encoders
  • Public API shape remains consistent across sync/async variants

AdAstraPerAsperaMX and others added 3 commits February 7, 2026 11:53
Implement new method to update contracts in TWS display groups for
both synchronous and asynchronous clients. The method allows changing
the displayed contract by providing a contract identifier.
Replace client.update_display_group() with subscription.update().
DisplayGroupSubscription wraps Subscription<DisplayGroupUpdate> via
Deref/DerefMut, adding only the update() method.
@wboayue wboayue merged commit 9004534 into wboayue:main Feb 9, 2026
3 checks passed
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