ccxt 4.1.85 → 4.1.86

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 (295) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.js +724 -388
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/src/ace.js +1 -1
  6. package/dist/cjs/src/alpaca.js +2 -2
  7. package/dist/cjs/src/ascendex.js +2 -2
  8. package/dist/cjs/src/base/Exchange.js +50 -20
  9. package/dist/cjs/src/bigone.js +1 -1
  10. package/dist/cjs/src/binance.js +2 -2
  11. package/dist/cjs/src/bingx.js +1 -1
  12. package/dist/cjs/src/bit2c.js +1 -1
  13. package/dist/cjs/src/bitbank.js +1 -1
  14. package/dist/cjs/src/bitbns.js +1 -1
  15. package/dist/cjs/src/bitfinex.js +1 -1
  16. package/dist/cjs/src/bitfinex2.js +1 -1
  17. package/dist/cjs/src/bitflyer.js +1 -1
  18. package/dist/cjs/src/bitforex.js +1 -1
  19. package/dist/cjs/src/bitget.js +2 -3
  20. package/dist/cjs/src/bithumb.js +1 -1
  21. package/dist/cjs/src/bitmart.js +1 -1
  22. package/dist/cjs/src/bitmex.js +2 -2
  23. package/dist/cjs/src/bitopro.js +1 -1
  24. package/dist/cjs/src/bitpanda.js +1 -1
  25. package/dist/cjs/src/bitrue.js +1 -1
  26. package/dist/cjs/src/bitso.js +1 -1
  27. package/dist/cjs/src/bitstamp.js +1 -1
  28. package/dist/cjs/src/bittrex.js +1 -1
  29. package/dist/cjs/src/bitvavo.js +1 -1
  30. package/dist/cjs/src/bl3p.js +1 -1
  31. package/dist/cjs/src/blockchaincom.js +1 -1
  32. package/dist/cjs/src/btcalpha.js +1 -1
  33. package/dist/cjs/src/btcbox.js +1 -1
  34. package/dist/cjs/src/btcmarkets.js +1 -1
  35. package/dist/cjs/src/btcturk.js +1 -1
  36. package/dist/cjs/src/bybit.js +3 -5
  37. package/dist/cjs/src/cex.js +1 -1
  38. package/dist/cjs/src/coinbase.js +1 -1
  39. package/dist/cjs/src/coinbasepro.js +1 -1
  40. package/dist/cjs/src/coincheck.js +1 -1
  41. package/dist/cjs/src/coinex.js +2 -2
  42. package/dist/cjs/src/coinlist.js +1 -1
  43. package/dist/cjs/src/coinmate.js +1 -1
  44. package/dist/cjs/src/coinone.js +1 -1
  45. package/dist/cjs/src/coinsph.js +1 -1
  46. package/dist/cjs/src/coinspot.js +1 -1
  47. package/dist/cjs/src/cryptocom.js +3 -3
  48. package/dist/cjs/src/currencycom.js +1 -1
  49. package/dist/cjs/src/delta.js +1 -1
  50. package/dist/cjs/src/deribit.js +1 -1
  51. package/dist/cjs/src/digifinex.js +160 -112
  52. package/dist/cjs/src/exmo.js +1 -1
  53. package/dist/cjs/src/gate.js +1 -1
  54. package/dist/cjs/src/gemini.js +1 -1
  55. package/dist/cjs/src/hitbtc.js +2 -2
  56. package/dist/cjs/src/hitbtc3.js +1 -1
  57. package/dist/cjs/src/hollaex.js +1 -1
  58. package/dist/cjs/src/htx.js +2 -2
  59. package/dist/cjs/src/huobijp.js +1 -1
  60. package/dist/cjs/src/idex.js +1 -1
  61. package/dist/cjs/src/independentreserve.js +1 -1
  62. package/dist/cjs/src/indodax.js +1 -1
  63. package/dist/cjs/src/kraken.js +2 -2
  64. package/dist/cjs/src/krakenfutures.js +3 -3
  65. package/dist/cjs/src/kucoin.js +2 -6
  66. package/dist/cjs/src/kuna.js +1 -1
  67. package/dist/cjs/src/latoken.js +2 -2
  68. package/dist/cjs/src/lbank.js +1 -1
  69. package/dist/cjs/src/luno.js +1 -1
  70. package/dist/cjs/src/lykke.js +1 -1
  71. package/dist/cjs/src/mercado.js +1 -1
  72. package/dist/cjs/src/mexc.js +102 -53
  73. package/dist/cjs/src/ndax.js +1 -1
  74. package/dist/cjs/src/novadax.js +1 -1
  75. package/dist/cjs/src/oceanex.js +1 -1
  76. package/dist/cjs/src/okcoin.js +1 -1
  77. package/dist/cjs/src/okx.js +4 -4
  78. package/dist/cjs/src/p2b.js +1 -3
  79. package/dist/cjs/src/paymium.js +1 -1
  80. package/dist/cjs/src/phemex.js +1 -1
  81. package/dist/cjs/src/poloniex.js +51 -51
  82. package/dist/cjs/src/poloniexfutures.js +1 -1
  83. package/dist/cjs/src/pro/bitget.js +1 -1
  84. package/dist/cjs/src/pro/bitmex.js +206 -0
  85. package/dist/cjs/src/pro/krakenfutures.js +6 -6
  86. package/dist/cjs/src/pro/mexc.js +1 -1
  87. package/dist/cjs/src/pro/poloniex.js +1 -1
  88. package/dist/cjs/src/pro/poloniexfutures.js +3 -3
  89. package/dist/cjs/src/probit.js +27 -19
  90. package/dist/cjs/src/static_dependencies/jsencrypt/JSEncrypt.js +1 -1
  91. package/dist/cjs/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +3 -3
  92. package/dist/cjs/src/timex.js +1 -1
  93. package/dist/cjs/src/tokocrypto.js +8 -4
  94. package/dist/cjs/src/upbit.js +1 -1
  95. package/dist/cjs/src/wavesexchange.js +1 -1
  96. package/dist/cjs/src/wazirx.js +1 -1
  97. package/dist/cjs/src/whitebit.js +1 -1
  98. package/dist/cjs/src/woo.js +1 -1
  99. package/dist/cjs/src/yobit.js +1 -1
  100. package/dist/cjs/src/zaif.js +1 -1
  101. package/dist/cjs/src/zonda.js +1 -1
  102. package/js/ccxt.d.ts +1 -1
  103. package/js/ccxt.js +1 -1
  104. package/js/src/ace.d.ts +1 -1
  105. package/js/src/ace.js +1 -1
  106. package/js/src/alpaca.d.ts +1 -1
  107. package/js/src/alpaca.js +2 -2
  108. package/js/src/ascendex.d.ts +1 -1
  109. package/js/src/ascendex.js +2 -2
  110. package/js/src/base/Exchange.d.ts +4 -0
  111. package/js/src/base/Exchange.js +50 -20
  112. package/js/src/base/types.d.ts +1 -0
  113. package/js/src/bigone.d.ts +1 -1
  114. package/js/src/bigone.js +1 -1
  115. package/js/src/binance.d.ts +1 -1
  116. package/js/src/binance.js +2 -2
  117. package/js/src/bingx.js +1 -1
  118. package/js/src/bit2c.d.ts +1 -1
  119. package/js/src/bit2c.js +1 -1
  120. package/js/src/bitbank.d.ts +1 -1
  121. package/js/src/bitbank.js +1 -1
  122. package/js/src/bitbns.d.ts +1 -1
  123. package/js/src/bitbns.js +1 -1
  124. package/js/src/bitfinex.d.ts +1 -1
  125. package/js/src/bitfinex.js +1 -1
  126. package/js/src/bitfinex2.d.ts +1 -1
  127. package/js/src/bitfinex2.js +1 -1
  128. package/js/src/bitflyer.d.ts +1 -1
  129. package/js/src/bitflyer.js +1 -1
  130. package/js/src/bitforex.d.ts +1 -1
  131. package/js/src/bitforex.js +1 -1
  132. package/js/src/bitget.d.ts +1 -1
  133. package/js/src/bitget.js +2 -3
  134. package/js/src/bithumb.d.ts +1 -1
  135. package/js/src/bithumb.js +1 -1
  136. package/js/src/bitmart.d.ts +1 -1
  137. package/js/src/bitmart.js +1 -1
  138. package/js/src/bitmex.d.ts +1 -1
  139. package/js/src/bitmex.js +2 -2
  140. package/js/src/bitopro.d.ts +1 -1
  141. package/js/src/bitopro.js +1 -1
  142. package/js/src/bitpanda.d.ts +1 -1
  143. package/js/src/bitpanda.js +1 -1
  144. package/js/src/bitrue.d.ts +1 -1
  145. package/js/src/bitrue.js +1 -1
  146. package/js/src/bitso.d.ts +1 -1
  147. package/js/src/bitso.js +1 -1
  148. package/js/src/bitstamp.d.ts +1 -1
  149. package/js/src/bitstamp.js +1 -1
  150. package/js/src/bittrex.d.ts +1 -1
  151. package/js/src/bittrex.js +1 -1
  152. package/js/src/bitvavo.d.ts +1 -1
  153. package/js/src/bitvavo.js +1 -1
  154. package/js/src/bl3p.d.ts +1 -1
  155. package/js/src/bl3p.js +1 -1
  156. package/js/src/blockchaincom.d.ts +1 -1
  157. package/js/src/blockchaincom.js +1 -1
  158. package/js/src/btcalpha.d.ts +1 -1
  159. package/js/src/btcalpha.js +1 -1
  160. package/js/src/btcbox.d.ts +1 -1
  161. package/js/src/btcbox.js +1 -1
  162. package/js/src/btcmarkets.d.ts +1 -1
  163. package/js/src/btcmarkets.js +1 -1
  164. package/js/src/btcturk.d.ts +1 -1
  165. package/js/src/btcturk.js +1 -1
  166. package/js/src/bybit.d.ts +1 -1
  167. package/js/src/bybit.js +3 -5
  168. package/js/src/cex.d.ts +1 -1
  169. package/js/src/cex.js +1 -1
  170. package/js/src/coinbase.d.ts +1 -1
  171. package/js/src/coinbase.js +1 -1
  172. package/js/src/coinbasepro.d.ts +1 -1
  173. package/js/src/coinbasepro.js +1 -1
  174. package/js/src/coincheck.d.ts +1 -1
  175. package/js/src/coincheck.js +1 -1
  176. package/js/src/coinex.d.ts +1 -1
  177. package/js/src/coinex.js +2 -2
  178. package/js/src/coinlist.d.ts +1 -1
  179. package/js/src/coinlist.js +1 -1
  180. package/js/src/coinmate.d.ts +1 -1
  181. package/js/src/coinmate.js +1 -1
  182. package/js/src/coinone.d.ts +1 -1
  183. package/js/src/coinone.js +1 -1
  184. package/js/src/coinsph.d.ts +1 -1
  185. package/js/src/coinsph.js +1 -1
  186. package/js/src/coinspot.d.ts +1 -1
  187. package/js/src/coinspot.js +1 -1
  188. package/js/src/cryptocom.d.ts +1 -1
  189. package/js/src/cryptocom.js +3 -3
  190. package/js/src/currencycom.d.ts +1 -1
  191. package/js/src/currencycom.js +1 -1
  192. package/js/src/delta.d.ts +1 -1
  193. package/js/src/delta.js +1 -1
  194. package/js/src/deribit.d.ts +1 -1
  195. package/js/src/deribit.js +1 -1
  196. package/js/src/digifinex.d.ts +1 -1
  197. package/js/src/digifinex.js +160 -112
  198. package/js/src/exmo.d.ts +1 -1
  199. package/js/src/exmo.js +1 -1
  200. package/js/src/gate.d.ts +1 -1
  201. package/js/src/gate.js +1 -1
  202. package/js/src/gemini.d.ts +1 -1
  203. package/js/src/gemini.js +1 -1
  204. package/js/src/hitbtc.d.ts +1 -1
  205. package/js/src/hitbtc.js +2 -2
  206. package/js/src/hitbtc3.d.ts +1 -1
  207. package/js/src/hitbtc3.js +1 -1
  208. package/js/src/hollaex.d.ts +1 -1
  209. package/js/src/hollaex.js +1 -1
  210. package/js/src/htx.d.ts +1 -1
  211. package/js/src/htx.js +2 -2
  212. package/js/src/huobijp.d.ts +1 -1
  213. package/js/src/huobijp.js +1 -1
  214. package/js/src/idex.d.ts +1 -1
  215. package/js/src/idex.js +1 -1
  216. package/js/src/independentreserve.d.ts +1 -1
  217. package/js/src/independentreserve.js +1 -1
  218. package/js/src/indodax.d.ts +1 -1
  219. package/js/src/indodax.js +1 -1
  220. package/js/src/kraken.d.ts +1 -1
  221. package/js/src/kraken.js +2 -2
  222. package/js/src/krakenfutures.d.ts +1 -1
  223. package/js/src/krakenfutures.js +3 -3
  224. package/js/src/kucoin.d.ts +1 -1
  225. package/js/src/kucoin.js +2 -6
  226. package/js/src/kuna.d.ts +1 -1
  227. package/js/src/kuna.js +1 -1
  228. package/js/src/latoken.d.ts +1 -1
  229. package/js/src/latoken.js +2 -2
  230. package/js/src/lbank.d.ts +1 -1
  231. package/js/src/lbank.js +1 -1
  232. package/js/src/luno.d.ts +1 -1
  233. package/js/src/luno.js +1 -1
  234. package/js/src/lykke.d.ts +1 -1
  235. package/js/src/lykke.js +1 -1
  236. package/js/src/mercado.d.ts +1 -1
  237. package/js/src/mercado.js +1 -1
  238. package/js/src/mexc.d.ts +1 -1
  239. package/js/src/mexc.js +102 -53
  240. package/js/src/ndax.d.ts +1 -1
  241. package/js/src/ndax.js +1 -1
  242. package/js/src/novadax.d.ts +1 -1
  243. package/js/src/novadax.js +1 -1
  244. package/js/src/oceanex.d.ts +1 -1
  245. package/js/src/oceanex.js +1 -1
  246. package/js/src/okcoin.d.ts +1 -1
  247. package/js/src/okcoin.js +1 -1
  248. package/js/src/okx.d.ts +1 -1
  249. package/js/src/okx.js +4 -4
  250. package/js/src/p2b.d.ts +1 -1
  251. package/js/src/p2b.js +1 -3
  252. package/js/src/paymium.d.ts +1 -1
  253. package/js/src/paymium.js +1 -1
  254. package/js/src/phemex.d.ts +1 -1
  255. package/js/src/phemex.js +1 -1
  256. package/js/src/poloniex.d.ts +1 -1
  257. package/js/src/poloniex.js +51 -51
  258. package/js/src/poloniexfutures.d.ts +1 -1
  259. package/js/src/poloniexfutures.js +1 -1
  260. package/js/src/pro/bitget.d.ts +1 -1
  261. package/js/src/pro/bitget.js +1 -1
  262. package/js/src/pro/bitmex.d.ts +3 -1
  263. package/js/src/pro/bitmex.js +207 -1
  264. package/js/src/pro/krakenfutures.js +6 -6
  265. package/js/src/pro/mexc.js +1 -1
  266. package/js/src/pro/poloniex.js +1 -1
  267. package/js/src/pro/poloniexfutures.js +3 -3
  268. package/js/src/probit.d.ts +1 -1
  269. package/js/src/probit.js +27 -19
  270. package/js/src/static_dependencies/jsencrypt/JSEncrypt.d.ts +1 -1
  271. package/js/src/static_dependencies/jsencrypt/JSEncrypt.js +1 -1
  272. package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.d.ts +3 -3
  273. package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +3 -3
  274. package/js/src/timex.d.ts +1 -1
  275. package/js/src/timex.js +1 -1
  276. package/js/src/tokocrypto.d.ts +1 -1
  277. package/js/src/tokocrypto.js +8 -4
  278. package/js/src/upbit.d.ts +1 -1
  279. package/js/src/upbit.js +1 -1
  280. package/js/src/wavesexchange.d.ts +1 -1
  281. package/js/src/wavesexchange.js +1 -1
  282. package/js/src/wazirx.d.ts +1 -1
  283. package/js/src/wazirx.js +1 -1
  284. package/js/src/whitebit.d.ts +1 -1
  285. package/js/src/whitebit.js +1 -1
  286. package/js/src/woo.d.ts +1 -1
  287. package/js/src/woo.js +1 -1
  288. package/js/src/yobit.d.ts +1 -1
  289. package/js/src/yobit.js +1 -1
  290. package/js/src/zaif.d.ts +1 -1
  291. package/js/src/zaif.js +1 -1
  292. package/js/src/zonda.d.ts +1 -1
  293. package/js/src/zonda.js +1 -1
  294. package/package.json +4 -3
  295. package/skip-tests.json +4 -0
@@ -12,7 +12,7 @@ var rsa = require('./base/functions/rsa.js');
12
12
  // ---------------------------------------------------------------------------
13
13
  /**
14
14
  * @class upbit
15
- * @extends Exchange
15
+ * @augments Exchange
16
16
  */
17
17
  class upbit extends upbit$1 {
18
18
  describe() {
@@ -10,7 +10,7 @@ var number = require('./base/functions/number.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class wavesexchange
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class wavesexchange extends wavesexchange$1 {
16
16
  describe() {
@@ -8,7 +8,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
8
8
 
9
9
  /**
10
10
  * @class wazirx
11
- * @extends Exchange
11
+ * @augments Exchange
12
12
  */
13
13
  class wazirx extends wazirx$1 {
14
14
  describe() {
@@ -10,7 +10,7 @@ var sha512 = require('./static_dependencies/noble-hashes/sha512.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class whitebit
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class whitebit extends whitebit$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class woo
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class woo extends woo$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha512 = require('./static_dependencies/noble-hashes/sha512.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class yobit
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class yobit extends yobit$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha512 = require('./static_dependencies/noble-hashes/sha512.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class zaif
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class zaif extends zaif$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha512 = require('./static_dependencies/noble-hashes/sha512.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class zonda
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class zonda extends zonda$1 {
16
16
  describe() {
package/js/ccxt.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
5
  import { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
7
- declare const version = "4.1.84";
7
+ declare const version = "4.1.85";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.1.85';
41
+ const version = '4.1.86';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
package/js/src/ace.d.ts CHANGED
@@ -2,7 +2,7 @@ import Exchange from './abstract/ace.js';
2
2
  import { Balances, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade } from './base/types.js';
3
3
  /**
4
4
  * @class ace
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class ace extends Exchange {
8
8
  describe(): any;
package/js/src/ace.js CHANGED
@@ -13,7 +13,7 @@ import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class ace
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class ace extends Exchange {
19
19
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/alpaca.js';
2
2
  import { Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Trade } from './base/types.js';
3
3
  /**
4
4
  * @class alpaca
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class alpaca extends Exchange {
8
8
  describe(): any;
package/js/src/alpaca.js CHANGED
@@ -11,7 +11,7 @@ import { TICK_SIZE } from './base/functions/number.js';
11
11
  // ---------------------------------------------------------------------------xs
12
12
  /**
13
13
  * @class alpaca
14
- * @extends Exchange
14
+ * @augments Exchange
15
15
  */
16
16
  export default class alpaca extends Exchange {
17
17
  describe() {
@@ -499,7 +499,7 @@ export default class alpaca extends Exchange {
499
499
  * @param {object} [params] extra parameters specific to the exchange API endpoint
500
500
  * @param {string} [params.loc] crypto location, default: us
501
501
  * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
502
- */
502
+ */
503
503
  await this.loadMarkets();
504
504
  const market = this.market(symbol);
505
505
  const id = market['id'];
@@ -2,7 +2,7 @@ import Exchange from './abstract/ascendex.js';
2
2
  import { FundingHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market } from './base/types.js';
3
3
  /**
4
4
  * @class ascendex
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class ascendex extends Exchange {
8
8
  describe(): any;
@@ -13,7 +13,7 @@ import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class ascendex
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class ascendex extends Exchange {
19
19
  describe() {
@@ -1664,7 +1664,7 @@ export default class ascendex extends Exchange {
1664
1664
  * @description create a list of trade orders
1665
1665
  * @see https://ascendex.github.io/ascendex-pro-api/#place-batch-orders
1666
1666
  * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#place-batch-orders
1667
- * @param {array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
1667
+ * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
1668
1668
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1669
1669
  * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
1670
1670
  * @param {bool} [params.postOnly] true or false
@@ -41,6 +41,8 @@ export default class Exchange {
41
41
  ws_proxy: string;
42
42
  wssProxy: string;
43
43
  wss_proxy: string;
44
+ wsSocksProxy: string;
45
+ ws_socks_proxy: string;
44
46
  userAgents: any;
45
47
  headers: any;
46
48
  origin: string;
@@ -513,6 +515,8 @@ export default class Exchange {
513
515
  proxyModulesLoaded: boolean;
514
516
  loadProxyModules(): Promise<void>;
515
517
  setProxyAgents(httpProxy: any, httpsProxy: any, socksProxy: any): any;
518
+ loadHttpProxyAgent(): Promise<any>;
519
+ getHttpAgentIfNeeded(url: any): any;
516
520
  fetch(url: any, method?: string, headers?: any, body?: any): Promise<any>;
517
521
  parseJson(jsonString: any): any;
518
522
  getResponseHeaders(response: any): {};
@@ -699,6 +699,26 @@ export default class Exchange {
699
699
  }
700
700
  return chosenAgent;
701
701
  }
702
+ async loadHttpProxyAgent() {
703
+ // for `http://` protocol proxy-urls, we need to load `http` module only on first call
704
+ if (!this.httpAgent) {
705
+ const httpModule = await import(/* webpackIgnore: true */ 'node:http');
706
+ this.httpAgent = new httpModule.Agent();
707
+ }
708
+ return this.httpAgent;
709
+ }
710
+ getHttpAgentIfNeeded(url) {
711
+ if (isNode) {
712
+ // only for non-ssl proxy
713
+ if (url.substring(0, 5) === 'ws://') {
714
+ if (this.httpAgent === undefined) {
715
+ throw new NotSupported(this.id + ' to use proxy with non-ssl ws:// urls, at first run `await exchange.loadHttpProxyAgent()` method');
716
+ }
717
+ return this.httpAgent;
718
+ }
719
+ }
720
+ return undefined;
721
+ }
702
722
  async fetch(url, method = 'GET', headers = undefined, body = undefined) {
703
723
  // load node-http(s) modules only on first call
704
724
  if (isNode) {
@@ -712,18 +732,16 @@ export default class Exchange {
712
732
  headers = this.extend(this.headers, headers);
713
733
  // proxy-url
714
734
  const proxyUrl = this.checkProxyUrlSettings(url, method, headers, body);
715
- let isHttpAgentNeeded = false;
735
+ let httpProxyAgent = false;
716
736
  if (proxyUrl !== undefined) {
717
- // in node we need to set header to *
737
+ // part only for node-js
718
738
  if (isNode) {
739
+ // in node we need to set header to *
719
740
  headers = this.extend({ 'Origin': this.origin }, headers);
720
- if (proxyUrl.substring(0, 5) !== 'https') {
721
- // for `http://` protocol proxy-urls, we need to load `http` module only on first call
722
- if (!this.httpAgent) {
723
- const httpModule = await import(/* webpackIgnore: true */ 'node:http');
724
- this.httpAgent = new httpModule.Agent();
725
- }
726
- isHttpAgentNeeded = true;
741
+ // only for http proxy
742
+ if (proxyUrl.substring(0, 5) === 'http:') {
743
+ await this.loadHttpProxyAgent();
744
+ httpProxyAgent = this.httpAgent;
727
745
  }
728
746
  }
729
747
  url = proxyUrl + url;
@@ -776,9 +794,9 @@ export default class Exchange {
776
794
  params['agent'] = this.agent;
777
795
  }
778
796
  // override agent, if needed
779
- if (isHttpAgentNeeded) {
780
- // if proxyUrl is being used, so we don't overwrite `this.agent` itself
781
- params['agent'] = this.httpAgent;
797
+ if (httpProxyAgent) {
798
+ // if proxyUrl is being used, then specifically in nodejs, we need http module, not https
799
+ params['agent'] = httpProxyAgent;
782
800
  }
783
801
  else if (chosenAgent) {
784
802
  // if http(s)Proxy is being used
@@ -987,7 +1005,9 @@ export default class Exchange {
987
1005
  // proxy agents
988
1006
  const [httpProxy, httpsProxy, socksProxy] = this.checkWsProxySettings();
989
1007
  const chosenAgent = this.setProxyAgents(httpProxy, httpsProxy, socksProxy);
990
- const finalAgent = chosenAgent ? chosenAgent : this.agent;
1008
+ // part only for node-js
1009
+ const httpProxyAgent = this.getHttpAgentIfNeeded(url);
1010
+ const finalAgent = chosenAgent ? chosenAgent : (httpProxyAgent ? httpProxyAgent : this.agent);
991
1011
  //
992
1012
  const options = this.deepExtend(this.streaming, {
993
1013
  'log': this.log ? this.log.bind(this) : this.log,
@@ -1337,7 +1357,8 @@ export default class Exchange {
1337
1357
  const usedProxies = [];
1338
1358
  let wsProxy = undefined;
1339
1359
  let wssProxy = undefined;
1340
- // wsProxy
1360
+ let wsSocksProxy = undefined;
1361
+ // ws proxy
1341
1362
  if (this.wsProxy !== undefined) {
1342
1363
  usedProxies.push('wsProxy');
1343
1364
  wsProxy = this.wsProxy;
@@ -1346,7 +1367,7 @@ export default class Exchange {
1346
1367
  usedProxies.push('ws_proxy');
1347
1368
  wsProxy = this.ws_proxy;
1348
1369
  }
1349
- // wsProxy
1370
+ // wss proxy
1350
1371
  if (this.wssProxy !== undefined) {
1351
1372
  usedProxies.push('wssProxy');
1352
1373
  wssProxy = this.wssProxy;
@@ -1355,13 +1376,22 @@ export default class Exchange {
1355
1376
  usedProxies.push('wss_proxy');
1356
1377
  wssProxy = this.wss_proxy;
1357
1378
  }
1379
+ // ws socks proxy
1380
+ if (this.wsSocksProxy !== undefined) {
1381
+ usedProxies.push('wsSocksProxy');
1382
+ wsSocksProxy = this.wsSocksProxy;
1383
+ }
1384
+ if (this.ws_socks_proxy !== undefined) {
1385
+ usedProxies.push('ws_socks_proxy');
1386
+ wsSocksProxy = this.ws_socks_proxy;
1387
+ }
1358
1388
  // check
1359
1389
  const length = usedProxies.length;
1360
1390
  if (length > 1) {
1361
1391
  const joinedProxyNames = usedProxies.join(',');
1362
- throw new ExchangeError(this.id + ' you have multiple conflicting settings (' + joinedProxyNames + '), please use only one from: wsProxy, wssProxy');
1392
+ throw new ExchangeError(this.id + ' you have multiple conflicting settings (' + joinedProxyNames + '), please use only one from: wsProxy, wssProxy, socksProxy');
1363
1393
  }
1364
- return [wsProxy, wssProxy];
1394
+ return [wsProxy, wssProxy, wsSocksProxy];
1365
1395
  }
1366
1396
  checkConflictingProxies(proxyAgentSet, proxyUrlSet) {
1367
1397
  if (proxyAgentSet && proxyUrlSet) {
@@ -4271,8 +4301,8 @@ export default class Exchange {
4271
4301
  /**
4272
4302
  * @ignore
4273
4303
  * @method
4274
- * * Must add timeInForce to this.options to use this method
4275
- * @return {string} returns the exchange specific value for timeInForce
4304
+ * Must add timeInForce to this.options to use this method
4305
+ * @returns {string} returns the exchange specific value for timeInForce
4276
4306
  */
4277
4307
  const timeInForce = this.safeStringUpper(params, 'timeInForce'); // supported values GTC, IOC, PO
4278
4308
  if (timeInForce !== undefined) {
@@ -4288,7 +4318,7 @@ export default class Exchange {
4288
4318
  /**
4289
4319
  * @ignore
4290
4320
  * @method
4291
- * * Must add accountsByType to this.options to use this method
4321
+ * Must add accountsByType to this.options to use this method
4292
4322
  * @param {string} account key for account name in this.options['accountsByType']
4293
4323
  * @returns the exchange specific account name or the isolated margin id for transfers
4294
4324
  */
@@ -58,6 +58,7 @@ export interface MarketInterface {
58
58
  precision: {
59
59
  amount: Num;
60
60
  price: Num;
61
+ cost?: Num;
61
62
  };
62
63
  limits: {
63
64
  amount?: MinMax;
@@ -2,7 +2,7 @@ import Exchange from './abstract/bigone.js';
2
2
  import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bigone
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bigone extends Exchange {
8
8
  describe(): any;
package/js/src/bigone.js CHANGED
@@ -14,7 +14,7 @@ import { Precise } from './base/Precise.js';
14
14
  // ---------------------------------------------------------------------------
15
15
  /**
16
16
  * @class bigone
17
- * @extends Exchange
17
+ * @augments Exchange
18
18
  */
19
19
  export default class bigone extends Exchange {
20
20
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/binance.js';
2
2
  import { Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface } from './base/types.js';
3
3
  /**
4
4
  * @class binance
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class binance extends Exchange {
8
8
  describe(): any;
package/js/src/binance.js CHANGED
@@ -16,7 +16,7 @@ import { ed25519 } from './static_dependencies/noble-curves/ed25519.js';
16
16
  // ---------------------------------------------------------------------------
17
17
  /**
18
18
  * @class binance
19
- * @extends Exchange
19
+ * @augments Exchange
20
20
  */
21
21
  export default class binance extends Exchange {
22
22
  describe() {
@@ -4396,7 +4396,7 @@ export default class binance extends Exchange {
4396
4396
  * @name binance#createOrders
4397
4397
  * @description *contract only* create a list of trade orders
4398
4398
  * @see https://binance-docs.github.io/apidocs/futures/en/#place-multiple-orders-trade
4399
- * @param {array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
4399
+ * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
4400
4400
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4401
4401
  */
4402
4402
  await this.loadMarkets();
package/js/src/bingx.js CHANGED
@@ -1818,7 +1818,7 @@ export default class bingx extends Exchange {
1818
1818
  * @description create a list of trade orders
1819
1819
  * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Batch%20Placing%20Orders
1820
1820
  * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Bulk%20order
1821
- * @param {array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
1821
+ * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
1822
1822
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1823
1823
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1824
1824
  */
package/js/src/bit2c.d.ts CHANGED
@@ -2,7 +2,7 @@ import Exchange from './abstract/bit2c.js';
2
2
  import { Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade } from './base/types.js';
3
3
  /**
4
4
  * @class bit2c
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bit2c extends Exchange {
8
8
  describe(): any;
package/js/src/bit2c.js CHANGED
@@ -13,7 +13,7 @@ import { sha512 } from './static_dependencies/noble-hashes/sha512.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class bit2c
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class bit2c extends Exchange {
19
19
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/bitbank.js';
2
2
  import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitbank
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bitbank extends Exchange {
8
8
  describe(): any;
package/js/src/bitbank.js CHANGED
@@ -12,7 +12,7 @@ import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
12
12
  // ---------------------------------------------------------------------------
13
13
  /**
14
14
  * @class bitbank
15
- * @extends Exchange
15
+ * @augments Exchange
16
16
  */
17
17
  export default class bitbank extends Exchange {
18
18
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/bitbns.js';
2
2
  import { Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitbns
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bitbns extends Exchange {
8
8
  describe(): any;
package/js/src/bitbns.js CHANGED
@@ -13,7 +13,7 @@ import { sha512 } from './static_dependencies/noble-hashes/sha512.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class bitbns
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class bitbns extends Exchange {
19
19
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/bitfinex.js';
2
2
  import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitfinex
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bitfinex extends Exchange {
8
8
  describe(): any;
@@ -13,7 +13,7 @@ import { sha384 } from './static_dependencies/noble-hashes/sha512.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class bitfinex
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class bitfinex extends Exchange {
19
19
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/bitfinex2.js';
2
2
  import { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderBook, Str, Transaction, Ticker, Balances, Tickers, Strings, Currency, Market } from './base/types.js';
3
3
  /**
4
4
  * @class bitfinex2
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bitfinex2 extends Exchange {
8
8
  describe(): any;
@@ -13,7 +13,7 @@ import { sha384 } from './static_dependencies/noble-hashes/sha512.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class bitfinex2
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class bitfinex2 extends Exchange {
19
19
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/bitflyer.js';
2
2
  import { Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitflyer
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bitflyer extends Exchange {
8
8
  describe(): any;
@@ -13,7 +13,7 @@ import { Precise } from './base/Precise.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class bitflyer
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class bitflyer extends Exchange {
19
19
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/bitforex.js';
2
2
  import { Balances, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade } from './base/types.js';
3
3
  /**
4
4
  * @class bitforex
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bitforex extends Exchange {
8
8
  describe(): any;
@@ -12,7 +12,7 @@ import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
12
12
  // ---------------------------------------------------------------------------
13
13
  /**
14
14
  * @class bitforex
15
- * @extends Exchange
15
+ * @augments Exchange
16
16
  */
17
17
  export default class bitforex extends Exchange {
18
18
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/bitget.js';
2
2
  import { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position } from './base/types.js';
3
3
  /**
4
4
  * @class bitget
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bitget extends Exchange {
8
8
  describe(): any;
package/js/src/bitget.js CHANGED
@@ -13,7 +13,7 @@ import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class bitget
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class bitget extends Exchange {
19
19
  describe() {
@@ -3730,7 +3730,7 @@ export default class bitget extends Exchange {
3730
3730
  * @see https://bitgetlimited.github.io/apidoc/en/mix/#batch-order
3731
3731
  * @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-order
3732
3732
  * @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-order
3733
- * @param {array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
3733
+ * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
3734
3734
  * @param {object} [params] extra parameters specific to the api endpoint
3735
3735
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3736
3736
  */
@@ -5984,7 +5984,6 @@ export default class bitget extends Exchange {
5984
5984
  * @param {string} symbol not used by bitget setPositionMode ()
5985
5985
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5986
5986
  * @returns {object} response from the exchange
5987
- *
5988
5987
  */
5989
5988
  await this.loadMarkets();
5990
5989
  const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
@@ -2,7 +2,7 @@ import Exchange from './abstract/bithumb.js';
2
2
  import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bithumb
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bithumb extends Exchange {
8
8
  describe(): any;
package/js/src/bithumb.js CHANGED
@@ -13,7 +13,7 @@ import { sha512 } from './static_dependencies/noble-hashes/sha512.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class bithumb
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class bithumb extends Exchange {
19
19
  describe() {
@@ -2,7 +2,7 @@ import Exchange from './abstract/bitmart.js';
2
2
  import { Int, OrderSide, Balances, OrderType, OHLCV, Order, Str, Trade, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market } from './base/types.js';
3
3
  /**
4
4
  * @class bitmart
5
- * @extends Exchange
5
+ * @augments Exchange
6
6
  */
7
7
  export default class bitmart extends Exchange {
8
8
  describe(): any;
package/js/src/bitmart.js CHANGED
@@ -13,7 +13,7 @@ import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
13
  // ---------------------------------------------------------------------------
14
14
  /**
15
15
  * @class bitmart
16
- * @extends Exchange
16
+ * @augments Exchange
17
17
  */
18
18
  export default class bitmart extends Exchange {
19
19
  describe() {