bot

class bot.Bot(consumer_key, consumer_secret, web_username, web_password, account_id, etrade_cookie, account_id_key, strategy_name, sandbox_key=None, sandbox_secret=None, dev=True, headless=True, browser='chrome', preview=True, prints=False)

Bases: object

Description:

This class is the main strategy class that will be used to run the strategy.

Parameters:
  • consumer_key (str, required) – Your E-Trade API consumer key

  • consumer_secret (str, required) – Your E-Trade API consumer secret

  • web_username (str, required) – Your E-Trade web username

  • web_password (str, required) – Your E-Trade web password

  • account_id (str, required) – Your E-Trade account ID

  • etrade_cookie (str, required) – Your E-Trade cookie

  • account_id_key (str, required) – Your E-Trade account ID key

  • strategy_name (str, required) – The name of the strategy to run

  • sandbox_key (str, optional) – Your E-Trade sandbox API key, defaults to None

  • sandbox_secret (str, optional) – Your E-Trade sandbox API secret, defaults to None

  • dev (bool, optional) – Whether to use the E-Trade sandbox, defaults to True

  • headless (bool, optional) – Whether to run the browser in headless mode, defaults to True

  • browser (str, optional) – The browser to use, defaults to ‘chrome’

  • preview (bool, optional) – Whether to preview the order, defaults to True

  • prints (bool, optional) – Whether to print the order, defaults to True

run()
Description:

This method runs the strategy and previews or executes the trades.

Returns:

The trade responses from E-Trade

Return type:

pd.DataFrame