ccxt 4.3.56__py2.py3-none-any.whl → 4.3.58__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.

@@ -25,8 +25,7 @@ class coinone(Exchange, ImplicitAPI):
25
25
  'id': 'coinone',
26
26
  'name': 'CoinOne',
27
27
  'countries': ['KR'], # Korea
28
- # 'enableRateLimit': False,
29
- 'rateLimit': 667,
28
+ 'rateLimit': 50,
30
29
  'version': 'v2',
31
30
  'pro': False,
32
31
  'has': {
@@ -198,10 +197,10 @@ class coinone(Exchange, ImplicitAPI):
198
197
  },
199
198
  'precisionMode': TICK_SIZE,
200
199
  'exceptions': {
201
- '405': OnMaintenance, # {"errorCode":"405","status":"maintenance","result":"error"}
202
- '104': OrderNotFound, # {"errorCode":"104","errorMsg":"Order id is not exist","result":"error"}
203
- '108': BadSymbol, # {"errorCode":"108","errorMsg":"Unknown CryptoCurrency","result":"error"}
204
- '107': BadRequest, # {"errorCode":"107","errorMsg":"Parameter error","result":"error"}
200
+ '104': OrderNotFound,
201
+ '107': BadRequest,
202
+ '108': BadSymbol,
203
+ '405': OnMaintenance,
205
204
  },
206
205
  'commonCurrencies': {
207
206
  'SOC': 'Soda Coin',
@@ -1111,17 +1110,14 @@ class coinone(Exchange, ImplicitAPI):
1111
1110
 
1112
1111
  def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
1113
1112
  if response is None:
1114
- return None
1115
- if 'result' in response:
1116
- result = response['result']
1117
- if result != 'success':
1118
- #
1119
- # { "errorCode": "405", "status": "maintenance", "result": "error"}
1120
- #
1121
- errorCode = self.safe_string(response, 'errorCode')
1122
- feedback = self.id + ' ' + body
1123
- self.throw_exactly_matched_exception(self.exceptions, errorCode, feedback)
1124
- raise ExchangeError(feedback)
1125
- else:
1126
- raise ExchangeError(self.id + ' ' + body)
1113
+ return None # fallback to default error handler
1114
+ #
1115
+ # {"result":"error","error_code":"107","error_msg":"Parameter value is wrong"}
1116
+ # {"result":"error","error_code":"108","error_msg":"Unknown CryptoCurrency"}
1117
+ #
1118
+ errorCode = self.safe_string(response, 'error_code')
1119
+ if errorCode is not None and errorCode != '0':
1120
+ feedback = self.id + ' ' + body
1121
+ self.throw_exactly_matched_exception(self.exceptions, errorCode, feedback)
1122
+ raise ExchangeError(feedback) # unknown message
1127
1123
  return None
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.gate import ImplicitAPI
8
8
  import asyncio
9
9
  import hashlib
10
- from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Greeks, Int, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
10
+ from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Greeks, Int, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -100,6 +100,8 @@ class gate(Exchange, ImplicitAPI):
100
100
  'borrowIsolatedMargin': True,
101
101
  'cancelAllOrders': True,
102
102
  'cancelOrder': True,
103
+ 'cancelOrders': True,
104
+ 'cancelOrdersForSymbols': True,
103
105
  'createMarketBuyOrderWithCost': True,
104
106
  'createMarketOrder': True,
105
107
  'createMarketOrderWithCost': False,
@@ -3785,7 +3787,7 @@ class gate(Exchange, ImplicitAPI):
3785
3787
  if isMarketOrder:
3786
3788
  request['price'] = price # set to 0 for market orders
3787
3789
  else:
3788
- request['price'] = self.price_to_precision(symbol, price)
3790
+ request['price'] = '0' if (price == 0) else self.price_to_precision(symbol, price)
3789
3791
  if reduceOnly is not None:
3790
3792
  request['reduce_only'] = reduceOnly
3791
3793
  if timeInForce is not None:
@@ -3856,7 +3858,7 @@ class gate(Exchange, ImplicitAPI):
3856
3858
  'initial': {
3857
3859
  'contract': market['id'],
3858
3860
  'size': amount, # positive = buy, negative = sell, set to 0 to close the position
3859
- 'price': self.price_to_precision(symbol, price), # set to 0 to use market price
3861
+ # 'price': '0' if (price == 0) else self.price_to_precision(symbol, price), # set to 0 to use market price
3860
3862
  # 'close': False, # set to True if trying to close the position
3861
3863
  # 'tif': 'gtc', # gtc, ioc, if using market price, only ioc is supported
3862
3864
  # 'text': clientOrderId, # web, api, app
@@ -3864,6 +3866,10 @@ class gate(Exchange, ImplicitAPI):
3864
3866
  },
3865
3867
  'settle': market['settleId'],
3866
3868
  }
3869
+ if type == 'market':
3870
+ request['initial']['price'] = '0'
3871
+ else:
3872
+ request['initial']['price'] = '0' if (price == 0) else self.price_to_precision(symbol, price)
3867
3873
  if trigger is None:
3868
3874
  rule = None
3869
3875
  triggerOrderPrice = None
@@ -4185,6 +4191,8 @@ class gate(Exchange, ImplicitAPI):
4185
4191
  # "message": "Not enough balance"
4186
4192
  # }
4187
4193
  #
4194
+ # {"user_id":10406147,"id":"id","succeeded":false,"message":"INVALID_PROTOCOL","label":"INVALID_PROTOCOL"}
4195
+ #
4188
4196
  succeeded = self.safe_bool(order, 'succeeded', True)
4189
4197
  if not succeeded:
4190
4198
  # cancelOrders response
@@ -4192,6 +4200,7 @@ class gate(Exchange, ImplicitAPI):
4192
4200
  'clientOrderId': self.safe_string(order, 'text'),
4193
4201
  'info': order,
4194
4202
  'status': 'rejected',
4203
+ 'id': self.safe_string(order, 'id'),
4195
4204
  })
4196
4205
  put = self.safe_value_2(order, 'put', 'initial', {})
4197
4206
  trigger = self.safe_value(order, 'trigger', {})
@@ -4727,6 +4736,81 @@ class gate(Exchange, ImplicitAPI):
4727
4736
  #
4728
4737
  return self.parse_order(response, market)
4729
4738
 
4739
+ async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
4740
+ """
4741
+ cancel multiple orders
4742
+ :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
4743
+ :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
4744
+ :param str[] ids: order ids
4745
+ :param str symbol: unified symbol of the market the order was made in
4746
+ :param dict [params]: extra parameters specific to the exchange API endpoint
4747
+ :returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
4748
+ """
4749
+ await self.load_markets()
4750
+ market = None
4751
+ if symbol is not None:
4752
+ market = self.market(symbol)
4753
+ type = None
4754
+ defaultSettle = 'usdt' if (market is None) else market['settle']
4755
+ settle = self.safe_string_lower(params, 'settle', defaultSettle)
4756
+ type, params = self.handle_market_type_and_params('cancelOrders', market, params)
4757
+ isSpot = (type == 'spot')
4758
+ if isSpot and (symbol is None):
4759
+ raise ArgumentsRequired(self.id + ' cancelOrders requires a symbol argument for spot markets')
4760
+ if isSpot:
4761
+ ordersRequests = []
4762
+ for i in range(0, len(ids)):
4763
+ id = ids[i]
4764
+ orderItem: dict = {
4765
+ 'id': id,
4766
+ 'symbol': symbol,
4767
+ }
4768
+ ordersRequests.append(orderItem)
4769
+ return await self.cancel_orders_for_symbols(ordersRequests, params)
4770
+ request = {
4771
+ 'settle': settle,
4772
+ }
4773
+ finalList = [request] # hacky but needs to be done here
4774
+ for i in range(0, len(ids)):
4775
+ finalList.append(ids[i])
4776
+ response = await self.privateFuturesPostSettleBatchCancelOrders(finalList)
4777
+ return self.parse_orders(response)
4778
+
4779
+ async def cancel_orders_for_symbols(self, orders: List[CancellationRequest], params={}):
4780
+ """
4781
+ cancel multiple orders for multiple symbols
4782
+ :see: https://www.gate.io/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
4783
+ :param str[] ids: order ids
4784
+ :param str symbol: unified symbol of the market the order was made in
4785
+ :param dict [params]: extra parameters specific to the exchange API endpoint
4786
+ :param str[] [params.clientOrderIds]: client order ids
4787
+ :returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
4788
+ """
4789
+ await self.load_markets()
4790
+ ordersRequests = []
4791
+ for i in range(0, len(orders)):
4792
+ order = orders[i]
4793
+ symbol = self.safe_string(order, 'symbol')
4794
+ market = self.market(symbol)
4795
+ if not market['spot']:
4796
+ raise NotSupported(self.id + ' cancelOrdersForSymbols() supports only spot markets')
4797
+ id = self.safe_string(order, 'id')
4798
+ orderItem: dict = {
4799
+ 'id': id,
4800
+ 'currency_pair': market['id'],
4801
+ }
4802
+ ordersRequests.append(orderItem)
4803
+ response = await self.privateSpotPostCancelBatchOrders(ordersRequests)
4804
+ #
4805
+ # [
4806
+ # {
4807
+ # "currency_pair": "BTC_USDT",
4808
+ # "id": "123456"
4809
+ # }
4810
+ # ]
4811
+ #
4812
+ return self.parse_orders(response)
4813
+
4730
4814
  async def cancel_all_orders(self, symbol: Str = None, params={}):
4731
4815
  """
4732
4816
  cancel all open orders
@@ -5653,7 +5737,20 @@ class gate(Exchange, ImplicitAPI):
5653
5737
  authentication = api[0] # public, private
5654
5738
  type = api[1] # spot, margin, future, delivery
5655
5739
  query = self.omit(params, self.extract_params(path))
5656
- if isinstance(params, list):
5740
+ containsSettle = path.find('settle') > -1
5741
+ if containsSettle and path.endswith('batch_cancel_orders'): # weird check to prevent $settle in php and converting {settle} to array(settle)
5742
+ # special case where we need to extract the settle from the path
5743
+ # but the body is an array of strings
5744
+ settle = self.safe_dict(params, 0)
5745
+ path = self.implode_params(path, settle)
5746
+ # remove the first element from params
5747
+ newParams = []
5748
+ anyParams = params
5749
+ for i in range(1, len(anyParams)):
5750
+ newParams.append(params[i])
5751
+ params = newParams
5752
+ query = newParams
5753
+ elif isinstance(params, list):
5657
5754
  # endpoints like createOrders use an array instead of an object
5658
5755
  # so we infer the settle from one of the elements
5659
5756
  # they have to be all the same so relying on the first one is fine
@@ -7012,6 +7109,7 @@ class gate(Exchange, ImplicitAPI):
7012
7109
  # {"label": "INVALID_PARAM_VALUE", "message": "invalid argument: Trigger.rule"}
7013
7110
  # {"label": "INVALID_PARAM_VALUE", "message": "invalid argument: trigger.expiration invalid range"}
7014
7111
  # {"label": "INVALID_ARGUMENT", "detail": "invalid size"}
7112
+ # {"user_id":10406147,"id":"id","succeeded":false,"message":"INVALID_PROTOCOL","label":"INVALID_PROTOCOL"}
7015
7113
  #
7016
7114
  label = self.safe_string(response, 'label')
7017
7115
  if label is not None:
ccxt/async_support/htx.py CHANGED
@@ -3054,6 +3054,7 @@ class htx(Exchange, ImplicitAPI):
3054
3054
  instStatus = self.safe_string(entry, 'instStatus')
3055
3055
  currencyActive = instStatus == 'normal'
3056
3056
  minPrecision = None
3057
+ minDeposit = None
3057
3058
  minWithdraw = None
3058
3059
  maxWithdraw = None
3059
3060
  deposit = False
@@ -3065,6 +3066,7 @@ class htx(Exchange, ImplicitAPI):
3065
3066
  self.options['networkChainIdsByNames'][code][title] = uniqueChainId
3066
3067
  self.options['networkNamesByChainIds'][uniqueChainId] = title
3067
3068
  networkCode = self.network_id_to_code(uniqueChainId)
3069
+ minDeposit = self.safe_number(chainEntry, 'minDepositAmt')
3068
3070
  minWithdraw = self.safe_number(chainEntry, 'minWithdrawAmt')
3069
3071
  maxWithdraw = self.safe_number(chainEntry, 'maxWithdrawAmt')
3070
3072
  withdrawStatus = self.safe_string(chainEntry, 'withdrawStatus')
@@ -3084,7 +3086,7 @@ class htx(Exchange, ImplicitAPI):
3084
3086
  'network': networkCode,
3085
3087
  'limits': {
3086
3088
  'deposit': {
3087
- 'min': None,
3089
+ 'min': minDeposit,
3088
3090
  'max': None,
3089
3091
  },
3090
3092
  'withdraw': {
@@ -5522,7 +5524,62 @@ class htx(Exchange, ImplicitAPI):
5522
5524
  # "ts": 1604367997451
5523
5525
  # }
5524
5526
  #
5525
- return response
5527
+ data = self.safe_dict(response, 'data')
5528
+ return self.parse_cancel_orders(data)
5529
+
5530
+ def parse_cancel_orders(self, orders):
5531
+ #
5532
+ # {
5533
+ # "success": [
5534
+ # "5983466"
5535
+ # ],
5536
+ # "failed": [
5537
+ # {
5538
+ # "err-msg": "Incorrect order state",
5539
+ # "order-state": 7,
5540
+ # "order-id": "",
5541
+ # "err-code": "order-orderstate-error",
5542
+ # "client-order-id": "first"
5543
+ # },
5544
+ # ...
5545
+ # ]
5546
+ # }
5547
+ #
5548
+ # {
5549
+ # "errors": [
5550
+ # {
5551
+ # "order_id": "769206471845261312",
5552
+ # "err_code": 1061,
5553
+ # "err_msg": "This order doesnt exist."
5554
+ # }
5555
+ # ],
5556
+ # "successes": "1258075374411399168,1258075393254871040"
5557
+ # }
5558
+ #
5559
+ successes = self.safe_string(orders, 'successes')
5560
+ success = None
5561
+ if successes is not None:
5562
+ success = successes.split(',')
5563
+ else:
5564
+ success = self.safe_list(orders, 'success', [])
5565
+ failed = self.safe_list_2(orders, 'errors', 'failed', [])
5566
+ result = []
5567
+ for i in range(0, len(success)):
5568
+ order = success[i]
5569
+ result.append(self.safe_order({
5570
+ 'info': order,
5571
+ 'id': order,
5572
+ 'status': 'canceled',
5573
+ }))
5574
+ for i in range(0, len(failed)):
5575
+ order = failed[i]
5576
+ result.append(self.safe_order({
5577
+ 'info': order,
5578
+ 'id': self.safe_string_2(order, 'order-id', 'order_id'),
5579
+ 'status': 'failed',
5580
+ 'clientOrderId': self.safe_string(order, 'client-order-id'),
5581
+ }))
5582
+ return result
5526
5583
 
5527
5584
  async def cancel_all_orders(self, symbol: Str = None, params={}):
5528
5585
  """
@@ -5559,6 +5616,22 @@ class htx(Exchange, ImplicitAPI):
5559
5616
  if symbol is not None:
5560
5617
  request['symbol'] = market['id']
5561
5618
  response = await self.spotPrivatePostV1OrderOrdersBatchCancelOpenOrders(self.extend(request, params))
5619
+ #
5620
+ # {
5621
+ # "code": 200,
5622
+ # "data": {
5623
+ # "success-count": 2,
5624
+ # "failed-count": 0,
5625
+ # "next-id": 5454600
5626
+ # }
5627
+ # }
5628
+ #
5629
+ data = self.safe_dict(response, 'data')
5630
+ return [
5631
+ self.safe_order({
5632
+ 'info': data,
5633
+ }),
5634
+ ]
5562
5635
  else:
5563
5636
  if symbol is None:
5564
5637
  raise ArgumentsRequired(self.id + ' cancelAllOrders() requires a symbol argument')
@@ -5612,30 +5685,18 @@ class htx(Exchange, ImplicitAPI):
5612
5685
  response = await self.contractPrivatePostApiV1ContractCancelall(self.extend(request, params))
5613
5686
  else:
5614
5687
  raise NotSupported(self.id + ' cancelAllOrders() does not support ' + marketType + ' markets')
5615
- #
5616
- # spot
5617
- #
5618
- # {
5619
- # "code": 200,
5620
- # "data": {
5621
- # "success-count": 2,
5622
- # "failed-count": 0,
5623
- # "next-id": 5454600
5624
- # }
5625
- # }
5626
- #
5627
- # future and swap
5628
- #
5629
- # {
5630
- # "status": "ok",
5631
- # "data": {
5632
- # "errors": [],
5633
- # "successes": "1104754904426696704"
5634
- # },
5635
- # "ts": "1683435723755"
5636
- # }
5637
- #
5638
- return response
5688
+ #
5689
+ # {
5690
+ # "status": "ok",
5691
+ # "data": {
5692
+ # "errors": [],
5693
+ # "successes": "1104754904426696704"
5694
+ # },
5695
+ # "ts": "1683435723755"
5696
+ # }
5697
+ #
5698
+ data = self.safe_dict(response, 'data')
5699
+ return self.parse_cancel_orders(data)
5639
5700
 
5640
5701
  async def cancel_all_orders_after(self, timeout: Int, params={}):
5641
5702
  """
@@ -1468,7 +1468,61 @@ class huobijp(Exchange, ImplicitAPI):
1468
1468
  # }
1469
1469
  # }
1470
1470
  #
1471
- return response
1471
+ return self.parse_cancel_orders(response)
1472
+
1473
+ def parse_cancel_orders(self, orders):
1474
+ #
1475
+ # {
1476
+ # "success": [
1477
+ # "5983466"
1478
+ # ],
1479
+ # "failed": [
1480
+ # {
1481
+ # "err-msg": "Incorrect order state",
1482
+ # "order-state": 7,
1483
+ # "order-id": "",
1484
+ # "err-code": "order-orderstate-error",
1485
+ # "client-order-id": "first"
1486
+ # },
1487
+ # ...
1488
+ # ]
1489
+ # }
1490
+ #
1491
+ # {
1492
+ # "errors": [
1493
+ # {
1494
+ # "order_id": "769206471845261312",
1495
+ # "err_code": 1061,
1496
+ # "err_msg": "This order doesnt exist."
1497
+ # }
1498
+ # ],
1499
+ # "successes": "1258075374411399168,1258075393254871040"
1500
+ # }
1501
+ #
1502
+ successes = self.safe_string(orders, 'successes')
1503
+ success = None
1504
+ if successes is not None:
1505
+ success = successes.split(',')
1506
+ else:
1507
+ success = self.safe_list(orders, 'success', [])
1508
+ failed = self.safe_list_2(orders, 'errors', 'failed', [])
1509
+ result = []
1510
+ for i in range(0, len(success)):
1511
+ order = success[i]
1512
+ result.append(self.safe_order({
1513
+ 'info': order,
1514
+ 'id': order,
1515
+ 'status': 'canceled',
1516
+ }))
1517
+ for i in range(0, len(failed)):
1518
+ order = failed[i]
1519
+ result.append(self.safe_order({
1520
+ 'info': order,
1521
+ 'id': self.safe_string_2(order, 'order-id', 'order_id'),
1522
+ 'status': 'failed',
1523
+ 'clientOrderId': self.safe_string(order, 'client-order-id'),
1524
+ }))
1525
+ return result
1472
1526
 
1473
1527
  async def cancel_all_orders(self, symbol: Str = None, params={}):
1474
1528
  """
@@ -1500,7 +1554,12 @@ class huobijp(Exchange, ImplicitAPI):
1500
1554
  # }
1501
1555
  # }
1502
1556
  #
1503
- return response
1557
+ data = self.safe_dict(response, 'data', {})
1558
+ return [
1559
+ self.safe_order({
1560
+ 'info': data,
1561
+ }),
1562
+ ]
1504
1563
 
1505
1564
  def currency_to_precision(self, code, fee, networkCode=None):
1506
1565
  return self.decimal_to_precision(fee, 0, self.currencies[code]['precision'], self.precisionMode)
@@ -260,6 +260,8 @@ class kucoin(Exchange, ImplicitAPI):
260
260
  'purchase/orders': 10, # 10SW
261
261
  # broker
262
262
  'broker/api/rebase/download': 3,
263
+ # affiliate
264
+ 'affiliate/inviter/statistics': 30,
263
265
  },
264
266
  'post': {
265
267
  # account
@@ -701,6 +703,7 @@ class kucoin(Exchange, ImplicitAPI):
701
703
  'redeem/orders': 'v3',
702
704
  'purchase/orders': 'v3',
703
705
  'margin/symbols': 'v3',
706
+ 'affiliate/inviter/statistics': 'v2',
704
707
  },
705
708
  'POST': {
706
709
  # account
@@ -1344,7 +1344,11 @@ class latoken(Exchange, ImplicitAPI):
1344
1344
  # "status":"SUCCESS"
1345
1345
  # }
1346
1346
  #
1347
- return response
1347
+ return [
1348
+ self.safe_order({
1349
+ 'info': response,
1350
+ }),
1351
+ ]
1348
1352
 
1349
1353
  async def fetch_transactions(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1350
1354
  """
ccxt/async_support/okx.py CHANGED
@@ -6859,6 +6859,8 @@ class okx(Exchange, ImplicitAPI):
6859
6859
  depositWithdrawFees[code] = self.deposit_withdraw_fee({})
6860
6860
  depositWithdrawFees[code]['info'][currencyId] = feeInfo
6861
6861
  chain = self.safe_string(feeInfo, 'chain')
6862
+ if chain is None:
6863
+ continue
6862
6864
  chainSplit = chain.split('-')
6863
6865
  networkId = self.safe_value(chainSplit, 1)
6864
6866
  withdrawFee = self.safe_number(feeInfo, 'minFee')
ccxt/async_support/woo.py CHANGED
@@ -15,6 +15,7 @@ from ccxt.base.errors import ArgumentsRequired
15
15
  from ccxt.base.errors import BadRequest
16
16
  from ccxt.base.errors import InvalidOrder
17
17
  from ccxt.base.errors import NotSupported
18
+ from ccxt.base.errors import OperationFailed
18
19
  from ccxt.base.errors import RateLimitExceeded
19
20
  from ccxt.base.errors import OnMaintenance
20
21
  from ccxt.base.decimal_to_precision import TICK_SIZE
@@ -316,7 +317,7 @@ class woo(Exchange, ImplicitAPI):
316
317
  'commonCurrencies': {},
317
318
  'exceptions': {
318
319
  'exact': {
319
- '-1000': ExchangeError, # {"code": -1000, "message": "An unknown error occurred while processing the request"}
320
+ '-1000': OperationFailed, # {"code": -1000, "message": "An unknown error occurred while processing the request"} or {"success":false,"code":"-1000","message":"An internal error has occurred. We are unable to process your request. Please try again later."}
320
321
  '-1001': AuthenticationError, # {"code": -1001, "message": "The api key or secret is in wrong format"}
321
322
  '-1002': AuthenticationError, # {"code": -1002, "message": "API key or secret is invalid, it may because key have insufficient permission or the key is expired/revoked."}
322
323
  '-1003': RateLimitExceeded, # {"code": -1003, "message": "Rate limit exceed."}
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.56'
7
+ __version__ = '4.3.58'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/bigone.py CHANGED
@@ -1539,7 +1539,25 @@ class bigone(Exchange, ImplicitAPI):
1539
1539
  # }
1540
1540
  # }
1541
1541
  #
1542
- return response
1542
+ data = self.safe_dict(response, 'data', {})
1543
+ cancelled = self.safe_list(data, 'cancelled', [])
1544
+ failed = self.safe_list(data, 'failed', [])
1545
+ result = []
1546
+ for i in range(0, len(cancelled)):
1547
+ orderId = cancelled[i]
1548
+ result.append(self.safe_order({
1549
+ 'info': orderId,
1550
+ 'id': orderId,
1551
+ 'status': 'canceled',
1552
+ }))
1553
+ for i in range(0, len(failed)):
1554
+ orderId = failed[i]
1555
+ result.append(self.safe_order({
1556
+ 'info': orderId,
1557
+ 'id': orderId,
1558
+ 'status': 'failed',
1559
+ }))
1560
+ return result
1543
1561
 
1544
1562
  def fetch_order(self, id: str, symbol: Str = None, params={}):
1545
1563
  """