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

Method watch_orders

python/ccxt/pro/bithumb.py:452–481  ·  view source on GitHub ↗

watches information on multiple orders made by the user https://apidocs.bithumb.com/v2.1.5/reference/%EB%82%B4-%EC%A3%BC%EB%AC%B8-%EB%B0%8F-%EC%B2%B4%EA%B2%B0-myorder :param str symbol: unified market symbol of the market orders were made in :param int [since]: the

(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})

Source from the content-addressed store, hash-verified

450 return client
451
452 async def watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
453 """
454 watches information on multiple orders made by the user
455
456 https://apidocs.bithumb.com/v2.1.5/reference/%EB%82%B4-%EC%A3%BC%EB%AC%B8-%EB%B0%8F-%EC%B2%B4%EA%B2%B0-myorder
457
458 :param str symbol: unified market symbol of the market orders were made in
459 :param int [since]: the earliest time in ms to fetch orders for
460 :param int [limit]: the maximum number of order structures to retrieve
461 :param dict [params]: extra parameters specific to the exchange API endpoint
462 :param str[] [params.codes]: market codes to filter orders
463 :returns dict[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
464 """
465 await self.load_markets()
466 await self.authenticate()
467 url = self.urls['api']['ws']['privateV2']
468 messageHash = 'myOrder'
469 codes = self.safe_list(params, 'codes', [])
470 request = [
471 {'ticket': 'ccxt'},
472 {'type': messageHash, 'codes': codes},
473 ]
474 if symbol is not None:
475 market = self.market(symbol)
476 symbol = market['symbol']
477 messageHash = messageHash + ':' + symbol
478 orders = await self.watch(url, messageHash, request, messageHash)
479 if self.newUpdates:
480 limit = orders.getLimit(symbol, limit)
481 return self.filter_by_symbol_since_limit(orders, symbol, since, limit, True)
482
483 def handle_orders(self, client: Client, message):
484 #

Callers

nothing calls this directly

Calls 7

authenticateMethod · 0.95
safe_listMethod · 0.80
load_marketsMethod · 0.45
marketMethod · 0.45
watchMethod · 0.45
getLimitMethod · 0.45

Tested by

no test coverage detected