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

Method test_bybit

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

Source from the content-addressed store, hash-verified

1389 return True
1390
1391 async def test_bybit(self):
1392 exchange = self.init_offline_exchange('bybit')
1393 req_headers = None
1394 id = 'CCXT'
1395 assert exchange.options['brokerId'] == id, 'id not in options'
1396 try:
1397 await exchange.create_order('BTC/USDT', 'limit', 'buy', 1, 20000)
1398 except Exception as e:
1399 # we expect an error here, we're only interested in the headers
1400 req_headers = exchange.last_request_headers
1401 assert req_headers['Referer'] == id, 'bybit - id: ' + id + ' not in headers.'
1402 if not is_sync():
1403 await close(exchange)
1404 return True
1405
1406 async def test_kucoin(self):
1407 exchange = self.init_offline_exchange('kucoin')

Callers 1

run_broker_id_testsMethod · 0.95

Calls 4

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

Tested by

no test coverage detected