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

Method fetch_order

python/ccxt/bithumb.py:858–908  ·  view source on GitHub ↗

fetches information on an order made by the user https://apidocs.bithumb.com/v1.2.0/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%83%81%EC%84%B8-%EC%A1%B0%ED%9A%8C :param str id: order id :param str symbol: unified symbol of the market the o

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

Source from the content-addressed store, hash-verified

856 }, market)
857
858 def fetch_order(self, id: str, symbol: Str = None, params={}):
859 """
860 fetches information on an order made by the user
861
862 https://apidocs.bithumb.com/v1.2.0/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%83%81%EC%84%B8-%EC%A1%B0%ED%9A%8C
863
864 :param str id: order id
865 :param str symbol: unified symbol of the market the order was made in
866 :param dict [params]: extra parameters specific to the exchange API endpoint
867 :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
868 """
869 if symbol is None:
870 raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
871 self.load_markets()
872 market = self.market(symbol)
873 request = {
874 'order_id': id,
875 'count': 1,
876 'order_currency': market['base'],
877 'payment_currency': market['quote'],
878 }
879 response = self.privatePostInfoOrderDetail(self.extend(request, params))
880 #
881 # {
882 # "status": "0000",
883 # "data": {
884 # "order_date": "1603161798539254",
885 # "type": "ask",
886 # "order_status": "Cancel",
887 # "order_currency": "BTC",
888 # "payment_currency": "KRW",
889 # "watch_price": "0",
890 # "order_price": "13344000",
891 # "order_qty": "0.0125",
892 # "cancel_date": "1603161803809993",
893 # "cancel_type": "사용자취소",
894 # "contract": [
895 # {
896 # "transaction_date": "1603161799976383",
897 # "price": "13344000",
898 # "units": "0.0015",
899 # "fee_currency": "KRW",
900 # "fee": "0",
901 # "total": "20016"
902 # }
903 # ],
904 # }
905 # }
906 #
907 data = self.safe_dict(response, 'data')
908 return self.parse_order(self.extend(data, {'order_id': id}), market)
909
910 def parse_order_status(self, status: Str):
911 statuses = {

Callers

nothing calls this directly

Calls 7

parse_orderMethod · 0.95
ArgumentsRequiredClass · 0.90
safe_dictMethod · 0.80
load_marketsMethod · 0.45
marketMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected