trade_api ========= .. py:module:: trade_api Classes ------- .. autoapisummary:: trade_api.Trade Module Contents --------------- .. py:class:: Trade(config, market_data_client, alpaca_account_client, live, predict_time, end_predict_time, fetch_data = True) .. py:exception:: LiveTradeError(error_type, message) Bases: :py:obj:`Exception` Custom exception for live trading errors. .. py:attribute:: OUT_OF_RANGE :value: 'OUT_OF_RANGE' .. py:attribute:: error_type .. py:attribute:: message .. py:attribute:: config .. py:attribute:: active_symbols .. py:attribute:: env_config .. py:attribute:: data_config .. py:attribute:: agent_config .. py:attribute:: portfolio_config .. py:attribute:: market_data_client .. py:attribute:: alpaca_account_client .. py:attribute:: feature_cfg .. py:attribute:: active_features .. py:attribute:: live .. py:attribute:: trading_client .. py:attribute:: env .. py:method:: __del__() .. py:method:: _load_data(predict_time, end_predict_time, fetch_data = True) .. py:method:: get_prices() .. py:method:: range_includes_open_markets(start, end) .. py:method:: run_model(predict_time, end_predict_time)