class_docstr: A class for order creation following an order being complete.
  
  Parameters
  ----------
  side : `TradeSide`
      The trading side of the specification.
  trade_type : `TradeType`
      The type of trade for the specification.
  exchange_pair : `ExchangePair`
      The exchange pair for the specification.
  criteria : `Callable[[Order, Exchange], bool]`
      The criteria for executing the order after its been created.
docstr: Creates an order following from another order.
  
  Parameters
  ----------
  order : `Order`
      The previous order in the order path.
  
  Returns
  -------
  `Order`
      The order created from the specification parameters and the
      parameters of `order`.
code: def create_order(self, order: "Order") -> "Order":
      """Creates an order following from another order.
  
      Parameters
      ----------
      order : `Order`
          The previous order in the order path.
  
      Returns
      -------
      `Order`
          The order created from the specification parameters and the
          parameters of `order`.
      """
  
      wallet_instrument = self.side.instrument(self.exchange_pair.pair)
  
      exchange = order.exchange_pair.exchange
      wallet = order.portfolio.get_wallet(
          exchange.id, instrument=wallet_instrument
      )
      quantity = wallet.locked.get(order.path_id, None)
  
      if not quantity or quantity.size == 0:
          return None
  
      return Order(
          step=exchange.clock.step,
          side=self.side,
          trade_type=self.type,
          exchange_pair=self.exchange_pair,
          quantity=quantity,
          portfolio=order.portfolio,
          price=self.exchange_pair.price,
          criteria=self.criteria,
          end=order.end,
          path_id=order.path_id,
      )
  
file_path: tensortrade/tensortrade/oms/orders/order_spec.py
imports: from typing import Callable
  from tensortrade.core import Identifiable
  from tensortrade.oms.orders import Order, TradeSide, TradeType
label_desc: Use image node_id 2 for calling the OrderSpec obj's underlying member method code with example usage: obj.create_order(order) and returns: Order, None