Available languages: [Python](https://databento.com/docs/api-live/client/terminate.python.md) · [C++](https://databento.com/docs/api-live/client/terminate.cpp.md) · [Rust](https://databento.com/docs/api-live/client/terminate.rust.md) · [Raw](https://databento.com/docs/api-live/client/terminate.raw.md)

Source: https://databento.com/docs/api-live/client/terminate


### Live.terminate

Terminate the session and stop processing records immediately.

A client can only be terminated after a successful connection is made by calling [Live.subscribe](https://databento.com/docs/api-live/client/subscribe.md).

Unlike [Live.stop](https://databento.com/docs/api-live/client/stop.md), the session will end immediately and received records will no longer be processed.

Once terminated, the `Live` client can be reused but the session state is not preserved.

#### API method

```python
Live.terminate() -> None
```

#### Example usage

```python
import databento as db

# Create a live client
client = db.Live(key="$YOUR_API_KEY")

# Subscribe to the trades schema for all ES futures
client.subscribe(
    dataset="GLBX.MDP3",
    schema="trades",
    stype_in="parent",
    symbols="ES.FUT",
)

# Start the streaming session
client.start()

# Terminate the streaming session
client.terminate()
```
