(self, exchange, spot=True)
| 458 | return code |
| 459 | |
| 460 | def get_markets_from_exchange(self, exchange, spot=True): |
| 461 | res = {} |
| 462 | markets = exchange.markets |
| 463 | keys = list(markets.keys()) |
| 464 | for i in range(0, len(keys)): |
| 465 | key = keys[i] |
| 466 | market = markets[key] |
| 467 | if spot and market['spot']: |
| 468 | res[market['symbol']] = market |
| 469 | elif not spot and not market['spot']: |
| 470 | res[market['symbol']] = market |
| 471 | return res |
| 472 | |
| 473 | def get_valid_symbol(self, exchange, spot=True): |
| 474 | current_type_markets = self.get_markets_from_exchange(exchange, spot) |
no test coverage detected