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/js/src/coinbase.js
CHANGED
|
@@ -19,9 +19,9 @@ export default class coinbase extends Exchange {
|
|
|
19
19
|
'pro': true,
|
|
20
20
|
'certified': false,
|
|
21
21
|
// rate-limits:
|
|
22
|
-
// ADVANCED API: https://docs.
|
|
22
|
+
// ADVANCED API: https://docs.cdp.coinbase.com/advanced-trade/docs/rest-api-rate-limits
|
|
23
23
|
// - max 30 req/second for private data, 10 req/s for public data
|
|
24
|
-
// DATA API : https://docs.
|
|
24
|
+
// DATA API : https://docs.cdp.coinbase.com/coinbase-app/api-architecture/rate-limiting
|
|
25
25
|
// - max 10000 req/hour (to prevent userland mistakes we apply ~3 req/second RL per call
|
|
26
26
|
'rateLimit': 34,
|
|
27
27
|
'version': 'v2',
|
|
@@ -163,8 +163,8 @@ export default class coinbase extends Exchange {
|
|
|
163
163
|
},
|
|
164
164
|
'www': 'https://www.coinbase.com',
|
|
165
165
|
'doc': [
|
|
166
|
-
'https://
|
|
167
|
-
'https://docs.
|
|
166
|
+
'https://docs.cdp.coinbase.com/coinbase-app/introduction/welcome',
|
|
167
|
+
'https://docs.cdp.coinbase.com/coinbase-app/advanced-trade-apis/api-reference',
|
|
168
168
|
],
|
|
169
169
|
'fees': [
|
|
170
170
|
'https://support.coinbase.com/customer/portal/articles/2109597-buy-sell-bank-transfer-fees',
|
|
@@ -347,6 +347,7 @@ export default class coinbase extends Exchange {
|
|
|
347
347
|
'jumio_face_match_verification_required': AuthenticationError,
|
|
348
348
|
'unverified_email': AuthenticationError,
|
|
349
349
|
'authentication_error': AuthenticationError,
|
|
350
|
+
'unauthorized': AuthenticationError,
|
|
350
351
|
'invalid_authentication_method': AuthenticationError,
|
|
351
352
|
'invalid_token': AuthenticationError,
|
|
352
353
|
'revoked_token': AuthenticationError,
|
|
@@ -354,6 +355,7 @@ export default class coinbase extends Exchange {
|
|
|
354
355
|
'invalid_scope': AuthenticationError,
|
|
355
356
|
'not_found': ExchangeError,
|
|
356
357
|
'rate_limit_exceeded': RateLimitExceeded,
|
|
358
|
+
'resource_exhausted': RateLimitExceeded,
|
|
357
359
|
'internal_server_error': ExchangeError,
|
|
358
360
|
'UNSUPPORTED_ORDER_CONFIGURATION': BadRequest,
|
|
359
361
|
'INSUFFICIENT_FUND': InsufficientFunds,
|
|
@@ -504,7 +506,8 @@ export default class coinbase extends Exchange {
|
|
|
504
506
|
* @method
|
|
505
507
|
* @name coinbase#fetchTime
|
|
506
508
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
507
|
-
* @see https://docs.
|
|
509
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/time
|
|
510
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-server-time
|
|
508
511
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
509
512
|
* @param {string} [params.method] 'v2PublicGetTime' or 'v3PublicGetBrokerageTime' default is 'v2PublicGetTime'
|
|
510
513
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
@@ -542,8 +545,8 @@ export default class coinbase extends Exchange {
|
|
|
542
545
|
* @method
|
|
543
546
|
* @name coinbase#fetchAccounts
|
|
544
547
|
* @description fetch all the accounts associated with a profile
|
|
545
|
-
* @see https://docs.
|
|
546
|
-
* @see https://docs.
|
|
548
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/accounts/list-accounts
|
|
549
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/accounts
|
|
547
550
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
548
551
|
* @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)
|
|
549
552
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/?id=account-structure} indexed by the account type
|
|
@@ -679,7 +682,7 @@ export default class coinbase extends Exchange {
|
|
|
679
682
|
* @method
|
|
680
683
|
* @name coinbase#fetchPortfolios
|
|
681
684
|
* @description fetch all the portfolios
|
|
682
|
-
* @see https://docs.
|
|
685
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/portfolios/list-portfolios
|
|
683
686
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
684
687
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/?id=account-structure} indexed by the account type
|
|
685
688
|
*/
|
|
@@ -772,7 +775,7 @@ export default class coinbase extends Exchange {
|
|
|
772
775
|
* @method
|
|
773
776
|
* @name coinbase#createDepositAddress
|
|
774
777
|
* @description create a currency deposit address
|
|
775
|
-
* @see https://docs.
|
|
778
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/onchain-addresses
|
|
776
779
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
777
780
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
778
781
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
|
|
@@ -849,7 +852,7 @@ export default class coinbase extends Exchange {
|
|
|
849
852
|
* @name coinbase#fetchMySells
|
|
850
853
|
* @ignore
|
|
851
854
|
* @description fetch sells
|
|
852
|
-
* @see https://docs.
|
|
855
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/oauth2-integration/available-apis
|
|
853
856
|
* @param {string} symbol not used by coinbase fetchMySells ()
|
|
854
857
|
* @param {int} [since] timestamp in ms of the earliest sell, default is undefined
|
|
855
858
|
* @param {int} [limit] max number of sells to return, default is undefined
|
|
@@ -869,7 +872,7 @@ export default class coinbase extends Exchange {
|
|
|
869
872
|
* @name coinbase#fetchMyBuys
|
|
870
873
|
* @ignore
|
|
871
874
|
* @description fetch buys
|
|
872
|
-
* @see https://docs.
|
|
875
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/oauth2-integration/available-apis
|
|
873
876
|
* @param {string} symbol not used by coinbase fetchMyBuys ()
|
|
874
877
|
* @param {int} [since] timestamp in ms of the earliest buy, default is undefined
|
|
875
878
|
* @param {int} [limit] max number of buys to return, default is undefined
|
|
@@ -895,7 +898,8 @@ export default class coinbase extends Exchange {
|
|
|
895
898
|
* @method
|
|
896
899
|
* @name coinbase#fetchWithdrawals
|
|
897
900
|
* @description Fetch all withdrawals made from an account. Won't return crypto withdrawals. Use fetchLedger for those.
|
|
898
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/
|
|
901
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/withdraw-fiat
|
|
902
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
|
|
899
903
|
* @param {string} code unified currency code
|
|
900
904
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
901
905
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -916,7 +920,8 @@ export default class coinbase extends Exchange {
|
|
|
916
920
|
* @method
|
|
917
921
|
* @name coinbase#fetchDeposits
|
|
918
922
|
* @description Fetch all fiat deposits made to an account. Won't return crypto deposits or staking rewards. Use fetchLedger for those.
|
|
919
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/
|
|
923
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/deposit-fiat
|
|
924
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
|
|
920
925
|
* @param {string} code unified currency code
|
|
921
926
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
922
927
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -937,7 +942,7 @@ export default class coinbase extends Exchange {
|
|
|
937
942
|
* @method
|
|
938
943
|
* @name coinbase#fetchDepositsWithdrawals
|
|
939
944
|
* @description fetch history of deposits and withdrawals
|
|
940
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/
|
|
945
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
|
|
941
946
|
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
942
947
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
943
948
|
* @param {int} [limit] max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
|
|
@@ -1150,13 +1155,14 @@ export default class coinbase extends Exchange {
|
|
|
1150
1155
|
const toObject = this.safeDict(transaction, 'to');
|
|
1151
1156
|
const addressTo = this.safeString(toObject, 'address');
|
|
1152
1157
|
const networkId = this.safeString(network, 'network_name');
|
|
1158
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1153
1159
|
return {
|
|
1154
1160
|
'info': transaction,
|
|
1155
1161
|
'id': id,
|
|
1156
1162
|
'txid': this.safeString(network, 'hash', id),
|
|
1157
1163
|
'timestamp': this.parse8601(datetime),
|
|
1158
1164
|
'datetime': datetime,
|
|
1159
|
-
'network': this.networkIdToCode(networkId),
|
|
1165
|
+
'network': this.networkIdToCode(networkId, code),
|
|
1160
1166
|
'address': addressTo,
|
|
1161
1167
|
'addressTo': addressTo,
|
|
1162
1168
|
'addressFrom': undefined,
|
|
@@ -1165,7 +1171,7 @@ export default class coinbase extends Exchange {
|
|
|
1165
1171
|
'tagFrom': undefined,
|
|
1166
1172
|
'type': type,
|
|
1167
1173
|
'amount': this.parseNumber(amountStringAbs),
|
|
1168
|
-
'currency':
|
|
1174
|
+
'currency': code,
|
|
1169
1175
|
'status': status,
|
|
1170
1176
|
'updated': this.parse8601(this.safeString(transaction, 'updated_at')),
|
|
1171
1177
|
'fee': {
|
|
@@ -1311,9 +1317,10 @@ export default class coinbase extends Exchange {
|
|
|
1311
1317
|
/**
|
|
1312
1318
|
* @method
|
|
1313
1319
|
* @name coinbase#fetchMarkets
|
|
1314
|
-
* @see https://docs.
|
|
1315
|
-
* @see https://docs.
|
|
1316
|
-
* @see https://docs.
|
|
1320
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/list-products
|
|
1321
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/list-public-products
|
|
1322
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/currencies
|
|
1323
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/exchange-rates
|
|
1317
1324
|
* @description retrieves data on all markets for coinbase
|
|
1318
1325
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1319
1326
|
* @param {boolean} [params.usePrivate] use private endpoint for fetching markets
|
|
@@ -1900,8 +1907,8 @@ export default class coinbase extends Exchange {
|
|
|
1900
1907
|
* @method
|
|
1901
1908
|
* @name coinbase#fetchCurrencies
|
|
1902
1909
|
* @description fetches all available currencies on an exchange
|
|
1903
|
-
* @see https://docs.
|
|
1904
|
-
* @see https://docs.
|
|
1910
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/currencies
|
|
1911
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/exchange-rates
|
|
1905
1912
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1906
1913
|
* @returns {object} an associative dictionary of currencies
|
|
1907
1914
|
*/
|
|
@@ -2009,8 +2016,9 @@ export default class coinbase extends Exchange {
|
|
|
2009
2016
|
* @method
|
|
2010
2017
|
* @name coinbase#fetchTickers
|
|
2011
2018
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
2012
|
-
* @see https://docs.
|
|
2013
|
-
* @see https://docs.
|
|
2019
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/list-products
|
|
2020
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/list-public-products
|
|
2021
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/exchange-rates
|
|
2014
2022
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
2015
2023
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2016
2024
|
* @param {boolean} [params.usePrivate] use private endpoint for fetching tickers
|
|
@@ -2130,10 +2138,9 @@ export default class coinbase extends Exchange {
|
|
|
2130
2138
|
* @method
|
|
2131
2139
|
* @name coinbase#fetchTicker
|
|
2132
2140
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
2133
|
-
* @see https://docs.
|
|
2134
|
-
* @see https://docs.
|
|
2135
|
-
* @see https://docs.
|
|
2136
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-sell-price
|
|
2141
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-market-trades
|
|
2142
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-market-trades
|
|
2143
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/prices
|
|
2137
2144
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2138
2145
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2139
2146
|
* @param {boolean} [params.usePrivate] whether to use the private endpoint for fetching the ticker
|
|
@@ -2406,9 +2413,9 @@ export default class coinbase extends Exchange {
|
|
|
2406
2413
|
* @method
|
|
2407
2414
|
* @name coinbase#fetchBalance
|
|
2408
2415
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2409
|
-
* @see https://docs.
|
|
2410
|
-
* @see https://docs.
|
|
2411
|
-
* @see https://docs.
|
|
2416
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/accounts/list-accounts
|
|
2417
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/accounts
|
|
2418
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/us-derivatives/get-futures-balance-summary
|
|
2412
2419
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2413
2420
|
* @param {boolean} [params.v3] default false, set true to use v3 api endpoint
|
|
2414
2421
|
* @param {string} [params.type] "spot" (default) or "swap" or "future"
|
|
@@ -2513,7 +2520,7 @@ export default class coinbase extends Exchange {
|
|
|
2513
2520
|
* @method
|
|
2514
2521
|
* @name coinbase#fetchLedger
|
|
2515
2522
|
* @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.
|
|
2516
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/
|
|
2523
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/track-apis/transactions
|
|
2517
2524
|
* @param {string} [code] unified currency code, default is undefined
|
|
2518
2525
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2519
2526
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
@@ -2931,7 +2938,7 @@ export default class coinbase extends Exchange {
|
|
|
2931
2938
|
* @method
|
|
2932
2939
|
* @name coinbase#createMarketBuyOrderWithCost
|
|
2933
2940
|
* @description create a market buy order by providing the symbol and cost
|
|
2934
|
-
* @see https://docs.
|
|
2941
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/create-order
|
|
2935
2942
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
2936
2943
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2937
2944
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2950,7 +2957,7 @@ export default class coinbase extends Exchange {
|
|
|
2950
2957
|
* @method
|
|
2951
2958
|
* @name coinbase#createOrder
|
|
2952
2959
|
* @description create a trade order
|
|
2953
|
-
* @see https://docs.
|
|
2960
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/create-order
|
|
2954
2961
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
2955
2962
|
* @param {string} type 'market' or 'limit'
|
|
2956
2963
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -3382,7 +3389,7 @@ export default class coinbase extends Exchange {
|
|
|
3382
3389
|
* @method
|
|
3383
3390
|
* @name coinbase#cancelOrder
|
|
3384
3391
|
* @description cancels an open order
|
|
3385
|
-
* @see https://docs.
|
|
3392
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/cancel-orders
|
|
3386
3393
|
* @param {string} id order id
|
|
3387
3394
|
* @param {string} symbol not used by coinbase cancelOrder()
|
|
3388
3395
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -3397,7 +3404,7 @@ export default class coinbase extends Exchange {
|
|
|
3397
3404
|
* @method
|
|
3398
3405
|
* @name coinbase#cancelOrders
|
|
3399
3406
|
* @description cancel multiple orders
|
|
3400
|
-
* @see https://docs.
|
|
3407
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/cancel-orders
|
|
3401
3408
|
* @param {string[]} ids order ids
|
|
3402
3409
|
* @param {string} symbol not used by coinbase cancelOrders()
|
|
3403
3410
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -3437,7 +3444,7 @@ export default class coinbase extends Exchange {
|
|
|
3437
3444
|
* @method
|
|
3438
3445
|
* @name coinbase#editOrder
|
|
3439
3446
|
* @description edit a trade order
|
|
3440
|
-
* @see https://docs.
|
|
3447
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/edit-order
|
|
3441
3448
|
* @param {string} id cancel order id
|
|
3442
3449
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
3443
3450
|
* @param {string} type 'market' or 'limit'
|
|
@@ -3484,7 +3491,7 @@ export default class coinbase extends Exchange {
|
|
|
3484
3491
|
* @method
|
|
3485
3492
|
* @name coinbase#fetchOrder
|
|
3486
3493
|
* @description fetches information on an order made by the user
|
|
3487
|
-
* @see https://docs.
|
|
3494
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/get-order
|
|
3488
3495
|
* @param {string} id the order id
|
|
3489
3496
|
* @param {string} symbol unified market symbol that the order was made in
|
|
3490
3497
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -3546,7 +3553,7 @@ export default class coinbase extends Exchange {
|
|
|
3546
3553
|
* @method
|
|
3547
3554
|
* @name coinbase#fetchOrders
|
|
3548
3555
|
* @description fetches information on multiple orders made by the user
|
|
3549
|
-
* @see https://docs.
|
|
3556
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
|
|
3550
3557
|
* @param {string} symbol unified market symbol that the orders were made in
|
|
3551
3558
|
* @param {int} [since] the earliest time in ms to fetch orders
|
|
3552
3559
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -3671,7 +3678,7 @@ export default class coinbase extends Exchange {
|
|
|
3671
3678
|
// }
|
|
3672
3679
|
// },
|
|
3673
3680
|
// "side": "BUY",
|
|
3674
|
-
// "client_order_id": "18eb9947-db49-4874-8e7b-
|
|
3681
|
+
// "client_order_id": "18eb9947-db49-4874-8e7b-39b8fe5f4314",
|
|
3675
3682
|
// "status": "FILLED",
|
|
3676
3683
|
// "time_in_force": "IMMEDIATE_OR_CANCEL",
|
|
3677
3684
|
// "created_time": "2023-01-18T01:37:37.975552Z",
|
|
@@ -3713,7 +3720,7 @@ export default class coinbase extends Exchange {
|
|
|
3713
3720
|
* @method
|
|
3714
3721
|
* @name coinbase#fetchOpenOrders
|
|
3715
3722
|
* @description fetches information on all currently open orders
|
|
3716
|
-
* @see https://docs.
|
|
3723
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
|
|
3717
3724
|
* @param {string} symbol unified market symbol of the orders
|
|
3718
3725
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3719
3726
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
@@ -3735,7 +3742,7 @@ export default class coinbase extends Exchange {
|
|
|
3735
3742
|
* @method
|
|
3736
3743
|
* @name coinbase#fetchClosedOrders
|
|
3737
3744
|
* @description fetches information on multiple closed orders made by the user
|
|
3738
|
-
* @see https://docs.
|
|
3745
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
|
|
3739
3746
|
* @param {string} symbol unified market symbol of the orders
|
|
3740
3747
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3741
3748
|
* @param {int} [limit] the maximum number of closed order structures to retrieve
|
|
@@ -3757,7 +3764,7 @@ export default class coinbase extends Exchange {
|
|
|
3757
3764
|
* @method
|
|
3758
3765
|
* @name coinbase#fetchCanceledOrders
|
|
3759
3766
|
* @description fetches information on multiple canceled orders made by the user
|
|
3760
|
-
* @see https://docs.
|
|
3767
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
|
|
3761
3768
|
* @param {string} symbol unified market symbol of the orders
|
|
3762
3769
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3763
3770
|
* @param {int} [limit] the maximum number of canceled order structures to retrieve
|
|
@@ -3771,7 +3778,8 @@ export default class coinbase extends Exchange {
|
|
|
3771
3778
|
* @method
|
|
3772
3779
|
* @name coinbase#fetchOHLCV
|
|
3773
3780
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3774
|
-
* @see https://docs.
|
|
3781
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-product-candles
|
|
3782
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-product-candles
|
|
3775
3783
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3776
3784
|
* @param {string} timeframe the length of time each candle represents
|
|
3777
3785
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -3868,7 +3876,8 @@ export default class coinbase extends Exchange {
|
|
|
3868
3876
|
* @method
|
|
3869
3877
|
* @name coinbase#fetchTrades
|
|
3870
3878
|
* @description get the list of most recent trades for a particular symbol
|
|
3871
|
-
* @see https://docs.
|
|
3879
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-market-trades
|
|
3880
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-market-trades
|
|
3872
3881
|
* @param {string} symbol unified market symbol of the trades
|
|
3873
3882
|
* @param {int} [since] not used by coinbase fetchTrades
|
|
3874
3883
|
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
@@ -3928,7 +3937,7 @@ export default class coinbase extends Exchange {
|
|
|
3928
3937
|
* @method
|
|
3929
3938
|
* @name coinbase#fetchMyTrades
|
|
3930
3939
|
* @description fetch all trades made by the user
|
|
3931
|
-
* @see https://docs.
|
|
3940
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-fills
|
|
3932
3941
|
* @param {string} symbol unified market symbol of the trades
|
|
3933
3942
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3934
3943
|
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
@@ -4000,7 +4009,8 @@ export default class coinbase extends Exchange {
|
|
|
4000
4009
|
* @method
|
|
4001
4010
|
* @name coinbase#fetchOrderBook
|
|
4002
4011
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
4003
|
-
* @see https://docs.
|
|
4012
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-product-book
|
|
4013
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/get-public-product-book
|
|
4004
4014
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
4005
4015
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
4006
4016
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -4054,7 +4064,7 @@ export default class coinbase extends Exchange {
|
|
|
4054
4064
|
* @method
|
|
4055
4065
|
* @name coinbase#fetchBidsAsks
|
|
4056
4066
|
* @description fetches the bid and ask price and volume for multiple markets
|
|
4057
|
-
* @see https://docs.
|
|
4067
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/get-best-bid-ask
|
|
4058
4068
|
* @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
4059
4069
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4060
4070
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
@@ -4195,7 +4205,7 @@ export default class coinbase extends Exchange {
|
|
|
4195
4205
|
* @method
|
|
4196
4206
|
* @name coinbase#fetchDepositAddress
|
|
4197
4207
|
* @description fetch the deposit address for a currency associated with this account
|
|
4198
|
-
* @see https://docs.
|
|
4208
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/onchain-addresses
|
|
4199
4209
|
* @param {string} code unified currency code
|
|
4200
4210
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4201
4211
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/?id=address-structure}
|
|
@@ -4348,7 +4358,7 @@ export default class coinbase extends Exchange {
|
|
|
4348
4358
|
* @method
|
|
4349
4359
|
* @name coinbase#deposit
|
|
4350
4360
|
* @description make a deposit
|
|
4351
|
-
* @see https://docs.
|
|
4361
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/deposit-fiat
|
|
4352
4362
|
* @param {string} code unified currency code
|
|
4353
4363
|
* @param {float} amount the amount to deposit
|
|
4354
4364
|
* @param {string} id the payment method id to be used for the deposit, can be retrieved from v2PrivateGetPaymentMethods
|
|
@@ -4421,7 +4431,7 @@ export default class coinbase extends Exchange {
|
|
|
4421
4431
|
* @method
|
|
4422
4432
|
* @name coinbase#fetchDeposit
|
|
4423
4433
|
* @description fetch information on a deposit, fiat only, for crypto transactions use fetchLedger
|
|
4424
|
-
* @see https://docs.
|
|
4434
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/deposit-fiat
|
|
4425
4435
|
* @param {string} id deposit id
|
|
4426
4436
|
* @param {string} [code] unified currency code
|
|
4427
4437
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -4490,7 +4500,7 @@ export default class coinbase extends Exchange {
|
|
|
4490
4500
|
* @method
|
|
4491
4501
|
* @name coinbase#fetchDepositMethodIds
|
|
4492
4502
|
* @description fetch the deposit id for a fiat currency associated with this account
|
|
4493
|
-
* @see https://docs.cdp.coinbase.com/advanced-trade/
|
|
4503
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/payment-methods/list-payment-methods
|
|
4494
4504
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4495
4505
|
* @returns {object} an array of [deposit id structures]{@link https://docs.ccxt.com/?id=deposit-id-structure}
|
|
4496
4506
|
*/
|
|
@@ -4523,7 +4533,7 @@ export default class coinbase extends Exchange {
|
|
|
4523
4533
|
* @method
|
|
4524
4534
|
* @name coinbase#fetchDepositMethodId
|
|
4525
4535
|
* @description fetch the deposit id for a fiat currency associated with this account
|
|
4526
|
-
* @see https://docs.cdp.coinbase.com/advanced-trade/
|
|
4536
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/payment-methods/get-payment-method
|
|
4527
4537
|
* @param {string} id the deposit payment method id
|
|
4528
4538
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4529
4539
|
* @returns {object} a [deposit id structure]{@link https://docs.ccxt.com/?id=deposit-id-structure}
|
|
@@ -4575,7 +4585,7 @@ export default class coinbase extends Exchange {
|
|
|
4575
4585
|
* @method
|
|
4576
4586
|
* @name coinbase#fetchConvertQuote
|
|
4577
4587
|
* @description fetch a quote for converting from one currency to another
|
|
4578
|
-
* @see https://docs.
|
|
4588
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/convert/create-convert-quote
|
|
4579
4589
|
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4580
4590
|
* @param {string} toCode the currency that you want to buy and convert into
|
|
4581
4591
|
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
@@ -4600,7 +4610,7 @@ export default class coinbase extends Exchange {
|
|
|
4600
4610
|
* @method
|
|
4601
4611
|
* @name coinbase#createConvertTrade
|
|
4602
4612
|
* @description convert from one currency to another
|
|
4603
|
-
* @see https://docs.
|
|
4613
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/convert/commit-convert-trade
|
|
4604
4614
|
* @param {string} id the id of the trade that you want to make
|
|
4605
4615
|
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4606
4616
|
* @param {string} toCode the currency that you want to buy and convert into
|
|
@@ -4623,7 +4633,7 @@ export default class coinbase extends Exchange {
|
|
|
4623
4633
|
* @method
|
|
4624
4634
|
* @name coinbase#fetchConvertTrade
|
|
4625
4635
|
* @description fetch the data for a conversion trade
|
|
4626
|
-
* @see https://docs.
|
|
4636
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/convert/get-convert-trade
|
|
4627
4637
|
* @param {string} id the id of the trade that you want to commit
|
|
4628
4638
|
* @param {string} code the unified currency code that was converted from
|
|
4629
4639
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -4674,7 +4684,7 @@ export default class coinbase extends Exchange {
|
|
|
4674
4684
|
* @method
|
|
4675
4685
|
* @name coinbase#closePosition
|
|
4676
4686
|
* @description *futures only* closes open positions for a market
|
|
4677
|
-
* @see https://docs.cdp.coinbase.com/
|
|
4687
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/close-position
|
|
4678
4688
|
* @param {string} symbol Unified CCXT market symbol
|
|
4679
4689
|
* @param {string} [side] not used by coinbase
|
|
4680
4690
|
* @param {object} [params] extra parameters specific to the coinbase api endpoint
|
|
@@ -4702,8 +4712,8 @@ export default class coinbase extends Exchange {
|
|
|
4702
4712
|
* @method
|
|
4703
4713
|
* @name coinbase#fetchPositions
|
|
4704
4714
|
* @description fetch all open positions
|
|
4705
|
-
* @see https://docs.
|
|
4706
|
-
* @see https://docs.
|
|
4715
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/us-derivatives/list-futures-positions
|
|
4716
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/international-derivatives/list-perpetuals-positions
|
|
4707
4717
|
* @param {string[]} [symbols] list of unified market symbols
|
|
4708
4718
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4709
4719
|
* @param {string} [params.portfolio] the portfolio UUID to fetch positions for
|
|
@@ -4740,8 +4750,8 @@ export default class coinbase extends Exchange {
|
|
|
4740
4750
|
* @method
|
|
4741
4751
|
* @name coinbase#fetchPosition
|
|
4742
4752
|
* @description fetch data on a single open contract trade position
|
|
4743
|
-
* @see https://docs.
|
|
4744
|
-
* @see https://docs.
|
|
4753
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/international-derivatives/get-perpetuals-position
|
|
4754
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/us-derivatives/get-futures-position
|
|
4745
4755
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
4746
4756
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4747
4757
|
* @param {string} [params.product_id] *futures only* the product id of the position to fetch, required for futures markets only
|
|
@@ -4916,7 +4926,7 @@ export default class coinbase extends Exchange {
|
|
|
4916
4926
|
/**
|
|
4917
4927
|
* @method
|
|
4918
4928
|
* @name coinbase#fetchTradingFees
|
|
4919
|
-
* @see https://docs.cdp.coinbase.com/advanced-trade/
|
|
4929
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/fees/get-transaction-summary
|
|
4920
4930
|
* @description fetch the trading fees for multiple markets
|
|
4921
4931
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4922
4932
|
* @param {string} [params.type] 'spot' or 'swap'
|
|
@@ -4978,7 +4988,7 @@ export default class coinbase extends Exchange {
|
|
|
4978
4988
|
* @method
|
|
4979
4989
|
* @name coinbase#fetchPortfolioDetails
|
|
4980
4990
|
* @description Fetch details for a specific portfolio by UUID
|
|
4981
|
-
* @see https://docs.
|
|
4991
|
+
* @see https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/portfolios/get-portfolio-breakdown
|
|
4982
4992
|
* @param {string} portfolioUuid The unique identifier of the portfolio to fetch
|
|
4983
4993
|
* @param {Dict} [params] Extra parameters specific to the exchange API endpoint
|
|
4984
4994
|
* @returns {any[]} An account structure <https://docs.ccxt.com/?id=account-structure>
|
|
@@ -5126,9 +5136,9 @@ export default class coinbase extends Exchange {
|
|
|
5126
5136
|
}
|
|
5127
5137
|
}
|
|
5128
5138
|
// v3: 'GET' doesn't need payload in the signature. inside url is enough
|
|
5129
|
-
// https://docs.
|
|
5139
|
+
// https://docs.cdp.coinbase.com/coinbase-app/authentication-authorization/api-key-authentication
|
|
5130
5140
|
// v2: 'GET' require payload in the signature
|
|
5131
|
-
// https://docs.
|
|
5141
|
+
// https://docs.cdp.coinbase.com/coinbase-app/authentication-authorization/api-key-authentication
|
|
5132
5142
|
const isCloudAPiKey = (this.apiKey.indexOf('organizations/') >= 0) || (this.secret.startsWith('-----BEGIN'));
|
|
5133
5143
|
// using the size might be fragile, so we add an option to force v2 cloud api key if needed
|
|
5134
5144
|
const isV2CloudAPiKey = this.secret.length === 88 || this.safeBool(this.options, 'v2CloudAPiKey', false) || this.secret.endsWith('=');
|
|
@@ -5263,7 +5273,7 @@ export default class coinbase extends Exchange {
|
|
|
5263
5273
|
* @method
|
|
5264
5274
|
* @name coinbase#fetchDepositAddresses
|
|
5265
5275
|
* @description fetch deposit addresses for multiple currencies (when available)
|
|
5266
|
-
* @see https://coinbase
|
|
5276
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/transfer-apis/onchain-addresses
|
|
5267
5277
|
* @param {string[]} [codes] list of unified currency codes, default is undefined (all currencies)
|
|
5268
5278
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5269
5279
|
* @param {string} [params.accountId] account ID to fetch deposit addresses for
|
|
@@ -520,7 +520,7 @@ export default class coinbaseexchange extends Exchange {
|
|
|
520
520
|
for (let j = 0; j < supportedNetworks.length; j++) {
|
|
521
521
|
const network = supportedNetworks[j];
|
|
522
522
|
const networkId = this.safeString(network, 'id');
|
|
523
|
-
const networkCode = this.networkIdToCode(networkId);
|
|
523
|
+
const networkCode = this.networkIdToCode(networkId, code);
|
|
524
524
|
networks[networkCode] = {
|
|
525
525
|
'id': networkId,
|
|
526
526
|
'name': this.safeString(network, 'name'),
|
|
@@ -1029,13 +1029,14 @@ export default class coinbaseexchange extends Exchange {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
const price = this.safeString(trade, 'price');
|
|
1031
1031
|
const amount = this.safeString(trade, 'size');
|
|
1032
|
+
const symbol = market['symbol'];
|
|
1032
1033
|
return this.safeTrade({
|
|
1033
1034
|
'id': id,
|
|
1034
1035
|
'order': orderId,
|
|
1035
1036
|
'info': trade,
|
|
1036
1037
|
'timestamp': timestamp,
|
|
1037
1038
|
'datetime': this.iso8601(timestamp),
|
|
1038
|
-
'symbol':
|
|
1039
|
+
'symbol': symbol,
|
|
1039
1040
|
'type': undefined,
|
|
1040
1041
|
'takerOrMaker': takerOrMaker,
|
|
1041
1042
|
'side': side,
|
|
@@ -2016,7 +2017,7 @@ export default class coinbaseexchange extends Exchange {
|
|
|
2016
2017
|
'txid': this.safeString(details, 'crypto_transaction_hash'),
|
|
2017
2018
|
'type': type,
|
|
2018
2019
|
'currency': code,
|
|
2019
|
-
'network': this.networkIdToCode(networkId),
|
|
2020
|
+
'network': this.networkIdToCode(networkId, code),
|
|
2020
2021
|
'amount': amount,
|
|
2021
2022
|
'status': this.parseTransactionStatus(transaction),
|
|
2022
2023
|
'timestamp': timestamp,
|
|
@@ -7,7 +7,7 @@ import type { Int, OrderSide, OrderType, Order, Trade, Ticker, Str, Transaction,
|
|
|
7
7
|
export default class coinbaseinternational extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
9
|
handlePortfolioAndParams(methodName: string, params?: {}): Promise<any[]>;
|
|
10
|
-
handleNetworkIdAndParams(currencyCode: string, methodName: string, params
|
|
10
|
+
handleNetworkIdAndParams(currencyCode: string, methodName: string, params?: {}): Promise<any[]>;
|
|
11
11
|
/**
|
|
12
12
|
* @method
|
|
13
13
|
* @name coinbaseinternational#fetchAccounts
|