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

@@ -21,7 +21,6 @@ from ccxt.base.errors import InvalidOrder
21
21
  from ccxt.base.errors import OrderNotFound
22
22
  from ccxt.base.errors import CancelPending
23
23
  from ccxt.base.errors import DuplicateOrderId
24
- from ccxt.base.errors import NotSupported
25
24
  from ccxt.base.errors import DDoSProtection
26
25
  from ccxt.base.errors import RateLimitExceeded
27
26
  from ccxt.base.decimal_to_precision import TICK_SIZE
@@ -2772,6 +2771,7 @@ class phemex(Exchange, ImplicitAPI):
2772
2771
 
2773
2772
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
2774
2773
  """
2774
+ :see: https://phemex-docs.github.io/#query-orders-by-ids
2775
2775
  fetches information on an order made by the user
2776
2776
  :param str symbol: unified symbol of the market the order was made in
2777
2777
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -2781,8 +2781,6 @@ class phemex(Exchange, ImplicitAPI):
2781
2781
  raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
2782
2782
  await self.load_markets()
2783
2783
  market = self.market(symbol)
2784
- if market['settle'] == 'USDT':
2785
- raise NotSupported(self.id + 'fetchOrder() is not supported yet for USDT settled swap markets') # https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#query-user-order-by-orderid-or-query-user-order-by-client-order-id
2786
2784
  request: dict = {
2787
2785
  'symbol': market['id'],
2788
2786
  }
@@ -2793,7 +2791,9 @@ class phemex(Exchange, ImplicitAPI):
2793
2791
  else:
2794
2792
  request['orderID'] = id
2795
2793
  response = None
2796
- if market['spot']:
2794
+ if market['settle'] == 'USDT':
2795
+ response = await self.privateGetApiDataGFuturesOrdersByOrderId(self.extend(request, params))
2796
+ elif market['spot']:
2797
2797
  response = await self.privateGetSpotOrdersActive(self.extend(request, params))
2798
2798
  else:
2799
2799
  response = await self.privateGetExchangeOrder(self.extend(request, params))
@@ -9,6 +9,7 @@ from ccxt.base.types import IndexType, Int, Market, Num, Order, OrderSide, Order
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import AuthenticationError
12
+ from ccxt.base.errors import ArgumentsRequired
12
13
  from ccxt.base.errors import BadRequest
13
14
  from ccxt.base.errors import InsufficientFunds
14
15
  from ccxt.base.decimal_to_precision import TICK_SIZE
@@ -441,7 +442,7 @@ class tradeogre(Exchange, ImplicitAPI):
441
442
  """
442
443
  create a trade order
443
444
  :param str symbol: unified symbol of the market to create an order in
444
- :param str type: not used by tradeogre
445
+ :param str type: must be 'limit'
445
446
  :param str side: 'buy' or 'sell'
446
447
  :param float amount: how much of currency you want to trade in units of base currency
447
448
  :param float price: the price at which the order is to be fullfilled, in units of the quote currency
@@ -450,13 +451,15 @@ class tradeogre(Exchange, ImplicitAPI):
450
451
  """
451
452
  await self.load_markets()
452
453
  market = self.market(symbol)
454
+ if type == 'market':
455
+ raise BadRequest(self.id + ' createOrder does not support market orders')
456
+ if price is None:
457
+ raise ArgumentsRequired(self.id + ' createOrder requires a limit parameter')
453
458
  request: dict = {
454
459
  'market': market['id'],
455
460
  'quantity': self.parse_to_numeric(self.amount_to_precision(symbol, amount)),
456
461
  'price': self.parse_to_numeric(self.price_to_precision(symbol, price)),
457
462
  }
458
- if type == 'market':
459
- raise BadRequest(self.id + ' createOrder does not support market orders')
460
463
  response = None
461
464
  if side == 'buy':
462
465
  response = await self.privatePostOrderBuy(self.extend(request, params))
@@ -487,7 +490,10 @@ class tradeogre(Exchange, ImplicitAPI):
487
490
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
488
491
  """
489
492
  await self.load_markets()
490
- return await self.cancel_order('all', symbol, params)
493
+ response = await self.cancel_order('all', symbol, params)
494
+ return [
495
+ response,
496
+ ]
491
497
 
492
498
  async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
493
499
  """
@@ -1422,7 +1422,7 @@ class wavesexchange(Exchange, ImplicitAPI):
1422
1422
  firstMessage = self.safe_value(message, 0)
1423
1423
  firstOrder = self.safe_value(firstMessage, 0)
1424
1424
  returnedId = self.safe_string(firstOrder, 'orderId')
1425
- return {
1425
+ return self.safe_order({
1426
1426
  'info': response,
1427
1427
  'id': returnedId,
1428
1428
  'clientOrderId': None,
@@ -1441,7 +1441,7 @@ class wavesexchange(Exchange, ImplicitAPI):
1441
1441
  'status': None,
1442
1442
  'fee': None,
1443
1443
  'trades': None,
1444
- }
1444
+ })
1445
1445
 
1446
1446
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
1447
1447
  """
@@ -763,7 +763,26 @@ class wazirx(Exchange, ImplicitAPI):
763
763
  request: dict = {
764
764
  'symbol': market['id'],
765
765
  }
766
- return await self.privateDeleteOpenOrders(self.extend(request, params))
766
+ response = await self.privateDeleteOpenOrders(self.extend(request, params))
767
+ #
768
+ # [
769
+ # {
770
+ # id: "4565421197",
771
+ # symbol: "adausdt",
772
+ # type: "limit",
773
+ # side: "buy",
774
+ # status: "wait",
775
+ # price: "0.41",
776
+ # origQty: "11.00",
777
+ # executedQty: "0.00",
778
+ # avgPrice: "0.00",
779
+ # createdTime: "1718089507000",
780
+ # updatedTime: "1718089507000",
781
+ # clientOrderId: "93d2a838-e272-405d-91e7-3a7bc6d3a003"
782
+ # }
783
+ # ]
784
+ #
785
+ return self.parse_orders(response)
767
786
 
768
787
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
769
788
  """
@@ -831,18 +850,22 @@ class wazirx(Exchange, ImplicitAPI):
831
850
  return self.parse_order(response, market)
832
851
 
833
852
  def parse_order(self, order: dict, market: Market = None) -> Order:
834
- # {
835
- # "id":1949417813,
836
- # "symbol":"ltcusdt",
837
- # "type":"limit",
838
- # "side":"sell",
839
- # "status":"done",
840
- # "price":"146.2",
841
- # "origQty":"0.05",
842
- # "executedQty":"0.05",
843
- # "createdTime":1641252564000,
844
- # "updatedTime":1641252564000
845
- # },
853
+ #
854
+ # {
855
+ # "id": 1949417813,
856
+ # "symbol": "ltcusdt",
857
+ # "type": "limit",
858
+ # "side": "sell",
859
+ # "status": "done",
860
+ # "price": "146.2",
861
+ # "origQty": "0.05",
862
+ # "executedQty": "0.05",
863
+ # "avgPrice": "0.00",
864
+ # "createdTime": 1641252564000,
865
+ # "updatedTime": 1641252564000
866
+ # "clientOrderId": "93d2a838-e272-405d-91e7-3a7bc6d3a003"
867
+ # }
868
+ #
846
869
  created = self.safe_integer(order, 'createdTime')
847
870
  updated = self.safe_integer(order, 'updatedTime')
848
871
  marketId = self.safe_string(order, 'symbol')
@@ -857,7 +880,7 @@ class wazirx(Exchange, ImplicitAPI):
857
880
  return self.safe_order({
858
881
  'info': order,
859
882
  'id': id,
860
- 'clientOrderId': None,
883
+ 'clientOrderId': self.safe_string(order, 'clientOrderId'),
861
884
  'timestamp': created,
862
885
  'datetime': self.iso8601(created),
863
886
  'lastTradeTimestamp': updated,
@@ -873,7 +896,7 @@ class wazirx(Exchange, ImplicitAPI):
873
896
  'remaining': None,
874
897
  'cost': None,
875
898
  'fee': None,
876
- 'average': None,
899
+ 'average': self.safe_string(order, 'avgPrice'),
877
900
  'trades': [],
878
901
  }, market)
879
902
 
@@ -449,6 +449,13 @@ class zonda(Exchange, ImplicitAPI):
449
449
  # "secondBalanceId": "ab43023b-4079-414c-b340-056e3430a3af"
450
450
  # }
451
451
  #
452
+ # cancelOrder
453
+ #
454
+ # {
455
+ # status: "Ok",
456
+ # errors: []
457
+ # }
458
+ #
452
459
  marketId = self.safe_string(order, 'market')
453
460
  symbol = self.safe_symbol(marketId, market, '-')
454
461
  timestamp = self.safe_integer(order, 'time')
@@ -1455,9 +1462,10 @@ class zonda(Exchange, ImplicitAPI):
1455
1462
  'side': side,
1456
1463
  'price': price,
1457
1464
  }
1465
+ response = await self.v1_01PrivateDeleteTradingOfferSymbolIdSidePrice(self.extend(request, params))
1458
1466
  # {status: "Fail", errors: ["NOT_RECOGNIZED_OFFER_TYPE"]} -- if required params are missing
1459
1467
  # {status: "Ok", errors: []}
1460
- return await self.v1_01PrivateDeleteTradingOfferSymbolIdSidePrice(self.extend(request, params))
1468
+ return self.parse_order(response)
1461
1469
 
1462
1470
  def is_fiat(self, currency):
1463
1471
  fiatCurrencies: dict = {
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.42'
7
+ __version__ = '4.3.43'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/binance.py CHANGED
@@ -7556,8 +7556,56 @@ class binance(Exchange, ImplicitAPI):
7556
7556
  # "tranId": 43000126248
7557
7557
  # }
7558
7558
  #
7559
- id = self.safe_string(transfer, 'tranId')
7560
- currencyId = self.safe_string(transfer, 'asset')
7559
+ # {
7560
+ # "orderType": "C2C", # Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment), REMITTANCE(Send cash)
7561
+ # "transactionId": "M_P_71505104267788288",
7562
+ # "transactionTime": 1610090460133, #trade timestamp
7563
+ # "amount": "23.72469206", #order amount(up to 8 decimal places), positive is income, negative is expenditure
7564
+ # "currency": "BNB",
7565
+ # "walletType": 1, #main wallet type, 1 for funding wallet, 2 for spot wallet, 3 for fiat wallet, 4 or 6 for card payment, 5 for earn wallet
7566
+ # "walletTypes": [1,2], #array format,there are multiple values when using combination payment
7567
+ # "fundsDetail": [ # details
7568
+ # {
7569
+ # "currency": "USDT", #asset
7570
+ # "amount": "1.2",
7571
+ # "walletAssetCost":[ #details of asset cost per wallet
7572
+ # {"1":"0.6"},
7573
+ # {"2":"0.6"}
7574
+ # ]
7575
+ # },
7576
+ # {
7577
+ # "currency": "ETH",
7578
+ # "amount": "0.0001",
7579
+ # "walletAssetCost":[
7580
+ # {"1":"0.00005"},
7581
+ # {"2":"0.00005"}
7582
+ # ]
7583
+ # }
7584
+ # ],
7585
+ # "payerInfo":{
7586
+ # "name":"Jack", #nickname or merchant name
7587
+ # "type":"USER", #account type,USER for personal,MERCHANT for merchant
7588
+ # "binanceId":"12345678", #binance uid
7589
+ # "accountId":"67736251" #binance pay id
7590
+ # },
7591
+ # "receiverInfo":{
7592
+ # "name":"Alan", #nickname or merchant name
7593
+ # "type":"MERCHANT", #account type,USER for personal,MERCHANT for merchant
7594
+ # "email":"alan@binance.com", #email
7595
+ # "binanceId":"34355667", #binance uid
7596
+ # "accountId":"21326891", #binance pay id
7597
+ # "countryCode":"1", #International area code
7598
+ # "phoneNumber":"8057651210",
7599
+ # "mobileCode":"US", #country code
7600
+ # "extend":[ #extension field
7601
+ # "institutionName": "",
7602
+ # "cardNumber": "",
7603
+ # "digitalWalletId": ""
7604
+ # ]
7605
+ # }
7606
+ # }
7607
+ id = self.safe_string_2(transfer, 'tranId', 'transactionId')
7608
+ currencyId = self.safe_string_2(transfer, 'asset', 'currency')
7561
7609
  code = self.safe_currency_code(currencyId, currency)
7562
7610
  amount = self.safe_number(transfer, 'amount')
7563
7611
  type = self.safe_string(transfer, 'type')
@@ -7570,7 +7618,13 @@ class binance(Exchange, ImplicitAPI):
7570
7618
  toAccount = self.safe_value(parts, 1)
7571
7619
  fromAccount = self.safe_string(accountsById, fromAccount, fromAccount)
7572
7620
  toAccount = self.safe_string(accountsById, toAccount, toAccount)
7573
- timestamp = self.safe_integer(transfer, 'timestamp')
7621
+ walletType = self.safe_integer(transfer, 'walletType')
7622
+ if walletType is not None:
7623
+ payer = self.safe_dict(transfer, 'payerInfo', {})
7624
+ receiver = self.safe_dict(transfer, 'receiverInfo', {})
7625
+ fromAccount = self.safe_string(payer, 'accountId')
7626
+ toAccount = self.safe_string(receiver, 'accountId')
7627
+ timestamp = self.safe_integer_2(transfer, 'timestamp', 'transactionTime')
7574
7628
  status = self.parse_transfer_status(self.safe_string(transfer, 'status'))
7575
7629
  return {
7576
7630
  'info': transfer,
@@ -7699,66 +7753,133 @@ class binance(Exchange, ImplicitAPI):
7699
7753
  """
7700
7754
  fetch a history of internal transfers made on an account
7701
7755
  :see: https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history-user_data
7756
+ :see: https://binance-docs.github.io/apidocs/spot/en/#pay-endpoints
7702
7757
  :param str code: unified currency code of the currency transferred
7703
7758
  :param int [since]: the earliest time in ms to fetch transfers for
7704
7759
  :param int [limit]: the maximum number of transfers structures to retrieve
7705
7760
  :param dict [params]: extra parameters specific to the exchange API endpoint
7706
7761
  :param int [params.until]: the latest time in ms to fetch transfers for
7707
7762
  :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
7763
+ :param boolean [params.internal]: default False, when True will fetch pay trade history
7708
7764
  :returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
7709
7765
  """
7710
7766
  self.load_markets()
7767
+ internal = self.safe_bool(params, 'internal')
7768
+ params = self.omit(params, 'internal')
7711
7769
  paginate = False
7712
7770
  paginate, params = self.handle_option_and_params(params, 'fetchTransfers', 'paginate')
7713
- if paginate:
7771
+ if paginate and not internal:
7714
7772
  return self.fetch_paginated_call_dynamic('fetchTransfers', code, since, limit, params)
7715
7773
  currency = None
7716
7774
  if code is not None:
7717
7775
  currency = self.currency(code)
7718
- defaultType = self.safe_string_2(self.options, 'fetchTransfers', 'defaultType', 'spot')
7719
- fromAccount = self.safe_string(params, 'fromAccount', defaultType)
7720
- defaultTo = 'spot' if (fromAccount == 'future') else 'future'
7721
- toAccount = self.safe_string(params, 'toAccount', defaultTo)
7722
- type = self.safe_string(params, 'type')
7723
- accountsByType = self.safe_dict(self.options, 'accountsByType', {})
7724
- fromId = self.safe_string(accountsByType, fromAccount)
7725
- toId = self.safe_string(accountsByType, toAccount)
7726
- if type is None:
7727
- if fromId is None:
7728
- keys = list(accountsByType.keys())
7729
- raise ExchangeError(self.id + ' fromAccount parameter must be one of ' + ', '.join(keys))
7730
- if toId is None:
7731
- keys = list(accountsByType.keys())
7732
- raise ExchangeError(self.id + ' toAccount parameter must be one of ' + ', '.join(keys))
7733
- type = fromId + '_' + toId
7734
- request: dict = {
7735
- 'type': type,
7736
- }
7776
+ request: dict = {}
7777
+ limitKey = 'limit'
7778
+ if not internal:
7779
+ defaultType = self.safe_string_2(self.options, 'fetchTransfers', 'defaultType', 'spot')
7780
+ fromAccount = self.safe_string(params, 'fromAccount', defaultType)
7781
+ defaultTo = 'spot' if (fromAccount == 'future') else 'future'
7782
+ toAccount = self.safe_string(params, 'toAccount', defaultTo)
7783
+ type = self.safe_string(params, 'type')
7784
+ accountsByType = self.safe_dict(self.options, 'accountsByType', {})
7785
+ fromId = self.safe_string(accountsByType, fromAccount)
7786
+ toId = self.safe_string(accountsByType, toAccount)
7787
+ if type is None:
7788
+ if fromId is None:
7789
+ keys = list(accountsByType.keys())
7790
+ raise ExchangeError(self.id + ' fromAccount parameter must be one of ' + ', '.join(keys))
7791
+ if toId is None:
7792
+ keys = list(accountsByType.keys())
7793
+ raise ExchangeError(self.id + ' toAccount parameter must be one of ' + ', '.join(keys))
7794
+ type = fromId + '_' + toId
7795
+ request['type'] = type
7796
+ limitKey = 'size'
7797
+ if limit is not None:
7798
+ request[limitKey] = limit
7737
7799
  if since is not None:
7738
7800
  request['startTime'] = since
7739
- if limit is not None:
7740
- request['size'] = limit
7741
7801
  until = self.safe_integer(params, 'until')
7742
7802
  if until is not None:
7743
7803
  params = self.omit(params, 'until')
7744
7804
  request['endTime'] = until
7745
- response = self.sapiGetAssetTransfer(self.extend(request, params))
7746
- #
7747
- # {
7748
- # "total": 3,
7749
- # "rows": [
7750
- # {
7751
- # "timestamp": 1614640878000,
7752
- # "asset": "USDT",
7753
- # "amount": "25",
7754
- # "type": "MAIN_UMFUTURE",
7755
- # "status": "CONFIRMED",
7756
- # "tranId": 43000126248
7757
- # },
7758
- # ]
7759
- # }
7760
- #
7761
- rows = self.safe_list(response, 'rows', [])
7805
+ response = None
7806
+ if internal:
7807
+ response = self.sapiGetPayTransactions(self.extend(request, params))
7808
+ #
7809
+ # {
7810
+ # "code": "000000",
7811
+ # "message": "success",
7812
+ # "data": [
7813
+ # {
7814
+ # "orderType": "C2C", # Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment), REMITTANCE(Send cash)
7815
+ # "transactionId": "M_P_71505104267788288",
7816
+ # "transactionTime": 1610090460133, #trade timestamp
7817
+ # "amount": "23.72469206", #order amount(up to 8 decimal places), positive is income, negative is expenditure
7818
+ # "currency": "BNB",
7819
+ # "walletType": 1, #main wallet type, 1 for funding wallet, 2 for spot wallet, 3 for fiat wallet, 4 or 6 for card payment, 5 for earn wallet
7820
+ # "walletTypes": [1,2], #array format,there are multiple values when using combination payment
7821
+ # "fundsDetail": [ # details
7822
+ # {
7823
+ # "currency": "USDT", #asset
7824
+ # "amount": "1.2",
7825
+ # "walletAssetCost":[ #details of asset cost per wallet
7826
+ # {"1":"0.6"},
7827
+ # {"2":"0.6"}
7828
+ # ]
7829
+ # },
7830
+ # {
7831
+ # "currency": "ETH",
7832
+ # "amount": "0.0001",
7833
+ # "walletAssetCost":[
7834
+ # {"1":"0.00005"},
7835
+ # {"2":"0.00005"}
7836
+ # ]
7837
+ # }
7838
+ # ],
7839
+ # "payerInfo":{
7840
+ # "name":"Jack", #nickname or merchant name
7841
+ # "type":"USER", #account type,USER for personal,MERCHANT for merchant
7842
+ # "binanceId":"12345678", #binance uid
7843
+ # "accountId":"67736251" #binance pay id
7844
+ # },
7845
+ # "receiverInfo":{
7846
+ # "name":"Alan", #nickname or merchant name
7847
+ # "type":"MERCHANT", #account type,USER for personal,MERCHANT for merchant
7848
+ # "email":"alan@binance.com", #email
7849
+ # "binanceId":"34355667", #binance uid
7850
+ # "accountId":"21326891", #binance pay id
7851
+ # "countryCode":"1", #International area code
7852
+ # "phoneNumber":"8057651210",
7853
+ # "mobileCode":"US", #country code
7854
+ # "extend":[ #extension field
7855
+ # "institutionName": "",
7856
+ # "cardNumber": "",
7857
+ # "digitalWalletId": ""
7858
+ # ]
7859
+ # }
7860
+ # }
7861
+ # ],
7862
+ # "success": True
7863
+ # }
7864
+ #
7865
+ else:
7866
+ response = self.sapiGetAssetTransfer(self.extend(request, params))
7867
+ #
7868
+ # {
7869
+ # "total": 3,
7870
+ # "rows": [
7871
+ # {
7872
+ # "timestamp": 1614640878000,
7873
+ # "asset": "USDT",
7874
+ # "amount": "25",
7875
+ # "type": "MAIN_UMFUTURE",
7876
+ # "status": "CONFIRMED",
7877
+ # "tranId": 43000126248
7878
+ # },
7879
+ # ]
7880
+ # }
7881
+ #
7882
+ rows = self.safe_list_2(response, 'rows', 'data', [])
7762
7883
  return self.parse_transfers(rows, currency, since, limit)
7763
7884
 
7764
7885
  def fetch_deposit_address(self, code: str, params={}):
ccxt/btcmarkets.py CHANGED
@@ -855,7 +855,29 @@ class btcmarkets(Exchange, ImplicitAPI):
855
855
  request: dict = {
856
856
  'ids': ids,
857
857
  }
858
- return self.privateDeleteBatchordersIds(self.extend(request, params))
858
+ response = self.privateDeleteBatchordersIds(self.extend(request, params))
859
+ #
860
+ # {
861
+ # "cancelOrders": [
862
+ # {
863
+ # "orderId": "414186",
864
+ # "clientOrderId": "6"
865
+ # },
866
+ # ...
867
+ # ],
868
+ # "unprocessedRequests": [
869
+ # {
870
+ # "code": "OrderAlreadyCancelled",
871
+ # "message": "order is already cancelled.",
872
+ # "requestId": "1"
873
+ # }
874
+ # ]
875
+ # }
876
+ #
877
+ cancelOrders = self.safe_list(response, 'cancelOrders', [])
878
+ unprocessedRequests = self.safe_list(response, 'unprocessedRequests', [])
879
+ orders = self.array_concat(cancelOrders, unprocessedRequests)
880
+ return self.parse_orders(orders)
859
881
 
860
882
  def cancel_order(self, id: str, symbol: Str = None, params={}):
861
883
  """
@@ -870,7 +892,14 @@ class btcmarkets(Exchange, ImplicitAPI):
870
892
  request: dict = {
871
893
  'id': id,
872
894
  }
873
- return self.privateDeleteOrdersId(self.extend(request, params))
895
+ response = self.privateDeleteOrdersId(self.extend(request, params))
896
+ #
897
+ # {
898
+ # "orderId": "7524",
899
+ # "clientOrderId": "123-456"
900
+ # }
901
+ #
902
+ return self.parse_order(response)
874
903
 
875
904
  def calculate_fee(self, symbol, type, side, amount, price, takerOrMaker='taker', params={}):
876
905
  """