def __init__(self, channel): super().__init__(channel) # create async jobs self.open_orders_job = async_job.AsyncJob(self._open_orders_fetch_and_push, execution_interval_delay=self.OPEN_ORDER_REFRESH_TIME, min_execution_delay=self.TIME_BETWEEN_ORDERS_REFRESH) self.closed_orders_job = async_job.AsyncJob(self._closed_orders_fetch_and_push, execution_interval_delay=self.CLOSE_ORDER_REFRESH_TIME, min_execution_delay=self.TIME_BETWEEN_ORDERS_REFRESH) self.order_update_job = async_job.AsyncJob(self._order_fetch_and_push, is_periodic=False, enable_multiple_runs=True) self.order_update_job.add_job_dependency(self.open_orders_job) self.open_orders_job.add_job_dependency(self.order_update_job)
def __init__(self, channel): super().__init__(channel) self.should_use_open_position_per_symbol = False # create async jobs self.open_positions_job = async_job.AsyncJob( self._open_positions_fetch_and_push, execution_interval_delay=self.OPEN_POSITION_REFRESH_TIME, min_execution_delay=self.TIME_BETWEEN_POSITIONS_REFRESH) self.position_update_job = async_job.AsyncJob( self._position_fetch_and_push, is_periodic=False, enable_multiple_runs=True) self.position_update_job.add_job_dependency(self.open_positions_job) self.open_positions_job.add_job_dependency(self.position_update_job)
def __init__(self, channel): super().__init__(channel) # create async jobs self.fetch_funding_job = async_job.AsyncJob(self._funding_fetch_and_push, execution_interval_delay=self.FUNDING_REFRESH_TIME, min_execution_delay=self.FUNDING_REFRESH_TIME_MIN)
def __init__(self, channel): super().__init__(channel) self.should_use_position_per_symbol = False # create async jobs self.position_update_job = async_job.AsyncJob( self._positions_fetch_and_push, execution_interval_delay=self.POSITION_REFRESH_TIME, min_execution_delay=self.TIME_BETWEEN_POSITIONS_REFRESH)