ccxt 4.5.60 → 4.5.61

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 (521) hide show
  1. package/README.md +46 -45
  2. package/dist/ccxt.browser.min.js +4 -4
  3. package/dist/cjs/ccxt.js +6 -2
  4. package/dist/cjs/src/aftermath.js +1 -1
  5. package/dist/cjs/src/apex.js +2 -2
  6. package/dist/cjs/src/ascendex.js +1 -1
  7. package/dist/cjs/src/aster.js +3 -4
  8. package/dist/cjs/src/backpack.js +1 -1
  9. package/dist/cjs/src/base/Exchange.js +6 -38
  10. package/dist/cjs/src/base/functions/crypto.js +72 -15
  11. package/dist/cjs/src/base/functions/rsa.js +25 -10
  12. package/dist/cjs/src/base/functions.js +1 -0
  13. package/dist/cjs/src/bequant.js +1 -1
  14. package/dist/cjs/src/bigone.js +1 -1
  15. package/dist/cjs/src/binance.js +1 -1
  16. package/dist/cjs/src/bingx.js +1 -1
  17. package/dist/cjs/src/bit2c.js +1 -1
  18. package/dist/cjs/src/bitbank.js +1 -1
  19. package/dist/cjs/src/bitbns.js +1 -1
  20. package/dist/cjs/src/bitfinex.js +5 -5
  21. package/dist/cjs/src/bitflyer.js +1 -1
  22. package/dist/cjs/src/bitget.js +2 -2
  23. package/dist/cjs/src/bithumb.js +1 -1
  24. package/dist/cjs/src/bitmart.js +2 -2
  25. package/dist/cjs/src/bitmex.js +2 -2
  26. package/dist/cjs/src/bitopro.js +1 -1
  27. package/dist/cjs/src/bitrue.js +1 -1
  28. package/dist/cjs/src/bitso.js +2 -2
  29. package/dist/cjs/src/bitstamp.js +1 -1
  30. package/dist/cjs/src/bittrade.js +2 -2
  31. package/dist/cjs/src/bitvavo.js +1 -1
  32. package/dist/cjs/src/blockchaincom.js +1 -1
  33. package/dist/cjs/src/blofin.js +3 -4
  34. package/dist/cjs/src/btcbox.js +1 -1
  35. package/dist/cjs/src/btcmarkets.js +1 -1
  36. package/dist/cjs/src/btcturk.js +1 -1
  37. package/dist/cjs/src/bullish.js +1 -1
  38. package/dist/cjs/src/bybit.js +1 -1
  39. package/dist/cjs/src/bydfi.js +1 -1
  40. package/dist/cjs/src/cex.js +2 -2
  41. package/dist/cjs/src/coinbase.js +1 -1
  42. package/dist/cjs/src/coinbaseexchange.js +2 -2
  43. package/dist/cjs/src/coincheck.js +2 -2
  44. package/dist/cjs/src/coinex.js +1 -1
  45. package/dist/cjs/src/coinmate.js +1 -1
  46. package/dist/cjs/src/coinmetro.js +1 -1
  47. package/dist/cjs/src/coinone.js +1 -1
  48. package/dist/cjs/src/coinsph.js +1 -1
  49. package/dist/cjs/src/coinspot.js +1 -1
  50. package/dist/cjs/src/cryptocom.js +1 -1
  51. package/dist/cjs/src/cryptomus.js +2 -2
  52. package/dist/cjs/src/deepcoin.js +1 -1
  53. package/dist/cjs/src/delta.js +1 -1
  54. package/dist/cjs/src/deribit.js +1 -1
  55. package/dist/cjs/src/derive.js +2 -3
  56. package/dist/cjs/src/digifinex.js +1 -1
  57. package/dist/cjs/src/dydx.js +2 -2
  58. package/dist/cjs/src/exmo.js +1 -1
  59. package/dist/cjs/src/extended.js +3 -3
  60. package/dist/cjs/src/foxbit.js +1 -1
  61. package/dist/cjs/src/gate.js +2 -2
  62. package/dist/cjs/src/gateeu.js +60 -0
  63. package/dist/cjs/src/gemini.js +1 -1
  64. package/dist/cjs/src/grvt.js +1 -1
  65. package/dist/cjs/src/hashkey.js +2 -2
  66. package/dist/cjs/src/hibachi.js +1 -1
  67. package/dist/cjs/src/hitbtc.js +1 -1
  68. package/dist/cjs/src/hollaex.js +1 -1
  69. package/dist/cjs/src/htx.js +1 -1
  70. package/dist/cjs/src/hyperliquid.js +1 -1
  71. package/dist/cjs/src/independentreserve.js +1 -1
  72. package/dist/cjs/src/indodax.js +1 -1
  73. package/dist/cjs/src/kraken.js +1 -1
  74. package/dist/cjs/src/kucoin.js +1 -1
  75. package/dist/cjs/src/latoken.js +1 -1
  76. package/dist/cjs/src/lbank.js +1 -1
  77. package/dist/cjs/src/lighter.js +1 -1
  78. package/dist/cjs/src/luno.js +2 -2
  79. package/dist/cjs/src/mercado.js +1 -1
  80. package/dist/cjs/src/mexc.js +1 -1
  81. package/dist/cjs/src/modetrade.js +3 -5
  82. package/dist/cjs/src/ndax.js +1 -1
  83. package/dist/cjs/src/novadax.js +1 -1
  84. package/dist/cjs/src/okx.js +1 -1
  85. package/dist/cjs/src/onetrading.js +2 -2
  86. package/dist/cjs/src/p2b.js +2 -3
  87. package/dist/cjs/src/pacifica.js +2 -2
  88. package/dist/cjs/src/paradex.js +1 -1
  89. package/dist/cjs/src/paymium.js +1 -1
  90. package/dist/cjs/src/phemex.js +1 -1
  91. package/dist/cjs/src/poloniex.js +1 -1
  92. package/dist/cjs/src/pro/aftermath.js +1 -1
  93. package/dist/cjs/src/pro/alpaca.js +1 -1
  94. package/dist/cjs/src/pro/apex.js +2 -2
  95. package/dist/cjs/src/pro/ascendex.js +1 -1
  96. package/dist/cjs/src/pro/aster.js +4 -4
  97. package/dist/cjs/src/pro/backpack.js +4 -4
  98. package/dist/cjs/src/pro/binance.js +5 -5
  99. package/dist/cjs/src/pro/bingx.js +2 -2
  100. package/dist/cjs/src/pro/bitfinex.js +1 -1
  101. package/dist/cjs/src/pro/bitget.js +4 -4
  102. package/dist/cjs/src/pro/bitmart.js +4 -4
  103. package/dist/cjs/src/pro/bitmex.js +2 -2
  104. package/dist/cjs/src/pro/bitopro.js +1 -1
  105. package/dist/cjs/src/pro/bitstamp.js +1 -1
  106. package/dist/cjs/src/pro/bittrade.js +1 -1
  107. package/dist/cjs/src/pro/bitvavo.js +1 -1
  108. package/dist/cjs/src/pro/blockchaincom.js +1 -1
  109. package/dist/cjs/src/pro/blofin.js +2 -2
  110. package/dist/cjs/src/pro/bullish.js +1 -1
  111. package/dist/cjs/src/pro/bybit.js +4 -4
  112. package/dist/cjs/src/pro/bydfi.js +4 -4
  113. package/dist/cjs/src/pro/cex.js +1 -1
  114. package/dist/cjs/src/pro/coinbase.js +3 -3
  115. package/dist/cjs/src/pro/coinbaseexchange.js +2 -2
  116. package/dist/cjs/src/pro/coinbaseinternational.js +2 -2
  117. package/dist/cjs/src/pro/coincheck.js +1 -1
  118. package/dist/cjs/src/pro/coinex.js +2 -2
  119. package/dist/cjs/src/pro/coinone.js +1 -1
  120. package/dist/cjs/src/pro/cryptocom.js +4 -4
  121. package/dist/cjs/src/pro/deepcoin.js +2 -2
  122. package/dist/cjs/src/pro/deribit.js +2 -2
  123. package/dist/cjs/src/pro/derive.js +2 -2
  124. package/dist/cjs/src/pro/dydx.js +2 -2
  125. package/dist/cjs/src/pro/exmo.js +1 -1
  126. package/dist/cjs/src/pro/extended.js +1 -1
  127. package/dist/cjs/src/pro/gate.js +46 -15
  128. package/dist/cjs/src/pro/gateeu.js +32 -0
  129. package/dist/cjs/src/pro/gemini.js +2 -3
  130. package/dist/cjs/src/pro/grvt.js +2 -2
  131. package/dist/cjs/src/pro/hashkey.js +1 -1
  132. package/dist/cjs/src/pro/hitbtc.js +1 -1
  133. package/dist/cjs/src/pro/hollaex.js +1 -1
  134. package/dist/cjs/src/pro/htx.js +2 -2
  135. package/dist/cjs/src/pro/hyperliquid.js +2 -2
  136. package/dist/cjs/src/pro/independentreserve.js +1 -1
  137. package/dist/cjs/src/pro/kraken.js +2 -2
  138. package/dist/cjs/src/pro/krakenfutures.js +2 -2
  139. package/dist/cjs/src/pro/kucoin.js +4 -4
  140. package/dist/cjs/src/pro/lighter.js +2 -2
  141. package/dist/cjs/src/pro/luno.js +1 -1
  142. package/dist/cjs/src/pro/mexc.js +2 -2
  143. package/dist/cjs/src/pro/modetrade.js +1 -1
  144. package/dist/cjs/src/pro/ndax.js +1 -1
  145. package/dist/cjs/src/pro/okx.js +4 -4
  146. package/dist/cjs/src/pro/onetrading.js +1 -1
  147. package/dist/cjs/src/pro/p2b.js +1 -1
  148. package/dist/cjs/src/pro/pacifica.js +2 -2
  149. package/dist/cjs/src/pro/paradex.js +1 -1
  150. package/dist/cjs/src/pro/phemex.js +1 -1
  151. package/dist/cjs/src/pro/poloniex.js +1 -1
  152. package/dist/cjs/src/pro/toobit.js +2 -2
  153. package/dist/cjs/src/pro/upbit.js +1 -1
  154. package/dist/cjs/src/pro/weex.js +4 -4
  155. package/dist/cjs/src/pro/whitebit.js +1 -1
  156. package/dist/cjs/src/pro/woo.js +2 -2
  157. package/dist/cjs/src/pro/woofipro.js +1 -1
  158. package/dist/cjs/src/tokocrypto.js +1 -1
  159. package/dist/cjs/src/toobit.js +2 -2
  160. package/dist/cjs/src/upbit.js +1 -1
  161. package/dist/cjs/src/weex.js +2 -2
  162. package/dist/cjs/src/whitebit.js +1 -1
  163. package/dist/cjs/src/woo.js +1 -1
  164. package/dist/cjs/src/woofipro.js +2 -4
  165. package/dist/cjs/src/xt.js +1 -1
  166. package/dist/cjs/src/zaif.js +2 -2
  167. package/dist/cjs/src/zebpay.js +2 -2
  168. package/js/ccxt.d.ts +8 -2
  169. package/js/ccxt.js +6 -3
  170. package/js/src/abstract/gateeu.d.ts +346 -0
  171. package/js/src/{static_dependencies/jsencrypt/index.js → abstract/gateeu.js} +5 -3
  172. package/js/src/aftermath.d.ts +1 -1
  173. package/js/src/aftermath.js +1 -1
  174. package/js/src/apex.d.ts +1 -1
  175. package/js/src/apex.js +2 -2
  176. package/js/src/ascendex.d.ts +1 -1
  177. package/js/src/ascendex.js +1 -1
  178. package/js/src/aster.d.ts +1 -1
  179. package/js/src/aster.js +3 -4
  180. package/js/src/backpack.js +1 -1
  181. package/js/src/base/Exchange.d.ts +1 -1
  182. package/js/src/base/Exchange.js +6 -38
  183. package/js/src/base/functions/crypto.d.ts +2 -1
  184. package/js/src/base/functions/crypto.js +72 -16
  185. package/js/src/base/functions/rsa.js +18 -7
  186. package/js/src/bequant.js +1 -1
  187. package/js/src/bigone.d.ts +1 -1
  188. package/js/src/bigone.js +1 -1
  189. package/js/src/binance.d.ts +1 -1
  190. package/js/src/binance.js +1 -1
  191. package/js/src/bingx.d.ts +1 -1
  192. package/js/src/bingx.js +1 -1
  193. package/js/src/bit2c.d.ts +1 -1
  194. package/js/src/bit2c.js +1 -1
  195. package/js/src/bitbank.d.ts +1 -1
  196. package/js/src/bitbank.js +1 -1
  197. package/js/src/bitbns.d.ts +1 -1
  198. package/js/src/bitbns.js +1 -1
  199. package/js/src/bitfinex.d.ts +1 -1
  200. package/js/src/bitfinex.js +5 -5
  201. package/js/src/bitflyer.d.ts +1 -1
  202. package/js/src/bitflyer.js +1 -1
  203. package/js/src/bitget.d.ts +1 -1
  204. package/js/src/bitget.js +2 -2
  205. package/js/src/bithumb.d.ts +1 -1
  206. package/js/src/bithumb.js +1 -1
  207. package/js/src/bitmart.d.ts +1 -1
  208. package/js/src/bitmart.js +2 -2
  209. package/js/src/bitmex.d.ts +1 -1
  210. package/js/src/bitmex.js +2 -2
  211. package/js/src/bitopro.d.ts +1 -1
  212. package/js/src/bitopro.js +1 -1
  213. package/js/src/bitrue.d.ts +1 -1
  214. package/js/src/bitrue.js +1 -1
  215. package/js/src/bitso.d.ts +1 -1
  216. package/js/src/bitso.js +2 -2
  217. package/js/src/bitstamp.d.ts +1 -1
  218. package/js/src/bitstamp.js +1 -1
  219. package/js/src/bittrade.d.ts +1 -1
  220. package/js/src/bittrade.js +2 -2
  221. package/js/src/bitvavo.d.ts +1 -1
  222. package/js/src/bitvavo.js +1 -1
  223. package/js/src/blockchaincom.d.ts +1 -1
  224. package/js/src/blockchaincom.js +1 -1
  225. package/js/src/blofin.d.ts +1 -1
  226. package/js/src/blofin.js +3 -4
  227. package/js/src/btcbox.d.ts +1 -1
  228. package/js/src/btcbox.js +1 -1
  229. package/js/src/btcmarkets.d.ts +1 -1
  230. package/js/src/btcmarkets.js +1 -1
  231. package/js/src/btcturk.d.ts +1 -1
  232. package/js/src/btcturk.js +1 -1
  233. package/js/src/bullish.d.ts +1 -1
  234. package/js/src/bullish.js +1 -1
  235. package/js/src/bybit.d.ts +1 -1
  236. package/js/src/bybit.js +1 -1
  237. package/js/src/bydfi.js +1 -1
  238. package/js/src/cex.d.ts +1 -1
  239. package/js/src/cex.js +2 -2
  240. package/js/src/coinbase.d.ts +1 -1
  241. package/js/src/coinbase.js +1 -1
  242. package/js/src/coinbaseexchange.d.ts +1 -1
  243. package/js/src/coinbaseexchange.js +2 -2
  244. package/js/src/coincheck.d.ts +1 -1
  245. package/js/src/coincheck.js +2 -2
  246. package/js/src/coinex.d.ts +1 -1
  247. package/js/src/coinex.js +1 -1
  248. package/js/src/coinmate.d.ts +1 -1
  249. package/js/src/coinmate.js +1 -1
  250. package/js/src/coinmetro.d.ts +1 -1
  251. package/js/src/coinmetro.js +1 -1
  252. package/js/src/coinone.d.ts +1 -1
  253. package/js/src/coinone.js +1 -1
  254. package/js/src/coinsph.d.ts +1 -1
  255. package/js/src/coinsph.js +1 -1
  256. package/js/src/coinspot.d.ts +1 -1
  257. package/js/src/coinspot.js +1 -1
  258. package/js/src/cryptocom.d.ts +1 -1
  259. package/js/src/cryptocom.js +1 -1
  260. package/js/src/cryptomus.d.ts +1 -1
  261. package/js/src/cryptomus.js +2 -2
  262. package/js/src/deepcoin.d.ts +1 -1
  263. package/js/src/deepcoin.js +1 -1
  264. package/js/src/delta.d.ts +1 -1
  265. package/js/src/delta.js +1 -1
  266. package/js/src/deribit.d.ts +1 -1
  267. package/js/src/deribit.js +1 -1
  268. package/js/src/derive.js +2 -3
  269. package/js/src/digifinex.d.ts +1 -1
  270. package/js/src/digifinex.js +1 -1
  271. package/js/src/dydx.d.ts +1 -1
  272. package/js/src/dydx.js +2 -2
  273. package/js/src/exmo.d.ts +1 -1
  274. package/js/src/exmo.js +1 -1
  275. package/js/src/extended.d.ts +1 -1
  276. package/js/src/extended.js +3 -3
  277. package/js/src/foxbit.d.ts +1 -1
  278. package/js/src/foxbit.js +1 -1
  279. package/js/src/gate.d.ts +1 -1
  280. package/js/src/gate.js +2 -2
  281. package/js/src/gateeu.d.ts +4 -0
  282. package/js/src/gateeu.js +59 -0
  283. package/js/src/gemini.d.ts +1 -1
  284. package/js/src/gemini.js +1 -1
  285. package/js/src/grvt.js +1 -1
  286. package/js/src/hashkey.d.ts +1 -1
  287. package/js/src/hashkey.js +2 -2
  288. package/js/src/hibachi.js +1 -1
  289. package/js/src/hitbtc.d.ts +1 -1
  290. package/js/src/hitbtc.js +1 -1
  291. package/js/src/hollaex.d.ts +1 -1
  292. package/js/src/hollaex.js +1 -1
  293. package/js/src/htx.d.ts +1 -1
  294. package/js/src/htx.js +1 -1
  295. package/js/src/hyperliquid.d.ts +1 -1
  296. package/js/src/hyperliquid.js +1 -1
  297. package/js/src/independentreserve.d.ts +1 -1
  298. package/js/src/independentreserve.js +1 -1
  299. package/js/src/indodax.d.ts +1 -1
  300. package/js/src/indodax.js +1 -1
  301. package/js/src/kraken.d.ts +1 -1
  302. package/js/src/kraken.js +1 -1
  303. package/js/src/kucoin.d.ts +1 -1
  304. package/js/src/kucoin.js +1 -1
  305. package/js/src/latoken.d.ts +1 -1
  306. package/js/src/latoken.js +1 -1
  307. package/js/src/lbank.d.ts +1 -1
  308. package/js/src/lbank.js +1 -1
  309. package/js/src/lighter.d.ts +1 -1
  310. package/js/src/lighter.js +1 -1
  311. package/js/src/luno.d.ts +1 -1
  312. package/js/src/luno.js +2 -2
  313. package/js/src/mercado.d.ts +1 -1
  314. package/js/src/mercado.js +1 -1
  315. package/js/src/mexc.d.ts +1 -1
  316. package/js/src/mexc.js +1 -1
  317. package/js/src/modetrade.d.ts +1 -1
  318. package/js/src/modetrade.js +3 -5
  319. package/js/src/ndax.d.ts +1 -1
  320. package/js/src/ndax.js +1 -1
  321. package/js/src/novadax.d.ts +1 -1
  322. package/js/src/novadax.js +1 -1
  323. package/js/src/okx.d.ts +1 -1
  324. package/js/src/okx.js +1 -1
  325. package/js/src/onetrading.d.ts +1 -1
  326. package/js/src/onetrading.js +2 -2
  327. package/js/src/p2b.d.ts +1 -1
  328. package/js/src/p2b.js +2 -3
  329. package/js/src/pacifica.d.ts +1 -1
  330. package/js/src/pacifica.js +2 -2
  331. package/js/src/paradex.d.ts +1 -1
  332. package/js/src/paradex.js +1 -1
  333. package/js/src/paymium.d.ts +1 -1
  334. package/js/src/paymium.js +1 -1
  335. package/js/src/phemex.d.ts +1 -1
  336. package/js/src/phemex.js +1 -1
  337. package/js/src/poloniex.d.ts +1 -1
  338. package/js/src/poloniex.js +1 -1
  339. package/js/src/pro/aftermath.d.ts +1 -1
  340. package/js/src/pro/aftermath.js +1 -1
  341. package/js/src/pro/alpaca.d.ts +1 -1
  342. package/js/src/pro/alpaca.js +1 -1
  343. package/js/src/pro/apex.d.ts +2 -2
  344. package/js/src/pro/apex.js +2 -2
  345. package/js/src/pro/ascendex.d.ts +1 -1
  346. package/js/src/pro/ascendex.js +1 -1
  347. package/js/src/pro/aster.d.ts +4 -4
  348. package/js/src/pro/aster.js +4 -4
  349. package/js/src/pro/backpack.d.ts +4 -4
  350. package/js/src/pro/backpack.js +4 -4
  351. package/js/src/pro/binance.d.ts +5 -5
  352. package/js/src/pro/binance.js +5 -5
  353. package/js/src/pro/bingx.d.ts +2 -2
  354. package/js/src/pro/bingx.js +2 -2
  355. package/js/src/pro/bitfinex.d.ts +1 -1
  356. package/js/src/pro/bitfinex.js +1 -1
  357. package/js/src/pro/bitget.d.ts +4 -4
  358. package/js/src/pro/bitget.js +4 -4
  359. package/js/src/pro/bitmart.d.ts +4 -4
  360. package/js/src/pro/bitmart.js +4 -4
  361. package/js/src/pro/bitmex.d.ts +2 -2
  362. package/js/src/pro/bitmex.js +2 -2
  363. package/js/src/pro/bitopro.d.ts +1 -1
  364. package/js/src/pro/bitopro.js +1 -1
  365. package/js/src/pro/bitstamp.d.ts +1 -1
  366. package/js/src/pro/bitstamp.js +1 -1
  367. package/js/src/pro/bittrade.d.ts +1 -1
  368. package/js/src/pro/bittrade.js +1 -1
  369. package/js/src/pro/bitvavo.d.ts +1 -1
  370. package/js/src/pro/bitvavo.js +1 -1
  371. package/js/src/pro/blockchaincom.d.ts +1 -1
  372. package/js/src/pro/blockchaincom.js +1 -1
  373. package/js/src/pro/blofin.d.ts +2 -2
  374. package/js/src/pro/blofin.js +2 -2
  375. package/js/src/pro/bullish.d.ts +1 -1
  376. package/js/src/pro/bullish.js +1 -1
  377. package/js/src/pro/bybit.d.ts +4 -4
  378. package/js/src/pro/bybit.js +4 -4
  379. package/js/src/pro/bydfi.d.ts +4 -4
  380. package/js/src/pro/bydfi.js +4 -4
  381. package/js/src/pro/cex.d.ts +1 -1
  382. package/js/src/pro/cex.js +1 -1
  383. package/js/src/pro/coinbase.d.ts +3 -3
  384. package/js/src/pro/coinbase.js +3 -3
  385. package/js/src/pro/coinbaseexchange.d.ts +2 -2
  386. package/js/src/pro/coinbaseexchange.js +2 -2
  387. package/js/src/pro/coinbaseinternational.d.ts +2 -2
  388. package/js/src/pro/coinbaseinternational.js +2 -2
  389. package/js/src/pro/coincheck.d.ts +1 -1
  390. package/js/src/pro/coincheck.js +1 -1
  391. package/js/src/pro/coinex.d.ts +2 -2
  392. package/js/src/pro/coinex.js +2 -2
  393. package/js/src/pro/coinone.d.ts +1 -1
  394. package/js/src/pro/coinone.js +1 -1
  395. package/js/src/pro/cryptocom.d.ts +4 -4
  396. package/js/src/pro/cryptocom.js +4 -4
  397. package/js/src/pro/deepcoin.d.ts +2 -2
  398. package/js/src/pro/deepcoin.js +2 -2
  399. package/js/src/pro/deribit.d.ts +2 -2
  400. package/js/src/pro/deribit.js +2 -2
  401. package/js/src/pro/derive.d.ts +2 -2
  402. package/js/src/pro/derive.js +2 -2
  403. package/js/src/pro/dydx.d.ts +2 -2
  404. package/js/src/pro/dydx.js +2 -2
  405. package/js/src/pro/exmo.d.ts +1 -1
  406. package/js/src/pro/exmo.js +1 -1
  407. package/js/src/pro/extended.d.ts +1 -1
  408. package/js/src/pro/extended.js +1 -1
  409. package/js/src/pro/gate.d.ts +3 -2
  410. package/js/src/pro/gate.js +46 -15
  411. package/js/src/pro/gateeu.d.ts +4 -0
  412. package/js/src/pro/gateeu.js +31 -0
  413. package/js/src/pro/gemini.d.ts +2 -2
  414. package/js/src/pro/gemini.js +2 -3
  415. package/js/src/pro/grvt.d.ts +2 -2
  416. package/js/src/pro/grvt.js +2 -2
  417. package/js/src/pro/hashkey.d.ts +1 -1
  418. package/js/src/pro/hashkey.js +1 -1
  419. package/js/src/pro/hitbtc.d.ts +1 -1
  420. package/js/src/pro/hitbtc.js +1 -1
  421. package/js/src/pro/hollaex.d.ts +1 -1
  422. package/js/src/pro/hollaex.js +1 -1
  423. package/js/src/pro/htx.d.ts +2 -2
  424. package/js/src/pro/htx.js +2 -2
  425. package/js/src/pro/hyperliquid.d.ts +2 -2
  426. package/js/src/pro/hyperliquid.js +2 -2
  427. package/js/src/pro/independentreserve.d.ts +1 -1
  428. package/js/src/pro/independentreserve.js +1 -1
  429. package/js/src/pro/kraken.d.ts +2 -2
  430. package/js/src/pro/kraken.js +2 -2
  431. package/js/src/pro/krakenfutures.d.ts +2 -2
  432. package/js/src/pro/krakenfutures.js +2 -2
  433. package/js/src/pro/kucoin.d.ts +4 -4
  434. package/js/src/pro/kucoin.js +4 -4
  435. package/js/src/pro/lighter.d.ts +2 -2
  436. package/js/src/pro/lighter.js +2 -2
  437. package/js/src/pro/luno.d.ts +1 -1
  438. package/js/src/pro/luno.js +1 -1
  439. package/js/src/pro/mexc.d.ts +2 -2
  440. package/js/src/pro/mexc.js +2 -2
  441. package/js/src/pro/modetrade.d.ts +1 -1
  442. package/js/src/pro/modetrade.js +1 -1
  443. package/js/src/pro/ndax.d.ts +1 -1
  444. package/js/src/pro/ndax.js +1 -1
  445. package/js/src/pro/okx.d.ts +4 -4
  446. package/js/src/pro/okx.js +4 -4
  447. package/js/src/pro/onetrading.d.ts +1 -1
  448. package/js/src/pro/onetrading.js +1 -1
  449. package/js/src/pro/p2b.d.ts +1 -1
  450. package/js/src/pro/p2b.js +1 -1
  451. package/js/src/pro/pacifica.d.ts +2 -2
  452. package/js/src/pro/pacifica.js +2 -2
  453. package/js/src/pro/paradex.d.ts +1 -1
  454. package/js/src/pro/paradex.js +1 -1
  455. package/js/src/pro/phemex.d.ts +1 -1
  456. package/js/src/pro/phemex.js +1 -1
  457. package/js/src/pro/poloniex.d.ts +1 -1
  458. package/js/src/pro/poloniex.js +1 -1
  459. package/js/src/pro/toobit.d.ts +2 -2
  460. package/js/src/pro/toobit.js +2 -2
  461. package/js/src/pro/upbit.d.ts +1 -1
  462. package/js/src/pro/upbit.js +1 -1
  463. package/js/src/pro/weex.d.ts +4 -4
  464. package/js/src/pro/weex.js +4 -4
  465. package/js/src/pro/whitebit.d.ts +1 -1
  466. package/js/src/pro/whitebit.js +1 -1
  467. package/js/src/pro/woo.d.ts +2 -2
  468. package/js/src/pro/woo.js +2 -2
  469. package/js/src/pro/woofipro.d.ts +1 -1
  470. package/js/src/pro/woofipro.js +1 -1
  471. package/js/src/tokocrypto.d.ts +1 -1
  472. package/js/src/tokocrypto.js +1 -1
  473. package/js/src/toobit.d.ts +1 -1
  474. package/js/src/toobit.js +2 -2
  475. package/js/src/upbit.d.ts +1 -1
  476. package/js/src/upbit.js +1 -1
  477. package/js/src/weex.d.ts +1 -1
  478. package/js/src/weex.js +2 -2
  479. package/js/src/whitebit.d.ts +1 -1
  480. package/js/src/whitebit.js +1 -1
  481. package/js/src/woo.d.ts +1 -1
  482. package/js/src/woo.js +1 -1
  483. package/js/src/woofipro.d.ts +1 -1
  484. package/js/src/woofipro.js +2 -4
  485. package/js/src/xt.js +1 -1
  486. package/js/src/zaif.d.ts +1 -1
  487. package/js/src/zaif.js +2 -2
  488. package/js/src/zebpay.d.ts +1 -1
  489. package/js/src/zebpay.js +2 -2
  490. package/package.json +17 -7
  491. package/js/src/static_dependencies/jsencrypt/JSEncrypt.d.ts +0 -116
  492. package/js/src/static_dependencies/jsencrypt/JSEncrypt.js +0 -194
  493. package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.d.ts +0 -142
  494. package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +0 -307
  495. package/js/src/static_dependencies/jsencrypt/index.d.ts +0 -3
  496. package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.d.ts +0 -51
  497. package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.js +0 -565
  498. package/js/src/static_dependencies/jsencrypt/lib/asn1js/base64.d.ts +0 -5
  499. package/js/src/static_dependencies/jsencrypt/lib/asn1js/base64.js +0 -94
  500. package/js/src/static_dependencies/jsencrypt/lib/asn1js/hex.d.ts +0 -3
  501. package/js/src/static_dependencies/jsencrypt/lib/asn1js/hex.js +0 -70
  502. package/js/src/static_dependencies/jsencrypt/lib/asn1js/int10.d.ts +0 -9
  503. package/js/src/static_dependencies/jsencrypt/lib/asn1js/int10.js +0 -91
  504. package/js/src/static_dependencies/jsencrypt/lib/asn1js/oids.d.ts +0 -9778
  505. package/js/src/static_dependencies/jsencrypt/lib/asn1js/oids.js +0 -1968
  506. package/js/src/static_dependencies/jsencrypt/lib/jsbn/base64.d.ts +0 -3
  507. package/js/src/static_dependencies/jsencrypt/lib/jsbn/base64.js +0 -25
  508. package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +0 -101
  509. package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.js +0 -1757
  510. package/js/src/static_dependencies/jsencrypt/lib/jsbn/prng4.d.ts +0 -10
  511. package/js/src/static_dependencies/jsencrypt/lib/jsbn/prng4.js +0 -50
  512. package/js/src/static_dependencies/jsencrypt/lib/jsbn/rng.d.ts +0 -3
  513. package/js/src/static_dependencies/jsencrypt/lib/jsbn/rng.js +0 -80
  514. package/js/src/static_dependencies/jsencrypt/lib/jsbn/rsa.d.ts +0 -23
  515. package/js/src/static_dependencies/jsencrypt/lib/jsbn/rsa.js +0 -377
  516. package/js/src/static_dependencies/jsencrypt/lib/jsbn/util.d.ts +0 -7
  517. package/js/src/static_dependencies/jsencrypt/lib/jsbn/util.js +0 -64
  518. package/js/src/static_dependencies/jsencrypt/lib/jsrsasign/asn1-1.0.d.ts +0 -24
  519. package/js/src/static_dependencies/jsencrypt/lib/jsrsasign/asn1-1.0.js +0 -1627
  520. package/js/src/static_dependencies/jsencrypt/lib/jsrsasign/yahoo.d.ts +0 -5
  521. package/js/src/static_dependencies/jsencrypt/lib/jsrsasign/yahoo.js +0 -75
package/dist/cjs/ccxt.js CHANGED
@@ -70,6 +70,7 @@ var extended = require('./src/extended.js');
70
70
  var fmfwio = require('./src/fmfwio.js');
71
71
  var foxbit = require('./src/foxbit.js');
72
72
  var gate = require('./src/gate.js');
73
+ var gateeu = require('./src/gateeu.js');
73
74
  var gemini = require('./src/gemini.js');
74
75
  var grvt = require('./src/grvt.js');
75
76
  var hashkey = require('./src/hashkey.js');
@@ -156,6 +157,7 @@ var dydx$1 = require('./src/pro/dydx.js');
156
157
  var exmo$1 = require('./src/pro/exmo.js');
157
158
  var extended$1 = require('./src/pro/extended.js');
158
159
  var gate$1 = require('./src/pro/gate.js');
160
+ var gateeu$1 = require('./src/pro/gateeu.js');
159
161
  var gemini$1 = require('./src/pro/gemini.js');
160
162
  var grvt$1 = require('./src/pro/grvt.js');
161
163
  var hashkey$1 = require('./src/pro/hashkey.js');
@@ -193,8 +195,7 @@ var xt$1 = require('./src/pro/xt.js');
193
195
 
194
196
  //-----------------------------------------------------------------------------
195
197
  // this is updated by vss.js when building
196
- const version = '4.5.60';
197
- Exchange["default"].ccxtVersion = version;
198
+ const version = '4.5.61';
198
199
  const exchanges = {
199
200
  'aftermath': aftermath["default"],
200
201
  'alpaca': alpaca["default"],
@@ -258,6 +259,7 @@ const exchanges = {
258
259
  'fmfwio': fmfwio["default"],
259
260
  'foxbit': foxbit["default"],
260
261
  'gate': gate["default"],
262
+ 'gateeu': gateeu["default"],
261
263
  'gemini': gemini["default"],
262
264
  'grvt': grvt["default"],
263
265
  'hashkey': hashkey["default"],
@@ -346,6 +348,7 @@ const pro = {
346
348
  'exmo': exmo$1["default"],
347
349
  'extended': extended$1["default"],
348
350
  'gate': gate$1["default"],
351
+ 'gateeu': gateeu$1["default"],
349
352
  'gemini': gemini$1["default"],
350
353
  'grvt': grvt$1["default"],
351
354
  'hashkey': hashkey$1["default"],
@@ -494,6 +497,7 @@ exports.extended = extended["default"];
494
497
  exports.fmfwio = fmfwio["default"];
495
498
  exports.foxbit = foxbit["default"];
496
499
  exports.gate = gate["default"];
500
+ exports.gateeu = gateeu["default"];
497
501
  exports.gemini = gemini["default"];
498
502
  exports.grvt = grvt["default"];
499
503
  exports.hashkey = hashkey["default"];
@@ -473,7 +473,7 @@ class aftermath extends aftermath$1["default"] {
473
473
  * @param {string} symbol unified symbol of the market to fetch the order book for
474
474
  * @param {int} [limit] the maximum amount of order book entries to return
475
475
  * @param {object} [params] extra parameters specific to the exchange API endpoint
476
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
476
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
477
477
  */
478
478
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
479
479
  await this.loadMarkets();
@@ -144,7 +144,7 @@ class apex extends apex$1["default"] {
144
144
  },
145
145
  'hostname': 'omni.apex.exchange',
146
146
  'urls': {
147
- 'logo': 'https://github.com/user-attachments/assets/fef8f2f7-4265-46aa-965e-33a91881cb00',
147
+ 'logo': 'https://github.com/user-attachments/assets/8ba7fbfa-0dd0-4ab9-8b72-ff60abe08ac6',
148
148
  'api': {
149
149
  'public': 'https://{hostname}/api',
150
150
  'private': 'https://{hostname}/api',
@@ -856,7 +856,7 @@ class apex extends apex$1["default"] {
856
856
  * @param {string} symbol unified symbol of the market to fetch the order book for
857
857
  * @param {int} [limit] the maximum amount of order book entries to return
858
858
  * @param {object} [params] extra parameters specific to the exchange API endpoint
859
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
859
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
860
860
  */
861
861
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
862
862
  await this.loadMarkets();
@@ -1078,7 +1078,7 @@ class ascendex extends ascendex$1["default"] {
1078
1078
  * @param {string} symbol unified symbol of the market to fetch the order book for
1079
1079
  * @param {int} [limit] the maximum amount of order book entries to return
1080
1080
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1081
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1081
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
1082
1082
  */
1083
1083
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1084
1084
  await this.loadMarkets();
@@ -26,12 +26,11 @@ class aster extends aster$1["default"] {
26
26
  // 150 req/s for subscribers: https://aster.markets/data
27
27
  // for brokers: https://aster.markets/docs/api-references/broker-api/#authentication-and-rate-limit
28
28
  'rateLimit': 333,
29
- 'hostname': 'aster.markets',
30
29
  'certified': false,
31
30
  'pro': true,
32
31
  'dex': true,
33
32
  'urls': {
34
- 'logo': 'https://github.com/user-attachments/assets/4982201b-73cd-4d7a-8907-e69e239e9609',
33
+ 'logo': 'https://github.com/user-attachments/assets/5e5909d6-c4de-4435-992f-4339c80edbd7',
35
34
  'www': 'https://www.asterdex.com/en',
36
35
  'api': {
37
36
  'fapiPublic': 'https://fapi.asterdex.com/fapi',
@@ -1308,7 +1307,7 @@ class aster extends aster$1["default"] {
1308
1307
  * @param {string} symbol unified symbol of the market to fetch the order book for
1309
1308
  * @param {int} [limit] the maximum amount of order book entries to return
1310
1309
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1311
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1310
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
1312
1311
  */
1313
1312
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1314
1313
  await this.loadMarkets();
@@ -4105,7 +4104,7 @@ class aster extends aster$1["default"] {
4105
4104
  return '0x' + r.padStart(64, '0') + s.padStart(64, '0') + v;
4106
4105
  }
4107
4106
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
4108
- let url = this.implodeHostname(this.urls['api'][api]) + '/' + path;
4107
+ let url = this.urls['api'][api] + '/' + path;
4109
4108
  if (api === 'fapiPublic' || api === 'sapiPublic') {
4110
4109
  if (Object.keys(params).length) {
4111
4110
  url += '?' + this.rawencode(params);
@@ -146,7 +146,7 @@ class backpack extends backpack$1["default"] {
146
146
  '1M': '1month',
147
147
  },
148
148
  'urls': {
149
- 'logo': 'https://github.com/user-attachments/assets/cc04c278-679f-4554-9f72-930dd632b80f',
149
+ 'logo': 'https://github.com/user-attachments/assets/7f682234-3eb1-48ab-a5ec-250a3227c985',
150
150
  'api': {
151
151
  'public': 'https://api.backpack.exchange',
152
152
  'private': 'https://api.backpack.exchange',
@@ -22,7 +22,6 @@ require('../static_dependencies/ethers/utils/maths.js');
22
22
  require('../static_dependencies/ethers/utils/utf8.js');
23
23
  require('../static_dependencies/ethers/address/address.js');
24
24
  var typedData = require('../static_dependencies/ethers/hash/typed-data.js');
25
- var rng = require('../static_dependencies/jsencrypt/lib/jsbn/rng.js');
26
25
  var zklinkSdkWeb = require('../static_dependencies/zklink/zklink-sdk-web.js');
27
26
  require('@noble/curves/abstract/poseidon.js');
28
27
  var selector = require('../static_dependencies/starknet/utils/selector.js');
@@ -70,6 +69,8 @@ let SignMode = undefined;
70
69
  * @class Exchange
71
70
  */
72
71
  class Exchange {
72
+ // this is updated by vss.js when building
73
+ static { this.ccxtVersion = '4.5.60'; }
73
74
  constructor(userConfig = {}) {
74
75
  this.isSandboxModeEnabled = false;
75
76
  this.api = undefined;
@@ -291,7 +292,7 @@ class Exchange {
291
292
  // if (isNode) {
292
293
  // this.nodeVersion = process.version.match (/\d+\.\d+\.\d+/)[0]
293
294
  // this.userAgent = {
294
- // 'User-Agent': 'ccxt/' + (Exchange as any).ccxtVersion +
295
+ // 'User-Agent': 'ccxt/' + Exchange.ccxtVersion +
295
296
  // ' (+https://github.com/ccxt/ccxt)' +
296
297
  // ' Node.js/' + this.nodeVersion + ' (JavaScript)'
297
298
  // }
@@ -432,37 +433,6 @@ class Exchange {
432
433
  // @ts-expect-error
433
434
  return encodeURIComponent(...args);
434
435
  }
435
- checkRequiredVersion(requiredVersion, error = true) {
436
- let result = true;
437
- const [major1, minor1, patch1] = requiredVersion.split('.');
438
- const [major2, minor2, patch2] = Exchange.ccxtVersion.split('.');
439
- const intMajor1 = this.parseToInt(major1);
440
- const intMinor1 = this.parseToInt(minor1);
441
- const intPatch1 = this.parseToInt(patch1);
442
- const intMajor2 = this.parseToInt(major2);
443
- const intMinor2 = this.parseToInt(minor2);
444
- const intPatch2 = this.parseToInt(patch2);
445
- if (intMajor1 > intMajor2) {
446
- result = false;
447
- }
448
- if (intMajor1 === intMajor2) {
449
- if (intMinor1 > intMinor2) {
450
- result = false;
451
- }
452
- else if (intMinor1 === intMinor2 && intPatch1 > intPatch2) {
453
- result = false;
454
- }
455
- }
456
- if (!result) {
457
- if (error) {
458
- throw new errors.NotSupported('Your current version of CCXT is ' + Exchange.ccxtVersion + ', a newer version ' + requiredVersion + ' is required, please, upgrade your version of CCXT');
459
- }
460
- else {
461
- return error;
462
- }
463
- }
464
- return result;
465
- }
466
436
  throttle(cost = undefined) {
467
437
  return this.throttler.throttle(cost);
468
438
  }
@@ -1606,11 +1576,9 @@ class Exchange {
1606
1576
  return dict;
1607
1577
  }
1608
1578
  randomBytes(length) {
1609
- const rng$1 = new rng.SecureRandom();
1610
- const x = [];
1611
- x.length = length;
1612
- rng$1.nextBytes(x);
1613
- return Buffer.from(x).toString('hex');
1579
+ const x = new Uint8Array(length);
1580
+ crypto.getRandomValues(x);
1581
+ return this.binaryToBase16(x);
1614
1582
  }
1615
1583
  randNumber(size) {
1616
1584
  let number = '';
@@ -5,8 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var hmac_js = require('@noble/hashes/hmac.js');
6
6
  var base = require('@scure/base');
7
7
  var utils_js$1 = require('@noble/hashes/utils.js');
8
- var base64 = require('../../static_dependencies/jsencrypt/lib/asn1js/base64.js');
9
- var asn1 = require('../../static_dependencies/jsencrypt/lib/asn1js/asn1.js');
10
8
  var secp256k1_js = require('@noble/curves/secp256k1.js');
11
9
  var nist_js = require('@noble/curves/nist.js');
12
10
  var utils_js = require('@noble/curves/utils.js');
@@ -25,6 +23,62 @@ const supportedCurve = {
25
23
  '1.3.132.0.10': secp256k1_js.secp256k1,
26
24
  '1.2.840.10045.3.1.7': nist_js.p256,
27
25
  };
26
+ /* ----- minimal PEM / DER helpers (replace the vendored jsencrypt asn1js) ----- */
27
+ // strip the PEM armor (-----BEGIN/END ...-----) and base64-decode the body to DER bytes
28
+ function pemToDer(pem) {
29
+ const body = pem
30
+ .replace(/-----BEGIN [^-]+-----/g, '')
31
+ .replace(/-----END [^-]+-----/g, '')
32
+ .replace(/\s+/g, '');
33
+ return base.base64.decode(body);
34
+ }
35
+ // read a definite-form DER length, returns [ length, nextOffset ]
36
+ function readDerLength(bytes, offset) {
37
+ let length = bytes[offset];
38
+ offset += 1;
39
+ if (length & 0x80) {
40
+ const numBytes = length & 0x7f;
41
+ length = 0;
42
+ for (let i = 0; i < numBytes; i++) {
43
+ length = (length * 256) + bytes[offset];
44
+ offset += 1;
45
+ }
46
+ }
47
+ return [length, offset];
48
+ }
49
+ // parse a DER buffer into a flat list of its top-level TLV elements
50
+ function parseDerElements(bytes) {
51
+ const elements = [];
52
+ let offset = 0;
53
+ while (offset < bytes.length) {
54
+ const tag = bytes[offset];
55
+ offset += 1;
56
+ const result = readDerLength(bytes, offset);
57
+ const length = result[0];
58
+ offset = result[1];
59
+ const content = bytes.slice(offset, offset + length);
60
+ elements.push({ 'tag': tag, 'content': content });
61
+ offset += length;
62
+ }
63
+ return elements;
64
+ }
65
+ // decode an OID's content bytes into a dotted-decimal string
66
+ function decodeOid(bytes) {
67
+ const values = [];
68
+ const first = bytes[0];
69
+ values.push(Math.floor(first / 40));
70
+ values.push(first % 40);
71
+ let value = 0;
72
+ for (let i = 1; i < bytes.length; i++) {
73
+ const b = bytes[i];
74
+ value = (value * 128) + (b & 0x7f);
75
+ if ((b & 0x80) === 0) {
76
+ values.push(value);
77
+ value = 0;
78
+ }
79
+ }
80
+ return values.join('.');
81
+ }
28
82
  /* ............................................. */
29
83
  const hash = (request, hash, digest = 'hex') => {
30
84
  const binary = hash(utf8Bytes(request));
@@ -43,22 +97,24 @@ function ecdsa(request, secret, curve, prehash = null, fixedLength = false) {
43
97
  if (typeof secret === 'string' && secret.length > 64) {
44
98
  // decode pem key
45
99
  if (secret.startsWith('-----BEGIN EC PRIVATE KEY-----')) {
46
- const der = base64.Base64.unarmor(secret);
47
- let asn1$1 = asn1.ASN1.decode(der);
48
- if (asn1$1.sub.length === 4) {
49
- // ECPrivateKey ::= SEQUENCE {
50
- // version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
51
- // privateKey OCTET STRING,
52
- // parameters [0] ECParameters {{ NamedCurve }} OPTIONAL,
53
- // publicKey [1] BIT STRING OPTIONAL
54
- // }
55
- if (typeof asn1$1.sub[2].sub !== null && asn1$1.sub[2].sub.length > 0) {
56
- const oid = asn1$1.sub[2].sub[0].content(undefined);
100
+ const der = pemToDer(secret);
101
+ const top = parseDerElements(der);
102
+ // ECPrivateKey ::= SEQUENCE {
103
+ // version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
104
+ // privateKey OCTET STRING,
105
+ // parameters [0] ECParameters {{ NamedCurve }} OPTIONAL,
106
+ // publicKey [1] BIT STRING OPTIONAL
107
+ // }
108
+ const fields = parseDerElements(top[0].content);
109
+ if (fields.length === 4) {
110
+ const params = fields[2];
111
+ if (params !== undefined && params.tag === 0xA0 && params.content.length > 0) {
112
+ const oid = decodeOid(parseDerElements(params.content)[0].content);
57
113
  if (supportedCurve[oid] === undefined)
58
114
  throw new Error('Unsupported curve');
59
115
  curve = supportedCurve[oid];
60
116
  }
61
- secret = asn1$1.sub[1].getHexStringValue();
117
+ secret = base.hex.encode(fields[1].content);
62
118
  }
63
119
  else {
64
120
  // maybe return false
@@ -106,7 +162,7 @@ function eddsa(request, secret, curve) {
106
162
  else if (typeof secret === 'string') {
107
163
  // secret is the base64 pem encoded key
108
164
  // we get the last 32 bytes
109
- privateKey = new Uint8Array(base64.Base64.unarmor(secret).slice(16));
165
+ privateKey = new Uint8Array(pemToDer(secret).slice(16));
110
166
  }
111
167
  const signature = curve.sign(hexBytes(request), privateKey);
112
168
  return base.base64.encode(signature);
@@ -139,3 +195,4 @@ exports.ecdsa = ecdsa;
139
195
  exports.eddsa = eddsa;
140
196
  exports.hash = hash;
141
197
  exports.hmac = hmac;
198
+ exports.pemToDer = pemToDer;
@@ -2,22 +2,37 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var JSEncrypt = require('../../static_dependencies/jsencrypt/JSEncrypt.js');
6
- var utils_js = require('@noble/hashes/utils.js');
5
+ var crypto = require('crypto');
7
6
  var base = require('@scure/base');
8
7
  var encode = require('./encode.js');
9
- var crypto = require('./crypto.js');
8
+ var crypto$1 = require('./crypto.js');
10
9
  var nist_js = require('@noble/curves/nist.js');
11
10
  var ed25519_js = require('@noble/curves/ed25519.js');
12
11
 
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
15
+
13
16
  // ----------------------------------------------------------------------------
17
+ // RSASSA-PKCS1-v1_5 signing via Node's built-in `crypto` module. This is synchronous
18
+ // and works in Node.js / Bun / Deno (anything exposing node:crypto). It is NOT available
19
+ // in the browser bundle (rspack stubs the `crypto` module), so rsa throws there: RSA
20
+ // signing is currently unsupported in the browser.
14
21
  function rsa(request, secret, hash) {
15
- const RSA = new JSEncrypt.JSEncrypt();
16
- const digester = (input) => base.hex.encode(hash((typeof input === 'string') ? utils_js.utf8ToBytes(input) : input));
17
- RSA.setPrivateKey(secret);
22
+ if (crypto__default["default"] === undefined || crypto__default["default"].createSign === undefined) {
23
+ throw new Error('rsa is currently not supported in the browser');
24
+ }
18
25
  // @noble/hashes v2 renamed the digest classes from SHA256 to _SHA256, etc
19
26
  const name = (hash.create()).constructor.name.toLowerCase().replace('_', '');
20
- return RSA.sign(request, digester, name);
27
+ const algorithms = {
28
+ 'sha256': 'RSA-SHA256',
29
+ 'sha384': 'RSA-SHA384',
30
+ 'sha512': 'RSA-SHA512',
31
+ };
32
+ const algorithm = algorithms[name];
33
+ const signer = crypto__default["default"].createSign(algorithm);
34
+ signer.update(request);
35
+ return signer.sign(secret, 'base64');
21
36
  }
22
37
  function jwt(request, secret, hash, isRSA = false, opts = {}) {
23
38
  let alg = (isRSA ? 'RS' : 'HS') + (hash.outputLen * 8);
@@ -35,19 +50,19 @@ function jwt(request, secret, hash, isRSA = false, opts = {}) {
35
50
  const algoType = alg.slice(0, 2);
36
51
  let signature = undefined;
37
52
  if (algoType === 'HS') {
38
- signature = encode.urlencodeBase64(crypto.hmac(token, secret, hash, 'binary'));
53
+ signature = encode.urlencodeBase64(crypto$1.hmac(token, secret, hash, 'binary'));
39
54
  }
40
55
  else if (isRSA || algoType === 'RS') {
41
56
  signature = encode.urlencodeBase64(encode.base64ToBinary(rsa(token, base.utf8.encode(secret), hash)));
42
57
  }
43
58
  else if (algoType === 'ES') {
44
- const signedHash = crypto.ecdsa(token, base.utf8.encode(secret), nist_js.p256, hash);
59
+ const signedHash = crypto$1.ecdsa(token, base.utf8.encode(secret), nist_js.p256, hash);
45
60
  const r = signedHash.r.padStart(64, '0');
46
61
  const s = signedHash.s.padStart(64, '0');
47
62
  signature = encode.urlencodeBase64(encode.base16ToBinary(r + s));
48
63
  }
49
64
  else if (algoType === 'ED') {
50
- const base64str = crypto.eddsa(toHex(token), secret, ed25519_js.ed25519);
65
+ const base64str = crypto$1.eddsa(toHex(token), secret, ed25519_js.ed25519);
51
66
  // we need urlencoded64 not base64
52
67
  signature = encode.base64ToBase64Url(base64str);
53
68
  }
@@ -134,6 +134,7 @@ exports.ecdsa = crypto.ecdsa;
134
134
  exports.eddsa = crypto.eddsa;
135
135
  exports.hash = crypto.hash;
136
136
  exports.hmac = crypto.hmac;
137
+ exports.pemToDer = crypto.pemToDer;
137
138
  exports.TimedOut = time.TimedOut;
138
139
  exports.iso8601 = time.iso8601;
139
140
  exports.mdy = time.mdy;
@@ -22,7 +22,7 @@ class bequant extends hitbtc["default"] {
22
22
  'option': undefined,
23
23
  },
24
24
  'urls': {
25
- 'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
25
+ 'logo': 'https://github.com/user-attachments/assets/01e199a6-5c65-4b03-83ab-7f9827c140f9',
26
26
  'api': {
27
27
  // v3
28
28
  'public': 'https://api.bequant.io/api/3',
@@ -1027,7 +1027,7 @@ class bigone extends bigone$1["default"] {
1027
1027
  * @param {string} symbol unified symbol of the market to fetch the order book for
1028
1028
  * @param {int} [limit] the maximum amount of order book entries to return
1029
1029
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1030
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1030
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
1031
1031
  */
1032
1032
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1033
1033
  await this.loadMarkets();
@@ -4123,7 +4123,7 @@ class binance extends binance$1["default"] {
4123
4123
  * @param {int} [limit] the maximum amount of order book entries to return
4124
4124
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4125
4125
  * @param {boolean} [params.rpi] *future only* set to true to use the RPI endpoint
4126
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
4126
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
4127
4127
  */
4128
4128
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
4129
4129
  await this.loadMarkets();
@@ -1537,7 +1537,7 @@ class bingx extends bingx$1["default"] {
1537
1537
  * @param {string} symbol unified symbol of the market to fetch the order book for
1538
1538
  * @param {int} [limit] the maximum amount of order book entries to return
1539
1539
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1540
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1540
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
1541
1541
  */
1542
1542
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1543
1543
  await this.loadMarkets();
@@ -366,7 +366,7 @@ class bit2c extends bit2c$1["default"] {
366
366
  * @param {string} symbol unified symbol of the market to fetch the order book for
367
367
  * @param {int} [limit] the maximum amount of order book entries to return
368
368
  * @param {object} [params] extra parameters specific to the exchange API endpoint
369
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
369
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
370
370
  */
371
371
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
372
372
  await this.loadMarkets();
@@ -418,7 +418,7 @@ class bitbank extends bitbank$1["default"] {
418
418
  * @param {string} symbol unified symbol of the market to fetch the order book for
419
419
  * @param {int} [limit] the maximum amount of order book entries to return
420
420
  * @param {object} [params] extra parameters specific to the exchange API endpoint
421
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
421
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
422
422
  */
423
423
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
424
424
  await this.loadMarkets();
@@ -359,7 +359,7 @@ class bitbns extends bitbns$1["default"] {
359
359
  * @param {string} symbol unified symbol of the market to fetch the order book for
360
360
  * @param {int} [limit] the maximum amount of order book entries to return
361
361
  * @param {object} [params] extra parameters specific to the exchange API endpoint
362
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
362
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
363
363
  */
364
364
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
365
365
  await this.loadMarkets();
@@ -606,13 +606,13 @@ class bitfinex extends bitfinex$1["default"] {
606
606
  async fetchMarkets(params = {}) {
607
607
  const labels = [
608
608
  'pub:info:pair',
609
- // [ ['AAVE:USD', [null,null,null,"0.02","5000.0",null,null,null,null,null,null,null,] ], ... ]
609
+ // sample: 'AAVE:USD' with fields null,null,null,"0.02","5000.0",null,null,null,null,null,null,null
610
610
  'pub:info:pair:futures',
611
- // [ ['AAVEF0:USTF0', [null,null,null,"0.02","5000.0",null,null,null,0.01,0.005,] ]]
611
+ // sample: 'AAVEF0:USTF0' with fields null,null,null,"0.02","5000.0",null,null,null,0.01,0.005
612
612
  'pub:list:pair:securities',
613
- // ALT2612:USD","ALT2612:UST","BMN2:BTC","BMN2:USD","TITAN1:GBP","TITAN1:USD","TITAN2:GBP","TITAN2:USD","USTBL:USD","USTBL:UST"]]
613
+ // sample: "ALT2612:USD","ALT2612:UST","BMN2:BTC","BMN2:USD","TITAN1:GBP","TITAN1:USD","TITAN2:GBP","TITAN2:USD","USTBL:USD","USTBL:UST"
614
614
  'pub:list:pair:margin',
615
- // [ 'ADABTC', 'AVAX:BTC', ... ] // delimiter inconsistency
615
+ // sample: 'ADABTC', 'AVAX:BTC', ... // delimiter inconsistency
616
616
  ];
617
617
  const config = labels.join(',');
618
618
  const request = {
@@ -1133,7 +1133,7 @@ class bitfinex extends bitfinex$1["default"] {
1133
1133
  * @param {string} symbol unified symbol of the market to fetch the order book for
1134
1134
  * @param {int} [limit] the maximum amount of order book entries to return, bitfinex only allows 1, 25, or 100
1135
1135
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1136
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1136
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
1137
1137
  */
1138
1138
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1139
1139
  await this.loadMarkets();
@@ -461,7 +461,7 @@ class bitflyer extends bitflyer$1["default"] {
461
461
  * @param {string} symbol unified symbol of the market to fetch the order book for
462
462
  * @param {int} [limit] the maximum amount of order book entries to return
463
463
  * @param {object} [params] extra parameters specific to the exchange API endpoint
464
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
464
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
465
465
  */
466
466
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
467
467
  await this.loadMarkets();
@@ -162,7 +162,7 @@ class bitget extends bitget$1["default"] {
162
162
  },
163
163
  'hostname': 'bitget.com',
164
164
  'urls': {
165
- 'logo': 'https://github.com/user-attachments/assets/fbaa10cc-a277-441d-a5b7-997dd9a87658',
165
+ 'logo': 'https://github.com/user-attachments/assets/b54bb4c2-416d-4231-8968-85a77748ba45',
166
166
  'api': {
167
167
  'spot': 'https://api.{hostname}',
168
168
  'mix': 'https://api.{hostname}',
@@ -3166,7 +3166,7 @@ class bitget extends bitget$1["default"] {
3166
3166
  * @param {int} [limit] the maximum amount of order book entries to return
3167
3167
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3168
3168
  * @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
3169
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
3169
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
3170
3170
  */
3171
3171
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
3172
3172
  await this.loadMarkets();
@@ -453,7 +453,7 @@ class bithumb extends bithumb$1["default"] {
453
453
  * @param {string} symbol unified symbol of the market to fetch the order book for
454
454
  * @param {int} [limit] the maximum amount of order book entries to return
455
455
  * @param {object} [params] extra parameters specific to the exchange API endpoint
456
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
456
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
457
457
  */
458
458
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
459
459
  await this.loadMarkets();
@@ -115,7 +115,7 @@ class bitmart extends bitmart$1["default"] {
115
115
  },
116
116
  'hostname': 'bitmart.com', // bitmart.info, bitmart.news for Hong Kong users
117
117
  'urls': {
118
- 'logo': 'https://github.com/user-attachments/assets/0623e9c4-f50e-48c9-82bd-65c3908c3a14',
118
+ 'logo': 'https://github.com/user-attachments/assets/3741e8c0-83a8-4504-ae68-32b00e3c27ee',
119
119
  'api': {
120
120
  'spot': 'https://api-cloud.{hostname}',
121
121
  'swap': 'https://api-cloud-v2.{hostname}', // bitmart.info for Hong Kong users
@@ -1810,7 +1810,7 @@ class bitmart extends bitmart$1["default"] {
1810
1810
  * @param {string} symbol unified symbol of the market to fetch the order book for
1811
1811
  * @param {int} [limit] the maximum amount of order book entries to return
1812
1812
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1813
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1813
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
1814
1814
  */
1815
1815
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1816
1816
  await this.loadMarkets();
@@ -138,7 +138,7 @@ class bitmex extends bitmex$1["default"] {
138
138
  'public': 'https://testnet.bitmex.com',
139
139
  'private': 'https://testnet.bitmex.com',
140
140
  },
141
- 'logo': 'https://github.com/user-attachments/assets/c78425ab-78d5-49d6-bd14-db7734798f04',
141
+ 'logo': 'https://github.com/user-attachments/assets/3360333d-35a6-4503-bbba-92a6bc0c174f',
142
142
  'api': {
143
143
  'public': 'https://www.bitmex.com',
144
144
  'private': 'https://www.bitmex.com',
@@ -1056,7 +1056,7 @@ class bitmex extends bitmex$1["default"] {
1056
1056
  * @param {string} symbol unified symbol of the market to fetch the order book for
1057
1057
  * @param {int} [limit] the maximum amount of order book entries to return
1058
1058
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1059
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1059
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
1060
1060
  */
1061
1061
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1062
1062
  await this.loadMarkets();
@@ -601,7 +601,7 @@ class bitopro extends bitopro$1["default"] {
601
601
  * @param {string} symbol unified symbol of the market to fetch the order book for
602
602
  * @param {int} [limit] the maximum amount of order book entries to return
603
603
  * @param {object} [params] extra parameters specific to the exchange API endpoint
604
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
604
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
605
605
  */
606
606
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
607
607
  await this.loadMarkets();
@@ -1223,7 +1223,7 @@ class bitrue extends bitrue$1["default"] {
1223
1223
  * @param {string} symbol unified symbol of the market to fetch the order book for
1224
1224
  * @param {int} [limit] the maximum amount of order book entries to return
1225
1225
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1226
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
1226
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
1227
1227
  */
1228
1228
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1229
1229
  await this.loadMarkets();
@@ -132,7 +132,7 @@ class bitso extends bitso$1["default"] {
132
132
  'withdraw': true,
133
133
  },
134
134
  'urls': {
135
- 'logo': 'https://github.com/user-attachments/assets/178c8e56-9054-4107-b192-5e5053d4f975',
135
+ 'logo': 'https://github.com/user-attachments/assets/3d0c1e5e-8aaa-419f-968a-2b7409381ce4',
136
136
  'api': {
137
137
  'rest': 'https://bitso.com/api',
138
138
  },
@@ -656,7 +656,7 @@ class bitso extends bitso$1["default"] {
656
656
  * @param {string} symbol unified symbol of the market to fetch the order book for
657
657
  * @param {int} [limit] the maximum amount of order book entries to return
658
658
  * @param {object} [params] extra parameters specific to the exchange API endpoint
659
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
659
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
660
660
  */
661
661
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
662
662
  await this.loadMarkets();