From 24d7f52d46c05de3cddd4f5428bad1ef64ca9c51 Mon Sep 17 00:00:00 2001 From: Frederic Fortier Date: Fri, 29 Dec 2017 18:36:59 -0500 Subject: [PATCH] BLD: for issue #121, fixed typo --- catalyst/exchange/exchange_algorithm.py | 2 +- catalyst/exchange/exchange_data_portal.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/catalyst/exchange/exchange_algorithm.py b/catalyst/exchange/exchange_algorithm.py index fdb0373d..bffe7d1f 100644 --- a/catalyst/exchange/exchange_algorithm.py +++ b/catalyst/exchange/exchange_algorithm.py @@ -79,7 +79,7 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm): get_order_attempts=5, get_open_orders_attempts=5, cancel_order_attempts=5, - get_stop_value_attempts=5, + get_spot_value_attempts=5, get_history_window_attempts=5, retry_sleeptime=5, ) diff --git a/catalyst/exchange/exchange_data_portal.py b/catalyst/exchange/exchange_data_portal.py index 1e79e5b3..aaa38a5f 100644 --- a/catalyst/exchange/exchange_data_portal.py +++ b/catalyst/exchange/exchange_data_portal.py @@ -1,5 +1,4 @@ import abc -from time import sleep import numpy as np import pandas as pd @@ -12,7 +11,6 @@ from catalyst.data.data_portal import DataPortal from catalyst.exchange.exchange_bundle import ExchangeBundle from catalyst.exchange.exchange_errors import ( ExchangeRequestError, - ExchangeBarDataError, PricingDataNotLoadedError) from catalyst.exchange.utils.exchange_utils import get_frequency, \ resample_history_df, group_assets_by_exchange @@ -29,7 +27,7 @@ class DataPortalExchangeBase(DataPortal): self.retry_delay = 5 self.attempts = dict( - get_stop_value_attempts=5, + get_spot_value_attempts=5, get_history_window_attempts=5, retry_sleeptime=5, ) @@ -165,7 +163,7 @@ class DataPortalExchangeBase(DataPortal): return retry( action=self._get_spot_value, - attempts=self.attempts['get_stop_value_attempts'], + attempts=self.attempts['get_spot_value_attempts'], sleeptime=self.attempts['retry_sleeptime'], retry_exceptions=(ExchangeRequestError,), cleanup=lambda e: log.warn(