Skip to navigation

Query Display Groups

View as MarkdownOpen in Claude

Introduction

The EClient.queryDisplayGroups method is used to request all available Display Groups in TWS. The EWrapper.displayGroupList is a one-time response to EClient.queryDisplayGroups.

It returns a list of integers representing visible Group ID separated by the ”|” character, and sorted by most used group first. This list will not change during TWS session. In other words, user cannot add a new group, but only the sorting of the group numbers can change.

Example: “4|1|2|5|3|6|7”


Request Query Display Groups

EClient.queryDisplayGroups(requestId)

Requests all available Display Groups in TWS.

requestId
int

Request identifier used to track data.


self.queryDisplayGroups(requestId)

Receive Query Display Groups

EWrapper.displayGroupList(requestId, groups)

A one-time response to querying the display groups.

requestId
int

Request identifier used to track data.

groups
string

Returns a list of integers representing visible Group ID separated by the ”|” character, and sorted by most used group first.


def displayGroupList(self, reqId: int, groups: str):
print("DisplayGroupList. ReqId:", reqId, "Groups", groups)