@@ -82,7 +82,7 @@ def __init__(
8282 self ._heartbeat_interval_s = heartbeat_interval_s
8383
8484 self ._dbn_decoder = databento_dbn .DBNDecoder (
85- upgrade_policy = VersionUpgradePolicy .UPGRADE_TO_V2 ,
85+ upgrade_policy = VersionUpgradePolicy .UPGRADE_TO_V3 ,
8686 )
8787 self ._gateway_decoder = GatewayDecoder ()
8888
@@ -175,7 +175,7 @@ def connection_made(self, transport: asyncio.BaseTransport) -> None:
175175
176176 See Also
177177 --------
178- asycnio .BufferedProtocol.connection_made
178+ asyncio .BufferedProtocol.connection_made
179179
180180 """
181181 logger .debug ("established connection to gateway" )
@@ -190,7 +190,7 @@ def connection_lost(self, exc: Exception | None) -> None:
190190
191191 See Also
192192 --------
193- asycnio .BufferedProtocol.connection_lost
193+ asyncio .BufferedProtocol.connection_lost
194194
195195 """
196196 super ().connection_lost (exc )
@@ -216,7 +216,7 @@ def eof_received(self) -> bool | None:
216216
217217 See Also
218218 --------
219- asycnio .BufferedProtocol.eof_received
219+ asyncio .BufferedProtocol.eof_received
220220
221221 """
222222 logger .info ("received EOF from remote" )
@@ -228,7 +228,7 @@ def get_buffer(self, sizehint: int) -> bytearray:
228228
229229 See Also
230230 --------
231- asycnio .BufferedProtocol.get_buffer
231+ asyncio .BufferedProtocol.get_buffer
232232
233233 """
234234 if len (self .__buffer ) < sizehint :
@@ -241,7 +241,7 @@ def buffer_updated(self, nbytes: int) -> None:
241241
242242 See Also
243243 --------
244- asycnio .BufferedProtocol.buffer_updated
244+ asyncio .BufferedProtocol.buffer_updated
245245
246246 """
247247 logger .debug ("read %d bytes from remote gateway" , nbytes )
@@ -325,7 +325,8 @@ def subscribe(
325325
326326 subscriptions : list [SubscriptionRequest ] = []
327327 chunked_symbols = list (chunk (symbols_list , SYMBOL_LIST_BATCH_SIZE ))
328- for batch in chunked_symbols :
328+ last_chunk_idx = len (chunked_symbols ) - 1
329+ for i , batch in enumerate (chunked_symbols ):
329330 batch_str = "," .join (batch )
330331 message = SubscriptionRequest (
331332 schema = validate_enum (schema , Schema , "schema" ),
@@ -334,6 +335,7 @@ def subscribe(
334335 start = optional_datetime_to_unix_nanoseconds (start ),
335336 snapshot = int (snapshot ),
336337 id = subscription_id ,
338+ is_last = int (i == last_chunk_idx ),
337339 )
338340 subscriptions .append (message )
339341
0 commit comments