(self)
Print the current MM status.
Print the current MM status.
Print the current MM status .
def print_status(self):
        """Print the current MM status."""

        margin = self.exchange.get_margin()
        position = self.exchange.get_position()
        self.running_qty = self.exchange.get_delta()
        self.start_XBt = margin["marginBalance"]

        logger.info("Current XBT Balance: %.6f" % XBt_to_XBT(self.start_XBt))
        logger.info("Current Contract Position: %d" % self.running_qty)
        if settings.CHECK_POSITION_LIMITS:
            logger.info("Position limits: %d/%d" % (settings.MIN_POSITION, settings.MAX_POSITION))
        if position['currentQty'] != 0:
            logger.info("Avg Cost Price: %.2f" % float(position['avgCostPrice']))
            logger.info("Avg Entry Price: %.2f" % float(position['avgEntryPrice']))
        logger.info("Contracts Traded This Run: %d" % (self.running_qty - self.starting_qty))
        logger.info("Total Contract Delta: %.4f XBT" % self.exchange.calc_delta()['spot'])
def print_status ( self ) : margin = self . exchange . get_margin ( ) position = self . exchange . get_position ( ) self . running_qty = self . exchange . get_delta ( ) self . start_XBt = margin [ "marginBalance" ] logger . info ( "Current XBT Balance: %.6f" % XBt_to_XBT ( self . start_XBt ) ) logger . info ( "Current Contract Position: %d" % self . running_qty ) if settings . CHECK_POSITION_LIMITS : logger . info ( "Position limits: %d/%d" % ( settings . MIN_POSITION , settings . MAX_POSITION ) ) if position [ 'currentQty' ] != 0 : logger . info ( "Avg Cost Price: %.2f" % float ( position [ 'avgCostPrice' ] ) ) logger . info ( "Avg Entry Price: %.2f" % float ( position [ 'avgEntryPrice' ] ) ) logger . info ( "Contracts Traded This Run: %d" % ( self . running_qty - self . starting_qty ) ) logger . info ( "Total Contract Delta: %.4f XBT" % self . exchange . calc_delta ( ) [ 'spot' ] )