ccxt 4.3.39__py2.py3-none-any.whl → 4.3.41__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.
Files changed (58) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +2 -0
  3. ccxt/abstract/binancecoinm.py +2 -0
  4. ccxt/abstract/binanceus.py +2 -0
  5. ccxt/abstract/binanceusdm.py +2 -0
  6. ccxt/abstract/okx.py +7 -0
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/base/exchange.py +1 -1
  9. ccxt/async_support/binance.py +4 -0
  10. ccxt/async_support/bitfinex2.py +1 -1
  11. ccxt/async_support/bithumb.py +9 -1
  12. ccxt/async_support/bitstamp.py +38 -2
  13. ccxt/async_support/coinlist.py +19 -1
  14. ccxt/async_support/coinmate.py +19 -3
  15. ccxt/async_support/coinone.py +1 -1
  16. ccxt/async_support/coinspot.py +11 -2
  17. ccxt/async_support/hitbtc.py +2 -2
  18. ccxt/async_support/independentreserve.py +33 -1
  19. ccxt/async_support/indodax.py +43 -2
  20. ccxt/async_support/okx.py +7 -0
  21. ccxt/async_support/upbit.py +13 -8
  22. ccxt/async_support/woo.py +6 -2
  23. ccxt/async_support/woofipro.py +8 -2
  24. ccxt/base/exchange.py +1 -1
  25. ccxt/binance.py +4 -0
  26. ccxt/bitfinex2.py +1 -1
  27. ccxt/bithumb.py +9 -1
  28. ccxt/bitstamp.py +38 -2
  29. ccxt/coinlist.py +19 -1
  30. ccxt/coinmate.py +19 -3
  31. ccxt/coinone.py +1 -1
  32. ccxt/coinspot.py +11 -2
  33. ccxt/hitbtc.py +2 -2
  34. ccxt/independentreserve.py +33 -1
  35. ccxt/indodax.py +43 -2
  36. ccxt/okx.py +7 -0
  37. ccxt/pro/__init__.py +1 -1
  38. ccxt/pro/alpaca.py +5 -5
  39. ccxt/pro/ascendex.py +3 -3
  40. ccxt/pro/bingx.py +258 -42
  41. ccxt/pro/bitget.py +6 -5
  42. ccxt/pro/bitrue.py +3 -4
  43. ccxt/pro/currencycom.py +6 -5
  44. ccxt/pro/exmo.py +5 -6
  45. ccxt/pro/gemini.py +4 -3
  46. ccxt/pro/independentreserve.py +7 -7
  47. ccxt/pro/lbank.py +4 -4
  48. ccxt/pro/phemex.py +5 -5
  49. ccxt/pro/probit.py +4 -4
  50. ccxt/pro/upbit.py +295 -4
  51. ccxt/pro/wazirx.py +12 -12
  52. ccxt/upbit.py +13 -8
  53. ccxt/woo.py +6 -2
  54. ccxt/woofipro.py +8 -2
  55. {ccxt-4.3.39.dist-info → ccxt-4.3.41.dist-info}/METADATA +4 -4
  56. {ccxt-4.3.39.dist-info → ccxt-4.3.41.dist-info}/RECORD +58 -58
  57. {ccxt-4.3.39.dist-info → ccxt-4.3.41.dist-info}/WHEEL +0 -0
  58. {ccxt-4.3.39.dist-info → ccxt-4.3.41.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.3.39'
25
+ __version__ = '4.3.41'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/binance.py CHANGED
@@ -2,6 +2,8 @@ from ccxt.base.types import Entry
2
2
 
3
3
 
4
4
  class ImplicitAPI:
5
+ sapi_get_copytrading_futures_userstatus = sapiGetCopyTradingFuturesUserStatus = Entry('copyTrading/futures/userStatus', 'sapi', 'GET', {'cost': 2})
6
+ sapi_get_copytrading_futures_leadsymbol = sapiGetCopyTradingFuturesLeadSymbol = Entry('copyTrading/futures/leadSymbol', 'sapi', 'GET', {'cost': 2})
5
7
  sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
6
8
  sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
7
9
  sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
@@ -2,6 +2,8 @@ from ccxt.base.types import Entry
2
2
 
3
3
 
4
4
  class ImplicitAPI:
5
+ sapi_get_copytrading_futures_userstatus = sapiGetCopyTradingFuturesUserStatus = Entry('copyTrading/futures/userStatus', 'sapi', 'GET', {'cost': 2})
6
+ sapi_get_copytrading_futures_leadsymbol = sapiGetCopyTradingFuturesLeadSymbol = Entry('copyTrading/futures/leadSymbol', 'sapi', 'GET', {'cost': 2})
5
7
  sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
6
8
  sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
7
9
  sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
@@ -2,6 +2,8 @@ from ccxt.base.types import Entry
2
2
 
3
3
 
4
4
  class ImplicitAPI:
5
+ sapi_get_copytrading_futures_userstatus = sapiGetCopyTradingFuturesUserStatus = Entry('copyTrading/futures/userStatus', 'sapi', 'GET', {'cost': 2})
6
+ sapi_get_copytrading_futures_leadsymbol = sapiGetCopyTradingFuturesLeadSymbol = Entry('copyTrading/futures/leadSymbol', 'sapi', 'GET', {'cost': 2})
5
7
  sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
6
8
  sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
7
9
  sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
@@ -2,6 +2,8 @@ from ccxt.base.types import Entry
2
2
 
3
3
 
4
4
  class ImplicitAPI:
5
+ sapi_get_copytrading_futures_userstatus = sapiGetCopyTradingFuturesUserStatus = Entry('copyTrading/futures/userStatus', 'sapi', 'GET', {'cost': 2})
6
+ sapi_get_copytrading_futures_leadsymbol = sapiGetCopyTradingFuturesLeadSymbol = Entry('copyTrading/futures/leadSymbol', 'sapi', 'GET', {'cost': 2})
5
7
  sapi_get_system_status = sapiGetSystemStatus = Entry('system/status', 'sapi', 'GET', {'cost': 0.1})
6
8
  sapi_get_accountsnapshot = sapiGetAccountSnapshot = Entry('accountSnapshot', 'sapi', 'GET', {'cost': 240})
7
9
  sapi_get_account_info = sapiGetAccountInfo = Entry('account/info', 'sapi', 'GET', {'cost': 0.1})
ccxt/abstract/okx.py CHANGED
@@ -148,6 +148,9 @@ class ImplicitAPI:
148
148
  private_get_account_greeks = privateGetAccountGreeks = Entry('account/greeks', 'private', 'GET', {'cost': 2})
149
149
  private_get_account_position_tiers = privateGetAccountPositionTiers = Entry('account/position-tiers', 'private', 'GET', {'cost': 2})
150
150
  private_get_account_mmp_config = privateGetAccountMmpConfig = Entry('account/mmp-config', 'private', 'GET', {'cost': 4})
151
+ private_get_account_fixed_loan_borrowing_limit = privateGetAccountFixedLoanBorrowingLimit = Entry('account/fixed-loan/borrowing-limit', 'private', 'GET', {'cost': 4})
152
+ private_get_account_fixed_loan_borrowing_quote = privateGetAccountFixedLoanBorrowingQuote = Entry('account/fixed-loan/borrowing-quote', 'private', 'GET', {'cost': 5})
153
+ private_get_account_fixed_loan_borrowing_orders_list = privateGetAccountFixedLoanBorrowingOrdersList = Entry('account/fixed-loan/borrowing-orders-list', 'private', 'GET', {'cost': 5})
151
154
  private_get_users_subaccount_list = privateGetUsersSubaccountList = Entry('users/subaccount/list', 'private', 'GET', {'cost': 10})
152
155
  private_get_account_subaccount_balances = privateGetAccountSubaccountBalances = Entry('account/subaccount/balances', 'private', 'GET', {'cost': 3.3333333333333335})
153
156
  private_get_asset_subaccount_balances = privateGetAssetSubaccountBalances = Entry('asset/subaccount/balances', 'private', 'GET', {'cost': 3.3333333333333335})
@@ -259,6 +262,10 @@ class ImplicitAPI:
259
262
  private_post_account_set_account_level = privatePostAccountSetAccountLevel = Entry('account/set-account-level', 'private', 'POST', {'cost': 4})
260
263
  private_post_account_mmp_reset = privatePostAccountMmpReset = Entry('account/mmp-reset', 'private', 'POST', {'cost': 4})
261
264
  private_post_account_mmp_config = privatePostAccountMmpConfig = Entry('account/mmp-config', 'private', 'POST', {'cost': 100})
265
+ private_post_account_fixed_loan_borrowing_order = privatePostAccountFixedLoanBorrowingOrder = Entry('account/fixed-loan/borrowing-order', 'private', 'POST', {'cost': 5})
266
+ private_post_account_fixed_loan_amend_borrowing_order = privatePostAccountFixedLoanAmendBorrowingOrder = Entry('account/fixed-loan/amend-borrowing-order', 'private', 'POST', {'cost': 5})
267
+ private_post_account_fixed_loan_manual_reborrow = privatePostAccountFixedLoanManualReborrow = Entry('account/fixed-loan/manual-reborrow', 'private', 'POST', {'cost': 5})
268
+ private_post_account_fixed_loan_repay_borrowing_order = privatePostAccountFixedLoanRepayBorrowingOrder = Entry('account/fixed-loan/repay-borrowing-order', 'private', 'POST', {'cost': 5})
262
269
  private_post_users_subaccount_modify_apikey = privatePostUsersSubaccountModifyApikey = Entry('users/subaccount/modify-apikey', 'private', 'POST', {'cost': 10})
263
270
  private_post_asset_subaccount_transfer = privatePostAssetSubaccountTransfer = Entry('asset/subaccount/transfer', 'private', 'POST', {'cost': 10})
264
271
  private_post_users_subaccount_set_transfer_out = privatePostUsersSubaccountSetTransferOut = Entry('users/subaccount/set-transfer-out', 'private', 'POST', {'cost': 10})
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.39'
7
+ __version__ = '4.3.41'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.3.39'
5
+ __version__ = '4.3.41'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -260,6 +260,9 @@ class binance(Exchange, ImplicitAPI):
260
260
  # UID(sapi) request rate limit of 180 000 per minute
261
261
  # 1 UID(sapi) => cost = 0.006667 =>(1000 / (50 * 0.006667)) * 60 = 180000
262
262
  'get': {
263
+ # copy trading
264
+ 'copyTrading/futures/userStatus': 2,
265
+ 'copyTrading/futures/leadSymbol': 2,
263
266
  'system/status': 0.1,
264
267
  # these endpoints require self.apiKey
265
268
  'accountSnapshot': 240, # Weight(IP): 2400 => cost = 0.1 * 2400 = 240
@@ -1248,6 +1251,7 @@ class binance(Exchange, ImplicitAPI):
1248
1251
  'future': 'UMFUTURE', # backwards compatibility
1249
1252
  'delivery': 'CMFUTURE', # backwards compatbility
1250
1253
  'linear': 'UMFUTURE',
1254
+ 'swap': 'UMFUTURE',
1251
1255
  'inverse': 'CMFUTURE',
1252
1256
  'option': 'OPTION',
1253
1257
  },
@@ -1655,7 +1655,7 @@ class bitfinex2(Exchange, ImplicitAPI):
1655
1655
  raise ExchangeError(self.id + ' ' + response[6] + ': ' + errorText + '(#' + errorCode + ')')
1656
1656
  orders = self.safe_list(response, 4, [])
1657
1657
  order = self.safe_list(orders, 0)
1658
- return self.parse_order(order, market)
1658
+ return self.parse_order(self.extend({'result': order}), market)
1659
1659
 
1660
1660
  async def create_orders(self, orders: List[OrderRequest], params={}):
1661
1661
  """
@@ -924,7 +924,15 @@ class bithumb(Exchange, ImplicitAPI):
924
924
  'order_currency': market['base'],
925
925
  'payment_currency': market['quote'],
926
926
  }
927
- return await self.privatePostTradeCancel(self.extend(request, params))
927
+ response = await self.privatePostTradeCancel(self.extend(request, params))
928
+ #
929
+ # {
930
+ # 'status': 'string',
931
+ # }
932
+ #
933
+ return self.safe_order({
934
+ 'info': response,
935
+ })
928
936
 
929
937
  async def cancel_unified_order(self, order, params={}):
930
938
  request: dict = {
@@ -1376,7 +1376,17 @@ class bitstamp(Exchange, ImplicitAPI):
1376
1376
  request: dict = {
1377
1377
  'id': id,
1378
1378
  }
1379
- return await self.privatePostCancelOrder(self.extend(request, params))
1379
+ response = await self.privatePostCancelOrder(self.extend(request, params))
1380
+ #
1381
+ # {
1382
+ # "id": 1453282316578816,
1383
+ # "amount": "0.02035278",
1384
+ # "price": "2100.45",
1385
+ # "type": 0,
1386
+ # "market": "BTC/USD"
1387
+ # }
1388
+ #
1389
+ return self.parse_order(response)
1380
1390
 
1381
1391
  async def cancel_all_orders(self, symbol: Str = None, params={}):
1382
1392
  """
@@ -1397,7 +1407,23 @@ class bitstamp(Exchange, ImplicitAPI):
1397
1407
  response = await self.privatePostCancelAllOrdersPair(self.extend(request, params))
1398
1408
  else:
1399
1409
  response = await self.privatePostCancelAllOrders(self.extend(request, params))
1400
- return response
1410
+ #
1411
+ # {
1412
+ # "canceled": [
1413
+ # {
1414
+ # "id": 1453282316578816,
1415
+ # "amount": "0.02035278",
1416
+ # "price": "2100.45",
1417
+ # "type": 0,
1418
+ # "currency_pair": "BTC/USD",
1419
+ # "market": "BTC/USD"
1420
+ # }
1421
+ # ],
1422
+ # "success": True
1423
+ # }
1424
+ #
1425
+ canceled = self.safe_list(response, 'canceled')
1426
+ return self.parse_orders(canceled)
1401
1427
 
1402
1428
  def parse_order_status(self, status: Str):
1403
1429
  statuses: dict = {
@@ -1743,6 +1769,16 @@ class bitstamp(Exchange, ImplicitAPI):
1743
1769
  # "id": "2814205012"
1744
1770
  # }
1745
1771
  #
1772
+ # cancelOrder
1773
+ #
1774
+ # {
1775
+ # "id": 1453282316578816,
1776
+ # "amount": "0.02035278",
1777
+ # "price": "2100.45",
1778
+ # "type": 0,
1779
+ # "market": "BTC/USD"
1780
+ # }
1781
+ #
1746
1782
  id = self.safe_string(order, 'id')
1747
1783
  clientOrderId = self.safe_string(order, 'client_order_id')
1748
1784
  side = self.safe_string(order, 'type')
@@ -1397,7 +1397,25 @@ class coinlist(Exchange, ImplicitAPI):
1397
1397
  await self.load_markets()
1398
1398
  params = ids
1399
1399
  response = await self.privateDeleteV1OrdersBulk(params)
1400
- return response
1400
+ #
1401
+ # {
1402
+ # "message": "Cancel order requests received.",
1403
+ # "order_ids": [
1404
+ # "ff132955-43bc-4fe5-9d9c-5ba226cc89a0"
1405
+ # ],
1406
+ # "timestamp": "2024-06-01T02:32:30.305Z"
1407
+ # }
1408
+ #
1409
+ orderIds = self.safe_list(response, 'order_ids', [])
1410
+ orders = []
1411
+ datetime = self.safe_string(response, 'timestamp')
1412
+ for i in range(0, len(orderIds)):
1413
+ orders.append(self.safe_order({
1414
+ 'info': orderIds[i],
1415
+ 'id': orderIds[i],
1416
+ 'lastUpdateTimestamp': self.parse8601(datetime),
1417
+ }))
1418
+ return orders
1401
1419
 
1402
1420
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
1403
1421
  """
@@ -895,6 +895,13 @@ class coinmate(Exchange, ImplicitAPI):
895
895
  # "trailing": False,
896
896
  # }
897
897
  #
898
+ # cancelOrder
899
+ #
900
+ # {
901
+ # "success": True,
902
+ # "remainingAmount": 0.1
903
+ # }
904
+ #
898
905
  id = self.safe_string(order, 'id')
899
906
  timestamp = self.safe_integer(order, 'timestamp')
900
907
  side = self.safe_string_lower(order, 'type')
@@ -1003,9 +1010,18 @@ class coinmate(Exchange, ImplicitAPI):
1003
1010
  # {"error":false,"errorMessage":null,"data":{"success":true,"remainingAmount":0.01}}
1004
1011
  request: dict = {'orderId': id}
1005
1012
  response = await self.privatePostCancelOrderWithInfo(self.extend(request, params))
1006
- return {
1007
- 'info': response,
1008
- }
1013
+ #
1014
+ # {
1015
+ # "error": False,
1016
+ # "errorMessage": null,
1017
+ # "data": {
1018
+ # "success": True,
1019
+ # "remainingAmount": 0.1
1020
+ # }
1021
+ # }
1022
+ #
1023
+ data = self.safe_dict(response, 'data')
1024
+ return self.parse_order(data)
1009
1025
 
1010
1026
  def nonce(self):
1011
1027
  return self.milliseconds()
@@ -1020,7 +1020,7 @@ class coinone(Exchange, ImplicitAPI):
1020
1020
  # "errorCode": "0"
1021
1021
  # }
1022
1022
  #
1023
- return response
1023
+ return self.safe_order(response)
1024
1024
 
1025
1025
  async def fetch_deposit_addresses(self, codes: Strings = None, params={}):
1026
1026
  """
@@ -505,11 +505,20 @@ class coinspot(Exchange, ImplicitAPI):
505
505
  if side != 'buy' and side != 'sell':
506
506
  raise ArgumentsRequired(self.id + ' cancelOrder() requires a side parameter, "buy" or "sell"')
507
507
  params = self.omit(params, 'side')
508
- method = 'privatePostMy' + self.capitalize(side) + 'Cancel'
509
508
  request: dict = {
510
509
  'id': id,
511
510
  }
512
- return await getattr(self, method)(self.extend(request, params))
511
+ response = None
512
+ if side == 'buy':
513
+ response = await self.privatePostMyBuyCancel(self.extend(request, params))
514
+ else:
515
+ response = await self.privatePostMySellCancel(self.extend(request, params))
516
+ #
517
+ # status - ok, error
518
+ #
519
+ return self.safe_order({
520
+ 'info': response,
521
+ })
513
522
 
514
523
  def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
515
524
  url = self.urls['api'][api] + '/' + path
@@ -860,8 +860,8 @@ class hitbtc(Exchange, ImplicitAPI):
860
860
  network = self.safe_network(networkId)
861
861
  fee = self.safe_number(rawNetwork, 'payout_fee')
862
862
  networkPrecision = self.safe_number(rawNetwork, 'precision_payout')
863
- payinEnabledNetwork = self.safe_bool(entry, 'payin_enabled', False)
864
- payoutEnabledNetwork = self.safe_bool(entry, 'payout_enabled', False)
863
+ payinEnabledNetwork = self.safe_bool(rawNetwork, 'payin_enabled', False)
864
+ payoutEnabledNetwork = self.safe_bool(rawNetwork, 'payout_enabled', False)
865
865
  activeNetwork = payinEnabledNetwork and payoutEnabledNetwork
866
866
  if payinEnabledNetwork and not depositEnabled:
867
867
  depositEnabled = True
@@ -375,6 +375,21 @@ class independentreserve(Exchange, ImplicitAPI):
375
375
  # "FeePercent": 0.005,
376
376
  # }
377
377
  #
378
+ # cancelOrder
379
+ #
380
+ # {
381
+ # "AvgPrice": 455.48,
382
+ # "CreatedTimestampUtc": "2022-08-05T06:42:11.3032208Z",
383
+ # "OrderGuid": "719c495c-a39e-4884-93ac-280b37245037",
384
+ # "Price": 485.76,
385
+ # "PrimaryCurrencyCode": "Xbt",
386
+ # "ReservedAmount": 0.358,
387
+ # "SecondaryCurrencyCode": "Usd",
388
+ # "Status": "Cancelled",
389
+ # "Type": "LimitOffer",
390
+ # "VolumeFilled": 0,
391
+ # "VolumeOrdered": 0.358
392
+ # }
378
393
  symbol = None
379
394
  baseId = self.safe_string(order, 'PrimaryCurrencyCode')
380
395
  quoteId = self.safe_string(order, 'SecondaryCurrencyCode')
@@ -666,6 +681,7 @@ class independentreserve(Exchange, ImplicitAPI):
666
681
  async def cancel_order(self, id: str, symbol: Str = None, params={}):
667
682
  """
668
683
  cancels an open order
684
+ :see: https://www.independentreserve.com/features/api#CancelOrder
669
685
  :param str id: order id
670
686
  :param str symbol: unified symbol of the market the order was made in
671
687
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -675,7 +691,23 @@ class independentreserve(Exchange, ImplicitAPI):
675
691
  request: dict = {
676
692
  'orderGuid': id,
677
693
  }
678
- return await self.privatePostCancelOrder(self.extend(request, params))
694
+ response = await self.privatePostCancelOrder(self.extend(request, params))
695
+ #
696
+ # {
697
+ # "AvgPrice": 455.48,
698
+ # "CreatedTimestampUtc": "2022-08-05T06:42:11.3032208Z",
699
+ # "OrderGuid": "719c495c-a39e-4884-93ac-280b37245037",
700
+ # "Price": 485.76,
701
+ # "PrimaryCurrencyCode": "Xbt",
702
+ # "ReservedAmount": 0.358,
703
+ # "SecondaryCurrencyCode": "Usd",
704
+ # "Status": "Cancelled",
705
+ # "Type": "LimitOffer",
706
+ # "VolumeFilled": 0,
707
+ # "VolumeOrdered": 0.358
708
+ # }
709
+ #
710
+ return self.parse_order(response)
679
711
 
680
712
  async def fetch_deposit_address(self, code: str, params={}):
681
713
  """
@@ -641,6 +641,24 @@ class indodax(Exchange, ImplicitAPI):
641
641
  # "order_xrp": "30.45000000",
642
642
  # "remain_xrp": "0.00000000"
643
643
  # }
644
+ #
645
+ # cancelOrder
646
+ #
647
+ # {
648
+ # "order_id": 666883,
649
+ # "client_order_id": "clientx-sj82ks82j",
650
+ # "type": "sell",
651
+ # "pair": "btc_idr",
652
+ # "balance": {
653
+ # "idr": "33605800",
654
+ # "btc": "0.00000000",
655
+ # ...
656
+ # "frozen_idr": "0",
657
+ # "frozen_btc": "0.00000000",
658
+ # ...
659
+ # }
660
+ # }
661
+ #
644
662
  side = None
645
663
  if 'type' in order:
646
664
  side = order['type']
@@ -650,6 +668,8 @@ class indodax(Exchange, ImplicitAPI):
650
668
  price = self.safe_string(order, 'price')
651
669
  amount = None
652
670
  remaining = None
671
+ marketId = self.safe_string(order, 'pair')
672
+ market = self.safe_market(marketId, market)
653
673
  if market is not None:
654
674
  symbol = market['symbol']
655
675
  quoteId = market['quoteId']
@@ -668,7 +688,7 @@ class indodax(Exchange, ImplicitAPI):
668
688
  return self.safe_order({
669
689
  'info': order,
670
690
  'id': id,
671
- 'clientOrderId': None,
691
+ 'clientOrderId': self.safe_string(order, 'client_order_id'),
672
692
  'timestamp': timestamp,
673
693
  'datetime': self.iso8601(timestamp),
674
694
  'lastTradeTimestamp': None,
@@ -825,7 +845,28 @@ class indodax(Exchange, ImplicitAPI):
825
845
  'pair': market['id'],
826
846
  'type': side,
827
847
  }
828
- return await self.privatePostCancelOrder(self.extend(request, params))
848
+ response = await self.privatePostCancelOrder(self.extend(request, params))
849
+ #
850
+ # {
851
+ # "success": 1,
852
+ # "return": {
853
+ # "order_id": 666883,
854
+ # "client_order_id": "clientx-sj82ks82j",
855
+ # "type": "sell",
856
+ # "pair": "btc_idr",
857
+ # "balance": {
858
+ # "idr": "33605800",
859
+ # "btc": "0.00000000",
860
+ # ...
861
+ # "frozen_idr": "0",
862
+ # "frozen_btc": "0.00000000",
863
+ # ...
864
+ # }
865
+ # }
866
+ # }
867
+ #
868
+ data = self.safe_dict(response, 'return')
869
+ return self.parse_order(data)
829
870
 
830
871
  async def fetch_transaction_fee(self, code: str, params={}):
831
872
  """
ccxt/async_support/okx.py CHANGED
@@ -370,6 +370,9 @@ class okx(Exchange, ImplicitAPI):
370
370
  'account/greeks': 2,
371
371
  'account/position-tiers': 2,
372
372
  'account/mmp-config': 4,
373
+ 'account/fixed-loan/borrowing-limit': 4,
374
+ 'account/fixed-loan/borrowing-quote': 5,
375
+ 'account/fixed-loan/borrowing-orders-list': 5,
373
376
  # subaccount
374
377
  'users/subaccount/list': 10,
375
378
  'account/subaccount/balances': 10 / 3,
@@ -495,6 +498,10 @@ class okx(Exchange, ImplicitAPI):
495
498
  'account/set-account-level': 4,
496
499
  'account/mmp-reset': 4,
497
500
  'account/mmp-config': 100,
501
+ 'account/fixed-loan/borrowing-order': 5,
502
+ 'account/fixed-loan/amend-borrowing-order': 5,
503
+ 'account/fixed-loan/manual-reborrow': 5,
504
+ 'account/fixed-loan/repay-borrowing-order': 5,
498
505
  # subaccount
499
506
  'users/subaccount/modify-apikey': 10,
500
507
  'asset/subaccount/transfer': 10,
@@ -1782,23 +1782,28 @@ class upbit(Exchange, ImplicitAPI):
1782
1782
  url += '?' + self.urlencode(query)
1783
1783
  if api == 'private':
1784
1784
  self.check_required_credentials()
1785
+ headers = {}
1785
1786
  nonce = self.uuid()
1786
1787
  request: dict = {
1787
1788
  'access_key': self.apiKey,
1788
1789
  'nonce': nonce,
1789
1790
  }
1790
- if query:
1791
- auth = self.urlencode(query)
1791
+ hasQuery = query
1792
+ auth = None
1793
+ if (method != 'GET') and (method != 'DELETE'):
1794
+ body = self.json(params)
1795
+ headers['Content-Type'] = 'application/json'
1796
+ if hasQuery:
1797
+ auth = self.urlencode(query)
1798
+ else:
1799
+ if hasQuery:
1800
+ auth = self.urlencode(self.keysort(query))
1801
+ if auth is not None:
1792
1802
  hash = self.hash(self.encode(auth), 'sha512')
1793
1803
  request['query_hash'] = hash
1794
1804
  request['query_hash_alg'] = 'SHA512'
1795
1805
  token = self.jwt(request, self.encode(self.secret), 'sha256')
1796
- headers = {
1797
- 'Authorization': 'Bearer ' + token,
1798
- }
1799
- if (method != 'GET') and (method != 'DELETE'):
1800
- body = self.json(params)
1801
- headers['Content-Type'] = 'application/json'
1806
+ headers['Authorization'] = 'Bearer ' + token
1802
1807
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
1803
1808
 
1804
1809
  def handle_errors(self, httpCode: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
ccxt/async_support/woo.py CHANGED
@@ -1212,7 +1212,9 @@ class woo(Exchange, ImplicitAPI):
1212
1212
  # "status":"CANCEL_ALL_SENT"
1213
1213
  # }
1214
1214
  #
1215
- return response
1215
+ return [
1216
+ self.safe_order(response),
1217
+ ]
1216
1218
 
1217
1219
  async def cancel_all_orders_after(self, timeout: Int, params={}):
1218
1220
  """
@@ -1237,7 +1239,9 @@ class woo(Exchange, ImplicitAPI):
1237
1239
  # "timestamp": 1711534302943
1238
1240
  # }
1239
1241
  #
1240
- return response
1242
+ return [
1243
+ self.safe_order(response),
1244
+ ]
1241
1245
 
1242
1246
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
1243
1247
  """
@@ -1561,7 +1561,9 @@ class woofipro(Exchange, ImplicitAPI):
1561
1561
  # }
1562
1562
  # }
1563
1563
  #
1564
- return response
1564
+ return [self.safe_order({
1565
+ 'info': response,
1566
+ })]
1565
1567
 
1566
1568
  async def cancel_all_orders(self, symbol: Str = None, params={}):
1567
1569
  """
@@ -1600,7 +1602,11 @@ class woofipro(Exchange, ImplicitAPI):
1600
1602
  # }
1601
1603
  # }
1602
1604
  #
1603
- return response
1605
+ return [
1606
+ {
1607
+ 'info': response,
1608
+ },
1609
+ ]
1604
1610
 
1605
1611
  async def fetch_order(self, id: str, symbol: Str = None, params={}):
1606
1612
  """
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.39'
7
+ __version__ = '4.3.41'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/binance.py CHANGED
@@ -259,6 +259,9 @@ class binance(Exchange, ImplicitAPI):
259
259
  # UID(sapi) request rate limit of 180 000 per minute
260
260
  # 1 UID(sapi) => cost = 0.006667 =>(1000 / (50 * 0.006667)) * 60 = 180000
261
261
  'get': {
262
+ # copy trading
263
+ 'copyTrading/futures/userStatus': 2,
264
+ 'copyTrading/futures/leadSymbol': 2,
262
265
  'system/status': 0.1,
263
266
  # these endpoints require self.apiKey
264
267
  'accountSnapshot': 240, # Weight(IP): 2400 => cost = 0.1 * 2400 = 240
@@ -1247,6 +1250,7 @@ class binance(Exchange, ImplicitAPI):
1247
1250
  'future': 'UMFUTURE', # backwards compatibility
1248
1251
  'delivery': 'CMFUTURE', # backwards compatbility
1249
1252
  'linear': 'UMFUTURE',
1253
+ 'swap': 'UMFUTURE',
1250
1254
  'inverse': 'CMFUTURE',
1251
1255
  'option': 'OPTION',
1252
1256
  },
ccxt/bitfinex2.py CHANGED
@@ -1655,7 +1655,7 @@ class bitfinex2(Exchange, ImplicitAPI):
1655
1655
  raise ExchangeError(self.id + ' ' + response[6] + ': ' + errorText + '(#' + errorCode + ')')
1656
1656
  orders = self.safe_list(response, 4, [])
1657
1657
  order = self.safe_list(orders, 0)
1658
- return self.parse_order(order, market)
1658
+ return self.parse_order(self.extend({'result': order}), market)
1659
1659
 
1660
1660
  def create_orders(self, orders: List[OrderRequest], params={}):
1661
1661
  """
ccxt/bithumb.py CHANGED
@@ -924,7 +924,15 @@ class bithumb(Exchange, ImplicitAPI):
924
924
  'order_currency': market['base'],
925
925
  'payment_currency': market['quote'],
926
926
  }
927
- return self.privatePostTradeCancel(self.extend(request, params))
927
+ response = self.privatePostTradeCancel(self.extend(request, params))
928
+ #
929
+ # {
930
+ # 'status': 'string',
931
+ # }
932
+ #
933
+ return self.safe_order({
934
+ 'info': response,
935
+ })
928
936
 
929
937
  def cancel_unified_order(self, order, params={}):
930
938
  request: dict = {