(self, index)
return {'price': price, 'orderQty': quantity, 'side': "Buy" if index < 0 else "Sell"}
Create an order object.
Create an order object.
Create an order object .
def prepare_order(self, index):
        """Create an order object."""

        if settings.RANDOM_ORDER_SIZE is True:
            quantity = random.randint(settings.MIN_ORDER_SIZE, settings.MAX_ORDER_SIZE)
        else:
            quantity = settings.ORDER_START_SIZE + ((abs(index) - 1) * settings.ORDER_STEP_SIZE)

        price = self.get_price_offset(index)

        return {'price': price, 'orderQty': quantity, 'side': "Buy" if index < 0 else "Sell"}
def prepare_order ( self , index ) : if settings . RANDOM_ORDER_SIZE is True : quantity = random . randint ( settings . MIN_ORDER_SIZE , settings . MAX_ORDER_SIZE ) else : quantity = settings . ORDER_START_SIZE + ( ( abs ( index ) - 1 ) * settings . ORDER_STEP_SIZE ) price = self . get_price_offset ( index ) return { 'price' : price , 'orderQty' : quantity , 'side' : "Buy" if index < 0 else "Sell" }