Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

Commit 258fa52

Browse files
committed
Merge branch 'feature/disable-fetch_tickers' into 'master'
Feature/disable fetch tickers See merge request ix.ai/crypto-exporter!84
2 parents 5b8d894 + 98c2bb3 commit 258fa52

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ docker run --rm -it -p 9999:9999 \
100100
| `NONCE` | `milliseconds` | NO | Some exchanges (looking at you, `coinbasepro`) don't support nonce in milliseconds, but want seconds |
101101
| `ENABLE_TICKERS` | `true` | NO | Set this to anything else in order to disable retrieving the ticker rates |
102102
| `ENABLE_TRANSACTIONS` | `false` | NO | Set this to `true` in order to enable retrieving the transaction totals. See also below [ENABLE_TRANSACTIONS](#enable-transactions) |
103+
| `DISABLE_FETCH_TICKERS` | `false` | NO | Set this to `true` in order to use the slower method for fetching the tickers instead. See also [Multiple Tickers For All Or Many Symbols](https://docs.ccxt.com/en/latest/manual.html#multiple-tickers-for-all-or-many-symbols) |
103104
| `SYMBOLS` | - | NO | See below for explanation ([SYMBOLS and REFERENCE_CURRENCIES](#symbols-and-referece_currencies)) |
104105
| `REFERENCE_CURRENCIES` | - | NO | See below for explanation ([SYMBOLS and REFERENCE_CURRENCIES](#symbols-and-referece_currencies)) |
105106
| `DEFAULT_EXCHANGE_TYPE` | - | NO | Some exchanges support multiple types (for example: binance supports `future`). You can set this here |

exporter/connectors/ccxt_connector.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ class CcxtConnector(Connector):
5050
'default': False,
5151
'mandatory': False,
5252
},
53+
'disable_fetch_tickers': {
54+
'key_type': 'bool',
55+
'default': False,
56+
'mandatory': False,
57+
},
5358
'symbols': {
5459
'key_type': 'list',
5560
'default': None,
@@ -264,7 +269,7 @@ def retrieve_tickers(self):
264269

265270
log.debug('Retrieving tickers')
266271
tickers = {}
267-
if self.__exchange.has['fetchTickers']:
272+
if self.__exchange.has['fetchTickers'] and not self.settings['disable_fetch_tickers']:
268273
tickers = self.__fetch_tickers()
269274
else:
270275
log.warning(constants.WARN_TICKER_SLOW_LOAD)

0 commit comments

Comments
 (0)