ccxt 4.3.88 → 4.3.90

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 (126) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +1 -0
  5. package/dist/cjs/src/alpaca.js +3 -2
  6. package/dist/cjs/src/ascendex.js +102 -116
  7. package/dist/cjs/src/bigone.js +1 -0
  8. package/dist/cjs/src/bingx.js +32 -17
  9. package/dist/cjs/src/bit2c.js +1 -0
  10. package/dist/cjs/src/bitbank.js +1 -0
  11. package/dist/cjs/src/bitfinex.js +1 -0
  12. package/dist/cjs/src/bitfinex2.js +21 -22
  13. package/dist/cjs/src/bitflyer.js +1 -0
  14. package/dist/cjs/src/bitget.js +3 -2
  15. package/dist/cjs/src/bitmart.js +6 -9
  16. package/dist/cjs/src/bitmex.js +1 -0
  17. package/dist/cjs/src/bitopro.js +1 -0
  18. package/dist/cjs/src/bitrue.js +62 -71
  19. package/dist/cjs/src/bitso.js +1 -0
  20. package/dist/cjs/src/bitstamp.js +1 -0
  21. package/dist/cjs/src/bitvavo.js +1 -0
  22. package/dist/cjs/src/blockchaincom.js +1 -0
  23. package/dist/cjs/src/btcalpha.js +1 -0
  24. package/dist/cjs/src/btcbox.js +1 -0
  25. package/dist/cjs/src/btcmarkets.js +1 -0
  26. package/dist/cjs/src/bybit.js +2 -0
  27. package/dist/cjs/src/cex.js +1 -0
  28. package/dist/cjs/src/coinbaseexchange.js +1 -0
  29. package/dist/cjs/src/coinbaseinternational.js +2 -1
  30. package/dist/cjs/src/coinex.js +1 -17
  31. package/dist/cjs/src/cryptocom.js +0 -12
  32. package/dist/cjs/src/hitbtc.js +1 -0
  33. package/dist/cjs/src/htx.js +49 -49
  34. package/dist/cjs/src/huobijp.js +0 -9
  35. package/dist/cjs/src/kraken.js +48 -48
  36. package/dist/cjs/src/latoken.js +1 -0
  37. package/dist/cjs/src/mexc.js +1 -61
  38. package/dist/cjs/src/okcoin.js +4 -9
  39. package/dist/cjs/src/okx.js +1 -8
  40. package/dist/cjs/src/onetrading.js +1 -0
  41. package/dist/cjs/src/phemex.js +1 -0
  42. package/dist/cjs/src/poloniexfutures.js +1 -0
  43. package/dist/cjs/src/pro/binance.js +323 -0
  44. package/dist/cjs/src/pro/bingx.js +263 -91
  45. package/dist/cjs/src/pro/bithumb.js +5 -1
  46. package/dist/cjs/src/pro/bitvavo.js +1 -0
  47. package/dist/cjs/src/pro/bybit.js +291 -2
  48. package/dist/cjs/src/pro/cex.js +1 -0
  49. package/dist/cjs/src/pro/coinex.js +994 -679
  50. package/dist/cjs/src/pro/lbank.js +2 -3
  51. package/dist/cjs/src/pro/okx.js +159 -3
  52. package/dist/cjs/src/probit.js +1 -0
  53. package/dist/cjs/src/vertex.js +1 -0
  54. package/dist/cjs/src/whitebit.js +5 -3
  55. package/dist/cjs/src/woo.js +1 -0
  56. package/dist/cjs/src/woofipro.js +1 -0
  57. package/js/ccxt.d.ts +1 -1
  58. package/js/ccxt.js +1 -1
  59. package/js/src/ace.js +1 -0
  60. package/js/src/alpaca.js +3 -2
  61. package/js/src/ascendex.d.ts +0 -1
  62. package/js/src/ascendex.js +102 -116
  63. package/js/src/bigone.js +1 -0
  64. package/js/src/bingx.js +32 -17
  65. package/js/src/bit2c.js +1 -0
  66. package/js/src/bitbank.js +1 -0
  67. package/js/src/bitfinex.js +1 -0
  68. package/js/src/bitfinex2.d.ts +0 -1
  69. package/js/src/bitfinex2.js +21 -22
  70. package/js/src/bitflyer.js +1 -0
  71. package/js/src/bitget.js +3 -2
  72. package/js/src/bitmart.d.ts +0 -1
  73. package/js/src/bitmart.js +6 -9
  74. package/js/src/bitmex.js +1 -0
  75. package/js/src/bitopro.js +1 -0
  76. package/js/src/bitrue.d.ts +0 -1
  77. package/js/src/bitrue.js +62 -71
  78. package/js/src/bitso.js +1 -0
  79. package/js/src/bitstamp.js +1 -0
  80. package/js/src/bitvavo.js +1 -0
  81. package/js/src/blockchaincom.js +1 -0
  82. package/js/src/btcalpha.js +1 -0
  83. package/js/src/btcbox.js +1 -0
  84. package/js/src/btcmarkets.js +1 -0
  85. package/js/src/bybit.js +2 -0
  86. package/js/src/cex.js +1 -0
  87. package/js/src/coinbaseexchange.js +1 -0
  88. package/js/src/coinbaseinternational.js +2 -1
  89. package/js/src/coinex.d.ts +0 -2
  90. package/js/src/coinex.js +1 -17
  91. package/js/src/cryptocom.d.ts +0 -1
  92. package/js/src/cryptocom.js +0 -12
  93. package/js/src/hitbtc.js +1 -0
  94. package/js/src/htx.js +49 -49
  95. package/js/src/huobijp.d.ts +0 -1
  96. package/js/src/huobijp.js +0 -9
  97. package/js/src/kraken.js +48 -48
  98. package/js/src/latoken.js +1 -0
  99. package/js/src/mexc.js +1 -61
  100. package/js/src/okcoin.d.ts +0 -1
  101. package/js/src/okcoin.js +4 -9
  102. package/js/src/okx.d.ts +0 -1
  103. package/js/src/okx.js +1 -8
  104. package/js/src/onetrading.js +1 -0
  105. package/js/src/phemex.js +1 -0
  106. package/js/src/poloniexfutures.js +1 -0
  107. package/js/src/pro/binance.d.ts +9 -1
  108. package/js/src/pro/binance.js +327 -1
  109. package/js/src/pro/bingx.d.ts +2 -2
  110. package/js/src/pro/bingx.js +263 -91
  111. package/js/src/pro/bithumb.js +5 -1
  112. package/js/src/pro/bitvavo.js +1 -0
  113. package/js/src/pro/bybit.d.ts +12 -1
  114. package/js/src/pro/bybit.js +292 -3
  115. package/js/src/pro/cex.js +1 -0
  116. package/js/src/pro/coinex.d.ts +12 -6
  117. package/js/src/pro/coinex.js +996 -681
  118. package/js/src/pro/lbank.js +2 -3
  119. package/js/src/pro/okx.d.ts +7 -0
  120. package/js/src/pro/okx.js +162 -4
  121. package/js/src/probit.js +1 -0
  122. package/js/src/vertex.js +1 -0
  123. package/js/src/whitebit.js +5 -3
  124. package/js/src/woo.js +1 -0
  125. package/js/src/woofipro.js +1 -0
  126. package/package.json +1 -1
@@ -1649,6 +1649,7 @@ class bigone extends bigone$1 {
1649
1649
  * @name bigone#fetchOrder
1650
1650
  * @description fetches information on an order made by the user
1651
1651
  * @see https://open.big.one/docs/spot_orders.html#get-one-order
1652
+ * @param {string} id the order id
1652
1653
  * @param {string} symbol not used by bigone fetchOrder
1653
1654
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1654
1655
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1059,8 +1059,7 @@ class bingx extends bingx$1 {
1059
1059
  }
1060
1060
  parseTrade(trade, market = undefined) {
1061
1061
  //
1062
- // spot
1063
- // fetchTrades
1062
+ // spot fetchTrades
1064
1063
  //
1065
1064
  // {
1066
1065
  // "id": 43148253,
@@ -1070,8 +1069,8 @@ class bingx extends bingx$1 {
1070
1069
  // "buyerMaker": false
1071
1070
  // }
1072
1071
  //
1073
- // spot
1074
- // fetchMyTrades
1072
+ // spot fetchMyTrades
1073
+ //
1075
1074
  // {
1076
1075
  // "symbol": "LTC-USDT",
1077
1076
  // "id": 36237072,
@@ -1086,8 +1085,7 @@ class bingx extends bingx$1 {
1086
1085
  // "isMaker": false
1087
1086
  // }
1088
1087
  //
1089
- // swap
1090
- // fetchTrades
1088
+ // swap fetchTrades
1091
1089
  //
1092
1090
  // {
1093
1091
  // "time": 1672025549368,
@@ -1097,8 +1095,7 @@ class bingx extends bingx$1 {
1097
1095
  // "quoteQty": "55723.87"
1098
1096
  // }
1099
1097
  //
1100
- // swap
1101
- // fetchMyTrades
1098
+ // swap fetchMyTrades
1102
1099
  //
1103
1100
  // {
1104
1101
  // "volume": "0.1",
@@ -1112,10 +1109,7 @@ class bingx extends bingx$1 {
1112
1109
  // "filledTime": "2023-07-04T20:56:01.000+0800"
1113
1110
  // }
1114
1111
  //
1115
- //
1116
- // ws
1117
- //
1118
- // spot
1112
+ // ws spot
1119
1113
  //
1120
1114
  // {
1121
1115
  // "E": 1690214529432,
@@ -1128,7 +1122,7 @@ class bingx extends bingx$1 {
1128
1122
  // "t": "57903921"
1129
1123
  // }
1130
1124
  //
1131
- // swap
1125
+ // ws linear swap
1132
1126
  //
1133
1127
  // {
1134
1128
  // "q": "0.0421",
@@ -1138,6 +1132,19 @@ class bingx extends bingx$1 {
1138
1132
  // "s": "BTC-USDT"
1139
1133
  // }
1140
1134
  //
1135
+ // ws inverse swap
1136
+ //
1137
+ // {
1138
+ // "e": "trade",
1139
+ // "E": 1722920589665,
1140
+ // "s": "BTC-USD",
1141
+ // "t": "39125001",
1142
+ // "p": "55360.0",
1143
+ // "q": "1",
1144
+ // "T": 1722920589582,
1145
+ // "m": false
1146
+ // }
1147
+ //
1141
1148
  // inverse swap fetchMyTrades
1142
1149
  //
1143
1150
  // {
@@ -2547,16 +2554,22 @@ class bingx extends bingx$1 {
2547
2554
  }
2548
2555
  }
2549
2556
  let positionSide = undefined;
2550
- if (reduceOnly) {
2551
- positionSide = (side === 'buy') ? 'SHORT' : 'LONG';
2557
+ const hedged = this.safeBool(params, 'hedged', false);
2558
+ if (hedged) {
2559
+ if (reduceOnly) {
2560
+ positionSide = (side === 'buy') ? 'SHORT' : 'LONG';
2561
+ }
2562
+ else {
2563
+ positionSide = (side === 'buy') ? 'LONG' : 'SHORT';
2564
+ }
2552
2565
  }
2553
2566
  else {
2554
- positionSide = (side === 'buy') ? 'LONG' : 'SHORT';
2567
+ positionSide = 'BOTH';
2555
2568
  }
2556
2569
  request['positionSide'] = positionSide;
2557
2570
  request['quantity'] = (market['inverse']) ? amount : this.parseToNumeric(this.amountToPrecision(symbol, amount)); // precision not available for inverse contracts
2558
2571
  }
2559
- params = this.omit(params, ['reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId']);
2572
+ params = this.omit(params, ['hedged', 'reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId']);
2560
2573
  return this.extend(request, params);
2561
2574
  }
2562
2575
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
@@ -2588,6 +2601,7 @@ class bingx extends bingx$1 {
2588
2601
  * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
2589
2602
  * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
2590
2603
  * @param {boolean} [params.test] *swap only* whether to use the test endpoint or not, default is false
2604
+ * @param {boolean} [params.hedged] *swap only* whether the order is in hedged mode or one way mode
2591
2605
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2592
2606
  */
2593
2607
  await this.loadMarkets();
@@ -3646,6 +3660,7 @@ class bingx extends bingx$1 {
3646
3660
  * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
3647
3661
  * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
3648
3662
  * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
3663
+ * @param {string} id the order id
3649
3664
  * @param {string} symbol unified symbol of the market the order was made in
3650
3665
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3651
3666
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -499,6 +499,7 @@ class bit2c extends bit2c$1 {
499
499
  * @name bit2c#fetchOrder
500
500
  * @description fetches information on an order made by the user
501
501
  * @see https://bit2c.co.il/home/api#getoid
502
+ * @param {string} id the order id
502
503
  * @param {string} symbol unified market symbol
503
504
  * @param {object} [params] extra parameters specific to the exchange API endpoint
504
505
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -717,6 +717,7 @@ class bitbank extends bitbank$1 {
717
717
  * @name bitbank#fetchOrder
718
718
  * @description fetches information on an order made by the user
719
719
  * @see https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-order-information
720
+ * @param {string} id the order id
720
721
  * @param {string} symbol unified symbol of the market the order was made in
721
722
  * @param {object} [params] extra parameters specific to the exchange API endpoint
722
723
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1333,6 +1333,7 @@ class bitfinex extends bitfinex$1 {
1333
1333
  * @name bitfinex#fetchOrder
1334
1334
  * @description fetches information on an order made by the user
1335
1335
  * @see https://docs.bitfinex.com/v1/reference/rest-auth-order-status
1336
+ * @param {string} id the order id
1336
1337
  * @param {string} symbol not used by bitfinex fetchOrder
1337
1338
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1338
1339
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -378,6 +378,25 @@ class bitfinex2 extends bitfinex2$1 {
378
378
  'withdraw': {
379
379
  'includeFee': false,
380
380
  },
381
+ 'networks': {
382
+ 'BTC': 'BITCOIN',
383
+ 'LTC': 'LITECOIN',
384
+ 'ERC20': 'ETHEREUM',
385
+ 'OMNI': 'TETHERUSO',
386
+ 'LIQUID': 'TETHERUSL',
387
+ 'TRC20': 'TETHERUSX',
388
+ 'EOS': 'TETHERUSS',
389
+ 'AVAX': 'TETHERUSDTAVAX',
390
+ 'SOL': 'TETHERUSDTSOL',
391
+ 'ALGO': 'TETHERUSDTALG',
392
+ 'BCH': 'TETHERUSDTBCH',
393
+ 'KSM': 'TETHERUSDTKSM',
394
+ 'DVF': 'TETHERUSDTDVF',
395
+ 'OMG': 'TETHERUSDTOMG',
396
+ },
397
+ 'networksById': {
398
+ 'TETHERUSE': 'ERC20',
399
+ },
381
400
  },
382
401
  'exceptions': {
383
402
  'exact': {
@@ -786,7 +805,7 @@ class bitfinex2 extends bitfinex2$1 {
786
805
  const networkId = this.safeString(pair, 0);
787
806
  const currencyId = this.safeString(this.safeValue(pair, 1, []), 0);
788
807
  if (currencyId === cleanId) {
789
- const network = this.safeNetwork(networkId);
808
+ const network = this.networkIdToCode(networkId);
790
809
  networks[network] = {
791
810
  'info': networkId,
792
811
  'id': networkId.toLowerCase(),
@@ -813,26 +832,6 @@ class bitfinex2 extends bitfinex2$1 {
813
832
  }
814
833
  return result;
815
834
  }
816
- safeNetwork(networkId) {
817
- const networksById = {
818
- 'BITCOIN': 'BTC',
819
- 'LITECOIN': 'LTC',
820
- 'ETHEREUM': 'ERC20',
821
- 'TETHERUSE': 'ERC20',
822
- 'TETHERUSO': 'OMNI',
823
- 'TETHERUSL': 'LIQUID',
824
- 'TETHERUSX': 'TRC20',
825
- 'TETHERUSS': 'EOS',
826
- 'TETHERUSDTAVAX': 'AVAX',
827
- 'TETHERUSDTSOL': 'SOL',
828
- 'TETHERUSDTALG': 'ALGO',
829
- 'TETHERUSDTBCH': 'BCH',
830
- 'TETHERUSDTKSM': 'KSM',
831
- 'TETHERUSDTDVF': 'DVF',
832
- 'TETHERUSDTOMG': 'OMG',
833
- };
834
- return this.safeString(networksById, networkId, networkId);
835
- }
836
835
  async fetchBalance(params = {}) {
837
836
  /**
838
837
  * @method
@@ -2371,7 +2370,7 @@ class bitfinex2 extends bitfinex2$1 {
2371
2370
  const currencyId = this.safeString(transaction, 1);
2372
2371
  code = this.safeCurrencyCode(currencyId, currency);
2373
2372
  const networkId = this.safeString(transaction, 2);
2374
- network = this.safeNetwork(networkId);
2373
+ network = this.networkIdToCode(networkId);
2375
2374
  timestamp = this.safeInteger(transaction, 5);
2376
2375
  updated = this.safeInteger(transaction, 6);
2377
2376
  status = this.parseTransactionStatus(this.safeString(transaction, 9));
@@ -725,6 +725,7 @@ class bitflyer extends bitflyer$1 {
725
725
  * @name bitflyer#fetchOrder
726
726
  * @description fetches information on an order made by the user
727
727
  * @see https://lightning.bitflyer.com/docs?lang=en#list-orders
728
+ * @param {string} id the order id
728
729
  * @param {string} symbol unified symbol of the market the order was made in
729
730
  * @param {object} [params] extra parameters specific to the exchange API endpoint
730
731
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -4001,7 +4001,7 @@ class bitget extends bitget$1 {
4001
4001
  if (feeCostString !== undefined) {
4002
4002
  // swap
4003
4003
  fee = {
4004
- 'cost': this.parseNumber(Precise["default"].stringAbs(feeCostString)),
4004
+ 'cost': this.parseNumber(Precise["default"].stringNeg(feeCostString)),
4005
4005
  'currency': market['settle'],
4006
4006
  };
4007
4007
  }
@@ -4018,7 +4018,7 @@ class bitget extends bitget$1 {
4018
4018
  }
4019
4019
  }
4020
4020
  fee = {
4021
- 'cost': this.parseNumber(Precise["default"].stringAbs(this.safeString(feeObject, 'totalFee'))),
4021
+ 'cost': this.parseNumber(Precise["default"].stringNeg(this.safeString(feeObject, 'totalFee'))),
4022
4022
  'currency': this.safeCurrencyCode(this.safeString(feeObject, 'feeCoinCode')),
4023
4023
  };
4024
4024
  }
@@ -5101,6 +5101,7 @@ class bitget extends bitget$1 {
5101
5101
  * @description fetches information on an order made by the user
5102
5102
  * @see https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
5103
5103
  * @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
5104
+ * @param {string} id the order id
5104
5105
  * @param {string} symbol unified symbol of the market the order was made in
5105
5106
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5106
5107
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -3435,7 +3435,12 @@ class bitmart extends bitmart$1 {
3435
3435
  const parts = chain.split('-');
3436
3436
  const partsLength = parts.length;
3437
3437
  const networkId = this.safeString(parts, partsLength - 1);
3438
- network = this.safeNetworkCode(networkId, currency);
3438
+ if (networkId === this.safeString(currency, 'name')) {
3439
+ network = this.safeString(currency, 'code');
3440
+ }
3441
+ else {
3442
+ network = this.networkIdToCode(networkId);
3443
+ }
3439
3444
  }
3440
3445
  this.checkAddress(address);
3441
3446
  return {
@@ -3446,14 +3451,6 @@ class bitmart extends bitmart$1 {
3446
3451
  'network': network,
3447
3452
  };
3448
3453
  }
3449
- safeNetworkCode(networkId, currency = undefined) {
3450
- const name = this.safeString(currency, 'name');
3451
- if (networkId === name) {
3452
- const code = this.safeString(currency, 'code');
3453
- return code;
3454
- }
3455
- return this.networkIdToCode(networkId);
3456
- }
3457
3454
  async withdraw(code, amount, address, tag = undefined, params = {}) {
3458
3455
  /**
3459
3456
  * @method
@@ -884,6 +884,7 @@ class bitmex extends bitmex$1 {
884
884
  * @name bitmex#fetchOrder
885
885
  * @description fetches information on an order made by the user
886
886
  * @see https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders
887
+ * @param {string} id the order id
887
888
  * @param {string} symbol unified symbol of the market the order was made in
888
889
  * @param {object} [params] extra parameters specific to the exchange API endpoint
889
890
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1176,6 +1176,7 @@ class bitopro extends bitopro$1 {
1176
1176
  * @name bitopro#fetchOrder
1177
1177
  * @description fetches information on an order made by the user
1178
1178
  * @see https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_an_order_data.md
1179
+ * @param {string} id the order id
1179
1180
  * @param {string} symbol unified symbol of the market the order was made in
1180
1181
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1181
1182
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -335,6 +335,67 @@ class bitrue extends bitrue$1 {
335
335
  'networks': {
336
336
  'ERC20': 'ETH',
337
337
  'TRC20': 'TRX',
338
+ 'AETERNITY': 'Aeternity',
339
+ 'AION': 'AION',
340
+ 'ALGO': 'Algorand',
341
+ 'ASK': 'ASK',
342
+ 'ATOM': 'ATOM',
343
+ 'AVAXC': 'AVAX C-Chain',
344
+ 'BCH': 'BCH',
345
+ 'BEP2': 'BEP2',
346
+ 'BEP20': 'BEP20',
347
+ 'Bitcoin': 'Bitcoin',
348
+ 'BRP20': 'BRP20',
349
+ 'ADA': 'Cardano',
350
+ 'CASINOCOIN': 'CasinoCoin',
351
+ 'CASINOCOIN-XRPL': 'CasinoCoin XRPL',
352
+ 'CONTENTOS': 'Contentos',
353
+ 'DASH': 'Dash',
354
+ 'DECOIN': 'Decoin',
355
+ 'DFI': 'DeFiChain',
356
+ 'DGB': 'DGB',
357
+ 'DIVI': 'Divi',
358
+ 'DOGE': 'dogecoin',
359
+ 'EOS': 'EOS',
360
+ 'ETC': 'ETC',
361
+ 'FILECOIN': 'Filecoin',
362
+ 'FREETON': 'FREETON',
363
+ 'HBAR': 'HBAR',
364
+ 'HEDERA': 'Hedera Hashgraph',
365
+ 'HRC20': 'HRC20',
366
+ 'ICON': 'ICON',
367
+ 'ICP': 'ICP',
368
+ 'IGNIS': 'Ignis',
369
+ 'INTERNETCOMPUTER': 'Internet Computer',
370
+ 'IOTA': 'IOTA',
371
+ 'KAVA': 'KAVA',
372
+ 'KSM': 'KSM',
373
+ 'LTC': 'LiteCoin',
374
+ 'LUNA': 'Luna',
375
+ 'MATIC': 'MATIC',
376
+ 'MOBILECOIN': 'Mobile Coin',
377
+ 'MONACOIN': 'MonaCoin',
378
+ 'XMR': 'Monero',
379
+ 'NEM': 'NEM',
380
+ 'NEP5': 'NEP5',
381
+ 'OMNI': 'OMNI',
382
+ 'PAC': 'PAC',
383
+ 'DOT': 'Polkadot',
384
+ 'RAVEN': 'Ravencoin',
385
+ 'SAFEX': 'Safex',
386
+ 'SOL': 'SOLANA',
387
+ 'SGB': 'Songbird',
388
+ 'XML': 'Stellar Lumens',
389
+ 'XYM': 'Symbol',
390
+ 'XTZ': 'Tezos',
391
+ 'theta': 'theta',
392
+ 'THETA': 'THETA',
393
+ 'VECHAIN': 'VeChain',
394
+ 'WANCHAIN': 'Wanchain',
395
+ 'XINFIN': 'XinFin Network',
396
+ 'XRP': 'XRP',
397
+ 'XRPL': 'XRPL',
398
+ 'ZIL': 'ZIL',
338
399
  },
339
400
  'defaultType': 'spot',
340
401
  'timeframes': {
@@ -507,77 +568,6 @@ class bitrue extends bitrue$1 {
507
568
  //
508
569
  return this.safeInteger(response, 'serverTime');
509
570
  }
510
- safeNetwork(networkId) {
511
- const uppercaseNetworkId = networkId.toUpperCase();
512
- const networksById = {
513
- 'Aeternity': 'Aeternity',
514
- 'AION': 'AION',
515
- 'Algorand': 'Algorand',
516
- 'ASK': 'ASK',
517
- 'ATOM': 'ATOM',
518
- 'AVAX C-Chain': 'AVAX C-Chain',
519
- 'bch': 'bch',
520
- 'BCH': 'BCH',
521
- 'BEP2': 'BEP2',
522
- 'BEP20': 'BEP20',
523
- 'Bitcoin': 'Bitcoin',
524
- 'BRP20': 'BRP20',
525
- 'Cardano': 'ADA',
526
- 'CasinoCoin': 'CasinoCoin',
527
- 'CasinoCoin XRPL': 'CasinoCoin XRPL',
528
- 'Contentos': 'Contentos',
529
- 'Dash': 'Dash',
530
- 'Decoin': 'Decoin',
531
- 'DeFiChain': 'DeFiChain',
532
- 'DGB': 'DGB',
533
- 'Divi': 'Divi',
534
- 'dogecoin': 'DOGE',
535
- 'EOS': 'EOS',
536
- 'ERC20': 'ERC20',
537
- 'ETC': 'ETC',
538
- 'Filecoin': 'Filecoin',
539
- 'FREETON': 'FREETON',
540
- 'HBAR': 'HBAR',
541
- 'Hedera Hashgraph': 'Hedera Hashgraph',
542
- 'HRC20': 'HRC20',
543
- 'ICON': 'ICON',
544
- 'ICP': 'ICP',
545
- 'Ignis': 'Ignis',
546
- 'Internet Computer': 'Internet Computer',
547
- 'IOTA': 'IOTA',
548
- 'KAVA': 'KAVA',
549
- 'KSM': 'KSM',
550
- 'LiteCoin': 'LiteCoin',
551
- 'Luna': 'Luna',
552
- 'MATIC': 'MATIC',
553
- 'Mobile Coin': 'Mobile Coin',
554
- 'MonaCoin': 'MonaCoin',
555
- 'Monero': 'Monero',
556
- 'NEM': 'NEM',
557
- 'NEP5': 'NEP5',
558
- 'OMNI': 'OMNI',
559
- 'PAC': 'PAC',
560
- 'Polkadot': 'Polkadot',
561
- 'Ravencoin': 'Ravencoin',
562
- 'Safex': 'Safex',
563
- 'SOLANA': 'SOL',
564
- 'Songbird': 'Songbird',
565
- 'Stellar Lumens': 'Stellar Lumens',
566
- 'Symbol': 'Symbol',
567
- 'Tezos': 'XTZ',
568
- 'theta': 'theta',
569
- 'THETA': 'THETA',
570
- 'TRC20': 'TRC20',
571
- 'VeChain': 'VeChain',
572
- 'VECHAIN': 'VECHAIN',
573
- 'Wanchain': 'Wanchain',
574
- 'XinFin Network': 'XinFin Network',
575
- 'XRP': 'XRP',
576
- 'XRPL': 'XRPL',
577
- 'ZIL': 'ZIL',
578
- };
579
- return this.safeString2(networksById, networkId, uppercaseNetworkId, networkId);
580
- }
581
571
  async fetchCurrencies(params = {}) {
582
572
  /**
583
573
  * @method
@@ -2044,6 +2034,7 @@ class bitrue extends bitrue$1 {
2044
2034
  * @see https://github.com/Bitrue-exchange/Spot-official-api-docs#query-order-user_data
2045
2035
  * @see https://www.bitrue.com/api-docs#query-order-user_data-hmac-sha256
2046
2036
  * @see https://www.bitrue.com/api_docs_includes_file/delivery.html#query-order-user_data-hmac-sha256
2037
+ * @param {string} id the order id
2047
2038
  * @param {string} symbol unified symbol of the market the order was made in
2048
2039
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2049
2040
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1186,6 +1186,7 @@ class bitso extends bitso$1 {
1186
1186
  * @name bitso#fetchOrder
1187
1187
  * @description fetches information on an order made by the user
1188
1188
  * @see https://docs.bitso.com/bitso-api/docs/look-up-orders
1189
+ * @param {string} id the order id
1189
1190
  * @param {string} symbol not used by bitso fetchOrder
1190
1191
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1191
1192
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1541,6 +1541,7 @@ class bitstamp extends bitstamp$1 {
1541
1541
  * @name bitstamp#fetchOrder
1542
1542
  * @description fetches information on an order made by the user
1543
1543
  * @see https://www.bitstamp.net/api/#tag/Orders/operation/GetOrderStatus
1544
+ * @param {string} id the order id
1544
1545
  * @param {string} symbol unified symbol of the market the order was made in
1545
1546
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1546
1547
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1307,6 +1307,7 @@ class bitvavo extends bitvavo$1 {
1307
1307
  * @name bitvavo#fetchOrder
1308
1308
  * @description fetches information on an order made by the user
1309
1309
  * @see https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1order/get
1310
+ * @param {string} id the order id
1310
1311
  * @param {string} symbol unified symbol of the market the order was made in
1311
1312
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1312
1313
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1105,6 +1105,7 @@ class blockchaincom extends blockchaincom$1 {
1105
1105
  * @name blockchaincom#fetchOrder
1106
1106
  * @description fetches information on an order made by the user
1107
1107
  * @see https://api.blockchain.com/v3/#getorderbyid
1108
+ * @param {string} id the order id
1108
1109
  * @param {string} symbol not used by blockchaincom fetchOrder
1109
1110
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1110
1111
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -794,6 +794,7 @@ class btcalpha extends btcalpha$1 {
794
794
  * @name btcalpha#fetchOrder
795
795
  * @see https://btc-alpha.github.io/api-docs/#retrieve-single-order
796
796
  * @description fetches information on an order made by the user
797
+ * @param {string} id the order id
797
798
  * @param {string} symbol not used by btcalpha fetchOrder
798
799
  * @param {object} [params] extra parameters specific to the exchange API endpoint
799
800
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -568,6 +568,7 @@ class btcbox extends btcbox$1 {
568
568
  * @name btcbox#fetchOrder
569
569
  * @description fetches information on an order made by the user
570
570
  * @see https://blog.btcbox.jp/en/archives/8762#toc16
571
+ * @param {string} id the order id
571
572
  * @param {string} symbol unified symbol of the market the order was made in
572
573
  * @param {object} [params] extra parameters specific to the exchange API endpoint
573
574
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1069,6 +1069,7 @@ class btcmarkets extends btcmarkets$1 {
1069
1069
  * @name btcmarkets#fetchOrder
1070
1070
  * @description fetches information on an order made by the user
1071
1071
  * @see https://docs.btcmarkets.net/v3/#operation/getOrderById
1072
+ * @param {string} id the order id
1072
1073
  * @param {string} symbol not used by btcmarkets fetchOrder
1073
1074
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1074
1075
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -4835,6 +4835,7 @@ class bybit extends bybit$1 {
4835
4835
  * @name bybit#fetchOrderClassic
4836
4836
  * @description fetches information on an order made by the user *classic accounts only*
4837
4837
  * @see https://bybit-exchange.github.io/docs/v5/order/order-list
4838
+ * @param {string} id the order id
4838
4839
  * @param {string} symbol unified symbol of the market the order was made in
4839
4840
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4840
4841
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -4868,6 +4869,7 @@ class bybit extends bybit$1 {
4868
4869
  * @name bybit#fetchOrderClassic
4869
4870
  * @description *classic accounts only/ spot not supported* fetches information on an order made by the user *classic accounts only*
4870
4871
  * @see https://bybit-exchange.github.io/docs/v5/order/order-list
4872
+ * @param {string} id the order id
4871
4873
  * @param {string} symbol unified symbol of the market the order was made in
4872
4874
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4873
4875
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1216,6 +1216,7 @@ class cex extends cex$1 {
1216
1216
  * @name cex#fetchOrder
1217
1217
  * @see https://docs.cex.io/?python#get-order-details
1218
1218
  * @description fetches information on an order made by the user
1219
+ * @param {string} id the order id
1219
1220
  * @param {string} symbol not used by cex fetchOrder
1220
1221
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1221
1222
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1090,6 +1090,7 @@ class coinbaseexchange extends coinbaseexchange$1 {
1090
1090
  * @name coinbaseexchange#fetchOrder
1091
1091
  * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorder
1092
1092
  * @description fetches information on an order made by the user
1093
+ * @param {string} id the order id
1093
1094
  * @param {string} symbol not used by coinbaseexchange fetchOrder
1094
1095
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1095
1096
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -802,11 +802,12 @@ class coinbaseinternational extends coinbaseinternational$1 {
802
802
  const currencyId = this.safeString(network, 'asset_name');
803
803
  const currencyCode = this.safeCurrencyCode(currencyId);
804
804
  const networkId = this.safeString(network, 'network_arn_id');
805
+ const networkIdForCode = this.safeStringN(network, ['network_name', 'display_name', 'network_arn_id'], '');
805
806
  return this.safeNetwork({
806
807
  'info': network,
807
808
  'id': networkId,
808
809
  'name': this.safeString(network, 'display_name'),
809
- 'network': this.networkIdToCode(this.safeStringN(network, ['network_name', 'display_name', 'network_arn_id'], ''), currencyCode),
810
+ 'network': this.networkIdToCode(networkIdForCode, currencyCode),
810
811
  'active': undefined,
811
812
  'deposit': undefined,
812
813
  'withdraw': undefined,
@@ -3766,26 +3766,10 @@ class coinex extends coinex$1 {
3766
3766
  const options = this.safeDict(this.options, 'fetchDepositAddress', {});
3767
3767
  const fillResponseFromRequest = this.safeBool(options, 'fillResponseFromRequest', true);
3768
3768
  if (fillResponseFromRequest) {
3769
- depositAddress['network'] = this.safeNetworkCode(network, currency);
3769
+ depositAddress['network'] = this.networkIdToCode(network, currency).toUpperCase();
3770
3770
  }
3771
3771
  return depositAddress;
3772
3772
  }
3773
- safeNetwork(networkId, currency = undefined) {
3774
- const networks = this.safeValue(currency, 'networks', {});
3775
- const networksCodes = Object.keys(networks);
3776
- const networksCodesLength = networksCodes.length;
3777
- if (networkId === undefined && networksCodesLength === 1) {
3778
- return networks[networksCodes[0]];
3779
- }
3780
- return {
3781
- 'id': networkId,
3782
- 'network': (networkId === undefined) ? undefined : networkId.toUpperCase(),
3783
- };
3784
- }
3785
- safeNetworkCode(networkId, currency = undefined) {
3786
- const network = this.safeNetwork(networkId, currency);
3787
- return network['network'];
3788
- }
3789
3773
  parseDepositAddress(depositAddress, currency = undefined) {
3790
3774
  //
3791
3775
  // {
@@ -1811,18 +1811,6 @@ class cryptocom extends cryptocom$1 {
1811
1811
  return depositAddresses[keys[0]];
1812
1812
  }
1813
1813
  }
1814
- safeNetwork(networkId) {
1815
- const networksById = {
1816
- 'BTC': 'BTC',
1817
- 'ETH': 'ETH',
1818
- 'SOL': 'SOL',
1819
- 'BNB': 'BNB',
1820
- 'CRONOS': 'CRONOS',
1821
- 'MATIC': 'MATIC',
1822
- 'OP': 'OP',
1823
- };
1824
- return this.safeString(networksById, networkId, networkId);
1825
- }
1826
1814
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
1827
1815
  /**
1828
1816
  * @method
@@ -1417,6 +1417,7 @@ class hitbtc extends hitbtc$1 {
1417
1417
  const statuses = {
1418
1418
  'PENDING': 'pending',
1419
1419
  'FAILED': 'failed',
1420
+ 'ROLLED_BACK': 'failed',
1420
1421
  'SUCCESS': 'ok',
1421
1422
  };
1422
1423
  return this.safeString(statuses, status, status);