Unsubscribing

To remove symbols from the session's subscriptions, the client sends an unsubscribe request to the gateway.

An unsubscribe request applies to a single schema. It doesn't need to match an earlier subscription: any subset of the subscribed symbols can be removed, and symbols=ALL_SYMBOLS removes every symbol for the schema. Unsubscribe requests can be sent before or after the session is started.

The gateway acknowledges each unsubscribe request with a system message with code=UNSUBSCRIBE_ACK. If the request is sent before the session is started, the acknowledgement is sent after the session starts, following the DBN metadata.

Symbols that aren't subscribed, or that are only subscribed through a parent symbol, are left in place and reported in an ErrorMsg. These errors don't end the session.

After subscribing to trades for the E-mini S&P 500 and E-mini Nasdaq-100 December 2026 futures and starting the session:

schema=trades|stype_in=raw_symbol|symbols=ESZ6,NQZ6\n

start_session=1\n

to stop receiving trades for NQZ6, the client would send:

unsubscribe|schema=trades|stype_in=raw_symbol|symbols=NQZ6\n

The gateway will acknowledge the request with an UNSUBSCRIBE_ACK system message and continue streaming trades for ESZ6.