ccxt 4.4.77 → 4.4.80

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 (154) hide show
  1. package/README.md +8 -10
  2. package/dist/ccxt.browser.min.js +7 -7
  3. package/dist/cjs/ccxt.js +8 -4
  4. package/dist/cjs/src/abstract/ace.js +1 -1
  5. package/dist/cjs/src/abstract/apex.js +9 -0
  6. package/dist/cjs/src/ace.js +1 -1
  7. package/dist/cjs/src/apex.js +1949 -0
  8. package/dist/cjs/src/ascendex.js +25 -4
  9. package/dist/cjs/src/base/Exchange.js +42 -2
  10. package/dist/cjs/src/binance.js +9 -1
  11. package/dist/cjs/src/bingx.js +3 -3
  12. package/dist/cjs/src/bitfinex.js +64 -36
  13. package/dist/cjs/src/bitget.js +191 -138
  14. package/dist/cjs/src/bitmart.js +7 -2
  15. package/dist/cjs/src/bitmex.js +16 -8
  16. package/dist/cjs/src/bitopro.js +5 -1
  17. package/dist/cjs/src/bitrue.js +2 -1
  18. package/dist/cjs/src/bitso.js +1 -1
  19. package/dist/cjs/src/bitteam.js +2 -0
  20. package/dist/cjs/src/bitvavo.js +28 -10
  21. package/dist/cjs/src/btcalpha.js +1 -1
  22. package/dist/cjs/src/btcmarkets.js +1 -1
  23. package/dist/cjs/src/btcturk.js +1 -1
  24. package/dist/cjs/src/bybit.js +32 -16
  25. package/dist/cjs/src/cex.js +1 -1
  26. package/dist/cjs/src/coinbase.js +18 -2
  27. package/dist/cjs/src/coincatch.js +68 -0
  28. package/dist/cjs/src/coinex.js +1 -0
  29. package/dist/cjs/src/coinlist.js +1 -0
  30. package/dist/cjs/src/coinone.js +1 -0
  31. package/dist/cjs/src/delta.js +4 -0
  32. package/dist/cjs/src/deribit.js +1 -0
  33. package/dist/cjs/src/hitbtc.js +3 -0
  34. package/dist/cjs/src/hollaex.js +1 -0
  35. package/dist/cjs/src/htx.js +7 -3
  36. package/dist/cjs/src/huobijp.js +1 -0
  37. package/dist/cjs/src/hyperliquid.js +14 -4
  38. package/dist/cjs/src/kraken.js +2 -0
  39. package/dist/cjs/src/mexc.js +50 -57
  40. package/dist/cjs/src/okx.js +1 -1
  41. package/dist/cjs/src/phemex.js +2 -1
  42. package/dist/cjs/src/poloniex.js +2 -1
  43. package/dist/cjs/src/pro/apex.js +1043 -0
  44. package/dist/cjs/src/pro/binance.js +3 -3
  45. package/dist/cjs/src/pro/coinbase.js +45 -68
  46. package/dist/cjs/src/pro/gate.js +27 -2
  47. package/dist/cjs/src/pro/hollaex.js +2 -2
  48. package/dist/cjs/src/pro/p2b.js +2 -2
  49. package/dist/cjs/src/pro/tradeogre.js +283 -0
  50. package/dist/cjs/src/pro/upbit.js +43 -0
  51. package/dist/cjs/src/probit.js +1 -0
  52. package/dist/cjs/src/static_dependencies/zklink/zklink-sdk-web.js +2639 -0
  53. package/dist/cjs/src/timex.js +2 -2
  54. package/dist/cjs/src/tradeogre.js +2 -1
  55. package/dist/cjs/src/upbit.js +277 -67
  56. package/dist/cjs/src/whitebit.js +66 -12
  57. package/dist/cjs/src/woo.js +3 -1
  58. package/dist/cjs/src/xt.js +9 -0
  59. package/js/ccxt.d.ts +11 -5
  60. package/js/ccxt.js +8 -4
  61. package/js/src/abstract/apex.d.ts +34 -0
  62. package/js/src/abstract/bitmart.d.ts +1 -0
  63. package/js/src/apex.d.ts +333 -0
  64. package/js/src/apex.js +1945 -0
  65. package/js/src/ascendex.d.ts +3 -3
  66. package/js/src/ascendex.js +25 -4
  67. package/js/src/base/Exchange.d.ts +2 -0
  68. package/js/src/base/Exchange.js +42 -1
  69. package/js/src/binance.d.ts +7 -7
  70. package/js/src/binance.js +9 -1
  71. package/js/src/bingx.js +3 -3
  72. package/js/src/bitfinex.d.ts +3 -3
  73. package/js/src/bitfinex.js +64 -36
  74. package/js/src/bitflyer.d.ts +2 -2
  75. package/js/src/bitget.d.ts +2 -0
  76. package/js/src/bitget.js +191 -138
  77. package/js/src/bitmart.d.ts +5 -4
  78. package/js/src/bitmart.js +7 -2
  79. package/js/src/bitmex.d.ts +3 -3
  80. package/js/src/bitmex.js +16 -8
  81. package/js/src/bitopro.js +5 -1
  82. package/js/src/bitrue.js +2 -1
  83. package/js/src/bitso.js +1 -1
  84. package/js/src/bitteam.js +2 -0
  85. package/js/src/bitvavo.js +28 -10
  86. package/js/src/btcalpha.js +1 -1
  87. package/js/src/btcmarkets.js +1 -1
  88. package/js/src/btcturk.js +1 -1
  89. package/js/src/bybit.js +32 -16
  90. package/js/src/cex.js +1 -1
  91. package/js/src/coinbase.d.ts +4 -4
  92. package/js/src/coinbase.js +18 -2
  93. package/js/src/coinbaseexchange.d.ts +1 -1
  94. package/js/src/coincatch.d.ts +11 -0
  95. package/js/src/coincatch.js +68 -0
  96. package/js/src/coinex.js +1 -0
  97. package/js/src/coinlist.js +1 -0
  98. package/js/src/coinone.js +1 -0
  99. package/js/src/cryptocom.d.ts +4 -4
  100. package/js/src/delta.js +4 -0
  101. package/js/src/deribit.d.ts +4 -4
  102. package/js/src/deribit.js +1 -0
  103. package/js/src/derive.d.ts +3 -3
  104. package/js/src/digifinex.d.ts +4 -4
  105. package/js/src/hitbtc.js +3 -0
  106. package/js/src/hollaex.js +1 -0
  107. package/js/src/htx.d.ts +4 -4
  108. package/js/src/htx.js +7 -3
  109. package/js/src/huobijp.js +1 -0
  110. package/js/src/hyperliquid.d.ts +1 -0
  111. package/js/src/hyperliquid.js +14 -4
  112. package/js/src/kraken.d.ts +3 -3
  113. package/js/src/kraken.js +2 -0
  114. package/js/src/krakenfutures.d.ts +2 -2
  115. package/js/src/kucoinfutures.d.ts +5 -5
  116. package/js/src/mexc.d.ts +1 -0
  117. package/js/src/mexc.js +50 -57
  118. package/js/src/okx.js +1 -1
  119. package/js/src/oxfun.d.ts +3 -3
  120. package/js/src/phemex.d.ts +3 -3
  121. package/js/src/phemex.js +2 -1
  122. package/js/src/poloniex.d.ts +3 -3
  123. package/js/src/poloniex.js +2 -1
  124. package/js/src/pro/apex.d.ts +160 -0
  125. package/js/src/pro/apex.js +1038 -0
  126. package/js/src/pro/binance.js +3 -3
  127. package/js/src/pro/coinbase.d.ts +4 -3
  128. package/js/src/pro/coinbase.js +45 -66
  129. package/js/src/pro/gate.js +27 -2
  130. package/js/src/pro/hollaex.js +2 -2
  131. package/js/src/pro/p2b.js +2 -2
  132. package/js/src/pro/tradeogre.d.ts +49 -0
  133. package/js/src/pro/tradeogre.js +278 -0
  134. package/js/src/pro/upbit.d.ts +16 -1
  135. package/js/src/pro/upbit.js +43 -0
  136. package/js/src/probit.js +1 -0
  137. package/js/src/static_dependencies/zklink/zklink-sdk-web.d.ts +1279 -0
  138. package/js/src/static_dependencies/zklink/zklink-sdk-web.js +4276 -0
  139. package/js/src/timex.js +2 -2
  140. package/js/src/tradeogre.js +2 -1
  141. package/js/src/upbit.d.ts +75 -23
  142. package/js/src/upbit.js +277 -67
  143. package/js/src/vertex.d.ts +3 -3
  144. package/js/src/whitebit.js +66 -12
  145. package/js/src/woo.d.ts +4 -4
  146. package/js/src/woo.js +3 -1
  147. package/js/src/woofipro.d.ts +4 -4
  148. package/js/src/xt.d.ts +4 -4
  149. package/js/src/xt.js +9 -0
  150. package/package.json +2 -2
  151. package/js/src/abstract/ace.d.ts +0 -18
  152. package/js/src/ace.d.ts +0 -158
  153. package/js/src/ace.js +0 -1175
  154. /package/js/src/abstract/{ace.js → apex.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/poloniex.js';
2
- import type { TransferEntry, Int, Leverage, OrderSide, OrderType, OHLCV, Trade, OrderBook, Order, Balances, Str, MarginModification, Transaction, Ticker, Tickers, Market, Strings, Currency, Num, Currencies, TradingFees, Dict, int, DepositAddress } from './base/types.js';
2
+ import type { TransferEntry, Int, Leverage, OrderSide, OrderType, OHLCV, Trade, OrderBook, Order, Balances, Str, MarginModification, Transaction, Ticker, Tickers, Market, Strings, Currency, Num, Currencies, TradingFees, Dict, int, DepositAddress, Position } from './base/types.js';
3
3
  /**
4
4
  * @class poloniex
5
5
  * @augments Exchange
@@ -404,8 +404,8 @@ export default class poloniex extends Exchange {
404
404
  * @param {boolean} [params.standard] whether to fetch standard contract positions
405
405
  * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
406
406
  */
407
- fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
408
- parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
407
+ fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
408
+ parsePosition(position: Dict, market?: Market): Position;
409
409
  modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
410
410
  parseMarginModification(data: Dict, market?: Market): MarginModification;
411
411
  /**
@@ -1201,6 +1201,7 @@ export default class poloniex extends Exchange {
1201
1201
  'withdraw': withdrawEnabled,
1202
1202
  'fee': this.parseNumber(feeString),
1203
1203
  'precision': undefined,
1204
+ 'type': 'crypto',
1204
1205
  'limits': {
1205
1206
  'amount': {
1206
1207
  'min': undefined,
@@ -1849,7 +1850,7 @@ export default class poloniex extends Exchange {
1849
1850
  const isTrigger = this.safeValue2(params, 'trigger', 'stop');
1850
1851
  params = this.omit(params, ['trigger', 'stop']);
1851
1852
  let response = undefined;
1852
- if (!market['spot']) {
1853
+ if (marketType !== 'spot') {
1853
1854
  const raw = await this.swapPrivateGetV3TradeOrderOpens(this.extend(request, params));
1854
1855
  //
1855
1856
  // {
@@ -0,0 +1,160 @@
1
+ import apexRest from '../apex.js';
2
+ import type { Int, Trade, OrderBook, Ticker, Strings, Tickers } from '../base/types.js';
3
+ import Client from '../base/ws/Client.js';
4
+ import { OHLCV, Order, Position, Str } from '../base/types.js';
5
+ export default class apex extends apexRest {
6
+ describe(): any;
7
+ /**
8
+ * @method
9
+ * @name apex#watchTrades
10
+ * @description watches information on multiple trades made in a market
11
+ * @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
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 trades 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
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
17
+ */
18
+ watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
19
+ /**
20
+ * @method
21
+ * @name apex#watchTradesForSymbols
22
+ * @description get the list of most recent trades for a list of symbols
23
+ * @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
24
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
25
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
26
+ * @param {int} [limit] the maximum amount of trades to fetch
27
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
28
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
29
+ */
30
+ watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
31
+ handleTrades(client: Client, message: any): void;
32
+ parseWsTrade(trade: any, market?: any): Trade;
33
+ /**
34
+ * @method
35
+ * @name apex#watchOrderBook
36
+ * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
37
+ * @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
38
+ * @param {string} symbol unified symbol of the market to fetch the order book for
39
+ * @param {int} [limit] the maximum amount of order book entries to return.
40
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
41
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
42
+ */
43
+ watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
44
+ /**
45
+ * @method
46
+ * @name apex#watchOrderBookForSymbols
47
+ * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
48
+ * @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
49
+ * @param {string[]} symbols unified array of symbols
50
+ * @param {int} [limit] the maximum amount of order book entries to return.
51
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
52
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
53
+ */
54
+ watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
55
+ watchTopics(url: any, messageHashes: any, topics: any, params?: {}): Promise<any>;
56
+ handleOrderBook(client: Client, message: any): void;
57
+ handleDelta(bookside: any, delta: any): void;
58
+ handleDeltas(bookside: any, deltas: any): void;
59
+ /**
60
+ * @method
61
+ * @name apex#watchTicker
62
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
63
+ * @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
64
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
65
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
66
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
67
+ */
68
+ watchTicker(symbol: string, params?: {}): Promise<Ticker>;
69
+ /**
70
+ * @method
71
+ * @name apex#watchTickers
72
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
73
+ * @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
74
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
75
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
76
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
77
+ */
78
+ watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
79
+ handleTicker(client: Client, message: any): void;
80
+ /**
81
+ * @method
82
+ * @name apex#watchOHLCV
83
+ * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
84
+ * @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
85
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
86
+ * @param {string} timeframe the length of time each candle represents
87
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
88
+ * @param {int} [limit] the maximum amount of candles to fetch
89
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
90
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
91
+ */
92
+ watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
93
+ /**
94
+ * @method
95
+ * @name apex#watchOHLCVForSymbols
96
+ * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
97
+ * @see https://api-docs.pro.apex.exchange/#websocket-v3-for-omni-websocket-endpoint
98
+ * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
99
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
100
+ * @param {int} [limit] the maximum amount of candles to fetch
101
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
102
+ * @returns {object} A list of candles ordered as timestamp, open, high, low, close, volume
103
+ */
104
+ watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: {}): Promise<import("../base/types.js").Dictionary<import("../base/types.js").Dictionary<OHLCV[]>>>;
105
+ handleOHLCV(client: Client, message: any): void;
106
+ parseWsOHLCV(ohlcv: any, market?: any): OHLCV;
107
+ /**
108
+ * @method
109
+ * @name apex#watchMyTrades
110
+ * @description watches information on multiple trades made by the user
111
+ * @see https://api-docs.pro.apex.exchange/#private-websocket
112
+ * @param {string} symbol unified market symbol of the market orders were made in
113
+ * @param {int} [since] the earliest time in ms to fetch orders for
114
+ * @param {int} [limit] the maximum number of order structures to retrieve
115
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
116
+ * @param {boolean} [params.unifiedMargin] use unified margin account
117
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
118
+ */
119
+ watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
120
+ /**
121
+ * @method
122
+ * @name apex#watchPositions
123
+ * @see https://api-docs.pro.apex.exchange/#private-websocket
124
+ * @description watch all open positions
125
+ * @param {string[]} [symbols] list of unified market symbols
126
+ * @param {int} [since] the earliest time in ms to fetch positions for
127
+ * @param {int} [limit] the maximum number of positions to retrieve
128
+ * @param {object} params extra parameters specific to the exchange API endpoint
129
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
130
+ */
131
+ watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
132
+ /**
133
+ * @method
134
+ * @name apex#watchOrders
135
+ * @description watches information on multiple orders made by the user
136
+ * @see https://api-docs.pro.apex.exchange/#private-websocket
137
+ * @param {string} symbol unified market symbol of the market orders were made in
138
+ * @param {int} [since] the earliest time in ms to fetch orders for
139
+ * @param {int} [limit] the maximum number of order structures to retrieve
140
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
141
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
142
+ */
143
+ watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
144
+ handleMyTrades(client: Client, lists: any): void;
145
+ handleOrder(client: Client, lists: any): void;
146
+ setPositionsCache(client: Client, symbols?: Strings): void;
147
+ loadPositionsSnapshot(client: any, messageHash: any): Promise<void>;
148
+ handlePositions(client: any, lists: any): void;
149
+ authenticate(url: any, params?: {}): Promise<any>;
150
+ handleErrorMessage(client: Client, message: any): boolean;
151
+ handleMessage(client: Client, message: any): void;
152
+ ping(client: Client): {
153
+ args: string[];
154
+ op: string;
155
+ };
156
+ handlePong(client: Client, message: any): any;
157
+ handleAccount(client: Client, message: any): void;
158
+ handleAuthenticate(client: Client, message: any): any;
159
+ handleSubscriptionStatus(client: Client, message: any): any;
160
+ }