ccxt 4.3.5 → 4.3.7

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 (211) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/ccxt.js +1 -1
  3. package/dist/cjs/src/ace.js +5 -0
  4. package/dist/cjs/src/alpaca.js +6 -0
  5. package/dist/cjs/src/base/Exchange.js +37 -0
  6. package/dist/cjs/src/binance.js +4 -0
  7. package/dist/cjs/src/bingx.js +47 -0
  8. package/dist/cjs/src/bitbank.js +3 -0
  9. package/dist/cjs/src/bitget.js +74 -1
  10. package/dist/cjs/src/bithumb.js +4 -0
  11. package/dist/cjs/src/bitmex.js +26 -0
  12. package/dist/cjs/src/bitopro.js +5 -0
  13. package/dist/cjs/src/bitso.js +3 -0
  14. package/dist/cjs/src/bitstamp.js +3 -0
  15. package/dist/cjs/src/bitteam.js +4 -0
  16. package/dist/cjs/src/bitvavo.js +3 -0
  17. package/dist/cjs/src/bl3p.js +3 -0
  18. package/dist/cjs/src/btcalpha.js +3 -0
  19. package/dist/cjs/src/btcbox.js +3 -0
  20. package/dist/cjs/src/btcmarkets.js +3 -0
  21. package/dist/cjs/src/btcturk.js +3 -0
  22. package/dist/cjs/src/bybit.js +209 -12
  23. package/dist/cjs/src/cex.js +6 -0
  24. package/dist/cjs/src/coinbase.js +100 -21
  25. package/dist/cjs/src/coinbaseinternational.js +2 -0
  26. package/dist/cjs/src/coinbasepro.js +6 -0
  27. package/dist/cjs/src/coincheck.js +3 -0
  28. package/dist/cjs/src/coinex.js +180 -75
  29. package/dist/cjs/src/coinlist.js +4 -0
  30. package/dist/cjs/src/coinmate.js +3 -0
  31. package/dist/cjs/src/coinone.js +3 -0
  32. package/dist/cjs/src/coinsph.js +4 -0
  33. package/dist/cjs/src/coinspot.js +3 -0
  34. package/dist/cjs/src/cryptocom.js +34 -0
  35. package/dist/cjs/src/exmo.js +5 -0
  36. package/dist/cjs/src/gate.js +124 -22
  37. package/dist/cjs/src/hitbtc.js +4 -3
  38. package/dist/cjs/src/htx.js +30 -0
  39. package/dist/cjs/src/hyperliquid.js +40 -0
  40. package/dist/cjs/src/idex.js +3 -0
  41. package/dist/cjs/src/independentreserve.js +3 -0
  42. package/dist/cjs/src/indodax.js +3 -0
  43. package/dist/cjs/src/kraken.js +30 -0
  44. package/dist/cjs/src/krakenfutures.js +28 -0
  45. package/dist/cjs/src/kucoin.js +2 -0
  46. package/dist/cjs/src/kucoinfutures.js +4 -2
  47. package/dist/cjs/src/latoken.js +6 -0
  48. package/dist/cjs/src/luno.js +3 -0
  49. package/dist/cjs/src/lykke.js +5 -0
  50. package/dist/cjs/src/mercado.js +3 -0
  51. package/dist/cjs/src/mexc.js +111 -0
  52. package/dist/cjs/src/ndax.js +4 -0
  53. package/dist/cjs/src/novadax.js +4 -0
  54. package/dist/cjs/src/okx.js +196 -0
  55. package/dist/cjs/src/onetrading.js +3 -0
  56. package/dist/cjs/src/p2b.js +3 -0
  57. package/dist/cjs/src/pro/bitget.js +1 -1
  58. package/dist/cjs/src/pro/bybit.js +1 -1
  59. package/dist/cjs/src/pro/coinbase.js +30 -29
  60. package/dist/cjs/src/probit.js +3 -0
  61. package/dist/cjs/src/timex.js +3 -0
  62. package/dist/cjs/src/tradeogre.js +3 -0
  63. package/dist/cjs/src/wavesexchange.js +3 -0
  64. package/dist/cjs/src/wazirx.js +3 -0
  65. package/dist/cjs/src/whitebit.js +42 -0
  66. package/dist/cjs/src/woo.js +31 -0
  67. package/dist/cjs/src/yobit.js +3 -0
  68. package/js/ccxt.d.ts +1 -1
  69. package/js/ccxt.js +1 -1
  70. package/js/src/abstract/binance.d.ts +1 -0
  71. package/js/src/abstract/binancecoinm.d.ts +1 -0
  72. package/js/src/abstract/binanceus.d.ts +1 -0
  73. package/js/src/abstract/binanceusdm.d.ts +1 -0
  74. package/js/src/abstract/bingx.d.ts +1 -0
  75. package/js/src/abstract/coinbase.d.ts +5 -0
  76. package/js/src/abstract/woo.d.ts +1 -0
  77. package/js/src/ace.js +5 -0
  78. package/js/src/alpaca.js +6 -0
  79. package/js/src/ascendex.d.ts +2 -2
  80. package/js/src/base/Exchange.d.ts +5 -0
  81. package/js/src/base/Exchange.js +37 -0
  82. package/js/src/bigone.d.ts +1 -1
  83. package/js/src/binance.d.ts +3 -3
  84. package/js/src/binance.js +4 -0
  85. package/js/src/bingx.d.ts +2 -1
  86. package/js/src/bingx.js +47 -0
  87. package/js/src/bitbank.d.ts +1 -1
  88. package/js/src/bitbank.js +3 -0
  89. package/js/src/bitfinex.d.ts +1 -1
  90. package/js/src/bitfinex2.d.ts +1 -1
  91. package/js/src/bitflyer.d.ts +1 -1
  92. package/js/src/bitget.d.ts +4 -3
  93. package/js/src/bitget.js +74 -1
  94. package/js/src/bithumb.d.ts +1 -1
  95. package/js/src/bithumb.js +4 -0
  96. package/js/src/bitmart.d.ts +1 -1
  97. package/js/src/bitmex.d.ts +2 -1
  98. package/js/src/bitmex.js +26 -0
  99. package/js/src/bitopro.d.ts +1 -1
  100. package/js/src/bitopro.js +5 -0
  101. package/js/src/bitrue.d.ts +1 -1
  102. package/js/src/bitso.d.ts +1 -1
  103. package/js/src/bitso.js +3 -0
  104. package/js/src/bitstamp.d.ts +1 -1
  105. package/js/src/bitstamp.js +3 -0
  106. package/js/src/bitteam.js +4 -0
  107. package/js/src/bitvavo.d.ts +1 -1
  108. package/js/src/bitvavo.js +3 -0
  109. package/js/src/bl3p.js +3 -0
  110. package/js/src/blockchaincom.d.ts +1 -1
  111. package/js/src/btcalpha.js +3 -0
  112. package/js/src/btcbox.js +3 -0
  113. package/js/src/btcmarkets.d.ts +1 -1
  114. package/js/src/btcmarkets.js +3 -0
  115. package/js/src/btcturk.js +3 -0
  116. package/js/src/bybit.d.ts +8 -6
  117. package/js/src/bybit.js +209 -12
  118. package/js/src/cex.js +6 -0
  119. package/js/src/coinbase.d.ts +1 -1
  120. package/js/src/coinbase.js +100 -21
  121. package/js/src/coinbaseinternational.d.ts +1 -1
  122. package/js/src/coinbaseinternational.js +2 -0
  123. package/js/src/coinbasepro.d.ts +1 -1
  124. package/js/src/coinbasepro.js +6 -0
  125. package/js/src/coincheck.js +3 -0
  126. package/js/src/coinex.d.ts +8 -7
  127. package/js/src/coinex.js +180 -75
  128. package/js/src/coinlist.d.ts +1 -1
  129. package/js/src/coinlist.js +4 -0
  130. package/js/src/coinmate.d.ts +1 -1
  131. package/js/src/coinmate.js +3 -0
  132. package/js/src/coinone.js +3 -0
  133. package/js/src/coinsph.d.ts +1 -1
  134. package/js/src/coinsph.js +4 -0
  135. package/js/src/coinspot.js +3 -0
  136. package/js/src/cryptocom.d.ts +3 -2
  137. package/js/src/cryptocom.js +34 -0
  138. package/js/src/delta.d.ts +2 -2
  139. package/js/src/deribit.d.ts +1 -1
  140. package/js/src/digifinex.d.ts +3 -3
  141. package/js/src/exmo.d.ts +3 -3
  142. package/js/src/exmo.js +5 -0
  143. package/js/src/gate.d.ts +8 -7
  144. package/js/src/gate.js +124 -22
  145. package/js/src/gemini.d.ts +1 -1
  146. package/js/src/hitbtc.d.ts +3 -3
  147. package/js/src/hitbtc.js +4 -3
  148. package/js/src/hollaex.d.ts +1 -1
  149. package/js/src/htx.d.ts +2 -1
  150. package/js/src/htx.js +30 -0
  151. package/js/src/huobijp.d.ts +1 -1
  152. package/js/src/hyperliquid.d.ts +3 -2
  153. package/js/src/hyperliquid.js +40 -0
  154. package/js/src/idex.d.ts +1 -1
  155. package/js/src/idex.js +3 -0
  156. package/js/src/independentreserve.js +3 -0
  157. package/js/src/indodax.d.ts +1 -1
  158. package/js/src/indodax.js +3 -0
  159. package/js/src/kraken.d.ts +2 -1
  160. package/js/src/kraken.js +30 -0
  161. package/js/src/krakenfutures.d.ts +1 -0
  162. package/js/src/krakenfutures.js +28 -0
  163. package/js/src/kucoin.d.ts +1 -1
  164. package/js/src/kucoin.js +2 -0
  165. package/js/src/kucoinfutures.d.ts +1 -1
  166. package/js/src/kucoinfutures.js +4 -2
  167. package/js/src/kuna.d.ts +1 -1
  168. package/js/src/latoken.js +6 -0
  169. package/js/src/lbank.d.ts +1 -1
  170. package/js/src/luno.js +3 -0
  171. package/js/src/lykke.d.ts +1 -1
  172. package/js/src/lykke.js +5 -0
  173. package/js/src/mercado.d.ts +1 -1
  174. package/js/src/mercado.js +3 -0
  175. package/js/src/mexc.d.ts +4 -3
  176. package/js/src/mexc.js +111 -0
  177. package/js/src/ndax.d.ts +1 -1
  178. package/js/src/ndax.js +4 -0
  179. package/js/src/novadax.d.ts +1 -1
  180. package/js/src/novadax.js +4 -0
  181. package/js/src/okcoin.d.ts +1 -1
  182. package/js/src/okx.d.ts +11 -8
  183. package/js/src/okx.js +196 -0
  184. package/js/src/onetrading.d.ts +1 -1
  185. package/js/src/onetrading.js +3 -0
  186. package/js/src/p2b.js +3 -0
  187. package/js/src/phemex.d.ts +1 -1
  188. package/js/src/poloniex.d.ts +1 -1
  189. package/js/src/pro/bitget.d.ts +1 -1
  190. package/js/src/pro/bitget.js +1 -1
  191. package/js/src/pro/bybit.js +1 -1
  192. package/js/src/pro/coinbase.d.ts +2 -2
  193. package/js/src/pro/coinbase.js +30 -29
  194. package/js/src/probit.d.ts +1 -1
  195. package/js/src/probit.js +3 -0
  196. package/js/src/timex.js +3 -0
  197. package/js/src/tokocrypto.d.ts +1 -1
  198. package/js/src/tradeogre.js +3 -0
  199. package/js/src/upbit.d.ts +1 -1
  200. package/js/src/wavesexchange.d.ts +1 -1
  201. package/js/src/wavesexchange.js +3 -0
  202. package/js/src/wazirx.js +3 -0
  203. package/js/src/whitebit.d.ts +2 -1
  204. package/js/src/whitebit.js +42 -0
  205. package/js/src/woo.d.ts +3 -2
  206. package/js/src/woo.js +31 -0
  207. package/js/src/yobit.d.ts +1 -1
  208. package/js/src/yobit.js +3 -0
  209. package/js/src/zaif.d.ts +1 -1
  210. package/js/src/zonda.d.ts +1 -1
  211. package/package.json +1 -1
package/js/src/bitget.js CHANGED
@@ -109,8 +109,10 @@ export default class bitget extends Exchange {
109
109
  'fetchOrders': false,
110
110
  'fetchOrderTrades': false,
111
111
  'fetchPosition': true,
112
+ 'fetchPositionHistory': 'emulated',
112
113
  'fetchPositionMode': false,
113
114
  'fetchPositions': true,
115
+ 'fetchPositionsHistory': true,
114
116
  'fetchPositionsRisk': false,
115
117
  'fetchPremiumIndexOHLCV': false,
116
118
  'fetchStatus': false,
@@ -6551,7 +6553,7 @@ export default class bitget extends Exchange {
6551
6553
  // "cTime": "1700807507275"
6552
6554
  // }
6553
6555
  //
6554
- // fetchPositions: privateMixGetV2MixPositionHistoryPosition
6556
+ // fetchPositionsHistory: privateMixGetV2MixPositionHistoryPosition
6555
6557
  //
6556
6558
  // {
6557
6559
  // "symbol": "BTCUSDT",
@@ -8450,6 +8452,77 @@ export default class bitget extends Exchange {
8450
8452
  'marginMode': marginType,
8451
8453
  };
8452
8454
  }
8455
+ async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
8456
+ /**
8457
+ * @method
8458
+ * @name bitget#fetchPositionsHistory
8459
+ * @description fetches historical positions
8460
+ * @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
8461
+ * @param {string} [symbol] unified contract symbols
8462
+ * @param {int} [since] timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
8463
+ * @param {int} [limit] the maximum amount of records to fetch, default=20, max=100
8464
+ * @param {object} params extra parameters specific to the exchange api endpoint
8465
+ * @param {int} [params.until] timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
8466
+ *
8467
+ * EXCHANGE SPECIFIC PARAMETERS
8468
+ * @param {string} [params.productType] USDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
8469
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
8470
+ */
8471
+ await this.loadMarkets();
8472
+ const until = this.safeInteger(params, 'until');
8473
+ params = this.omit(params, 'until');
8474
+ const request = {};
8475
+ if (symbols !== undefined) {
8476
+ const symbolsLength = symbols.length;
8477
+ if (symbolsLength > 0) {
8478
+ const market = this.market(symbols[0]);
8479
+ request['symbol'] = market['id'];
8480
+ }
8481
+ }
8482
+ if (since !== undefined) {
8483
+ request['startTime'] = since;
8484
+ }
8485
+ if (limit !== undefined) {
8486
+ request['limit'] = limit;
8487
+ }
8488
+ if (until !== undefined) {
8489
+ request['endTime'] = until;
8490
+ }
8491
+ const response = await this.privateMixGetV2MixPositionHistoryPosition(this.extend(request, params));
8492
+ //
8493
+ // {
8494
+ // code: '00000',
8495
+ // msg: 'success',
8496
+ // requestTime: '1712794148791',
8497
+ // data: {
8498
+ // list: [
8499
+ // {
8500
+ // symbol: 'XRPUSDT',
8501
+ // marginCoin: 'USDT',
8502
+ // holdSide: 'long',
8503
+ // openAvgPrice: '0.64967',
8504
+ // closeAvgPrice: '0.58799',
8505
+ // marginMode: 'isolated',
8506
+ // openTotalPos: '10',
8507
+ // closeTotalPos: '10',
8508
+ // pnl: '-0.62976205',
8509
+ // netProfit: '-0.65356802',
8510
+ // totalFunding: '-0.01638',
8511
+ // openFee: '-0.00389802',
8512
+ // closeFee: '-0.00352794',
8513
+ // ctime: '1709590322199',
8514
+ // utime: '1709667583395'
8515
+ // },
8516
+ // ...
8517
+ // ]
8518
+ // }
8519
+ // }
8520
+ //
8521
+ const data = this.safeDict(response, 'data');
8522
+ const responseList = this.safeList(data, 'list');
8523
+ const positions = this.parsePositions(responseList, symbols, params);
8524
+ return this.filterBySinceLimit(positions, since, limit);
8525
+ }
8453
8526
  async fetchConvertQuote(fromCode, toCode, amount = undefined, params = {}) {
8454
8527
  /**
8455
8528
  * @method
@@ -26,7 +26,7 @@ export default class bithumb extends Exchange {
26
26
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
27
27
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
28
28
  cancelUnifiedOrder(order: any, params?: {}): Promise<any>;
29
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
29
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
30
30
  parseTransaction(transaction: any, currency?: Currency): Transaction;
31
31
  fixCommaNumber(numberStr: any): any;
32
32
  nonce(): number;
package/js/src/bithumb.js CHANGED
@@ -58,7 +58,11 @@ export default class bithumb extends Exchange {
58
58
  'fetchOrder': true,
59
59
  'fetchOrderBook': true,
60
60
  'fetchPosition': false,
61
+ 'fetchPositionHistory': false,
62
+ 'fetchPositionMode': false,
61
63
  'fetchPositions': false,
64
+ 'fetchPositionsForSymbol': false,
65
+ 'fetchPositionsHistory': false,
62
66
  'fetchPositionsRisk': false,
63
67
  'fetchPremiumIndexOHLCV': false,
64
68
  'fetchTicker': true,
@@ -80,7 +80,7 @@ export default class bitmart extends Exchange {
80
80
  network: any;
81
81
  };
82
82
  safeNetworkCode(networkId: any, currency?: any): string;
83
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<any>;
83
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<any>;
84
84
  fetchTransactionsByType(type: any, code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
85
85
  fetchDeposit(id: string, code?: Str, params?: {}): Promise<Transaction>;
86
86
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
@@ -62,11 +62,12 @@ export default class bitmex extends Exchange {
62
62
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
63
63
  cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
64
64
  cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
65
+ cancelAllOrdersAfter(timeout: Int, params?: {}): Promise<any>;
65
66
  fetchLeverages(symbols?: string[], params?: {}): Promise<Leverages>;
66
67
  parseLeverage(leverage: any, market?: any): Leverage;
67
68
  fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
68
69
  parsePosition(position: any, market?: Market): import("./base/types.js").Position;
69
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
70
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
70
71
  fetchFundingRates(symbols?: Strings, params?: {}): Promise<any>;
71
72
  parseFundingRate(contract: any, market?: Market): {
72
73
  info: any;
package/js/src/bitmex.js CHANGED
@@ -39,6 +39,7 @@ export default class bitmex extends Exchange {
39
39
  'option': false,
40
40
  'addMargin': undefined,
41
41
  'cancelAllOrders': true,
42
+ 'cancelAllOrdersAfter': true,
42
43
  'cancelOrder': true,
43
44
  'cancelOrders': true,
44
45
  'closeAllPositions': false,
@@ -78,7 +79,9 @@ export default class bitmex extends Exchange {
78
79
  'fetchOrderBook': true,
79
80
  'fetchOrders': true,
80
81
  'fetchPosition': false,
82
+ 'fetchPositionHistory': false,
81
83
  'fetchPositions': true,
84
+ 'fetchPositionsHistory': false,
82
85
  'fetchPositionsRisk': false,
83
86
  'fetchPremiumIndexOHLCV': false,
84
87
  'fetchTicker': true,
@@ -2119,6 +2122,29 @@ export default class bitmex extends Exchange {
2119
2122
  //
2120
2123
  return this.parseOrders(response, market);
2121
2124
  }
2125
+ async cancelAllOrdersAfter(timeout, params = {}) {
2126
+ /**
2127
+ * @method
2128
+ * @name bitmex#cancelAllOrdersAfter
2129
+ * @description dead man's switch, cancel all orders after the given timeout
2130
+ * @see https://www.bitmex.com/api/explorer/#!/Order/Order_cancelAllAfter
2131
+ * @param {number} timeout time in milliseconds, 0 represents cancel the timer
2132
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2133
+ * @returns {object} the api result
2134
+ */
2135
+ await this.loadMarkets();
2136
+ const request = {
2137
+ 'timeout': (timeout > 0) ? this.parseToInt(timeout / 1000) : 0,
2138
+ };
2139
+ const response = await this.privatePostOrderCancelAllAfter(this.extend(request, params));
2140
+ //
2141
+ // {
2142
+ // now: '2024-04-09T09:01:56.560Z',
2143
+ // cancelTime: '2024-04-09T09:01:56.660Z'
2144
+ // }
2145
+ //
2146
+ return response;
2147
+ }
2122
2148
  async fetchLeverages(symbols = undefined, params = {}) {
2123
2149
  /**
2124
2150
  * @method
@@ -37,7 +37,7 @@ export default class bitopro extends Exchange {
37
37
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
38
38
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
39
39
  fetchWithdrawal(id: string, code?: Str, params?: {}): Promise<Transaction>;
40
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
40
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
41
41
  parseDepositWithdrawFee(fee: any, currency?: Currency): {
42
42
  info: any;
43
43
  withdraw: {
package/js/src/bitopro.js CHANGED
@@ -68,8 +68,13 @@ export default class bitopro extends Exchange {
68
68
  'fetchOrderBook': true,
69
69
  'fetchOrders': false,
70
70
  'fetchOrderTrades': false,
71
+ 'fetchPosition': false,
72
+ 'fetchPositionHistory': false,
71
73
  'fetchPositionMode': false,
72
74
  'fetchPositions': false,
75
+ 'fetchPositionsForSymbol': false,
76
+ 'fetchPositionsHistory': false,
77
+ 'fetchPositionsRisk': false,
73
78
  'fetchPremiumIndexOHLCV': false,
74
79
  'fetchTicker': true,
75
80
  'fetchTickers': true,
@@ -45,7 +45,7 @@ export default class bitrue extends Exchange {
45
45
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
46
46
  parseTransactionStatusByType(status: any, type?: any): string;
47
47
  parseTransaction(transaction: any, currency?: Currency): Transaction;
48
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
48
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
49
49
  parseDepositWithdrawFee(fee: any, currency?: Currency): {
50
50
  info: any;
51
51
  withdraw: {
package/js/src/bitso.d.ts CHANGED
@@ -58,7 +58,7 @@ export default class bitso extends Exchange {
58
58
  fetchTransactionFees(codes?: string[], params?: {}): Promise<{}>;
59
59
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<{}>;
60
60
  parseDepositWithdrawFees(response: any, codes?: any, currencyIdKey?: any): {};
61
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
61
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
62
62
  safeNetwork(networkId: any): string;
63
63
  parseTransaction(transaction: any, currency?: Currency): Transaction;
64
64
  parseTransactionStatus(status: any): string;
package/js/src/bitso.js CHANGED
@@ -72,8 +72,11 @@ export default class bitso extends Exchange {
72
72
  'fetchOrderBook': true,
73
73
  'fetchOrderTrades': true,
74
74
  'fetchPosition': false,
75
+ 'fetchPositionHistory': false,
75
76
  'fetchPositionMode': false,
76
77
  'fetchPositions': false,
78
+ 'fetchPositionsForSymbol': false,
79
+ 'fetchPositionsHistory': false,
77
80
  'fetchPositionsRisk': false,
78
81
  'fetchPremiumIndexOHLCV': false,
79
82
  'fetchTicker': true,
@@ -119,7 +119,7 @@ export default class bitstamp extends Exchange {
119
119
  network: any;
120
120
  info: any;
121
121
  }>;
122
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
122
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
123
123
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
124
124
  parseTransfer(transfer: any, currency?: any): {
125
125
  info: any;
@@ -72,8 +72,11 @@ export default class bitstamp extends Exchange {
72
72
  'fetchOrder': true,
73
73
  'fetchOrderBook': true,
74
74
  'fetchPosition': false,
75
+ 'fetchPositionHistory': false,
75
76
  'fetchPositionMode': false,
76
77
  'fetchPositions': false,
78
+ 'fetchPositionsForSymbol': false,
79
+ 'fetchPositionsHistory': false,
77
80
  'fetchPositionsRisk': false,
78
81
  'fetchPremiumIndexOHLCV': false,
79
82
  'fetchTicker': true,
package/js/src/bitteam.js CHANGED
@@ -90,7 +90,11 @@ export default class bitteam extends Exchange {
90
90
  'fetchOrders': true,
91
91
  'fetchOrderTrades': false,
92
92
  'fetchPosition': false,
93
+ 'fetchPositionHistory': false,
94
+ 'fetchPositionMode': false,
93
95
  'fetchPositions': false,
96
+ 'fetchPositionsForSymbol': false,
97
+ 'fetchPositionsHistory': false,
94
98
  'fetchPositionsRisk': false,
95
99
  'fetchPremiumIndexOHLCV': false,
96
100
  'fetchStatus': false,
@@ -50,7 +50,7 @@ export default class bitvavo extends Exchange {
50
50
  fetchMyTradesRequest(symbol?: Str, since?: Int, limit?: Int, params?: {}): any;
51
51
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
52
52
  withdrawRequest(code: Str, amount: any, address: any, tag?: any, params?: {}): any;
53
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
53
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
54
54
  fetchWithdrawalsRequest(code?: Str, since?: Int, limit?: Int, params?: {}): any;
55
55
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
56
56
  fetchDepositsRequest(code?: Str, since?: Int, limit?: Int, params?: {}): any;
package/js/src/bitvavo.js CHANGED
@@ -73,8 +73,11 @@ export default class bitvavo extends Exchange {
73
73
  'fetchOrderBook': true,
74
74
  'fetchOrders': true,
75
75
  'fetchPosition': false,
76
+ 'fetchPositionHistory': false,
76
77
  'fetchPositionMode': false,
77
78
  'fetchPositions': false,
79
+ 'fetchPositionsForSymbol': false,
80
+ 'fetchPositionsHistory': false,
78
81
  'fetchPositionsRisk': false,
79
82
  'fetchPremiumIndexOHLCV': false,
80
83
  'fetchTicker': true,
package/js/src/bl3p.js CHANGED
@@ -62,8 +62,11 @@ export default class bl3p extends Exchange {
62
62
  'fetchOpenInterestHistory': false,
63
63
  'fetchOrderBook': true,
64
64
  'fetchPosition': false,
65
+ 'fetchPositionHistory': false,
65
66
  'fetchPositionMode': false,
66
67
  'fetchPositions': false,
68
+ 'fetchPositionsForSymbol': false,
69
+ 'fetchPositionsHistory': false,
67
70
  'fetchPositionsRisk': false,
68
71
  'fetchPremiumIndexOHLCV': false,
69
72
  'fetchTicker': true,
@@ -36,7 +36,7 @@ export default class blockchaincom extends Exchange {
36
36
  }>;
37
37
  parseTransactionState(state: any): string;
38
38
  parseTransaction(transaction: any, currency?: Currency): Transaction;
39
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
39
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
40
40
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
41
41
  fetchWithdrawal(id: string, code?: Str, params?: {}): Promise<Transaction>;
42
42
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
@@ -70,8 +70,11 @@ export default class btcalpha extends Exchange {
70
70
  'fetchOrderBook': true,
71
71
  'fetchOrders': true,
72
72
  'fetchPosition': false,
73
+ 'fetchPositionHistory': false,
73
74
  'fetchPositionMode': false,
74
75
  'fetchPositions': false,
76
+ 'fetchPositionsForSymbol': false,
77
+ 'fetchPositionsHistory': false,
75
78
  'fetchPositionsRisk': false,
76
79
  'fetchPremiumIndexOHLCV': false,
77
80
  'fetchTicker': true,
package/js/src/btcbox.js CHANGED
@@ -58,8 +58,11 @@ export default class btcbox extends Exchange {
58
58
  'fetchOrderBook': true,
59
59
  'fetchOrders': true,
60
60
  'fetchPosition': false,
61
+ 'fetchPositionHistory': false,
61
62
  'fetchPositionMode': false,
62
63
  'fetchPositions': false,
64
+ 'fetchPositionsForSymbol': false,
65
+ 'fetchPositionsHistory': false,
63
66
  'fetchPositionsRisk': false,
64
67
  'fetchPremiumIndexOHLCV': false,
65
68
  'fetchTicker': true,
@@ -42,7 +42,7 @@ export default class btcmarkets extends Exchange {
42
42
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
43
43
  fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
44
44
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
45
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
45
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
46
46
  nonce(): number;
47
47
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
48
48
  url: string;
@@ -68,8 +68,11 @@ export default class btcmarkets extends Exchange {
68
68
  'fetchOrderBook': true,
69
69
  'fetchOrders': true,
70
70
  'fetchPosition': false,
71
+ 'fetchPositionHistory': false,
71
72
  'fetchPositionMode': false,
72
73
  'fetchPositions': false,
74
+ 'fetchPositionsForSymbol': false,
75
+ 'fetchPositionsHistory': false,
73
76
  'fetchPositionsRisk': false,
74
77
  'fetchPremiumIndexOHLCV': false,
75
78
  'fetchTicker': true,
package/js/src/btcturk.js CHANGED
@@ -63,8 +63,11 @@ export default class btcturk extends Exchange {
63
63
  'fetchOrderBook': true,
64
64
  'fetchOrders': true,
65
65
  'fetchPosition': false,
66
+ 'fetchPositionHistory': false,
66
67
  'fetchPositionMode': false,
67
68
  'fetchPositions': false,
69
+ 'fetchPositionsForSymbol': false,
70
+ 'fetchPositionsHistory': false,
68
71
  'fetchPositionsRisk': false,
69
72
  'fetchPremiumIndexOHLCV': false,
70
73
  'fetchTicker': true,
package/js/src/bybit.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bybit.js';
2
- import type { Int, OrderSide, OrderType, Trade, Order, OHLCV, FundingRateHistory, OpenInterest, OrderRequest, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Greeks, Strings, Market, Currency, MarketInterface, TransferEntry, Liquidation, Leverage, Num, FundingHistory, Option, OptionChain, TradingFeeInterface, Currencies, TradingFees } from './base/types.js';
2
+ import type { Int, OrderSide, OrderType, Trade, Order, OHLCV, FundingRateHistory, OpenInterest, OrderRequest, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Greeks, Strings, Market, Currency, MarketInterface, TransferEntry, Liquidation, Leverage, Num, FundingHistory, Option, OptionChain, TradingFeeInterface, Currencies, TradingFees, CancellationRequest, Position } from './base/types.js';
3
3
  /**
4
4
  * @class bybit
5
5
  * @augments Exchange
@@ -66,6 +66,7 @@ export default class bybit extends Exchange {
66
66
  cancelUsdcOrder(id: any, symbol?: Str, params?: {}): Promise<Order>;
67
67
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
68
68
  cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
69
+ cancelOrdersForSymbols(orders: CancellationRequest[], params?: {}): Promise<Order[]>;
69
70
  cancelAllUsdcOrders(symbol?: Str, params?: {}): Promise<any>;
70
71
  cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
71
72
  fetchUsdcOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
@@ -121,11 +122,11 @@ export default class bybit extends Exchange {
121
122
  info: any;
122
123
  };
123
124
  parseLedgerEntryType(type: any): string;
124
- withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
125
- fetchPosition(symbol: string, params?: {}): Promise<import("./base/types.js").Position>;
126
- fetchUsdcPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
127
- fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
128
- parsePosition(position: any, market?: Market): import("./base/types.js").Position;
125
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
126
+ fetchPosition(symbol: string, params?: {}): Promise<Position>;
127
+ fetchUsdcPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
128
+ fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
129
+ parsePosition(position: any, market?: Market): Position;
129
130
  fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
130
131
  parseLeverage(leverage: any, market?: any): Leverage;
131
132
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
@@ -277,6 +278,7 @@ export default class bybit extends Exchange {
277
278
  baseVolume: number;
278
279
  quoteVolume: any;
279
280
  };
281
+ fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
280
282
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
281
283
  url: string;
282
284
  method: string;