mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-06 13:00:45 +08:00
Working on adjusted the DataPortal class (unstable)
This commit is contained in:
@@ -96,11 +96,15 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm):
|
||||
if self._symbol_lookup_date is not None \
|
||||
else self.sim_params.end_session
|
||||
|
||||
exchange = self.exchanges[exchange_name]
|
||||
if exchange_name is None:
|
||||
exchange = self.exchanges.values()[0]
|
||||
else:
|
||||
exchange = self.exchanges[exchange_name]
|
||||
|
||||
return self.asset_finder.lookup_symbol(
|
||||
symbol_str,
|
||||
as_of_date=_lookup_date,
|
||||
exchange=exchange
|
||||
symbol=symbol_str,
|
||||
exchange=exchange,
|
||||
as_of_date=_lookup_date
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ from catalyst.utils.factory import create_simulation_parameters
|
||||
import catalyst.utils.paths as pth
|
||||
|
||||
from catalyst.exchange.algorithm_exchange import ExchangeTradingAlgorithm
|
||||
from catalyst.exchange.data_portal_exchange import DataPortalExchange
|
||||
from catalyst.exchange.data_portal_exchange import DataPortalExchangeLive
|
||||
from catalyst.exchange.bitfinex.bitfinex import Bitfinex
|
||||
from catalyst.exchange.asset_finder_exchange import AssetFinderExchange
|
||||
from catalyst.exchange.exchange_portfolio import ExchangePortfolio
|
||||
@@ -209,7 +209,7 @@ def _run(handle_data,
|
||||
)
|
||||
env.asset_finder = AssetFinderExchange()
|
||||
|
||||
data = DataPortalExchange(
|
||||
data = DataPortalExchangeLive(
|
||||
exchanges=exchanges,
|
||||
asset_finder=env.asset_finder,
|
||||
trading_calendar=open_calendar,
|
||||
|
||||
Reference in New Issue
Block a user