ccxt 4.5.56 → 4.5.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 (261) hide show
  1. package/README.md +10 -9
  2. package/dist/ccxt.browser.min.js +10 -10
  3. package/dist/cjs/ccxt.js +6 -11
  4. package/dist/cjs/src/apex.js +1 -1
  5. package/dist/cjs/src/arkham.js +3 -3
  6. package/dist/cjs/src/ascendex.js +2 -2
  7. package/dist/cjs/src/aster.js +7 -4
  8. package/dist/cjs/src/backpack.js +4 -4
  9. package/dist/cjs/src/base/Exchange.js +69 -32
  10. package/dist/cjs/src/base/functions/io.js +25 -0
  11. package/dist/cjs/src/base/functions.js +1 -0
  12. package/dist/cjs/src/bigone.js +3 -3
  13. package/dist/cjs/src/binance.js +192 -194
  14. package/dist/cjs/src/bingx.js +3 -3
  15. package/dist/cjs/src/bitfinex.js +71 -58
  16. package/dist/cjs/src/bitget.js +2 -2
  17. package/dist/cjs/src/bitmart.js +13 -6
  18. package/dist/cjs/src/bitmex.js +1 -1
  19. package/dist/cjs/src/bitopro.js +1 -1
  20. package/dist/cjs/src/bitrue.js +2 -2
  21. package/dist/cjs/src/bitso.js +1 -1
  22. package/dist/cjs/src/bitstamp.js +2 -1
  23. package/dist/cjs/src/bitteam.js +1 -1
  24. package/dist/cjs/src/bittrade.js +0 -1
  25. package/dist/cjs/src/bitvavo.js +457 -34
  26. package/dist/cjs/src/blofin.js +26 -3
  27. package/dist/cjs/src/bullish.js +6 -5
  28. package/dist/cjs/src/bydfi.js +1 -1
  29. package/dist/cjs/src/cex.js +3 -3
  30. package/dist/cjs/src/coinbase.js +75 -65
  31. package/dist/cjs/src/coinbaseexchange.js +2 -2
  32. package/dist/cjs/src/coinbaseinternational.js +2 -1
  33. package/dist/cjs/src/coinex.js +74 -74
  34. package/dist/cjs/src/coinmetro.js +1 -1
  35. package/dist/cjs/src/coinsph.js +1 -1
  36. package/dist/cjs/src/cryptocom.js +46 -48
  37. package/dist/cjs/src/cryptomus.js +43 -39
  38. package/dist/cjs/src/deepcoin.js +3 -2
  39. package/dist/cjs/src/delta.js +51 -52
  40. package/dist/cjs/src/deribit.js +31 -33
  41. package/dist/cjs/src/derive.js +26 -28
  42. package/dist/cjs/src/digifinex.js +43 -44
  43. package/dist/cjs/src/exmo.js +92 -83
  44. package/dist/cjs/src/extended.js +3497 -0
  45. package/dist/cjs/src/foxbit.js +71 -75
  46. package/dist/cjs/src/gate.js +53 -53
  47. package/dist/cjs/src/gemini.js +41 -43
  48. package/dist/cjs/src/grvt.js +4 -4
  49. package/dist/cjs/src/hashkey.js +52 -54
  50. package/dist/cjs/src/hitbtc.js +3 -13
  51. package/dist/cjs/src/hollaex.js +51 -54
  52. package/dist/cjs/src/htx.js +75 -67
  53. package/dist/cjs/src/hyperliquid.js +41 -42
  54. package/dist/cjs/src/indodax.js +2 -2
  55. package/dist/cjs/src/kraken.js +57 -58
  56. package/dist/cjs/src/kucoin.js +3 -2
  57. package/dist/cjs/src/latoken.js +30 -32
  58. package/dist/cjs/src/lbank.js +56 -56
  59. package/dist/cjs/src/lighter.js +35 -37
  60. package/dist/cjs/src/luno.js +35 -43
  61. package/dist/cjs/src/mexc.js +48 -49
  62. package/dist/cjs/src/modetrade.js +50 -52
  63. package/dist/cjs/src/ndax.js +35 -37
  64. package/dist/cjs/src/okx.js +17 -2
  65. package/dist/cjs/src/onetrading.js +21 -23
  66. package/dist/cjs/src/phemex.js +43 -45
  67. package/dist/cjs/src/poloniex.js +17 -12
  68. package/dist/cjs/src/pro/alpaca.js +1 -1
  69. package/dist/cjs/src/pro/apex.js +1 -1
  70. package/dist/cjs/src/pro/arkham.js +1 -1
  71. package/dist/cjs/src/pro/backpack.js +1 -1
  72. package/dist/cjs/src/pro/binance.js +3 -3
  73. package/dist/cjs/src/pro/bitget.js +1 -1
  74. package/dist/cjs/src/pro/bithumb.js +1 -1
  75. package/dist/cjs/src/pro/bitstamp.js +1 -1
  76. package/dist/cjs/src/pro/blockchaincom.js +1 -1
  77. package/dist/cjs/src/pro/bybit.js +1 -1
  78. package/dist/cjs/src/pro/cex.js +1 -1
  79. package/dist/cjs/src/pro/coinex.js +1 -1
  80. package/dist/cjs/src/pro/coinone.js +1 -1
  81. package/dist/cjs/src/pro/cryptocom.js +3 -1
  82. package/dist/cjs/src/pro/dydx.js +1 -1
  83. package/dist/cjs/src/pro/exmo.js +1 -1
  84. package/dist/cjs/src/pro/extended.js +865 -0
  85. package/dist/cjs/src/pro/gate.js +1 -1
  86. package/dist/cjs/src/pro/independentreserve.js +1 -1
  87. package/dist/cjs/src/pro/kucoin.js +1 -1
  88. package/dist/cjs/src/pro/luno.js +3 -3
  89. package/dist/cjs/src/pro/onetrading.js +1 -1
  90. package/dist/cjs/src/pro/toobit.js +1 -1
  91. package/dist/cjs/src/pro/weex.js +1 -1
  92. package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
  93. package/dist/cjs/src/tokocrypto.js +1 -1
  94. package/dist/cjs/src/toobit.js +2 -2
  95. package/dist/cjs/src/upbit.js +3 -3
  96. package/dist/cjs/src/weex.js +57 -62
  97. package/dist/cjs/src/whitebit.js +61 -63
  98. package/dist/cjs/src/woo.js +65 -54
  99. package/dist/cjs/src/woofipro.js +53 -47
  100. package/dist/cjs/src/xt.js +1 -1
  101. package/dist/cjs/src/zebpay.js +70 -72
  102. package/js/ccxt.d.ts +8 -14
  103. package/js/ccxt.js +6 -10
  104. package/js/src/abstract/bitvavo.d.ts +15 -7
  105. package/js/src/abstract/extended.d.ts +58 -0
  106. package/js/src/apex.js +1 -1
  107. package/js/src/arkham.js +3 -3
  108. package/js/src/ascendex.js +2 -2
  109. package/js/src/aster.js +7 -4
  110. package/js/src/backpack.js +4 -4
  111. package/js/src/base/Exchange.d.ts +10 -6
  112. package/js/src/base/Exchange.js +69 -32
  113. package/js/src/base/functions/io.d.ts +7 -0
  114. package/js/src/base/functions/io.js +24 -0
  115. package/js/src/bigone.js +3 -3
  116. package/js/src/binance.d.ts +2 -0
  117. package/js/src/binance.js +196 -198
  118. package/js/src/bingx.js +3 -3
  119. package/js/src/bitfinex.d.ts +2 -0
  120. package/js/src/bitfinex.js +71 -58
  121. package/js/src/bitget.js +2 -2
  122. package/js/src/bitmart.js +13 -6
  123. package/js/src/bitmex.js +1 -1
  124. package/js/src/bitopro.js +1 -1
  125. package/js/src/bitrue.js +2 -2
  126. package/js/src/bitso.js +1 -1
  127. package/js/src/bitstamp.js +2 -1
  128. package/js/src/bitteam.js +1 -1
  129. package/js/src/bittrade.js +0 -1
  130. package/js/src/bitvavo.d.ts +114 -21
  131. package/js/src/bitvavo.js +457 -34
  132. package/js/src/blofin.d.ts +1 -0
  133. package/js/src/blofin.js +26 -3
  134. package/js/src/bullish.js +6 -5
  135. package/js/src/bydfi.js +1 -1
  136. package/js/src/cex.js +3 -3
  137. package/js/src/coinbase.d.ts +63 -56
  138. package/js/src/coinbase.js +75 -65
  139. package/js/src/coinbaseexchange.js +2 -2
  140. package/js/src/coinbaseinternational.js +2 -1
  141. package/js/src/coinex.d.ts +1 -0
  142. package/js/src/coinex.js +74 -74
  143. package/js/src/coinmetro.d.ts +1 -1
  144. package/js/src/coinmetro.js +1 -1
  145. package/js/src/coinsph.js +1 -1
  146. package/js/src/cryptocom.d.ts +1 -0
  147. package/js/src/cryptocom.js +46 -48
  148. package/js/src/cryptomus.d.ts +2 -1
  149. package/js/src/cryptomus.js +43 -39
  150. package/js/src/deepcoin.js +3 -2
  151. package/js/src/delta.d.ts +1 -0
  152. package/js/src/delta.js +51 -52
  153. package/js/src/deribit.d.ts +1 -0
  154. package/js/src/deribit.js +31 -33
  155. package/js/src/derive.d.ts +1 -0
  156. package/js/src/derive.js +26 -28
  157. package/js/src/digifinex.d.ts +1 -0
  158. package/js/src/digifinex.js +43 -44
  159. package/js/src/exmo.d.ts +1 -0
  160. package/js/src/exmo.js +92 -83
  161. package/js/src/extended.d.ts +554 -0
  162. package/js/src/extended.js +3490 -0
  163. package/js/src/foxbit.d.ts +1 -0
  164. package/js/src/foxbit.js +71 -75
  165. package/js/src/gate.d.ts +1 -0
  166. package/js/src/gate.js +53 -53
  167. package/js/src/gemini.d.ts +2 -1
  168. package/js/src/gemini.js +41 -43
  169. package/js/src/grvt.js +4 -4
  170. package/js/src/hashkey.d.ts +1 -0
  171. package/js/src/hashkey.js +52 -54
  172. package/js/src/hitbtc.d.ts +0 -1
  173. package/js/src/hitbtc.js +3 -13
  174. package/js/src/hollaex.d.ts +1 -0
  175. package/js/src/hollaex.js +51 -54
  176. package/js/src/htx.d.ts +1 -0
  177. package/js/src/htx.js +75 -67
  178. package/js/src/hyperliquid.d.ts +1 -0
  179. package/js/src/hyperliquid.js +41 -42
  180. package/js/src/indodax.js +2 -2
  181. package/js/src/kraken.d.ts +2 -1
  182. package/js/src/kraken.js +57 -58
  183. package/js/src/kucoin.js +3 -2
  184. package/js/src/latoken.d.ts +1 -0
  185. package/js/src/latoken.js +30 -32
  186. package/js/src/lbank.d.ts +1 -0
  187. package/js/src/lbank.js +56 -56
  188. package/js/src/lighter.d.ts +1 -0
  189. package/js/src/lighter.js +35 -37
  190. package/js/src/luno.d.ts +1 -0
  191. package/js/src/luno.js +35 -43
  192. package/js/src/mexc.d.ts +2 -1
  193. package/js/src/mexc.js +48 -49
  194. package/js/src/modetrade.d.ts +1 -0
  195. package/js/src/modetrade.js +50 -52
  196. package/js/src/ndax.d.ts +1 -0
  197. package/js/src/ndax.js +35 -37
  198. package/js/src/okx.js +17 -2
  199. package/js/src/onetrading.d.ts +2 -1
  200. package/js/src/onetrading.js +21 -23
  201. package/js/src/phemex.d.ts +1 -0
  202. package/js/src/phemex.js +43 -45
  203. package/js/src/poloniex.js +17 -12
  204. package/js/src/pro/alpaca.js +1 -1
  205. package/js/src/pro/apex.js +1 -1
  206. package/js/src/pro/arkham.js +1 -1
  207. package/js/src/pro/backpack.js +1 -1
  208. package/js/src/pro/binance.js +3 -3
  209. package/js/src/pro/bitget.js +1 -1
  210. package/js/src/pro/bithumb.js +1 -1
  211. package/js/src/pro/bitstamp.js +1 -1
  212. package/js/src/pro/blockchaincom.js +1 -1
  213. package/js/src/pro/bybit.js +1 -1
  214. package/js/src/pro/cex.js +1 -1
  215. package/js/src/pro/coinex.js +1 -1
  216. package/js/src/pro/coinone.js +1 -1
  217. package/js/src/pro/cryptocom.js +3 -1
  218. package/js/src/pro/dydx.js +1 -1
  219. package/js/src/pro/exmo.js +1 -1
  220. package/js/src/pro/extended.d.ts +126 -0
  221. package/js/src/pro/extended.js +858 -0
  222. package/js/src/pro/gate.js +1 -1
  223. package/js/src/pro/independentreserve.js +1 -1
  224. package/js/src/pro/kucoin.js +1 -1
  225. package/js/src/pro/luno.d.ts +1 -1
  226. package/js/src/pro/luno.js +3 -3
  227. package/js/src/pro/onetrading.js +1 -1
  228. package/js/src/pro/toobit.js +1 -1
  229. package/js/src/pro/weex.js +1 -1
  230. package/js/src/tokocrypto.js +1 -1
  231. package/js/src/toobit.js +2 -2
  232. package/js/src/upbit.js +3 -3
  233. package/js/src/weex.d.ts +1 -0
  234. package/js/src/weex.js +57 -62
  235. package/js/src/whitebit.d.ts +1 -0
  236. package/js/src/whitebit.js +61 -63
  237. package/js/src/woo.d.ts +1 -0
  238. package/js/src/woo.js +65 -54
  239. package/js/src/woofipro.d.ts +1 -0
  240. package/js/src/woofipro.js +53 -47
  241. package/js/src/xt.js +1 -1
  242. package/js/src/zebpay.d.ts +2 -1
  243. package/js/src/zebpay.js +70 -72
  244. package/package.json +7 -7
  245. package/dist/cjs/src/gateio.js +0 -18
  246. package/dist/cjs/src/oxfun.js +0 -2933
  247. package/dist/cjs/src/pro/gateio.js +0 -18
  248. package/dist/cjs/src/pro/oxfun.js +0 -1113
  249. package/js/src/abstract/gateio.d.ts +0 -346
  250. package/js/src/abstract/gateio.js +0 -5
  251. package/js/src/abstract/oxfun.d.ts +0 -37
  252. package/js/src/gateio.d.ts +0 -4
  253. package/js/src/gateio.js +0 -11
  254. package/js/src/oxfun.d.ts +0 -442
  255. package/js/src/oxfun.js +0 -2926
  256. package/js/src/pro/gateio.d.ts +0 -4
  257. package/js/src/pro/gateio.js +0 -11
  258. package/js/src/pro/oxfun.d.ts +0 -234
  259. package/js/src/pro/oxfun.js +0 -1106
  260. /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
  261. /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
@@ -24,9 +24,9 @@ class coinbase extends coinbase$1["default"] {
24
24
  'pro': true,
25
25
  'certified': false,
26
26
  // rate-limits:
27
- // ADVANCED API: https://docs.cloud.coinbase.com/advanced-trade/docs/rest-api-rate-limits
27
+ // ADVANCED API: https://docs.cdp.coinbase.com/advanced-trade/docs/rest-api-rate-limits
28
28
  // - max 30 req/second for private data, 10 req/s for public data
29
- // DATA API : https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/rate-limiting
29
+ // DATA API : https://docs.cdp.coinbase.com/coinbase-app/api-architecture/rate-limiting
30
30
  // - max 10000 req/hour (to prevent userland mistakes we apply ~3 req/second RL per call
31
31
  'rateLimit': 34,
32
32
  'version': 'v2',
@@ -168,8 +168,8 @@ class coinbase extends coinbase$1["default"] {
168
168
  },
169
169
  'www': 'https://www.coinbase.com',
170
170
  'doc': [
171
- 'https://developers.coinbase.com/api/v2',
172
- 'https://docs.cloud.coinbase.com/advanced-trade/docs/welcome',
171
+ 'https://docs.cdp.coinbase.com/coinbase-app/introduction/welcome',
172
+ 'https://docs.cdp.coinbase.com/coinbase-app/advanced-trade-apis/api-reference',
173
173
  ],
174
174
  'fees': [
175
175
  'https://support.coinbase.com/customer/portal/articles/2109597-buy-sell-bank-transfer-fees',
@@ -352,6 +352,7 @@ class coinbase extends coinbase$1["default"] {
352
352
  'jumio_face_match_verification_required': errors.AuthenticationError,
353
353
  'unverified_email': errors.AuthenticationError,
354
354
  'authentication_error': errors.AuthenticationError,
355
+ 'unauthorized': errors.AuthenticationError,
355
356
  'invalid_authentication_method': errors.AuthenticationError,
356
357
  'invalid_token': errors.AuthenticationError,
357
358
  'revoked_token': errors.AuthenticationError,
@@ -359,6 +360,7 @@ class coinbase extends coinbase$1["default"] {
359
360
  'invalid_scope': errors.AuthenticationError,
360
361
  'not_found': errors.ExchangeError,
361
362
  'rate_limit_exceeded': errors.RateLimitExceeded,
363
+ 'resource_exhausted': errors.RateLimitExceeded,
362
364
  'internal_server_error': errors.ExchangeError,
363
365
  'UNSUPPORTED_ORDER_CONFIGURATION': errors.BadRequest,
364
366
  'INSUFFICIENT_FUND': errors.InsufficientFunds,
@@ -509,7 +511,8 @@ class coinbase extends coinbase$1["default"] {
509
511
  * @method
510
512
  * @name coinbase#fetchTime
511
513
  * @description fetches the current integer timestamp in milliseconds from the exchange server
512
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-time#http-request
514
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/time
515
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-server-time
513
516
  * @param {object} [params] extra parameters specific to the exchange API endpoint
514
517
  * @param {string} [params.method] 'v2PublicGetTime' or 'v3PublicGetBrokerageTime' default is 'v2PublicGetTime'
515
518
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
@@ -547,8 +550,8 @@ class coinbase extends coinbase$1["default"] {
547
550
  * @method
548
551
  * @name coinbase#fetchAccounts
549
552
  * @description fetch all the accounts associated with a profile
550
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
551
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
553
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/accounts/list-accounts
554
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/accounts
552
555
  * @param {object} [params] extra parameters specific to the exchange API endpoint
553
556
  * @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)
554
557
  * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/?id=account-structure} indexed by the account type
@@ -684,7 +687,7 @@ class coinbase extends coinbase$1["default"] {
684
687
  * @method
685
688
  * @name coinbase#fetchPortfolios
686
689
  * @description fetch all the portfolios
687
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getportfolios
690
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/portfolios/list-portfolios
688
691
  * @param {object} [params] extra parameters specific to the exchange API endpoint
689
692
  * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/?id=account-structure} indexed by the account type
690
693
  */
@@ -777,7 +780,7 @@ class coinbase extends coinbase$1["default"] {
777
780
  * @method
778
781
  * @name coinbase#createDepositAddress
779
782
  * @description create a currency deposit address
780
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses#create-address
783
+ * @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/onchain-addresses
781
784
  * @param {string} code unified currency code of the currency for the deposit address
782
785
  * @param {object} [params] extra parameters specific to the exchange API endpoint
783
786
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
@@ -854,7 +857,7 @@ class coinbase extends coinbase$1["default"] {
854
857
  * @name coinbase#fetchMySells
855
858
  * @ignore
856
859
  * @description fetch sells
857
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-sells#list-sells
860
+ * @see https://docs.cdp.coinbase.com/coinbase-app/oauth2-integration/available-apis
858
861
  * @param {string} symbol not used by coinbase fetchMySells ()
859
862
  * @param {int} [since] timestamp in ms of the earliest sell, default is undefined
860
863
  * @param {int} [limit] max number of sells to return, default is undefined
@@ -874,7 +877,7 @@ class coinbase extends coinbase$1["default"] {
874
877
  * @name coinbase#fetchMyBuys
875
878
  * @ignore
876
879
  * @description fetch buys
877
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#list-buys
880
+ * @see https://docs.cdp.coinbase.com/coinbase-app/oauth2-integration/available-apis
878
881
  * @param {string} symbol not used by coinbase fetchMyBuys ()
879
882
  * @param {int} [since] timestamp in ms of the earliest buy, default is undefined
880
883
  * @param {int} [limit] max number of buys to return, default is undefined
@@ -900,7 +903,8 @@ class coinbase extends coinbase$1["default"] {
900
903
  * @method
901
904
  * @name coinbase#fetchWithdrawals
902
905
  * @description Fetch all withdrawals made from an account. Won't return crypto withdrawals. Use fetchLedger for those.
903
- * @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-withdrawals#list-withdrawals
906
+ * @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/withdraw-fiat
907
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
904
908
  * @param {string} code unified currency code
905
909
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
906
910
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -921,7 +925,8 @@ class coinbase extends coinbase$1["default"] {
921
925
  * @method
922
926
  * @name coinbase#fetchDeposits
923
927
  * @description Fetch all fiat deposits made to an account. Won't return crypto deposits or staking rewards. Use fetchLedger for those.
924
- * @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-deposits#list-deposits
928
+ * @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/deposit-fiat
929
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
925
930
  * @param {string} code unified currency code
926
931
  * @param {int} [since] the earliest time in ms to fetch deposits for
927
932
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -942,7 +947,7 @@ class coinbase extends coinbase$1["default"] {
942
947
  * @method
943
948
  * @name coinbase#fetchDepositsWithdrawals
944
949
  * @description fetch history of deposits and withdrawals
945
- * @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions
950
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
946
951
  * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
947
952
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
948
953
  * @param {int} [limit] max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
@@ -1155,13 +1160,14 @@ class coinbase extends coinbase$1["default"] {
1155
1160
  const toObject = this.safeDict(transaction, 'to');
1156
1161
  const addressTo = this.safeString(toObject, 'address');
1157
1162
  const networkId = this.safeString(network, 'network_name');
1163
+ const code = this.safeCurrencyCode(currencyId, currency);
1158
1164
  return {
1159
1165
  'info': transaction,
1160
1166
  'id': id,
1161
1167
  'txid': this.safeString(network, 'hash', id),
1162
1168
  'timestamp': this.parse8601(datetime),
1163
1169
  'datetime': datetime,
1164
- 'network': this.networkIdToCode(networkId),
1170
+ 'network': this.networkIdToCode(networkId, code),
1165
1171
  'address': addressTo,
1166
1172
  'addressTo': addressTo,
1167
1173
  'addressFrom': undefined,
@@ -1170,7 +1176,7 @@ class coinbase extends coinbase$1["default"] {
1170
1176
  'tagFrom': undefined,
1171
1177
  'type': type,
1172
1178
  'amount': this.parseNumber(amountStringAbs),
1173
- 'currency': this.safeCurrencyCode(currencyId, currency),
1179
+ 'currency': code,
1174
1180
  'status': status,
1175
1181
  'updated': this.parse8601(this.safeString(transaction, 'updated_at')),
1176
1182
  'fee': {
@@ -1316,9 +1322,10 @@ class coinbase extends coinbase$1["default"] {
1316
1322
  /**
1317
1323
  * @method
1318
1324
  * @name coinbase#fetchMarkets
1319
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproducts
1320
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
1321
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
1325
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/list-products
1326
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/list-public-products
1327
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/currencies
1328
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/exchange-rates
1322
1329
  * @description retrieves data on all markets for coinbase
1323
1330
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1324
1331
  * @param {boolean} [params.usePrivate] use private endpoint for fetching markets
@@ -1905,8 +1912,8 @@ class coinbase extends coinbase$1["default"] {
1905
1912
  * @method
1906
1913
  * @name coinbase#fetchCurrencies
1907
1914
  * @description fetches all available currencies on an exchange
1908
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
1909
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
1915
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/currencies
1916
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/exchange-rates
1910
1917
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1911
1918
  * @returns {object} an associative dictionary of currencies
1912
1919
  */
@@ -2014,8 +2021,9 @@ class coinbase extends coinbase$1["default"] {
2014
2021
  * @method
2015
2022
  * @name coinbase#fetchTickers
2016
2023
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2017
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getproducts
2018
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
2024
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/list-products
2025
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/list-public-products
2026
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/exchange-rates
2019
2027
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2020
2028
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2021
2029
  * @param {boolean} [params.usePrivate] use private endpoint for fetching tickers
@@ -2135,10 +2143,9 @@ class coinbase extends coinbase$1["default"] {
2135
2143
  * @method
2136
2144
  * @name coinbase#fetchTicker
2137
2145
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
2138
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getmarkettrades
2139
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-spot-price
2140
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-buy-price
2141
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-sell-price
2146
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-market-trades
2147
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-market-trades
2148
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/prices
2142
2149
  * @param {string} symbol unified symbol of the market to fetch the ticker for
2143
2150
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2144
2151
  * @param {boolean} [params.usePrivate] whether to use the private endpoint for fetching the ticker
@@ -2411,9 +2418,9 @@ class coinbase extends coinbase$1["default"] {
2411
2418
  * @method
2412
2419
  * @name coinbase#fetchBalance
2413
2420
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
2414
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
2415
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
2416
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmbalancesummary
2421
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/accounts/list-accounts
2422
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/accounts
2423
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/us-derivatives/get-futures-balance-summary
2417
2424
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2418
2425
  * @param {boolean} [params.v3] default false, set true to use v3 api endpoint
2419
2426
  * @param {string} [params.type] "spot" (default) or "swap" or "future"
@@ -2518,7 +2525,7 @@ class coinbase extends coinbase$1["default"] {
2518
2525
  * @method
2519
2526
  * @name coinbase#fetchLedger
2520
2527
  * @description Fetch the history of changes, i.e. actions done by the user or operations that altered the balance. Will return staking rewards, and crypto deposits or withdrawals.
2521
- * @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions#list-transactions
2528
+ * @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
2522
2529
  * @param {string} [code] unified currency code, default is undefined
2523
2530
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
2524
2531
  * @param {int} [limit] max number of ledger entries to return, default is undefined
@@ -2936,7 +2943,7 @@ class coinbase extends coinbase$1["default"] {
2936
2943
  * @method
2937
2944
  * @name coinbase#createMarketBuyOrderWithCost
2938
2945
  * @description create a market buy order by providing the symbol and cost
2939
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
2946
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/create-order
2940
2947
  * @param {string} symbol unified symbol of the market to create an order in
2941
2948
  * @param {float} cost how much you want to trade in units of the quote currency
2942
2949
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -2955,7 +2962,7 @@ class coinbase extends coinbase$1["default"] {
2955
2962
  * @method
2956
2963
  * @name coinbase#createOrder
2957
2964
  * @description create a trade order
2958
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
2965
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/create-order
2959
2966
  * @param {string} symbol unified symbol of the market to create an order in
2960
2967
  * @param {string} type 'market' or 'limit'
2961
2968
  * @param {string} side 'buy' or 'sell'
@@ -3387,7 +3394,7 @@ class coinbase extends coinbase$1["default"] {
3387
3394
  * @method
3388
3395
  * @name coinbase#cancelOrder
3389
3396
  * @description cancels an open order
3390
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
3397
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/cancel-orders
3391
3398
  * @param {string} id order id
3392
3399
  * @param {string} symbol not used by coinbase cancelOrder()
3393
3400
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -3402,7 +3409,7 @@ class coinbase extends coinbase$1["default"] {
3402
3409
  * @method
3403
3410
  * @name coinbase#cancelOrders
3404
3411
  * @description cancel multiple orders
3405
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
3412
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/cancel-orders
3406
3413
  * @param {string[]} ids order ids
3407
3414
  * @param {string} symbol not used by coinbase cancelOrders()
3408
3415
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -3442,7 +3449,7 @@ class coinbase extends coinbase$1["default"] {
3442
3449
  * @method
3443
3450
  * @name coinbase#editOrder
3444
3451
  * @description edit a trade order
3445
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_editorder
3452
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/edit-order
3446
3453
  * @param {string} id cancel order id
3447
3454
  * @param {string} symbol unified symbol of the market to create an order in
3448
3455
  * @param {string} type 'market' or 'limit'
@@ -3489,7 +3496,7 @@ class coinbase extends coinbase$1["default"] {
3489
3496
  * @method
3490
3497
  * @name coinbase#fetchOrder
3491
3498
  * @description fetches information on an order made by the user
3492
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorder
3499
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/get-order
3493
3500
  * @param {string} id the order id
3494
3501
  * @param {string} symbol unified market symbol that the order was made in
3495
3502
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -3551,7 +3558,7 @@ class coinbase extends coinbase$1["default"] {
3551
3558
  * @method
3552
3559
  * @name coinbase#fetchOrders
3553
3560
  * @description fetches information on multiple orders made by the user
3554
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
3561
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
3555
3562
  * @param {string} symbol unified market symbol that the orders were made in
3556
3563
  * @param {int} [since] the earliest time in ms to fetch orders
3557
3564
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -3676,7 +3683,7 @@ class coinbase extends coinbase$1["default"] {
3676
3683
  // }
3677
3684
  // },
3678
3685
  // "side": "BUY",
3679
- // "client_order_id": "18eb9947-db49-4874-8e7b-39b8fe5f4317",
3686
+ // "client_order_id": "18eb9947-db49-4874-8e7b-39b8fe5f4314",
3680
3687
  // "status": "FILLED",
3681
3688
  // "time_in_force": "IMMEDIATE_OR_CANCEL",
3682
3689
  // "created_time": "2023-01-18T01:37:37.975552Z",
@@ -3718,7 +3725,7 @@ class coinbase extends coinbase$1["default"] {
3718
3725
  * @method
3719
3726
  * @name coinbase#fetchOpenOrders
3720
3727
  * @description fetches information on all currently open orders
3721
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
3728
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
3722
3729
  * @param {string} symbol unified market symbol of the orders
3723
3730
  * @param {int} [since] timestamp in ms of the earliest order, default is undefined
3724
3731
  * @param {int} [limit] the maximum number of open order structures to retrieve
@@ -3740,7 +3747,7 @@ class coinbase extends coinbase$1["default"] {
3740
3747
  * @method
3741
3748
  * @name coinbase#fetchClosedOrders
3742
3749
  * @description fetches information on multiple closed orders made by the user
3743
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
3750
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
3744
3751
  * @param {string} symbol unified market symbol of the orders
3745
3752
  * @param {int} [since] timestamp in ms of the earliest order, default is undefined
3746
3753
  * @param {int} [limit] the maximum number of closed order structures to retrieve
@@ -3762,7 +3769,7 @@ class coinbase extends coinbase$1["default"] {
3762
3769
  * @method
3763
3770
  * @name coinbase#fetchCanceledOrders
3764
3771
  * @description fetches information on multiple canceled orders made by the user
3765
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
3772
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
3766
3773
  * @param {string} symbol unified market symbol of the orders
3767
3774
  * @param {int} [since] timestamp in ms of the earliest order, default is undefined
3768
3775
  * @param {int} [limit] the maximum number of canceled order structures to retrieve
@@ -3776,7 +3783,8 @@ class coinbase extends coinbase$1["default"] {
3776
3783
  * @method
3777
3784
  * @name coinbase#fetchOHLCV
3778
3785
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
3779
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpubliccandles
3786
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-product-candles
3787
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-product-candles
3780
3788
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
3781
3789
  * @param {string} timeframe the length of time each candle represents
3782
3790
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -3873,7 +3881,8 @@ class coinbase extends coinbase$1["default"] {
3873
3881
  * @method
3874
3882
  * @name coinbase#fetchTrades
3875
3883
  * @description get the list of most recent trades for a particular symbol
3876
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicmarkettrades
3884
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-market-trades
3885
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-market-trades
3877
3886
  * @param {string} symbol unified market symbol of the trades
3878
3887
  * @param {int} [since] not used by coinbase fetchTrades
3879
3888
  * @param {int} [limit] the maximum number of trade structures to fetch
@@ -3933,7 +3942,7 @@ class coinbase extends coinbase$1["default"] {
3933
3942
  * @method
3934
3943
  * @name coinbase#fetchMyTrades
3935
3944
  * @description fetch all trades made by the user
3936
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfills
3945
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-fills
3937
3946
  * @param {string} symbol unified market symbol of the trades
3938
3947
  * @param {int} [since] timestamp in ms of the earliest order, default is undefined
3939
3948
  * @param {int} [limit] the maximum number of trade structures to fetch
@@ -4005,7 +4014,8 @@ class coinbase extends coinbase$1["default"] {
4005
4014
  * @method
4006
4015
  * @name coinbase#fetchOrderBook
4007
4016
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
4008
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproductbook
4017
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-product-book
4018
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-product-book
4009
4019
  * @param {string} symbol unified symbol of the market to fetch the order book for
4010
4020
  * @param {int} [limit] the maximum amount of order book entries to return
4011
4021
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -4059,7 +4069,7 @@ class coinbase extends coinbase$1["default"] {
4059
4069
  * @method
4060
4070
  * @name coinbase#fetchBidsAsks
4061
4071
  * @description fetches the bid and ask price and volume for multiple markets
4062
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getbestbidask
4072
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-best-bid-ask
4063
4073
  * @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
4064
4074
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4065
4075
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -4200,7 +4210,7 @@ class coinbase extends coinbase$1["default"] {
4200
4210
  * @method
4201
4211
  * @name coinbase#fetchDepositAddress
4202
4212
  * @description fetch the deposit address for a currency associated with this account
4203
- * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
4213
+ * @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/onchain-addresses
4204
4214
  * @param {string} code unified currency code
4205
4215
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4206
4216
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
@@ -4353,7 +4363,7 @@ class coinbase extends coinbase$1["default"] {
4353
4363
  * @method
4354
4364
  * @name coinbase#deposit
4355
4365
  * @description make a deposit
4356
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#deposit-funds
4366
+ * @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/deposit-fiat
4357
4367
  * @param {string} code unified currency code
4358
4368
  * @param {float} amount the amount to deposit
4359
4369
  * @param {string} id the payment method id to be used for the deposit, can be retrieved from v2PrivateGetPaymentMethods
@@ -4426,7 +4436,7 @@ class coinbase extends coinbase$1["default"] {
4426
4436
  * @method
4427
4437
  * @name coinbase#fetchDeposit
4428
4438
  * @description fetch information on a deposit, fiat only, for crypto transactions use fetchLedger
4429
- * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#show-deposit
4439
+ * @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/deposit-fiat
4430
4440
  * @param {string} id deposit id
4431
4441
  * @param {string} [code] unified currency code
4432
4442
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -4495,7 +4505,7 @@ class coinbase extends coinbase$1["default"] {
4495
4505
  * @method
4496
4506
  * @name coinbase#fetchDepositMethodIds
4497
4507
  * @description fetch the deposit id for a fiat currency associated with this account
4498
- * @see https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpaymentmethods
4508
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/payment-methods/list-payment-methods
4499
4509
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4500
4510
  * @returns {object} an array of [deposit id structures]{@link https://docs.ccxt.com/?id=deposit-id-structure}
4501
4511
  */
@@ -4528,7 +4538,7 @@ class coinbase extends coinbase$1["default"] {
4528
4538
  * @method
4529
4539
  * @name coinbase#fetchDepositMethodId
4530
4540
  * @description fetch the deposit id for a fiat currency associated with this account
4531
- * @see https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpaymentmethod
4541
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/payment-methods/get-payment-method
4532
4542
  * @param {string} id the deposit payment method id
4533
4543
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4534
4544
  * @returns {object} a [deposit id structure]{@link https://docs.ccxt.com/?id=deposit-id-structure}
@@ -4580,7 +4590,7 @@ class coinbase extends coinbase$1["default"] {
4580
4590
  * @method
4581
4591
  * @name coinbase#fetchConvertQuote
4582
4592
  * @description fetch a quote for converting from one currency to another
4583
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_createconvertquote
4593
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/convert/create-convert-quote
4584
4594
  * @param {string} fromCode the currency that you want to sell and convert from
4585
4595
  * @param {string} toCode the currency that you want to buy and convert into
4586
4596
  * @param {float} [amount] how much you want to trade in units of the from currency
@@ -4605,7 +4615,7 @@ class coinbase extends coinbase$1["default"] {
4605
4615
  * @method
4606
4616
  * @name coinbase#createConvertTrade
4607
4617
  * @description convert from one currency to another
4608
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_commitconverttrade
4618
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/convert/commit-convert-trade
4609
4619
  * @param {string} id the id of the trade that you want to make
4610
4620
  * @param {string} fromCode the currency that you want to sell and convert from
4611
4621
  * @param {string} toCode the currency that you want to buy and convert into
@@ -4628,7 +4638,7 @@ class coinbase extends coinbase$1["default"] {
4628
4638
  * @method
4629
4639
  * @name coinbase#fetchConvertTrade
4630
4640
  * @description fetch the data for a conversion trade
4631
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getconverttrade
4641
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/convert/get-convert-trade
4632
4642
  * @param {string} id the id of the trade that you want to commit
4633
4643
  * @param {string} code the unified currency code that was converted from
4634
4644
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -4679,7 +4689,7 @@ class coinbase extends coinbase$1["default"] {
4679
4689
  * @method
4680
4690
  * @name coinbase#closePosition
4681
4691
  * @description *futures only* closes open positions for a market
4682
- * @see https://docs.cdp.coinbase.com/coinbase-app/trade/reference/retailbrokerageapi_closeposition
4692
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/close-position
4683
4693
  * @param {string} symbol Unified CCXT market symbol
4684
4694
  * @param {string} [side] not used by coinbase
4685
4695
  * @param {object} [params] extra parameters specific to the coinbase api endpoint
@@ -4707,8 +4717,8 @@ class coinbase extends coinbase$1["default"] {
4707
4717
  * @method
4708
4718
  * @name coinbase#fetchPositions
4709
4719
  * @description fetch all open positions
4710
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmpositions
4711
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxpositions
4720
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/us-derivatives/list-futures-positions
4721
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/international-derivatives/list-perpetuals-positions
4712
4722
  * @param {string[]} [symbols] list of unified market symbols
4713
4723
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4714
4724
  * @param {string} [params.portfolio] the portfolio UUID to fetch positions for
@@ -4745,8 +4755,8 @@ class coinbase extends coinbase$1["default"] {
4745
4755
  * @method
4746
4756
  * @name coinbase#fetchPosition
4747
4757
  * @description fetch data on a single open contract trade position
4748
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxposition
4749
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmposition
4758
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/international-derivatives/get-perpetuals-position
4759
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/us-derivatives/get-futures-position
4750
4760
  * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
4751
4761
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4752
4762
  * @param {string} [params.product_id] *futures only* the product id of the position to fetch, required for futures markets only
@@ -4921,7 +4931,7 @@ class coinbase extends coinbase$1["default"] {
4921
4931
  /**
4922
4932
  * @method
4923
4933
  * @name coinbase#fetchTradingFees
4924
- * @see https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_gettransactionsummary/
4934
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/fees/get-transaction-summary
4925
4935
  * @description fetch the trading fees for multiple markets
4926
4936
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4927
4937
  * @param {string} [params.type] 'spot' or 'swap'
@@ -4983,7 +4993,7 @@ class coinbase extends coinbase$1["default"] {
4983
4993
  * @method
4984
4994
  * @name coinbase#fetchPortfolioDetails
4985
4995
  * @description Fetch details for a specific portfolio by UUID
4986
- * @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getportfolios
4996
+ * @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/portfolios/get-portfolio-breakdown
4987
4997
  * @param {string} portfolioUuid The unique identifier of the portfolio to fetch
4988
4998
  * @param {Dict} [params] Extra parameters specific to the exchange API endpoint
4989
4999
  * @returns {any[]} An account structure <https://docs.ccxt.com/?id=account-structure>
@@ -5131,9 +5141,9 @@ class coinbase extends coinbase$1["default"] {
5131
5141
  }
5132
5142
  }
5133
5143
  // v3: 'GET' doesn't need payload in the signature. inside url is enough
5134
- // https://docs.cloud.coinbase.com/advanced-trade/docs/auth#example-request
5144
+ // https://docs.cdp.coinbase.com/coinbase-app/authentication-authorization/api-key-authentication
5135
5145
  // v2: 'GET' require payload in the signature
5136
- // https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-key-authentication
5146
+ // https://docs.cdp.coinbase.com/coinbase-app/authentication-authorization/api-key-authentication
5137
5147
  const isCloudAPiKey = (this.apiKey.indexOf('organizations/') >= 0) || (this.secret.startsWith('-----BEGIN'));
5138
5148
  // using the size might be fragile, so we add an option to force v2 cloud api key if needed
5139
5149
  const isV2CloudAPiKey = this.secret.length === 88 || this.safeBool(this.options, 'v2CloudAPiKey', false) || this.secret.endsWith('=');
@@ -5268,7 +5278,7 @@ class coinbase extends coinbase$1["default"] {
5268
5278
  * @method
5269
5279
  * @name coinbase#fetchDepositAddresses
5270
5280
  * @description fetch deposit addresses for multiple currencies (when available)
5271
- * @see https://coinbase-migration.mintlify.app/coinbase-app/transfer-apis/onchain-addresses
5281
+ * @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/onchain-addresses
5272
5282
  * @param {string[]} [codes] list of unified currency codes, default is undefined (all currencies)
5273
5283
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5274
5284
  * @param {string} [params.accountId] account ID to fetch deposit addresses for
@@ -525,7 +525,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
525
525
  for (let j = 0; j < supportedNetworks.length; j++) {
526
526
  const network = supportedNetworks[j];
527
527
  const networkId = this.safeString(network, 'id');
528
- const networkCode = this.networkIdToCode(networkId);
528
+ const networkCode = this.networkIdToCode(networkId, code);
529
529
  networks[networkCode] = {
530
530
  'id': networkId,
531
531
  'name': this.safeString(network, 'name'),
@@ -2022,7 +2022,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
2022
2022
  'txid': this.safeString(details, 'crypto_transaction_hash'),
2023
2023
  'type': type,
2024
2024
  'currency': code,
2025
- 'network': this.networkIdToCode(networkId),
2025
+ 'network': this.networkIdToCode(networkId, code),
2026
2026
  'amount': amount,
2027
2027
  'status': this.parseTransactionStatus(transaction),
2028
2028
  'timestamp': timestamp,
@@ -1189,13 +1189,14 @@ class coinbaseinternational extends coinbaseinternational$1["default"] {
1189
1189
  const addressFrom = this.safeStringN(transaction, ['from_address', 'from_cb_account', this.safeStringN(fromPorfolio, ['id', 'uuid', 'name']), 'from_counterparty_id']);
1190
1190
  const toPorfolio = this.safeDict(transaction, 'from_portfolio', {});
1191
1191
  const addressTo = this.safeStringN(transaction, ['to_address', 'to_cb_account', this.safeStringN(toPorfolio, ['id', 'uuid', 'name']), 'to_counterparty_id']);
1192
+ const code = this.safeString(currency, 'code');
1192
1193
  return {
1193
1194
  'info': transaction,
1194
1195
  'id': this.safeString(transaction, 'transfer_uuid'),
1195
1196
  'txid': this.safeString(transaction, 'transaction_uuid'),
1196
1197
  'timestamp': this.parse8601(datetime),
1197
1198
  'datetime': datetime,
1198
- 'network': this.networkIdToCode(this.safeString(transaction, 'network_name')),
1199
+ 'network': this.networkIdToCode(this.safeString(transaction, 'network_name'), code),
1199
1200
  'address': undefined,
1200
1201
  'addressTo': addressTo,
1201
1202
  'addressFrom': addressFrom,