ccxt 4.5.55 → 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.
- package/README.md +215 -10
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +6 -11
- package/dist/cjs/src/aftermath.js +10 -5
- package/dist/cjs/src/alpaca.js +2 -2
- package/dist/cjs/src/apex.js +26 -17
- package/dist/cjs/src/arkham.js +10 -7
- package/dist/cjs/src/ascendex.js +8 -5
- package/dist/cjs/src/aster.js +7 -4
- package/dist/cjs/src/backpack.js +4 -4
- package/dist/cjs/src/base/Exchange.js +72 -35
- package/dist/cjs/src/base/functions/io.js +25 -0
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/bigone.js +10 -7
- package/dist/cjs/src/binance.js +196 -198
- package/dist/cjs/src/bingx.js +7 -7
- package/dist/cjs/src/bitfinex.js +71 -58
- package/dist/cjs/src/bitflyer.js +2 -1
- package/dist/cjs/src/bitget.js +16 -5
- package/dist/cjs/src/bitmart.js +18 -10
- package/dist/cjs/src/bitmex.js +8 -5
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +4 -3
- package/dist/cjs/src/bitso.js +7 -4
- package/dist/cjs/src/bitstamp.js +7 -4
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bittrade.js +2 -2
- package/dist/cjs/src/bitvavo.js +457 -34
- package/dist/cjs/src/blofin.js +28 -4
- package/dist/cjs/src/bullish.js +6 -5
- package/dist/cjs/src/bybit.js +19 -17
- package/dist/cjs/src/bybiteu.js +1 -0
- package/dist/cjs/src/bydfi.js +1 -1
- package/dist/cjs/src/cex.js +3 -3
- package/dist/cjs/src/coinbase.js +75 -65
- package/dist/cjs/src/coinbaseexchange.js +4 -3
- package/dist/cjs/src/coinbaseinternational.js +17 -10
- package/dist/cjs/src/coinex.js +79 -77
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +52 -54
- package/dist/cjs/src/cryptomus.js +43 -39
- package/dist/cjs/src/deepcoin.js +9 -5
- package/dist/cjs/src/delta.js +53 -53
- package/dist/cjs/src/deribit.js +35 -35
- package/dist/cjs/src/derive.js +31 -31
- package/dist/cjs/src/digifinex.js +45 -45
- package/dist/cjs/src/exmo.js +104 -122
- package/dist/cjs/src/extended.js +3497 -0
- package/dist/cjs/src/foxbit.js +72 -76
- package/dist/cjs/src/gate.js +53 -53
- package/dist/cjs/src/gemini.js +45 -45
- package/dist/cjs/src/grvt.js +17 -11
- package/dist/cjs/src/hashkey.js +56 -58
- package/dist/cjs/src/hibachi.js +1 -1
- package/dist/cjs/src/hitbtc.js +5 -14
- package/dist/cjs/src/hollaex.js +51 -54
- package/dist/cjs/src/htx.js +84 -72
- package/dist/cjs/src/hyperliquid.js +60 -55
- package/dist/cjs/src/indodax.js +4 -3
- package/dist/cjs/src/kraken.js +71 -71
- package/dist/cjs/src/krakenfutures.js +2 -1
- package/dist/cjs/src/kucoin.js +3 -2
- package/dist/cjs/src/latoken.js +30 -32
- package/dist/cjs/src/lbank.js +64 -60
- package/dist/cjs/src/lighter.js +36 -38
- package/dist/cjs/src/luno.js +36 -44
- package/dist/cjs/src/mercado.js +2 -1
- package/dist/cjs/src/mexc.js +72 -63
- package/dist/cjs/src/modetrade.js +51 -53
- package/dist/cjs/src/ndax.js +35 -37
- package/dist/cjs/src/okx.js +23 -5
- package/dist/cjs/src/onetrading.js +21 -23
- package/dist/cjs/src/p2b.js +8 -4
- package/dist/cjs/src/paradex.js +3 -2
- package/dist/cjs/src/phemex.js +47 -47
- package/dist/cjs/src/poloniex.js +19 -13
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/apex.js +11 -2
- package/dist/cjs/src/pro/arkham.js +1 -1
- package/dist/cjs/src/pro/aster.js +10 -9
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +6 -6
- package/dist/cjs/src/pro/bingx.js +7 -2
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +10 -0
- package/dist/cjs/src/pro/bitmex.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/blockchaincom.js +1 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/coinex.js +1 -1
- package/dist/cjs/src/pro/coinone.js +1 -1
- package/dist/cjs/src/pro/cryptocom.js +3 -1
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/exmo.js +1 -1
- package/dist/cjs/src/pro/extended.js +865 -0
- package/dist/cjs/src/pro/gate.js +1 -1
- package/dist/cjs/src/pro/grvt.js +8 -0
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/krakenfutures.js +16 -4
- package/dist/cjs/src/pro/kucoin.js +1 -1
- package/dist/cjs/src/pro/luno.js +3 -3
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/okx.js +4 -4
- package/dist/cjs/src/pro/onetrading.js +1 -1
- package/dist/cjs/src/pro/toobit.js +1 -1
- package/dist/cjs/src/pro/weex.js +1 -1
- package/dist/cjs/src/pro/woo.js +4 -4
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.js +1 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/toobit.js +3 -3
- package/dist/cjs/src/upbit.js +3 -3
- package/dist/cjs/src/weex.js +57 -62
- package/dist/cjs/src/whitebit.js +61 -63
- package/dist/cjs/src/woo.js +66 -55
- package/dist/cjs/src/woofipro.js +54 -48
- package/dist/cjs/src/xt.js +3 -2
- package/dist/cjs/src/yobit.js +4 -2
- package/dist/cjs/src/zebpay.js +73 -75
- package/js/ccxt.d.ts +8 -14
- package/js/ccxt.js +6 -10
- package/js/src/abstract/bitvavo.d.ts +15 -7
- package/js/src/abstract/extended.d.ts +58 -0
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/aftermath.js +10 -5
- package/js/src/alpaca.js +2 -2
- package/js/src/apex.d.ts +1 -1
- package/js/src/apex.js +26 -17
- package/js/src/arkham.js +10 -7
- package/js/src/ascendex.js +8 -5
- package/js/src/aster.js +7 -4
- package/js/src/backpack.js +4 -4
- package/js/src/base/Exchange.d.ts +10 -6
- package/js/src/base/Exchange.js +72 -35
- package/js/src/base/functions/io.d.ts +7 -0
- package/js/src/base/functions/io.js +24 -0
- package/js/src/bigone.js +10 -7
- package/js/src/binance.d.ts +2 -0
- package/js/src/binance.js +200 -202
- package/js/src/bingx.js +7 -7
- package/js/src/bitfinex.d.ts +2 -0
- package/js/src/bitfinex.js +71 -58
- package/js/src/bitflyer.js +2 -1
- package/js/src/bitget.js +16 -5
- package/js/src/bitmart.js +18 -10
- package/js/src/bitmex.js +8 -5
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.js +4 -3
- package/js/src/bitso.js +7 -4
- package/js/src/bitstamp.js +7 -4
- package/js/src/bitteam.js +1 -1
- package/js/src/bittrade.js +2 -2
- package/js/src/bitvavo.d.ts +114 -21
- package/js/src/bitvavo.js +457 -34
- package/js/src/blofin.d.ts +1 -0
- package/js/src/blofin.js +28 -4
- package/js/src/bullish.js +6 -5
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +19 -17
- package/js/src/bybiteu.js +1 -0
- package/js/src/bydfi.js +1 -1
- package/js/src/cex.js +3 -3
- package/js/src/coinbase.d.ts +63 -56
- package/js/src/coinbase.js +75 -65
- package/js/src/coinbaseexchange.js +4 -3
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +17 -10
- package/js/src/coinex.d.ts +2 -1
- package/js/src/coinex.js +79 -77
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinsph.js +5 -5
- package/js/src/cryptocom.d.ts +1 -0
- package/js/src/cryptocom.js +52 -54
- package/js/src/cryptomus.d.ts +2 -1
- package/js/src/cryptomus.js +43 -39
- package/js/src/deepcoin.js +9 -5
- package/js/src/delta.d.ts +1 -0
- package/js/src/delta.js +53 -53
- package/js/src/deribit.d.ts +1 -0
- package/js/src/deribit.js +35 -35
- package/js/src/derive.d.ts +1 -0
- package/js/src/derive.js +31 -31
- package/js/src/digifinex.d.ts +1 -0
- package/js/src/digifinex.js +45 -45
- package/js/src/exmo.d.ts +1 -0
- package/js/src/exmo.js +104 -122
- package/js/src/extended.d.ts +554 -0
- package/js/src/extended.js +3490 -0
- package/js/src/foxbit.d.ts +1 -0
- package/js/src/foxbit.js +72 -76
- package/js/src/gate.d.ts +1 -0
- package/js/src/gate.js +53 -53
- package/js/src/gemini.d.ts +2 -1
- package/js/src/gemini.js +45 -45
- package/js/src/grvt.d.ts +1 -1
- package/js/src/grvt.js +17 -11
- package/js/src/hashkey.d.ts +1 -0
- package/js/src/hashkey.js +56 -58
- package/js/src/hibachi.d.ts +1 -1
- package/js/src/hibachi.js +1 -1
- package/js/src/hitbtc.d.ts +0 -1
- package/js/src/hitbtc.js +5 -14
- package/js/src/hollaex.d.ts +1 -0
- package/js/src/hollaex.js +51 -54
- package/js/src/htx.d.ts +1 -0
- package/js/src/htx.js +84 -72
- package/js/src/hyperliquid.d.ts +5 -4
- package/js/src/hyperliquid.js +60 -55
- package/js/src/indodax.js +4 -3
- package/js/src/kraken.d.ts +2 -1
- package/js/src/kraken.js +71 -71
- package/js/src/krakenfutures.js +2 -1
- package/js/src/kucoin.js +3 -2
- package/js/src/latoken.d.ts +1 -0
- package/js/src/latoken.js +30 -32
- package/js/src/lbank.d.ts +1 -0
- package/js/src/lbank.js +64 -60
- package/js/src/lighter.d.ts +2 -1
- package/js/src/lighter.js +36 -38
- package/js/src/luno.d.ts +1 -0
- package/js/src/luno.js +36 -44
- package/js/src/mercado.js +2 -1
- package/js/src/mexc.d.ts +4 -3
- package/js/src/mexc.js +72 -63
- package/js/src/modetrade.d.ts +1 -0
- package/js/src/modetrade.js +51 -53
- package/js/src/ndax.d.ts +1 -0
- package/js/src/ndax.js +35 -37
- package/js/src/okx.js +23 -5
- package/js/src/onetrading.d.ts +2 -1
- package/js/src/onetrading.js +21 -23
- package/js/src/p2b.js +8 -4
- package/js/src/paradex.js +3 -2
- package/js/src/phemex.d.ts +1 -0
- package/js/src/phemex.js +47 -47
- package/js/src/poloniex.js +19 -13
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/apex.js +11 -2
- package/js/src/pro/arkham.js +1 -1
- package/js/src/pro/aster.js +10 -9
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +1 -1
- package/js/src/pro/binance.js +6 -6
- package/js/src/pro/bingx.js +7 -2
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmart.js +10 -0
- package/js/src/pro/bitmex.js +1 -1
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/blockchaincom.js +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coinex.js +1 -1
- package/js/src/pro/coinone.js +1 -1
- package/js/src/pro/cryptocom.js +3 -1
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/exmo.js +1 -1
- package/js/src/pro/extended.d.ts +126 -0
- package/js/src/pro/extended.js +858 -0
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/grvt.js +8 -0
- package/js/src/pro/htx.d.ts +4 -4
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/krakenfutures.d.ts +4 -4
- package/js/src/pro/krakenfutures.js +16 -4
- package/js/src/pro/kucoin.js +1 -1
- package/js/src/pro/luno.d.ts +1 -1
- package/js/src/pro/luno.js +3 -3
- package/js/src/pro/modetrade.d.ts +3 -3
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/okx.d.ts +4 -4
- package/js/src/pro/okx.js +4 -4
- package/js/src/pro/onetrading.js +1 -1
- package/js/src/pro/toobit.js +1 -1
- package/js/src/pro/weex.js +1 -1
- package/js/src/pro/woo.d.ts +4 -4
- package/js/src/pro/woo.js +4 -4
- package/js/src/pro/woofipro.d.ts +3 -3
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/toobit.d.ts +1 -1
- package/js/src/toobit.js +3 -3
- package/js/src/upbit.js +3 -3
- package/js/src/weex.d.ts +1 -0
- package/js/src/weex.js +57 -62
- package/js/src/whitebit.d.ts +1 -0
- package/js/src/whitebit.js +61 -63
- package/js/src/woo.d.ts +1 -0
- package/js/src/woo.js +66 -55
- package/js/src/woofipro.d.ts +1 -0
- package/js/src/woofipro.js +54 -48
- package/js/src/xt.js +3 -2
- package/js/src/yobit.js +4 -2
- package/js/src/zebpay.d.ts +2 -1
- package/js/src/zebpay.js +73 -75
- package/package.json +25 -11
- package/dist/cjs/src/gateio.js +0 -18
- package/dist/cjs/src/oxfun.js +0 -2931
- package/dist/cjs/src/pro/gateio.js +0 -18
- package/dist/cjs/src/pro/oxfun.js +0 -1113
- package/js/src/abstract/gateio.d.ts +0 -346
- package/js/src/abstract/gateio.js +0 -5
- package/js/src/abstract/oxfun.d.ts +0 -37
- package/js/src/gateio.d.ts +0 -4
- package/js/src/gateio.js +0 -11
- package/js/src/oxfun.d.ts +0 -442
- package/js/src/oxfun.js +0 -2924
- package/js/src/pro/gateio.d.ts +0 -4
- package/js/src/pro/gateio.js +0 -11
- package/js/src/pro/oxfun.d.ts +0 -234
- package/js/src/pro/oxfun.js +0 -1106
- /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
- /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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://
|
|
172
|
-
'https://docs.
|
|
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.
|
|
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.
|
|
551
|
-
* @see https://docs.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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/
|
|
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/
|
|
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/
|
|
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':
|
|
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.
|
|
1320
|
-
* @see https://docs.
|
|
1321
|
-
* @see https://docs.
|
|
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.
|
|
1909
|
-
* @see https://docs.
|
|
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.
|
|
2018
|
-
* @see https://docs.
|
|
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.
|
|
2139
|
-
* @see https://docs.
|
|
2140
|
-
* @see https://docs.
|
|
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.
|
|
2415
|
-
* @see https://docs.
|
|
2416
|
-
* @see https://docs.
|
|
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/
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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/
|
|
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/
|
|
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.
|
|
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.
|
|
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.
|
|
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/
|
|
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.
|
|
4711
|
-
* @see https://docs.
|
|
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.
|
|
4749
|
-
* @see https://docs.
|
|
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/
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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'),
|
|
@@ -1034,13 +1034,14 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
const price = this.safeString(trade, 'price');
|
|
1036
1036
|
const amount = this.safeString(trade, 'size');
|
|
1037
|
+
const symbol = market['symbol'];
|
|
1037
1038
|
return this.safeTrade({
|
|
1038
1039
|
'id': id,
|
|
1039
1040
|
'order': orderId,
|
|
1040
1041
|
'info': trade,
|
|
1041
1042
|
'timestamp': timestamp,
|
|
1042
1043
|
'datetime': this.iso8601(timestamp),
|
|
1043
|
-
'symbol':
|
|
1044
|
+
'symbol': symbol,
|
|
1044
1045
|
'type': undefined,
|
|
1045
1046
|
'takerOrMaker': takerOrMaker,
|
|
1046
1047
|
'side': side,
|
|
@@ -2021,7 +2022,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
2021
2022
|
'txid': this.safeString(details, 'crypto_transaction_hash'),
|
|
2022
2023
|
'type': type,
|
|
2023
2024
|
'currency': code,
|
|
2024
|
-
'network': this.networkIdToCode(networkId),
|
|
2025
|
+
'network': this.networkIdToCode(networkId, code),
|
|
2025
2026
|
'amount': amount,
|
|
2026
2027
|
'status': this.parseTransactionStatus(transaction),
|
|
2027
2028
|
'timestamp': timestamp,
|