code: def create_order(self, asset, amount, is_buy, style):
      symbol = self.get_symbol(asset)
  
      if isinstance(style, ExchangeLimitOrder):
          price = style.get_limit_price(is_buy)
          order_type = "limit"
  
      elif isinstance(style, MarketOrder):
          price = None
          order_type = "market"
  
      else:
          raise InvalidOrderStyle(
              exchange=self.name, style=style.__class__.__name__
          )
  
      side = "buy" if amount > 0 else "sell"
      if hasattr(self.api, "amount_to_lots"):
          # TODO: is this right?
          if self.api.markets is None:
              self.api.load_markets()
  
          # https://github.com/ccxt/ccxt/issues/1483
          market = self.api.markets[symbol]
          if "lots" in market and market["lots"] > amount:
              raise CreateOrderError(
                  exchange=self.name,
                  e="order amount lower than the smallest lot: {}".format(
                      amount
                  ),
              )
      adj_amount = round(abs(amount), asset.decimals)
      prec_amount = self.api.amount_to_precision(symbol, adj_amount)
      before_order_dt = pd.Timestamp.utcnow()
      try:
          result = self.api.create_order(
              symbol=symbol,
              type=order_type,
              side=side,
              amount=prec_amount,
              price=price,
          )
      except InvalidOrder as e:
          log.warn("the exchange rejected the order: {}".format(e))
          raise CreateOrderError(exchange=self.name, error=e)
  
      except RequestTimeout as e:
          log.info(
              "received a RequestTimeout exception while creating "
              "an order on {} / {}\n Checking if an order was filled "
              "during the timeout".format(self.name, symbol)
          )
          missing_order = retry(
              action=self._handle_request_timeout,
              attempts=self.attempts["missing_order_attempts"],
              sleeptime=self.attempts["retry_sleeptime"],
              retry_exceptions=(RequestTimeout, ExchangeError),
              cleanup=lambda: log.warn(
                  "Checking missing order again.."
              ),
              args=(
                  before_order_dt,
                  asset,
                  amount,
                  is_buy,
                  style,
                  prec_amount,
              ),
          )
          if missing_order is None:
              # no order was found
              log.warn(
                  "no order was identified during timeout exception."
                  "Please double check for inconsistency with the exchange. "
                  "We encourage you to report any issue on GitHub: "
                  "https://github.com/enigmampc/catalyst/issues"
              )
              # In order to try ordering again
              raise ExchangeRequestError(error=e)
          else:
              return missing_order
  
      except (ExchangeError, NetworkError) as e:
          log.warn(
              "unable to create order {} / {}: {}".format(
                  self.name, symbol, e
              )
          )
          raise ExchangeRequestError(error=e)
  
      exchange_amount = None
      if "amount" in result and result["amount"] != prec_amount:
          exchange_amount = result["amount"]
  
      elif "info" in result:
          if "origQty" in result["info"]:
              exchange_amount = float(result["info"]["origQty"])
  
      if exchange_amount:
          log.info(
              "order amount adjusted by {} from {} to {}".format(
                  self.name, prec_amount, exchange_amount
              )
          )
          prec_amount = exchange_amount
  
      if "info" not in result:
          raise ValueError("cannot use order without info attribute")
  
      final_amount = prec_amount if side == "buy" else -prec_amount
      order_id = result["id"]
      order = Order(
          dt=pd.Timestamp.utcnow(),
          asset=asset,
          amount=final_amount,
          stop=style.get_stop_price(is_buy),
          limit=style.get_limit_price(is_buy),
          id=order_id,
      )
      return 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 24 for calling the CCXT obj's underlying member method code with example usage: obj.create_order(asset, amount, is_buy, style) and returns: order, missing_order