> This page is for TWS API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ibkrcampus.com/docs/llms.txt.

# Query Display Groups

## 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.

---

\


#### Python

```python
self.queryDisplayGroups(requestId)
```

#### Java

```java
client.queryDisplayGroups(requestId);
```

#### C++

```cpp
m_pClient->queryDisplayGroups(requestId);
```

#### C\#

```csharp
client.queryDisplayGroups(requestId);
```

#### VB.NET

```vbnet
client.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.

---

\


#### Python

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

#### Java

```java
@Override
public void displayGroupList(int reqId, String groups) {
  System.out.println("Display Group List. ReqId: " + reqId + ", Groups: " + groups + "\n");
}
```

#### C++

```cpp
void TestCppClient::displayGroupList( int reqId, const std::string& groups) {
  printf("Display Group List. ReqId: %d, Groups: %s\n", reqId, groups.c_str());
}
```

#### C\#

```csharp
public virtual void displayGroupList(int reqId, string groups)
{
  Console.WriteLine("DisplayGroupList. Request: " + reqId + ", Groups" + groups);
}
```

#### VB.NET

```vbnet
Public Sub displayGroupList(reqId As Integer, groups As String) Implements IBApi.EWrapper.displayGroupList
  Console.WriteLine("DisplayGroupList - ReqId [" & reqId & "] Groups [" & groups & "]")
End Sub
```