watches historical candlestick data containing the open, high, low, and close price, and the volume of a market https://ascendex.github.io/ascendex-pro-api/#channel-bar-data :param str symbol: unified symbol of the market to fetch OHLCV data for :param str timefram
(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={})
| 89 | return await self.watch(url, messageHash, message, channel) |
| 90 | |
| 91 | async def watch_ohlcv(self, symbol: str, timeframe: str = '1m', since: Int = None, limit: Int = None, params={}) -> List[list]: |
| 92 | """ |
| 93 | watches historical candlestick data containing the open, high, low, and close price, and the volume of a market |
| 94 | |
| 95 | https://ascendex.github.io/ascendex-pro-api/#channel-bar-data |
| 96 | |
| 97 | :param str symbol: unified symbol of the market to fetch OHLCV data for |
| 98 | :param str timeframe: the length of time each candle represents |
| 99 | :param int [since]: timestamp in ms of the earliest candle to fetch |
| 100 | :param int [limit]: the maximum amount of candles to fetch |
| 101 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 102 | :returns int[][]: A list of candles ordered, open, high, low, close, volume |
| 103 | """ |
| 104 | await self.load_markets() |
| 105 | market = self.market(symbol) |
| 106 | symbol = market['symbol'] |
| 107 | if (limit is None) or (limit > 1440): |
| 108 | limit = 100 |
| 109 | interval = self.safe_string(self.timeframes, timeframe, timeframe) |
| 110 | channel = 'bar' + ':' + interval + ':' + market['id'] |
| 111 | params = { |
| 112 | 'ch': channel, |
| 113 | } |
| 114 | ohlcv = await self.watch_public(channel, params) |
| 115 | if self.newUpdates: |
| 116 | limit = ohlcv.getLimit(symbol, limit) |
| 117 | return self.filter_by_since_limit(ohlcv, since, limit, 0, True) |
| 118 | |
| 119 | def handle_ohlcv(self, client: Client, message): |
| 120 | # |
nothing calls this directly
no test coverage detected