ccxt 4.2.85__py2.py3-none-any.whl → 4.2.86__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

@@ -146,21 +146,23 @@ class bitbank(Exchange, ImplicitAPI):
146
146
  },
147
147
  'precisionMode': TICK_SIZE,
148
148
  'exceptions': {
149
- '20001': AuthenticationError,
150
- '20002': AuthenticationError,
151
- '20003': AuthenticationError,
152
- '20005': AuthenticationError,
153
- '20004': InvalidNonce,
154
- '40020': InvalidOrder,
155
- '40021': InvalidOrder,
156
- '40025': ExchangeError,
157
- '40013': OrderNotFound,
158
- '40014': OrderNotFound,
159
- '50008': PermissionDenied,
160
- '50009': OrderNotFound,
161
- '50010': OrderNotFound,
162
- '60001': InsufficientFunds,
163
- '60005': InvalidOrder,
149
+ 'exact': {
150
+ '20001': AuthenticationError,
151
+ '20002': AuthenticationError,
152
+ '20003': AuthenticationError,
153
+ '20005': AuthenticationError,
154
+ '20004': InvalidNonce,
155
+ '40020': InvalidOrder,
156
+ '40021': InvalidOrder,
157
+ '40025': ExchangeError,
158
+ '40013': OrderNotFound,
159
+ '40014': OrderNotFound,
160
+ '50008': PermissionDenied,
161
+ '50009': OrderNotFound,
162
+ '50010': OrderNotFound,
163
+ '60001': InsufficientFunds,
164
+ '60005': InvalidOrder,
165
+ },
164
166
  },
165
167
  })
166
168
 
@@ -944,12 +946,8 @@ class bitbank(Exchange, ImplicitAPI):
944
946
  '70009': 'We are currently temporarily restricting orders to be carried out. Please use the limit order.',
945
947
  '70010': 'We are temporarily raising the minimum order quantity system load is now rising.',
946
948
  }
947
- errorClasses = self.exceptions
948
949
  code = self.safe_string(data, 'code')
949
950
  message = self.safe_string(errorMessages, code, 'Error')
950
- ErrorClass = self.safe_value(errorClasses, code)
951
- if ErrorClass is not None:
952
- raise errorClasses[code](message)
953
- else:
954
- raise ExchangeError(self.id + ' ' + self.json(response))
951
+ self.throw_exactly_matched_exception(self.exceptions['exact'], code, message)
952
+ raise ExchangeError(self.id + ' ' + self.json(response))
955
953
  return None