Function: clear_subscriptions()
Purpose:
Removes all active subscriptions to ICE data (e.g., those created with subscribe=True in get_quotes()). Useful for releasing resources, stopping unwanted updates, or resetting your session without restarting the publisher.
Function Signature:
clear_subscriptions() -> NoneParameters:
| Name | Type | Required | Default | Description |
| (none) | — | — | — | This function does not take any arguments. |
Default Behavior & Internals:
- Immediately cancels all open subscriptions across the session.
- Subscribed data streams (e.g., get_quotes(..., subscribe=True)) will stop updating.
- The publisher remains active — only subscriptions are cleared.
- Does not affect historical/snapshot requests (non-subscription calls).
Notes:
- Helpful for memory and resource management, especially in long-running scripts.
- Recommended before shutting down a session to avoid dangling subscriptions.