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

Method test_bitmart

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

Source from the content-addressed store, hash-verified

1557 return True
1558
1559 async def test_bitmart(self):
1560 exchange = self.init_offline_exchange('bitmart')
1561 req_headers = None
1562 id = 'CCXTxBitmart000'
1563 assert exchange.options['brokerId'] == id, 'bitmart - id: ' + id + ' not in options'
1564 await exchange.load_markets()
1565 try:
1566 await exchange.create_order('BTC/USDT', 'limit', 'buy', 1, 20000)
1567 except Exception as e:
1568 req_headers = exchange.last_request_headers
1569 assert req_headers['X-BM-BROKER-ID'] == id, 'bitmart - id: ' + id + ' not in headers'
1570 if not is_sync():
1571 await close(exchange)
1572 return True
1573
1574 async def test_coinex(self):
1575 exchange = self.init_offline_exchange('coinex')

Callers 1

run_broker_id_testsMethod · 0.95

Calls 5

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

Tested by

no test coverage detected