Gets a list of OHLCV data for the given pair and exchange. Args: market_pair (str): The market pair to get the OHLCV data for. exchange (str): The exchange to get the OHLCV data for. candle_period (str): The timeperiod to collect for the given pair and ex
(self, market_pair, exchange, candle_period)
| 267 | |
| 268 | |
| 269 | def _get_historical_data(self, market_pair, exchange, candle_period): |
| 270 | """Gets a list of OHLCV data for the given pair and exchange. |
| 271 | |
| 272 | Args: |
| 273 | market_pair (str): The market pair to get the OHLCV data for. |
| 274 | exchange (str): The exchange to get the OHLCV data for. |
| 275 | candle_period (str): The timeperiod to collect for the given pair and exchange. |
| 276 | |
| 277 | Returns: |
| 278 | list: A list of OHLCV data. |
| 279 | """ |
| 280 | |
| 281 | historical_data = list() |
| 282 | try: |
| 283 | historical_data = self.exchange_interface.get_historical_data( |
| 284 | market_pair, |
| 285 | exchange, |
| 286 | candle_period |
| 287 | ) |
| 288 | except RetryError: |
| 289 | self.logger.error( |
| 290 | 'Too many retries fetching information for pair %s, skipping', |
| 291 | market_pair |
| 292 | ) |
| 293 | except ExchangeError: |
| 294 | self.logger.error( |
| 295 | 'Exchange supplied bad data for pair %s, skipping', |
| 296 | market_pair |
| 297 | ) |
| 298 | except ValueError as e: |
| 299 | self.logger.error(e) |
| 300 | self.logger.error( |
| 301 | 'Invalid data encountered while processing pair %s, skipping', |
| 302 | market_pair |
| 303 | ) |
| 304 | self.logger.debug(traceback.format_exc()) |
| 305 | except AttributeError: |
| 306 | self.logger.error( |
| 307 | 'Something went wrong fetching data for %s, skipping', |
| 308 | market_pair |
| 309 | ) |
| 310 | self.logger.debug(traceback.format_exc()) |
| 311 | return historical_data |
| 312 | |
| 313 | |
| 314 | def _get_analysis_result(self, dispatcher, indicator, dispatcher_args, market_pair): |
no test coverage detected