(self, exchange, method_name)
| 236 | return True |
| 237 | |
| 238 | def get_skips(self, exchange, method_name): |
| 239 | final_skips = {} |
| 240 | # check the exact method (i.e. `fetchTrades`) and language-specific (i.e. `fetchTrades.php`) |
| 241 | method_names = [method_name, method_name + '.' + self.ext] |
| 242 | for i in range(0, len(method_names)): |
| 243 | m_name = method_names[i] |
| 244 | if m_name in self.skipped_methods: |
| 245 | # if whole method is skipped, by assigning a string to it, i.e. "fetchOrders":"blabla" |
| 246 | if isinstance(self.skipped_methods[m_name], str): |
| 247 | return self.skipped_methods[m_name] |
| 248 | else: |
| 249 | final_skips = exchange.deep_extend(final_skips, self.skipped_methods[m_name]) |
| 250 | # get "object-specific" skips |
| 251 | object_skips = { |
| 252 | 'orderBook': ['fetchOrderBook', 'fetchOrderBooks', 'fetchL2OrderBook', 'watchOrderBook', 'watchOrderBookForSymbols'], |
| 253 | 'ticker': ['fetchTicker', 'fetchTickers', 'watchTicker', 'watchTickers'], |
| 254 | 'trade': ['fetchTrades', 'watchTrades', 'watchTradesForSymbols'], |
| 255 | 'ohlcv': ['fetchOHLCV', 'watchOHLCV', 'watchOHLCVForSymbols'], |
| 256 | 'ledger': ['fetchLedger', 'fetchLedgerEntry'], |
| 257 | 'depositWithdraw': ['fetchDepositsWithdrawals', 'fetchDeposits', 'fetchWithdrawals'], |
| 258 | 'depositWithdrawFee': ['fetchDepositWithdrawFee', 'fetchDepositWithdrawFees'], |
| 259 | } |
| 260 | object_names = list(object_skips.keys()) |
| 261 | for i in range(0, len(object_names)): |
| 262 | object_name = object_names[i] |
| 263 | object_methods = object_skips[object_name] |
| 264 | if exchange.in_array(method_name, object_methods): |
| 265 | # if whole object is skipped, by assigning a string to it, i.e. "orderBook":"blabla" |
| 266 | if (object_name in self.skipped_methods) and (isinstance(self.skipped_methods[object_name], str)): |
| 267 | return self.skipped_methods[object_name] |
| 268 | extra_skips = exchange.safe_dict(self.skipped_methods, object_name, {}) |
| 269 | final_skips = exchange.deep_extend(final_skips, extra_skips) |
| 270 | # extend related skips |
| 271 | # - if 'timestamp' is skipped, we should do so for 'datetime' too |
| 272 | # - if 'bid' is skipped, skip 'ask' too |
| 273 | if ('timestamp' in final_skips) and not ('datetime' in final_skips): |
| 274 | final_skips['datetime'] = final_skips['timestamp'] |
| 275 | if ('bid' in final_skips) and not ('ask' in final_skips): |
| 276 | final_skips['ask'] = final_skips['bid'] |
| 277 | if ('baseVolume' in final_skips) and not ('quoteVolume' in final_skips): |
| 278 | final_skips['quoteVolume'] = final_skips['baseVolume'] |
| 279 | return final_skips |
| 280 | |
| 281 | async def test_safe(self, method_name, exchange, args=[], is_public=False): |
| 282 | # `testSafe` method does not throw an exception, instead mutes it. The reason we |
no test coverage detected