docstr: check if order was created by running through
  all api functions according to ccxt manual
  
  :param dt_before: pd.Timestamp
  :return: order: Order/ order_id: str
          if an order was found, otherwise None
docstr_tok: ["check","if","order","was","created","by","running","through","all","api","functions","according","to","ccxt","manual",":","param","dt_before",":","pd.Timestamp",":","return",":","order",":","Order\/","order_id",":","str","if","an","order","was","found",",","otherwise","None"]
code: def _fetch_missing_order(self, dt_before, symbol):
      """
      check if order was created by running through
      all api functions according to ccxt manual
  
      :param dt_before: pd.Timestamp
      :return: order: Order/ order_id: str
              if an order was found, otherwise None
      """
  
      missing_order = None
      previous_orders = copy.deepcopy(self.api.orders)
  
      if (
          "fetchOrders" in self.api.has
          and self.api.has["fetchOrders"] is True
      ):
          # contains all orders, therefore,
          # if method available for this exchange,
          # it's enough to check it.
          self.api.fetch_orders()
          missing_order = self._check_order_found(previous_orders)
  
      else:
          if (
              "fetchOpenOrders" in self.api.has
              and self.api.has["fetchOpenOrders"] is True
          ):
              self.api.fetch_open_orders()
              missing_order = self._check_order_found(previous_orders)
  
          if (
              missing_order is None
              and "fetchClosedOrders" in self.api.has
              and self.api.has["fetchClosedOrders"] is True
          ):
              self.api.fetch_closed_orders()
              missing_order = self._check_order_found(previous_orders)
  
      if missing_order is None and self.api.has["fetchMyTrades"]:
          recent_trades = [
              x
              for x in self.api.fetch_my_trades(symbol=symbol)
              if pd.Timestamp(x["datetime"]) > dt_before
          ]
          missing_order_id_by_trade = list(
              set(
                  trade["order"]
                  for trade in recent_trades
                  if trade["order"] not in list(self.api.orders)
              )
          )
          if missing_order_id_by_trade:
              if len(missing_order_id_by_trade) > 1:
                  # todo handle this case (not sure we ever will get to this
                  # case, since we assume that in this period of
                  # time, max 1 order was opened)
                  log.warn(
                      "multiple orders were found according "
                      "to the trades: {} only the first is considered".format(
                          [x.id for x in missing_order_id_by_trade]
                      )
                  )
              order_id = missing_order_id_by_trade[0]
              return order_id, None
  
      return None, missing_order
  
imports: import copy
  import json
  import os
  import re
  from collections import defaultdict
  import ccxt
  import pandas
  import six
  from ccxt import InvalidOrder, NetworkError, ExchangeError, RequestTimeout
  from logbook import Logger
  from six import string_types
  from catalyst.algorithm import MarketOrder
  from catalyst.assets._assets import TradingPair
  from catalyst.constants import LOG_LEVEL
  from catalyst.exchange.exchange import Exchange
  from catalyst.exchange.exchange_bundle import ExchangeBundle
  from catalyst.exchange.exchange_errors import InvalidHistoryFrequencyError, ExchangeSymbolsNotFound, ExchangeRequestError, InvalidOrderStyle, ExchangeNotFoundError, CreateOrderError, InvalidHistoryTimeframeError, UnsupportedHistoryFrequencyError
  from catalyst.exchange.exchange_execution import ExchangeLimitOrder
  from catalyst.exchange.utils.exchange_utils import mixin_market_params, get_exchange_folder, get_catalyst_symbol, get_exchange_auth
  from catalyst.exchange.utils.datetime_utils import from_ms_timestamp, get_epoch, get_periods_range
  from catalyst.finance.order import Order, ORDER_STATUS
  from catalyst.finance.transaction import Transaction
  from redo import retry
label_desc: Use image node_id 22 for calling the CCXT obj's underlying member method code with example usage: obj._fetch_missing_order(dt_before, symbol) and returns: None,  missing_order, order_id,  None