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

Method handle_order_or_position_error

python/ccxt/weex.py:2755–2768  ·  view source on GitHub ↗
(self, errorCode: Str, errorMessage: Str, order: dict)

Source from the content-addressed store, hash-verified

2753 return self.safe_string(types, type, type)
2754
2755 def handle_order_or_position_error(self, errorCode: Str, errorMessage: Str, order: dict):
2756 if errorCode is None:
2757 errorCode = ''
2758 if errorMessage is None:
2759 errorMessage = ''
2760 if (errorCode == '') and (errorMessage == ''):
2761 # some endpoints could return an empty string if there is no error
2762 return
2763 feedback = self.id + ' ' + self.json(order)
2764 self.throw_exactly_matched_exception(self.exceptions['exact'], errorMessage, feedback)
2765 self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, feedback)
2766 self.throw_broadly_matched_exception(self.exceptions['broad'], errorMessage, feedback)
2767 self.throw_broadly_matched_exception(self.exceptions['broad'], errorCode, feedback)
2768 raise InvalidOrder(feedback)
2769
2770 def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2771 """

Callers 2

parse_orderMethod · 0.95
parse_positionMethod · 0.95

Calls 4

InvalidOrderClass · 0.90
jsonMethod · 0.45

Tested by

no test coverage detected