code: def live(
      ctx,
      algofile,
      capital_base,
      algotext,
      define,
      output,
      print_algo,
      local_namespace,
      exchange_name,
      algo_namespace,
      quote_currency,
      start,
      end,
      live_graph,
      auth_aliases,
      simulate_orders,
  ):
      """Trade live with the given algorithm."""
      if (algotext is not None) == (algofile is not None):
          ctx.fail(
              "must specify exactly one of '-f' / '--algofile' or"
              " '-t' / '--algotext'",
          )
  
      if exchange_name is None:
          ctx.fail("must specify an exchange name '-x'")
  
      if algo_namespace is None:
          ctx.fail(
              "must specify an algorithm name '-n' in live execution mode"
          )
  
      if quote_currency is None:
          ctx.fail(
              "must specify a quote currency '-c' in live execution mode"
          )
  
      if capital_base is None:
          ctx.fail("must specify a capital base with '--capital-base'")
  
      if simulate_orders:
          click.echo("Running in paper trading mode.", sys.stdout)
  
      else:
          click.echo("Running in live trading mode.", sys.stdout)
  
      perf = _run(
          initialize=None,
          handle_data=None,
          before_trading_start=None,
          analyze=None,
          algofile=algofile,
          algotext=algotext,
          defines=define,
          data_frequency=None,
          capital_base=capital_base,
          data=None,
          bundle=None,
          bundle_timestamp=None,
          start=start,
          end=end,
          output=output,
          print_algo=print_algo,
          local_namespace=local_namespace,
          environ=os.environ,
          live=True,
          exchange=exchange_name,
          algo_namespace=algo_namespace,
          quote_currency=quote_currency,
          live_graph=live_graph,
          analyze_live=None,
          simulate_orders=simulate_orders,
          auth_aliases=auth_aliases,
          stats_output=None,
      )
  
      if output == "-":
          click.echo(str(perf), sys.stdout)
      elif (
          output != os.devnull
      ):  # make the catalyst magic not write any data
          perf.to_pickle(output)
  
      return perf
  
imports: import errno
  import os
  from functools import wraps
  import re
  import click
  import sys
  import logbook
  import pandas
  from catalyst.marketplace.marketplace import Marketplace
  from six import text_type
  from catalyst.data import bundles
  from catalyst.exchange.exchange_bundle import ExchangeBundle
  from catalyst.exchange.utils.exchange_utils import delete_algo_folder
  from catalyst.utils.cli import Date, Timestamp
  from catalyst.utils.run_algo import _run, load_extensions
  from catalyst.exchange.utils.bundle_utils import EXCHANGE_NAMES
  from catalyst.utils.remote import remote_backtest, get_remote_status
label_desc: Use image node_id 6 for calling a global function with example usage: live(ctx, algofile, capital_base, algotext, define, output, print_algo, local_namespace, exchange_name, algo_namespace, quote_currency, start, end, live_graph, auth_aliases, simulate_orders) and returns: perf