ccxt 4.4.85 → 4.4.87

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 (115) hide show
  1. package/README.md +18 -7
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +16 -9
  4. package/dist/cjs/src/abstract/bittrade.js +9 -0
  5. package/dist/cjs/src/abstract/modetrade.js +9 -0
  6. package/dist/cjs/src/ascendex.js +189 -155
  7. package/dist/cjs/src/base/Exchange.js +10 -8
  8. package/dist/cjs/src/bequant.js +1 -1
  9. package/dist/cjs/src/binance.js +1 -1
  10. package/dist/cjs/src/bitget.js +5 -4
  11. package/dist/cjs/src/bitmart.js +1 -1
  12. package/dist/cjs/src/bitteam.js +31 -0
  13. package/dist/cjs/src/bittrade.js +2049 -0
  14. package/dist/cjs/src/coinbase.js +2 -6
  15. package/dist/cjs/src/coinmetro.js +5 -1
  16. package/dist/cjs/src/deribit.js +4 -5
  17. package/dist/cjs/src/derive.js +4 -5
  18. package/dist/cjs/src/ellipx.js +2 -3
  19. package/dist/cjs/src/gate.js +92 -76
  20. package/dist/cjs/src/hollaex.js +107 -49
  21. package/dist/cjs/src/htx.js +30 -52
  22. package/dist/cjs/src/hyperliquid.js +36 -20
  23. package/dist/cjs/src/kraken.js +5 -8
  24. package/dist/cjs/src/mexc.js +2 -2
  25. package/dist/cjs/src/modetrade.js +2839 -0
  26. package/dist/cjs/src/ndax.js +25 -24
  27. package/dist/cjs/src/okcoin.js +12 -31
  28. package/dist/cjs/src/okx.js +104 -2
  29. package/dist/cjs/src/okxus.js +53 -0
  30. package/dist/cjs/src/onetrading.js +9 -6
  31. package/dist/cjs/src/oxfun.js +42 -114
  32. package/dist/cjs/src/paradex.js +10 -1
  33. package/dist/cjs/src/phemex.js +4 -6
  34. package/dist/cjs/src/poloniex.js +181 -170
  35. package/dist/cjs/src/pro/binance.js +1 -0
  36. package/dist/cjs/src/pro/bittrade.js +605 -0
  37. package/dist/cjs/src/pro/luno.js +6 -5
  38. package/dist/cjs/src/pro/mexc.js +3 -0
  39. package/dist/cjs/src/pro/modetrade.js +1334 -0
  40. package/dist/cjs/src/pro/okxus.js +38 -0
  41. package/dist/cjs/src/probit.js +18 -51
  42. package/dist/cjs/src/timex.js +5 -10
  43. package/dist/cjs/src/vertex.js +3 -4
  44. package/dist/cjs/src/whitebit.js +41 -11
  45. package/dist/cjs/src/woo.js +101 -77
  46. package/dist/cjs/src/woofipro.js +24 -21
  47. package/dist/cjs/src/xt.js +36 -44
  48. package/js/ccxt.d.ts +20 -11
  49. package/js/ccxt.js +14 -8
  50. package/js/src/abstract/modetrade.d.ts +122 -0
  51. package/js/src/abstract/myokx.d.ts +2 -0
  52. package/js/src/abstract/okx.d.ts +2 -0
  53. package/js/src/abstract/okxus.d.ts +352 -0
  54. package/js/src/abstract/okxus.js +11 -0
  55. package/js/src/ascendex.d.ts +2 -0
  56. package/js/src/ascendex.js +189 -155
  57. package/js/src/base/Exchange.js +10 -8
  58. package/js/src/bequant.js +1 -1
  59. package/js/src/binance.js +1 -1
  60. package/js/src/bitget.js +5 -4
  61. package/js/src/bitmart.js +1 -1
  62. package/js/src/bitteam.js +31 -0
  63. package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
  64. package/js/src/{huobijp.js → bittrade.js} +35 -35
  65. package/js/src/coinbase.js +2 -6
  66. package/js/src/coinmetro.js +5 -1
  67. package/js/src/deribit.js +4 -5
  68. package/js/src/derive.js +4 -3
  69. package/js/src/ellipx.d.ts +1 -1
  70. package/js/src/ellipx.js +3 -5
  71. package/js/src/gate.js +92 -76
  72. package/js/src/hollaex.js +107 -49
  73. package/js/src/htx.js +30 -52
  74. package/js/src/hyperliquid.js +36 -20
  75. package/js/src/kraken.js +5 -8
  76. package/js/src/mexc.js +2 -2
  77. package/js/src/modetrade.d.ts +475 -0
  78. package/js/src/modetrade.js +2840 -0
  79. package/js/src/ndax.js +25 -24
  80. package/js/src/okcoin.js +12 -31
  81. package/js/src/okx.d.ts +24 -1
  82. package/js/src/okx.js +104 -2
  83. package/js/src/okxus.d.ts +4 -0
  84. package/js/src/okxus.js +54 -0
  85. package/js/src/onetrading.js +9 -6
  86. package/js/src/oxfun.js +42 -114
  87. package/js/src/paradex.js +10 -1
  88. package/js/src/phemex.js +4 -6
  89. package/js/src/poloniex.d.ts +2 -0
  90. package/js/src/poloniex.js +181 -170
  91. package/js/src/pro/binance.js +1 -0
  92. package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
  93. package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
  94. package/js/src/pro/luno.js +6 -5
  95. package/js/src/pro/mexc.js +3 -0
  96. package/js/src/pro/modetrade.d.ts +155 -0
  97. package/js/src/pro/modetrade.js +1335 -0
  98. package/js/src/pro/okxus.d.ts +4 -0
  99. package/js/src/pro/okxus.js +39 -0
  100. package/js/src/probit.js +18 -51
  101. package/js/src/timex.js +5 -10
  102. package/js/src/vertex.js +3 -4
  103. package/js/src/whitebit.js +42 -11
  104. package/js/src/woo.d.ts +2 -0
  105. package/js/src/woo.js +101 -77
  106. package/js/src/woofipro.d.ts +2 -1
  107. package/js/src/woofipro.js +24 -21
  108. package/js/src/xt.js +36 -44
  109. package/package.json +1 -1
  110. package/js/src/abstract/kuna.d.ts +0 -185
  111. package/js/src/kuna.d.ts +0 -335
  112. package/js/src/kuna.js +0 -2006
  113. /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
  114. /package/js/src/abstract/{huobijp.js → bittrade.js} +0 -0
  115. /package/js/src/abstract/{kuna.js → modetrade.js} +0 -0
@@ -0,0 +1,155 @@
1
+ import modetradeRest from '../modetrade.js';
2
+ import type { Int, Str, Strings, OrderBook, Order, Trade, Ticker, Tickers, OHLCV, Balances, Position } from '../base/types.js';
3
+ import Client from '../base/ws/Client.js';
4
+ export default class modetrade extends modetradeRest {
5
+ describe(): any;
6
+ requestId(url: any): any;
7
+ watchPublic(messageHash: any, message: any): Promise<any>;
8
+ /**
9
+ * @method
10
+ * @name modetrade#watchOrderBook
11
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/orderbook
12
+ * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
13
+ * @param {string} symbol unified symbol of the market to fetch the order book for
14
+ * @param {int} [limit] the maximum amount of order book entries to return.
15
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
16
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
17
+ */
18
+ watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
19
+ handleOrderBook(client: Client, message: any): void;
20
+ /**
21
+ * @method
22
+ * @name modetrade#watchTicker
23
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/24-hour-ticker
24
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
25
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
26
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
27
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
28
+ */
29
+ watchTicker(symbol: string, params?: {}): Promise<Ticker>;
30
+ parseWsTicker(ticker: any, market?: any): Ticker;
31
+ handleTicker(client: Client, message: any): any;
32
+ /**
33
+ * @method
34
+ * @name modetrade#watchTickers
35
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/24-hour-tickers
36
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
37
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
38
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
39
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
40
+ */
41
+ watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
42
+ handleTickers(client: Client, message: any): void;
43
+ /**
44
+ * @method
45
+ * @name modetrade#watchBidsAsks
46
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/bbos
47
+ * @description watches best bid & ask for symbols
48
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
49
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
50
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
51
+ */
52
+ watchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
53
+ handleBidAsk(client: Client, message: any): void;
54
+ parseWsBidAsk(ticker: any, market?: any): Ticker;
55
+ /**
56
+ * @method
57
+ * @name modetrade#watchOHLCV
58
+ * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
59
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/k-line
60
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
61
+ * @param {string} timeframe the length of time each candle represents
62
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
63
+ * @param {int} [limit] the maximum amount of candles to fetch
64
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
65
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
66
+ */
67
+ watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
68
+ handleOHLCV(client: Client, message: any): void;
69
+ /**
70
+ * @method
71
+ * @name modetrade#watchTrades
72
+ * @description watches information on multiple trades made in a market
73
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/public/trade
74
+ * @param {string} symbol unified market symbol of the market trades were made in
75
+ * @param {int} [since] the earliest time in ms to fetch trades for
76
+ * @param {int} [limit] the maximum number of trade structures to retrieve
77
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
78
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
79
+ */
80
+ watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
81
+ handleTrade(client: Client, message: any): void;
82
+ parseWsTrade(trade: any, market?: any): Trade;
83
+ handleAuth(client: Client, message: any): void;
84
+ authenticate(params?: {}): Promise<any>;
85
+ watchPrivate(messageHash: any, message: any, params?: {}): Promise<any>;
86
+ watchPrivateMultiple(messageHashes: any, message: any, params?: {}): Promise<any>;
87
+ /**
88
+ * @method
89
+ * @name modetrade#watchOrders
90
+ * @description watches information on multiple orders made by the user
91
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/execution-report
92
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/algo-execution-report
93
+ * @param {string} symbol unified market symbol of the market orders were made in
94
+ * @param {int} [since] the earliest time in ms to fetch orders for
95
+ * @param {int} [limit] the maximum number of order structures to retrieve
96
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
97
+ * @param {bool} [params.trigger] true if trigger order
98
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
99
+ */
100
+ watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
101
+ /**
102
+ * @method
103
+ * @name modetrade#watchMyTrades
104
+ * @description watches information on multiple trades made by the user
105
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/execution-report
106
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/algo-execution-report
107
+ * @param {string} symbol unified market symbol of the market orders were made in
108
+ * @param {int} [since] the earliest time in ms to fetch orders for
109
+ * @param {int} [limit] the maximum number of order structures to retrieve
110
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
111
+ * @param {bool} [params.trigger] true if trigger order
112
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
113
+ */
114
+ watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
115
+ parseWsOrder(order: any, market?: any): Order;
116
+ handleOrderUpdate(client: Client, message: any): void;
117
+ handleOrder(client: Client, message: any, topic: any): void;
118
+ handleMyTrade(client: Client, message: any): void;
119
+ /**
120
+ * @method
121
+ * @name modetrade#watchPositions
122
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/position-push
123
+ * @description watch all open positions
124
+ * @param {string[]} [symbols] list of unified market symbols
125
+ * @param since timestamp in ms of the earliest position to fetch
126
+ * @param limit the maximum number of positions to fetch
127
+ * @param {object} params extra parameters specific to the exchange API endpoint
128
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
129
+ */
130
+ watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
131
+ setPositionsCache(client: Client, type: any, symbols?: Strings): void;
132
+ loadPositionsSnapshot(client: any, messageHash: any): Promise<void>;
133
+ handlePositions(client: any, message: any): void;
134
+ parseWsPosition(position: any, market?: any): Position;
135
+ /**
136
+ * @method
137
+ * @name modetrade#watchBalance
138
+ * @description watch balance and get the amount of funds available for trading or funds locked in orders
139
+ * @see https://orderly.network/docs/build-on-evm/evm-api/websocket-api/private/balance
140
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
141
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
142
+ */
143
+ watchBalance(params?: {}): Promise<Balances>;
144
+ handleBalance(client: any, message: any): void;
145
+ handleErrorMessage(client: Client, message: any): boolean;
146
+ handleMessage(client: Client, message: any): void;
147
+ ping(client: Client): {
148
+ event: string;
149
+ };
150
+ handlePing(client: Client, message: any): {
151
+ event: string;
152
+ };
153
+ handlePong(client: Client, message: any): any;
154
+ handleSubscribe(client: Client, message: any): any;
155
+ }