> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# StreamClient

> Methods for X API v2 Stream endpoints.

Access **Stream** endpoints via `client.Stream` (`StreamClient`).

## Methods

| Method | Endpoint | Behavior | Summary |
| :- | :- | :- | :- |
| [`ActivityStream`](#activitystream) | `GET /2/activity/stream` | Streaming | Activity Stream |
| [`GetRuleCountsAsync`](#getrulecountsasync) | `GET /2/tweets/search/stream/rules/counts` | Standard | Get Stream Rule Counts |
| [`GetRulesAsync`](#getrulesasync) | `GET /2/tweets/search/stream/rules` | Paginated | Get Stream Rules |
| [`LabelsComplianceStream`](#labelscompliancestream) | `GET /2/tweets/label/stream` | Streaming | Stream Post Labels |
| [`LikesComplianceStream`](#likescompliancestream) | `GET /2/likes/compliance/stream` | Streaming | Stream Likes Compliance Data |
| [`LikesFirehoseStream`](#likesfirehosestream) | `GET /2/likes/firehose/stream` | Streaming | Stream All Likes |
| [`LikesSample10Stream`](#likessample10stream) | `GET /2/likes/sample10/stream` | Streaming | Stream Sampled Likes |
| [`PostsStream`](#postsstream) | `GET /2/tweets/search/stream` | Streaming | Stream Filtered Posts |
| [`PostsComplianceStream`](#postscompliancestream) | `GET /2/tweets/compliance/stream` | Streaming | Stream Posts Compliance Data |
| [`PostsFirehoseStream`](#postsfirehosestream) | `GET /2/tweets/firehose/stream` | Streaming | Stream All Posts |
| [`PostsFirehoseEnStream`](#postsfirehoseenstream) | `GET /2/tweets/firehose/stream/lang/en` | Streaming | Stream English Posts |
| [`PostsFirehoseJaStream`](#postsfirehosejastream) | `GET /2/tweets/firehose/stream/lang/ja` | Streaming | Stream Japanese Posts |
| [`PostsFirehoseKoStream`](#postsfirehosekostream) | `GET /2/tweets/firehose/stream/lang/ko` | Streaming | Stream Korean Posts |
| [`PostsFirehosePtStream`](#postsfirehoseptstream) | `GET /2/tweets/firehose/stream/lang/pt` | Streaming | Stream Portuguese Posts |
| [`PostsSampleStream`](#postssamplestream) | `GET /2/tweets/sample/stream` | Streaming | Stream Sampled Posts |
| [`PostsSample10Stream`](#postssample10stream) | `GET /2/tweets/sample10/stream` | Streaming | Stream 10% Sampled Posts |
| [`UpdateRulesAsync`](#updaterulesasync) | `POST /2/tweets/search/stream/rules` | Standard | Update Stream Rules |
| [`UsersComplianceStream`](#userscompliancestream) | `GET /2/users/compliance/stream` | Streaming | Stream Users Compliance Data |

## `ActivityStream`

GET `/2/activity/stream` Streaming

**Activity Stream**

Stream of X Activities

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.ActivityStream();
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**Optional parameters (StreamClient.ActivityOptions — 3)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the activities will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the activities will be provided.

**Returns:** `Task<EventStream<ActivityStreamResponse>>`

***

## `GetRuleCountsAsync`

GET `/2/tweets/search/stream/rules/counts`

**Get Stream Rule Counts**

Retrieves the count of rules in the active rule set for the filtered stream.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

var response = await client.Stream.GetRuleCountsAsync();
Console.WriteLine(response);
```

### Parameters

**Optional parameters (StreamClient.GetRuleCountsOptions — 1)**

**options.RulesCountFields** `string`

`rules_count.fields` (query parameter).

**Returns:** `Task<GetRuleCountsResponse>`

***

## `GetRulesAsync`

GET `/2/tweets/search/stream/rules` Paginated

**Get Stream Rules**

Returns the active filtered-stream rules for the authenticated app. Provide `ids` to fetch specific rules; omit it to list all rules.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await foreach (var page in client.Stream.GetRulesPages())
{
    Console.WriteLine(page);
}
```

### Parameters

**Optional parameters (StreamClient.GetRulesOptions — 3)**

**options.Ids** `List\<string\>`

`ids` (query parameter).

**options.MaxResults** `int`

`max_results` (query parameter).

**options.PaginationToken** `string`

A base32hex-encoded pagination token that decodes to 8 bytes.

**Returns:** `Task<GetRulesResponse>` (use `GetRulesPages(...)` for `IAsyncEnumerable` page iteration)

***

## `LabelsComplianceStream`

GET `/2/tweets/label/stream` Streaming

**Stream Post Labels**

Streams all labeling events applied to Posts.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.LabelsComplianceStream();
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**Optional parameters (StreamClient.LabelsComplianceOptions — 3)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided.

**Returns:** `Task<EventStream<JsonElement>>`

***

## `LikesComplianceStream`

GET `/2/likes/compliance/stream` Streaming

**Stream Likes Compliance Data**

Streams all compliance data related to Likes for Users.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.LikesComplianceStream();
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**Optional parameters (StreamClient.LikesComplianceOptions — 3)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided.

**Returns:** `Task<EventStream<JsonElement>>`

***

## `LikesFirehoseStream`

GET `/2/likes/firehose/stream` Streaming

**Stream All Likes**

Streams all public Likes in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.LikesFirehoseStream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.LikesFirehoseOptions — 8)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**options.LikeWithTweetAuthorFields** `List\<string\>`

A comma separated list of LikeWithTweetAuthor fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**Returns:** `Task<EventStream<StreamLikesFirehoseResponse>>`

***

## `LikesSample10Stream`

GET `/2/likes/sample10/stream` Streaming

**Stream Sampled Likes**

Streams a 10% sample of public Likes in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.LikesSample10Stream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.LikesSample10Options — 8)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**options.LikeWithTweetAuthorFields** `List\<string\>`

A comma separated list of LikeWithTweetAuthor fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**Returns:** `Task<EventStream<StreamLikesSample10Response>>`

***

## `PostsStream`

GET `/2/tweets/search/stream` Streaming

**Stream Filtered Posts**

Streams Posts in real-time matching the active rule set.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsStream();
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**Optional parameters (StreamClient.PostsOptions — 9)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**Returns:** `Task<EventStream<StreamPostsResponse>>`

***

## `PostsComplianceStream`

GET `/2/tweets/compliance/stream` Streaming

**Stream Posts Compliance Data**

Streams all compliance data related to Posts.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsComplianceStream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.PostsComplianceOptions — 3)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post Compliance events will be provided.

**Returns:** `Task<EventStream<JsonElement>>`

***

## `PostsFirehoseStream`

GET `/2/tweets/firehose/stream` Streaming

**Stream All Posts**

Streams all public Posts in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsFirehoseStream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.PostsFirehoseOptions — 9)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**Returns:** `Task<EventStream<StreamPostsFirehoseResponse>>`

***

## `PostsFirehoseEnStream`

GET `/2/tweets/firehose/stream/lang/en` Streaming

**Stream English Posts**

Streams all public English-language Posts in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsFirehoseEnStream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.PostsFirehoseEnOptions — 9)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**Returns:** `Task<EventStream<StreamPostsFirehoseEnResponse>>`

***

## `PostsFirehoseJaStream`

GET `/2/tweets/firehose/stream/lang/ja` Streaming

**Stream Japanese Posts**

Streams all public Japanese-language Posts in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsFirehoseJaStream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.PostsFirehoseJaOptions — 9)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**Returns:** `Task<EventStream<StreamPostsFirehoseJaResponse>>`

***

## `PostsFirehoseKoStream`

GET `/2/tweets/firehose/stream/lang/ko` Streaming

**Stream Korean Posts**

Streams all public Korean-language Posts in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsFirehoseKoStream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.PostsFirehoseKoOptions — 9)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**Returns:** `Task<EventStream<StreamPostsFirehoseKoResponse>>`

***

## `PostsFirehosePtStream`

GET `/2/tweets/firehose/stream/lang/pt` Streaming

**Stream Portuguese Posts**

Streams all public Portuguese-language Posts in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsFirehosePtStream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.PostsFirehosePtOptions — 9)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**Returns:** `Task<EventStream<StreamPostsFirehosePtResponse>>`

***

## `PostsSampleStream`

GET `/2/tweets/sample/stream` Streaming

**Stream Sampled Posts**

Streams a 1% sample of public Posts in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsSampleStream();
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**Optional parameters (StreamClient.PostsSampleOptions — 7)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**Returns:** `Task<EventStream<StreamPostsSampleResponse>>`

***

## `PostsSample10Stream`

GET `/2/tweets/sample10/stream` Streaming

**Stream 10% Sampled Posts**

Streams a 10% sample of public Posts in real-time.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.PostsSample10Stream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.PostsSample10Options — 9)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.TweetFields** `List\<string\>`

A comma separated list of Tweet fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.

**Returns:** `Task<EventStream<StreamPostsSample10Response>>`

***

## `UpdateRulesAsync`

POST `/2/tweets/search/stream/rules`

**Update Stream Rules**

Adds or deletes rules from the active rule set for the filtered stream. Exactly one of `add`, `delete`, or `?delete_all=true` must be specified. Use `?dry_run=true` to validate without committing.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

var response = await client.Stream.UpdateRulesAsync(new UpdateRulesRequest());
Console.WriteLine(response);
```

### Parameters

**body** `UpdateRulesRequest` *required*

Request payload.

**Optional parameters (StreamClient.UpdateRulesOptions — 2)**

**options.DryRun** `bool`

`dry_run` (query parameter).

**options.DeleteAll** `bool`

`delete_all` (query parameter).

**Returns:** `Task<UpdateRulesResponse>`

***

## `UsersComplianceStream`

GET `/2/users/compliance/stream` Streaming

**Stream Users Compliance Data**

Streams all compliance data related to Users.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"),
});

await using var stream = await client.Stream.UsersComplianceStream(1);
await foreach (var item in stream)
{
    Console.WriteLine(item);
}
```

### Parameters

**partition** `int` *required*

The partition number.

**Optional parameters (StreamClient.UsersComplianceOptions — 3)**

**options.BackfillMinutes** `int`

The number of minutes of backfill requested.

**options.StartTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided.

**options.EndTime** `string`

YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided.

**Returns:** `Task<EventStream<JsonElement>>`

***
