ccxt 4.5.55 → 4.5.57

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 (321) hide show
  1. package/README.md +215 -10
  2. package/dist/ccxt.browser.min.js +10 -10
  3. package/dist/cjs/ccxt.js +6 -11
  4. package/dist/cjs/src/aftermath.js +10 -5
  5. package/dist/cjs/src/alpaca.js +2 -2
  6. package/dist/cjs/src/apex.js +26 -17
  7. package/dist/cjs/src/arkham.js +10 -7
  8. package/dist/cjs/src/ascendex.js +8 -5
  9. package/dist/cjs/src/aster.js +7 -4
  10. package/dist/cjs/src/backpack.js +4 -4
  11. package/dist/cjs/src/base/Exchange.js +72 -35
  12. package/dist/cjs/src/base/functions/io.js +25 -0
  13. package/dist/cjs/src/base/functions.js +1 -0
  14. package/dist/cjs/src/bigone.js +10 -7
  15. package/dist/cjs/src/binance.js +196 -198
  16. package/dist/cjs/src/bingx.js +7 -7
  17. package/dist/cjs/src/bitfinex.js +71 -58
  18. package/dist/cjs/src/bitflyer.js +2 -1
  19. package/dist/cjs/src/bitget.js +16 -5
  20. package/dist/cjs/src/bitmart.js +18 -10
  21. package/dist/cjs/src/bitmex.js +8 -5
  22. package/dist/cjs/src/bitopro.js +2 -2
  23. package/dist/cjs/src/bitrue.js +4 -3
  24. package/dist/cjs/src/bitso.js +7 -4
  25. package/dist/cjs/src/bitstamp.js +7 -4
  26. package/dist/cjs/src/bitteam.js +1 -1
  27. package/dist/cjs/src/bittrade.js +2 -2
  28. package/dist/cjs/src/bitvavo.js +457 -34
  29. package/dist/cjs/src/blofin.js +28 -4
  30. package/dist/cjs/src/bullish.js +6 -5
  31. package/dist/cjs/src/bybit.js +19 -17
  32. package/dist/cjs/src/bybiteu.js +1 -0
  33. package/dist/cjs/src/bydfi.js +1 -1
  34. package/dist/cjs/src/cex.js +3 -3
  35. package/dist/cjs/src/coinbase.js +75 -65
  36. package/dist/cjs/src/coinbaseexchange.js +4 -3
  37. package/dist/cjs/src/coinbaseinternational.js +17 -10
  38. package/dist/cjs/src/coinex.js +79 -77
  39. package/dist/cjs/src/coinmetro.js +1 -1
  40. package/dist/cjs/src/coinsph.js +5 -5
  41. package/dist/cjs/src/cryptocom.js +52 -54
  42. package/dist/cjs/src/cryptomus.js +43 -39
  43. package/dist/cjs/src/deepcoin.js +9 -5
  44. package/dist/cjs/src/delta.js +53 -53
  45. package/dist/cjs/src/deribit.js +35 -35
  46. package/dist/cjs/src/derive.js +31 -31
  47. package/dist/cjs/src/digifinex.js +45 -45
  48. package/dist/cjs/src/exmo.js +104 -122
  49. package/dist/cjs/src/extended.js +3497 -0
  50. package/dist/cjs/src/foxbit.js +72 -76
  51. package/dist/cjs/src/gate.js +53 -53
  52. package/dist/cjs/src/gemini.js +45 -45
  53. package/dist/cjs/src/grvt.js +17 -11
  54. package/dist/cjs/src/hashkey.js +56 -58
  55. package/dist/cjs/src/hibachi.js +1 -1
  56. package/dist/cjs/src/hitbtc.js +5 -14
  57. package/dist/cjs/src/hollaex.js +51 -54
  58. package/dist/cjs/src/htx.js +84 -72
  59. package/dist/cjs/src/hyperliquid.js +60 -55
  60. package/dist/cjs/src/indodax.js +4 -3
  61. package/dist/cjs/src/kraken.js +71 -71
  62. package/dist/cjs/src/krakenfutures.js +2 -1
  63. package/dist/cjs/src/kucoin.js +3 -2
  64. package/dist/cjs/src/latoken.js +30 -32
  65. package/dist/cjs/src/lbank.js +64 -60
  66. package/dist/cjs/src/lighter.js +36 -38
  67. package/dist/cjs/src/luno.js +36 -44
  68. package/dist/cjs/src/mercado.js +2 -1
  69. package/dist/cjs/src/mexc.js +72 -63
  70. package/dist/cjs/src/modetrade.js +51 -53
  71. package/dist/cjs/src/ndax.js +35 -37
  72. package/dist/cjs/src/okx.js +23 -5
  73. package/dist/cjs/src/onetrading.js +21 -23
  74. package/dist/cjs/src/p2b.js +8 -4
  75. package/dist/cjs/src/paradex.js +3 -2
  76. package/dist/cjs/src/phemex.js +47 -47
  77. package/dist/cjs/src/poloniex.js +19 -13
  78. package/dist/cjs/src/pro/alpaca.js +1 -1
  79. package/dist/cjs/src/pro/apex.js +11 -2
  80. package/dist/cjs/src/pro/arkham.js +1 -1
  81. package/dist/cjs/src/pro/aster.js +10 -9
  82. package/dist/cjs/src/pro/backpack.js +1 -1
  83. package/dist/cjs/src/pro/binance.js +6 -6
  84. package/dist/cjs/src/pro/bingx.js +7 -2
  85. package/dist/cjs/src/pro/bitget.js +1 -1
  86. package/dist/cjs/src/pro/bithumb.js +1 -1
  87. package/dist/cjs/src/pro/bitmart.js +10 -0
  88. package/dist/cjs/src/pro/bitmex.js +1 -1
  89. package/dist/cjs/src/pro/bitstamp.js +1 -1
  90. package/dist/cjs/src/pro/blockchaincom.js +1 -1
  91. package/dist/cjs/src/pro/bybit.js +1 -1
  92. package/dist/cjs/src/pro/cex.js +1 -1
  93. package/dist/cjs/src/pro/coinex.js +1 -1
  94. package/dist/cjs/src/pro/coinone.js +1 -1
  95. package/dist/cjs/src/pro/cryptocom.js +3 -1
  96. package/dist/cjs/src/pro/dydx.js +1 -1
  97. package/dist/cjs/src/pro/exmo.js +1 -1
  98. package/dist/cjs/src/pro/extended.js +865 -0
  99. package/dist/cjs/src/pro/gate.js +1 -1
  100. package/dist/cjs/src/pro/grvt.js +8 -0
  101. package/dist/cjs/src/pro/htx.js +4 -4
  102. package/dist/cjs/src/pro/independentreserve.js +1 -1
  103. package/dist/cjs/src/pro/krakenfutures.js +16 -4
  104. package/dist/cjs/src/pro/kucoin.js +1 -1
  105. package/dist/cjs/src/pro/luno.js +3 -3
  106. package/dist/cjs/src/pro/modetrade.js +3 -3
  107. package/dist/cjs/src/pro/okx.js +4 -4
  108. package/dist/cjs/src/pro/onetrading.js +1 -1
  109. package/dist/cjs/src/pro/toobit.js +1 -1
  110. package/dist/cjs/src/pro/weex.js +1 -1
  111. package/dist/cjs/src/pro/woo.js +4 -4
  112. package/dist/cjs/src/pro/woofipro.js +3 -3
  113. package/dist/cjs/src/pro/xt.js +1 -1
  114. package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
  115. package/dist/cjs/src/tokocrypto.js +1 -1
  116. package/dist/cjs/src/toobit.js +3 -3
  117. package/dist/cjs/src/upbit.js +3 -3
  118. package/dist/cjs/src/weex.js +57 -62
  119. package/dist/cjs/src/whitebit.js +61 -63
  120. package/dist/cjs/src/woo.js +66 -55
  121. package/dist/cjs/src/woofipro.js +54 -48
  122. package/dist/cjs/src/xt.js +3 -2
  123. package/dist/cjs/src/yobit.js +4 -2
  124. package/dist/cjs/src/zebpay.js +73 -75
  125. package/js/ccxt.d.ts +8 -14
  126. package/js/ccxt.js +6 -10
  127. package/js/src/abstract/bitvavo.d.ts +15 -7
  128. package/js/src/abstract/extended.d.ts +58 -0
  129. package/js/src/abstract/mexc.d.ts +1 -0
  130. package/js/src/aftermath.js +10 -5
  131. package/js/src/alpaca.js +2 -2
  132. package/js/src/apex.d.ts +1 -1
  133. package/js/src/apex.js +26 -17
  134. package/js/src/arkham.js +10 -7
  135. package/js/src/ascendex.js +8 -5
  136. package/js/src/aster.js +7 -4
  137. package/js/src/backpack.js +4 -4
  138. package/js/src/base/Exchange.d.ts +10 -6
  139. package/js/src/base/Exchange.js +72 -35
  140. package/js/src/base/functions/io.d.ts +7 -0
  141. package/js/src/base/functions/io.js +24 -0
  142. package/js/src/bigone.js +10 -7
  143. package/js/src/binance.d.ts +2 -0
  144. package/js/src/binance.js +200 -202
  145. package/js/src/bingx.js +7 -7
  146. package/js/src/bitfinex.d.ts +2 -0
  147. package/js/src/bitfinex.js +71 -58
  148. package/js/src/bitflyer.js +2 -1
  149. package/js/src/bitget.js +16 -5
  150. package/js/src/bitmart.js +18 -10
  151. package/js/src/bitmex.js +8 -5
  152. package/js/src/bitopro.js +2 -2
  153. package/js/src/bitrue.js +4 -3
  154. package/js/src/bitso.js +7 -4
  155. package/js/src/bitstamp.js +7 -4
  156. package/js/src/bitteam.js +1 -1
  157. package/js/src/bittrade.js +2 -2
  158. package/js/src/bitvavo.d.ts +114 -21
  159. package/js/src/bitvavo.js +457 -34
  160. package/js/src/blofin.d.ts +1 -0
  161. package/js/src/blofin.js +28 -4
  162. package/js/src/bullish.js +6 -5
  163. package/js/src/bybit.d.ts +1 -1
  164. package/js/src/bybit.js +19 -17
  165. package/js/src/bybiteu.js +1 -0
  166. package/js/src/bydfi.js +1 -1
  167. package/js/src/cex.js +3 -3
  168. package/js/src/coinbase.d.ts +63 -56
  169. package/js/src/coinbase.js +75 -65
  170. package/js/src/coinbaseexchange.js +4 -3
  171. package/js/src/coinbaseinternational.d.ts +1 -1
  172. package/js/src/coinbaseinternational.js +17 -10
  173. package/js/src/coinex.d.ts +2 -1
  174. package/js/src/coinex.js +79 -77
  175. package/js/src/coinmetro.d.ts +1 -1
  176. package/js/src/coinmetro.js +1 -1
  177. package/js/src/coinsph.js +5 -5
  178. package/js/src/cryptocom.d.ts +1 -0
  179. package/js/src/cryptocom.js +52 -54
  180. package/js/src/cryptomus.d.ts +2 -1
  181. package/js/src/cryptomus.js +43 -39
  182. package/js/src/deepcoin.js +9 -5
  183. package/js/src/delta.d.ts +1 -0
  184. package/js/src/delta.js +53 -53
  185. package/js/src/deribit.d.ts +1 -0
  186. package/js/src/deribit.js +35 -35
  187. package/js/src/derive.d.ts +1 -0
  188. package/js/src/derive.js +31 -31
  189. package/js/src/digifinex.d.ts +1 -0
  190. package/js/src/digifinex.js +45 -45
  191. package/js/src/exmo.d.ts +1 -0
  192. package/js/src/exmo.js +104 -122
  193. package/js/src/extended.d.ts +554 -0
  194. package/js/src/extended.js +3490 -0
  195. package/js/src/foxbit.d.ts +1 -0
  196. package/js/src/foxbit.js +72 -76
  197. package/js/src/gate.d.ts +1 -0
  198. package/js/src/gate.js +53 -53
  199. package/js/src/gemini.d.ts +2 -1
  200. package/js/src/gemini.js +45 -45
  201. package/js/src/grvt.d.ts +1 -1
  202. package/js/src/grvt.js +17 -11
  203. package/js/src/hashkey.d.ts +1 -0
  204. package/js/src/hashkey.js +56 -58
  205. package/js/src/hibachi.d.ts +1 -1
  206. package/js/src/hibachi.js +1 -1
  207. package/js/src/hitbtc.d.ts +0 -1
  208. package/js/src/hitbtc.js +5 -14
  209. package/js/src/hollaex.d.ts +1 -0
  210. package/js/src/hollaex.js +51 -54
  211. package/js/src/htx.d.ts +1 -0
  212. package/js/src/htx.js +84 -72
  213. package/js/src/hyperliquid.d.ts +5 -4
  214. package/js/src/hyperliquid.js +60 -55
  215. package/js/src/indodax.js +4 -3
  216. package/js/src/kraken.d.ts +2 -1
  217. package/js/src/kraken.js +71 -71
  218. package/js/src/krakenfutures.js +2 -1
  219. package/js/src/kucoin.js +3 -2
  220. package/js/src/latoken.d.ts +1 -0
  221. package/js/src/latoken.js +30 -32
  222. package/js/src/lbank.d.ts +1 -0
  223. package/js/src/lbank.js +64 -60
  224. package/js/src/lighter.d.ts +2 -1
  225. package/js/src/lighter.js +36 -38
  226. package/js/src/luno.d.ts +1 -0
  227. package/js/src/luno.js +36 -44
  228. package/js/src/mercado.js +2 -1
  229. package/js/src/mexc.d.ts +4 -3
  230. package/js/src/mexc.js +72 -63
  231. package/js/src/modetrade.d.ts +1 -0
  232. package/js/src/modetrade.js +51 -53
  233. package/js/src/ndax.d.ts +1 -0
  234. package/js/src/ndax.js +35 -37
  235. package/js/src/okx.js +23 -5
  236. package/js/src/onetrading.d.ts +2 -1
  237. package/js/src/onetrading.js +21 -23
  238. package/js/src/p2b.js +8 -4
  239. package/js/src/paradex.js +3 -2
  240. package/js/src/phemex.d.ts +1 -0
  241. package/js/src/phemex.js +47 -47
  242. package/js/src/poloniex.js +19 -13
  243. package/js/src/pro/alpaca.js +1 -1
  244. package/js/src/pro/apex.js +11 -2
  245. package/js/src/pro/arkham.js +1 -1
  246. package/js/src/pro/aster.js +10 -9
  247. package/js/src/pro/backpack.js +1 -1
  248. package/js/src/pro/binance.d.ts +1 -1
  249. package/js/src/pro/binance.js +6 -6
  250. package/js/src/pro/bingx.js +7 -2
  251. package/js/src/pro/bitget.js +1 -1
  252. package/js/src/pro/bithumb.js +1 -1
  253. package/js/src/pro/bitmart.js +10 -0
  254. package/js/src/pro/bitmex.js +1 -1
  255. package/js/src/pro/bitstamp.js +1 -1
  256. package/js/src/pro/blockchaincom.js +1 -1
  257. package/js/src/pro/bybit.js +1 -1
  258. package/js/src/pro/cex.js +1 -1
  259. package/js/src/pro/coinex.js +1 -1
  260. package/js/src/pro/coinone.js +1 -1
  261. package/js/src/pro/cryptocom.js +3 -1
  262. package/js/src/pro/dydx.js +1 -1
  263. package/js/src/pro/exmo.js +1 -1
  264. package/js/src/pro/extended.d.ts +126 -0
  265. package/js/src/pro/extended.js +858 -0
  266. package/js/src/pro/gate.js +1 -1
  267. package/js/src/pro/grvt.js +8 -0
  268. package/js/src/pro/htx.d.ts +4 -4
  269. package/js/src/pro/htx.js +4 -4
  270. package/js/src/pro/independentreserve.js +1 -1
  271. package/js/src/pro/krakenfutures.d.ts +4 -4
  272. package/js/src/pro/krakenfutures.js +16 -4
  273. package/js/src/pro/kucoin.js +1 -1
  274. package/js/src/pro/luno.d.ts +1 -1
  275. package/js/src/pro/luno.js +3 -3
  276. package/js/src/pro/modetrade.d.ts +3 -3
  277. package/js/src/pro/modetrade.js +3 -3
  278. package/js/src/pro/okx.d.ts +4 -4
  279. package/js/src/pro/okx.js +4 -4
  280. package/js/src/pro/onetrading.js +1 -1
  281. package/js/src/pro/toobit.js +1 -1
  282. package/js/src/pro/weex.js +1 -1
  283. package/js/src/pro/woo.d.ts +4 -4
  284. package/js/src/pro/woo.js +4 -4
  285. package/js/src/pro/woofipro.d.ts +3 -3
  286. package/js/src/pro/woofipro.js +3 -3
  287. package/js/src/pro/xt.js +1 -1
  288. package/js/src/tokocrypto.js +1 -1
  289. package/js/src/toobit.d.ts +1 -1
  290. package/js/src/toobit.js +3 -3
  291. package/js/src/upbit.js +3 -3
  292. package/js/src/weex.d.ts +1 -0
  293. package/js/src/weex.js +57 -62
  294. package/js/src/whitebit.d.ts +1 -0
  295. package/js/src/whitebit.js +61 -63
  296. package/js/src/woo.d.ts +1 -0
  297. package/js/src/woo.js +66 -55
  298. package/js/src/woofipro.d.ts +1 -0
  299. package/js/src/woofipro.js +54 -48
  300. package/js/src/xt.js +3 -2
  301. package/js/src/yobit.js +4 -2
  302. package/js/src/zebpay.d.ts +2 -1
  303. package/js/src/zebpay.js +73 -75
  304. package/package.json +25 -11
  305. package/dist/cjs/src/gateio.js +0 -18
  306. package/dist/cjs/src/oxfun.js +0 -2931
  307. package/dist/cjs/src/pro/gateio.js +0 -18
  308. package/dist/cjs/src/pro/oxfun.js +0 -1113
  309. package/js/src/abstract/gateio.d.ts +0 -346
  310. package/js/src/abstract/gateio.js +0 -5
  311. package/js/src/abstract/oxfun.d.ts +0 -37
  312. package/js/src/gateio.d.ts +0 -4
  313. package/js/src/gateio.js +0 -11
  314. package/js/src/oxfun.d.ts +0 -442
  315. package/js/src/oxfun.js +0 -2924
  316. package/js/src/pro/gateio.d.ts +0 -4
  317. package/js/src/pro/gateio.js +0 -11
  318. package/js/src/pro/oxfun.d.ts +0 -234
  319. package/js/src/pro/oxfun.js +0 -1106
  320. /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
  321. /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
@@ -1,4 +0,0 @@
1
- import gate from './gate.js';
2
- export default class gateio extends gate {
3
- describe(): any;
4
- }
@@ -1,11 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- import gate from './gate.js';
3
- // ---------------------------------------------------------------------------
4
- export default class gateio extends gate {
5
- describe() {
6
- return this.deepExtend(super.describe(), {
7
- 'alias': true,
8
- 'id': 'gateio',
9
- });
10
- }
11
- }
@@ -1,234 +0,0 @@
1
- import oxfunRest from '../oxfun.js';
2
- import type { Balances, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade } from '../base/types.js';
3
- import Client from '../base/ws/Client.js';
4
- export default class oxfun extends oxfunRest {
5
- describe(): any;
6
- subscribeMultiple(messageHashes: any, argsArray: any, params?: {}): Promise<any>;
7
- /**
8
- * @method
9
- * @name oxfun#watchTrades
10
- * @description watches information on multiple trades made in a market
11
- * @see https://docs.ox.fun/?json#trade
12
- * @param {string} symbol unified market symbol of the market trades were made in
13
- * @param {int} [since] the earliest time in ms to fetch orders for
14
- * @param {int} [limit] the maximum number of trade structures to retrieve
15
- * @param {object} [params] extra parameters specific to the exchange API endpoint
16
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
17
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
18
- */
19
- watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
20
- /**
21
- * @method
22
- * @name oxfun#watchTradesForSymbols
23
- * @description get the list of most recent trades for a particular symbol
24
- * @see https://docs.ox.fun/?json#trade
25
- * @param {string[]} symbols
26
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
27
- * @param {int} [limit] the maximum amount of trades to fetch
28
- * @param {object} [params] extra parameters specific to the exchange API endpoint
29
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
30
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
31
- */
32
- watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
33
- handleTrades(client: Client, message: any): void;
34
- parseWsTrade(trade: any, market?: any): Trade;
35
- /**
36
- * @method
37
- * @name oxfun#watchOHLCV
38
- * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
39
- * @see https://docs.ox.fun/?json#candles
40
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
41
- * @param {string} timeframe the length of time each candle represents
42
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
43
- * @param {int} [limit] the maximum amount of candles to fetch
44
- * @param {object} [params] extra parameters specific to the exchange API endpoint
45
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
46
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
47
- */
48
- watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
49
- /**
50
- * @method
51
- * @name oxfun#watchOHLCVForSymbols
52
- * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
53
- * @see https://docs.ox.fun/?json#candles
54
- * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
55
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
56
- * @param {int} [limit] the maximum amount of candles to fetch
57
- * @param {object} [params] extra parameters specific to the exchange API endpoint
58
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
59
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
60
- */
61
- watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: {}): Promise<import("../base/types.js").Dictionary<import("../base/types.js").Dictionary<OHLCV[]>>>;
62
- handleOHLCV(client: Client, message: any): void;
63
- parseWsOHLCV(ohlcv: any, market?: Market): OHLCV;
64
- /**
65
- * @method
66
- * @name oxfun#watchOrderBook
67
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
68
- * @see https://docs.ox.fun/?json#fixed-size-order-book
69
- * @see https://docs.ox.fun/?json#full-order-book
70
- * @param {string} symbol unified symbol of the market to fetch the order book for
71
- * @param {int} [limit] the maximum amount of order book entries to return
72
- * @param {object} [params] extra parameters specific to the exchange API endpoint
73
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
74
- */
75
- watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
76
- /**
77
- * @method
78
- * @name oxfun#watchOrderBookForSymbols
79
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
80
- * @see https://docs.ox.fun/?json#fixed-size-order-book
81
- * @see https://docs.ox.fun/?json#full-order-book
82
- * @param {string[]} symbols unified array of symbols
83
- * @param {int} [limit] the maximum amount of order book entries to return
84
- * @param {object} [params] extra parameters specific to the exchange API endpoint
85
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
86
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
87
- */
88
- watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
89
- handleOrderBook(client: Client, message: any): void;
90
- /**
91
- * @method
92
- * @name oxfun#watchTicker
93
- * @see https://docs.ox.fun/?json#ticker
94
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
95
- * @param {string} symbol unified symbol of the market to fetch the ticker for
96
- * @param {object} [params] extra parameters specific to the exchange API endpoint
97
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
98
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
99
- */
100
- watchTicker(symbol: string, params?: {}): Promise<Ticker>;
101
- /**
102
- * @method
103
- * @name oxfun#watchTickers
104
- * @see https://docs.ox.fun/?json#ticker
105
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
106
- * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
107
- * @param {object} [params] extra parameters specific to the exchange API endpoint
108
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
109
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
110
- */
111
- watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
112
- handleTicker(client: Client, message: any): void;
113
- /**
114
- * @method
115
- * @name oxfun#watchBidsAsks
116
- * @see https://docs.ox.fun/?json#best-bid-ask
117
- * @description watches best bid & ask for symbols
118
- * @param {string[]} symbols unified symbol of the market to fetch the ticker for
119
- * @param {object} [params] extra parameters specific to the exchange API endpoint
120
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
121
- */
122
- watchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
123
- handleBidAsk(client: Client, message: any): void;
124
- parseWsBidAsk(ticker: any, market?: any): Ticker;
125
- /**
126
- * @method
127
- * @name oxfun#watchBalance
128
- * @see https://docs.ox.fun/?json#balance-channel
129
- * @description watch balance and get the amount of funds available for trading or funds locked in orders
130
- * @param {object} [params] extra parameters specific to the exchange API endpoint
131
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
132
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
133
- */
134
- watchBalance(params?: {}): Promise<Balances>;
135
- handleBalance(client: any, message: any): void;
136
- /**
137
- * @method
138
- * @name oxfun#watchPositions
139
- * @see https://docs.ox.fun/?json#position-channel
140
- * @description watch all open positions
141
- * @param {string[]|undefined} symbols list of unified market symbols
142
- * @param since
143
- * @param limit
144
- * @param {object} params extra parameters specific to the exchange API endpoint
145
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
146
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
147
- */
148
- watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
149
- handlePositions(client: Client, message: any): void;
150
- parseWsPosition(position: any, market?: Market): Position;
151
- /**
152
- * @method
153
- * @name oxfun#watchOrders
154
- * @description watches information on multiple orders made by the user
155
- * @see https://docs.ox.fun/?json#order-channel
156
- * @param {string} symbol unified market symbol of the market orders were made in
157
- * @param {int} [since] the earliest time in ms to fetch orders for
158
- * @param {int} [limit] the maximum number of order structures to retrieve
159
- * @param {object} [params] extra parameters specific to the exchange API endpoint
160
- * @param {int|string} [params.tag] If given it will be echoed in the reply and the max size of tag is 32
161
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
162
- */
163
- watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
164
- handleOrders(client: Client, message: any): void;
165
- /**
166
- * @method
167
- * @name oxfun#createOrderWs
168
- * @see https://docs.ox.fun/?json#order-commands
169
- * @description create a trade order
170
- * @param {string} symbol unified symbol of the market to create an order in
171
- * @param {string} type 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
172
- * @param {string} side 'buy' or 'sell'
173
- * @param {float} amount how much of currency you want to trade in units of base currency
174
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
175
- * @param {object} [params] extra parameters specific to the exchange API endpoint
176
- * @param {int} [params.clientOrderId] a unique id for the order
177
- * @param {int} [params.timestamp] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
178
- * @param {int} [params.recvWindow] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected. If timestamp is provided without recvWindow, then a default recvWindow of 1000ms is used.
179
- * @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount for market buy orders
180
- * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
181
- * @param {float} [params.limitPrice] Limit price for the STOP_LIMIT order
182
- * @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
183
- * @param {string} [params.timeInForce] GTC (default), IOC, FOK, PO, MAKER_ONLY or MAKER_ONLY_REPRICE (reprices order to the best maker only price if the specified price were to lead to a taker trade)
184
- * @param {string} [params.selfTradePreventionMode] NONE, EXPIRE_MAKER, EXPIRE_TAKER or EXPIRE_BOTH for more info check here {@link https://docs.ox.fun/?json#self-trade-prevention-modes}
185
- * @param {string} [params.displayQuantity] for an iceberg order, pass both quantity and displayQuantity fields in the order request
186
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
187
- */
188
- createOrderWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
189
- /**
190
- * @method
191
- * @name oxfun#editOrderWs
192
- * @description edit a trade order
193
- * @see https://docs.ox.fun/?json#modify-order
194
- * @param {string} id order id
195
- * @param {string} symbol unified symbol of the market to create an order in
196
- * @param {string} type 'market' or 'limit'
197
- * @param {string} side 'buy' or 'sell'
198
- * @param {float} amount how much of the currency you want to trade in units of the base currency
199
- * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
200
- * @param {object} [params] extra parameters specific to the exchange API endpoint
201
- * @param {int} [params.timestamp] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
202
- * @param {int} [params.recvWindow] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected. If timestamp is provided without recvWindow, then a default recvWindow of 1000ms is used.
203
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
204
- */
205
- editOrderWs(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
206
- handlePlaceOrders(client: Client, message: any): void;
207
- /**
208
- * @method
209
- * @name oxfun#cancelOrderWs
210
- * @see https://docs.ox.fun/?json#cancel-order
211
- * @description cancels an open order
212
- * @param {string} id order id
213
- * @param {string} symbol unified market symbol, default is undefined
214
- * @param {object} [params] extra parameters specific to the exchange API endpoint
215
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
216
- */
217
- cancelOrderWs(id: string, symbol?: Str, params?: {}): Promise<Order>;
218
- /**
219
- * @method
220
- * @name oxfun#cancelOrdersWs
221
- * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-ws-mass-cancel-order
222
- * @description cancel multiple orders
223
- * @param {string[]} ids order ids
224
- * @param {string} symbol unified market symbol, default is undefined
225
- * @param {object} [params] extra parameters specific to the exchange API endpoint
226
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
227
- */
228
- cancelOrdersWs(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
229
- authenticate(params?: {}): Promise<any>;
230
- handleAuthenticationMessage(client: Client, message: any): void;
231
- ping(client: Client): string;
232
- handlePong(client: Client, message: any): any;
233
- handleMessage(client: Client, message: any): void;
234
- }