ccxt 4.1.55 → 4.1.57

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 (328) hide show
  1. package/.git-templates/hooks/pre-push +2 -2
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +6 -6
  4. package/build.sh +30 -8
  5. package/dist/ccxt.browser.js +5592 -4907
  6. package/dist/ccxt.browser.min.js +13 -13
  7. package/dist/cjs/ccxt.js +1 -1
  8. package/dist/cjs/src/ace.js +17 -13
  9. package/dist/cjs/src/alpaca.js +6 -6
  10. package/dist/cjs/src/ascendex.js +35 -29
  11. package/dist/cjs/src/base/Exchange.js +39 -26
  12. package/dist/cjs/src/base/Precise.js +1 -3
  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 +17 -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 +129 -94
  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 +101 -78
  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 +135 -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 +92 -84
  82. package/dist/cjs/src/p2b.js +80 -83
  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 +6 -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/bitbank.d.ts +1 -0
  152. package/js/src/abstract/bybit.d.ts +1 -0
  153. package/js/src/abstract/cryptocom.d.ts +0 -20
  154. package/js/src/abstract/htx.d.ts +3 -0
  155. package/js/src/abstract/huobi.d.ts +3 -0
  156. package/js/src/abstract/huobipro.d.ts +3 -0
  157. package/js/src/abstract/okex.d.ts +3 -1
  158. package/js/src/abstract/okex5.d.ts +3 -1
  159. package/js/src/abstract/okx.d.ts +3 -1
  160. package/js/src/ace.js +18 -14
  161. package/js/src/alpaca.js +6 -6
  162. package/js/src/ascendex.js +35 -29
  163. package/js/src/base/Exchange.d.ts +37 -34
  164. package/js/src/base/Exchange.js +39 -26
  165. package/js/src/base/Precise.d.ts +4 -4
  166. package/js/src/base/Precise.js +1 -3
  167. package/js/src/base/functions/type.d.ts +25 -25
  168. package/js/src/base/types.d.ts +21 -14
  169. package/js/src/bigone.js +25 -21
  170. package/js/src/binance.d.ts +2 -2
  171. package/js/src/binance.js +97 -76
  172. package/js/src/bingx.js +63 -44
  173. package/js/src/bit2c.js +19 -16
  174. package/js/src/bitbank.js +17 -15
  175. package/js/src/bitbns.js +28 -18
  176. package/js/src/bitfinex.js +23 -21
  177. package/js/src/bitfinex2.js +32 -28
  178. package/js/src/bitflyer.js +28 -20
  179. package/js/src/bitforex.js +26 -19
  180. package/js/src/bitget.d.ts +25 -3
  181. package/js/src/bitget.js +184 -147
  182. package/js/src/bithumb.js +23 -16
  183. package/js/src/bitmart.d.ts +1 -1
  184. package/js/src/bitmart.js +129 -94
  185. package/js/src/bitmex.d.ts +2 -2
  186. package/js/src/bitmex.js +104 -64
  187. package/js/src/bitopro.js +38 -26
  188. package/js/src/bitpanda.js +24 -23
  189. package/js/src/bitrue.js +33 -24
  190. package/js/src/bitso.js +24 -23
  191. package/js/src/bitstamp.d.ts +2 -2
  192. package/js/src/bitstamp.js +24 -23
  193. package/js/src/bittrex.js +30 -29
  194. package/js/src/bitvavo.js +38 -30
  195. package/js/src/bl3p.js +11 -10
  196. package/js/src/blockchaincom.js +20 -20
  197. package/js/src/btcalpha.js +18 -17
  198. package/js/src/btcbox.js +13 -12
  199. package/js/src/btcmarkets.js +20 -19
  200. package/js/src/btcturk.js +14 -13
  201. package/js/src/bybit.d.ts +1 -1
  202. package/js/src/bybit.js +84 -54
  203. package/js/src/cex.js +16 -14
  204. package/js/src/coinbase.js +29 -27
  205. package/js/src/coinbasepro.js +27 -25
  206. package/js/src/coincheck.js +15 -14
  207. package/js/src/coinex.d.ts +1 -1
  208. package/js/src/coinex.js +101 -78
  209. package/js/src/coinlist.js +28 -27
  210. package/js/src/coinmate.js +21 -18
  211. package/js/src/coinone.js +21 -16
  212. package/js/src/coinsph.js +37 -28
  213. package/js/src/coinspot.js +12 -11
  214. package/js/src/cryptocom.d.ts +0 -23
  215. package/js/src/cryptocom.js +40 -202
  216. package/js/src/currencycom.js +32 -25
  217. package/js/src/delta.js +35 -29
  218. package/js/src/deribit.js +39 -36
  219. package/js/src/digifinex.d.ts +2 -2
  220. package/js/src/digifinex.js +65 -45
  221. package/js/src/exmo.js +29 -27
  222. package/js/src/gate.d.ts +1 -1
  223. package/js/src/gate.js +67 -53
  224. package/js/src/gemini.js +23 -20
  225. package/js/src/hitbtc.d.ts +1 -0
  226. package/js/src/hitbtc.js +65 -56
  227. package/js/src/hollaex.js +30 -27
  228. package/js/src/htx.d.ts +11 -3
  229. package/js/src/htx.js +135 -143
  230. package/js/src/huobijp.js +23 -21
  231. package/js/src/idex.js +22 -21
  232. package/js/src/independentreserve.js +15 -14
  233. package/js/src/indodax.js +30 -26
  234. package/js/src/kraken.js +29 -27
  235. package/js/src/krakenfutures.js +29 -22
  236. package/js/src/kucoin.d.ts +1 -1
  237. package/js/src/kucoin.js +48 -43
  238. package/js/src/kucoinfutures.js +33 -28
  239. package/js/src/kuna.js +25 -24
  240. package/js/src/latoken.js +25 -23
  241. package/js/src/lbank.js +46 -31
  242. package/js/src/luno.js +22 -19
  243. package/js/src/lykke.js +19 -17
  244. package/js/src/mercado.js +30 -19
  245. package/js/src/mexc.d.ts +1 -1
  246. package/js/src/mexc.js +60 -49
  247. package/js/src/ndax.js +23 -22
  248. package/js/src/novadax.js +23 -22
  249. package/js/src/oceanex.js +22 -19
  250. package/js/src/okcoin.js +29 -23
  251. package/js/src/okx.d.ts +2 -2
  252. package/js/src/okx.js +92 -84
  253. package/js/src/p2b.d.ts +8 -7
  254. package/js/src/p2b.js +80 -82
  255. package/js/src/paymium.js +10 -10
  256. package/js/src/phemex.js +63 -40
  257. package/js/src/poloniex.js +22 -22
  258. package/js/src/poloniexfutures.js +23 -19
  259. package/js/src/pro/alpaca.js +5 -5
  260. package/js/src/pro/ascendex.js +4 -4
  261. package/js/src/pro/binance.js +16 -16
  262. package/js/src/pro/bingx.js +1 -1
  263. package/js/src/pro/bitfinex.js +4 -4
  264. package/js/src/pro/bitfinex2.d.ts +1 -1
  265. package/js/src/pro/bitfinex2.js +6 -6
  266. package/js/src/pro/bitget.js +7 -7
  267. package/js/src/pro/bitmart.js +7 -5
  268. package/js/src/pro/bitmex.js +6 -6
  269. package/js/src/pro/bitopro.js +4 -4
  270. package/js/src/pro/bitpanda.js +6 -6
  271. package/js/src/pro/bitrue.js +2 -2
  272. package/js/src/pro/bitstamp.js +7 -5
  273. package/js/src/pro/bittrex.js +6 -6
  274. package/js/src/pro/bitvavo.js +12 -8
  275. package/js/src/pro/blockchaincom.js +8 -8
  276. package/js/src/pro/bybit.js +7 -7
  277. package/js/src/pro/cex.js +14 -10
  278. package/js/src/pro/coinbase.js +5 -5
  279. package/js/src/pro/coinbasepro.js +12 -11
  280. package/js/src/pro/coinex.js +7 -9
  281. package/js/src/pro/cryptocom.js +9 -9
  282. package/js/src/pro/currencycom.js +4 -4
  283. package/js/src/pro/deribit.js +6 -6
  284. package/js/src/pro/exmo.js +12 -14
  285. package/js/src/pro/gate.js +7 -7
  286. package/js/src/pro/gemini.js +3 -3
  287. package/js/src/pro/hitbtc.d.ts +8 -1
  288. package/js/src/pro/hitbtc.js +264 -5
  289. package/js/src/pro/hollaex.js +5 -5
  290. package/js/src/pro/htx.js +6 -6
  291. package/js/src/pro/huobijp.js +3 -3
  292. package/js/src/pro/idex.js +4 -4
  293. package/js/src/pro/independentreserve.js +2 -2
  294. package/js/src/pro/kraken.js +10 -10
  295. package/js/src/pro/krakenfutures.d.ts +1 -0
  296. package/js/src/pro/krakenfutures.js +42 -18
  297. package/js/src/pro/kucoin.js +7 -7
  298. package/js/src/pro/kucoinfutures.js +8 -6
  299. package/js/src/pro/luno.js +2 -2
  300. package/js/src/pro/mexc.js +6 -6
  301. package/js/src/pro/ndax.js +3 -3
  302. package/js/src/pro/okcoin.js +5 -5
  303. package/js/src/pro/okx.js +12 -12
  304. package/js/src/pro/phemex.js +6 -6
  305. package/js/src/pro/poloniex.js +7 -7
  306. package/js/src/pro/poloniexfutures.js +5 -5
  307. package/js/src/pro/probit.js +6 -6
  308. package/js/src/pro/upbit.js +3 -3
  309. package/js/src/pro/wazirx.js +8 -8
  310. package/js/src/pro/whitebit.js +13 -9
  311. package/js/src/pro/woo.js +1 -1
  312. package/js/src/probit.js +29 -24
  313. package/js/src/tidex.js +16 -15
  314. package/js/src/timex.js +19 -18
  315. package/js/src/tokocrypto.js +28 -23
  316. package/js/src/upbit.js +19 -19
  317. package/js/src/wavesexchange.js +23 -20
  318. package/js/src/wazirx.js +25 -18
  319. package/js/src/whitebit.js +33 -27
  320. package/js/src/woo.js +45 -35
  321. package/js/src/yobit.js +25 -20
  322. package/js/src/zaif.js +9 -9
  323. package/js/src/zonda.js +18 -17
  324. package/package.json +2 -2
  325. package/js/src/bitstamp1.d.ts +0 -28
  326. package/js/src/bitstamp1.js +0 -430
  327. package/js/src/lbank2.d.ts +0 -90
  328. package/js/src/lbank2.js +0 -2779
package/js/src/cex.js CHANGED
@@ -468,7 +468,7 @@ export default class cex extends Exchange {
468
468
  * @name cex#fetchBalance
469
469
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
470
470
  * @param {object} [params] extra parameters specific to the cex api endpoint
471
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
471
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
472
472
  */
473
473
  await this.loadMarkets();
474
474
  const response = await this.privatePostBalance(params);
@@ -482,7 +482,7 @@ export default class cex extends Exchange {
482
482
  * @param {string} symbol unified symbol of the market to fetch the order book for
483
483
  * @param {int} [limit] the maximum amount of order book entries to return
484
484
  * @param {object} [params] extra parameters specific to the cex api endpoint
485
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
485
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
486
486
  */
487
487
  await this.loadMarkets();
488
488
  const market = this.market(symbol);
@@ -601,7 +601,7 @@ export default class cex extends Exchange {
601
601
  * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
602
602
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
603
603
  * @param {object} [params] extra parameters specific to the cex api endpoint
604
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
604
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
605
605
  */
606
606
  await this.loadMarkets();
607
607
  symbols = this.marketSymbols(symbols);
@@ -628,7 +628,7 @@ export default class cex extends Exchange {
628
628
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
629
629
  * @param {string} symbol unified symbol of the market to fetch the ticker for
630
630
  * @param {object} [params] extra parameters specific to the cex api endpoint
631
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
631
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
632
632
  */
633
633
  await this.loadMarkets();
634
634
  const market = this.market(symbol);
@@ -682,7 +682,7 @@ export default class cex extends Exchange {
682
682
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
683
683
  * @param {int} [limit] the maximum amount of trades to fetch
684
684
  * @param {object} [params] extra parameters specific to the cex api endpoint
685
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
685
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
686
686
  */
687
687
  await this.loadMarkets();
688
688
  const market = this.market(symbol);
@@ -698,7 +698,7 @@ export default class cex extends Exchange {
698
698
  * @name cex#fetchTradingFees
699
699
  * @description fetch the trading fees for multiple markets
700
700
  * @param {object} [params] extra parameters specific to the cex api endpoint
701
- * @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
701
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
702
702
  */
703
703
  await this.loadMarkets();
704
704
  const response = await this.privatePostGetMyfee(params);
@@ -745,7 +745,7 @@ export default class cex extends Exchange {
745
745
  * @param {float} amount how much of currency you want to trade in units of base currency
746
746
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
747
747
  * @param {object} [params] extra parameters specific to the cex api endpoint
748
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
748
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
749
749
  */
750
750
  // for market buy it requires the amount of quote currency to spend
751
751
  if ((type === 'market') && (side === 'buy')) {
@@ -824,7 +824,7 @@ export default class cex extends Exchange {
824
824
  * @param {string} id order id
825
825
  * @param {string} symbol not used by cex cancelOrder ()
826
826
  * @param {object} [params] extra parameters specific to the cex api endpoint
827
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
827
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
828
828
  */
829
829
  await this.loadMarkets();
830
830
  const request = {
@@ -1109,7 +1109,7 @@ export default class cex extends Exchange {
1109
1109
  * @param {int} [since] the earliest time in ms to fetch open orders for
1110
1110
  * @param {int} [limit] the maximum number of open orders structures to retrieve
1111
1111
  * @param {object} [params] extra parameters specific to the cex api endpoint
1112
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1112
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1113
1113
  */
1114
1114
  await this.loadMarkets();
1115
1115
  const request = {};
@@ -1135,9 +1135,11 @@ export default class cex extends Exchange {
1135
1135
  * @param {int} [since] the earliest time in ms to fetch orders for
1136
1136
  * @param {int} [limit] the maximum number of order structures to retrieve
1137
1137
  * @param {object} [params] extra parameters specific to the cex api endpoint
1138
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1138
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1139
1139
  */
1140
- this.checkRequiredSymbol('fetchClosedOrders', symbol);
1140
+ if (symbol === undefined) {
1141
+ throw new ArgumentsRequired(this.id + ' fetchClosedOrders() requires a symbol argument');
1142
+ }
1141
1143
  await this.loadMarkets();
1142
1144
  const method = 'privatePostArchivedOrdersPair';
1143
1145
  const market = this.market(symbol);
@@ -1152,7 +1154,7 @@ export default class cex extends Exchange {
1152
1154
  * @description fetches information on an order made by the user
1153
1155
  * @param {string} symbol not used by cex fetchOrder
1154
1156
  * @param {object} [params] extra parameters specific to the cex api endpoint
1155
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1157
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1156
1158
  */
1157
1159
  await this.loadMarkets();
1158
1160
  const request = {
@@ -1271,7 +1273,7 @@ export default class cex extends Exchange {
1271
1273
  * @param {int} [since] the earliest time in ms to fetch orders for
1272
1274
  * @param {int} [limit] the maximum number of orde structures to retrieve
1273
1275
  * @param {object} [params] extra parameters specific to the cex api endpoint
1274
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1276
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1275
1277
  */
1276
1278
  await this.loadMarkets();
1277
1279
  const market = this.market(symbol);
@@ -1514,7 +1516,7 @@ export default class cex extends Exchange {
1514
1516
  * @description fetch the deposit address for a currency associated with this account
1515
1517
  * @param {string} code unified currency code
1516
1518
  * @param {object} [params] extra parameters specific to the cex api endpoint
1517
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1519
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1518
1520
  */
1519
1521
  await this.loadMarkets();
1520
1522
  const currency = this.currency(code);
@@ -53,13 +53,12 @@ export default class coinbase extends Exchange {
53
53
  'fetchAccounts': true,
54
54
  'fetchBalance': true,
55
55
  'fetchBidsAsks': true,
56
- 'fetchBorrowRate': false,
57
56
  'fetchBorrowRateHistories': false,
58
57
  'fetchBorrowRateHistory': false,
59
- 'fetchBorrowRates': false,
60
- 'fetchBorrowRatesPerSymbol': false,
61
58
  'fetchCanceledOrders': true,
62
59
  'fetchClosedOrders': true,
60
+ 'fetchCrossBorrowRate': false,
61
+ 'fetchCrossBorrowRates': false,
63
62
  'fetchCurrencies': true,
64
63
  'fetchDeposits': true,
65
64
  'fetchFundingHistory': false,
@@ -67,6 +66,8 @@ export default class coinbase extends Exchange {
67
66
  'fetchFundingRateHistory': false,
68
67
  'fetchFundingRates': false,
69
68
  'fetchIndexOHLCV': false,
69
+ 'fetchIsolatedBorrowRate': false,
70
+ 'fetchIsolatedBorrowRates': false,
70
71
  'fetchL2OrderBook': false,
71
72
  'fetchLedger': true,
72
73
  'fetchLeverage': false,
@@ -326,7 +327,7 @@ export default class coinbase extends Exchange {
326
327
  * @description fetch all the accounts associated with a profile
327
328
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
328
329
  * @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)
329
- * @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
330
+ * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
330
331
  */
331
332
  const method = this.safeString(this.options, 'fetchAccounts', 'fetchAccountsV3');
332
333
  if (method === 'fetchAccountsV3') {
@@ -529,7 +530,7 @@ export default class coinbase extends Exchange {
529
530
  * @description create a currency deposit address
530
531
  * @param {string} code unified currency code of the currency for the deposit address
531
532
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
532
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
533
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
533
534
  */
534
535
  let accountId = this.safeString(params, 'account_id');
535
536
  params = this.omit(params, 'account_id');
@@ -605,7 +606,7 @@ export default class coinbase extends Exchange {
605
606
  * @param {int} [since] timestamp in ms of the earliest sell, default is undefined
606
607
  * @param {int} [limit] max number of sells to return, default is undefined
607
608
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
608
- * @returns {object} a [list of order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
609
+ * @returns {object} a [list of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
609
610
  */
610
611
  // v2 did't have an endpoint for all historical trades
611
612
  const request = this.prepareAccountRequest(limit, params);
@@ -623,7 +624,7 @@ export default class coinbase extends Exchange {
623
624
  * @param {int} [since] timestamp in ms of the earliest buy, default is undefined
624
625
  * @param {int} [limit] max number of buys to return, default is undefined
625
626
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
626
- * @returns {object} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
627
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
627
628
  */
628
629
  // v2 did't have an endpoint for all historical trades
629
630
  const request = this.prepareAccountRequest(limit, params);
@@ -648,7 +649,7 @@ export default class coinbase extends Exchange {
648
649
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
649
650
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
650
651
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
651
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
652
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
652
653
  */
653
654
  // fiat only, for crypto transactions use fetchLedger
654
655
  return await this.fetchTransactionsWithMethod('v2PrivateGetAccountsAccountIdWithdrawals', code, since, limit, params);
@@ -662,7 +663,7 @@ export default class coinbase extends Exchange {
662
663
  * @param {int} [since] the earliest time in ms to fetch deposits for
663
664
  * @param {int} [limit] the maximum number of deposits structures to retrieve
664
665
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
665
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
666
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
666
667
  */
667
668
  // fiat only, for crypto transactions use fetchLedger
668
669
  return await this.fetchTransactionsWithMethod('v2PrivateGetAccountsAccountIdDeposits', code, since, limit, params);
@@ -915,6 +916,7 @@ export default class coinbase extends Exchange {
915
916
  /**
916
917
  * @method
917
918
  * @name coinbase#fetchMarkets
919
+ * @see https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_getproducts
918
920
  * @description retrieves data on all markets for coinbase
919
921
  * @param {object} [params] extra parameters specific to the exchange api endpoint
920
922
  * @returns {object[]} an array of objects representing market data
@@ -1091,7 +1093,7 @@ export default class coinbase extends Exchange {
1091
1093
  'optionType': undefined,
1092
1094
  'precision': {
1093
1095
  'amount': this.safeNumber(market, 'base_increment'),
1094
- 'price': this.safeNumber(market, 'quote_increment'),
1096
+ 'price': this.safeNumber2(market, 'price_increment', 'quote_increment'),
1095
1097
  },
1096
1098
  'limits': {
1097
1099
  'leverage': {
@@ -1215,7 +1217,7 @@ export default class coinbase extends Exchange {
1215
1217
  * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1216
1218
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1217
1219
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
1218
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1220
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1219
1221
  */
1220
1222
  const method = this.safeString(this.options, 'fetchTickers', 'fetchTickersV3');
1221
1223
  if (method === 'fetchTickersV3') {
@@ -1316,7 +1318,7 @@ export default class coinbase extends Exchange {
1316
1318
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1317
1319
  * @param {string} symbol unified symbol of the market to fetch the ticker for
1318
1320
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
1319
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1321
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1320
1322
  */
1321
1323
  const method = this.safeString(this.options, 'fetchTicker', 'fetchTickerV3');
1322
1324
  if (method === 'fetchTickerV3') {
@@ -1539,7 +1541,7 @@ export default class coinbase extends Exchange {
1539
1541
  * @name coinbase#fetchBalance
1540
1542
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1541
1543
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
1542
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1544
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1543
1545
  */
1544
1546
  await this.loadMarkets();
1545
1547
  const request = {
@@ -1597,7 +1599,7 @@ export default class coinbase extends Exchange {
1597
1599
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
1598
1600
  * @param {int} [limit] max number of ledger entrys to return, default is undefined
1599
1601
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
1600
- * @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
1602
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
1601
1603
  */
1602
1604
  await this.loadMarkets();
1603
1605
  let currency = undefined;
@@ -2004,7 +2006,7 @@ export default class coinbase extends Exchange {
2004
2006
  * @param {string} [params.timeInForce] 'GTC', 'IOC', 'GTD' or 'PO'
2005
2007
  * @param {string} [params.stop_direction] 'UNKNOWN_STOP_DIRECTION', 'STOP_DIRECTION_STOP_UP', 'STOP_DIRECTION_STOP_DOWN' the direction the stopPrice is triggered from
2006
2008
  * @param {string} [params.end_time] '2023-05-25T17:01:05.092Z' for 'GTD' orders
2007
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2009
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2008
2010
  */
2009
2011
  await this.loadMarkets();
2010
2012
  const market = this.market(symbol);
@@ -2320,7 +2322,7 @@ export default class coinbase extends Exchange {
2320
2322
  * @param {string} id order id
2321
2323
  * @param {string} symbol not used by coinbase cancelOrder()
2322
2324
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2323
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2325
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2324
2326
  */
2325
2327
  await this.loadMarkets();
2326
2328
  const orders = await this.cancelOrders([id], symbol, params);
@@ -2335,7 +2337,7 @@ export default class coinbase extends Exchange {
2335
2337
  * @param {string[]} ids order ids
2336
2338
  * @param {string} symbol not used by coinbase cancelOrders()
2337
2339
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2338
- * @returns {object} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2340
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2339
2341
  */
2340
2342
  await this.loadMarkets();
2341
2343
  let market = undefined;
@@ -2380,7 +2382,7 @@ export default class coinbase extends Exchange {
2380
2382
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
2381
2383
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2382
2384
  * @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
2383
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2385
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2384
2386
  */
2385
2387
  await this.loadMarkets();
2386
2388
  const market = this.market(symbol);
@@ -2422,7 +2424,7 @@ export default class coinbase extends Exchange {
2422
2424
  * @param {string} id the order id
2423
2425
  * @param {string} symbol unified market symbol that the order was made in
2424
2426
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2425
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2427
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2426
2428
  */
2427
2429
  await this.loadMarkets();
2428
2430
  let market = undefined;
@@ -2487,7 +2489,7 @@ export default class coinbase extends Exchange {
2487
2489
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2488
2490
  * @param {int} [params.until] the latest time in ms to fetch trades for
2489
2491
  * @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)
2490
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2492
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2491
2493
  */
2492
2494
  await this.loadMarkets();
2493
2495
  let paginate = false;
@@ -2654,7 +2656,7 @@ export default class coinbase extends Exchange {
2654
2656
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2655
2657
  * @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)
2656
2658
  * @param {int} [params.until] the latest time in ms to fetch trades for
2657
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2659
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2658
2660
  */
2659
2661
  await this.loadMarkets();
2660
2662
  let paginate = false;
@@ -2676,7 +2678,7 @@ export default class coinbase extends Exchange {
2676
2678
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2677
2679
  * @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)
2678
2680
  * @param {int} [params.until] the latest time in ms to fetch trades for
2679
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2681
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2680
2682
  */
2681
2683
  await this.loadMarkets();
2682
2684
  let paginate = false;
@@ -2696,7 +2698,7 @@ export default class coinbase extends Exchange {
2696
2698
  * @param {int} [since] timestamp in ms of the earliest order, default is undefined
2697
2699
  * @param {int} [limit] the maximum number of canceled order structures to retrieve
2698
2700
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2699
- * @returns {object} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2701
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2700
2702
  */
2701
2703
  return await this.fetchOrdersByStatus('CANCELLED', symbol, since, limit, params);
2702
2704
  }
@@ -2795,7 +2797,7 @@ export default class coinbase extends Exchange {
2795
2797
  * @param {int} [since] not used by coinbase fetchTrades
2796
2798
  * @param {int} [limit] the maximum number of trade structures to fetch
2797
2799
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2798
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
2800
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
2799
2801
  */
2800
2802
  await this.loadMarkets();
2801
2803
  const market = this.market(symbol);
@@ -2837,7 +2839,7 @@ export default class coinbase extends Exchange {
2837
2839
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2838
2840
  * @param {int} [params.until] the latest time in ms to fetch trades for
2839
2841
  * @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)
2840
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
2842
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2841
2843
  */
2842
2844
  await this.loadMarkets();
2843
2845
  let paginate = false;
@@ -2906,7 +2908,7 @@ export default class coinbase extends Exchange {
2906
2908
  * @param {string} symbol unified symbol of the market to fetch the order book for
2907
2909
  * @param {int} [limit] the maximum amount of order book entries to return
2908
2910
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2909
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
2911
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
2910
2912
  */
2911
2913
  await this.loadMarkets();
2912
2914
  const market = this.market(symbol);
@@ -2950,7 +2952,7 @@ export default class coinbase extends Exchange {
2950
2952
  * @see https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_getbestbidask
2951
2953
  * @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
2952
2954
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
2953
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
2955
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2954
2956
  */
2955
2957
  await this.loadMarkets();
2956
2958
  symbols = this.marketSymbols(symbols);
@@ -425,7 +425,7 @@ export default class coinbasepro extends Exchange {
425
425
  * @name coinbasepro#fetchAccounts
426
426
  * @description fetch all the accounts associated with a profile
427
427
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
428
- * @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
428
+ * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
429
429
  */
430
430
  await this.loadMarkets();
431
431
  const response = await this.privateGetAccounts(params);
@@ -490,7 +490,7 @@ export default class coinbasepro extends Exchange {
490
490
  * @name coinbasepro#fetchBalance
491
491
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
492
492
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
493
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
493
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
494
494
  */
495
495
  await this.loadMarkets();
496
496
  const response = await this.privateGetAccounts(params);
@@ -505,7 +505,7 @@ export default class coinbasepro extends Exchange {
505
505
  * @param {string} symbol unified symbol of the market to fetch the order book for
506
506
  * @param {int} [limit] the maximum amount of order book entries to return
507
507
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
508
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
508
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
509
509
  */
510
510
  await this.loadMarkets();
511
511
  // level 1 - only the best bid and ask
@@ -623,7 +623,7 @@ export default class coinbasepro extends Exchange {
623
623
  * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
624
624
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
625
625
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
626
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
626
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
627
627
  */
628
628
  await this.loadMarkets();
629
629
  symbols = this.marketSymbols(symbols);
@@ -670,7 +670,7 @@ export default class coinbasepro extends Exchange {
670
670
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
671
671
  * @param {string} symbol unified symbol of the market to fetch the ticker for
672
672
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
673
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
673
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
674
674
  */
675
675
  await this.loadMarkets();
676
676
  const market = this.market(symbol);
@@ -788,9 +788,11 @@ export default class coinbasepro extends Exchange {
788
788
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
789
789
  * @param {int} [params.until] the latest time in ms to fetch trades for
790
790
  * @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)
791
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
791
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
792
792
  */
793
- this.checkRequiredSymbol('fetchMyTrades', symbol);
793
+ if (symbol === undefined) {
794
+ throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
795
+ }
794
796
  let paginate = false;
795
797
  [paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
796
798
  if (paginate) {
@@ -825,7 +827,7 @@ export default class coinbasepro extends Exchange {
825
827
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
826
828
  * @param {int} [limit] the maximum amount of trades to fetch
827
829
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
828
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
830
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
829
831
  */
830
832
  await this.loadMarkets();
831
833
  const market = this.market(symbol);
@@ -855,7 +857,7 @@ export default class coinbasepro extends Exchange {
855
857
  * @name coinbasepro#fetchTradingFees
856
858
  * @description fetch the trading fees for multiple markets
857
859
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
858
- * @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
860
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
859
861
  */
860
862
  await this.loadMarkets();
861
863
  const response = await this.privateGetFees(params);
@@ -947,7 +949,7 @@ export default class coinbasepro extends Exchange {
947
949
  }
948
950
  if (until === undefined) {
949
951
  const parsedTimeframeMilliseconds = parsedTimeframe * 1000;
950
- if (since % parsedTimeframeMilliseconds === 0) {
952
+ if (this.isRoundNumber(since % parsedTimeframeMilliseconds)) {
951
953
  request['end'] = this.iso8601(this.sum((limit - 1) * parsedTimeframeMilliseconds, since));
952
954
  }
953
955
  else {
@@ -1079,7 +1081,7 @@ export default class coinbasepro extends Exchange {
1079
1081
  * @description fetches information on an order made by the user
1080
1082
  * @param {string} symbol not used by coinbasepro fetchOrder
1081
1083
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1082
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1084
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1083
1085
  */
1084
1086
  await this.loadMarkets();
1085
1087
  const request = {};
@@ -1107,7 +1109,7 @@ export default class coinbasepro extends Exchange {
1107
1109
  * @param {int} [since] the earliest time in ms to fetch trades for
1108
1110
  * @param {int} [limit] the maximum number of trades to retrieve
1109
1111
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1110
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1112
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1111
1113
  */
1112
1114
  await this.loadMarkets();
1113
1115
  let market = undefined;
@@ -1131,7 +1133,7 @@ export default class coinbasepro extends Exchange {
1131
1133
  * @param {int} [limit] the maximum number of orde structures to retrieve
1132
1134
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1133
1135
  * @param {int} [params.until] the latest time in ms to fetch open orders for
1134
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1136
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1135
1137
  */
1136
1138
  const request = {
1137
1139
  'status': 'all',
@@ -1150,7 +1152,7 @@ export default class coinbasepro extends Exchange {
1150
1152
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1151
1153
  * @param {int} [params.until] the latest time in ms to fetch open orders for
1152
1154
  * @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)
1153
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1155
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1154
1156
  */
1155
1157
  await this.loadMarkets();
1156
1158
  let paginate = false;
@@ -1189,7 +1191,7 @@ export default class coinbasepro extends Exchange {
1189
1191
  * @param {int} [limit] the maximum number of orde structures to retrieve
1190
1192
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1191
1193
  * @param {int} [params.until] the latest time in ms to fetch open orders for
1192
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1194
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1193
1195
  */
1194
1196
  const request = {
1195
1197
  'status': 'done',
@@ -1208,7 +1210,7 @@ export default class coinbasepro extends Exchange {
1208
1210
  * @param {float} amount how much of currency you want to trade in units of base currency
1209
1211
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1210
1212
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1211
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1213
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1212
1214
  */
1213
1215
  await this.loadMarkets();
1214
1216
  const market = this.market(symbol);
@@ -1301,7 +1303,7 @@ export default class coinbasepro extends Exchange {
1301
1303
  * @param {string} id order id
1302
1304
  * @param {string} symbol unified symbol of the market the order was made in
1303
1305
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1304
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1306
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1305
1307
  */
1306
1308
  await this.loadMarkets();
1307
1309
  const request = {
@@ -1333,7 +1335,7 @@ export default class coinbasepro extends Exchange {
1333
1335
  * @description cancel all open orders
1334
1336
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1335
1337
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1336
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1338
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1337
1339
  */
1338
1340
  await this.loadMarkets();
1339
1341
  const request = {};
@@ -1356,7 +1358,7 @@ export default class coinbasepro extends Exchange {
1356
1358
  * @param {float} amount The amount of currency to send in the deposit (e.g. `20`)
1357
1359
  * @param {string} address Not used by coinbasepro
1358
1360
  * @param {object} [params] Parameters specific to the exchange API endpoint (e.g. `{"network": "TRX"}`)
1359
- * @returns a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1361
+ * @returns a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1360
1362
  */
1361
1363
  await this.loadMarkets();
1362
1364
  const currency = this.currency(code);
@@ -1398,7 +1400,7 @@ export default class coinbasepro extends Exchange {
1398
1400
  * @param {string} address the address to withdraw to
1399
1401
  * @param {string} tag
1400
1402
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1401
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1403
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1402
1404
  */
1403
1405
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
1404
1406
  this.checkAddress(address);
@@ -1523,7 +1525,7 @@ export default class coinbasepro extends Exchange {
1523
1525
  * @param {int} [limit] max number of ledger entrys to return, default is undefined
1524
1526
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1525
1527
  * @param {int} [params.until] the latest time in ms to fetch trades for
1526
- * @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
1528
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
1527
1529
  */
1528
1530
  // https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger
1529
1531
  if (code === undefined) {
@@ -1575,7 +1577,7 @@ export default class coinbasepro extends Exchange {
1575
1577
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
1576
1578
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1577
1579
  * @param {string} [params.id] account id, when defined, the endpoint used is '/accounts/{account_id}/transfers/' instead of '/transfers/'
1578
- * @returns {object} a list of [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1580
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1579
1581
  */
1580
1582
  await this.loadMarkets();
1581
1583
  await this.loadAccounts();
@@ -1680,7 +1682,7 @@ export default class coinbasepro extends Exchange {
1680
1682
  * @param {int} [since] the earliest time in ms to fetch deposits for
1681
1683
  * @param {int} [limit] the maximum number of deposits structures to retrieve
1682
1684
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1683
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1685
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1684
1686
  */
1685
1687
  return await this.fetchDepositsWithdrawals(code, since, limit, this.extend({ 'type': 'deposit' }, params));
1686
1688
  }
@@ -1693,7 +1695,7 @@ export default class coinbasepro extends Exchange {
1693
1695
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
1694
1696
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
1695
1697
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1696
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1698
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1697
1699
  */
1698
1700
  return await this.fetchDepositsWithdrawals(code, since, limit, this.extend({ 'type': 'withdraw' }, params));
1699
1701
  }
@@ -1801,7 +1803,7 @@ export default class coinbasepro extends Exchange {
1801
1803
  * @description create a currency deposit address
1802
1804
  * @param {string} code unified currency code of the currency for the deposit address
1803
1805
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
1804
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1806
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1805
1807
  */
1806
1808
  await this.loadMarkets();
1807
1809
  const currency = this.currency(code);