ccxt 4.0.87 → 4.0.89

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,142 @@
1
+ ## 4.0.88 (2023-09-10)
2
+
3
+ * exmo: fetchMyTrades minor fixes [fd160a74df](https://github.com/ccxt/ccxt/commits/fd160a74df89d96fd7b606e7a9395dcfa8d9bd2a)
4
+ * composer remove extra [00c1836635](https://github.com/ccxt/ccxt/commits/00c1836635848dbadcf69a1401c78b83b994c593)
5
+ * manual update for async php paragraph [05250abb22](https://github.com/ccxt/ccxt/commits/05250abb2227787d53b903ff015e4001b6d5f598)
6
+ * feat(gate): fetchUnderlyingAssets [dd7269183e](https://github.com/ccxt/ccxt/commits/dd7269183e3410ee572eedc1c8d4a6ed1ab0efd5)
7
+ * feat(okx): fetchUnderlyingAssets [05b1025c1c](https://github.com/ccxt/ccxt/commits/05b1025c1ccc0100d2667d268203539d689cdf46)
8
+ * add fetchUnderlyingAssets to the manual [84686480b5](https://github.com/ccxt/ccxt/commits/84686480b52ed124933386f22adc6066d0a806eb)
9
+ * 'fetchUnderlyingAssets': false, on other options exchanges [9964afff8c](https://github.com/ccxt/ccxt/commits/9964afff8ca62ad09a429eca953f38531d1fbe87)
10
+ * add marketType argument to the method signature [4d52c22c67](https://github.com/ccxt/ccxt/commits/4d52c22c670269001a63cd93b15792e1ce69f551)
11
+ * clarify docstring description [324ed0ca05](https://github.com/ccxt/ccxt/commits/324ed0ca05befc5b64b98b050443979af79163ca)
12
+ * update signature [a5462465ed](https://github.com/ccxt/ccxt/commits/a5462465ed2066b7ac77a474e9cde5543ce389a4)
13
+ * cr fixes [6aece829a7](https://github.com/ccxt/ccxt/commits/6aece829a7a2e3b57982c79127d47e03e9c4f948)
14
+ * exmo ArgumentsRequired import fix #19107 [0ffba24c72](https://github.com/ccxt/ccxt/commits/0ffba24c721c121e42f3185a29e1ec2a554120d2)
15
+ * 4.0.88 [e427e94ff5](https://github.com/ccxt/ccxt/commits/e427e94ff5c1cf397298a7e0c513cafee338eec1)
16
+
17
+
18
+ ## 4.0.87 (2023-09-09)
19
+
20
+ * bitget: add new market apis [86d80e3d53](https://github.com/ccxt/ccxt/commits/86d80e3d5355db4b4e9a320395a9812fa486823f)
21
+ * minor [e42b87d83d](https://github.com/ccxt/ccxt/commits/e42b87d83d27ff4cabe576349397c68c8745c0b1)
22
+ * 4.0.87 [e4403c505b](https://github.com/ccxt/ccxt/commits/e4403c505b5eed8f4243c787013ba718884e2423)
23
+
24
+
25
+ ## 4.0.86 (2023-09-08)
26
+
27
+ * feat(bitget): fetchBalance, adjust swap available balance [1609353bce](https://github.com/ccxt/ccxt/commits/1609353bce599b9ad2c48bd2de7d221a9dac3b6b)
28
+ * 4.0.86 [432bc94bf2](https://github.com/ccxt/ccxt/commits/432bc94bf267406fc718939f0396be6c856bf67f)
29
+
30
+
31
+ ## 4.0.85 (2023-09-07)
32
+
33
+ * fix(latoken): parseTicker response values corrected [80a00dc446](https://github.com/ccxt/ccxt/commits/80a00dc4461435918b3024d9a6d866b2c19d50a5)
34
+ * fix(binance): bookTicker swap subscription [641a2d9eaf](https://github.com/ccxt/ccxt/commits/641a2d9eaf3421637e0b94011a986a3cd9fe8dca)
35
+ * 4.0.85 [280a105c58](https://github.com/ccxt/ccxt/commits/280a105c58788a1bde43545c5aa7466e827217db)
36
+
37
+
38
+ ## 4.0.84 (2023-09-06)
39
+
40
+ * fix(base): typo inside Position type [d363cce8d0](https://github.com/ccxt/ccxt/commits/d363cce8d0548bcf27bc5d8059224d588c9e405b)
41
+ * fix python position type [023db76e48](https://github.com/ccxt/ccxt/commits/023db76e4895a90effbe744647233267751e6713)
42
+ * fix(base): remove BCHABC from Exchange.py/php [c85085ccef](https://github.com/ccxt/ccxt/commits/c85085ccefbb4d0f16e45379f6513c465d6dba2f)
43
+ * 4.0.84 [ba3b9ad429](https://github.com/ccxt/ccxt/commits/ba3b9ad429c01ad1ab66084c279e5eb0e7429849)
44
+
45
+
46
+ ## 4.0.83 (2023-09-05)
47
+
48
+ * feat(bybit): update stopLoss, takeProfit implementation [fa6af72a78](https://github.com/ccxt/ccxt/commits/fa6af72a78b8f9527cec0710336e5e3afb2a587b)
49
+ * adjust takeProfit and stopLoss to prevent breaking changes [a663a31490](https://github.com/ccxt/ccxt/commits/a663a31490404b0227ed9279ea06a42968ad514a)
50
+ * ndax [3120ac90ef](https://github.com/ccxt/ccxt/commits/3120ac90ef00fe845ecc1a0d31ebd2f5a8851e53)
51
+ * lykke [145f24199f](https://github.com/ccxt/ccxt/commits/145f24199fceb236b859449d6b1002a0d3397e55)
52
+ * latoken [4a23d3df76](https://github.com/ccxt/ccxt/commits/4a23d3df76a73cb1e0f0d95cdff584425795f520)
53
+ * bigone [a62036ddb8](https://github.com/ccxt/ccxt/commits/a62036ddb8e93cf634a48063794f2444c12180c5)
54
+ * bittrex [722336b3c7](https://github.com/ccxt/ccxt/commits/722336b3c78d7bc98e750ba1e0f3a0c27aaf5ff4)
55
+ * latoken [7de75152c4](https://github.com/ccxt/ccxt/commits/7de75152c46d163bb06a358fda57184977488986)
56
+ * bitfinex2 [80546f55e2](https://github.com/ccxt/ccxt/commits/80546f55e2dcf2c63f18740f9e6ddafabe896246)
57
+ * kucoin [aff59bf507](https://github.com/ccxt/ccxt/commits/aff59bf507709f6d144b5327a11cc879ed2f42de)
58
+ * typo [2300c62a27](https://github.com/ccxt/ccxt/commits/2300c62a274b22aa705c990917a5ba2ab14bbb1b)
59
+ * fix(base): BCH override [e6ee8c72c1](https://github.com/ccxt/ccxt/commits/e6ee8c72c1908a2044c6c4453c2d7b840830bf20)
60
+ * fix logic [b2f610d143](https://github.com/ccxt/ccxt/commits/b2f610d143f53b791772378e432ae8fd7865a2d1)
61
+ * fix(gate): order status [fd3cc1b714](https://github.com/ccxt/ccxt/commits/fd3cc1b71439e0900b0b927bf5e3f33d685c68ac)
62
+ * fix(gateWS): status inference [67435420f8](https://github.com/ccxt/ccxt/commits/67435420f8136febd02e37469fa75ea30e045f11)
63
+ * fix(yobit): remove PRS override [8a633e4129](https://github.com/ccxt/ccxt/commits/8a633e41296b5047d79e878e07f3de20799c5845)
64
+ * fix(bitmart): change method to v3 endpoint [12be9c7f7b](https://github.com/ccxt/ccxt/commits/12be9c7f7b30f72c1e660c3b2a39285f0faa4fa4)
65
+ * cr fixes [5cd354f683](https://github.com/ccxt/ccxt/commits/5cd354f683f4a458020c182316453e21ee9ced2d)
66
+ * binance: update api rate limit [b98ea3484e](https://github.com/ccxt/ccxt/commits/b98ea3484e793de9bbe4e1f94ccdf60ffc165ce0)
67
+ * editOrder, update stopLoss, takeProfit implementation [51b868104f](https://github.com/ccxt/ccxt/commits/51b868104f03a87fc1c44f8e5b1863ea29fd1cf7)
68
+ * remove price and amount check [cbc8b25ba4](https://github.com/ccxt/ccxt/commits/cbc8b25ba4c434da4fc86e555ff64d05ce181380)
69
+ * Update ts/src/ndax.ts [a2d218647b](https://github.com/ccxt/ccxt/commits/a2d218647b315e51f91fdda95420ffe350ac30f9)
70
+ * Update ts/src/kucoin.ts [236937097c](https://github.com/ccxt/ccxt/commits/236937097cab6bacdd648a2987d1e553e1c773c8)
71
+ * 4.0.83 [d755414868](https://github.com/ccxt/ccxt/commits/d75541486873bb22e18900e05f5c3606bd3369fc)
72
+
73
+
74
+ ## 4.0.82 (2023-09-04)
75
+
76
+ * binance: add apis [bba51c3d8c](https://github.com/ccxt/ccxt/commits/bba51c3d8c6ae39d38fbb9f48a28e337549590c8)
77
+ * 4.0.82 [9bb7f5809d](https://github.com/ccxt/ccxt/commits/9bb7f5809df6531148f7fdd5b9aaa3327ded6153)
78
+
79
+
80
+ ## 4.0.81 (2023-09-03)
81
+
82
+ * krakenfutures [db8ccada86](https://github.com/ccxt/ccxt/commits/db8ccada86cd1ba97ae91486f0b2eaa2b7774ff1)
83
+ * probit [18fb8dfcd0](https://github.com/ccxt/ccxt/commits/18fb8dfcd0e04ef70f7e8af589edac593cb1292c)
84
+ * wO [380975afce](https://github.com/ccxt/ccxt/commits/380975afce0048bb2f450d6d07a74e33c8b68978)
85
+ * mkt [901baed034](https://github.com/ccxt/ccxt/commits/901baed03423bcfa2e564c6ab95228648866e4c4)
86
+ * fo [b3d670567a](https://github.com/ccxt/ccxt/commits/b3d670567a4e05de770db2ed618c611e6b59dc21)
87
+ * fob [3e65e2bccf](https://github.com/ccxt/ccxt/commits/3e65e2bccfe1c7ea1d23516a2364af10943f1427)
88
+ * Update manual.rst [8753610bfc](https://github.com/ccxt/ccxt/commits/8753610bfcfc91cbf504d8203aad95a677efb8bb)
89
+ * bitget: update fetchMyTrades [71cc30064c](https://github.com/ccxt/ccxt/commits/71cc30064c1c42d7ed591542a01d52b828403579)
90
+ * binance: add apis [a595447de8](https://github.com/ccxt/ccxt/commits/a595447de8b87022780e52d86bf98380886640d7)
91
+ * gate: add apis [a741566509](https://github.com/ccxt/ccxt/commits/a7415665099de38a1b9584c774efd69ea94bca1d)
92
+ * huobi: add apis [34d4c3b61f](https://github.com/ccxt/ccxt/commits/34d4c3b61f00212dae87b4e0de14a27f10fbbd7a)
93
+ * update fetchMyTrades implementation [cefa6e165c](https://github.com/ccxt/ccxt/commits/cefa6e165c80b6cc6e1ba3443c86291dcc5ab9ea)
94
+ * update [96fdb215da](https://github.com/ccxt/ccxt/commits/96fdb215da1d89990cc2713e71f02dee789aba45)
95
+ * add see [dbdc252871](https://github.com/ccxt/ccxt/commits/dbdc2528711c9632aa37fefb4ff72977fec53879)
96
+ * update changelog [6cb2b75b3f](https://github.com/ccxt/ccxt/commits/6cb2b75b3f3c617fbbf967f5f0436d7404b3f5dd)
97
+ * update docs [8e59731bc4](https://github.com/ccxt/ccxt/commits/8e59731bc4dccc36d9f7e6f2acfeea88c4264c15)
98
+ * revert [098ddc4629](https://github.com/ccxt/ccxt/commits/098ddc4629a1ec3ca6a767222fe0715f9dcaeaa8)
99
+ * fix(kucoin): add proper fetchCurrencies [0a73fe3331](https://github.com/ccxt/ccxt/commits/0a73fe333184b498b9e2a76a7b82385785ad206d)
100
+ * fix(okx): ws exceptions [a8810ff279](https://github.com/ccxt/ccxt/commits/a8810ff279cfb44bc7f1012bf488fb721125d829)
101
+ * Update ts/src/kucoin.ts [1ca1d7c033](https://github.com/ccxt/ccxt/commits/1ca1d7c033ff710136657fd698213a4f62fa4dab)
102
+ * revert [7e5db2a0bb](https://github.com/ccxt/ccxt/commits/7e5db2a0bb60538f76d6dac1ce870f0a8c9b794a)
103
+ * wp [e7ab2ee0bf](https://github.com/ccxt/ccxt/commits/e7ab2ee0bf1512786388aaf88708d9793b25c1ed)
104
+ * fix(bequant): USD no longer has its currencyId changed to USDT [e68c4c6988](https://github.com/ccxt/ccxt/commits/e68c4c698886b3499d134fd2e1967ca2719151d5)
105
+ * fix(okx): ws sandbox [ec53ea2e67](https://github.com/ccxt/ccxt/commits/ec53ea2e67e6ccc87085d24e807208338512d6b9)
106
+ * add jsdocs [d108c595e1](https://github.com/ccxt/ccxt/commits/d108c595e1480d42d513e0783d912df1336737a4)
107
+ * fix(bitmex): fetchFundingRates filtering [3cb60fe7e0](https://github.com/ccxt/ccxt/commits/3cb60fe7e0143987319d8d95260e1594b2f616a3)
108
+ * add deposit and withdraw to networks [030ae6dcdb](https://github.com/ccxt/ccxt/commits/030ae6dcdbbecda95c946097d368ce81d4e628f9)
109
+ * fix(base): remove Bitcoin Cash ABC override [95437f9c25](https://github.com/ccxt/ccxt/commits/95437f9c25ed8260e71c64d1f179b0ea8f0fb535)
110
+ * fix(yobit): remove PRE override [b8cf9ddcfc](https://github.com/ccxt/ccxt/commits/b8cf9ddcfc4a36f50e9be2c1998a953a771702d5)
111
+ * Add network as required parameter for withdrawals of digital assets [d62284ef33](https://github.com/ccxt/ccxt/commits/d62284ef330a148b9faf6bea4a6c86be863ff3f9)
112
+ * fix Missing space [98d5080620](https://github.com/ccxt/ccxt/commits/98d50806205c1c76914854fdafec2b395f1b87d9)
113
+ * fix(bybit): remove editOrder check [7bf1d592a8](https://github.com/ccxt/ccxt/commits/7bf1d592a84ea0159f5691d45d20214171ee8e19)
114
+ * Revert "fix(base): remove Bitcoin Cash ABC override" [dc02f5a29b](https://github.com/ccxt/ccxt/commits/dc02f5a29bda03ff570d149b7ab8f72f2a470030)
115
+ * Revert "fix(yobit): remove PRE override" [c460321350](https://github.com/ccxt/ccxt/commits/c4603213503208289370a3fc6440566ecf6455ea)
116
+ * fix network check [379ae8c816](https://github.com/ccxt/ccxt/commits/379ae8c816b429a41814b2d840ca2462575ea1fc)
117
+ * 4.0.81 [e4065f6a49](https://github.com/ccxt/ccxt/commits/e4065f6a490e6fc4dd7a72b375428b2faa570668)
118
+
119
+
120
+ ## 4.0.80 (2023-08-31)
121
+
122
+ * bybit [26caf82b27](https://github.com/ccxt/ccxt/commits/26caf82b27e5071772e0af339477e79c2dd962e1)
123
+ * waves [7691af575e](https://github.com/ccxt/ccxt/commits/7691af575e9d3af61e3abcca3b8d5764ab5918b2)
124
+ * coinsph [0ae4fa3a6c](https://github.com/ccxt/ccxt/commits/0ae4fa3a6cedad350bf0bfe0671cc62487a866f3)
125
+ * krakenfutures [c732c54097](https://github.com/ccxt/ccxt/commits/c732c5409724f4cccbb2c98a1fb97dd6278d05c5)
126
+ * okcoin [1fe76b7cd9](https://github.com/ccxt/ccxt/commits/1fe76b7cd9c38ec4c463815462a8a382f1dd0d1d)
127
+ * okx [d26446f183](https://github.com/ccxt/ccxt/commits/d26446f183e014f5dd46eb9b071f6247e8a7bc13)
128
+ * probit [6ad08ab1ca](https://github.com/ccxt/ccxt/commits/6ad08ab1cab37b09af4d1bad9f92c8154b38cfa6)
129
+ * upbit [69120f30cc](https://github.com/ccxt/ccxt/commits/69120f30ccc8c6ee094deaf9db46924b4ad48403)
130
+ * waves & bybit [7b2bd1fb29](https://github.com/ccxt/ccxt/commits/7b2bd1fb296e9b71d0a47222a39a105af92be649)
131
+ * fix(bitget): handle ws error [72191809b5](https://github.com/ccxt/ccxt/commits/72191809b5181cf2358d070f2986a197917427da)
132
+ * add comment [f0570815bb](https://github.com/ccxt/ccxt/commits/f0570815bb58fdd1be7eb77780ec4ddfce8b51d9)
133
+ * fix string variable [d7a7d30556](https://github.com/ccxt/ccxt/commits/d7a7d30556d84458baf439af3d6dda936214f19c)
134
+ * fix(bitmex): base/quote volume inside ticker [43083d7d14](https://github.com/ccxt/ccxt/commits/43083d7d14485e8d801f4e3465351bd015f2d102)
135
+ * fix(gate): watchOHLCV return [c322d83f77](https://github.com/ccxt/ccxt/commits/c322d83f7738f88188ca60bc24fff4f6f8ff0e2e)
136
+ * bybit: add apis [6d63d74249](https://github.com/ccxt/ccxt/commits/6d63d74249189185067044674e6bd3e6a63f9618)
137
+ * 4.0.80 [eeeaf81e28](https://github.com/ccxt/ccxt/commits/eeeaf81e280223995613da4a7a0f6a86f2a10a36)
138
+
139
+
1
140
  ## 4.0.79 (2023-08-30)
2
141
 
3
142
  * Fix: Huobi fetch_markets 'spot' is False [b5353dbc57](https://github.com/ccxt/ccxt/commits/b5353dbc57dfacbef0d4096df031b22f243e3506)
package/README.md CHANGED
@@ -215,13 +215,13 @@ console.log(version, Object.keys(exchanges));
215
215
 
216
216
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
217
217
 
218
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.87/dist/ccxt.browser.js
219
- * unpkg: https://unpkg.com/ccxt@4.0.87/dist/ccxt.browser.js
218
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.89/dist/ccxt.browser.js
219
+ * unpkg: https://unpkg.com/ccxt@4.0.89/dist/ccxt.browser.js
220
220
 
221
221
  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.
222
222
 
223
223
  ```HTML
224
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.87/dist/ccxt.browser.js"></script>
224
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.89/dist/ccxt.browser.js"></script>
225
225
  ```
226
226
 
227
227
  Creates a global `ccxt` object:
@@ -15648,6 +15648,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
15648
15648
  'fetchTransactionFees': true,
15649
15649
  'fetchTransactions': false,
15650
15650
  'fetchTransfers': true,
15651
+ 'fetchUnderlyingAssets': false,
15651
15652
  'fetchVolatilityHistory': false,
15652
15653
  'fetchWithdrawal': false,
15653
15654
  'fetchWithdrawals': true,
@@ -25275,7 +25276,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
25275
25276
  'symbol': market['id'],
25276
25277
  };
25277
25278
  if (limit !== undefined) {
25278
- request['limit'] = limit;
25279
+ request['limit'] = Math.min(limit, 100); // avoid API exception "limit should less than 100"
25279
25280
  }
25280
25281
  let response = undefined;
25281
25282
  let marketType = undefined;
@@ -71433,6 +71434,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
71433
71434
  'fetchTradingFees': true,
71434
71435
  'fetchTransactions': false,
71435
71436
  'fetchTransfers': true,
71437
+ 'fetchUnderlyingAssets': false,
71436
71438
  'fetchVolatilityHistory': true,
71437
71439
  'fetchWithdrawals': true,
71438
71440
  'setLeverage': true,
@@ -98276,6 +98278,7 @@ class cryptocom extends _abstract_cryptocom_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98276
98278
  'fetchTransactionFees': false,
98277
98279
  'fetchTransactions': false,
98278
98280
  'fetchTransfers': true,
98281
+ 'fetchUnderlyingAssets': false,
98279
98282
  'fetchVolatilityHistory': false,
98280
98283
  'fetchWithdrawals': true,
98281
98284
  'reduceMargin': false,
@@ -103316,6 +103319,7 @@ class delta extends _abstract_delta_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
103316
103319
  'fetchTrades': true,
103317
103320
  'fetchTransfer': undefined,
103318
103321
  'fetchTransfers': undefined,
103322
+ 'fetchUnderlyingAssets': false,
103319
103323
  'fetchVolatilityHistory': false,
103320
103324
  'fetchWithdrawal': undefined,
103321
103325
  'fetchWithdrawals': undefined,
@@ -106414,6 +106418,7 @@ class deribit extends _abstract_deribit_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
106414
106418
  'fetchTransactions': false,
106415
106419
  'fetchTransfer': false,
106416
106420
  'fetchTransfers': true,
106421
+ 'fetchUnderlyingAssets': false,
106417
106422
  'fetchVolatilityHistory': true,
106418
106423
  'fetchWithdrawal': false,
106419
106424
  'fetchWithdrawals': true,
@@ -114378,17 +114383,16 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
114378
114383
  // "commission_percent": "0.2"
114379
114384
  // }
114380
114385
  //
114381
- // margin
114386
+ // fetchMyTrades (margin)
114382
114387
  //
114383
114388
  // {
114384
- // "is_maker": false,
114385
- // "order_id": "123",
114386
- // "pair": "BTC_USD",
114387
- // "price": "54122.25",
114388
- // "quantity": "0.00069994",
114389
- // "trade_dt": "1619069561718824428",
114390
- // "trade_id": "692842802860135010",
114391
- // "type": "sell"
114389
+ // "trade_id": "692861757015952517",
114390
+ // "trade_dt": "1693951853197811824",
114391
+ // "trade_type": "buy",
114392
+ // "pair": "ADA_USDT",
114393
+ // "quantity": "1.96607879",
114394
+ // "price": "0.2568",
114395
+ // "amount": "0.50488903"
114392
114396
  // }
114393
114397
  //
114394
114398
  const timestamp = this.safeTimestamp(trade, 'date');
@@ -114397,7 +114401,7 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
114397
114401
  const priceString = this.safeString(trade, 'price');
114398
114402
  const amountString = this.safeString(trade, 'quantity');
114399
114403
  const costString = this.safeString(trade, 'amount');
114400
- const side = this.safeString(trade, 'type');
114404
+ const side = this.safeString2(trade, 'type', 'trade_type');
114401
114405
  const type = undefined;
114402
114406
  const marketId = this.safeString(trade, 'pair');
114403
114407
  market = this.safeMarket(marketId, market, '_');
@@ -114486,38 +114490,91 @@ class exmo extends _abstract_exmo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
114486
114490
  * @method
114487
114491
  * @name exmo#fetchMyTrades
114488
114492
  * @description fetch all trades made by the user
114489
- * @param {string} symbol unified market symbol
114493
+ * @see https://documenter.getpostman.com/view/10287440/SzYXWKPi#b8d8d9af-4f46-46a1-939b-ad261d79f452 // spot
114494
+ * @see https://documenter.getpostman.com/view/10287440/SzYXWKPi#f4b1aaf8-399f-403b-ab5e-4926d967a106 // margin
114495
+ * @param {string} symbol a symbol is required but it can be a single string, or a non-empty array
114490
114496
  * @param {int} [since] the earliest time in ms to fetch trades for
114491
- * @param {int} [limit] the maximum number of trades structures to retrieve
114497
+ * @param {int} [limit] *required for margin orders* the maximum number of trades structures to retrieve
114492
114498
  * @param {object} [params] extra parameters specific to the exmo api endpoint
114499
+ *
114500
+ * EXCHANGE SPECIFIC PARAMETERS
114501
+ * @param {int} [params.offset] last deal offset, default = 0
114493
114502
  * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
114494
114503
  */
114495
- // a symbol is required but it can be a single string, or a non-empty array
114496
- if (symbol === undefined) {
114497
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument (a single symbol or an array)');
114504
+ this.checkRequiredSymbol('fetchMyTrades', symbol);
114505
+ let marginMode = undefined;
114506
+ [marginMode, params] = this.handleMarginModeAndParams('fetchMyTrades', params);
114507
+ if (marginMode === 'cross') {
114508
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + 'only isolated margin is supported');
114498
114509
  }
114499
114510
  await this.loadMarkets();
114500
- let pair = undefined;
114501
- let market = undefined;
114502
- if (Array.isArray(symbol)) {
114503
- const numSymbols = symbol.length;
114504
- if (numSymbols < 1) {
114505
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a non-empty symbol array');
114506
- }
114507
- const marketIds = this.marketIds(symbol);
114508
- pair = marketIds.join(',');
114511
+ const market = this.market(symbol);
114512
+ const pair = market['id'];
114513
+ const isSpot = marginMode !== 'isolated';
114514
+ if (limit === undefined) {
114515
+ limit = 100;
114516
+ }
114517
+ const request = {};
114518
+ if (isSpot) {
114519
+ request['pair'] = pair;
114509
114520
  }
114510
114521
  else {
114511
- market = this.market(symbol);
114512
- pair = market['id'];
114522
+ request['pair_name'] = pair;
114513
114523
  }
114514
- const request = {
114515
- 'pair': pair,
114516
- };
114517
114524
  if (limit !== undefined) {
114518
114525
  request['limit'] = limit;
114519
114526
  }
114520
- const response = await this.privatePostUserTrades(this.extend(request, params));
114527
+ const offset = this.safeInteger(params, 'offset', 0);
114528
+ request['offset'] = offset;
114529
+ let response = undefined;
114530
+ if (isSpot) {
114531
+ response = await this.privatePostUserTrades(this.extend(request, params));
114532
+ //
114533
+ // {
114534
+ // "BTC_USD": [
114535
+ // {
114536
+ // "trade_id": 20056872,
114537
+ // "client_id": 100500,
114538
+ // "date": 1435488248,
114539
+ // "type": "buy",
114540
+ // "pair": "BTC_USD",
114541
+ // "quantity": "1",
114542
+ // "price": "100",
114543
+ // "amount": "100",
114544
+ // "order_id": 7,
114545
+ // "parent_order_id": 117684023830293,
114546
+ // "exec_type": "taker",
114547
+ // "commission_amount": "0.02",
114548
+ // "commission_currency": "BTC",
114549
+ // "commission_percent": "0.2"
114550
+ // }
114551
+ // ],
114552
+ // ...
114553
+ // }
114554
+ //
114555
+ }
114556
+ else {
114557
+ const responseFromExchange = await this.privatePostMarginTrades(this.extend(request, params));
114558
+ //
114559
+ // {
114560
+ // "trades": {
114561
+ // "ADA_USDT": [
114562
+ // {
114563
+ // "trade_id": "692861757015952517",
114564
+ // "trade_dt": "1693951853197811824",
114565
+ // "trade_type": "buy",
114566
+ // "pair": "ADA_USDT",
114567
+ // "quantity": "1.96607879",
114568
+ // "price": "0.2568",
114569
+ // "amount": "0.50488903"
114570
+ // },
114571
+ // ]
114572
+ // ...
114573
+ // }
114574
+ // }
114575
+ //
114576
+ response = this.safeValue(responseFromExchange, 'trades');
114577
+ }
114521
114578
  let result = [];
114522
114579
  const marketIdsInner = Object.keys(response);
114523
114580
  for (let i = 0; i < marketIdsInner.length; i++) {
@@ -115610,6 +115667,7 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
115610
115667
  'fetchTradingFee': true,
115611
115668
  'fetchTradingFees': true,
115612
115669
  'fetchTransactionFees': true,
115670
+ 'fetchUnderlyingAssets': true,
115613
115671
  'fetchVolatilityHistory': false,
115614
115672
  'fetchWithdrawals': true,
115615
115673
  'reduceMargin': true,
@@ -121702,6 +121760,44 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
121702
121760
  request['dual_mode'] = hedged;
121703
121761
  return await this.privateFuturesPostSettleDualMode(this.extend(request, query));
121704
121762
  }
121763
+ async fetchUnderlyingAssets(params = {}) {
121764
+ /**
121765
+ * @method
121766
+ * @name gate#fetchUnderlyingAssets
121767
+ * @description fetches the market ids of underlying assets for a specific contract market type
121768
+ * @param {object} [params] exchange specific params
121769
+ * @param {string} [params.type] the contract market type, 'option', 'swap' or 'future', the default is 'option'
121770
+ * @returns {object[]} a list of [underlying assets]{@link https://github.com/ccxt/ccxt/wiki/Manual#underlying-assets-structure}
121771
+ */
121772
+ await this.loadMarkets();
121773
+ let marketType = undefined;
121774
+ [marketType, params] = this.handleMarketTypeAndParams('fetchUnderlyingAssets', undefined, params);
121775
+ if ((marketType === undefined) || (marketType === 'spot')) {
121776
+ marketType = 'option';
121777
+ }
121778
+ if (marketType !== 'option') {
121779
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchUnderlyingAssets() supports option markets only');
121780
+ }
121781
+ const response = await this.publicOptionsGetUnderlyings(params);
121782
+ //
121783
+ // [
121784
+ // {
121785
+ // "index_time": "1646915796",
121786
+ // "name": "BTC_USDT",
121787
+ // "index_price": "39142.73"
121788
+ // }
121789
+ // ]
121790
+ //
121791
+ const underlyings = [];
121792
+ for (let i = 0; i < response.length; i++) {
121793
+ const underlying = response[i];
121794
+ const name = this.safeString(underlying, 'name');
121795
+ if (name !== undefined) {
121796
+ underlyings.push(name);
121797
+ }
121798
+ }
121799
+ return underlyings;
121800
+ }
121705
121801
  handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {
121706
121802
  if (response === undefined) {
121707
121803
  return undefined;
@@ -177440,6 +177536,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
177440
177536
  'fetchTransactions': false,
177441
177537
  'fetchTransfer': true,
177442
177538
  'fetchTransfers': true,
177539
+ 'fetchUnderlyingAssets': true,
177443
177540
  'fetchVolatilityHistory': false,
177444
177541
  'fetchWithdrawal': true,
177445
177542
  'fetchWithdrawals': true,
@@ -184033,6 +184130,44 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
184033
184130
  }
184034
184131
  return result;
184035
184132
  }
184133
+ async fetchUnderlyingAssets(params = {}) {
184134
+ /**
184135
+ * @method
184136
+ * @name okx#fetchUnderlyingAssets
184137
+ * @description fetches the market ids of underlying assets for a specific contract market type
184138
+ * @see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-underlying
184139
+ * @param {object} [params] exchange specific params
184140
+ * @param {string} [params.type] the contract market type, 'option', 'swap' or 'future', the default is 'option'
184141
+ * @returns {object[]} a list of [underlying assets]{@link https://github.com/ccxt/ccxt/wiki/Manual#underlying-assets-structure}
184142
+ */
184143
+ await this.loadMarkets();
184144
+ let marketType = undefined;
184145
+ [marketType, params] = this.handleMarketTypeAndParams('fetchUnderlyingAssets', undefined, params);
184146
+ if ((marketType === undefined) || (marketType === 'spot')) {
184147
+ marketType = 'option';
184148
+ }
184149
+ if ((marketType !== 'option') && (marketType !== 'swap') && (marketType !== 'future')) {
184150
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' fetchUnderlyingAssets() supports contract markets only');
184151
+ }
184152
+ const request = {
184153
+ 'instType': this.convertToInstrumentType(marketType),
184154
+ };
184155
+ const response = await this.publicGetPublicUnderlying(this.extend(request, params));
184156
+ //
184157
+ // {
184158
+ // "code": "0",
184159
+ // "data": [
184160
+ // [
184161
+ // "BTC-USD",
184162
+ // "ETH-USD"
184163
+ // ]
184164
+ // ],
184165
+ // "msg": ""
184166
+ // }
184167
+ //
184168
+ const underlyings = this.safeValue(response, 'data', []);
184169
+ return underlyings[0];
184170
+ }
184036
184171
  handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {
184037
184172
  if (!response) {
184038
184173
  return undefined; // fallback to default error handler
@@ -208507,7 +208642,7 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
208507
208642
  if (this.newUpdates) {
208508
208643
  limit = trades.getLimit(symbol, limit);
208509
208644
  }
208510
- return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
208645
+ return this.filterBySymbolSinceLimit(trades, symbol, since, limit, true);
208511
208646
  }
208512
208647
  handleMyTrades(client, message) {
208513
208648
  //
@@ -273757,7 +273892,7 @@ SOFTWARE.
273757
273892
 
273758
273893
  //-----------------------------------------------------------------------------
273759
273894
  // this is updated by vss.js when building
273760
- const version = '4.0.87';
273895
+ const version = '4.0.89';
273761
273896
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
273762
273897
  //-----------------------------------------------------------------------------
273763
273898