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

Method fetch_order

python/ccxt/bit2c.py:591–622  ·  view source on GitHub ↗

fetches information on an order made by the user https://bit2c.co.il/home/api#getoid :param str id: the order id :param str symbol: unified market symbol :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict: An

(self, id: str, symbol: Str = None, params={})

Source from the content-addressed store, hash-verified

589 return self.parse_orders(self.array_concat(asks, bids), market, since, limit)
590
591 def fetch_order(self, id: str, symbol: Str = None, params={}):
592 """
593 fetches information on an order made by the user
594
595 https://bit2c.co.il/home/api#getoid
596
597 :param str id: the order id
598 :param str symbol: unified market symbol
599 :param dict [params]: extra parameters specific to the exchange API endpoint
600 :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
601 """
602 self.load_markets()
603 market = self.market(symbol)
604 request = {
605 'id': id,
606 }
607 response = self.privateGetOrderGetById(self.extend(request, params))
608 #
609 # {
610 # "pair": "BtcNis",
611 # "status": "Completed",
612 # "created": 1666689837,
613 # "type": 0,
614 # "order_type": 0,
615 # "amount": 0.00000000,
616 # "price": 50000.00000000,
617 # "stop": 0,
618 # "id": 10951473,
619 # "initialAmount": 2.00000000
620 # }
621 #
622 return self.parse_order(response, market)
623
624 def parse_order(self, order: dict, market: Market = None) -> Order:
625 #

Callers

nothing calls this directly

Calls 5

parse_orderMethod · 0.95
load_marketsMethod · 0.45
marketMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected