ccxt 4.5.82 → 4.5.83

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 (446) hide show
  1. package/README.md +5 -4
  2. package/dist/ccxt.browser.min.js +2 -2
  3. package/dist/cjs/ccxt.js +3 -1
  4. package/dist/cjs/src/abstract/prediction/sxbet.js +11 -0
  5. package/dist/cjs/src/apex.js +1 -0
  6. package/dist/cjs/src/aster.js +2 -2
  7. package/dist/cjs/src/base/Exchange.js +1 -1
  8. package/dist/cjs/src/bigone.js +2 -2
  9. package/dist/cjs/src/binance.js +10 -10
  10. package/dist/cjs/src/bingx.js +3 -3
  11. package/dist/cjs/src/bit2c.js +4 -4
  12. package/dist/cjs/src/bitbank.js +15 -15
  13. package/dist/cjs/src/bitfinex.js +15 -15
  14. package/dist/cjs/src/bitget.js +109 -73
  15. package/dist/cjs/src/bitmex.js +7 -7
  16. package/dist/cjs/src/bitopro.js +2 -2
  17. package/dist/cjs/src/bitrue.js +6 -6
  18. package/dist/cjs/src/bitso.js +18 -18
  19. package/dist/cjs/src/bitstamp.js +5 -5
  20. package/dist/cjs/src/bitteam.js +32 -32
  21. package/dist/cjs/src/bittrade.js +10 -10
  22. package/dist/cjs/src/bitvavo.js +9 -9
  23. package/dist/cjs/src/blockchaincom.js +2 -2
  24. package/dist/cjs/src/btcbox.js +2 -2
  25. package/dist/cjs/src/btcmarkets.js +2 -2
  26. package/dist/cjs/src/btcturk.js +2 -2
  27. package/dist/cjs/src/btse.js +2 -2
  28. package/dist/cjs/src/bybitid.js +4 -0
  29. package/dist/cjs/src/coinbase.js +1 -1
  30. package/dist/cjs/src/coinbaseexchange.js +13 -13
  31. package/dist/cjs/src/coincheck.js +4 -4
  32. package/dist/cjs/src/coinex.js +10 -10
  33. package/dist/cjs/src/coinmate.js +4 -4
  34. package/dist/cjs/src/coinone.js +4 -4
  35. package/dist/cjs/src/coinsph.js +5 -5
  36. package/dist/cjs/src/cryptocom.js +5 -5
  37. package/dist/cjs/src/deribit.js +31 -31
  38. package/dist/cjs/src/derive.js +1 -1
  39. package/dist/cjs/src/digifinex.js +31 -31
  40. package/dist/cjs/src/gate.js +25 -25
  41. package/dist/cjs/src/gemini.js +5 -5
  42. package/dist/cjs/src/grvt.js +1 -1
  43. package/dist/cjs/src/hibachi.js +5 -5
  44. package/dist/cjs/src/hitbtc.js +15 -15
  45. package/dist/cjs/src/hollaex.js +15 -15
  46. package/dist/cjs/src/htx.js +52 -52
  47. package/dist/cjs/src/hyperliquid.js +2 -2
  48. package/dist/cjs/src/independentreserve.js +2 -2
  49. package/dist/cjs/src/indodax.js +8 -8
  50. package/dist/cjs/src/kraken.js +29 -29
  51. package/dist/cjs/src/krakenfutures.js +16 -16
  52. package/dist/cjs/src/kucoin.js +15 -15
  53. package/dist/cjs/src/latoken.js +8 -8
  54. package/dist/cjs/src/lbank.js +31 -31
  55. package/dist/cjs/src/lighter.js +2 -2
  56. package/dist/cjs/src/luno.js +2 -2
  57. package/dist/cjs/src/mercado.js +12 -12
  58. package/dist/cjs/src/mexc.js +27 -27
  59. package/dist/cjs/src/modetrade.js +10 -10
  60. package/dist/cjs/src/ndax.js +4 -4
  61. package/dist/cjs/src/okx.js +19 -20
  62. package/dist/cjs/src/onetrading.js +7 -7
  63. package/dist/cjs/src/p2b.js +8 -8
  64. package/dist/cjs/src/pacifica.js +9 -3
  65. package/dist/cjs/src/paymium.js +2 -2
  66. package/dist/cjs/src/phemex.js +37 -37
  67. package/dist/cjs/src/poloniex.js +14 -14
  68. package/dist/cjs/src/prediction/sxbet.js +2710 -0
  69. package/dist/cjs/src/pro/alpaca.js +5 -5
  70. package/dist/cjs/src/pro/apex.js +6 -6
  71. package/dist/cjs/src/pro/aster.js +8 -8
  72. package/dist/cjs/src/pro/backpack.js +1 -1
  73. package/dist/cjs/src/pro/binance.js +26 -26
  74. package/dist/cjs/src/pro/bingx.js +11 -11
  75. package/dist/cjs/src/pro/bitfinex.js +11 -11
  76. package/dist/cjs/src/pro/bitget.js +20 -20
  77. package/dist/cjs/src/pro/bithumb.js +1 -1
  78. package/dist/cjs/src/pro/bitmex.js +12 -12
  79. package/dist/cjs/src/pro/bitopro.js +5 -5
  80. package/dist/cjs/src/pro/bitrue.js +7 -7
  81. package/dist/cjs/src/pro/bitstamp.js +5 -5
  82. package/dist/cjs/src/pro/bittrade.js +11 -11
  83. package/dist/cjs/src/pro/bitvavo.js +16 -16
  84. package/dist/cjs/src/pro/blockchaincom.js +5 -5
  85. package/dist/cjs/src/pro/blofin.js +2 -2
  86. package/dist/cjs/src/pro/bybit.js +21 -21
  87. package/dist/cjs/src/pro/bydfi.js +2 -2
  88. package/dist/cjs/src/pro/cex.js +19 -19
  89. package/dist/cjs/src/pro/coinbase.js +2 -2
  90. package/dist/cjs/src/pro/coinbaseexchange.js +9 -9
  91. package/dist/cjs/src/pro/coinbaseinternational.js +2 -2
  92. package/dist/cjs/src/pro/coincheck.js +2 -2
  93. package/dist/cjs/src/pro/coinex.js +3 -3
  94. package/dist/cjs/src/pro/coinone.js +6 -6
  95. package/dist/cjs/src/pro/cryptocom.js +10 -10
  96. package/dist/cjs/src/pro/deribit.js +13 -13
  97. package/dist/cjs/src/pro/derive.js +4 -4
  98. package/dist/cjs/src/pro/dydx.js +1 -1
  99. package/dist/cjs/src/pro/extended.js +16 -10
  100. package/dist/cjs/src/pro/gate.js +10 -10
  101. package/dist/cjs/src/pro/gemini.js +3 -3
  102. package/dist/cjs/src/pro/grvt.js +2 -2
  103. package/dist/cjs/src/pro/hashkey.js +2 -2
  104. package/dist/cjs/src/pro/hitbtc.js +6 -6
  105. package/dist/cjs/src/pro/hollaex.js +3 -3
  106. package/dist/cjs/src/pro/htx.js +28 -28
  107. package/dist/cjs/src/pro/hyperliquid.js +1 -1
  108. package/dist/cjs/src/pro/independentreserve.js +2 -2
  109. package/dist/cjs/src/pro/kraken.js +7 -7
  110. package/dist/cjs/src/pro/krakenfutures.js +12 -12
  111. package/dist/cjs/src/pro/kucoin.js +12 -12
  112. package/dist/cjs/src/pro/lbank.js +16 -16
  113. package/dist/cjs/src/pro/luno.js +2 -2
  114. package/dist/cjs/src/pro/mexc.js +8 -8
  115. package/dist/cjs/src/pro/modetrade.js +3 -3
  116. package/dist/cjs/src/pro/mudrex.js +2 -2
  117. package/dist/cjs/src/pro/nado.js +3 -3
  118. package/dist/cjs/src/pro/ndax.js +6 -6
  119. package/dist/cjs/src/pro/okx.js +20 -20
  120. package/dist/cjs/src/pro/onetrading.js +14 -14
  121. package/dist/cjs/src/pro/p2b.js +5 -5
  122. package/dist/cjs/src/pro/pacifica.js +1 -1
  123. package/dist/cjs/src/pro/paradex.js +1 -1
  124. package/dist/cjs/src/pro/phemex.js +13 -13
  125. package/dist/cjs/src/pro/poloniex.js +17 -17
  126. package/dist/cjs/src/pro/toobit.js +2 -2
  127. package/dist/cjs/src/pro/upbit.js +4 -4
  128. package/dist/cjs/src/pro/weex.js +2 -2
  129. package/dist/cjs/src/pro/whitebit.js +12 -12
  130. package/dist/cjs/src/pro/woo.js +13 -13
  131. package/dist/cjs/src/pro/woofipro.js +3 -3
  132. package/dist/cjs/src/pro/xt.js +3 -3
  133. package/dist/cjs/src/tokocrypto.js +20 -20
  134. package/dist/cjs/src/upbit.js +12 -12
  135. package/dist/cjs/src/whitebit.js +15 -15
  136. package/dist/cjs/src/woo.js +3 -3
  137. package/dist/cjs/src/woofipro.js +14 -14
  138. package/dist/cjs/src/zaif.js +9 -3
  139. package/dist/cjs/src/zebpay.js +1 -1
  140. package/js/ccxt.d.ts +4 -1
  141. package/js/ccxt.js +3 -1
  142. package/js/src/abstract/prediction/sxbet.d.ts +41 -0
  143. package/js/src/abstract/prediction/sxbet.js +11 -0
  144. package/js/src/alpaca.d.ts +28 -33
  145. package/js/src/apex.d.ts +28 -42
  146. package/js/src/apex.js +1 -0
  147. package/js/src/aster.d.ts +58 -108
  148. package/js/src/aster.js +2 -2
  149. package/js/src/backpack.d.ts +34 -48
  150. package/js/src/base/Exchange.d.ts +304 -320
  151. package/js/src/base/Exchange.js +1 -1
  152. package/js/src/bigone.d.ts +24 -29
  153. package/js/src/bigone.js +2 -2
  154. package/js/src/binance.d.ts +112 -138
  155. package/js/src/binance.js +10 -10
  156. package/js/src/binancecoinm.d.ts +3 -2
  157. package/js/src/binanceusdm.d.ts +3 -2
  158. package/js/src/bingx.d.ts +65 -84
  159. package/js/src/bingx.js +3 -3
  160. package/js/src/bit2c.d.ts +13 -18
  161. package/js/src/bit2c.js +4 -4
  162. package/js/src/bitbank.d.ts +16 -21
  163. package/js/src/bitbank.js +15 -15
  164. package/js/src/bitbns.d.ts +15 -20
  165. package/js/src/bitfinex.d.ts +46 -51
  166. package/js/src/bitfinex.js +15 -15
  167. package/js/src/bitflyer.d.ts +20 -25
  168. package/js/src/bitget.d.ts +105 -93
  169. package/js/src/bitget.js +109 -73
  170. package/js/src/bithumb.d.ts +26 -31
  171. package/js/src/bitmex.d.ts +48 -65
  172. package/js/src/bitmex.js +7 -7
  173. package/js/src/bitopro.d.ts +25 -41
  174. package/js/src/bitopro.js +2 -2
  175. package/js/src/bitrue.d.ts +30 -45
  176. package/js/src/bitrue.js +6 -6
  177. package/js/src/bitso.d.ts +24 -29
  178. package/js/src/bitso.js +18 -18
  179. package/js/src/bitstamp.d.ts +36 -47
  180. package/js/src/bitstamp.js +5 -5
  181. package/js/src/bitteam.d.ts +22 -27
  182. package/js/src/bitteam.js +32 -32
  183. package/js/src/bittrade.d.ts +35 -46
  184. package/js/src/bittrade.js +10 -10
  185. package/js/src/bitvavo.d.ts +43 -48
  186. package/js/src/bitvavo.js +9 -9
  187. package/js/src/blockchaincom.d.ts +26 -31
  188. package/js/src/blockchaincom.js +2 -2
  189. package/js/src/blofin.d.ts +38 -43
  190. package/js/src/btcbox.d.ts +14 -19
  191. package/js/src/btcbox.js +2 -2
  192. package/js/src/btcmarkets.d.ts +25 -30
  193. package/js/src/btcmarkets.js +2 -2
  194. package/js/src/btcturk.d.ts +13 -18
  195. package/js/src/btcturk.js +2 -2
  196. package/js/src/btse.d.ts +44 -50
  197. package/js/src/btse.js +2 -2
  198. package/js/src/bullish.d.ts +35 -57
  199. package/js/src/bybit.d.ts +95 -106
  200. package/js/src/bybitid.js +4 -0
  201. package/js/src/bydfi.d.ts +37 -48
  202. package/js/src/cex.d.ts +29 -34
  203. package/js/src/coinbase.d.ts +66 -82
  204. package/js/src/coinbase.js +1 -1
  205. package/js/src/coinbaseexchange.d.ts +33 -43
  206. package/js/src/coinbaseexchange.js +13 -13
  207. package/js/src/coinbaseinternational.d.ts +34 -73
  208. package/js/src/coincheck.d.ts +13 -18
  209. package/js/src/coincheck.js +4 -4
  210. package/js/src/coinex.d.ts +63 -68
  211. package/js/src/coinex.js +10 -10
  212. package/js/src/coinmate.d.ts +15 -20
  213. package/js/src/coinmate.js +4 -4
  214. package/js/src/coinone.d.ts +14 -19
  215. package/js/src/coinone.js +4 -4
  216. package/js/src/coinsph.d.ts +32 -37
  217. package/js/src/coinsph.js +5 -5
  218. package/js/src/coinspot.d.ts +10 -15
  219. package/js/src/cryptocom.d.ts +48 -64
  220. package/js/src/cryptocom.js +5 -5
  221. package/js/src/cryptomus.d.ts +15 -23
  222. package/js/src/deepcoin.d.ts +43 -48
  223. package/js/src/delta.d.ts +43 -54
  224. package/js/src/deribit.d.ts +48 -69
  225. package/js/src/deribit.js +31 -31
  226. package/js/src/derive.d.ts +28 -42
  227. package/js/src/derive.js +1 -1
  228. package/js/src/digifinex.d.ts +54 -67
  229. package/js/src/digifinex.js +31 -31
  230. package/js/src/dydx.d.ts +26 -31
  231. package/js/src/extended.d.ts +51 -56
  232. package/js/src/foxbit.d.ts +34 -64
  233. package/js/src/gate.d.ts +94 -162
  234. package/js/src/gate.js +25 -25
  235. package/js/src/gemini.d.ts +33 -43
  236. package/js/src/gemini.js +5 -5
  237. package/js/src/grvt.d.ts +36 -47
  238. package/js/src/grvt.js +1 -1
  239. package/js/src/hashkey.d.ts +58 -78
  240. package/js/src/hibachi.d.ts +42 -52
  241. package/js/src/hibachi.js +5 -5
  242. package/js/src/hitbtc.d.ts +49 -56
  243. package/js/src/hitbtc.js +15 -15
  244. package/js/src/hollaex.d.ts +26 -31
  245. package/js/src/hollaex.js +15 -15
  246. package/js/src/htx.d.ts +80 -121
  247. package/js/src/htx.js +52 -52
  248. package/js/src/hyperliquid.d.ts +77 -127
  249. package/js/src/hyperliquid.js +2 -2
  250. package/js/src/independentreserve.d.ts +15 -20
  251. package/js/src/independentreserve.js +2 -2
  252. package/js/src/indodax.d.ts +19 -24
  253. package/js/src/indodax.js +8 -8
  254. package/js/src/kraken.d.ts +43 -55
  255. package/js/src/kraken.js +29 -29
  256. package/js/src/krakenfutures.d.ts +34 -39
  257. package/js/src/krakenfutures.js +16 -16
  258. package/js/src/kucoin.d.ts +121 -132
  259. package/js/src/kucoin.js +15 -15
  260. package/js/src/kucoinfutures.d.ts +4 -4
  261. package/js/src/latoken.d.ts +24 -29
  262. package/js/src/latoken.js +8 -8
  263. package/js/src/lbank.d.ts +40 -53
  264. package/js/src/lbank.js +31 -31
  265. package/js/src/lighter.d.ts +40 -45
  266. package/js/src/lighter.js +2 -2
  267. package/js/src/luno.d.ts +25 -30
  268. package/js/src/luno.js +2 -2
  269. package/js/src/mercado.d.ts +15 -20
  270. package/js/src/mercado.js +12 -12
  271. package/js/src/mexc.d.ts +70 -83
  272. package/js/src/mexc.js +27 -27
  273. package/js/src/modetrade.d.ts +43 -57
  274. package/js/src/modetrade.js +10 -10
  275. package/js/src/mudrex.d.ts +25 -35
  276. package/js/src/nado.d.ts +45 -50
  277. package/js/src/ndax.d.ts +27 -32
  278. package/js/src/ndax.js +4 -4
  279. package/js/src/okx.d.ts +97 -108
  280. package/js/src/okx.js +19 -20
  281. package/js/src/onetrading.d.ts +23 -31
  282. package/js/src/onetrading.js +7 -7
  283. package/js/src/p2b.d.ts +17 -22
  284. package/js/src/p2b.js +8 -8
  285. package/js/src/pacifica.d.ts +55 -73
  286. package/js/src/pacifica.js +9 -3
  287. package/js/src/paradex.d.ts +47 -68
  288. package/js/src/paymium.d.ts +12 -17
  289. package/js/src/paymium.js +2 -2
  290. package/js/src/phemex.d.ts +47 -52
  291. package/js/src/phemex.js +37 -37
  292. package/js/src/poloniex.d.ts +45 -50
  293. package/js/src/poloniex.js +14 -14
  294. package/js/src/prediction/sxbet.d.ts +595 -0
  295. package/js/src/prediction/sxbet.js +2708 -0
  296. package/js/src/pro/alpaca.d.ts +23 -23
  297. package/js/src/pro/alpaca.js +5 -5
  298. package/js/src/pro/apex.d.ts +28 -28
  299. package/js/src/pro/apex.js +6 -6
  300. package/js/src/pro/aster.d.ts +33 -33
  301. package/js/src/pro/aster.js +8 -8
  302. package/js/src/pro/backpack.d.ts +28 -28
  303. package/js/src/pro/backpack.js +1 -1
  304. package/js/src/pro/binance.d.ts +57 -57
  305. package/js/src/pro/binance.js +26 -26
  306. package/js/src/pro/bingx.d.ts +26 -26
  307. package/js/src/pro/bingx.js +11 -11
  308. package/js/src/pro/bitfinex.d.ts +25 -25
  309. package/js/src/pro/bitfinex.js +11 -11
  310. package/js/src/pro/bitget.d.ts +41 -41
  311. package/js/src/pro/bitget.js +20 -20
  312. package/js/src/pro/bithumb.d.ts +15 -15
  313. package/js/src/pro/bithumb.js +1 -1
  314. package/js/src/pro/bitmex.d.ts +29 -29
  315. package/js/src/pro/bitmex.js +12 -12
  316. package/js/src/pro/bitopro.d.ts +13 -13
  317. package/js/src/pro/bitopro.js +5 -5
  318. package/js/src/pro/bitrue.d.ts +25 -25
  319. package/js/src/pro/bitrue.js +7 -7
  320. package/js/src/pro/bitstamp.d.ts +21 -21
  321. package/js/src/pro/bitstamp.js +5 -5
  322. package/js/src/pro/bittrade.d.ts +19 -19
  323. package/js/src/pro/bittrade.js +11 -11
  324. package/js/src/pro/bitvavo.d.ts +62 -62
  325. package/js/src/pro/bitvavo.js +16 -16
  326. package/js/src/pro/blockchaincom.d.ts +19 -19
  327. package/js/src/pro/blockchaincom.js +5 -5
  328. package/js/src/pro/blofin.d.ts +23 -23
  329. package/js/src/pro/blofin.js +2 -2
  330. package/js/src/pro/bullish.d.ts +19 -25
  331. package/js/src/pro/bybit.d.ts +42 -45
  332. package/js/src/pro/bybit.js +21 -21
  333. package/js/src/pro/bydfi.d.ts +24 -24
  334. package/js/src/pro/bydfi.js +2 -2
  335. package/js/src/pro/cex.d.ts +37 -37
  336. package/js/src/pro/cex.js +19 -19
  337. package/js/src/pro/coinbase.d.ts +19 -19
  338. package/js/src/pro/coinbase.js +2 -2
  339. package/js/src/pro/coinbaseexchange.d.ts +25 -25
  340. package/js/src/pro/coinbaseexchange.js +9 -9
  341. package/js/src/pro/coinbaseinternational.d.ts +20 -20
  342. package/js/src/pro/coinbaseinternational.js +2 -2
  343. package/js/src/pro/coincheck.d.ts +5 -5
  344. package/js/src/pro/coincheck.js +2 -2
  345. package/js/src/pro/coinex.d.ts +24 -24
  346. package/js/src/pro/coinex.js +3 -3
  347. package/js/src/pro/coinone.d.ts +9 -11
  348. package/js/src/pro/coinone.js +6 -6
  349. package/js/src/pro/cryptocom.d.ts +40 -40
  350. package/js/src/pro/cryptocom.js +10 -10
  351. package/js/src/pro/deepcoin.d.ts +24 -32
  352. package/js/src/pro/deribit.d.ts +24 -24
  353. package/js/src/pro/deribit.js +13 -13
  354. package/js/src/pro/derive.d.ts +22 -22
  355. package/js/src/pro/derive.js +4 -4
  356. package/js/src/pro/dydx.d.ts +9 -9
  357. package/js/src/pro/dydx.js +1 -1
  358. package/js/src/pro/extended.d.ts +22 -22
  359. package/js/src/pro/extended.js +16 -10
  360. package/js/src/pro/gate.d.ts +50 -50
  361. package/js/src/pro/gate.js +10 -10
  362. package/js/src/pro/gemini.d.ts +26 -26
  363. package/js/src/pro/gemini.js +3 -3
  364. package/js/src/pro/grvt.d.ts +22 -22
  365. package/js/src/pro/grvt.js +2 -2
  366. package/js/src/pro/hashkey.d.ts +19 -19
  367. package/js/src/pro/hashkey.js +2 -2
  368. package/js/src/pro/hitbtc.d.ts +32 -32
  369. package/js/src/pro/hitbtc.js +6 -6
  370. package/js/src/pro/hollaex.d.ts +15 -17
  371. package/js/src/pro/hollaex.js +3 -3
  372. package/js/src/pro/htx.d.ts +36 -36
  373. package/js/src/pro/htx.js +28 -28
  374. package/js/src/pro/hyperliquid.d.ts +29 -31
  375. package/js/src/pro/hyperliquid.js +1 -1
  376. package/js/src/pro/independentreserve.d.ts +10 -10
  377. package/js/src/pro/independentreserve.js +2 -2
  378. package/js/src/pro/kraken.d.ts +41 -55
  379. package/js/src/pro/kraken.js +7 -7
  380. package/js/src/pro/krakenfutures.d.ts +32 -32
  381. package/js/src/pro/krakenfutures.js +12 -12
  382. package/js/src/pro/kucoin.d.ts +69 -72
  383. package/js/src/pro/kucoin.js +12 -12
  384. package/js/src/pro/kucoinfutures.d.ts +4 -4
  385. package/js/src/pro/lbank.d.ts +22 -22
  386. package/js/src/pro/lbank.js +16 -16
  387. package/js/src/pro/lighter.d.ts +27 -27
  388. package/js/src/pro/luno.d.ts +8 -8
  389. package/js/src/pro/luno.js +2 -2
  390. package/js/src/pro/mexc.d.ts +33 -33
  391. package/js/src/pro/mexc.js +8 -8
  392. package/js/src/pro/modetrade.d.ts +37 -39
  393. package/js/src/pro/modetrade.js +3 -3
  394. package/js/src/pro/mudrex.d.ts +8 -8
  395. package/js/src/pro/mudrex.js +2 -2
  396. package/js/src/pro/nado.d.ts +42 -46
  397. package/js/src/pro/nado.js +3 -3
  398. package/js/src/pro/ndax.d.ts +12 -12
  399. package/js/src/pro/ndax.js +6 -6
  400. package/js/src/pro/okx.d.ts +49 -49
  401. package/js/src/pro/okx.js +20 -20
  402. package/js/src/pro/onetrading.d.ts +28 -28
  403. package/js/src/pro/onetrading.js +14 -14
  404. package/js/src/pro/p2b.d.ts +15 -19
  405. package/js/src/pro/p2b.js +5 -5
  406. package/js/src/pro/pacifica.d.ts +22 -22
  407. package/js/src/pro/pacifica.js +1 -1
  408. package/js/src/pro/paradex.d.ts +18 -18
  409. package/js/src/pro/paradex.js +1 -1
  410. package/js/src/pro/phemex.d.ts +25 -25
  411. package/js/src/pro/phemex.js +13 -13
  412. package/js/src/pro/poloniex.d.ts +30 -32
  413. package/js/src/pro/poloniex.js +17 -17
  414. package/js/src/pro/toobit.d.ts +31 -31
  415. package/js/src/pro/toobit.js +2 -2
  416. package/js/src/pro/upbit.d.ts +24 -24
  417. package/js/src/pro/upbit.js +4 -4
  418. package/js/src/pro/weex.d.ts +39 -39
  419. package/js/src/pro/weex.js +2 -2
  420. package/js/src/pro/whitebit.d.ts +26 -30
  421. package/js/src/pro/whitebit.js +12 -12
  422. package/js/src/pro/woo.d.ts +44 -46
  423. package/js/src/pro/woo.js +13 -13
  424. package/js/src/pro/woofipro.d.ts +39 -41
  425. package/js/src/pro/woofipro.js +3 -3
  426. package/js/src/pro/xt.d.ts +20 -20
  427. package/js/src/pro/xt.js +3 -3
  428. package/js/src/revolutx.d.ts +17 -17
  429. package/js/src/tokocrypto.d.ts +25 -30
  430. package/js/src/tokocrypto.js +20 -20
  431. package/js/src/toobit.d.ts +45 -79
  432. package/js/src/upbit.d.ts +28 -61
  433. package/js/src/upbit.js +12 -12
  434. package/js/src/weex.d.ts +57 -68
  435. package/js/src/whitebit.d.ts +53 -64
  436. package/js/src/whitebit.js +15 -15
  437. package/js/src/woo.d.ts +61 -75
  438. package/js/src/woo.js +3 -3
  439. package/js/src/woofipro.d.ts +53 -67
  440. package/js/src/woofipro.js +14 -14
  441. package/js/src/xt.d.ts +57 -67
  442. package/js/src/zaif.d.ts +11 -16
  443. package/js/src/zaif.js +9 -3
  444. package/js/src/zebpay.d.ts +32 -37
  445. package/js/src/zebpay.js +1 -1
  446. package/package.json +2 -2
@@ -0,0 +1,595 @@
1
+ import Exchange from '../abstract/prediction/sxbet.js';
2
+ import type Client from '../base/ws/Client.js';
3
+ import type { Balances, Dict, Int, int, Market, Num, PredictionEvent, PredictionOrder, PredictionOrderBook, PredictionPosition, PredictionSettlement, PredictionTicker, PredictionTickers, PredictionTrade, Str, Strings, fetchEventsParams } from '../base/types.js';
4
+ /**
5
+ * @class sxbet
6
+ * @augments Exchange
7
+ */
8
+ export default class sxbet extends Exchange {
9
+ describe(): any;
10
+ /**
11
+ * @method
12
+ * @name sxbet#fetchMarkets
13
+ * @description retrieves data on all active markets, each becomes one market with its two sides listed under the outcomes key
14
+ * @see https://docs.sx.bet/api-reference/get-markets-active
15
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
16
+ * @param {int} [params.limit] max number of markets to collect (defaults to options.marketsPageSize * options.maxMarketsPages, 5000)
17
+ * @returns {object[]} an array of objects representing market data
18
+ */
19
+ fetchMarkets(params?: {}): Promise<Market[]>;
20
+ /**
21
+ * @ignore
22
+ * @method
23
+ * @name sxbet#fetchRawMarketsPaged
24
+ * @description pages through GET /markets/active (cursor-based via paginationKey/nextKey), stopping once options.maxMarketsPages pages or userLimit raw markets have been collected
25
+ * @param {object} [extra] extra request params merged into every page (e.g. leagueId, sportId, sportXeventId)
26
+ * @param {int} [userLimit] stop collecting once this many raw markets have been gathered
27
+ * @returns {object[]} the raw (unparsed) sx.bet market objects
28
+ */
29
+ fetchRawMarketsPaged(extra?: Dict, userLimit?: Int): Promise<any[]>;
30
+ /**
31
+ * @ignore
32
+ * @method
33
+ * @name sxbet#filterRawMarketsByFixture
34
+ * @description keeps only the raw markets belonging to one fixture — the venue's own sportXeventId filter on /markets/active is unreliable (observed live returning every fixture), so the scope is enforced client-side
35
+ * @param {object[]} rawMarkets the raw sx.bet market objects
36
+ * @param {string} sportXeventId the fixture id to keep
37
+ * @returns {object[]} the raw markets of that fixture only
38
+ */
39
+ filterRawMarketsByFixture(rawMarkets: any[], sportXeventId: string): any[];
40
+ /**
41
+ * @ignore
42
+ * @method
43
+ * @name sxbet#parseSxbetMarket
44
+ * @description converts a single raw sx.bet market into one ccxt market whose two sides become the outcomes
45
+ * @param {object} raw the raw sx.bet market object
46
+ * @returns {object} a [market structure](https://docs.ccxt.com/#/?id=market-structure)
47
+ */
48
+ parseSxbetMarket(raw: Dict): Market;
49
+ /**
50
+ * @method
51
+ * @name sxbet#fetchEvents
52
+ * @description fetches sx.bet fixtures (one fixture = one event, its markets are every moneyline/spread/total line on that fixture) scoped by eventId, leagueId, sportId or a free-text query/tags match against team and league names — always live from the API, never the local cache (it POPULATES the cache for later event()/outcome lookups). query/queries/tags are matched client-side over a bounded scan of /markets/active — the venue's GET /search covers team names only (not league or sport labels) and is not wired here yet
53
+ * @see https://docs.sx.bet/api-reference/get-markets-active
54
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
55
+ * @param {string} [params.eventId] direct lookup by unified event id (the sx.bet sportXeventId, e.g. 'L18870109')
56
+ * @param {string} [params.query] free-text search matched against team and league names
57
+ * @param {string[]} [params.queries] multiple free-text searches (alternative to query, unioned)
58
+ * @param {string[]} [params.tags] matched identically to query/queries (sx.bet has no tag taxonomy)
59
+ * @param {int} [params.leagueId] sx.bet league id (e.g. 243 for NFL) — fetched server-side
60
+ * @param {int} [params.sportId] sx.bet sport id (e.g. 8 for Football) — fetched server-side
61
+ * @param {string} [params.status] 'active' | 'inactive' | 'closed' | 'all'
62
+ * @param {int} [params.limit] max number of events to return
63
+ * @returns {object[]} an array of event structures
64
+ */
65
+ fetchEvents(params?: fetchEventsParams): Promise<PredictionEvent[]>;
66
+ /**
67
+ * @method
68
+ * @name sxbet#fetchEvent
69
+ * @description fetches a single sx.bet fixture (event) by its sportXeventId
70
+ * @see https://docs.sx.bet/api-reference/get-markets-active
71
+ * @param {string} id the sx.bet sportXeventId, e.g. 'L18870109'
72
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
73
+ * @returns {object} a [prediction event structure](https://docs.ccxt.com/#/?id=prediction-event-structure)
74
+ */
75
+ fetchEvent(id: string, params?: {}): Promise<PredictionEvent>;
76
+ /**
77
+ * @ignore
78
+ * @method
79
+ * @name sxbet#matchesEventQuery
80
+ * @description checks a raw market's team/league names against a list of free-text queries, matching in either direction (a short user query inside a long name, or — since fetchEvents derives its fallback test query from an already-slugified handle — a long joined query containing a short name)
81
+ * @param {object} raw the raw sx.bet market object
82
+ * @param {string[]} queries lowercase-insensitive free-text queries
83
+ * @returns {boolean} whether any query matches any of the market's team/league/outcome names
84
+ */
85
+ matchesEventQuery(raw: Dict, queries: string[]): boolean;
86
+ /**
87
+ * @ignore
88
+ * @method
89
+ * @name sxbet#parseEvent
90
+ * @description groups a fixture's raw markets (all sharing one sportXeventId) into one unified event structure
91
+ * @param {string} fixtureId the sx.bet sportXeventId
92
+ * @param {object[]} rawMarkets the raw sx.bet market objects belonging to this fixture
93
+ * @returns {object} an event structure
94
+ */
95
+ parseEvent(fixtureId: string, rawMarkets: any[]): any;
96
+ /**
97
+ * @ignore
98
+ * @method
99
+ * @name sxbet#loadSxObv3Metadata
100
+ * @description fetches and caches GET /metadata/obv3 - the v3 orderbook metadata carrying the ready-made EIP-712 domain, the active base asset and the order size limits
101
+ * @see https://docs.sx.bet/api-reference/get-metadata-obv3
102
+ * @returns {object} the cached obv3 metadata data object
103
+ */
104
+ loadSxObv3Metadata(): Promise<Dict>;
105
+ /**
106
+ * @ignore
107
+ * @method
108
+ * @name sxbet#roundOddsToLadder
109
+ * @description rounds an implied probability (0-1) to sx.bet's odds ladder (oddsLadderStepSize is in units of 1e-5, e.g. 125 -> a 0.125% step) — a maker's percentageOdds is rejected unless it lands exactly on the ladder
110
+ * @param {string} probability the implied probability in decimal-string form (0-1)
111
+ * @param {string} oddsLadderStepSize the raw oddsLadderStepSize from /metadata/obv3 (e.g. '125')
112
+ * @returns {string} the probability rounded to the nearest ladder step, in decimal-string form
113
+ */
114
+ roundOddsToLadder(probability: Str, oddsLadderStepSize: string): string;
115
+ /**
116
+ * @ignore
117
+ * @method
118
+ * @name sxbet#hashEip712Digest
119
+ * @description hashes an EIP-712 encoded payload (domainSeparator‖structHash, prefixed with 0x1901 by ethEncodeStructuredData) down to the final 32-byte digest to sign, used by sx.bet's taker-fill and cancel signatures
120
+ * @param {Uint8Array} encoded the output of this.ethEncodeStructuredData (domain, types, message)
121
+ * @returns {string} the 32-byte digest to ecdsa-sign, in '0x'-prefixed hex form
122
+ */
123
+ hashEip712Digest(encoded: any): string;
124
+ /**
125
+ * @ignore
126
+ * @method
127
+ * @name sxbet#signDigest
128
+ * @description ecdsa-signs a 32-byte digest and assembles the r‖s‖v hex signature sx.bet expects
129
+ * @param {string} digest the '0x'-prefixed 32-byte digest to sign
130
+ * @param {string} privateKey the signer's private key
131
+ * @returns {string} a '0x'-prefixed 65-byte hex signature (r‖s‖v)
132
+ */
133
+ signDigest(digest: string, privateKey: string): string;
134
+ /**
135
+ * @ignore
136
+ * @method
137
+ * @name sxbet#fetchErc20Name
138
+ * @description reads an ERC20 token's name() via eth_call (needed for the Permit EIP-712 domain — must match the token's real on-chain name or the signature fails verification)
139
+ * @param {string} rpcUrl the RPC endpoint to call
140
+ * @param {string} tokenAddress the token contract address
141
+ * @returns {string} the token's on-chain name
142
+ */
143
+ fetchErc20Name(rpcUrl: Str, tokenAddress: string): Promise<string>;
144
+ /**
145
+ * @ignore
146
+ * @method
147
+ * @name sxbet#hexToInt
148
+ * @description parses a hex string (no '0x' prefix) into an integer — plain digit-by-digit, since JS's parseInt (hex, 16) two-argument form has no portable equivalent across languages/transpilers. Only used for small values (byte lengths, permit nonces), safe well within the float-precision range
149
+ * @param {string} hex the hex string, no '0x' prefix
150
+ * @returns {int} the parsed integer
151
+ */
152
+ hexToInt(hex: string): number;
153
+ /**
154
+ * @ignore
155
+ * @method
156
+ * @name sxbet#fetchSxbetProxy
157
+ * @description fetches the account's obv3 proxy wallet state
158
+ * @see https://docs.sx.bet/api-reference/get-user-proxy
159
+ * @returns {object} the raw proxy data ({obv3ProxyWalletAddress, deployed, multisigSafeAddress})
160
+ */
161
+ fetchSxbetProxy(): Promise<Dict>;
162
+ /**
163
+ * @method
164
+ * @name sxbet#approve
165
+ * @description funds the account's obv3 proxy wallet - v3 trading capital must sit inside the proxy. Deploys the proxy first when absent, then moves USDC from the wallet into it via a gasless EIP-2612 Permit signature (POST /user/transfer-to-proxy)
166
+ * @see https://docs.sx.bet/api-reference/post-user-transfer-to-proxy
167
+ * @see https://docs.sx.bet/api-reference/post-user-deploy-proxy
168
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
169
+ * @param {float} [params.amount] the USDC amount to move into the proxy (required)
170
+ * @param {string} [params.tokenAddress] the token to transfer, defaults to the active base token
171
+ * @param {string} [params.spender] the transfer executor granted the permit, defaults to options.transferToProxySpender or the obv3 transferToProxyExecutorAddress
172
+ * @param {int} [params.deadline] unix seconds the permit signature expires at, defaults to options.approveDeadlineSeconds from now
173
+ * @param {string} [params.rpcUrl] overrides the chain's default RPC endpoint (see options.chains)
174
+ * @returns {object} a dict with the raw response and the transfer sessionId
175
+ */
176
+ approve(params?: {}): Promise<any>;
177
+ /**
178
+ * @method
179
+ * @name sxbet#createOrder
180
+ * @description places an order on sx.bet's v3 unified orderbook - a 'limit' order rests with GTC time-in-force, a 'market' order fills immediately with IOC (or FOK via params.timeInForce). sx.bet has no shares - 'amount' is the USDC stake to risk, and 'price' is the implied probability (0-1) of the requested outcome. 'sell' bets the OPPOSITE outcome of the one requested (sx.bet is bilateral: there is no owned position to sell, only the complementary side of the same market)
181
+ * @see https://docs.sx.bet/api-reference/post-orders-v3
182
+ * @param {string} outcome unified outcome or outcome token id
183
+ * @param {string} type 'limit' (GTC resting order) or 'market' (IOC immediate fill)
184
+ * @param {string} side 'buy' backs the requested outcome, 'sell' backs the complementary one
185
+ * @param {float} amount the USDC amount to stake/risk
186
+ * @param {float} [price] implied probability (0-1) of the requested outcome; required for both order types
187
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
188
+ * @param {string} [params.timeInForce] overrides the derived value - 'GTC', 'IOC' or 'FOK'
189
+ * @param {int} [params.expiry] unix seconds the order expires at; must be in the future (zero and past values are rejected, so is anything inside the fixture's betting-delay window - /metadata/obv3 resolves the delay per sport/league, live vs pregame), defaults to options.defaultOrderExpirySeconds from now
190
+ * @param {string} [params.salt] overrides the random salt differentiating this order
191
+ * @param {string} [params.clientOrderId] caller-chosen id echoed back on reads (max 64 chars)
192
+ * @param {boolean} [params.waitForOutcome] wait for the matching outcome inline (default true)
193
+ * @param {boolean} [params.useBetCredits] fund the stake from bet credits instead of the proxy balance (IOC/FOK only)
194
+ * @param {string} [params.externalUserId] partner attribution id echoed back on order, fill and trade reads
195
+ * @returns {object} a [prediction order structure](https://docs.ccxt.com/#/?id=prediction-order-structure)
196
+ */
197
+ createOrder(outcome: string, type: Str, side: Str, amount: Num, price?: Num, params?: {}): Promise<PredictionOrder>;
198
+ /**
199
+ * @ignore
200
+ * @method
201
+ * @name sxbet#parseSxbetCancelResponse
202
+ * @description parses the shared v3 cancel response ({cancelled, notCancelled, unconfirmed}) into order structures
203
+ * @param {object} response the raw DELETE /orders-v3 response
204
+ * @returns {object[]} a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure)
205
+ */
206
+ parseSxbetCancelResponse(response: Dict): PredictionOrder[];
207
+ /**
208
+ * @method
209
+ * @name sxbet#cancelOrder
210
+ * @description cancels one resting maker order - v3 cancels are plain api-key-authenticated DELETE requests, no signature involved
211
+ * @see https://docs.sx.bet/api-reference/delete-orders-v3
212
+ * @param {string} id the order id
213
+ * @param {string} [outcome] not used by sxbet.cancelOrder
214
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
215
+ * @returns {object} a [prediction order structure](https://docs.ccxt.com/#/?id=prediction-order-structure)
216
+ */
217
+ cancelOrder(id: string, outcome?: Str, params?: {}): Promise<PredictionOrder>;
218
+ /**
219
+ * @method
220
+ * @name sxbet#cancelOrders
221
+ * @description cancels multiple resting maker orders in one request - v3 cancels are plain api-key-authenticated DELETE requests, no signature involved
222
+ * @see https://docs.sx.bet/api-reference/delete-orders-v3
223
+ * @param {string[]} ids the order ids to cancel
224
+ * @param {string} [outcome] not used by sxbet.cancelOrders
225
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
226
+ * @returns {object[]} a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure)
227
+ */
228
+ cancelOrders(ids: string[], outcome?: Str, params?: {}): Promise<PredictionOrder[]>;
229
+ /**
230
+ * @method
231
+ * @name sxbet#cancelAllOrders
232
+ * @description cancels every resting maker order of the account, or every order of one fixture via params.eventId - v3 cancels are plain api-key-authenticated DELETE requests, no signature involved
233
+ * @see https://docs.sx.bet/api-reference/delete-orders-v3-all
234
+ * @see https://docs.sx.bet/api-reference/delete-orders-v3-event
235
+ * @param {string} [outcome] not used by sxbet.cancelAllOrders
236
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
237
+ * @param {string} [params.eventId] cancels every order across every market of this fixture instead of the account-wide path (params.sportXeventId is accepted too)
238
+ * @returns {object[]} a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure)
239
+ */
240
+ cancelAllOrders(outcome?: Str, params?: {}): Promise<PredictionOrder[]>;
241
+ /**
242
+ * @ignore
243
+ * @method
244
+ * @name sxbet#parsePredictionOrder
245
+ * @description parses one raw GET /orders row into a unified prediction order. every sx.bet maker order is a 'buy' of the outcome it bets on (isMakerBettingOutcomeOne selects the side), priced at the maker's own implied probability
246
+ * @param {object} order the raw sx.bet order object
247
+ * @param {object} [market] the outcome object the order belongs to (resolved from the cache by outcomeId when omitted)
248
+ * @returns {object} a [prediction order structure](https://docs.ccxt.com/#/?id=prediction-order-structure)
249
+ */
250
+ parsePredictionOrder(order: Dict, market?: Market): PredictionOrder;
251
+ /**
252
+ * @ignore
253
+ * @method
254
+ * @name sxbet#clampSxbetPerPage
255
+ * @description clamps a user limit to the venue's hard perPage ceiling - every v3 listing route rejects perPage above 100, and deeper history is reachable through the nextKey cursor instead
256
+ * @param {int} limit the user-requested limit
257
+ * @returns {int} the limit clamped to at most 100
258
+ */
259
+ clampSxbetPerPage(limit: Int): Int;
260
+ /**
261
+ * @method
262
+ * @name sxbet#fetchOpenOrders
263
+ * @description fetches the account's resting maker orders via the api-key-authenticated GET /orders-v3 (the route is hardcoded to ACTIVE orders and scoped to the key's account)
264
+ * @see https://docs.sx.bet/api-reference/get-orders-v3
265
+ * @param {string} [outcome] unified outcome or outcomeId — narrows to that outcome's market
266
+ * @param {int} [since] applied client-side (the route has no date filter; rows carry createdAt)
267
+ * @param {int} [limit] the maximum number of orders to return (server-side perPage, max 100, default 50)
268
+ * @param {object} [params] extra parameters specific to the exchange API endpoint (e.g. eventId, sortBy, sortAsc, nextKey)
269
+ * @returns {object[]} a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure)
270
+ */
271
+ fetchOpenOrders(outcome?: Str, since?: Int, limit?: Int, params?: {}): Promise<PredictionOrder[]>;
272
+ /**
273
+ * @method
274
+ * @name sxbet#fetchOrders
275
+ * @description fetches the account's maker orders. sx.bet's GET /orders-v3 listing is hardcoded to ACTIVE orders — filled/cancelled/expired orders leave the listing permanently (their history is only reconstructable from fills), so this returns the same set that fetchOpenOrders returns
276
+ * @see https://docs.sx.bet/api-reference/get-orders-v3
277
+ * @param {string} [outcome] unified outcome or outcomeId — narrows to that outcome's market
278
+ * @param {int} [since] applied client-side (the route has no date filter; rows carry createdAt)
279
+ * @param {int} [limit] the maximum number of orders to return (server-side perPage, max 100, default 50)
280
+ * @param {object} [params] extra parameters specific to the exchange API endpoint (e.g. eventId, sortBy, sortAsc, nextKey)
281
+ * @returns {object[]} a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure)
282
+ */
283
+ fetchOrders(outcome?: Str, since?: Int, limit?: Int, params?: {}): Promise<PredictionOrder[]>;
284
+ /**
285
+ * @method
286
+ * @name sxbet#fetchOrder
287
+ * @description fetches a single maker order by its order hash - unlike the listing, GET /orders-v3/{orderId} also serves filled, cancelled and expired orders while they still exist. a missing or foreign id 404s with 'Order not found', surfaced through handleErrors's OrderNotFound mapping
288
+ * @see https://docs.sx.bet/api-reference/get-order-v3
289
+ * @param {string} id the order hash
290
+ * @param {string} [outcome] unified outcome or outcomeId (labelling hint only, the request needs just the id)
291
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
292
+ * @returns {object} a [prediction order structure](https://docs.ccxt.com/#/?id=prediction-order-structure)
293
+ */
294
+ fetchOrder(id: Str, outcome?: Str, params?: {}): Promise<PredictionOrder>;
295
+ /**
296
+ * @method
297
+ * @name sxbet#fetchTrades
298
+ * @description fetches the public trade tape of one outcome's market — every bettor's settled and in-flight bets on that market. the venue requires the trades listing to be scoped, so the outcome argument is mandatory
299
+ * @see https://docs.sx.bet/api-reference/get-trades-v3-public
300
+ * @param {string} outcome unified outcome or outcomeId
301
+ * @param {int} [since] timestamp in ms of the earliest trade to return — applied client-side over the newest page (the public tape serves newest-first and has no date filter; older pages are reachable through params.nextKey)
302
+ * @param {int} [limit] the maximum number of trades to return (server-side perPage, max 100, default 50)
303
+ * @param {object} [params] extra parameters specific to the exchange API endpoint (e.g. eventId, nextKey)
304
+ * @returns {object[]} a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure)
305
+ */
306
+ fetchTrades(outcome: Str, since?: Int, limit?: Int, params?: {}): Promise<PredictionTrade[]>;
307
+ /**
308
+ * @method
309
+ * @name sxbet#fetchMyTrades
310
+ * @description fetches the account's fills (matched legs of its own orders, both taker and maker side) via the api-key-authenticated GET /fills-v3
311
+ * @see https://docs.sx.bet/api-reference/get-fills-v3
312
+ * @param {string} [outcome] unified outcome or outcomeId — narrows to that outcome's market and drops the opposite side's legs
313
+ * @param {int} [since] timestamp in ms of the earliest fill to fetch (server-side startDate)
314
+ * @param {int} [limit] the maximum number of fills to return (server-side perPage, max 100, default 50)
315
+ * @param {object} [params] extra parameters specific to the exchange API endpoint (e.g. tradeId, orderId, endDate, sortAsc, nextKey)
316
+ * @returns {object[]} a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure)
317
+ */
318
+ fetchMyTrades(outcome?: Str, since?: Int, limit?: Int, params?: {}): Promise<PredictionTrade[]>;
319
+ /**
320
+ * @ignore
321
+ * @method
322
+ * @name sxbet#parseSxbetV3Fill
323
+ * @description parses one GET /fills-v3 row into a unified trade - each fill is one maker/taker match of the wallet's own order
324
+ * @param {object} fill the raw fill row
325
+ * @param {object} [market] the outcome object labelling hint
326
+ * @returns {object} a [prediction trade structure](https://docs.ccxt.com/#/?id=prediction-trade-structure)
327
+ */
328
+ parseSxbetV3Fill(fill: Dict, market?: Market): PredictionTrade;
329
+ /**
330
+ * @method
331
+ * @name sxbet#fetchBalance
332
+ * @description fetches the account's order-spendable proxy balance from GET /user/balance-v3 - v3 trading capital sits inside the obv3 proxy wallet (funded via approve()), and GTC posting is checked against availableAmount. free is the spendable availableAmount, used the escrowedAmount locked behind open bets
333
+ * @see https://docs.sx.bet/api-reference/get-user-balance-v3
334
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
335
+ * @returns {object} a [balance structure](https://docs.ccxt.com/#/?id=balance-structure)
336
+ */
337
+ fetchBalance(params?: {}): Promise<Balances>;
338
+ /**
339
+ * @method
340
+ * @name sxbet#fetchPositions
341
+ * @description fetches the account's open positions from the venue's per-market aggregates (GET /positions-v3, MATCHED and LOCKED bets by default; override with params.status - the enum is MATCHED, LOCKED, SETTLED, FAILED, and pnl is populated only when the filter is exclusively SETTLED). contracts is the total stake at risk, entryPrice the blended implied probability of the market's best-case outcome
342
+ * @see https://docs.sx.bet/api-reference/get-positions-v3
343
+ * @param {string[]} [outcomes] filter by unified outcomes or outcomeIds
344
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
345
+ * @returns {object[]} a list of [prediction position structures](https://docs.ccxt.com/#/?id=prediction-position-structure)
346
+ */
347
+ fetchPositions(outcomes?: Strings, params?: {}): Promise<PredictionPosition[]>;
348
+ /**
349
+ * @ignore
350
+ * @method
351
+ * @name sxbet#parseSxbetV3Position
352
+ * @description parses one GET /positions-v3 row (per-market aggregate) into a unified position on the market's best-case outcome
353
+ * @param {object} raw the raw position row
354
+ * @returns {object} a [prediction position structure](https://docs.ccxt.com/#/?id=prediction-position-structure)
355
+ */
356
+ parseSxbetV3Position(raw: Dict): PredictionPosition;
357
+ /**
358
+ * @method
359
+ * @name sxbet#fetchSettlements
360
+ * @description fetches the account's settled bets — each settled GET /trades-v3 row becomes one settlement with the resolved winner, the payout (stake / odds when won, the stake back when the market voided, zero when lost) and the realized pnl
361
+ * @see https://docs.sx.bet/api-reference/get-trades-v3
362
+ * @param {string} [outcome] filter to a single unified outcome or outcomeId
363
+ * @param {int} [since] timestamp in ms of the earliest settlement to fetch (server-side startDate on the bet time)
364
+ * @param {int} [limit] the maximum number of settlements to fetch (server-side perPage, max 100, default 50)
365
+ * @param {object} [params] extra parameters specific to the exchange API endpoint (e.g. eventId, endDate, sortAsc, nextKey)
366
+ * @returns {object[]} a list of prediction settlement structures
367
+ */
368
+ fetchSettlements(outcome?: Str, since?: Int, limit?: Int, params?: {}): Promise<PredictionSettlement[]>;
369
+ /**
370
+ * @ignore
371
+ * @method
372
+ * @name sxbet#parseSettlement
373
+ * @description parses one settled GET /trades-v3 row into the unified prediction settlement shape. the raw `outcome` field carries the winner, 1 or 2, with 0 for a voided market, and the full payout of a winning bet is stake / odds (the implied probability the bettor received)
374
+ * @param {object} trade the raw settled sx.bet trade
375
+ * @param {object} [market] a resolved outcome/market hint
376
+ * @returns {object} a prediction settlement structure
377
+ */
378
+ parseSettlement(trade: Dict, market?: Market): any;
379
+ /**
380
+ * @ignore
381
+ * @method
382
+ * @name sxbet#fetchSxbetBookSnapshot
383
+ * @description fetches the v3 aggregated order book snapshot of one market ({outcomeOne, outcomeTwo, version} price levels)
384
+ * @see https://docs.sx.bet/api-reference/get-orderbook-snapshot
385
+ * @param {string} marketHash the market hash
386
+ * @returns {object} the raw snapshot data
387
+ */
388
+ fetchSxbetBookSnapshot(marketHash: Str): Promise<Dict>;
389
+ /**
390
+ * @method
391
+ * @name sxbet#fetchTicker
392
+ * @description fetches the current best resting odds for a single sx.bet outcome. sx.bet is a peer-to-peer odds book (no matched-trade tape or candles), so bid/ask are the best (highest) percentageOdds resting on this outcome's own side and its mirror (1 - best percentageOdds resting on the opposite outcome)
393
+ * @see https://docs.sx.bet/api-reference/get-orderbook-snapshot
394
+ * @param {string} outcome unified outcome handle or outcomeId (marketHash or marketHash + '-2')
395
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
396
+ * @returns {object} a [prediction ticker structure](https://docs.ccxt.com/#/?id=prediction-ticker-structure)
397
+ */
398
+ fetchTicker(outcome: Str, params?: {}): Promise<PredictionTicker>;
399
+ /**
400
+ * @ignore
401
+ * @method
402
+ * @name sxbet#fetchSxbetBestOdds
403
+ * @description fetches the best resting level of both sides for a set of markets in one request
404
+ * @see https://docs.sx.bet/api-reference/get-best-odds-v3
405
+ * @param {string[]} marketHashes the market hashes to query, at most 100 per call
406
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
407
+ * @returns {object[]} the raw bestOdds rows ({marketHash, outcomeOne, outcomeTwo})
408
+ */
409
+ fetchSxbetBestOdds(marketHashes: string[], params?: {}): Promise<any[]>;
410
+ /**
411
+ * @ignore
412
+ * @method
413
+ * @name sxbet#parseSxbetSnapshotBestOdds
414
+ * @description reduces a v3 book snapshot to the legacy best-odds shape the ticker parser consumes ({marketHash, outcomeOne: {percentageOdds}, outcomeTwo: {percentageOdds}})
415
+ * @param {object} snapshot the raw snapshot data
416
+ * @returns {object} the best-odds shaped dict
417
+ */
418
+ parseSxbetSnapshotBestOdds(snapshot: Dict): Dict;
419
+ /**
420
+ * @method
421
+ * @name sxbet#fetchTickers
422
+ * @description fetches the current best resting odds for multiple sx.bet outcomes, one book snapshot per market
423
+ * @see https://docs.sx.bet/api-reference/get-orderbook-snapshot
424
+ * @param {string[]} outcomes unified outcomes - required: sx.bet has thousands of markets and no endpoint returning all of them at once
425
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
426
+ * @returns {object} a dictionary of [prediction ticker structures](https://docs.ccxt.com/#/?id=prediction-ticker-structure) indexed by outcome
427
+ */
428
+ fetchTickers(outcomes?: Strings, params?: {}): Promise<PredictionTickers>;
429
+ /**
430
+ * @ignore
431
+ * @method
432
+ * @name sxbet#parseSxbetTickersByHash
433
+ * @description assembles the unified tickers dict from best-odds shaped rows keyed by market hash
434
+ * @param {string[]} outcomesList the requested unified outcomes
435
+ * @param {object} rowsByHash best-odds rows indexed by market hash
436
+ * @returns {object} a dictionary of [prediction ticker structures](https://docs.ccxt.com/#/?id=prediction-ticker-structure) indexed by outcome
437
+ */
438
+ parseSxbetTickersByHash(outcomesList: string[], rowsByHash: Dict): PredictionTickers;
439
+ /**
440
+ * @ignore
441
+ * @method
442
+ * @name sxbet#parsePredictionTicker
443
+ * @description parses one /orders/odds/best entry into a unified ticker for one side of the market
444
+ * @param {object} raw one bestOdds entry ({ marketHash, baseToken, outcomeOne: { percentageOdds, updatedAt }, outcomeTwo: {...} })
445
+ * @param {object} [market] the outcome object the ticker belongs to
446
+ * @returns {object} a [prediction ticker structure](https://docs.ccxt.com/#/?id=prediction-ticker-structure)
447
+ */
448
+ parsePredictionTicker(raw: Dict, market?: Market): PredictionTicker;
449
+ /**
450
+ * @method
451
+ * @name sxbet#fetchOrderBook
452
+ * @description fetches the resting maker order book for a single sx.bet outcome. bids are maker orders already betting on this outcome (priced at each maker's own implied probability, sized by their remaining stake); asks mirror the opposite outcome's maker orders (price = 1 - their implied probability, sized by how much a taker could bet against them, per sx.bet's remaining-taker-space formula) — the same YES/NO-style mirrored construction used across this codebase's other binary prediction venues
453
+ * @see https://docs.sx.bet/api-reference/get-orderbook-snapshot
454
+ * @param {string} outcome unified outcome handle or outcomeId
455
+ * @param {int} [limit] the maximum number of bids/asks to return
456
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
457
+ * @returns {object} a [prediction order book structure](https://docs.ccxt.com/#/?id=prediction-order-book-structure)
458
+ */
459
+ fetchOrderBook(outcome: Str, limit?: Int, params?: {}): Promise<PredictionOrderBook>;
460
+ /**
461
+ * @ignore
462
+ * @method
463
+ * @name sxbet#parseSxbetV3BookSides
464
+ * @description converts a v3 aggregated book snapshot into sorted [price, amount] bid/ask levels for one outcome; shared by fetchOrderBook and the websocket book handler
465
+ * @param {object} snapshot the raw snapshot ({outcomeOne, outcomeTwo} level lists of {percentageOdds, size})
466
+ * @param {boolean} isOutcomeOne whether the book is built for the market's outcome one
467
+ * @returns {object} a dict with sorted 'bids' and 'asks' lists
468
+ */
469
+ parseSxbetV3BookSides(snapshot: Dict, isOutcomeOne: boolean): Dict;
470
+ requestId(url: Str): number;
471
+ /**
472
+ * @ignore
473
+ * @method
474
+ * @name sxbet#registerSxbetWsRequest
475
+ * @description tracks an outgoing Centrifugo connect/subscribe command by its request id, so an error reply can be correlated back to the awaiting future and its registered subscription hash (see handleCentrifugoFrame)
476
+ * @param {int} requestId the id sent with the command
477
+ * @param {string} messageHash the future hash the caller awaits
478
+ * @param {string} subscription the subscription hash registered by watch() ('connect' or the channel name)
479
+ */
480
+ registerSxbetWsRequest(requestId: number, messageHash: string, subscription: string): void;
481
+ /**
482
+ * @ignore
483
+ * @method
484
+ * @name sxbet#fetchSxbetRealtimeToken
485
+ * @description fetches the short-lived Centrifugo connection token from the relayer; requires the apiKey credential (X-Api-Key header)
486
+ * @see https://docs.sx.bet/developers/realtime-initialization
487
+ * @returns {string} the JWT connection token
488
+ */
489
+ fetchSxbetRealtimeToken(): Promise<Str>;
490
+ connectSxbetCentrifugo(url: Str): Promise<any>;
491
+ pong(client: Client, message?: any): Promise<void>;
492
+ subscribeSxbetChannel(messageHash: string, channel: string): Promise<any>;
493
+ handleMessage(client: Client, message: any): void;
494
+ handleCentrifugoFrame(client: Client, msg: any): void;
495
+ /**
496
+ * @method
497
+ * @name sxbet#watchOrderBook
498
+ * @description streams the order book of an outcome - the v3 channel publishes the entire aggregated book on every update with a monotonic version, so each message replaces the held book
499
+ * @see https://docs.sx.bet/api-reference/channel-orderbook-v3
500
+ * @param {string} outcome unified outcome or outcome token id
501
+ * @param {int} [limit] the maximum number of order book entries to return
502
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
503
+ * @returns {object} a [prediction order book structure](https://docs.ccxt.com/#/?id=prediction-order-book-structure)
504
+ */
505
+ watchOrderBook(outcome: string, limit?: Int, params?: {}): Promise<PredictionOrderBook>;
506
+ /**
507
+ * @ignore
508
+ * @method
509
+ * @name sxbet#applySxbetWsSnapshot
510
+ * @description applies one full v3 book publication ({marketHash, version, outcomeOne, outcomeTwo}) to every watched outcome of that market, honoring the monotonic version
511
+ * @param {object} snapshot the raw book publication
512
+ * @returns {string[]} the outcome handles whose books were refreshed
513
+ */
514
+ applySxbetWsSnapshot(snapshot: Dict): string[];
515
+ handleOrderBook(client: Client, rows: any[]): void;
516
+ /**
517
+ * @method
518
+ * @name sxbet#watchTicker
519
+ * @description streams best-odds updates of an outcome; the venue channel is global, entries are filtered down to the requested outcome's market
520
+ * @see https://docs.sx.bet/api-reference/channel-best-odds-v3
521
+ * @param {string} outcome unified outcome or outcome token id
522
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
523
+ * @returns {object} a [prediction ticker structure](https://docs.ccxt.com/#/?id=prediction-ticker-structure)
524
+ */
525
+ watchTicker(outcome: string, params?: {}): Promise<PredictionTicker>;
526
+ handleTicker(client: Client, rows: any[]): void;
527
+ /**
528
+ * @method
529
+ * @name sxbet#watchTrades
530
+ * @description streams public bets of an outcome; the venue channel is global, entries are filtered down to the requested outcome
531
+ * @see https://docs.sx.bet/api-reference/channel-recent-trades-v3
532
+ * @param {string} outcome unified outcome or outcome token id
533
+ * @param {int} [since] timestamp in ms of the earliest trade to return
534
+ * @param {int} [limit] the maximum number of trades to return
535
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
536
+ * @returns {object[]} a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure)
537
+ */
538
+ watchTrades(outcome: string, since?: Int, limit?: Int, params?: {}): Promise<PredictionTrade[]>;
539
+ /**
540
+ * @ignore
541
+ * @method
542
+ * @name sxbet#parseSxbetV3PublicTrade
543
+ * @description parses one recent_trades_v3 publication (public TradeV3 shape) into a unified trade
544
+ * @param {object} trade the raw public trade row
545
+ * @returns {object} a [prediction trade structure](https://docs.ccxt.com/#/?id=prediction-trade-structure)
546
+ */
547
+ parseSxbetV3PublicTrade(trade: Dict): PredictionTrade;
548
+ handleTrades(client: Client, rows: any[]): void;
549
+ /**
550
+ * @method
551
+ * @name sxbet#watchMyTrades
552
+ * @description streams the authenticated wallet's fills over its per-account v3 channel
553
+ * @see https://docs.sx.bet/api-reference/channel-fills-v3
554
+ * @param {string} [outcome] unified outcome or outcome token id to narrow the stream down to
555
+ * @param {int} [since] timestamp in ms of the earliest trade to return
556
+ * @param {int} [limit] the maximum number of trades to return
557
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
558
+ * @returns {object[]} a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure)
559
+ */
560
+ watchMyTrades(outcome?: Str, since?: Int, limit?: Int, params?: {}): Promise<PredictionTrade[]>;
561
+ handleMyTrade(client: Client, rows: any[]): void;
562
+ /**
563
+ * @method
564
+ * @name sxbet#watchOrders
565
+ * @description streams updates of the authenticated wallet's orders over its per-account v3 channel
566
+ * @see https://docs.sx.bet/api-reference/channel-orders-v3
567
+ * @param {string} [outcome] unified outcome or outcome token id to narrow the stream down to
568
+ * @param {int} [since] timestamp in ms of the earliest order to return
569
+ * @param {int} [limit] the maximum number of orders to return
570
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
571
+ * @returns {object[]} a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure)
572
+ */
573
+ watchOrders(outcome?: Str, since?: Int, limit?: Int, params?: {}): Promise<PredictionOrder[]>;
574
+ handleOrder(client: Client, rows: any[]): void;
575
+ handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): undefined;
576
+ /**
577
+ * @ignore
578
+ * @method
579
+ * @name sxbet#sign
580
+ * @description builds the request url and attaches the x-sx-api-key header; every private v3 route authenticates with the apiKey credential, so its absence fails fast instead of surfacing a raw 401
581
+ * @param {string} path the endpoint path
582
+ * @param {string|string[]} api the api group and access level
583
+ * @param {string} method the http method
584
+ * @param {object} params the request parameters
585
+ * @param {object} [headers] request headers
586
+ * @param {string} [body] the request body
587
+ * @returns {object} a dict with url, method, body and headers
588
+ */
589
+ sign(path: any, api?: any, method?: string, params?: {}, headers?: any, body?: any): {
590
+ url: string;
591
+ method: string;
592
+ body: any;
593
+ headers: any;
594
+ };
595
+ }