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

Method spawn

python/ccxt/async_support/base/exchange.py:413–423  ·  view source on GitHub ↗
(self, method, *args)

Source from the content-addressed store, hash-verified

411 pass
412
413 def spawn(self, method, *args):
414 def callback(asyncio_future):
415 exception = asyncio_future.exception()
416 if exception is None:
417 future.resolve(asyncio_future.result())
418 else:
419 future.reject(exception)
420 future = Future()
421 task = self.asyncio_loop.create_task(method(*args))
422 task.add_done_callback(callback)
423 return future
424
425 # -----------------------------------------------------------------------
426 # WS/PRO code

Callers 15

handle_pingMethod · 0.45
set_positions_cacheMethod · 0.45
set_balance_cacheMethod · 0.45
set_positions_cacheMethod · 0.45
negotiateMethod · 0.45
handle_order_bookMethod · 0.45
handle_uta_order_bookMethod · 0.45
set_balance_cacheMethod · 0.45
set_positions_cacheMethod · 0.45

Calls 1

FutureClass · 0.90

Tested by 1

test_un_watch_positionsFunction · 0.36