ccxt 4.4.15 → 4.4.17

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 (211) 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/ascendex.js +2 -2
  5. package/dist/cjs/src/base/Exchange.js +14 -1
  6. package/dist/cjs/src/bigone.js +4 -2
  7. package/dist/cjs/src/binance.js +72 -8
  8. package/dist/cjs/src/bingx.js +62 -2
  9. package/dist/cjs/src/bit2c.js +3 -1
  10. package/dist/cjs/src/bitbank.js +4 -2
  11. package/dist/cjs/src/bitbns.js +4 -2
  12. package/dist/cjs/src/bitfinex.js +2 -0
  13. package/dist/cjs/src/bitfinex2.js +2 -0
  14. package/dist/cjs/src/bitget.js +3 -2
  15. package/dist/cjs/src/bitmart.js +2 -1
  16. package/dist/cjs/src/bitmex.js +2 -2
  17. package/dist/cjs/src/bitso.js +3 -2
  18. package/dist/cjs/src/bitstamp.js +4 -2
  19. package/dist/cjs/src/bitvavo.js +6 -4
  20. package/dist/cjs/src/blockchaincom.js +9 -7
  21. package/dist/cjs/src/blofin.js +23 -0
  22. package/dist/cjs/src/bybit.js +9 -5
  23. package/dist/cjs/src/cex.js +3 -2
  24. package/dist/cjs/src/coinbase.js +1 -1
  25. package/dist/cjs/src/coinbaseinternational.js +3 -8
  26. package/dist/cjs/src/coinex.js +2 -2
  27. package/dist/cjs/src/coinone.js +4 -1
  28. package/dist/cjs/src/coinsph.js +2 -2
  29. package/dist/cjs/src/cryptocom.js +2 -1
  30. package/dist/cjs/src/currencycom.js +2 -2
  31. package/dist/cjs/src/delta.js +4 -2
  32. package/dist/cjs/src/deribit.js +4 -2
  33. package/dist/cjs/src/digifinex.js +3 -1
  34. package/dist/cjs/src/exmo.js +4 -2
  35. package/dist/cjs/src/gate.js +3 -2
  36. package/dist/cjs/src/gemini.js +1 -0
  37. package/dist/cjs/src/hashkey.js +4 -2
  38. package/dist/cjs/src/hitbtc.js +4 -3
  39. package/dist/cjs/src/hollaex.js +3 -2
  40. package/dist/cjs/src/htx.js +12 -2
  41. package/dist/cjs/src/hyperliquid.js +8 -7
  42. package/dist/cjs/src/idex.js +1 -1
  43. package/dist/cjs/src/independentreserve.js +1 -1
  44. package/dist/cjs/src/indodax.js +1 -1
  45. package/dist/cjs/src/kraken.js +4 -2
  46. package/dist/cjs/src/kucoin.js +2 -1
  47. package/dist/cjs/src/kucoinfutures.js +3 -1
  48. package/dist/cjs/src/kuna.js +5 -12
  49. package/dist/cjs/src/lbank.js +11 -9
  50. package/dist/cjs/src/lykke.js +4 -2
  51. package/dist/cjs/src/mexc.js +3 -2
  52. package/dist/cjs/src/ndax.js +30 -2
  53. package/dist/cjs/src/oceanex.js +1 -1
  54. package/dist/cjs/src/okcoin.js +6 -4
  55. package/dist/cjs/src/okx.js +48 -3
  56. package/dist/cjs/src/onetrading.js +3 -2
  57. package/dist/cjs/src/oxfun.js +3 -3
  58. package/dist/cjs/src/paymium.js +2 -1
  59. package/dist/cjs/src/phemex.js +6 -4
  60. package/dist/cjs/src/poloniex.js +4 -2
  61. package/dist/cjs/src/probit.js +3 -2
  62. package/dist/cjs/src/timex.js +4 -9
  63. package/dist/cjs/src/tokocrypto.js +3 -3
  64. package/dist/cjs/src/upbit.js +3 -2
  65. package/dist/cjs/src/wavesexchange.js +7 -7
  66. package/dist/cjs/src/wazirx.js +22 -2
  67. package/dist/cjs/src/whitebit.js +4 -2
  68. package/dist/cjs/src/woo.js +4 -2
  69. package/dist/cjs/src/xt.js +4 -2
  70. package/dist/cjs/src/yobit.js +30 -21
  71. package/dist/cjs/src/zonda.js +27 -2
  72. package/js/ccxt.d.ts +1 -1
  73. package/js/ccxt.js +1 -1
  74. package/js/src/abstract/mexc.d.ts +1 -0
  75. package/js/src/ascendex.d.ts +3 -9
  76. package/js/src/ascendex.js +2 -2
  77. package/js/src/base/Exchange.d.ts +9 -7
  78. package/js/src/base/Exchange.js +14 -1
  79. package/js/src/base/types.d.ts +4 -3
  80. package/js/src/bigone.d.ts +2 -8
  81. package/js/src/bigone.js +4 -2
  82. package/js/src/binance.d.ts +4 -8
  83. package/js/src/binance.js +72 -8
  84. package/js/src/bingx.d.ts +5 -10
  85. package/js/src/bingx.js +62 -2
  86. package/js/src/bit2c.d.ts +3 -15
  87. package/js/src/bit2c.js +3 -1
  88. package/js/src/bitbank.d.ts +2 -8
  89. package/js/src/bitbank.js +4 -2
  90. package/js/src/bitbns.d.ts +2 -8
  91. package/js/src/bitbns.js +4 -2
  92. package/js/src/bitfinex.d.ts +3 -15
  93. package/js/src/bitfinex.js +2 -0
  94. package/js/src/bitfinex2.d.ts +3 -15
  95. package/js/src/bitfinex2.js +2 -0
  96. package/js/src/bitget.d.ts +3 -15
  97. package/js/src/bitget.js +3 -2
  98. package/js/src/bitmart.d.ts +3 -15
  99. package/js/src/bitmart.js +2 -1
  100. package/js/src/bitmex.d.ts +2 -8
  101. package/js/src/bitmex.js +2 -2
  102. package/js/src/bitso.d.ts +2 -8
  103. package/js/src/bitso.js +3 -2
  104. package/js/src/bitstamp.d.ts +2 -8
  105. package/js/src/bitstamp.js +4 -2
  106. package/js/src/bitvavo.d.ts +3 -9
  107. package/js/src/bitvavo.js +6 -4
  108. package/js/src/blockchaincom.d.ts +2 -2
  109. package/js/src/blockchaincom.js +9 -7
  110. package/js/src/blofin.d.ts +1 -0
  111. package/js/src/blofin.js +23 -0
  112. package/js/src/bybit.d.ts +4 -16
  113. package/js/src/bybit.js +9 -5
  114. package/js/src/cex.d.ts +2 -8
  115. package/js/src/cex.js +3 -2
  116. package/js/src/coinbase.d.ts +3 -9
  117. package/js/src/coinbase.js +1 -1
  118. package/js/src/coinbaseinternational.d.ts +1 -19
  119. package/js/src/coinbaseinternational.js +3 -8
  120. package/js/src/coinex.d.ts +4 -22
  121. package/js/src/coinex.js +2 -2
  122. package/js/src/coinone.d.ts +2 -2
  123. package/js/src/coinone.js +4 -1
  124. package/js/src/coinsph.d.ts +3 -15
  125. package/js/src/coinsph.js +2 -2
  126. package/js/src/cryptocom.d.ts +3 -3
  127. package/js/src/cryptocom.js +2 -1
  128. package/js/src/currencycom.d.ts +3 -15
  129. package/js/src/currencycom.js +2 -2
  130. package/js/src/delta.d.ts +3 -15
  131. package/js/src/delta.js +4 -2
  132. package/js/src/deribit.d.ts +2 -8
  133. package/js/src/deribit.js +4 -2
  134. package/js/src/digifinex.d.ts +3 -9
  135. package/js/src/digifinex.js +3 -1
  136. package/js/src/exmo.d.ts +2 -8
  137. package/js/src/exmo.js +4 -2
  138. package/js/src/gate.d.ts +2 -9
  139. package/js/src/gate.js +3 -2
  140. package/js/src/gemini.d.ts +3 -3
  141. package/js/src/gemini.js +1 -0
  142. package/js/src/hashkey.d.ts +3 -15
  143. package/js/src/hashkey.js +4 -2
  144. package/js/src/hitbtc.d.ts +2 -9
  145. package/js/src/hitbtc.js +4 -3
  146. package/js/src/hollaex.d.ts +3 -9
  147. package/js/src/hollaex.js +3 -2
  148. package/js/src/htx.d.ts +3 -3
  149. package/js/src/htx.js +12 -2
  150. package/js/src/hyperliquid.js +8 -7
  151. package/js/src/idex.d.ts +3 -15
  152. package/js/src/idex.js +1 -1
  153. package/js/src/independentreserve.d.ts +3 -15
  154. package/js/src/independentreserve.js +1 -1
  155. package/js/src/indodax.d.ts +2 -2
  156. package/js/src/indodax.js +1 -1
  157. package/js/src/kraken.d.ts +4 -22
  158. package/js/src/kraken.js +4 -2
  159. package/js/src/kucoin.d.ts +5 -23
  160. package/js/src/kucoin.js +2 -1
  161. package/js/src/kucoinfutures.d.ts +2 -8
  162. package/js/src/kucoinfutures.js +3 -1
  163. package/js/src/kuna.d.ts +5 -47
  164. package/js/src/kuna.js +5 -12
  165. package/js/src/lbank.d.ts +4 -16
  166. package/js/src/lbank.js +11 -9
  167. package/js/src/lykke.d.ts +2 -8
  168. package/js/src/lykke.js +4 -2
  169. package/js/src/mexc.d.ts +5 -17
  170. package/js/src/mexc.js +3 -2
  171. package/js/src/ndax.d.ts +4 -22
  172. package/js/src/ndax.js +30 -2
  173. package/js/src/oceanex.d.ts +3 -9
  174. package/js/src/oceanex.js +1 -1
  175. package/js/src/okcoin.d.ts +4 -10
  176. package/js/src/okcoin.js +6 -4
  177. package/js/src/okx.d.ts +5 -10
  178. package/js/src/okx.js +48 -3
  179. package/js/src/onetrading.d.ts +4 -22
  180. package/js/src/onetrading.js +3 -2
  181. package/js/src/oxfun.d.ts +3 -15
  182. package/js/src/oxfun.js +3 -3
  183. package/js/src/paymium.d.ts +5 -23
  184. package/js/src/paymium.js +2 -1
  185. package/js/src/phemex.d.ts +2 -8
  186. package/js/src/phemex.js +6 -4
  187. package/js/src/poloniex.d.ts +2 -8
  188. package/js/src/poloniex.js +4 -2
  189. package/js/src/probit.d.ts +4 -16
  190. package/js/src/probit.js +3 -2
  191. package/js/src/timex.d.ts +4 -38
  192. package/js/src/timex.js +4 -9
  193. package/js/src/tokocrypto.d.ts +2 -8
  194. package/js/src/tokocrypto.js +3 -3
  195. package/js/src/upbit.d.ts +5 -23
  196. package/js/src/upbit.js +3 -2
  197. package/js/src/wavesexchange.d.ts +2 -9
  198. package/js/src/wavesexchange.js +7 -7
  199. package/js/src/wazirx.d.ts +2 -8
  200. package/js/src/wazirx.js +22 -2
  201. package/js/src/whitebit.d.ts +2 -8
  202. package/js/src/whitebit.js +4 -2
  203. package/js/src/woo.d.ts +2 -8
  204. package/js/src/woo.js +4 -2
  205. package/js/src/xt.d.ts +3 -15
  206. package/js/src/xt.js +4 -2
  207. package/js/src/yobit.d.ts +2 -26
  208. package/js/src/yobit.js +30 -21
  209. package/js/src/zonda.d.ts +4 -16
  210. package/js/src/zonda.js +27 -2
  211. package/package.json +1 -1
@@ -50,6 +50,8 @@ class lbank extends lbank$1 {
50
50
  'fetchCrossBorrowRate': false,
51
51
  'fetchCrossBorrowRates': false,
52
52
  'fetchDepositAddress': true,
53
+ 'fetchDepositAddresses': false,
54
+ 'fetchDepositAddressesByNetwork': false,
53
55
  'fetchDepositWithdrawFee': 'emulated',
54
56
  'fetchDepositWithdrawFees': true,
55
57
  'fetchFundingHistory': false,
@@ -1991,11 +1993,11 @@ class lbank extends lbank$1 {
1991
1993
  const inverseNetworks = this.safeValue(this.options, 'inverse-networks', {});
1992
1994
  const networkCode = this.safeStringUpper(inverseNetworks, networkId, networkId);
1993
1995
  return {
1996
+ 'info': response,
1994
1997
  'currency': code,
1998
+ 'network': networkCode,
1995
1999
  'address': address,
1996
2000
  'tag': tag,
1997
- 'network': networkCode,
1998
- 'info': response,
1999
2001
  };
2000
2002
  }
2001
2003
  async fetchDepositAddressSupplement(code, params = {}) {
@@ -2031,11 +2033,11 @@ class lbank extends lbank$1 {
2031
2033
  const inverseNetworks = this.safeValue(this.options, 'inverse-networks', {});
2032
2034
  const networkCode = this.safeStringUpper(inverseNetworks, network, network);
2033
2035
  return {
2036
+ 'info': response,
2034
2037
  'currency': code,
2038
+ 'network': networkCode,
2035
2039
  'address': address,
2036
2040
  'tag': tag,
2037
- 'network': networkCode,
2038
- 'info': response,
2039
2041
  };
2040
2042
  }
2041
2043
  async withdraw(code, amount, address, tag = undefined, params = {}) {
@@ -2470,27 +2472,27 @@ class lbank extends lbank$1 {
2470
2472
  * @description when using private endpoint, only returns information for currencies with non-zero balance, use public method by specifying this.options['fetchDepositWithdrawFees']['method'] = 'fetchPublicDepositWithdrawFees'
2471
2473
  * @see https://www.lbank.com/en-US/docs/index.html#get-all-coins-information
2472
2474
  * @see https://www.lbank.com/en-US/docs/index.html#withdrawal-configurations
2473
- * @param {string[]|undefined} codes array of unified currency codes
2475
+ * @param {string[]} [codes] array of unified currency codes
2474
2476
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2475
2477
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
2476
2478
  */
2477
2479
  await this.loadMarkets();
2478
2480
  const isAuthorized = this.checkRequiredCredentials(false);
2479
- const response = undefined;
2481
+ let response = undefined;
2480
2482
  if (isAuthorized === true) {
2481
2483
  const options = this.safeValue(this.options, 'fetchDepositWithdrawFees', {});
2482
2484
  const defaultMethod = this.safeString(options, 'method', 'fetchPrivateDepositWithdrawFees');
2483
2485
  const method = this.safeString(params, 'method', defaultMethod);
2484
2486
  params = this.omit(params, 'method');
2485
2487
  if (method === 'fetchPublicDepositWithdrawFees') {
2486
- await this.fetchPublicDepositWithdrawFees(codes, params);
2488
+ response = await this.fetchPublicDepositWithdrawFees(codes, params);
2487
2489
  }
2488
2490
  else {
2489
- await this.fetchPrivateDepositWithdrawFees(codes, params);
2491
+ response = await this.fetchPrivateDepositWithdrawFees(codes, params);
2490
2492
  }
2491
2493
  }
2492
2494
  else {
2493
- await this.fetchPublicDepositWithdrawFees(codes, params);
2495
+ response = await this.fetchPublicDepositWithdrawFees(codes, params);
2494
2496
  }
2495
2497
  return response;
2496
2498
  }
@@ -43,6 +43,8 @@ class lykke extends lykke$1 {
43
43
  'fetchCrossBorrowRates': false,
44
44
  'fetchCurrencies': true,
45
45
  'fetchDepositAddress': true,
46
+ 'fetchDepositAddresses': false,
47
+ 'fetchDepositAddressesByNetwork': false,
46
48
  'fetchDeposits': false,
47
49
  'fetchDepositsWithdrawals': true,
48
50
  'fetchFundingHistory': false,
@@ -1142,11 +1144,11 @@ class lykke extends lykke$1 {
1142
1144
  const tag = this.safeString(response, 'addressExtension');
1143
1145
  this.checkAddress(address);
1144
1146
  return {
1147
+ 'info': response,
1145
1148
  'currency': code,
1149
+ 'network': undefined,
1146
1150
  'address': address,
1147
1151
  'tag': tag,
1148
- 'network': undefined,
1149
- 'info': response,
1150
1152
  };
1151
1153
  }
1152
1154
  parseTransaction(transaction, currency = undefined) {
@@ -228,6 +228,7 @@ class mexc extends mexc$1 {
228
228
  'rebate/affiliate/commission/detail': 1,
229
229
  'mxDeduct/enable': 1,
230
230
  'userDataStream': 1,
231
+ 'selfSymbols': 1,
231
232
  },
232
233
  'post': {
233
234
  'order': 1,
@@ -4530,11 +4531,11 @@ class mexc extends mexc$1 {
4530
4531
  const networkId = this.safeString(depositAddress, 'netWork');
4531
4532
  this.checkAddress(address);
4532
4533
  return {
4534
+ 'info': depositAddress,
4533
4535
  'currency': this.safeCurrencyCode(currencyId, currency),
4536
+ 'network': this.networkIdToCode(networkId),
4534
4537
  'address': address,
4535
4538
  'tag': this.safeString(depositAddress, 'memo'),
4536
- 'network': this.networkIdToCode(networkId),
4537
- 'info': depositAddress,
4538
4539
  };
4539
4540
  }
4540
4541
  async fetchDepositAddressesByNetwork(code, params = {}) {
@@ -42,29 +42,51 @@ class ndax extends ndax$1 {
42
42
  'editOrder': true,
43
43
  'fetchAccounts': true,
44
44
  'fetchBalance': true,
45
+ 'fetchBorrowInterest': false,
46
+ 'fetchBorrowRate': false,
45
47
  'fetchBorrowRateHistories': false,
46
48
  'fetchBorrowRateHistory': false,
49
+ 'fetchBorrowRates': false,
50
+ 'fetchBorrowRatesPerSymbol': false,
47
51
  'fetchCrossBorrowRate': false,
48
52
  'fetchCrossBorrowRates': false,
49
53
  'fetchCurrencies': true,
50
54
  'fetchDepositAddress': true,
55
+ 'fetchDepositAddresses': false,
56
+ 'fetchDepositAddressesByNetwork': false,
51
57
  'fetchDeposits': true,
52
58
  'fetchFundingHistory': false,
59
+ 'fetchFundingInterval': false,
60
+ 'fetchFundingIntervals': false,
53
61
  'fetchFundingRate': false,
54
62
  'fetchFundingRateHistory': false,
55
63
  'fetchFundingRates': false,
64
+ 'fetchGreeks': false,
56
65
  'fetchIndexOHLCV': false,
57
66
  'fetchIsolatedBorrowRate': false,
58
67
  'fetchIsolatedBorrowRates': false,
68
+ 'fetchIsolatedPositions': false,
59
69
  'fetchLedger': true,
60
70
  'fetchLeverage': false,
71
+ 'fetchLeverages': false,
61
72
  'fetchLeverageTiers': false,
73
+ 'fetchLiquidations': false,
74
+ 'fetchMarginAdjustmentHistory': false,
75
+ 'fetchMarginMode': false,
76
+ 'fetchMarginModes': false,
77
+ 'fetchMarketLeverageTiers': false,
62
78
  'fetchMarkets': true,
63
79
  'fetchMarkOHLCV': false,
80
+ 'fetchMarkPrices': false,
81
+ 'fetchMyLiquidations': false,
82
+ 'fetchMySettlementHistory': false,
64
83
  'fetchMyTrades': true,
65
84
  'fetchOHLCV': true,
85
+ 'fetchOpenInterest': false,
66
86
  'fetchOpenInterestHistory': false,
67
87
  'fetchOpenOrders': true,
88
+ 'fetchOption': false,
89
+ 'fetchOptionChain': false,
68
90
  'fetchOrder': true,
69
91
  'fetchOrderBook': true,
70
92
  'fetchOrders': true,
@@ -77,16 +99,22 @@ class ndax extends ndax$1 {
77
99
  'fetchPositionsHistory': false,
78
100
  'fetchPositionsRisk': false,
79
101
  'fetchPremiumIndexOHLCV': false,
102
+ 'fetchSettlementHistory': false,
80
103
  'fetchTicker': true,
81
104
  'fetchTickers': false,
82
105
  'fetchTime': false,
83
106
  'fetchTrades': true,
84
107
  'fetchTradingFee': false,
85
108
  'fetchTradingFees': false,
109
+ 'fetchUnderlyingAssets': false,
110
+ 'fetchVolatilityHistory': false,
86
111
  'fetchWithdrawals': true,
87
112
  'reduceMargin': false,
113
+ 'repayCrossMargin': false,
114
+ 'repayIsolatedMargin': false,
88
115
  'sandbox': true,
89
116
  'setLeverage': false,
117
+ 'setMargin': false,
90
118
  'setMarginMode': false,
91
119
  'setPositionMode': false,
92
120
  'signIn': true,
@@ -2017,11 +2045,11 @@ class ndax extends ndax$1 {
2017
2045
  }
2018
2046
  this.checkAddress(address);
2019
2047
  return {
2048
+ 'info': depositAddress,
2020
2049
  'currency': code,
2050
+ 'network': undefined,
2021
2051
  'address': address,
2022
2052
  'tag': tag,
2023
- 'network': undefined,
2024
- 'info': depositAddress,
2025
2053
  };
2026
2054
  }
2027
2055
  async createDepositAddress(code, params = {}) {
@@ -985,9 +985,9 @@ class oceanex extends oceanex$1 {
985
985
  return {
986
986
  'info': depositAddress,
987
987
  'currency': this.safeCurrencyCode(currencyId, currency),
988
+ 'network': this.networkIdToCode(networkId),
988
989
  'address': address,
989
990
  'tag': this.safeString(depositAddress, 'memo'),
990
- 'network': this.networkIdToCode(networkId),
991
991
  };
992
992
  }
993
993
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
@@ -45,6 +45,8 @@ class okcoin extends okcoin$1 {
45
45
  'fetchClosedOrders': true,
46
46
  'fetchCurrencies': true,
47
47
  'fetchDepositAddress': true,
48
+ 'fetchDepositAddresses': false,
49
+ 'fetchDepositAddressesByNetwork': false,
48
50
  'fetchDeposits': true,
49
51
  'fetchFundingHistory': false,
50
52
  'fetchFundingRate': false,
@@ -2247,17 +2249,17 @@ class okcoin extends okcoin$1 {
2247
2249
  //
2248
2250
  this.checkAddress(address);
2249
2251
  return {
2252
+ 'info': depositAddress,
2250
2253
  'currency': code,
2254
+ 'network': network,
2251
2255
  'address': address,
2252
2256
  'tag': tag,
2253
- 'network': network,
2254
- 'info': depositAddress,
2255
2257
  };
2256
2258
  }
2257
2259
  async fetchDepositAddress(code, params = {}) {
2258
2260
  /**
2259
2261
  * @method
2260
- * @name okx#fetchDepositAddress
2262
+ * @name okcoin#fetchDepositAddress
2261
2263
  * @description fetch the deposit address for a currency associated with this account
2262
2264
  * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
2263
2265
  * @param {string} code unified currency code
@@ -2279,7 +2281,7 @@ class okcoin extends okcoin$1 {
2279
2281
  async fetchDepositAddressesByNetwork(code, params = {}) {
2280
2282
  /**
2281
2283
  * @method
2282
- * @name okx#fetchDepositAddressesByNetwork
2284
+ * @name okcoin#fetchDepositAddressesByNetwork
2283
2285
  * @description fetch a dictionary of addresses for a currency, indexed by network
2284
2286
  * @see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
2285
2287
  * @param {string} code unified currency code of the currency for the deposit address
@@ -97,6 +97,7 @@ class okx extends okx$1 {
97
97
  'fetchMarketLeverageTiers': true,
98
98
  'fetchMarkets': true,
99
99
  'fetchMarkOHLCV': true,
100
+ 'fetchMarkPrice': true,
100
101
  'fetchMarkPrices': true,
101
102
  'fetchMySettlementHistory': false,
102
103
  'fetchMyTrades': true,
@@ -1830,6 +1831,16 @@ class okx extends okx$1 {
1830
1831
  // "sodUtc0": "0.07872",
1831
1832
  // "sodUtc8": "0.07345"
1832
1833
  // }
1834
+ // {
1835
+ // instId: 'LTC-USDT',
1836
+ // idxPx: '65.74',
1837
+ // open24h: '65.37',
1838
+ // high24h: '66.15',
1839
+ // low24h: '64.97',
1840
+ // sodUtc0: '65.68',
1841
+ // sodUtc8: '65.54',
1842
+ // ts: '1728467346900'
1843
+ // },
1833
1844
  //
1834
1845
  const timestamp = this.safeInteger(ticker, 'ts');
1835
1846
  const marketId = this.safeString(ticker, 'instId');
@@ -1863,6 +1874,7 @@ class okx extends okx$1 {
1863
1874
  'baseVolume': baseVolume,
1864
1875
  'quoteVolume': quoteVolume,
1865
1876
  'markPrice': this.safeString(ticker, 'markPx'),
1877
+ 'indexPrice': this.safeString(ticker, 'idxPx'),
1866
1878
  'info': ticker,
1867
1879
  }, market);
1868
1880
  }
@@ -1970,6 +1982,39 @@ class okx extends okx$1 {
1970
1982
  const tickers = this.safeList(response, 'data', []);
1971
1983
  return this.parseTickers(tickers, symbols);
1972
1984
  }
1985
+ async fetchMarkPrice(symbol, params = {}) {
1986
+ /**
1987
+ * @method
1988
+ * @name okx#fetchMarkPrice
1989
+ * @description fetches mark price for the market
1990
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-mark-price
1991
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1992
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1993
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1994
+ */
1995
+ await this.loadMarkets();
1996
+ const market = this.market(symbol);
1997
+ const request = {
1998
+ 'instId': market['id'],
1999
+ };
2000
+ const response = await this.publicGetPublicMarkPrice(this.extend(request, params));
2001
+ //
2002
+ // {
2003
+ // "code": "0",
2004
+ // "data": [
2005
+ // {
2006
+ // "instId": "ETH-USDT",
2007
+ // "instType": "MARGIN",
2008
+ // "markPx": "2403.98",
2009
+ // "ts": "1728578500703"
2010
+ // }
2011
+ // ],
2012
+ // "msg": ""
2013
+ // }
2014
+ //
2015
+ const data = this.safeList(response, 'data');
2016
+ return this.parseTicker(this.safeDict(data, 0), market);
2017
+ }
1973
2018
  async fetchMarkPrices(symbols = undefined, params = {}) {
1974
2019
  /**
1975
2020
  * @method
@@ -1992,7 +2037,7 @@ class okx extends okx$1 {
1992
2037
  const defaultUnderlying = this.safeString(this.options, 'defaultUnderlying', 'BTC-USD');
1993
2038
  const currencyId = this.safeString2(params, 'uly', 'marketId', defaultUnderlying);
1994
2039
  if (currencyId === undefined) {
1995
- throw new errors.ArgumentsRequired(this.id + ' fetchTickers() requires an underlying uly or marketId parameter for options markets');
2040
+ throw new errors.ArgumentsRequired(this.id + ' fetchMarkPrices() requires an underlying uly or marketId parameter for options markets');
1996
2041
  }
1997
2042
  else {
1998
2043
  request['uly'] = currencyId;
@@ -4811,11 +4856,11 @@ class okx extends okx$1 {
4811
4856
  const networkCode = this.networkIdToCode(network, code);
4812
4857
  this.checkAddress(address);
4813
4858
  return {
4859
+ 'info': depositAddress,
4814
4860
  'currency': code,
4861
+ 'network': networkCode,
4815
4862
  'address': address,
4816
4863
  'tag': tag,
4817
- 'network': networkCode,
4818
- 'info': depositAddress,
4819
4864
  };
4820
4865
  }
4821
4866
  async fetchDepositAddressesByNetwork(code, params = {}) {
@@ -51,6 +51,7 @@ class onetrading extends onetrading$1 {
51
51
  'fetchDeposit': false,
52
52
  'fetchDepositAddress': true,
53
53
  'fetchDepositAddresses': false,
54
+ 'fetchDepositAddressesByNetwork': false,
54
55
  'fetchDeposits': true,
55
56
  'fetchDepositsWithdrawals': false,
56
57
  'fetchFundingHistory': false,
@@ -1033,11 +1034,11 @@ class onetrading extends onetrading$1 {
1033
1034
  const tag = this.safeString(depositAddress, 'destination_tag');
1034
1035
  this.checkAddress(address);
1035
1036
  return {
1037
+ 'info': depositAddress,
1036
1038
  'currency': code,
1039
+ 'network': undefined,
1037
1040
  'address': address,
1038
1041
  'tag': tag,
1039
- 'network': undefined,
1040
- 'info': depositAddress,
1041
1042
  };
1042
1043
  }
1043
1044
  async createDepositAddress(code, params = {}) {
@@ -60,7 +60,7 @@ class oxfun extends oxfun$1 {
60
60
  'fetchCrossBorrowRates': false,
61
61
  'fetchCurrencies': true,
62
62
  'fetchDeposit': false,
63
- 'fetchDepositAddress': false,
63
+ 'fetchDepositAddress': true,
64
64
  'fetchDepositAddresses': false,
65
65
  'fetchDepositAddressesByNetwork': false,
66
66
  'fetchDeposits': true,
@@ -1801,11 +1801,11 @@ class oxfun extends oxfun$1 {
1801
1801
  const address = this.safeString(depositAddress, 'address');
1802
1802
  this.checkAddress(address);
1803
1803
  return {
1804
+ 'info': depositAddress,
1804
1805
  'currency': currency['code'],
1806
+ 'network': undefined,
1805
1807
  'address': address,
1806
1808
  'tag': undefined,
1807
- 'network': undefined,
1808
- 'info': depositAddress,
1809
1809
  };
1810
1810
  }
1811
1811
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -33,6 +33,7 @@ class paymium extends paymium$1 {
33
33
  'fetchBalance': true,
34
34
  'fetchDepositAddress': true,
35
35
  'fetchDepositAddresses': true,
36
+ 'fetchDepositAddressesByNetwork': false,
36
37
  'fetchFundingHistory': false,
37
38
  'fetchFundingRate': false,
38
39
  'fetchFundingRateHistory': false,
@@ -375,9 +376,9 @@ class paymium extends paymium$1 {
375
376
  return {
376
377
  'info': depositAddress,
377
378
  'currency': this.safeCurrencyCode(currencyId, currency),
379
+ 'network': undefined,
378
380
  'address': address,
379
381
  'tag': undefined,
380
- 'network': undefined,
381
382
  };
382
383
  }
383
384
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
@@ -48,6 +48,8 @@ class phemex extends phemex$1 {
48
48
  'fetchCrossBorrowRates': false,
49
49
  'fetchCurrencies': true,
50
50
  'fetchDepositAddress': true,
51
+ 'fetchDepositAddresses': false,
52
+ 'fetchDepositAddressesByNetwork': false,
51
53
  'fetchDeposits': true,
52
54
  'fetchFundingHistory': true,
53
55
  'fetchFundingRate': true,
@@ -3397,9 +3399,9 @@ class phemex extends phemex$1 {
3397
3399
  const request = {
3398
3400
  'currency': currency['id'],
3399
3401
  };
3400
- const defaultNetworks = this.safeValue(this.options, 'defaultNetworks');
3402
+ const defaultNetworks = this.safeDict(this.options, 'defaultNetworks');
3401
3403
  const defaultNetwork = this.safeStringUpper(defaultNetworks, code);
3402
- const networks = this.safeValue(this.options, 'networks', {});
3404
+ const networks = this.safeDict(this.options, 'networks', {});
3403
3405
  let network = this.safeStringUpper(params, 'network', defaultNetwork);
3404
3406
  network = this.safeString(networks, network, network);
3405
3407
  if (network === undefined) {
@@ -3424,11 +3426,11 @@ class phemex extends phemex$1 {
3424
3426
  const tag = this.safeString(data, 'tag');
3425
3427
  this.checkAddress(address);
3426
3428
  return {
3429
+ 'info': response,
3427
3430
  'currency': code,
3431
+ 'network': undefined,
3428
3432
  'address': address,
3429
3433
  'tag': tag,
3430
- 'network': undefined,
3431
- 'info': response,
3432
3434
  };
3433
3435
  }
3434
3436
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -41,6 +41,8 @@ class poloniex extends poloniex$1 {
41
41
  'fetchClosedOrder': false,
42
42
  'fetchCurrencies': true,
43
43
  'fetchDepositAddress': true,
44
+ 'fetchDepositAddresses': false,
45
+ 'fetchDepositAddressesByNetwork': false,
44
46
  'fetchDeposits': true,
45
47
  'fetchDepositsWithdrawals': true,
46
48
  'fetchDepositWithdrawFee': 'emulated',
@@ -1830,11 +1832,11 @@ class poloniex extends poloniex$1 {
1830
1832
  }
1831
1833
  }
1832
1834
  return {
1835
+ 'info': response,
1833
1836
  'currency': code,
1837
+ 'network': network,
1834
1838
  'address': address,
1835
1839
  'tag': tag,
1836
- 'network': network,
1837
- 'info': response,
1838
1840
  };
1839
1841
  }
1840
1842
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
@@ -46,6 +46,7 @@ class probit extends probit$1 {
46
46
  'fetchCurrencies': true,
47
47
  'fetchDepositAddress': true,
48
48
  'fetchDepositAddresses': true,
49
+ 'fetchDepositAddressesByNetwork': false,
49
50
  'fetchDeposits': true,
50
51
  'fetchDepositsWithdrawals': true,
51
52
  'fetchFundingHistory': false,
@@ -1307,11 +1308,11 @@ class probit extends probit$1 {
1307
1308
  const network = this.safeString(depositAddress, 'platform_id');
1308
1309
  this.checkAddress(address);
1309
1310
  return {
1311
+ 'info': depositAddress,
1310
1312
  'currency': code,
1313
+ 'network': network,
1311
1314
  'address': address,
1312
1315
  'tag': tag,
1313
- 'network': network,
1314
- 'info': depositAddress,
1315
1316
  };
1316
1317
  }
1317
1318
  async fetchDepositAddress(code, params = {}) {
@@ -351,12 +351,7 @@ class timex extends timex$1 {
351
351
  // },
352
352
  // ]
353
353
  //
354
- const result = [];
355
- for (let i = 0; i < response.length; i++) {
356
- const currency = response[i];
357
- result.push(this.parseCurrency(currency));
358
- }
359
- return this.indexBy(result, 'code');
354
+ return this.parseCurrencies(response);
360
355
  }
361
356
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
362
357
  /**
@@ -1359,7 +1354,7 @@ class timex extends timex$1 {
1359
1354
  fee = this.parseNumber(fraction + feeString);
1360
1355
  }
1361
1356
  }
1362
- return {
1357
+ return this.safeCurrencyStructure({
1363
1358
  'id': code,
1364
1359
  'code': code,
1365
1360
  'info': currency,
@@ -1375,7 +1370,7 @@ class timex extends timex$1 {
1375
1370
  'amount': { 'min': undefined, 'max': undefined },
1376
1371
  },
1377
1372
  'networks': {},
1378
- };
1373
+ });
1379
1374
  }
1380
1375
  parseTicker(ticker, market = undefined) {
1381
1376
  //
@@ -1633,9 +1628,9 @@ class timex extends timex$1 {
1633
1628
  return {
1634
1629
  'info': depositAddress,
1635
1630
  'currency': this.safeCurrencyCode(currencyId, currency),
1631
+ 'network': undefined,
1636
1632
  'address': this.safeString(depositAddress, 'address'),
1637
1633
  'tag': undefined,
1638
- 'network': undefined,
1639
1634
  };
1640
1635
  }
1641
1636
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
@@ -2038,8 +2038,8 @@ class tokocrypto extends tokocrypto$1 {
2038
2038
  /**
2039
2039
  * @method
2040
2040
  * @name tokocrypto#fetchDepositAddress
2041
- * @see https://www.tokocrypto.com/apidocs/#deposit-address-signed
2042
2041
  * @description fetch the deposit address for a currency associated with this account
2042
+ * @see https://www.tokocrypto.com/apidocs/#deposit-address-signed
2043
2043
  * @param {string} code unified currency code
2044
2044
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2045
2045
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -2083,11 +2083,11 @@ class tokocrypto extends tokocrypto$1 {
2083
2083
  }
2084
2084
  this.checkAddress(address);
2085
2085
  return {
2086
+ 'info': response,
2086
2087
  'currency': code,
2088
+ 'network': this.safeString(data, 'network'),
2087
2089
  'address': address,
2088
2090
  'tag': tag,
2089
- 'network': this.safeString(data, 'network'),
2090
- 'info': response,
2091
2091
  };
2092
2092
  }
2093
2093
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -44,6 +44,7 @@ class upbit extends upbit$1 {
44
44
  'fetchDeposit': true,
45
45
  'fetchDepositAddress': true,
46
46
  'fetchDepositAddresses': true,
47
+ 'fetchDepositAddressesByNetwork': false,
47
48
  'fetchDeposits': true,
48
49
  'fetchFundingHistory': false,
49
50
  'fetchFundingRate': false,
@@ -1838,11 +1839,11 @@ class upbit extends upbit$1 {
1838
1839
  const networkId = this.safeString(depositAddress, 'net_type');
1839
1840
  this.checkAddress(address);
1840
1841
  return {
1842
+ 'info': depositAddress,
1841
1843
  'currency': code,
1844
+ 'network': this.networkIdToCode(networkId),
1842
1845
  'address': address,
1843
1846
  'tag': tag,
1844
- 'network': this.networkIdToCode(networkId),
1845
- 'info': depositAddress,
1846
1847
  };
1847
1848
  }
1848
1849
  async fetchDepositAddress(code, params = {}) {
@@ -45,6 +45,8 @@ class wavesexchange extends wavesexchange$1 {
45
45
  'fetchCrossBorrowRate': false,
46
46
  'fetchCrossBorrowRates': false,
47
47
  'fetchDepositAddress': true,
48
+ 'fetchDepositAddresses': undefined,
49
+ 'fetchDepositAddressesByNetwork': undefined,
48
50
  'fetchDepositWithdrawFee': 'emulated',
49
51
  'fetchDepositWithdrawFees': true,
50
52
  'fetchFundingHistory': false,
@@ -1143,12 +1145,11 @@ class wavesexchange extends wavesexchange$1 {
1143
1145
  const responseInner = await this.nodeGetAddressesPublicKeyPublicKey(this.extend(request, request));
1144
1146
  const addressInner = this.safeString(response, 'address');
1145
1147
  return {
1146
- 'address': addressInner,
1147
- 'code': code,
1148
+ 'info': responseInner,
1148
1149
  'currency': code,
1149
1150
  'network': network,
1151
+ 'address': addressInner,
1150
1152
  'tag': undefined,
1151
- 'info': responseInner,
1152
1153
  };
1153
1154
  }
1154
1155
  else {
@@ -1189,12 +1190,11 @@ class wavesexchange extends wavesexchange$1 {
1189
1190
  const addresses = this.safeValue(response, 'deposit_addresses');
1190
1191
  const address = this.safeString(addresses, 0);
1191
1192
  return {
1192
- 'address': address,
1193
- 'code': code,
1193
+ 'info': response,
1194
1194
  'currency': code,
1195
- 'tag': undefined,
1196
1195
  'network': unifiedNetwork,
1197
- 'info': response,
1196
+ 'address': address,
1197
+ 'tag': undefined,
1198
1198
  };
1199
1199
  }
1200
1200
  async getMatcherPublicKey() {