@@ -387,6 +387,7 @@ class DXLinkStreamer:
387387 def __init__ (
388388 self ,
389389 session : Session ,
390+ refresh_interval : float = 0.1 ,
390391 reconnect_args : tuple [Any , ...] = (),
391392 reconnect_fn : Optional [Callable [..., Coroutine [Any , Any , None ]]] = None ,
392393 ssl_context : SSLContext = create_default_context (),
@@ -404,6 +405,9 @@ def __init__(
404405 "Underlying" : 17 ,
405406 }
406407 self ._subscription_state : dict [str , str ] = defaultdict (lambda : "CHANNEL_CLOSED" )
408+ #: Time in seconds between fetching new events from dxfeed. You can try a higher
409+ #: value if processing quote updates quickly is not a high priority.
410+ self .refresh_interval = refresh_interval
407411 #: An async function to be called upon reconnection. The first argument must be
408412 #: of type `DXLinkStreamer` and will be a reference to the streamer object.
409413 self .reconnect_fn = reconnect_fn
@@ -647,7 +651,7 @@ async def _channel_setup(self, event_type: str) -> None:
647651 message = {
648652 "type" : "FEED_SETUP" ,
649653 "channel" : self ._channels [event_type ],
650- "acceptAggregationPeriod" : 10 ,
654+ "acceptAggregationPeriod" : self . refresh_interval ,
651655 "acceptDataFormat" : "COMPACT" ,
652656 }
653657
0 commit comments