ccxt 4.3.6 → 4.3.8

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 (196) 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 +47 -3
  6. package/dist/cjs/src/binance.js +3 -1
  7. package/dist/cjs/src/bingx.js +3 -1
  8. package/dist/cjs/src/bitbank.js +3 -0
  9. package/dist/cjs/src/bitget.js +75 -2
  10. package/dist/cjs/src/bithumb.js +4 -0
  11. package/dist/cjs/src/bitmex.js +2 -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 +123 -12
  23. package/dist/cjs/src/cex.js +6 -0
  24. package/dist/cjs/src/coinbase.js +95 -17
  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 +257 -190
  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 +2 -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 +2 -0
  39. package/dist/cjs/src/idex.js +3 -0
  40. package/dist/cjs/src/independentreserve.js +3 -0
  41. package/dist/cjs/src/indodax.js +3 -0
  42. package/dist/cjs/src/kucoin.js +2 -0
  43. package/dist/cjs/src/kucoinfutures.js +2 -0
  44. package/dist/cjs/src/latoken.js +6 -0
  45. package/dist/cjs/src/luno.js +3 -0
  46. package/dist/cjs/src/lykke.js +5 -0
  47. package/dist/cjs/src/mercado.js +3 -0
  48. package/dist/cjs/src/mexc.js +111 -0
  49. package/dist/cjs/src/ndax.js +4 -0
  50. package/dist/cjs/src/novadax.js +4 -0
  51. package/dist/cjs/src/okx.js +84 -1
  52. package/dist/cjs/src/onetrading.js +3 -0
  53. package/dist/cjs/src/p2b.js +3 -0
  54. package/dist/cjs/src/pro/bybit.js +1 -1
  55. package/dist/cjs/src/pro/coinbase.js +30 -29
  56. package/dist/cjs/src/probit.js +3 -0
  57. package/dist/cjs/src/timex.js +3 -0
  58. package/dist/cjs/src/tradeogre.js +3 -0
  59. package/dist/cjs/src/wavesexchange.js +3 -0
  60. package/dist/cjs/src/wazirx.js +3 -0
  61. package/dist/cjs/src/woo.js +3 -1
  62. package/dist/cjs/src/yobit.js +3 -0
  63. package/js/ccxt.d.ts +1 -1
  64. package/js/ccxt.js +1 -1
  65. package/js/src/abstract/coinbase.d.ts +5 -0
  66. package/js/src/ace.js +5 -0
  67. package/js/src/alpaca.js +6 -0
  68. package/js/src/ascendex.d.ts +2 -2
  69. package/js/src/base/Exchange.d.ts +23 -19
  70. package/js/src/base/Exchange.js +47 -3
  71. package/js/src/base/functions/generic.d.ts +20 -19
  72. package/js/src/bigone.d.ts +1 -1
  73. package/js/src/binance.d.ts +3 -3
  74. package/js/src/binance.js +3 -1
  75. package/js/src/bingx.d.ts +3 -3
  76. package/js/src/bingx.js +3 -1
  77. package/js/src/bitbank.d.ts +1 -1
  78. package/js/src/bitbank.js +3 -0
  79. package/js/src/bitfinex.d.ts +1 -1
  80. package/js/src/bitfinex2.d.ts +1 -1
  81. package/js/src/bitflyer.d.ts +1 -1
  82. package/js/src/bitget.d.ts +4 -3
  83. package/js/src/bitget.js +75 -2
  84. package/js/src/bithumb.d.ts +1 -1
  85. package/js/src/bithumb.js +4 -0
  86. package/js/src/bitmart.d.ts +1 -1
  87. package/js/src/bitmex.d.ts +1 -1
  88. package/js/src/bitmex.js +2 -0
  89. package/js/src/bitopro.d.ts +1 -1
  90. package/js/src/bitopro.js +5 -0
  91. package/js/src/bitrue.d.ts +1 -1
  92. package/js/src/bitso.d.ts +1 -1
  93. package/js/src/bitso.js +3 -0
  94. package/js/src/bitstamp.d.ts +1 -1
  95. package/js/src/bitstamp.js +3 -0
  96. package/js/src/bitteam.js +4 -0
  97. package/js/src/bitvavo.d.ts +1 -1
  98. package/js/src/bitvavo.js +3 -0
  99. package/js/src/bl3p.js +3 -0
  100. package/js/src/blockchaincom.d.ts +1 -1
  101. package/js/src/btcalpha.js +3 -0
  102. package/js/src/btcbox.js +3 -0
  103. package/js/src/btcmarkets.d.ts +1 -1
  104. package/js/src/btcmarkets.js +3 -0
  105. package/js/src/btcturk.js +3 -0
  106. package/js/src/bybit.d.ts +8 -7
  107. package/js/src/bybit.js +123 -12
  108. package/js/src/cex.js +6 -0
  109. package/js/src/coinbase.d.ts +2 -2
  110. package/js/src/coinbase.js +95 -17
  111. package/js/src/coinbaseinternational.d.ts +2 -2
  112. package/js/src/coinbaseinternational.js +2 -0
  113. package/js/src/coinbasepro.d.ts +1 -1
  114. package/js/src/coinbasepro.js +6 -0
  115. package/js/src/coincheck.js +3 -0
  116. package/js/src/coinex.d.ts +8 -7
  117. package/js/src/coinex.js +257 -190
  118. package/js/src/coinlist.d.ts +1 -1
  119. package/js/src/coinlist.js +4 -0
  120. package/js/src/coinmate.d.ts +1 -1
  121. package/js/src/coinmate.js +3 -0
  122. package/js/src/coinone.js +3 -0
  123. package/js/src/coinsph.d.ts +1 -1
  124. package/js/src/coinsph.js +4 -0
  125. package/js/src/coinspot.js +3 -0
  126. package/js/src/cryptocom.d.ts +1 -1
  127. package/js/src/cryptocom.js +2 -0
  128. package/js/src/delta.d.ts +2 -2
  129. package/js/src/deribit.d.ts +1 -1
  130. package/js/src/digifinex.d.ts +3 -3
  131. package/js/src/exmo.d.ts +3 -3
  132. package/js/src/exmo.js +5 -0
  133. package/js/src/gate.d.ts +8 -7
  134. package/js/src/gate.js +124 -22
  135. package/js/src/gemini.d.ts +2 -2
  136. package/js/src/hitbtc.d.ts +3 -3
  137. package/js/src/hitbtc.js +4 -3
  138. package/js/src/hollaex.d.ts +2 -2
  139. package/js/src/htx.d.ts +3 -3
  140. package/js/src/htx.js +2 -0
  141. package/js/src/huobijp.d.ts +1 -1
  142. package/js/src/hyperliquid.d.ts +2 -2
  143. package/js/src/idex.d.ts +2 -2
  144. package/js/src/idex.js +3 -0
  145. package/js/src/independentreserve.js +3 -0
  146. package/js/src/indodax.d.ts +1 -1
  147. package/js/src/indodax.js +3 -0
  148. package/js/src/kraken.d.ts +1 -1
  149. package/js/src/kucoin.d.ts +2 -2
  150. package/js/src/kucoin.js +2 -0
  151. package/js/src/kucoinfutures.d.ts +1 -1
  152. package/js/src/kucoinfutures.js +2 -0
  153. package/js/src/kuna.d.ts +1 -1
  154. package/js/src/latoken.js +6 -0
  155. package/js/src/lbank.d.ts +1 -1
  156. package/js/src/luno.js +3 -0
  157. package/js/src/lykke.d.ts +1 -1
  158. package/js/src/lykke.js +5 -0
  159. package/js/src/mercado.d.ts +1 -1
  160. package/js/src/mercado.js +3 -0
  161. package/js/src/mexc.d.ts +5 -4
  162. package/js/src/mexc.js +111 -0
  163. package/js/src/ndax.d.ts +1 -1
  164. package/js/src/ndax.js +4 -0
  165. package/js/src/novadax.d.ts +1 -1
  166. package/js/src/novadax.js +4 -0
  167. package/js/src/okcoin.d.ts +2 -2
  168. package/js/src/okx.d.ts +10 -9
  169. package/js/src/okx.js +84 -1
  170. package/js/src/onetrading.d.ts +1 -1
  171. package/js/src/onetrading.js +3 -0
  172. package/js/src/p2b.js +3 -0
  173. package/js/src/paymium.d.ts +1 -1
  174. package/js/src/phemex.d.ts +1 -1
  175. package/js/src/poloniex.d.ts +1 -1
  176. package/js/src/pro/bybit.js +1 -1
  177. package/js/src/pro/coinbase.d.ts +2 -2
  178. package/js/src/pro/coinbase.js +30 -29
  179. package/js/src/pro/luno.d.ts +2 -2
  180. package/js/src/probit.d.ts +2 -2
  181. package/js/src/probit.js +3 -0
  182. package/js/src/timex.js +3 -0
  183. package/js/src/tokocrypto.d.ts +1 -1
  184. package/js/src/tradeogre.js +3 -0
  185. package/js/src/upbit.d.ts +2 -2
  186. package/js/src/wavesexchange.d.ts +1 -1
  187. package/js/src/wavesexchange.js +3 -0
  188. package/js/src/wazirx.js +3 -0
  189. package/js/src/whitebit.d.ts +2 -2
  190. package/js/src/woo.d.ts +1 -1
  191. package/js/src/woo.js +3 -1
  192. package/js/src/yobit.d.ts +1 -1
  193. package/js/src/yobit.js +3 -0
  194. package/js/src/zaif.d.ts +1 -1
  195. package/js/src/zonda.d.ts +2 -2
  196. package/package.json +1 -1
package/README.md CHANGED
@@ -213,13 +213,13 @@ console.log(version, Object.keys(exchanges));
213
213
 
214
214
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
215
215
 
216
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.6/dist/ccxt.browser.js
217
- * unpkg: https://unpkg.com/ccxt@4.3.6/dist/ccxt.browser.js
216
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.8/dist/ccxt.browser.js
217
+ * unpkg: https://unpkg.com/ccxt@4.3.8/dist/ccxt.browser.js
218
218
 
219
219
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
220
220
 
221
221
  ```HTML
222
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.6/dist/ccxt.browser.js"></script>
222
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.8/dist/ccxt.browser.js"></script>
223
223
  ```
224
224
 
225
225
  Creates a global `ccxt` object:
package/dist/cjs/ccxt.js CHANGED
@@ -182,7 +182,7 @@ var woo$1 = require('./src/pro/woo.js');
182
182
 
183
183
  //-----------------------------------------------------------------------------
184
184
  // this is updated by vss.js when building
185
- const version = '4.3.6';
185
+ const version = '4.3.8';
186
186
  Exchange["default"].ccxtVersion = version;
187
187
  const exchanges = {
188
188
  'ace': ace,
@@ -62,8 +62,13 @@ class ace extends ace$1 {
62
62
  'fetchOrderBook': true,
63
63
  'fetchOrders': false,
64
64
  'fetchOrderTrades': true,
65
+ 'fetchPosition': false,
66
+ 'fetchPositionHistory': false,
65
67
  'fetchPositionMode': false,
66
68
  'fetchPositions': false,
69
+ 'fetchPositionsForSymbol': false,
70
+ 'fetchPositionsHistory': false,
71
+ 'fetchPositionsRisk': false,
67
72
  'fetchPremiumIndexOHLCV': false,
68
73
  'fetchTicker': true,
69
74
  'fetchTickers': true,
@@ -71,7 +71,13 @@ class alpaca extends alpaca$1 {
71
71
  'fetchOrder': true,
72
72
  'fetchOrderBook': true,
73
73
  'fetchOrders': true,
74
+ 'fetchPosition': false,
75
+ 'fetchPositionHistory': false,
76
+ 'fetchPositionMode': false,
74
77
  'fetchPositions': false,
78
+ 'fetchPositionsForSymbol': false,
79
+ 'fetchPositionsHistory': false,
80
+ 'fetchPositionsRisk': false,
75
81
  'fetchStatus': false,
76
82
  'fetchTicker': false,
77
83
  'fetchTickers': false,
@@ -505,6 +505,8 @@ class Exchange {
505
505
  'fetchOrderWs': undefined,
506
506
  'fetchPermissions': undefined,
507
507
  'fetchPosition': undefined,
508
+ 'fetchPositionHistory': undefined,
509
+ 'fetchPositionsHistory': undefined,
508
510
  'fetchPositionWs': undefined,
509
511
  'fetchPositionMode': undefined,
510
512
  'fetchPositions': undefined,
@@ -6102,7 +6104,7 @@ class Exchange {
6102
6104
  parseLeverage(leverage, market = undefined) {
6103
6105
  throw new errors.NotSupported(this.id + ' parseLeverage () is not supported yet');
6104
6106
  }
6105
- parseConversions(conversions, fromCurrencyKey = undefined, toCurrencyKey = undefined, since = undefined, limit = undefined, params = {}) {
6107
+ parseConversions(conversions, code = undefined, fromCurrencyKey = undefined, toCurrencyKey = undefined, since = undefined, limit = undefined, params = {}) {
6106
6108
  conversions = this.toArray(conversions);
6107
6109
  const result = [];
6108
6110
  let fromCurrency = undefined;
@@ -6121,8 +6123,18 @@ class Exchange {
6121
6123
  result.push(conversion);
6122
6124
  }
6123
6125
  const sorted = this.sortBy(result, 'timestamp');
6124
- const code = (fromCurrency !== undefined) ? fromCurrency['code'] : undefined;
6125
- return this.filterByCurrencySinceLimit(sorted, code, since, limit);
6126
+ let currency = undefined;
6127
+ if (code !== undefined) {
6128
+ currency = this.currency(code);
6129
+ code = currency['code'];
6130
+ }
6131
+ if (code === undefined) {
6132
+ return this.filterBySinceLimit(sorted, since, limit);
6133
+ }
6134
+ const fromConversion = this.filterBy(sorted, 'fromCurrency', code);
6135
+ const toConversion = this.filterBy(sorted, 'toCurrency', code);
6136
+ const both = this.arrayConcat(fromConversion, toConversion);
6137
+ return this.filterBySinceLimit(both, since, limit);
6126
6138
  }
6127
6139
  parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
6128
6140
  throw new errors.NotSupported(this.id + ' parseConversion () is not supported yet');
@@ -6207,6 +6219,38 @@ class Exchange {
6207
6219
  const reconstructedDate = day + month + year;
6208
6220
  return reconstructedDate;
6209
6221
  }
6222
+ async fetchPositionHistory(symbol, since = undefined, limit = undefined, params = {}) {
6223
+ /**
6224
+ * @method
6225
+ * @name exchange#fetchPositionHistory
6226
+ * @description fetches the history of margin added or reduced from contract isolated positions
6227
+ * @param {string} [symbol] unified market symbol
6228
+ * @param {int} [since] timestamp in ms of the position
6229
+ * @param {int} [limit] the maximum amount of candles to fetch, default=1000
6230
+ * @param {object} params extra parameters specific to the exchange api endpoint
6231
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
6232
+ */
6233
+ if (this.has['fetchPositionsHistory']) {
6234
+ const positions = await this.fetchPositionsHistory([symbol], since, limit, params);
6235
+ return this.safeDict(positions, 0);
6236
+ }
6237
+ else {
6238
+ throw new errors.NotSupported(this.id + ' fetchPositionHistory () is not supported yet');
6239
+ }
6240
+ }
6241
+ async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
6242
+ /**
6243
+ * @method
6244
+ * @name exchange#fetchPositionsHistory
6245
+ * @description fetches the history of margin added or reduced from contract isolated positions
6246
+ * @param {string} [symbol] unified market symbol
6247
+ * @param {int} [since] timestamp in ms of the position
6248
+ * @param {int} [limit] the maximum amount of candles to fetch, default=1000
6249
+ * @param {object} params extra parameters specific to the exchange api endpoint
6250
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
6251
+ */
6252
+ throw new errors.NotSupported(this.id + ' fetchPositionsHistory () is not supported yet');
6253
+ }
6210
6254
  parseMarginModification(data, market = undefined) {
6211
6255
  throw new errors.NotSupported(this.id + ' parseMarginModification() is not supported yet');
6212
6256
  }
@@ -125,8 +125,10 @@ class binance extends binance$1 {
125
125
  'fetchOrders': true,
126
126
  'fetchOrderTrades': true,
127
127
  'fetchPosition': true,
128
+ 'fetchPositionHistory': false,
128
129
  'fetchPositionMode': true,
129
130
  'fetchPositions': true,
131
+ 'fetchPositionsHistory': false,
130
132
  'fetchPositionsRisk': true,
131
133
  'fetchPremiumIndexOHLCV': false,
132
134
  'fetchSettlementHistory': true,
@@ -12917,7 +12919,7 @@ class binance extends binance$1 {
12917
12919
  //
12918
12920
  }
12919
12921
  const rows = this.safeList(response, responseQuery, []);
12920
- return this.parseConversions(rows, fromCurrencyKey, toCurrencyKey, since, limit);
12922
+ return this.parseConversions(rows, code, fromCurrencyKey, toCurrencyKey, since, limit);
12921
12923
  }
12922
12924
  parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
12923
12925
  //
@@ -72,8 +72,10 @@ class bingx extends bingx$1 {
72
72
  'fetchOrder': true,
73
73
  'fetchOrderBook': true,
74
74
  'fetchOrders': true,
75
+ 'fetchPositionHistory': false,
75
76
  'fetchPositionMode': true,
76
77
  'fetchPositions': true,
78
+ 'fetchPositionsHistory': false,
77
79
  'fetchTicker': true,
78
80
  'fetchTickers': true,
79
81
  'fetchTime': true,
@@ -2461,7 +2463,7 @@ class bingx extends bingx$1 {
2461
2463
  return this.safeOrder({
2462
2464
  'info': info,
2463
2465
  'id': this.safeString2(order, 'orderId', 'i'),
2464
- 'clientOrderId': this.safeStringN(order, ['clientOrderID', 'origClientOrderId', 'c']),
2466
+ 'clientOrderId': this.safeStringN(order, ['clientOrderID', 'clientOrderId', 'origClientOrderId', 'c']),
2465
2467
  'symbol': this.safeSymbol(marketId, market, '-', marketType),
2466
2468
  'timestamp': timestamp,
2467
2469
  'datetime': this.iso8601(timestamp),
@@ -56,8 +56,11 @@ class bitbank extends bitbank$1 {
56
56
  'fetchOrder': true,
57
57
  'fetchOrderBook': true,
58
58
  'fetchPosition': false,
59
+ 'fetchPositionHistory': false,
59
60
  'fetchPositionMode': false,
60
61
  'fetchPositions': false,
62
+ 'fetchPositionsForSymbol': false,
63
+ 'fetchPositionsHistory': false,
61
64
  'fetchPositionsRisk': false,
62
65
  'fetchPremiumIndexOHLCV': false,
63
66
  'fetchTicker': true,
@@ -106,8 +106,10 @@ class bitget extends bitget$1 {
106
106
  'fetchOrders': false,
107
107
  'fetchOrderTrades': false,
108
108
  'fetchPosition': true,
109
+ 'fetchPositionHistory': 'emulated',
109
110
  'fetchPositionMode': false,
110
111
  'fetchPositions': true,
112
+ 'fetchPositionsHistory': true,
111
113
  'fetchPositionsRisk': false,
112
114
  'fetchPremiumIndexOHLCV': false,
113
115
  'fetchStatus': false,
@@ -6548,7 +6550,7 @@ class bitget extends bitget$1 {
6548
6550
  // "cTime": "1700807507275"
6549
6551
  // }
6550
6552
  //
6551
- // fetchPositions: privateMixGetV2MixPositionHistoryPosition
6553
+ // fetchPositionsHistory: privateMixGetV2MixPositionHistoryPosition
6552
6554
  //
6553
6555
  // {
6554
6556
  // "symbol": "BTCUSDT",
@@ -8447,6 +8449,77 @@ class bitget extends bitget$1 {
8447
8449
  'marginMode': marginType,
8448
8450
  };
8449
8451
  }
8452
+ async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
8453
+ /**
8454
+ * @method
8455
+ * @name bitget#fetchPositionsHistory
8456
+ * @description fetches historical positions
8457
+ * @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
8458
+ * @param {string} [symbol] unified contract symbols
8459
+ * @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
8460
+ * @param {int} [limit] the maximum amount of records to fetch, default=20, max=100
8461
+ * @param {object} params extra parameters specific to the exchange api endpoint
8462
+ * @param {int} [params.until] timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
8463
+ *
8464
+ * EXCHANGE SPECIFIC PARAMETERS
8465
+ * @param {string} [params.productType] USDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
8466
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
8467
+ */
8468
+ await this.loadMarkets();
8469
+ const until = this.safeInteger(params, 'until');
8470
+ params = this.omit(params, 'until');
8471
+ const request = {};
8472
+ if (symbols !== undefined) {
8473
+ const symbolsLength = symbols.length;
8474
+ if (symbolsLength > 0) {
8475
+ const market = this.market(symbols[0]);
8476
+ request['symbol'] = market['id'];
8477
+ }
8478
+ }
8479
+ if (since !== undefined) {
8480
+ request['startTime'] = since;
8481
+ }
8482
+ if (limit !== undefined) {
8483
+ request['limit'] = limit;
8484
+ }
8485
+ if (until !== undefined) {
8486
+ request['endTime'] = until;
8487
+ }
8488
+ const response = await this.privateMixGetV2MixPositionHistoryPosition(this.extend(request, params));
8489
+ //
8490
+ // {
8491
+ // code: '00000',
8492
+ // msg: 'success',
8493
+ // requestTime: '1712794148791',
8494
+ // data: {
8495
+ // list: [
8496
+ // {
8497
+ // symbol: 'XRPUSDT',
8498
+ // marginCoin: 'USDT',
8499
+ // holdSide: 'long',
8500
+ // openAvgPrice: '0.64967',
8501
+ // closeAvgPrice: '0.58799',
8502
+ // marginMode: 'isolated',
8503
+ // openTotalPos: '10',
8504
+ // closeTotalPos: '10',
8505
+ // pnl: '-0.62976205',
8506
+ // netProfit: '-0.65356802',
8507
+ // totalFunding: '-0.01638',
8508
+ // openFee: '-0.00389802',
8509
+ // closeFee: '-0.00352794',
8510
+ // ctime: '1709590322199',
8511
+ // utime: '1709667583395'
8512
+ // },
8513
+ // ...
8514
+ // ]
8515
+ // }
8516
+ // }
8517
+ //
8518
+ const data = this.safeDict(response, 'data');
8519
+ const responseList = this.safeList(data, 'list');
8520
+ const positions = this.parsePositions(responseList, symbols, params);
8521
+ return this.filterBySinceLimit(positions, since, limit);
8522
+ }
8450
8523
  async fetchConvertQuote(fromCode, toCode, amount = undefined, params = {}) {
8451
8524
  /**
8452
8525
  * @method
@@ -8599,7 +8672,7 @@ class bitget extends bitget$1 {
8599
8672
  //
8600
8673
  const data = this.safeDict(response, 'data', {});
8601
8674
  const dataList = this.safeList(data, 'dataList', []);
8602
- return this.parseConversions(dataList, 'fromCoin', 'toCoin', since, limit);
8675
+ return this.parseConversions(dataList, code, 'fromCoin', 'toCoin', since, limit);
8603
8676
  }
8604
8677
  parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
8605
8678
  //
@@ -55,7 +55,11 @@ class bithumb extends bithumb$1 {
55
55
  'fetchOrder': true,
56
56
  'fetchOrderBook': true,
57
57
  'fetchPosition': false,
58
+ 'fetchPositionHistory': false,
59
+ 'fetchPositionMode': false,
58
60
  'fetchPositions': false,
61
+ 'fetchPositionsForSymbol': false,
62
+ 'fetchPositionsHistory': false,
59
63
  'fetchPositionsRisk': false,
60
64
  'fetchPremiumIndexOHLCV': false,
61
65
  'fetchTicker': true,
@@ -76,7 +76,9 @@ class bitmex extends bitmex$1 {
76
76
  'fetchOrderBook': true,
77
77
  'fetchOrders': true,
78
78
  'fetchPosition': false,
79
+ 'fetchPositionHistory': false,
79
80
  'fetchPositions': true,
81
+ 'fetchPositionsHistory': false,
80
82
  'fetchPositionsRisk': false,
81
83
  'fetchPremiumIndexOHLCV': false,
82
84
  'fetchTicker': true,
@@ -65,8 +65,13 @@ class bitopro extends bitopro$1 {
65
65
  'fetchOrderBook': true,
66
66
  'fetchOrders': false,
67
67
  'fetchOrderTrades': false,
68
+ 'fetchPosition': false,
69
+ 'fetchPositionHistory': false,
68
70
  'fetchPositionMode': false,
69
71
  'fetchPositions': false,
72
+ 'fetchPositionsForSymbol': false,
73
+ 'fetchPositionsHistory': false,
74
+ 'fetchPositionsRisk': false,
70
75
  'fetchPremiumIndexOHLCV': false,
71
76
  'fetchTicker': true,
72
77
  'fetchTickers': true,
@@ -69,8 +69,11 @@ class bitso extends bitso$1 {
69
69
  'fetchOrderBook': true,
70
70
  'fetchOrderTrades': true,
71
71
  'fetchPosition': false,
72
+ 'fetchPositionHistory': false,
72
73
  'fetchPositionMode': false,
73
74
  'fetchPositions': false,
75
+ 'fetchPositionsForSymbol': false,
76
+ 'fetchPositionsHistory': false,
74
77
  'fetchPositionsRisk': false,
75
78
  'fetchPremiumIndexOHLCV': false,
76
79
  'fetchTicker': true,
@@ -69,8 +69,11 @@ class bitstamp extends bitstamp$1 {
69
69
  'fetchOrder': true,
70
70
  'fetchOrderBook': true,
71
71
  'fetchPosition': false,
72
+ 'fetchPositionHistory': false,
72
73
  'fetchPositionMode': false,
73
74
  'fetchPositions': false,
75
+ 'fetchPositionsForSymbol': false,
76
+ 'fetchPositionsHistory': false,
74
77
  'fetchPositionsRisk': false,
75
78
  'fetchPremiumIndexOHLCV': false,
76
79
  'fetchTicker': true,
@@ -87,7 +87,11 @@ class bitteam extends bitteam$1 {
87
87
  'fetchOrders': true,
88
88
  'fetchOrderTrades': false,
89
89
  'fetchPosition': false,
90
+ 'fetchPositionHistory': false,
91
+ 'fetchPositionMode': false,
90
92
  'fetchPositions': false,
93
+ 'fetchPositionsForSymbol': false,
94
+ 'fetchPositionsHistory': false,
91
95
  'fetchPositionsRisk': false,
92
96
  'fetchPremiumIndexOHLCV': false,
93
97
  'fetchStatus': false,
@@ -70,8 +70,11 @@ class bitvavo extends bitvavo$1 {
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,
@@ -59,8 +59,11 @@ class bl3p extends bl3p$1 {
59
59
  'fetchOpenInterestHistory': false,
60
60
  'fetchOrderBook': true,
61
61
  'fetchPosition': false,
62
+ 'fetchPositionHistory': false,
62
63
  'fetchPositionMode': false,
63
64
  'fetchPositions': false,
65
+ 'fetchPositionsForSymbol': false,
66
+ 'fetchPositionsHistory': false,
64
67
  'fetchPositionsRisk': false,
65
68
  'fetchPremiumIndexOHLCV': false,
66
69
  'fetchTicker': true,
@@ -67,8 +67,11 @@ class btcalpha extends btcalpha$1 {
67
67
  'fetchOrderBook': true,
68
68
  'fetchOrders': true,
69
69
  'fetchPosition': false,
70
+ 'fetchPositionHistory': false,
70
71
  'fetchPositionMode': false,
71
72
  'fetchPositions': false,
73
+ 'fetchPositionsForSymbol': false,
74
+ 'fetchPositionsHistory': false,
72
75
  'fetchPositionsRisk': false,
73
76
  'fetchPremiumIndexOHLCV': false,
74
77
  'fetchTicker': true,
@@ -55,8 +55,11 @@ class btcbox extends btcbox$1 {
55
55
  'fetchOrderBook': true,
56
56
  'fetchOrders': true,
57
57
  'fetchPosition': false,
58
+ 'fetchPositionHistory': false,
58
59
  'fetchPositionMode': false,
59
60
  'fetchPositions': false,
61
+ 'fetchPositionsForSymbol': false,
62
+ 'fetchPositionsHistory': false,
60
63
  'fetchPositionsRisk': false,
61
64
  'fetchPremiumIndexOHLCV': false,
62
65
  'fetchTicker': true,
@@ -65,8 +65,11 @@ class btcmarkets extends btcmarkets$1 {
65
65
  'fetchOrderBook': true,
66
66
  'fetchOrders': true,
67
67
  'fetchPosition': false,
68
+ 'fetchPositionHistory': false,
68
69
  'fetchPositionMode': false,
69
70
  'fetchPositions': false,
71
+ 'fetchPositionsForSymbol': false,
72
+ 'fetchPositionsHistory': false,
70
73
  'fetchPositionsRisk': false,
71
74
  'fetchPremiumIndexOHLCV': false,
72
75
  'fetchTicker': true,
@@ -60,8 +60,11 @@ class btcturk extends btcturk$1 {
60
60
  'fetchOrderBook': true,
61
61
  'fetchOrders': true,
62
62
  'fetchPosition': false,
63
+ 'fetchPositionHistory': false,
63
64
  'fetchPositionMode': false,
64
65
  'fetchPositions': false,
66
+ 'fetchPositionsForSymbol': false,
67
+ 'fetchPositionsHistory': false,
65
68
  'fetchPositionsRisk': false,
66
69
  'fetchPremiumIndexOHLCV': false,
67
70
  'fetchTicker': true,