ccxt 4.1.56 → 4.1.58

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 (318) hide show
  1. package/.git-templates/hooks/pre-push +2 -2
  2. package/README.md +3 -3
  3. package/build.sh +30 -18
  4. package/dist/ccxt.browser.js +3893 -3214
  5. package/dist/ccxt.browser.min.js +10 -10
  6. package/dist/cjs/ccxt.js +1 -1
  7. package/dist/cjs/src/ace.js +17 -13
  8. package/dist/cjs/src/alpaca.js +6 -6
  9. package/dist/cjs/src/ascendex.js +35 -29
  10. package/dist/cjs/src/base/Exchange.js +39 -26
  11. package/dist/cjs/src/base/Precise.js +1 -3
  12. package/dist/cjs/src/base/ws/Client.js +1 -1
  13. package/dist/cjs/src/bigone.js +24 -20
  14. package/dist/cjs/src/binance.js +97 -76
  15. package/dist/cjs/src/bingx.js +63 -44
  16. package/dist/cjs/src/bit2c.js +18 -15
  17. package/dist/cjs/src/bitbank.js +16 -15
  18. package/dist/cjs/src/bitbns.js +28 -18
  19. package/dist/cjs/src/bitfinex.js +23 -21
  20. package/dist/cjs/src/bitfinex2.js +32 -28
  21. package/dist/cjs/src/bitflyer.js +28 -20
  22. package/dist/cjs/src/bitforex.js +25 -18
  23. package/dist/cjs/src/bitget.js +184 -147
  24. package/dist/cjs/src/bithumb.js +23 -16
  25. package/dist/cjs/src/bitmart.js +110 -89
  26. package/dist/cjs/src/bitmex.js +104 -64
  27. package/dist/cjs/src/bitopro.js +38 -26
  28. package/dist/cjs/src/bitpanda.js +24 -23
  29. package/dist/cjs/src/bitrue.js +33 -24
  30. package/dist/cjs/src/bitso.js +24 -23
  31. package/dist/cjs/src/bitstamp.js +24 -23
  32. package/dist/cjs/src/bittrex.js +30 -29
  33. package/dist/cjs/src/bitvavo.js +38 -30
  34. package/dist/cjs/src/bl3p.js +11 -10
  35. package/dist/cjs/src/blockchaincom.js +20 -20
  36. package/dist/cjs/src/btcalpha.js +18 -17
  37. package/dist/cjs/src/btcbox.js +13 -12
  38. package/dist/cjs/src/btcmarkets.js +20 -19
  39. package/dist/cjs/src/btcturk.js +14 -13
  40. package/dist/cjs/src/bybit.js +84 -54
  41. package/dist/cjs/src/cex.js +16 -14
  42. package/dist/cjs/src/coinbase.js +29 -27
  43. package/dist/cjs/src/coinbasepro.js +27 -25
  44. package/dist/cjs/src/coincheck.js +15 -14
  45. package/dist/cjs/src/coinex.js +100 -77
  46. package/dist/cjs/src/coinlist.js +28 -27
  47. package/dist/cjs/src/coinmate.js +20 -17
  48. package/dist/cjs/src/coinone.js +21 -16
  49. package/dist/cjs/src/coinsph.js +37 -28
  50. package/dist/cjs/src/coinspot.js +12 -11
  51. package/dist/cjs/src/cryptocom.js +40 -202
  52. package/dist/cjs/src/currencycom.js +32 -25
  53. package/dist/cjs/src/delta.js +34 -28
  54. package/dist/cjs/src/deribit.js +39 -36
  55. package/dist/cjs/src/digifinex.js +64 -44
  56. package/dist/cjs/src/exmo.js +29 -27
  57. package/dist/cjs/src/gate.js +67 -53
  58. package/dist/cjs/src/gemini.js +23 -20
  59. package/dist/cjs/src/hitbtc.js +65 -56
  60. package/dist/cjs/src/hollaex.js +30 -27
  61. package/dist/cjs/src/htx.js +132 -143
  62. package/dist/cjs/src/huobijp.js +22 -20
  63. package/dist/cjs/src/idex.js +22 -21
  64. package/dist/cjs/src/independentreserve.js +15 -14
  65. package/dist/cjs/src/indodax.js +30 -26
  66. package/dist/cjs/src/kraken.js +29 -27
  67. package/dist/cjs/src/krakenfutures.js +29 -22
  68. package/dist/cjs/src/kucoin.js +48 -43
  69. package/dist/cjs/src/kucoinfutures.js +33 -28
  70. package/dist/cjs/src/kuna.js +25 -24
  71. package/dist/cjs/src/latoken.js +24 -22
  72. package/dist/cjs/src/lbank.js +45 -30
  73. package/dist/cjs/src/luno.js +22 -19
  74. package/dist/cjs/src/lykke.js +19 -17
  75. package/dist/cjs/src/mercado.js +30 -19
  76. package/dist/cjs/src/mexc.js +60 -49
  77. package/dist/cjs/src/ndax.js +23 -22
  78. package/dist/cjs/src/novadax.js +23 -22
  79. package/dist/cjs/src/oceanex.js +22 -19
  80. package/dist/cjs/src/okcoin.js +29 -23
  81. package/dist/cjs/src/okx.js +87 -82
  82. package/dist/cjs/src/p2b.js +79 -82
  83. package/dist/cjs/src/paymium.js +10 -10
  84. package/dist/cjs/src/phemex.js +63 -40
  85. package/dist/cjs/src/poloniex.js +22 -22
  86. package/dist/cjs/src/poloniexfutures.js +23 -19
  87. package/dist/cjs/src/pro/alpaca.js +5 -5
  88. package/dist/cjs/src/pro/ascendex.js +4 -4
  89. package/dist/cjs/src/pro/binance.js +16 -16
  90. package/dist/cjs/src/pro/bingx.js +1 -1
  91. package/dist/cjs/src/pro/bitfinex.js +4 -4
  92. package/dist/cjs/src/pro/bitfinex2.js +6 -6
  93. package/dist/cjs/src/pro/bitget.js +7 -7
  94. package/dist/cjs/src/pro/bitmart.js +7 -5
  95. package/dist/cjs/src/pro/bitmex.js +6 -6
  96. package/dist/cjs/src/pro/bitopro.js +4 -4
  97. package/dist/cjs/src/pro/bitpanda.js +6 -6
  98. package/dist/cjs/src/pro/bitrue.js +2 -2
  99. package/dist/cjs/src/pro/bitstamp.js +6 -4
  100. package/dist/cjs/src/pro/bittrex.js +15 -6
  101. package/dist/cjs/src/pro/bitvavo.js +11 -7
  102. package/dist/cjs/src/pro/blockchaincom.js +8 -8
  103. package/dist/cjs/src/pro/bybit.js +7 -7
  104. package/dist/cjs/src/pro/cex.js +13 -9
  105. package/dist/cjs/src/pro/coinbase.js +5 -5
  106. package/dist/cjs/src/pro/coinbasepro.js +11 -10
  107. package/dist/cjs/src/pro/coinex.js +7 -9
  108. package/dist/cjs/src/pro/cryptocom.js +9 -9
  109. package/dist/cjs/src/pro/currencycom.js +4 -4
  110. package/dist/cjs/src/pro/deribit.js +6 -6
  111. package/dist/cjs/src/pro/exmo.js +12 -14
  112. package/dist/cjs/src/pro/gate.js +7 -7
  113. package/dist/cjs/src/pro/gemini.js +3 -3
  114. package/dist/cjs/src/pro/hitbtc.js +263 -4
  115. package/dist/cjs/src/pro/hollaex.js +5 -5
  116. package/dist/cjs/src/pro/htx.js +6 -6
  117. package/dist/cjs/src/pro/huobijp.js +3 -3
  118. package/dist/cjs/src/pro/idex.js +4 -4
  119. package/dist/cjs/src/pro/independentreserve.js +2 -2
  120. package/dist/cjs/src/pro/kraken.js +10 -10
  121. package/dist/cjs/src/pro/krakenfutures.js +41 -17
  122. package/dist/cjs/src/pro/kucoin.js +7 -7
  123. package/dist/cjs/src/pro/kucoinfutures.js +8 -6
  124. package/dist/cjs/src/pro/luno.js +2 -2
  125. package/dist/cjs/src/pro/mexc.js +6 -6
  126. package/dist/cjs/src/pro/ndax.js +3 -3
  127. package/dist/cjs/src/pro/okcoin.js +5 -5
  128. package/dist/cjs/src/pro/okx.js +12 -12
  129. package/dist/cjs/src/pro/phemex.js +6 -6
  130. package/dist/cjs/src/pro/poloniex.js +7 -7
  131. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  132. package/dist/cjs/src/pro/probit.js +6 -6
  133. package/dist/cjs/src/pro/upbit.js +3 -3
  134. package/dist/cjs/src/pro/wazirx.js +8 -8
  135. package/dist/cjs/src/pro/whitebit.js +12 -8
  136. package/dist/cjs/src/pro/woo.js +1 -1
  137. package/dist/cjs/src/probit.js +28 -23
  138. package/dist/cjs/src/tidex.js +16 -15
  139. package/dist/cjs/src/timex.js +19 -18
  140. package/dist/cjs/src/tokocrypto.js +27 -22
  141. package/dist/cjs/src/upbit.js +19 -19
  142. package/dist/cjs/src/wavesexchange.js +22 -19
  143. package/dist/cjs/src/wazirx.js +24 -17
  144. package/dist/cjs/src/whitebit.js +33 -27
  145. package/dist/cjs/src/woo.js +44 -34
  146. package/dist/cjs/src/yobit.js +25 -20
  147. package/dist/cjs/src/zaif.js +9 -9
  148. package/dist/cjs/src/zonda.js +18 -17
  149. package/js/ccxt.d.ts +1 -1
  150. package/js/ccxt.js +1 -1
  151. package/js/src/abstract/bybit.d.ts +1 -0
  152. package/js/src/abstract/cryptocom.d.ts +0 -20
  153. package/js/src/ace.js +18 -14
  154. package/js/src/alpaca.js +6 -6
  155. package/js/src/ascendex.js +35 -29
  156. package/js/src/base/Exchange.d.ts +37 -34
  157. package/js/src/base/Exchange.js +39 -26
  158. package/js/src/base/Precise.d.ts +4 -4
  159. package/js/src/base/Precise.js +1 -3
  160. package/js/src/base/functions/type.d.ts +25 -25
  161. package/js/src/base/types.d.ts +21 -14
  162. package/js/src/base/ws/Client.js +1 -1
  163. package/js/src/bigone.js +25 -21
  164. package/js/src/binance.d.ts +2 -2
  165. package/js/src/binance.js +97 -76
  166. package/js/src/bingx.js +63 -44
  167. package/js/src/bit2c.js +19 -16
  168. package/js/src/bitbank.js +16 -15
  169. package/js/src/bitbns.js +28 -18
  170. package/js/src/bitfinex.js +23 -21
  171. package/js/src/bitfinex2.js +32 -28
  172. package/js/src/bitflyer.js +28 -20
  173. package/js/src/bitforex.js +26 -19
  174. package/js/src/bitget.d.ts +25 -3
  175. package/js/src/bitget.js +184 -147
  176. package/js/src/bithumb.js +23 -16
  177. package/js/src/bitmart.d.ts +1 -1
  178. package/js/src/bitmart.js +110 -89
  179. package/js/src/bitmex.d.ts +2 -2
  180. package/js/src/bitmex.js +104 -64
  181. package/js/src/bitopro.js +38 -26
  182. package/js/src/bitpanda.js +24 -23
  183. package/js/src/bitrue.js +33 -24
  184. package/js/src/bitso.js +24 -23
  185. package/js/src/bitstamp.d.ts +2 -2
  186. package/js/src/bitstamp.js +24 -23
  187. package/js/src/bittrex.js +30 -29
  188. package/js/src/bitvavo.js +38 -30
  189. package/js/src/bl3p.js +11 -10
  190. package/js/src/blockchaincom.js +20 -20
  191. package/js/src/btcalpha.js +18 -17
  192. package/js/src/btcbox.js +13 -12
  193. package/js/src/btcmarkets.js +20 -19
  194. package/js/src/btcturk.js +14 -13
  195. package/js/src/bybit.d.ts +1 -1
  196. package/js/src/bybit.js +84 -54
  197. package/js/src/cex.js +16 -14
  198. package/js/src/coinbase.js +29 -27
  199. package/js/src/coinbasepro.js +27 -25
  200. package/js/src/coincheck.js +15 -14
  201. package/js/src/coinex.d.ts +1 -1
  202. package/js/src/coinex.js +100 -77
  203. package/js/src/coinlist.js +28 -27
  204. package/js/src/coinmate.js +21 -18
  205. package/js/src/coinone.js +21 -16
  206. package/js/src/coinsph.js +37 -28
  207. package/js/src/coinspot.js +12 -11
  208. package/js/src/cryptocom.d.ts +0 -23
  209. package/js/src/cryptocom.js +40 -202
  210. package/js/src/currencycom.js +32 -25
  211. package/js/src/delta.js +35 -29
  212. package/js/src/deribit.js +39 -36
  213. package/js/src/digifinex.d.ts +2 -2
  214. package/js/src/digifinex.js +65 -45
  215. package/js/src/exmo.js +29 -27
  216. package/js/src/gate.d.ts +1 -1
  217. package/js/src/gate.js +67 -53
  218. package/js/src/gemini.js +23 -20
  219. package/js/src/hitbtc.d.ts +1 -0
  220. package/js/src/hitbtc.js +65 -56
  221. package/js/src/hollaex.js +30 -27
  222. package/js/src/htx.d.ts +11 -3
  223. package/js/src/htx.js +132 -143
  224. package/js/src/huobijp.js +23 -21
  225. package/js/src/idex.js +22 -21
  226. package/js/src/independentreserve.js +15 -14
  227. package/js/src/indodax.js +30 -26
  228. package/js/src/kraken.js +29 -27
  229. package/js/src/krakenfutures.js +29 -22
  230. package/js/src/kucoin.d.ts +1 -1
  231. package/js/src/kucoin.js +48 -43
  232. package/js/src/kucoinfutures.js +33 -28
  233. package/js/src/kuna.js +25 -24
  234. package/js/src/latoken.js +25 -23
  235. package/js/src/lbank.js +46 -31
  236. package/js/src/luno.js +22 -19
  237. package/js/src/lykke.js +19 -17
  238. package/js/src/mercado.js +30 -19
  239. package/js/src/mexc.d.ts +1 -1
  240. package/js/src/mexc.js +60 -49
  241. package/js/src/ndax.js +23 -22
  242. package/js/src/novadax.js +23 -22
  243. package/js/src/oceanex.js +22 -19
  244. package/js/src/okcoin.js +29 -23
  245. package/js/src/okx.d.ts +2 -2
  246. package/js/src/okx.js +87 -82
  247. package/js/src/p2b.d.ts +8 -7
  248. package/js/src/p2b.js +79 -81
  249. package/js/src/paymium.js +10 -10
  250. package/js/src/phemex.js +63 -40
  251. package/js/src/poloniex.js +22 -22
  252. package/js/src/poloniexfutures.js +23 -19
  253. package/js/src/pro/alpaca.js +5 -5
  254. package/js/src/pro/ascendex.js +4 -4
  255. package/js/src/pro/binance.js +16 -16
  256. package/js/src/pro/bingx.js +1 -1
  257. package/js/src/pro/bitfinex.js +4 -4
  258. package/js/src/pro/bitfinex2.d.ts +1 -1
  259. package/js/src/pro/bitfinex2.js +6 -6
  260. package/js/src/pro/bitget.js +7 -7
  261. package/js/src/pro/bitmart.js +7 -5
  262. package/js/src/pro/bitmex.js +6 -6
  263. package/js/src/pro/bitopro.js +4 -4
  264. package/js/src/pro/bitpanda.js +6 -6
  265. package/js/src/pro/bitrue.js +2 -2
  266. package/js/src/pro/bitstamp.js +7 -5
  267. package/js/src/pro/bittrex.js +15 -6
  268. package/js/src/pro/bitvavo.js +12 -8
  269. package/js/src/pro/blockchaincom.js +8 -8
  270. package/js/src/pro/bybit.js +7 -7
  271. package/js/src/pro/cex.js +14 -10
  272. package/js/src/pro/coinbase.js +5 -5
  273. package/js/src/pro/coinbasepro.js +12 -11
  274. package/js/src/pro/coinex.js +7 -9
  275. package/js/src/pro/cryptocom.js +9 -9
  276. package/js/src/pro/currencycom.js +4 -4
  277. package/js/src/pro/deribit.js +6 -6
  278. package/js/src/pro/exmo.js +12 -14
  279. package/js/src/pro/gate.js +7 -7
  280. package/js/src/pro/gemini.js +3 -3
  281. package/js/src/pro/hitbtc.d.ts +8 -1
  282. package/js/src/pro/hitbtc.js +264 -5
  283. package/js/src/pro/hollaex.js +5 -5
  284. package/js/src/pro/htx.js +6 -6
  285. package/js/src/pro/huobijp.js +3 -3
  286. package/js/src/pro/idex.js +4 -4
  287. package/js/src/pro/independentreserve.js +2 -2
  288. package/js/src/pro/kraken.js +10 -10
  289. package/js/src/pro/krakenfutures.d.ts +1 -0
  290. package/js/src/pro/krakenfutures.js +42 -18
  291. package/js/src/pro/kucoin.js +7 -7
  292. package/js/src/pro/kucoinfutures.js +8 -6
  293. package/js/src/pro/luno.js +2 -2
  294. package/js/src/pro/mexc.js +6 -6
  295. package/js/src/pro/ndax.js +3 -3
  296. package/js/src/pro/okcoin.js +5 -5
  297. package/js/src/pro/okx.js +12 -12
  298. package/js/src/pro/phemex.js +6 -6
  299. package/js/src/pro/poloniex.js +7 -7
  300. package/js/src/pro/poloniexfutures.js +5 -5
  301. package/js/src/pro/probit.js +6 -6
  302. package/js/src/pro/upbit.js +3 -3
  303. package/js/src/pro/wazirx.js +8 -8
  304. package/js/src/pro/whitebit.js +13 -9
  305. package/js/src/pro/woo.js +1 -1
  306. package/js/src/probit.js +29 -24
  307. package/js/src/tidex.js +16 -15
  308. package/js/src/timex.js +19 -18
  309. package/js/src/tokocrypto.js +28 -23
  310. package/js/src/upbit.js +19 -19
  311. package/js/src/wavesexchange.js +23 -20
  312. package/js/src/wazirx.js +25 -18
  313. package/js/src/whitebit.js +33 -27
  314. package/js/src/woo.js +45 -35
  315. package/js/src/yobit.js +25 -20
  316. package/js/src/zaif.js +9 -9
  317. package/js/src/zonda.js +18 -17
  318. package/package.json +1 -1
package/js/src/gate.d.ts CHANGED
@@ -164,7 +164,7 @@ export default class gate extends Exchange {
164
164
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
165
165
  parseTicker(ticker: any, market?: Market): Ticker;
166
166
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
167
- parseBalanceHelper(entry: any): import("./base/types.js").Balance;
167
+ parseBalanceHelper(entry: any): import("./base/types.js").Account;
168
168
  fetchBalance(params?: {}): Promise<Balances>;
169
169
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
170
170
  fetchOptionOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
package/js/src/gate.js CHANGED
@@ -90,12 +90,11 @@ export default class gate extends Exchange {
90
90
  'createStopOrder': true,
91
91
  'editOrder': true,
92
92
  'fetchBalance': true,
93
- 'fetchBorrowRate': false,
94
93
  'fetchBorrowRateHistories': false,
95
94
  'fetchBorrowRateHistory': false,
96
- 'fetchBorrowRates': false,
97
- 'fetchBorrowRatesPerSymbol': false,
98
95
  'fetchClosedOrders': true,
96
+ 'fetchCrossBorrowRate': false,
97
+ 'fetchCrossBorrowRates': false,
99
98
  'fetchCurrencies': true,
100
99
  'fetchDepositAddress': true,
101
100
  'fetchDeposits': true,
@@ -107,6 +106,8 @@ export default class gate extends Exchange {
107
106
  'fetchFundingRates': true,
108
107
  'fetchGreeks': true,
109
108
  'fetchIndexOHLCV': true,
109
+ 'fetchIsolatedBorrowRate': false,
110
+ 'fetchIsolatedBorrowRates': false,
110
111
  'fetchLedger': true,
111
112
  'fetchLeverage': false,
112
113
  'fetchLeverageTiers': true,
@@ -1682,7 +1683,7 @@ export default class gate extends Exchange {
1682
1683
  * @see https://www.gate.io/docs/developers/apiv4/en/#get-a-single-contract
1683
1684
  * @param {string} symbol unified market symbol
1684
1685
  * @param {object} [params] extra parameters specific to the gate api endpoint
1685
- * @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
1686
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1686
1687
  */
1687
1688
  await this.loadMarkets();
1688
1689
  const market = this.market(symbol);
@@ -1745,7 +1746,7 @@ export default class gate extends Exchange {
1745
1746
  * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts
1746
1747
  * @param {string[]|undefined} symbols list of unified market symbols
1747
1748
  * @param {object} [params] extra parameters specific to the gate api endpoint
1748
- * @returns {object} a dictionary of [funding rates structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rates-structure}, indexe by market symbols
1749
+ * @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexe by market symbols
1749
1750
  */
1750
1751
  await this.loadMarkets();
1751
1752
  symbols = this.marketSymbols(symbols);
@@ -1916,7 +1917,7 @@ export default class gate extends Exchange {
1916
1917
  * @see https://www.gate.io/docs/developers/apiv4/en/#generate-currency-deposit-address
1917
1918
  * @param {string} code unified currency code
1918
1919
  * @param {object} [params] extra parameters specific to the gate api endpoint
1919
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1920
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1920
1921
  */
1921
1922
  await this.loadMarkets();
1922
1923
  const currency = this.currency(code);
@@ -1975,7 +1976,7 @@ export default class gate extends Exchange {
1975
1976
  * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
1976
1977
  * @param {string} symbol unified market symbol
1977
1978
  * @param {object} [params] extra parameters specific to the gate api endpoint
1978
- * @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
1979
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
1979
1980
  */
1980
1981
  await this.loadMarkets();
1981
1982
  const market = this.market(symbol);
@@ -2006,7 +2007,7 @@ export default class gate extends Exchange {
2006
2007
  * @description fetch the trading fees for multiple markets
2007
2008
  * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-personal-trading-fee
2008
2009
  * @param {object} [params] extra parameters specific to the gate api endpoint
2009
- * @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
2010
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
2010
2011
  */
2011
2012
  await this.loadMarkets();
2012
2013
  const response = await this.privateWalletGetFee(params);
@@ -2072,7 +2073,7 @@ export default class gate extends Exchange {
2072
2073
  * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2073
2074
  * @param {string[]|undefined} codes list of unified currency codes
2074
2075
  * @param {object} [params] extra parameters specific to the gate api endpoint
2075
- * @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
2076
+ * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
2076
2077
  */
2077
2078
  await this.loadMarkets();
2078
2079
  const response = await this.privateWalletGetWithdrawStatus(params);
@@ -2130,7 +2131,7 @@ export default class gate extends Exchange {
2130
2131
  * @see https://www.gate.io/docs/developers/apiv4/en/#retrieve-withdrawal-status
2131
2132
  * @param {string[]|undefined} codes list of unified currency codes
2132
2133
  * @param {object} [params] extra parameters specific to the gate api endpoint
2133
- * @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
2134
+ * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
2134
2135
  */
2135
2136
  await this.loadMarkets();
2136
2137
  const response = await this.privateWalletGetWithdrawStatus(params);
@@ -2215,7 +2216,7 @@ export default class gate extends Exchange {
2215
2216
  * @param {int} [since] the earliest time in ms to fetch funding history for
2216
2217
  * @param {int} [limit] the maximum number of funding history structures to retrieve
2217
2218
  * @param {object} [params] extra parameters specific to the gate api endpoint
2218
- * @returns {object} a [funding history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
2219
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
2219
2220
  */
2220
2221
  await this.loadMarkets();
2221
2222
  // let defaultType = 'future';
@@ -2297,7 +2298,7 @@ export default class gate extends Exchange {
2297
2298
  * @param {string} symbol unified symbol of the market to fetch the order book for
2298
2299
  * @param {int} [limit] the maximum amount of order book entries to return
2299
2300
  * @param {object} [params] extra parameters specific to the gate api endpoint
2300
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
2301
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
2301
2302
  */
2302
2303
  await this.loadMarkets();
2303
2304
  const market = this.market(symbol);
@@ -2408,7 +2409,7 @@ export default class gate extends Exchange {
2408
2409
  * @see https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2409
2410
  * @param {string} symbol unified symbol of the market to fetch the ticker for
2410
2411
  * @param {object} [params] extra parameters specific to the gate api endpoint
2411
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
2412
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2412
2413
  */
2413
2414
  await this.loadMarkets();
2414
2415
  const market = this.market(symbol);
@@ -2564,7 +2565,7 @@ export default class gate extends Exchange {
2564
2565
  * @see https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
2565
2566
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2566
2567
  * @param {object} [params] extra parameters specific to the gate api endpoint
2567
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
2568
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2568
2569
  */
2569
2570
  await this.loadMarkets();
2570
2571
  symbols = this.marketSymbols(symbols);
@@ -2914,11 +2915,13 @@ export default class gate extends Exchange {
2914
2915
  * @see https://www.gate.io/docs/developers/apiv4/en/#funding-rate-history
2915
2916
  * @param {string} symbol unified symbol of the market to fetch the funding rate history for
2916
2917
  * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
2917
- * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
2918
+ * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
2918
2919
  * @param {object} [params] extra parameters specific to the gate api endpoint
2919
- * @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
2920
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
2920
2921
  */
2921
- this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
2922
+ if (symbol === undefined) {
2923
+ throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
2924
+ }
2922
2925
  await this.loadMarkets();
2923
2926
  const market = this.market(symbol);
2924
2927
  if (!market['swap']) {
@@ -3013,7 +3016,7 @@ export default class gate extends Exchange {
3013
3016
  * @param {object} [params] extra parameters specific to the gate api endpoint
3014
3017
  * @param {int} [params.until] timestamp in ms of the latest trade to fetch
3015
3018
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3016
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
3019
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
3017
3020
  */
3018
3021
  await this.loadMarkets();
3019
3022
  let paginate = false;
@@ -3119,10 +3122,12 @@ export default class gate extends Exchange {
3119
3122
  * @param {int} [since] the earliest time in ms to fetch trades for
3120
3123
  * @param {int} [limit] the maximum number of trades to retrieve
3121
3124
  * @param {object} [params] extra parameters specific to the binance api endpoint
3122
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
3125
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3123
3126
  */
3127
+ if (symbol === undefined) {
3128
+ throw new ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
3129
+ }
3124
3130
  await this.loadMarkets();
3125
- this.checkRequiredSymbol('fetchOrderTrades', symbol);
3126
3131
  //
3127
3132
  // [
3128
3133
  // {
@@ -3168,7 +3173,7 @@ export default class gate extends Exchange {
3168
3173
  * @param {string} [params.last_id] *contract only* specify list staring point using the id of last record in previous list-query results
3169
3174
  * @param {int} [params.count_total] *contract only* whether to return total number matched, default to 0(no return)
3170
3175
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3171
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
3176
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3172
3177
  */
3173
3178
  await this.loadMarkets();
3174
3179
  let paginate = false;
@@ -3438,7 +3443,7 @@ export default class gate extends Exchange {
3438
3443
  * @param {int} [params.until] end time in ms
3439
3444
  * @param {object} [params] extra parameters specific to the gate api endpoint
3440
3445
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3441
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
3446
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3442
3447
  */
3443
3448
  await this.loadMarkets();
3444
3449
  let paginate = false;
@@ -3476,7 +3481,7 @@ export default class gate extends Exchange {
3476
3481
  * @param {object} [params] extra parameters specific to the gate api endpoint
3477
3482
  * @param {int} [params.until] end time in ms
3478
3483
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3479
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
3484
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3480
3485
  */
3481
3486
  await this.loadMarkets();
3482
3487
  let paginate = false;
@@ -3513,7 +3518,7 @@ export default class gate extends Exchange {
3513
3518
  * @param {string} address the address to withdraw to
3514
3519
  * @param {string} tag
3515
3520
  * @param {object} [params] extra parameters specific to the gate api endpoint
3516
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
3521
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3517
3522
  */
3518
3523
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
3519
3524
  this.checkAddress(address);
@@ -3681,7 +3686,7 @@ export default class gate extends Exchange {
3681
3686
  * @param {bool} [params.close] *contract only* Set as true to close the position, with size set to 0
3682
3687
  * @param {bool} [params.auto_size] *contract only* Set side to close dual-mode position, close_long closes the long side, while close_short the short one, size also needs to be set to 0
3683
3688
  * @param {int} [params.price_type] *contract only* 0 latest deal price, 1 mark price, 2 index price
3684
- * @returns {object|undefined} [An order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
3689
+ * @returns {object|undefined} [An order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3685
3690
  */
3686
3691
  await this.loadMarkets();
3687
3692
  const market = this.market(symbol);
@@ -3796,7 +3801,7 @@ export default class gate extends Exchange {
3796
3801
  * @see https://www.gate.io/docs/developers/apiv4/en/#get-a-single-order-2
3797
3802
  * @see https://www.gate.io/docs/developers/apiv4/en/#create-a-batch-of-orders
3798
3803
  * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
3799
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
3804
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3800
3805
  */
3801
3806
  await this.loadMarkets();
3802
3807
  const ordersRequests = [];
@@ -4089,7 +4094,7 @@ export default class gate extends Exchange {
4089
4094
  * @param {float} amount how much of the currency you want to trade in units of the base currency
4090
4095
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
4091
4096
  * @param {object} [params] extra parameters specific to the gate api endpoint
4092
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
4097
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4093
4098
  */
4094
4099
  await this.loadMarkets();
4095
4100
  const market = this.market(symbol);
@@ -4445,7 +4450,7 @@ export default class gate extends Exchange {
4445
4450
  * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
4446
4451
  * @param {string} [params.type] 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used
4447
4452
  * @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - market settle currency is used if symbol !== undefined, default="usdt" for swap and "btc" for future
4448
- * @returns An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
4453
+ * @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4449
4454
  */
4450
4455
  await this.loadMarkets();
4451
4456
  const stop = this.safeValue2(params, 'is_stop_order', 'stop', false);
@@ -4488,7 +4493,7 @@ export default class gate extends Exchange {
4488
4493
  * @param {bool} [params.stop] true for fetching stop orders
4489
4494
  * @param {string} [params.type] spot, margin, swap or future, if not provided this.options['defaultType'] is used
4490
4495
  * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for type='margin', if not provided this.options['defaultMarginMode'] is used
4491
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
4496
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4492
4497
  */
4493
4498
  return await this.fetchOrdersByStatus('open', symbol, since, limit, params);
4494
4499
  }
@@ -4511,7 +4516,7 @@ export default class gate extends Exchange {
4511
4516
  * @param {bool} [params.stop] true for fetching stop orders
4512
4517
  * @param {string} [params.type] spot, swap or future, if not provided this.options['defaultType'] is used
4513
4518
  * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
4514
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
4519
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4515
4520
  */
4516
4521
  return await this.fetchOrdersByStatus('finished', symbol, since, limit, params);
4517
4522
  }
@@ -4720,7 +4725,7 @@ export default class gate extends Exchange {
4720
4725
  * @param {string} symbol Unified market symbol
4721
4726
  * @param {object} [params] Parameters specified by the exchange api
4722
4727
  * @param {bool} [params.stop] True if the order to be cancelled is a trigger order
4723
- * @returns An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
4728
+ * @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4724
4729
  */
4725
4730
  await this.loadMarkets();
4726
4731
  const market = (symbol === undefined) ? undefined : this.market(symbol);
@@ -4832,7 +4837,7 @@ export default class gate extends Exchange {
4832
4837
  * @see https://www.gate.io/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
4833
4838
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
4834
4839
  * @param {object} [params] extra parameters specific to the gate api endpoint
4835
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
4840
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4836
4841
  */
4837
4842
  await this.loadMarkets();
4838
4843
  const market = (symbol === undefined) ? undefined : this.market(symbol);
@@ -4891,7 +4896,7 @@ export default class gate extends Exchange {
4891
4896
  * @param {string} toAccount the account to transfer currency to
4892
4897
  * @param {object} [params] extra parameters specific to the gate api endpoint
4893
4898
  * @param {string} [params.symbol] Unified market symbol *required for type == margin*
4894
- * @returns A [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
4899
+ * @returns A [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4895
4900
  */
4896
4901
  await this.loadMarkets();
4897
4902
  const currency = this.currency(code);
@@ -4968,7 +4973,9 @@ export default class gate extends Exchange {
4968
4973
  * @param {object} [params] extra parameters specific to the gate api endpoint
4969
4974
  * @returns {object} response from the exchange
4970
4975
  */
4971
- this.checkRequiredSymbol('setLeverage', symbol);
4976
+ if (symbol === undefined) {
4977
+ throw new ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
4978
+ }
4972
4979
  // WARNING: THIS WILL INCREASE LIQUIDATION PRICE FOR OPEN ISOLATED LONG POSITIONS
4973
4980
  // AND DECREASE LIQUIDATION PRICE FOR OPEN ISOLATED SHORT POSITIONS
4974
4981
  if ((leverage < 0) || (leverage > 100)) {
@@ -5145,7 +5152,7 @@ export default class gate extends Exchange {
5145
5152
  * @see https://www.gate.io/docs/developers/apiv4/en/#get-specified-contract-position
5146
5153
  * @param {string} symbol unified market symbol of the market the position is held in
5147
5154
  * @param {object} [params] extra parameters specific to the gate api endpoint
5148
- * @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
5155
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
5149
5156
  */
5150
5157
  await this.loadMarkets();
5151
5158
  const market = this.market(symbol);
@@ -5229,7 +5236,7 @@ export default class gate extends Exchange {
5229
5236
  * @param {object} [params] extra parameters specific to the gate api endpoint
5230
5237
  * @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
5231
5238
  * @param {string} [params.type] swap, future or option, if not provided this.options['defaultType'] is used
5232
- * @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
5239
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
5233
5240
  */
5234
5241
  await this.loadMarkets();
5235
5242
  let market = undefined;
@@ -5331,7 +5338,7 @@ export default class gate extends Exchange {
5331
5338
  * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-futures-contracts-2
5332
5339
  * @param {string[]|undefined} symbols list of unified market symbols
5333
5340
  * @param {object} [params] extra parameters specific to the gate api endpoint
5334
- * @returns {object} a dictionary of [leverage tiers structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}, indexed by market symbols
5341
+ * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
5335
5342
  */
5336
5343
  await this.loadMarkets();
5337
5344
  const [type, query] = this.handleMarketTypeAndParams('fetchLeverageTiers', undefined, params);
@@ -5573,7 +5580,7 @@ export default class gate extends Exchange {
5573
5580
  * @param {object} [params] extra parameters specific to the gate api endpoint
5574
5581
  * @param {string} [params.mode] 'all' or 'partial' payment mode, extra parameter required for isolated margin
5575
5582
  * @param {string} [params.id] '34267567' loan id, extra parameter required for isolated margin
5576
- * @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
5583
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
5577
5584
  */
5578
5585
  const marginMode = this.safeString(params, 'marginMode'); // cross or isolated
5579
5586
  params = this.omit(params, 'marginMode');
@@ -5656,7 +5663,7 @@ export default class gate extends Exchange {
5656
5663
  * @param {string} symbol unified market symbol, required for isolated margin
5657
5664
  * @param {object} [params] extra parameters specific to the gate api endpoint
5658
5665
  * @param {string} [params.rate] '0.0002' or '0.002' extra parameter required for isolated margin
5659
- * @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
5666
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
5660
5667
  */
5661
5668
  const marginMode = this.safeString(params, 'marginMode'); // cross or isolated
5662
5669
  params = this.omit(params, 'marginMode');
@@ -5910,7 +5917,7 @@ export default class gate extends Exchange {
5910
5917
  * @param {string} symbol unified market symbol
5911
5918
  * @param {float} amount the amount of margin to remove
5912
5919
  * @param {object} [params] extra parameters specific to the exmo api endpoint
5913
- * @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#reduce-margin-structure}
5920
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
5914
5921
  */
5915
5922
  return await this.modifyMarginHelper(symbol, -amount, params);
5916
5923
  }
@@ -5924,7 +5931,7 @@ export default class gate extends Exchange {
5924
5931
  * @param {string} symbol unified market symbol
5925
5932
  * @param {float} amount amount of margin to add
5926
5933
  * @param {object} [params] extra parameters specific to the exmo api endpoint
5927
- * @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
5934
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
5928
5935
  */
5929
5936
  return await this.modifyMarginHelper(symbol, amount, params);
5930
5937
  }
@@ -5939,7 +5946,7 @@ export default class gate extends Exchange {
5939
5946
  * @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
5940
5947
  * @param {int} [limit] default 30
5941
5948
  * @param {object} [params] exchange specific parameters
5942
- * @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#open-interest-structure}
5949
+ * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
5943
5950
  */
5944
5951
  await this.loadMarkets();
5945
5952
  let paginate = false;
@@ -6025,9 +6032,11 @@ export default class gate extends Exchange {
6025
6032
  * @param {int} [since] timestamp in ms
6026
6033
  * @param {int} [limit] number of records
6027
6034
  * @param {object} [params] exchange specific params
6028
- * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
6035
+ * @returns {object[]} a list of [settlement history objects]{@link https://docs.ccxt.com/#/?id=settlement-history-structure}
6029
6036
  */
6030
- this.checkRequiredSymbol('fetchSettlementHistory', symbol);
6037
+ if (symbol === undefined) {
6038
+ throw new ArgumentsRequired(this.id + ' fetchSettlementHistory() requires a symbol argument');
6039
+ }
6031
6040
  await this.loadMarkets();
6032
6041
  const market = this.market(symbol);
6033
6042
  let type = undefined;
@@ -6075,7 +6084,9 @@ export default class gate extends Exchange {
6075
6084
  * @param {object} [params] exchange specific params
6076
6085
  * @returns {object[]} a list of [settlement history objects]
6077
6086
  */
6078
- this.checkRequiredSymbol('fetchMySettlementHistory', symbol);
6087
+ if (symbol === undefined) {
6088
+ throw new ArgumentsRequired(this.id + ' fetchMySettlementHistory() requires a symbol argument');
6089
+ }
6079
6090
  await this.loadMarkets();
6080
6091
  const market = this.market(symbol);
6081
6092
  let type = undefined;
@@ -6207,7 +6218,7 @@ export default class gate extends Exchange {
6207
6218
  * @param {object} [params] extra parameters specific to the gate api endpoint
6208
6219
  * @param {int} [params.until] end time in ms
6209
6220
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
6210
- * @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
6221
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
6211
6222
  */
6212
6223
  await this.loadMarkets();
6213
6224
  let paginate = false;
@@ -6461,7 +6472,7 @@ export default class gate extends Exchange {
6461
6472
  * @see https://www.gate.io/docs/developers/apiv4/en/#list-all-underlyings
6462
6473
  * @param {object} [params] exchange specific params
6463
6474
  * @param {string} [params.type] the contract market type, 'option', 'swap' or 'future', the default is 'option'
6464
- * @returns {object[]} a list of [underlying assets]{@link https://github.com/ccxt/ccxt/wiki/Manual#underlying-assets-structure}
6475
+ * @returns {object[]} a list of [underlying assets]{@link https://docs.ccxt.com/#/?id=underlying-assets-structure}
6465
6476
  */
6466
6477
  await this.loadMarkets();
6467
6478
  let marketType = undefined;
@@ -6503,7 +6514,7 @@ export default class gate extends Exchange {
6503
6514
  * @param {int} [limit] the maximum number of liquidation structures to retrieve
6504
6515
  * @param {object} [params] exchange specific parameters for the gate api endpoint
6505
6516
  * @param {int} [params.until] timestamp in ms of the latest liquidation
6506
- * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
6517
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
6507
6518
  */
6508
6519
  await this.loadMarkets();
6509
6520
  const market = this.market(symbol);
@@ -6548,9 +6559,11 @@ export default class gate extends Exchange {
6548
6559
  * @param {int} [since] the earliest time in ms to fetch liquidations for
6549
6560
  * @param {int} [limit] the maximum number of liquidation structures to retrieve
6550
6561
  * @param {object} [params] exchange specific parameters for the gate api endpoint
6551
- * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
6562
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
6552
6563
  */
6553
- this.checkRequiredSymbol('fetchMyLiquidations', symbol);
6564
+ if (symbol === undefined) {
6565
+ throw new ArgumentsRequired(this.id + ' fetchMyLiquidations() requires a symbol argument');
6566
+ }
6554
6567
  await this.loadMarkets();
6555
6568
  const market = this.market(symbol);
6556
6569
  const request = {
@@ -6658,8 +6671,9 @@ export default class gate extends Exchange {
6658
6671
  //
6659
6672
  const marketId = this.safeString(liquidation, 'contract');
6660
6673
  const timestamp = this.safeTimestamp(liquidation, 'time');
6661
- const contractsStringRaw = this.safeString2(liquidation, 'size', 'settle_size');
6662
- const contractsString = Precise.stringAbs(contractsStringRaw);
6674
+ const size = this.safeString2(liquidation, 'size', 'settle_size');
6675
+ const left = this.safeString(liquidation, 'left', '0');
6676
+ const contractsString = Precise.stringAbs(Precise.stringSub(size, left));
6663
6677
  const contractSizeString = this.safeString(market, 'contractSize');
6664
6678
  const priceString = this.safeString2(liquidation, 'liq_price', 'fill_price');
6665
6679
  const baseValueString = Precise.stringMul(contractsString, contractSizeString);
@@ -6687,7 +6701,7 @@ export default class gate extends Exchange {
6687
6701
  * @see https://www.gate.io/docs/developers/apiv4/en/#list-tickers-of-options-contracts
6688
6702
  * @param {string} symbol unified symbol of the market to fetch greeks for
6689
6703
  * @param {object} [params] extra parameters specific to the gate api endpoint
6690
- * @returns {object} a [greeks structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#greeks-structure}
6704
+ * @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
6691
6705
  */
6692
6706
  await this.loadMarkets();
6693
6707
  const market = this.market(symbol);
package/js/src/gemini.js CHANGED
@@ -41,12 +41,11 @@ export default class gemini extends Exchange {
41
41
  'createReduceOnlyOrder': false,
42
42
  'fetchBalance': true,
43
43
  'fetchBidsAsks': false,
44
- 'fetchBorrowRate': false,
45
44
  'fetchBorrowRateHistories': false,
46
45
  'fetchBorrowRateHistory': false,
47
- 'fetchBorrowRates': false,
48
- 'fetchBorrowRatesPerSymbol': false,
49
46
  'fetchClosedOrders': false,
47
+ 'fetchCrossBorrowRate': false,
48
+ 'fetchCrossBorrowRates': false,
50
49
  'fetchCurrencies': true,
51
50
  'fetchDepositAddress': true,
52
51
  'fetchDepositAddressesByNetwork': true,
@@ -56,6 +55,8 @@ export default class gemini extends Exchange {
56
55
  'fetchFundingRateHistory': false,
57
56
  'fetchFundingRates': false,
58
57
  'fetchIndexOHLCV': false,
58
+ 'fetchIsolatedBorrowRate': false,
59
+ 'fetchIsolatedBorrowRates': false,
59
60
  'fetchLeverage': false,
60
61
  'fetchLeverageTiers': false,
61
62
  'fetchMarginMode': false,
@@ -657,7 +658,7 @@ export default class gemini extends Exchange {
657
658
  * @param {string} symbol unified symbol of the market to fetch the order book for
658
659
  * @param {int} [limit] the maximum amount of order book entries to return
659
660
  * @param {object} [params] extra parameters specific to the gemini api endpoint
660
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
661
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
661
662
  */
662
663
  await this.loadMarkets();
663
664
  const market = this.market(symbol);
@@ -735,7 +736,7 @@ export default class gemini extends Exchange {
735
736
  * @param {string} symbol unified symbol of the market to fetch the ticker for
736
737
  * @param {object} [params] extra parameters specific to the gemini api endpoint
737
738
  * @param {object} [params.fetchTickerMethod] 'fetchTickerV2', 'fetchTickerV1' or 'fetchTickerV1AndV2' - 'fetchTickerV1' for original ccxt.gemini.fetchTicker - 'fetchTickerV1AndV2' for 2 api calls to get the result of both fetchTicker methods - default = 'fetchTickerV1'
738
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
739
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
739
740
  */
740
741
  const method = this.safeValue(this.options, 'fetchTickerMethod', 'fetchTickerV1');
741
742
  if (method === 'fetchTickerV1') {
@@ -847,7 +848,7 @@ export default class gemini extends Exchange {
847
848
  * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
848
849
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
849
850
  * @param {object} [params] extra parameters specific to the gemini api endpoint
850
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
851
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
851
852
  */
852
853
  await this.loadMarkets();
853
854
  const response = await this.publicGetV1Pricefeed(params);
@@ -940,7 +941,7 @@ export default class gemini extends Exchange {
940
941
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
941
942
  * @param {int} [limit] the maximum amount of trades to fetch
942
943
  * @param {object} [params] extra parameters specific to the gemini api endpoint
943
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
944
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
944
945
  */
945
946
  await this.loadMarkets();
946
947
  const market = this.market(symbol);
@@ -988,7 +989,7 @@ export default class gemini extends Exchange {
988
989
  * @name gemini#fetchTradingFees
989
990
  * @description fetch the trading fees for multiple markets
990
991
  * @param {object} [params] extra parameters specific to the gemini api endpoint
991
- * @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
992
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
992
993
  */
993
994
  await this.loadMarkets();
994
995
  const response = await this.privatePostV1Notionalvolume(params);
@@ -1046,7 +1047,7 @@ export default class gemini extends Exchange {
1046
1047
  * @name gemini#fetchBalance
1047
1048
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1048
1049
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1049
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1050
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1050
1051
  */
1051
1052
  await this.loadMarkets();
1052
1053
  const response = await this.privatePostV1Balances(params);
@@ -1228,7 +1229,7 @@ export default class gemini extends Exchange {
1228
1229
  * @description fetches information on an order made by the user
1229
1230
  * @param {string} symbol unified symbol of the market the order was made in
1230
1231
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1231
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1232
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1232
1233
  */
1233
1234
  await this.loadMarkets();
1234
1235
  const request = {
@@ -1269,7 +1270,7 @@ export default class gemini extends Exchange {
1269
1270
  * @param {int} [since] the earliest time in ms to fetch open orders for
1270
1271
  * @param {int} [limit] the maximum number of open orders structures to retrieve
1271
1272
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1272
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1273
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1273
1274
  */
1274
1275
  await this.loadMarkets();
1275
1276
  const response = await this.privatePostV1Orders(params);
@@ -1316,7 +1317,7 @@ export default class gemini extends Exchange {
1316
1317
  * @param {float} amount how much of currency you want to trade in units of base currency
1317
1318
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1318
1319
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1319
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1320
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1320
1321
  */
1321
1322
  await this.loadMarkets();
1322
1323
  if (type !== 'limit') {
@@ -1410,7 +1411,7 @@ export default class gemini extends Exchange {
1410
1411
  * @param {string} id order id
1411
1412
  * @param {string} symbol unified symbol of the market the order was made in
1412
1413
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1413
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1414
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1414
1415
  */
1415
1416
  await this.loadMarkets();
1416
1417
  const request = {
@@ -1452,9 +1453,11 @@ export default class gemini extends Exchange {
1452
1453
  * @param {int} [since] the earliest time in ms to fetch trades for
1453
1454
  * @param {int} [limit] the maximum number of trades structures to retrieve
1454
1455
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1455
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1456
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1456
1457
  */
1457
- this.checkRequiredSymbol('fetchMyTrades', symbol);
1458
+ if (symbol === undefined) {
1459
+ throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
1460
+ }
1458
1461
  await this.loadMarkets();
1459
1462
  const market = this.market(symbol);
1460
1463
  const request = {
@@ -1479,7 +1482,7 @@ export default class gemini extends Exchange {
1479
1482
  * @param {string} address the address to withdraw to
1480
1483
  * @param {string} tag
1481
1484
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1482
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1485
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1483
1486
  */
1484
1487
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
1485
1488
  this.checkAddress(address);
@@ -1536,7 +1539,7 @@ export default class gemini extends Exchange {
1536
1539
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
1537
1540
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
1538
1541
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1539
- * @returns {object} a list of [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1542
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1540
1543
  */
1541
1544
  await this.loadMarkets();
1542
1545
  const request = {};
@@ -1640,7 +1643,7 @@ export default class gemini extends Exchange {
1640
1643
  * @param {string} code unified currency code
1641
1644
  * @param {object} [params] extra parameters specific to the endpoint
1642
1645
  * @param {string} [params.network] *required* The chain of currency
1643
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1646
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1644
1647
  */
1645
1648
  await this.loadMarkets();
1646
1649
  const groupedByNetwork = await this.fetchDepositAddressesByNetwork(code, params);
@@ -1658,7 +1661,7 @@ export default class gemini extends Exchange {
1658
1661
  * @param {string} code unified currency code of the currency for the deposit address
1659
1662
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1660
1663
  * @param {string} [params.network] *required* The chain of currency
1661
- * @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
1664
+ * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
1662
1665
  */
1663
1666
  await this.loadMarkets();
1664
1667
  const currency = this.currency(code);
@@ -1745,7 +1748,7 @@ export default class gemini extends Exchange {
1745
1748
  * @description create a currency deposit address
1746
1749
  * @param {string} code unified currency code of the currency for the deposit address
1747
1750
  * @param {object} [params] extra parameters specific to the gemini api endpoint
1748
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1751
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1749
1752
  */
1750
1753
  await this.loadMarkets();
1751
1754
  const currency = this.currency(code);