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

# News Articles

## Introduction

After requesting news headlines using one of the above functions, the body of a news article can be requested with the article ID returned by invoking the function `EClient.reqNewsArticle`. The body of the news article is returned to the function `EWrapper.newsArticle`.

---

## Request News Articles

`EClient.reqNewsArticle(requestId, providerCode, articleId, newsArticleOptions)`

Requests news article body given articleId.

**`requestId`** `int`

Id of the request.

---

**`providerCode`** `string`

Short code indicating news provider, e.g. FLY.

---

**`articleId`** `string`

Id of the specific article.

---

**`newsArticleOptions`** `List`

Reserved for internal use. Should be defined as null.

---

\


#### Python

```python
self.reqNewsArticle(10002,"BRFG", "BRFG$04fb9da2", [])
```

#### Java

```java
client.reqNewsArticle(10002, "BZ", "BZ$04507322", null);
```

#### C++

```cpp
TagValueList* list = new TagValueList();
m_pClient->reqNewsArticle(12001, "MST", "MST$06f53098", TagValueListSPtr(list));
```

#### C\#

```csharp
client.reqNewsArticle(12002, "BZ", "BZ$04507322", null);
```

#### VB.NET

```vbnet
client.reqNewsArticle(10002, "BZ", "BZ$04507322", Nothing)
```

---

## Receive News Articles

`EWrapper.newsArticle(requestId, articleType, articleText)`

Called when receiving a News Article in response to `reqNewsArticle()`.

**`requestId`** `int`

Request identifier used to track data.

---

**`articleType`** `int`

The type of news article (0 – plain text or html, 1 – binary data / pdf).

---

**`articleText`** `string`

The body of article (if articleType == 1, the binary data is encoded using the Base64 scheme).

---

\


#### Python

```python
def newsArticle(self, requestId: int, articleType: int, articleText: str):
  print("requestId: ", requestId, "articleType: ", articleType, "articleText: ", articleText)
```

#### Java

```java
@Override
public void newsArticle(int requestId, int articleType, str articleText) {
  System.out.print(EWrapperMsgGenerator.newsArticle(requestId, articleType, articleText));
}
```

#### C++

```cpp
void TestCppClient::newsArticle(int requestId, int articleType, const std::string& articleText) {
    printf("newsArticle.", requestId, articleType, articleText);
}
```

#### C\#

```csharp
public void newsArticle(int requestId, int articleType, string articleText)
{
  Console.WriteLine("newsArticle. Request Id: {0}, Article Type: {1}, Article Text: {2}", requestId, articleType, articleText);
}
```

#### VB.NET

```vbnet
Public Sub newsArticle(requestId As Integer, articleType As Integer, articleText As String) Implements IBApi.EWrapper.newsArticle
  Console.WriteLine("newsArticle. Request Id: " & requestId & ", Article Type: " & articleType & ", Article Text: " & articleText)
End Sub
```