MCPcopy Create free account
hub / github.com/ccxt/ccxt / test_phemex

Method test_phemex

python/ccxt/test/tests_async.py:1605–1618  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1603 return True
1604
1605 async def test_phemex(self):
1606 exchange = self.init_offline_exchange('phemex')
1607 id = 'CCXT123456'
1608 request = None
1609 try:
1610 await exchange.create_order('BTC/USDT', 'limit', 'buy', 1, 20000)
1611 except Exception as e:
1612 request = json_parse(exchange.last_request_body)
1613 client_order_id = request['clOrdID']
1614 id_string = str(id)
1615 assert client_order_id.startswith(id_string), 'phemex - clOrdID: ' + client_order_id + ' does not start with id: ' + id_string
1616 if not is_sync():
1617 await close(exchange)
1618 return True
1619
1620 async def test_blofin(self):
1621 exchange = self.init_offline_exchange('blofin')

Callers 1

run_broker_id_testsMethod · 0.95

Calls 5

init_offline_exchangeMethod · 0.95
json_parseFunction · 0.90
is_syncFunction · 0.90
closeFunction · 0.90
create_orderMethod · 0.45

Tested by

no test coverage detected