(self)
| 1531 | return True |
| 1532 | |
| 1533 | async def test_woo(self): |
| 1534 | exchange = self.init_offline_exchange('woo') |
| 1535 | # spot test |
| 1536 | id = 'bc830de7-50f3-460b-9ee0-f430f83f9dad' |
| 1537 | spot_order_request = None |
| 1538 | try: |
| 1539 | await exchange.create_order('BTC/USDT', 'limit', 'buy', 1, 20000) |
| 1540 | except Exception as e: |
| 1541 | spot_order_request = json_parse(exchange.last_request_body) |
| 1542 | broker_id = spot_order_request['broker_id'] |
| 1543 | id_string = str(id) |
| 1544 | assert broker_id.startswith(id_string), 'woo - broker_id: ' + broker_id + ' does not start with id: ' + id_string |
| 1545 | # swap test |
| 1546 | stop_order_request = None |
| 1547 | try: |
| 1548 | await exchange.create_order('BTC/USDT:USDT', 'limit', 'buy', 1, 20000, { |
| 1549 | 'stopPrice': 30000, |
| 1550 | }) |
| 1551 | except Exception as e: |
| 1552 | stop_order_request = json_parse(exchange.last_request_body) |
| 1553 | client_order_id_stop = stop_order_request['brokerId'] |
| 1554 | assert client_order_id_stop.startswith(id_string), 'woo - brokerId: ' + client_order_id_stop + ' does not start with id: ' + id_string |
| 1555 | if not is_sync(): |
| 1556 | await close(exchange) |
| 1557 | return True |
| 1558 | |
| 1559 | async def test_bitmart(self): |
| 1560 | exchange = self.init_offline_exchange('bitmart') |
no test coverage detected