ccxt 4.4.30 → 4.4.32
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 +9 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +123 -123
- package/dist/cjs/src/alpaca.js +237 -237
- package/dist/cjs/src/ascendex.js +342 -341
- package/dist/cjs/src/bigone.js +242 -242
- package/dist/cjs/src/binance.js +1339 -1291
- package/dist/cjs/src/bingx.js +639 -639
- package/dist/cjs/src/bit2c.js +111 -111
- package/dist/cjs/src/bitbank.js +142 -142
- package/dist/cjs/src/bitbns.js +140 -140
- package/dist/cjs/src/bitfinex.js +231 -231
- package/dist/cjs/src/bitfinex2.js +403 -403
- package/dist/cjs/src/bitflyer.js +184 -184
- package/dist/cjs/src/bitget.js +848 -846
- package/dist/cjs/src/bithumb.js +125 -124
- package/dist/cjs/src/bitmart.js +525 -525
- package/dist/cjs/src/bitmex.js +317 -317
- package/dist/cjs/src/bitopro.js +221 -221
- package/dist/cjs/src/bitrue.js +315 -315
- package/dist/cjs/src/bitso.js +220 -220
- package/dist/cjs/src/bitstamp.js +251 -251
- package/dist/cjs/src/bitteam.js +183 -183
- package/dist/cjs/src/bitvavo.js +247 -251
- package/dist/cjs/src/bl3p.js +82 -82
- package/dist/cjs/src/blockchaincom.js +211 -211
- package/dist/cjs/src/blofin.js +332 -331
- package/dist/cjs/src/btcalpha.js +166 -166
- package/dist/cjs/src/btcbox.js +108 -108
- package/dist/cjs/src/btcmarkets.js +198 -198
- package/dist/cjs/src/btcturk.js +124 -124
- package/dist/cjs/src/bybit.js +906 -900
- package/dist/cjs/src/cex.js +227 -226
- package/dist/cjs/src/coinbase.js +481 -481
- package/dist/cjs/src/coinbaseexchange.js +274 -274
- package/dist/cjs/src/coinbaseinternational.js +304 -304
- package/dist/cjs/src/coincatch.js +650 -650
- package/dist/cjs/src/coincheck.js +113 -113
- package/dist/cjs/src/coinex.js +611 -601
- package/dist/cjs/src/coinlist.js +304 -303
- package/dist/cjs/src/coinmate.js +162 -161
- package/dist/cjs/src/coinmetro.js +187 -187
- package/dist/cjs/src/coinone.js +124 -123
- package/dist/cjs/src/coinsph.js +237 -237
- package/dist/cjs/src/coinspot.js +82 -82
- package/dist/cjs/src/cryptocom.js +342 -341
- package/dist/cjs/src/currencycom.js +225 -224
- package/dist/cjs/src/delta.js +320 -320
- package/dist/cjs/src/deribit.js +411 -408
- package/dist/cjs/src/digifinex.js +432 -431
- package/dist/cjs/src/exmo.js +328 -327
- package/dist/cjs/src/gate.js +830 -791
- package/dist/cjs/src/gemini.js +199 -198
- package/dist/cjs/src/hashkey.js +520 -517
- package/dist/cjs/src/hitbtc.js +465 -462
- package/dist/cjs/src/hollaex.js +253 -252
- package/dist/cjs/src/htx.js +791 -848
- package/dist/cjs/src/huobijp.js +219 -218
- package/dist/cjs/src/hyperliquid.js +421 -417
- package/dist/cjs/src/idex.js +238 -237
- package/dist/cjs/src/independentreserve.js +133 -132
- package/dist/cjs/src/indodax.js +177 -171
- package/dist/cjs/src/kraken.js +381 -377
- package/dist/cjs/src/krakenfutures.js +285 -279
- package/dist/cjs/src/kucoin.js +632 -622
- package/dist/cjs/src/kucoinfutures.js +533 -457
- package/dist/cjs/src/kuna.js +283 -282
- package/dist/cjs/src/latoken.js +211 -210
- package/dist/cjs/src/lbank.js +268 -267
- package/dist/cjs/src/luno.js +174 -173
- package/dist/cjs/src/lykke.js +172 -171
- package/dist/cjs/src/mercado.js +123 -122
- package/dist/cjs/src/mexc.js +650 -646
- package/dist/cjs/src/ndax.js +229 -228
- package/dist/cjs/src/novadax.js +230 -229
- package/dist/cjs/src/oceanex.js +187 -186
- package/dist/cjs/src/okcoin.js +286 -285
- package/dist/cjs/src/okx.js +909 -904
- package/dist/cjs/src/onetrading.js +218 -218
- package/dist/cjs/src/oxfun.js +335 -334
- package/dist/cjs/src/p2b.js +154 -154
- package/dist/cjs/src/paradex.js +249 -244
- package/dist/cjs/src/paymium.js +101 -101
- package/dist/cjs/src/phemex.js +388 -390
- package/dist/cjs/src/poloniex.js +270 -270
- package/dist/cjs/src/poloniexfutures.js +250 -250
- package/dist/cjs/src/pro/alpaca.js +64 -64
- package/dist/cjs/src/pro/ascendex.js +64 -64
- package/dist/cjs/src/pro/binance.js +546 -543
- package/dist/cjs/src/pro/bingx.js +116 -116
- package/dist/cjs/src/pro/bitfinex.js +42 -42
- package/dist/cjs/src/pro/bitfinex2.js +66 -66
- package/dist/cjs/src/pro/bitget.js +188 -181
- package/dist/cjs/src/pro/bithumb.js +40 -40
- package/dist/cjs/src/pro/bitmart.js +121 -119
- package/dist/cjs/src/pro/bitmex.js +135 -133
- package/dist/cjs/src/pro/bitopro.js +49 -49
- package/dist/cjs/src/pro/bitrue.js +19 -19
- package/dist/cjs/src/pro/bitstamp.js +29 -29
- package/dist/cjs/src/pro/bitvavo.js +299 -301
- package/dist/cjs/src/pro/blockchaincom.js +62 -62
- package/dist/cjs/src/pro/blofin.js +132 -130
- package/dist/cjs/src/pro/bybit.js +317 -313
- package/dist/cjs/src/pro/cex.js +168 -168
- package/dist/cjs/src/pro/coinbase.js +93 -91
- package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
- package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
- package/dist/cjs/src/pro/coincatch.js +150 -143
- package/dist/cjs/src/pro/coincheck.js +21 -21
- package/dist/cjs/src/pro/coinex.js +110 -110
- package/dist/cjs/src/pro/coinone.js +30 -30
- package/dist/cjs/src/pro/cryptocom.js +227 -227
- package/dist/cjs/src/pro/currencycom.js +45 -45
- package/dist/cjs/src/pro/deribit.js +127 -127
- package/dist/cjs/src/pro/exmo.js +66 -66
- package/dist/cjs/src/pro/gate.js +287 -283
- package/dist/cjs/src/pro/gemini.js +74 -74
- package/dist/cjs/src/pro/hashkey.js +87 -85
- package/dist/cjs/src/pro/hitbtc.js +190 -190
- package/dist/cjs/src/pro/hollaex.js +51 -51
- package/dist/cjs/src/pro/htx.js +96 -94
- package/dist/cjs/src/pro/huobijp.js +38 -38
- package/dist/cjs/src/pro/hyperliquid.js +151 -150
- package/dist/cjs/src/pro/idex.js +48 -48
- package/dist/cjs/src/pro/independentreserve.js +19 -19
- package/dist/cjs/src/pro/kraken.js +167 -167
- package/dist/cjs/src/pro/krakenfutures.js +137 -138
- package/dist/cjs/src/pro/kucoin.js +167 -168
- package/dist/cjs/src/pro/kucoinfutures.js +147 -147
- package/dist/cjs/src/pro/lbank.js +95 -95
- package/dist/cjs/src/pro/luno.js +21 -21
- package/dist/cjs/src/pro/mexc.js +102 -103
- package/dist/cjs/src/pro/ndax.js +42 -42
- package/dist/cjs/src/pro/okcoin.js +61 -61
- package/dist/cjs/src/pro/okx.js +332 -330
- package/dist/cjs/src/pro/onetrading.js +71 -71
- package/dist/cjs/src/pro/oxfun.js +193 -191
- package/dist/cjs/src/pro/p2b.js +77 -77
- package/dist/cjs/src/pro/paradex.js +39 -39
- package/dist/cjs/src/pro/phemex.js +94 -94
- package/dist/cjs/src/pro/poloniex.js +171 -171
- package/dist/cjs/src/pro/poloniexfutures.js +62 -62
- package/dist/cjs/src/pro/probit.js +63 -63
- package/dist/cjs/src/pro/upbit.js +80 -80
- package/dist/cjs/src/pro/vertex.js +65 -63
- package/dist/cjs/src/pro/wazirx.js +70 -70
- package/dist/cjs/src/pro/whitebit.js +83 -83
- package/dist/cjs/src/pro/woo.js +106 -104
- package/dist/cjs/src/pro/woofipro.js +105 -103
- package/dist/cjs/src/pro/xt.js +119 -119
- package/dist/cjs/src/probit.js +229 -229
- package/dist/cjs/src/timex.js +198 -197
- package/dist/cjs/src/tokocrypto.js +214 -213
- package/dist/cjs/src/tradeogre.js +92 -91
- package/dist/cjs/src/upbit.js +243 -242
- package/dist/cjs/src/vertex.js +258 -258
- package/dist/cjs/src/wavesexchange.js +176 -172
- package/dist/cjs/src/wazirx.js +168 -168
- package/dist/cjs/src/whitebit.js +361 -361
- package/dist/cjs/src/woo.js +571 -572
- package/dist/cjs/src/woofipro.js +392 -391
- package/dist/cjs/src/xt.js +436 -435
- package/dist/cjs/src/yobit.js +159 -158
- package/dist/cjs/src/zaif.js +103 -103
- package/dist/cjs/src/zonda.js +168 -168
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +123 -0
- package/js/src/ace.js +123 -123
- package/js/src/alpaca.d.ts +237 -0
- package/js/src/alpaca.js +237 -237
- package/js/src/ascendex.d.ts +339 -0
- package/js/src/ascendex.js +342 -341
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +242 -0
- package/js/src/bigone.js +242 -242
- package/js/src/binance.d.ts +1306 -0
- package/js/src/binance.js +1339 -1291
- package/js/src/bingx.d.ts +639 -0
- package/js/src/bingx.js +639 -639
- package/js/src/bit2c.d.ts +111 -0
- package/js/src/bit2c.js +111 -111
- package/js/src/bitbank.d.ts +142 -0
- package/js/src/bitbank.js +142 -142
- package/js/src/bitbns.d.ts +140 -0
- package/js/src/bitbns.js +140 -140
- package/js/src/bitfinex.d.ts +231 -0
- package/js/src/bitfinex.js +231 -231
- package/js/src/bitfinex2.d.ts +403 -0
- package/js/src/bitfinex2.js +403 -403
- package/js/src/bitflyer.d.ts +184 -0
- package/js/src/bitflyer.js +184 -184
- package/js/src/bitget.d.ts +846 -0
- package/js/src/bitget.js +848 -846
- package/js/src/bithumb.d.ts +125 -0
- package/js/src/bithumb.js +125 -124
- package/js/src/bitmart.d.ts +525 -0
- package/js/src/bitmart.js +525 -525
- package/js/src/bitmex.d.ts +317 -0
- package/js/src/bitmex.js +317 -317
- package/js/src/bitopro.d.ts +221 -0
- package/js/src/bitopro.js +221 -221
- package/js/src/bitrue.d.ts +315 -0
- package/js/src/bitrue.js +315 -315
- package/js/src/bitso.d.ts +220 -0
- package/js/src/bitso.js +220 -220
- package/js/src/bitstamp.d.ts +251 -0
- package/js/src/bitstamp.js +251 -251
- package/js/src/bitteam.d.ts +183 -0
- package/js/src/bitteam.js +183 -183
- package/js/src/bitvavo.d.ts +247 -0
- package/js/src/bitvavo.js +247 -251
- package/js/src/bl3p.d.ts +82 -0
- package/js/src/bl3p.js +82 -82
- package/js/src/blockchaincom.d.ts +211 -0
- package/js/src/blockchaincom.js +211 -211
- package/js/src/blofin.d.ts +332 -0
- package/js/src/blofin.js +332 -331
- package/js/src/btcalpha.d.ts +166 -0
- package/js/src/btcalpha.js +166 -166
- package/js/src/btcbox.d.ts +108 -0
- package/js/src/btcbox.js +108 -108
- package/js/src/btcmarkets.d.ts +198 -0
- package/js/src/btcmarkets.js +198 -198
- package/js/src/btcturk.d.ts +124 -0
- package/js/src/btcturk.js +124 -124
- package/js/src/bybit.d.ts +906 -1
- package/js/src/bybit.js +906 -900
- package/js/src/cex.d.ts +227 -0
- package/js/src/cex.js +227 -226
- package/js/src/coinbase.d.ts +481 -0
- package/js/src/coinbase.js +481 -481
- package/js/src/coinbaseexchange.d.ts +274 -0
- package/js/src/coinbaseexchange.js +274 -274
- package/js/src/coinbaseinternational.d.ts +304 -0
- package/js/src/coinbaseinternational.js +304 -304
- package/js/src/coincatch.d.ts +646 -0
- package/js/src/coincatch.js +650 -650
- package/js/src/coincheck.d.ts +113 -0
- package/js/src/coincheck.js +113 -113
- package/js/src/coinex.d.ts +603 -0
- package/js/src/coinex.js +611 -601
- package/js/src/coinlist.d.ts +304 -0
- package/js/src/coinlist.js +304 -303
- package/js/src/coinmate.d.ts +162 -0
- package/js/src/coinmate.js +162 -161
- package/js/src/coinmetro.d.ts +187 -0
- package/js/src/coinmetro.js +187 -187
- package/js/src/coinone.d.ts +124 -0
- package/js/src/coinone.js +124 -123
- package/js/src/coinsph.d.ts +237 -0
- package/js/src/coinsph.js +237 -237
- package/js/src/coinspot.d.ts +82 -0
- package/js/src/coinspot.js +82 -82
- package/js/src/cryptocom.d.ts +342 -0
- package/js/src/cryptocom.js +342 -341
- package/js/src/currencycom.d.ts +225 -0
- package/js/src/currencycom.js +225 -224
- package/js/src/delta.d.ts +320 -0
- package/js/src/delta.js +320 -320
- package/js/src/deribit.d.ts +411 -0
- package/js/src/deribit.js +411 -408
- package/js/src/digifinex.d.ts +430 -0
- package/js/src/digifinex.js +432 -431
- package/js/src/exmo.d.ts +328 -0
- package/js/src/exmo.js +328 -327
- package/js/src/gate.d.ts +803 -1
- package/js/src/gate.js +830 -791
- package/js/src/gemini.d.ts +199 -0
- package/js/src/gemini.js +199 -198
- package/js/src/hashkey.d.ts +516 -0
- package/js/src/hashkey.js +520 -517
- package/js/src/hitbtc.d.ts +465 -0
- package/js/src/hitbtc.js +465 -462
- package/js/src/hollaex.d.ts +253 -0
- package/js/src/hollaex.js +253 -252
- package/js/src/htx.d.ts +765 -2
- package/js/src/htx.js +791 -848
- package/js/src/huobijp.d.ts +219 -0
- package/js/src/huobijp.js +219 -218
- package/js/src/hyperliquid.d.ts +419 -0
- package/js/src/hyperliquid.js +421 -417
- package/js/src/idex.d.ts +238 -0
- package/js/src/idex.js +238 -237
- package/js/src/independentreserve.d.ts +133 -0
- package/js/src/independentreserve.js +133 -132
- package/js/src/indodax.d.ts +171 -0
- package/js/src/indodax.js +177 -171
- package/js/src/kraken.d.ts +381 -0
- package/js/src/kraken.js +381 -377
- package/js/src/krakenfutures.d.ts +282 -0
- package/js/src/krakenfutures.js +285 -279
- package/js/src/kucoin.d.ts +613 -0
- package/js/src/kucoin.js +632 -622
- package/js/src/kucoinfutures.d.ts +441 -0
- package/js/src/kucoinfutures.js +533 -457
- package/js/src/kuna.d.ts +283 -0
- package/js/src/kuna.js +283 -282
- package/js/src/latoken.d.ts +211 -0
- package/js/src/latoken.js +211 -210
- package/js/src/lbank.d.ts +268 -0
- package/js/src/lbank.js +268 -267
- package/js/src/luno.d.ts +174 -0
- package/js/src/luno.js +174 -173
- package/js/src/lykke.d.ts +172 -0
- package/js/src/lykke.js +172 -171
- package/js/src/mercado.d.ts +123 -0
- package/js/src/mercado.js +123 -122
- package/js/src/mexc.d.ts +647 -0
- package/js/src/mexc.js +650 -646
- package/js/src/ndax.d.ts +229 -0
- package/js/src/ndax.js +229 -228
- package/js/src/novadax.d.ts +230 -0
- package/js/src/novadax.js +230 -229
- package/js/src/oceanex.d.ts +187 -0
- package/js/src/oceanex.js +187 -186
- package/js/src/okcoin.d.ts +286 -0
- package/js/src/okcoin.js +286 -285
- package/js/src/okx.d.ts +907 -0
- package/js/src/okx.js +909 -904
- package/js/src/onetrading.d.ts +218 -0
- package/js/src/onetrading.js +218 -218
- package/js/src/oxfun.d.ts +336 -3
- package/js/src/oxfun.js +335 -334
- package/js/src/p2b.d.ts +154 -0
- package/js/src/p2b.js +154 -154
- package/js/src/paradex.d.ts +241 -0
- package/js/src/paradex.js +249 -244
- package/js/src/paymium.d.ts +101 -0
- package/js/src/paymium.js +101 -101
- package/js/src/phemex.d.ts +366 -0
- package/js/src/phemex.js +388 -390
- package/js/src/poloniex.d.ts +270 -0
- package/js/src/poloniex.js +270 -270
- package/js/src/poloniexfutures.d.ts +250 -0
- package/js/src/poloniexfutures.js +250 -250
- package/js/src/pro/alpaca.d.ts +64 -0
- package/js/src/pro/alpaca.js +64 -64
- package/js/src/pro/ascendex.d.ts +64 -0
- package/js/src/pro/ascendex.js +64 -64
- package/js/src/pro/binance.d.ts +546 -0
- package/js/src/pro/binance.js +546 -543
- package/js/src/pro/bingx.d.ts +116 -0
- package/js/src/pro/bingx.js +116 -116
- package/js/src/pro/bitfinex.d.ts +42 -0
- package/js/src/pro/bitfinex.js +42 -42
- package/js/src/pro/bitfinex2.d.ts +66 -0
- package/js/src/pro/bitfinex2.js +66 -66
- package/js/src/pro/bitget.d.ts +187 -0
- package/js/src/pro/bitget.js +188 -181
- package/js/src/pro/bithumb.d.ts +40 -0
- package/js/src/pro/bithumb.js +40 -40
- package/js/src/pro/bitmart.d.ts +121 -0
- package/js/src/pro/bitmart.js +121 -119
- package/js/src/pro/bitmex.d.ts +135 -0
- package/js/src/pro/bitmex.js +135 -133
- package/js/src/pro/bitopro.d.ts +49 -0
- package/js/src/pro/bitopro.js +49 -49
- package/js/src/pro/bitrue.d.ts +19 -0
- package/js/src/pro/bitrue.js +19 -19
- package/js/src/pro/bitstamp.d.ts +29 -0
- package/js/src/pro/bitstamp.js +29 -29
- package/js/src/pro/bitvavo.d.ts +254 -1
- package/js/src/pro/bitvavo.js +299 -301
- package/js/src/pro/blockchaincom.d.ts +62 -0
- package/js/src/pro/blockchaincom.js +62 -62
- package/js/src/pro/blofin.d.ts +132 -0
- package/js/src/pro/blofin.js +132 -130
- package/js/src/pro/bybit.d.ts +317 -0
- package/js/src/pro/bybit.js +317 -313
- package/js/src/pro/cex.d.ts +168 -0
- package/js/src/pro/cex.js +168 -168
- package/js/src/pro/coinbase.d.ts +93 -0
- package/js/src/pro/coinbase.js +93 -91
- package/js/src/pro/coinbaseexchange.d.ts +95 -0
- package/js/src/pro/coinbaseexchange.js +95 -95
- package/js/src/pro/coinbaseinternational.d.ts +111 -0
- package/js/src/pro/coinbaseinternational.js +111 -111
- package/js/src/pro/coincatch.d.ts +150 -0
- package/js/src/pro/coincatch.js +150 -143
- package/js/src/pro/coincheck.d.ts +21 -0
- package/js/src/pro/coincheck.js +21 -21
- package/js/src/pro/coinex.d.ts +110 -0
- package/js/src/pro/coinex.js +110 -110
- package/js/src/pro/coinone.d.ts +30 -0
- package/js/src/pro/coinone.js +30 -30
- package/js/src/pro/cryptocom.d.ts +227 -0
- package/js/src/pro/cryptocom.js +227 -227
- package/js/src/pro/currencycom.d.ts +45 -0
- package/js/src/pro/currencycom.js +45 -45
- package/js/src/pro/deribit.d.ts +127 -0
- package/js/src/pro/deribit.js +127 -127
- package/js/src/pro/exmo.d.ts +66 -0
- package/js/src/pro/exmo.js +66 -66
- package/js/src/pro/gate.d.ts +287 -0
- package/js/src/pro/gate.js +287 -283
- package/js/src/pro/gemini.d.ts +74 -0
- package/js/src/pro/gemini.js +74 -74
- package/js/src/pro/hashkey.d.ts +87 -0
- package/js/src/pro/hashkey.js +87 -85
- package/js/src/pro/hitbtc.d.ts +190 -0
- package/js/src/pro/hitbtc.js +190 -190
- package/js/src/pro/hollaex.d.ts +51 -0
- package/js/src/pro/hollaex.js +51 -51
- package/js/src/pro/htx.d.ts +96 -0
- package/js/src/pro/htx.js +96 -94
- package/js/src/pro/huobijp.d.ts +38 -0
- package/js/src/pro/huobijp.js +38 -38
- package/js/src/pro/hyperliquid.d.ts +151 -0
- package/js/src/pro/hyperliquid.js +151 -150
- package/js/src/pro/idex.d.ts +48 -0
- package/js/src/pro/idex.js +48 -48
- package/js/src/pro/independentreserve.d.ts +19 -0
- package/js/src/pro/independentreserve.js +19 -19
- package/js/src/pro/kraken.d.ts +167 -0
- package/js/src/pro/kraken.js +167 -167
- package/js/src/pro/krakenfutures.d.ts +137 -0
- package/js/src/pro/krakenfutures.js +137 -138
- package/js/src/pro/kucoin.d.ts +167 -0
- package/js/src/pro/kucoin.js +167 -168
- package/js/src/pro/kucoinfutures.d.ts +147 -0
- package/js/src/pro/kucoinfutures.js +147 -147
- package/js/src/pro/lbank.d.ts +95 -0
- package/js/src/pro/lbank.js +95 -95
- package/js/src/pro/luno.d.ts +21 -0
- package/js/src/pro/luno.js +21 -21
- package/js/src/pro/mexc.d.ts +101 -0
- package/js/src/pro/mexc.js +102 -103
- package/js/src/pro/ndax.d.ts +42 -0
- package/js/src/pro/ndax.js +42 -42
- package/js/src/pro/okcoin.d.ts +61 -0
- package/js/src/pro/okcoin.js +61 -61
- package/js/src/pro/okx.d.ts +332 -0
- package/js/src/pro/okx.js +332 -330
- package/js/src/pro/onetrading.d.ts +71 -0
- package/js/src/pro/onetrading.js +71 -71
- package/js/src/pro/oxfun.d.ts +193 -0
- package/js/src/pro/oxfun.js +193 -191
- package/js/src/pro/p2b.d.ts +77 -0
- package/js/src/pro/p2b.js +77 -77
- package/js/src/pro/paradex.d.ts +39 -0
- package/js/src/pro/paradex.js +39 -39
- package/js/src/pro/phemex.d.ts +94 -0
- package/js/src/pro/phemex.js +94 -94
- package/js/src/pro/poloniex.d.ts +171 -0
- package/js/src/pro/poloniex.js +171 -171
- package/js/src/pro/poloniexfutures.d.ts +62 -0
- package/js/src/pro/poloniexfutures.js +62 -62
- package/js/src/pro/probit.d.ts +63 -0
- package/js/src/pro/probit.js +63 -63
- package/js/src/pro/upbit.d.ts +80 -0
- package/js/src/pro/upbit.js +80 -80
- package/js/src/pro/vertex.d.ts +65 -0
- package/js/src/pro/vertex.js +65 -63
- package/js/src/pro/wazirx.d.ts +70 -0
- package/js/src/pro/wazirx.js +70 -70
- package/js/src/pro/whitebit.d.ts +83 -0
- package/js/src/pro/whitebit.js +83 -83
- package/js/src/pro/woo.d.ts +106 -0
- package/js/src/pro/woo.js +106 -104
- package/js/src/pro/woofipro.d.ts +105 -0
- package/js/src/pro/woofipro.js +105 -103
- package/js/src/pro/xt.d.ts +119 -0
- package/js/src/pro/xt.js +119 -119
- package/js/src/probit.d.ts +229 -0
- package/js/src/probit.js +229 -229
- package/js/src/timex.d.ts +198 -0
- package/js/src/timex.js +198 -197
- package/js/src/tokocrypto.d.ts +214 -0
- package/js/src/tokocrypto.js +214 -213
- package/js/src/tradeogre.d.ts +92 -0
- package/js/src/tradeogre.js +92 -91
- package/js/src/upbit.d.ts +243 -0
- package/js/src/upbit.js +243 -242
- package/js/src/vertex.d.ts +258 -0
- package/js/src/vertex.js +258 -258
- package/js/src/wavesexchange.d.ts +176 -0
- package/js/src/wavesexchange.js +176 -172
- package/js/src/wazirx.d.ts +168 -0
- package/js/src/wazirx.js +168 -168
- package/js/src/whitebit.d.ts +361 -0
- package/js/src/whitebit.js +361 -361
- package/js/src/woo.d.ts +571 -0
- package/js/src/woo.js +571 -572
- package/js/src/woofipro.d.ts +392 -0
- package/js/src/woofipro.js +392 -391
- package/js/src/xt.d.ts +439 -4
- package/js/src/xt.js +436 -435
- package/js/src/yobit.d.ts +159 -0
- package/js/src/yobit.js +159 -158
- package/js/src/zaif.d.ts +103 -0
- package/js/src/zaif.js +103 -103
- package/js/src/zonda.d.ts +168 -0
- package/js/src/zonda.js +168 -168
- package/package.json +1 -1
package/js/src/coinbase.js
CHANGED
|
@@ -377,16 +377,16 @@ export default class coinbase extends Exchange {
|
|
|
377
377
|
},
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* @method
|
|
382
|
+
* @name coinbase#fetchTime
|
|
383
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
384
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-time#http-request
|
|
385
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
386
|
+
* @param {string} [params.method] 'v2PublicGetTime' or 'v3PublicGetBrokerageTime' default is 'v2PublicGetTime'
|
|
387
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
388
|
+
*/
|
|
380
389
|
async fetchTime(params = {}) {
|
|
381
|
-
/**
|
|
382
|
-
* @method
|
|
383
|
-
* @name coinbase#fetchTime
|
|
384
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
385
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-time#http-request
|
|
386
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
387
|
-
* @param {string} [params.method] 'v2PublicGetTime' or 'v3PublicGetBrokerageTime' default is 'v2PublicGetTime'
|
|
388
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
389
|
-
*/
|
|
390
390
|
const defaultMethod = this.safeString(this.options, 'fetchTime', 'v2PublicGetTime');
|
|
391
391
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
392
392
|
params = this.omit(params, 'method');
|
|
@@ -415,17 +415,17 @@ export default class coinbase extends Exchange {
|
|
|
415
415
|
}
|
|
416
416
|
return this.safeTimestamp2(response, 'epoch', 'epochSeconds');
|
|
417
417
|
}
|
|
418
|
+
/**
|
|
419
|
+
* @method
|
|
420
|
+
* @name coinbase#fetchAccounts
|
|
421
|
+
* @description fetch all the accounts associated with a profile
|
|
422
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
|
|
423
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
|
|
424
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
425
|
+
* @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)
|
|
426
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
427
|
+
*/
|
|
418
428
|
async fetchAccounts(params = {}) {
|
|
419
|
-
/**
|
|
420
|
-
* @method
|
|
421
|
-
* @name coinbase#fetchAccounts
|
|
422
|
-
* @description fetch all the accounts associated with a profile
|
|
423
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
|
|
424
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
|
|
425
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
426
|
-
* @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)
|
|
427
|
-
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
428
|
-
*/
|
|
429
429
|
const method = this.safeString(this.options, 'fetchAccounts', 'fetchAccountsV3');
|
|
430
430
|
if (method === 'fetchAccountsV3') {
|
|
431
431
|
return await this.fetchAccountsV3(params);
|
|
@@ -552,15 +552,15 @@ export default class coinbase extends Exchange {
|
|
|
552
552
|
}
|
|
553
553
|
return this.parseAccounts(accounts, params);
|
|
554
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* @method
|
|
557
|
+
* @name coinbase#fetchPortfolios
|
|
558
|
+
* @description fetch all the portfolios
|
|
559
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getportfolios
|
|
560
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
561
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
562
|
+
*/
|
|
555
563
|
async fetchPortfolios(params = {}) {
|
|
556
|
-
/**
|
|
557
|
-
* @method
|
|
558
|
-
* @name coinbase#fetchPortfolios
|
|
559
|
-
* @description fetch all the portfolios
|
|
560
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getportfolios
|
|
561
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
562
|
-
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
563
|
-
*/
|
|
564
564
|
const response = await this.v3PrivateGetBrokeragePortfolios(params);
|
|
565
565
|
const portfolios = this.safeList(response, 'portfolios', []);
|
|
566
566
|
const result = [];
|
|
@@ -645,16 +645,16 @@ export default class coinbase extends Exchange {
|
|
|
645
645
|
'info': account,
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
|
+
/**
|
|
649
|
+
* @method
|
|
650
|
+
* @name coinbase#createDepositAddress
|
|
651
|
+
* @description create a currency deposit address
|
|
652
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses#create-address
|
|
653
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
654
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
655
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
656
|
+
*/
|
|
648
657
|
async createDepositAddress(code, params = {}) {
|
|
649
|
-
/**
|
|
650
|
-
* @method
|
|
651
|
-
* @name coinbase#createDepositAddress
|
|
652
|
-
* @description create a currency deposit address
|
|
653
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses#create-address
|
|
654
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
655
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
656
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
657
|
-
*/
|
|
658
658
|
let accountId = this.safeString(params, 'account_id');
|
|
659
659
|
params = this.omit(params, 'account_id');
|
|
660
660
|
if (accountId === undefined) {
|
|
@@ -720,19 +720,19 @@ export default class coinbase extends Exchange {
|
|
|
720
720
|
'info': response,
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
|
+
/**
|
|
724
|
+
* @method
|
|
725
|
+
* @name coinbase#fetchMySells
|
|
726
|
+
* @ignore
|
|
727
|
+
* @description fetch sells
|
|
728
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-sells#list-sells
|
|
729
|
+
* @param {string} symbol not used by coinbase fetchMySells ()
|
|
730
|
+
* @param {int} [since] timestamp in ms of the earliest sell, default is undefined
|
|
731
|
+
* @param {int} [limit] max number of sells to return, default is undefined
|
|
732
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
733
|
+
* @returns {object} a [list of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
734
|
+
*/
|
|
723
735
|
async fetchMySells(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
724
|
-
/**
|
|
725
|
-
* @method
|
|
726
|
-
* @name coinbase#fetchMySells
|
|
727
|
-
* @ignore
|
|
728
|
-
* @description fetch sells
|
|
729
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-sells#list-sells
|
|
730
|
-
* @param {string} symbol not used by coinbase fetchMySells ()
|
|
731
|
-
* @param {int} [since] timestamp in ms of the earliest sell, default is undefined
|
|
732
|
-
* @param {int} [limit] max number of sells to return, default is undefined
|
|
733
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
734
|
-
* @returns {object} a [list of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
735
|
-
*/
|
|
736
736
|
// v2 did't have an endpoint for all historical trades
|
|
737
737
|
const request = this.prepareAccountRequest(limit, params);
|
|
738
738
|
await this.loadMarkets();
|
|
@@ -740,19 +740,19 @@ export default class coinbase extends Exchange {
|
|
|
740
740
|
const sells = await this.v2PrivateGetAccountsAccountIdSells(this.extend(request, query));
|
|
741
741
|
return this.parseTrades(sells['data'], undefined, since, limit);
|
|
742
742
|
}
|
|
743
|
+
/**
|
|
744
|
+
* @method
|
|
745
|
+
* @name coinbase#fetchMyBuys
|
|
746
|
+
* @ignore
|
|
747
|
+
* @description fetch buys
|
|
748
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#list-buys
|
|
749
|
+
* @param {string} symbol not used by coinbase fetchMyBuys ()
|
|
750
|
+
* @param {int} [since] timestamp in ms of the earliest buy, default is undefined
|
|
751
|
+
* @param {int} [limit] max number of buys to return, default is undefined
|
|
752
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
753
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
754
|
+
*/
|
|
743
755
|
async fetchMyBuys(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
744
|
-
/**
|
|
745
|
-
* @method
|
|
746
|
-
* @name coinbase#fetchMyBuys
|
|
747
|
-
* @ignore
|
|
748
|
-
* @description fetch buys
|
|
749
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#list-buys
|
|
750
|
-
* @param {string} symbol not used by coinbase fetchMyBuys ()
|
|
751
|
-
* @param {int} [since] timestamp in ms of the earliest buy, default is undefined
|
|
752
|
-
* @param {int} [limit] max number of buys to return, default is undefined
|
|
753
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
754
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
755
|
-
*/
|
|
756
756
|
// v2 did't have an endpoint for all historical trades
|
|
757
757
|
const request = this.prepareAccountRequest(limit, params);
|
|
758
758
|
await this.loadMarkets();
|
|
@@ -767,19 +767,19 @@ export default class coinbase extends Exchange {
|
|
|
767
767
|
const response = await this[method](this.extend(request, params));
|
|
768
768
|
return this.parseTransactions(response['data'], undefined, since, limit);
|
|
769
769
|
}
|
|
770
|
+
/**
|
|
771
|
+
* @method
|
|
772
|
+
* @name coinbase#fetchWithdrawals
|
|
773
|
+
* @description Fetch all withdrawals made from an account. Won't return crypto withdrawals. Use fetchLedger for those.
|
|
774
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-withdrawals#list-withdrawals
|
|
775
|
+
* @param {string} code unified currency code
|
|
776
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
777
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
778
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
779
|
+
* @param {string} [params.currencyType] "fiat" or "crypto"
|
|
780
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
781
|
+
*/
|
|
770
782
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
771
|
-
/**
|
|
772
|
-
* @method
|
|
773
|
-
* @name coinbase#fetchWithdrawals
|
|
774
|
-
* @description Fetch all withdrawals made from an account. Won't return crypto withdrawals. Use fetchLedger for those.
|
|
775
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-withdrawals#list-withdrawals
|
|
776
|
-
* @param {string} code unified currency code
|
|
777
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
778
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
779
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
780
|
-
* @param {string} [params.currencyType] "fiat" or "crypto"
|
|
781
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
782
|
-
*/
|
|
783
783
|
let currencyType = undefined;
|
|
784
784
|
[currencyType, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'currencyType');
|
|
785
785
|
if (currencyType === 'crypto') {
|
|
@@ -788,19 +788,19 @@ export default class coinbase extends Exchange {
|
|
|
788
788
|
}
|
|
789
789
|
return await this.fetchTransactionsWithMethod('v2PrivateGetAccountsAccountIdWithdrawals', code, since, limit, params);
|
|
790
790
|
}
|
|
791
|
+
/**
|
|
792
|
+
* @method
|
|
793
|
+
* @name coinbase#fetchDeposits
|
|
794
|
+
* @description Fetch all fiat deposits made to an account. Won't return crypto deposits or staking rewards. Use fetchLedger for those.
|
|
795
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-deposits#list-deposits
|
|
796
|
+
* @param {string} code unified currency code
|
|
797
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
798
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
799
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
800
|
+
* @param {string} [params.currencyType] "fiat" or "crypto"
|
|
801
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
802
|
+
*/
|
|
791
803
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
792
|
-
/**
|
|
793
|
-
* @method
|
|
794
|
-
* @name coinbase#fetchDeposits
|
|
795
|
-
* @description Fetch all fiat deposits made to an account. Won't return crypto deposits or staking rewards. Use fetchLedger for those.
|
|
796
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-deposits#list-deposits
|
|
797
|
-
* @param {string} code unified currency code
|
|
798
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
799
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
800
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
801
|
-
* @param {string} [params.currencyType] "fiat" or "crypto"
|
|
802
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
803
|
-
*/
|
|
804
804
|
let currencyType = undefined;
|
|
805
805
|
[currencyType, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'currencyType');
|
|
806
806
|
if (currencyType === 'crypto') {
|
|
@@ -809,18 +809,18 @@ export default class coinbase extends Exchange {
|
|
|
809
809
|
}
|
|
810
810
|
return await this.fetchTransactionsWithMethod('v2PrivateGetAccountsAccountIdDeposits', code, since, limit, params);
|
|
811
811
|
}
|
|
812
|
+
/**
|
|
813
|
+
* @method
|
|
814
|
+
* @name coinbase#fetchDepositsWithdrawals
|
|
815
|
+
* @description fetch history of deposits and withdrawals
|
|
816
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions
|
|
817
|
+
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
818
|
+
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
819
|
+
* @param {int} [limit] max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
|
|
820
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
821
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
822
|
+
*/
|
|
812
823
|
async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
813
|
-
/**
|
|
814
|
-
* @method
|
|
815
|
-
* @name coinbase#fetchDepositsWithdrawals
|
|
816
|
-
* @description fetch history of deposits and withdrawals
|
|
817
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions
|
|
818
|
-
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
819
|
-
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
820
|
-
* @param {int} [limit] max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
|
|
821
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
822
|
-
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
823
|
-
*/
|
|
824
824
|
await this.loadMarkets();
|
|
825
825
|
const results = await this.fetchTransactionsWithMethod('v2PrivateGetAccountsAccountIdTransactions', code, since, limit, params);
|
|
826
826
|
return this.filterByArray(results, 'type', ['deposit', 'withdrawal'], false);
|
|
@@ -1184,18 +1184,18 @@ export default class coinbase extends Exchange {
|
|
|
1184
1184
|
},
|
|
1185
1185
|
});
|
|
1186
1186
|
}
|
|
1187
|
+
/**
|
|
1188
|
+
* @method
|
|
1189
|
+
* @name coinbase#fetchMarkets
|
|
1190
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproducts
|
|
1191
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
|
1192
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1193
|
+
* @description retrieves data on all markets for coinbase
|
|
1194
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1195
|
+
* @param {boolean} [params.usePrivate] use private endpoint for fetching markets
|
|
1196
|
+
* @returns {object[]} an array of objects representing market data
|
|
1197
|
+
*/
|
|
1187
1198
|
async fetchMarkets(params = {}) {
|
|
1188
|
-
/**
|
|
1189
|
-
* @method
|
|
1190
|
-
* @name coinbase#fetchMarkets
|
|
1191
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproducts
|
|
1192
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
|
1193
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1194
|
-
* @description retrieves data on all markets for coinbase
|
|
1195
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1196
|
-
* @param {boolean} [params.usePrivate] use private endpoint for fetching markets
|
|
1197
|
-
* @returns {object[]} an array of objects representing market data
|
|
1198
|
-
*/
|
|
1199
1199
|
const method = this.safeString(this.options, 'fetchMarkets', 'fetchMarketsV3');
|
|
1200
1200
|
if (method === 'fetchMarketsV3') {
|
|
1201
1201
|
return await this.fetchMarketsV3(params);
|
|
@@ -1759,16 +1759,16 @@ export default class coinbase extends Exchange {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
return this.safeDict(this.options, 'fetchCurrencies', {});
|
|
1761
1761
|
}
|
|
1762
|
+
/**
|
|
1763
|
+
* @method
|
|
1764
|
+
* @name coinbase#fetchCurrencies
|
|
1765
|
+
* @description fetches all available currencies on an exchange
|
|
1766
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
|
1767
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1768
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1769
|
+
* @returns {object} an associative dictionary of currencies
|
|
1770
|
+
*/
|
|
1762
1771
|
async fetchCurrencies(params = {}) {
|
|
1763
|
-
/**
|
|
1764
|
-
* @method
|
|
1765
|
-
* @name coinbase#fetchCurrencies
|
|
1766
|
-
* @description fetches all available currencies on an exchange
|
|
1767
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
|
1768
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1769
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1770
|
-
* @returns {object} an associative dictionary of currencies
|
|
1771
|
-
*/
|
|
1772
1772
|
const response = await this.fetchCurrenciesFromCache(params);
|
|
1773
1773
|
const currencies = this.safeList(response, 'currencies', []);
|
|
1774
1774
|
//
|
|
@@ -1851,18 +1851,18 @@ export default class coinbase extends Exchange {
|
|
|
1851
1851
|
this.options['networksById'] = this.extend(networksById, this.options['networksById']);
|
|
1852
1852
|
return result;
|
|
1853
1853
|
}
|
|
1854
|
+
/**
|
|
1855
|
+
* @method
|
|
1856
|
+
* @name coinbase#fetchTickers
|
|
1857
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1858
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getproducts
|
|
1859
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1860
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1861
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1862
|
+
* @param {boolean} [params.usePrivate] use private endpoint for fetching tickers
|
|
1863
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1864
|
+
*/
|
|
1854
1865
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1855
|
-
/**
|
|
1856
|
-
* @method
|
|
1857
|
-
* @name coinbase#fetchTickers
|
|
1858
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1859
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getproducts
|
|
1860
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1861
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1862
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1863
|
-
* @param {boolean} [params.usePrivate] use private endpoint for fetching tickers
|
|
1864
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1865
|
-
*/
|
|
1866
1866
|
const method = this.safeString(this.options, 'fetchTickers', 'fetchTickersV3');
|
|
1867
1867
|
if (method === 'fetchTickersV3') {
|
|
1868
1868
|
return await this.fetchTickersV3(symbols, params);
|
|
@@ -1972,20 +1972,20 @@ export default class coinbase extends Exchange {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
1974
1974
|
}
|
|
1975
|
+
/**
|
|
1976
|
+
* @method
|
|
1977
|
+
* @name coinbase#fetchTicker
|
|
1978
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1979
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getmarkettrades
|
|
1980
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-spot-price
|
|
1981
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-buy-price
|
|
1982
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-sell-price
|
|
1983
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1984
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1985
|
+
* @param {boolean} [params.usePrivate] whether to use the private endpoint for fetching the ticker
|
|
1986
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1987
|
+
*/
|
|
1975
1988
|
async fetchTicker(symbol, params = {}) {
|
|
1976
|
-
/**
|
|
1977
|
-
* @method
|
|
1978
|
-
* @name coinbase#fetchTicker
|
|
1979
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1980
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getmarkettrades
|
|
1981
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-spot-price
|
|
1982
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-buy-price
|
|
1983
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-sell-price
|
|
1984
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1985
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1986
|
-
* @param {boolean} [params.usePrivate] whether to use the private endpoint for fetching the ticker
|
|
1987
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1988
|
-
*/
|
|
1989
1989
|
const method = this.safeString(this.options, 'fetchTicker', 'fetchTickerV3');
|
|
1990
1990
|
if (method === 'fetchTickerV3') {
|
|
1991
1991
|
return await this.fetchTickerV3(symbol, params);
|
|
@@ -2234,19 +2234,19 @@ export default class coinbase extends Exchange {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
return this.safeBalance(result);
|
|
2236
2236
|
}
|
|
2237
|
+
/**
|
|
2238
|
+
* @method
|
|
2239
|
+
* @name coinbase#fetchBalance
|
|
2240
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2241
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
|
|
2242
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
|
|
2243
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmbalancesummary
|
|
2244
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2245
|
+
* @param {boolean} [params.v3] default false, set true to use v3 api endpoint
|
|
2246
|
+
* @param {object} [params.type] "spot" (default) or "swap" or "future"
|
|
2247
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2248
|
+
*/
|
|
2237
2249
|
async fetchBalance(params = {}) {
|
|
2238
|
-
/**
|
|
2239
|
-
* @method
|
|
2240
|
-
* @name coinbase#fetchBalance
|
|
2241
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2242
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
|
|
2243
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
|
|
2244
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmbalancesummary
|
|
2245
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2246
|
-
* @param {boolean} [params.v3] default false, set true to use v3 api endpoint
|
|
2247
|
-
* @param {object} [params.type] "spot" (default) or "swap" or "future"
|
|
2248
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2249
|
-
*/
|
|
2250
2250
|
await this.loadMarkets();
|
|
2251
2251
|
const request = {};
|
|
2252
2252
|
let response = undefined;
|
|
@@ -2340,19 +2340,19 @@ export default class coinbase extends Exchange {
|
|
|
2340
2340
|
params['type'] = marketType;
|
|
2341
2341
|
return this.parseCustomBalance(response, params);
|
|
2342
2342
|
}
|
|
2343
|
+
/**
|
|
2344
|
+
* @method
|
|
2345
|
+
* @name coinbase#fetchLedger
|
|
2346
|
+
* @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.
|
|
2347
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions#list-transactions
|
|
2348
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2349
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2350
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2351
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2352
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2353
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2354
|
+
*/
|
|
2343
2355
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2344
|
-
/**
|
|
2345
|
-
* @method
|
|
2346
|
-
* @name coinbase#fetchLedger
|
|
2347
|
-
* @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.
|
|
2348
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions#list-transactions
|
|
2349
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
2350
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2351
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2352
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2353
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2354
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2355
|
-
*/
|
|
2356
2356
|
await this.loadMarkets();
|
|
2357
2357
|
let paginate = false;
|
|
2358
2358
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
@@ -2778,17 +2778,17 @@ export default class coinbase extends Exchange {
|
|
|
2778
2778
|
}
|
|
2779
2779
|
return [request, params];
|
|
2780
2780
|
}
|
|
2781
|
+
/**
|
|
2782
|
+
* @method
|
|
2783
|
+
* @name coinbase#createMarketBuyOrderWithCost
|
|
2784
|
+
* @description create a market buy order by providing the symbol and cost
|
|
2785
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
|
|
2786
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2787
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2788
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2789
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2790
|
+
*/
|
|
2781
2791
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
2782
|
-
/**
|
|
2783
|
-
* @method
|
|
2784
|
-
* @name coinbase#createMarketBuyOrderWithCost
|
|
2785
|
-
* @description create a market buy order by providing the symbol and cost
|
|
2786
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
|
|
2787
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2788
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2789
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2790
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2791
|
-
*/
|
|
2792
2792
|
await this.loadMarkets();
|
|
2793
2793
|
const market = this.market(symbol);
|
|
2794
2794
|
if (!market['spot']) {
|
|
@@ -2797,35 +2797,35 @@ export default class coinbase extends Exchange {
|
|
|
2797
2797
|
params['createMarketBuyOrderRequiresPrice'] = false;
|
|
2798
2798
|
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
2799
2799
|
}
|
|
2800
|
+
/**
|
|
2801
|
+
* @method
|
|
2802
|
+
* @name coinbase#createOrder
|
|
2803
|
+
* @description create a trade order
|
|
2804
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
|
|
2805
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2806
|
+
* @param {string} type 'market' or 'limit'
|
|
2807
|
+
* @param {string} side 'buy' or 'sell'
|
|
2808
|
+
* @param {float} amount how much you want to trade in units of the base currency, quote currency for 'market' 'buy' orders
|
|
2809
|
+
* @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
|
|
2810
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2811
|
+
* @param {float} [params.stopPrice] price to trigger stop orders
|
|
2812
|
+
* @param {float} [params.triggerPrice] price to trigger stop orders
|
|
2813
|
+
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
2814
|
+
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
2815
|
+
* @param {bool} [params.postOnly] true or false
|
|
2816
|
+
* @param {string} [params.timeInForce] 'GTC', 'IOC', 'GTD' or 'PO', 'FOK'
|
|
2817
|
+
* @param {string} [params.stop_direction] 'UNKNOWN_STOP_DIRECTION', 'STOP_DIRECTION_STOP_UP', 'STOP_DIRECTION_STOP_DOWN' the direction the stopPrice is triggered from
|
|
2818
|
+
* @param {string} [params.end_time] '2023-05-25T17:01:05.092Z' for 'GTD' orders
|
|
2819
|
+
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
2820
|
+
* @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
|
|
2821
|
+
* @param {float} [params.leverage] default to 1, the leverage to use for the order
|
|
2822
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2823
|
+
* @param {string} [params.retail_portfolio_id] portfolio uid
|
|
2824
|
+
* @param {boolean} [params.is_max] Used in conjunction with tradable_balance to indicate the user wants to use their entire tradable balance
|
|
2825
|
+
* @param {string} [params.tradable_balance] amount of tradable balance
|
|
2826
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2827
|
+
*/
|
|
2800
2828
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2801
|
-
/**
|
|
2802
|
-
* @method
|
|
2803
|
-
* @name coinbase#createOrder
|
|
2804
|
-
* @description create a trade order
|
|
2805
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
|
|
2806
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2807
|
-
* @param {string} type 'market' or 'limit'
|
|
2808
|
-
* @param {string} side 'buy' or 'sell'
|
|
2809
|
-
* @param {float} amount how much you want to trade in units of the base currency, quote currency for 'market' 'buy' orders
|
|
2810
|
-
* @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
|
|
2811
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2812
|
-
* @param {float} [params.stopPrice] price to trigger stop orders
|
|
2813
|
-
* @param {float} [params.triggerPrice] price to trigger stop orders
|
|
2814
|
-
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
2815
|
-
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
2816
|
-
* @param {bool} [params.postOnly] true or false
|
|
2817
|
-
* @param {string} [params.timeInForce] 'GTC', 'IOC', 'GTD' or 'PO', 'FOK'
|
|
2818
|
-
* @param {string} [params.stop_direction] 'UNKNOWN_STOP_DIRECTION', 'STOP_DIRECTION_STOP_UP', 'STOP_DIRECTION_STOP_DOWN' the direction the stopPrice is triggered from
|
|
2819
|
-
* @param {string} [params.end_time] '2023-05-25T17:01:05.092Z' for 'GTD' orders
|
|
2820
|
-
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
2821
|
-
* @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
|
|
2822
|
-
* @param {float} [params.leverage] default to 1, the leverage to use for the order
|
|
2823
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2824
|
-
* @param {string} [params.retail_portfolio_id] portfolio uid
|
|
2825
|
-
* @param {boolean} [params.is_max] Used in conjunction with tradable_balance to indicate the user wants to use their entire tradable balance
|
|
2826
|
-
* @param {string} [params.tradable_balance] amount of tradable balance
|
|
2827
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2828
|
-
*/
|
|
2829
2829
|
await this.loadMarkets();
|
|
2830
2830
|
const market = this.market(symbol);
|
|
2831
2831
|
const id = this.safeString(this.options, 'brokerId', 'ccxt');
|
|
@@ -3223,32 +3223,32 @@ export default class coinbase extends Exchange {
|
|
|
3223
3223
|
};
|
|
3224
3224
|
return this.safeString(timeInForces, timeInForce, timeInForce);
|
|
3225
3225
|
}
|
|
3226
|
+
/**
|
|
3227
|
+
* @method
|
|
3228
|
+
* @name coinbase#cancelOrder
|
|
3229
|
+
* @description cancels an open order
|
|
3230
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
|
|
3231
|
+
* @param {string} id order id
|
|
3232
|
+
* @param {string} symbol not used by coinbase cancelOrder()
|
|
3233
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3234
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3235
|
+
*/
|
|
3226
3236
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
3227
|
-
/**
|
|
3228
|
-
* @method
|
|
3229
|
-
* @name coinbase#cancelOrder
|
|
3230
|
-
* @description cancels an open order
|
|
3231
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
|
|
3232
|
-
* @param {string} id order id
|
|
3233
|
-
* @param {string} symbol not used by coinbase cancelOrder()
|
|
3234
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3235
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3236
|
-
*/
|
|
3237
3237
|
await this.loadMarkets();
|
|
3238
3238
|
const orders = await this.cancelOrders([id], symbol, params);
|
|
3239
3239
|
return this.safeDict(orders, 0, {});
|
|
3240
3240
|
}
|
|
3241
|
+
/**
|
|
3242
|
+
* @method
|
|
3243
|
+
* @name coinbase#cancelOrders
|
|
3244
|
+
* @description cancel multiple orders
|
|
3245
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
|
|
3246
|
+
* @param {string[]} ids order ids
|
|
3247
|
+
* @param {string} symbol not used by coinbase cancelOrders()
|
|
3248
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3249
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3250
|
+
*/
|
|
3241
3251
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
3242
|
-
/**
|
|
3243
|
-
* @method
|
|
3244
|
-
* @name coinbase#cancelOrders
|
|
3245
|
-
* @description cancel multiple orders
|
|
3246
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
|
|
3247
|
-
* @param {string[]} ids order ids
|
|
3248
|
-
* @param {string} symbol not used by coinbase cancelOrders()
|
|
3249
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3250
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3251
|
-
*/
|
|
3252
3252
|
await this.loadMarkets();
|
|
3253
3253
|
let market = undefined;
|
|
3254
3254
|
if (symbol !== undefined) {
|
|
@@ -3278,22 +3278,22 @@ export default class coinbase extends Exchange {
|
|
|
3278
3278
|
}
|
|
3279
3279
|
return this.parseOrders(orders, market);
|
|
3280
3280
|
}
|
|
3281
|
+
/**
|
|
3282
|
+
* @method
|
|
3283
|
+
* @name coinbase#editOrder
|
|
3284
|
+
* @description edit a trade order
|
|
3285
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_editorder
|
|
3286
|
+
* @param {string} id cancel order id
|
|
3287
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
3288
|
+
* @param {string} type 'market' or 'limit'
|
|
3289
|
+
* @param {string} side 'buy' or 'sell'
|
|
3290
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3291
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3292
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3293
|
+
* @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
|
|
3294
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3295
|
+
*/
|
|
3281
3296
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
3282
|
-
/**
|
|
3283
|
-
* @method
|
|
3284
|
-
* @name coinbase#editOrder
|
|
3285
|
-
* @description edit a trade order
|
|
3286
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_editorder
|
|
3287
|
-
* @param {string} id cancel order id
|
|
3288
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
3289
|
-
* @param {string} type 'market' or 'limit'
|
|
3290
|
-
* @param {string} side 'buy' or 'sell'
|
|
3291
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3292
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3293
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3294
|
-
* @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
|
|
3295
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3296
|
-
*/
|
|
3297
3297
|
await this.loadMarkets();
|
|
3298
3298
|
const market = this.market(symbol);
|
|
3299
3299
|
const request = {
|
|
@@ -3325,17 +3325,17 @@ export default class coinbase extends Exchange {
|
|
|
3325
3325
|
//
|
|
3326
3326
|
return this.parseOrder(response, market);
|
|
3327
3327
|
}
|
|
3328
|
+
/**
|
|
3329
|
+
* @method
|
|
3330
|
+
* @name coinbase#fetchOrder
|
|
3331
|
+
* @description fetches information on an order made by the user
|
|
3332
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorder
|
|
3333
|
+
* @param {string} id the order id
|
|
3334
|
+
* @param {string} symbol unified market symbol that the order was made in
|
|
3335
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3336
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3337
|
+
*/
|
|
3328
3338
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
3329
|
-
/**
|
|
3330
|
-
* @method
|
|
3331
|
-
* @name coinbase#fetchOrder
|
|
3332
|
-
* @description fetches information on an order made by the user
|
|
3333
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorder
|
|
3334
|
-
* @param {string} id the order id
|
|
3335
|
-
* @param {string} symbol unified market symbol that the order was made in
|
|
3336
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3337
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3338
|
-
*/
|
|
3339
3339
|
await this.loadMarkets();
|
|
3340
3340
|
let market = undefined;
|
|
3341
3341
|
if (symbol !== undefined) {
|
|
@@ -3387,20 +3387,20 @@ export default class coinbase extends Exchange {
|
|
|
3387
3387
|
const order = this.safeDict(response, 'order', {});
|
|
3388
3388
|
return this.parseOrder(order, market);
|
|
3389
3389
|
}
|
|
3390
|
+
/**
|
|
3391
|
+
* @method
|
|
3392
|
+
* @name coinbase#fetchOrders
|
|
3393
|
+
* @description fetches information on multiple orders made by the user
|
|
3394
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3395
|
+
* @param {string} symbol unified market symbol that the orders were made in
|
|
3396
|
+
* @param {int} [since] the earliest time in ms to fetch orders
|
|
3397
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3398
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3399
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3400
|
+
* @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)
|
|
3401
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3402
|
+
*/
|
|
3390
3403
|
async fetchOrders(symbol = undefined, since = undefined, limit = 100, params = {}) {
|
|
3391
|
-
/**
|
|
3392
|
-
* @method
|
|
3393
|
-
* @name coinbase#fetchOrders
|
|
3394
|
-
* @description fetches information on multiple orders made by the user
|
|
3395
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3396
|
-
* @param {string} symbol unified market symbol that the orders were made in
|
|
3397
|
-
* @param {int} [since] the earliest time in ms to fetch orders
|
|
3398
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3399
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3400
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3401
|
-
* @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)
|
|
3402
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3403
|
-
*/
|
|
3404
3404
|
await this.loadMarkets();
|
|
3405
3405
|
let paginate = false;
|
|
3406
3406
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOrders', 'paginate');
|
|
@@ -3554,20 +3554,20 @@ export default class coinbase extends Exchange {
|
|
|
3554
3554
|
}
|
|
3555
3555
|
return this.parseOrders(orders, market, since, limit);
|
|
3556
3556
|
}
|
|
3557
|
+
/**
|
|
3558
|
+
* @method
|
|
3559
|
+
* @name coinbase#fetchOpenOrders
|
|
3560
|
+
* @description fetches information on all currently open orders
|
|
3561
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3562
|
+
* @param {string} symbol unified market symbol of the orders
|
|
3563
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3564
|
+
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3565
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3566
|
+
* @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)
|
|
3567
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3568
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3569
|
+
*/
|
|
3557
3570
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3558
|
-
/**
|
|
3559
|
-
* @method
|
|
3560
|
-
* @name coinbase#fetchOpenOrders
|
|
3561
|
-
* @description fetches information on all currently open orders
|
|
3562
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3563
|
-
* @param {string} symbol unified market symbol of the orders
|
|
3564
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3565
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3566
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3567
|
-
* @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)
|
|
3568
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3569
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3570
|
-
*/
|
|
3571
3571
|
await this.loadMarkets();
|
|
3572
3572
|
let paginate = false;
|
|
3573
3573
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
|
|
@@ -3576,20 +3576,20 @@ export default class coinbase extends Exchange {
|
|
|
3576
3576
|
}
|
|
3577
3577
|
return await this.fetchOrdersByStatus('OPEN', symbol, since, limit, params);
|
|
3578
3578
|
}
|
|
3579
|
+
/**
|
|
3580
|
+
* @method
|
|
3581
|
+
* @name coinbase#fetchClosedOrders
|
|
3582
|
+
* @description fetches information on multiple closed orders made by the user
|
|
3583
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3584
|
+
* @param {string} symbol unified market symbol of the orders
|
|
3585
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3586
|
+
* @param {int} [limit] the maximum number of closed order structures to retrieve
|
|
3587
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3588
|
+
* @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)
|
|
3589
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3590
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3591
|
+
*/
|
|
3579
3592
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3580
|
-
/**
|
|
3581
|
-
* @method
|
|
3582
|
-
* @name coinbase#fetchClosedOrders
|
|
3583
|
-
* @description fetches information on multiple closed orders made by the user
|
|
3584
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3585
|
-
* @param {string} symbol unified market symbol of the orders
|
|
3586
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3587
|
-
* @param {int} [limit] the maximum number of closed order structures to retrieve
|
|
3588
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3589
|
-
* @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)
|
|
3590
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3591
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3592
|
-
*/
|
|
3593
3593
|
await this.loadMarkets();
|
|
3594
3594
|
let paginate = false;
|
|
3595
3595
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchClosedOrders', 'paginate');
|
|
@@ -3598,36 +3598,36 @@ export default class coinbase extends Exchange {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
return await this.fetchOrdersByStatus('FILLED', symbol, since, limit, params);
|
|
3600
3600
|
}
|
|
3601
|
+
/**
|
|
3602
|
+
* @method
|
|
3603
|
+
* @name coinbase#fetchCanceledOrders
|
|
3604
|
+
* @description fetches information on multiple canceled orders made by the user
|
|
3605
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3606
|
+
* @param {string} symbol unified market symbol of the orders
|
|
3607
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3608
|
+
* @param {int} [limit] the maximum number of canceled order structures to retrieve
|
|
3609
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3610
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3611
|
+
*/
|
|
3601
3612
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3602
|
-
/**
|
|
3603
|
-
* @method
|
|
3604
|
-
* @name coinbase#fetchCanceledOrders
|
|
3605
|
-
* @description fetches information on multiple canceled orders made by the user
|
|
3606
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3607
|
-
* @param {string} symbol unified market symbol of the orders
|
|
3608
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3609
|
-
* @param {int} [limit] the maximum number of canceled order structures to retrieve
|
|
3610
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3611
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3612
|
-
*/
|
|
3613
3613
|
return await this.fetchOrdersByStatus('CANCELLED', symbol, since, limit, params);
|
|
3614
3614
|
}
|
|
3615
|
+
/**
|
|
3616
|
+
* @method
|
|
3617
|
+
* @name coinbase#fetchOHLCV
|
|
3618
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3619
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpubliccandles
|
|
3620
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3621
|
+
* @param {string} timeframe the length of time each candle represents
|
|
3622
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
3623
|
+
* @param {int} [limit] the maximum amount of candles to fetch, not used by coinbase
|
|
3624
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3625
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3626
|
+
* @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)
|
|
3627
|
+
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the candles
|
|
3628
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
3629
|
+
*/
|
|
3615
3630
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
3616
|
-
/**
|
|
3617
|
-
* @method
|
|
3618
|
-
* @name coinbase#fetchOHLCV
|
|
3619
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3620
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpubliccandles
|
|
3621
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3622
|
-
* @param {string} timeframe the length of time each candle represents
|
|
3623
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
3624
|
-
* @param {int} [limit] the maximum amount of candles to fetch, not used by coinbase
|
|
3625
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3626
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3627
|
-
* @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)
|
|
3628
|
-
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the candles
|
|
3629
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
3630
|
-
*/
|
|
3631
3631
|
await this.loadMarkets();
|
|
3632
3632
|
const maxLimit = 300;
|
|
3633
3633
|
limit = (limit === undefined) ? maxLimit : Math.min(limit, maxLimit);
|
|
@@ -3709,19 +3709,19 @@ export default class coinbase extends Exchange {
|
|
|
3709
3709
|
this.safeNumber(ohlcv, 'volume'),
|
|
3710
3710
|
];
|
|
3711
3711
|
}
|
|
3712
|
+
/**
|
|
3713
|
+
* @method
|
|
3714
|
+
* @name coinbase#fetchTrades
|
|
3715
|
+
* @description get the list of most recent trades for a particular symbol
|
|
3716
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicmarkettrades
|
|
3717
|
+
* @param {string} symbol unified market symbol of the trades
|
|
3718
|
+
* @param {int} [since] not used by coinbase fetchTrades
|
|
3719
|
+
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
3720
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3721
|
+
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the trades
|
|
3722
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
3723
|
+
*/
|
|
3712
3724
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
3713
|
-
/**
|
|
3714
|
-
* @method
|
|
3715
|
-
* @name coinbase#fetchTrades
|
|
3716
|
-
* @description get the list of most recent trades for a particular symbol
|
|
3717
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicmarkettrades
|
|
3718
|
-
* @param {string} symbol unified market symbol of the trades
|
|
3719
|
-
* @param {int} [since] not used by coinbase fetchTrades
|
|
3720
|
-
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
3721
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3722
|
-
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the trades
|
|
3723
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
3724
|
-
*/
|
|
3725
3725
|
await this.loadMarkets();
|
|
3726
3726
|
const market = this.market(symbol);
|
|
3727
3727
|
const request = {
|
|
@@ -3769,20 +3769,20 @@ export default class coinbase extends Exchange {
|
|
|
3769
3769
|
const trades = this.safeList(response, 'trades', []);
|
|
3770
3770
|
return this.parseTrades(trades, market, since, limit);
|
|
3771
3771
|
}
|
|
3772
|
+
/**
|
|
3773
|
+
* @method
|
|
3774
|
+
* @name coinbase#fetchMyTrades
|
|
3775
|
+
* @description fetch all trades made by the user
|
|
3776
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfills
|
|
3777
|
+
* @param {string} symbol unified market symbol of the trades
|
|
3778
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3779
|
+
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
3780
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3781
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3782
|
+
* @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)
|
|
3783
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
3784
|
+
*/
|
|
3772
3785
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3773
|
-
/**
|
|
3774
|
-
* @method
|
|
3775
|
-
* @name coinbase#fetchMyTrades
|
|
3776
|
-
* @description fetch all trades made by the user
|
|
3777
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfills
|
|
3778
|
-
* @param {string} symbol unified market symbol of the trades
|
|
3779
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3780
|
-
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
3781
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3782
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3783
|
-
* @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)
|
|
3784
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
3785
|
-
*/
|
|
3786
3786
|
await this.loadMarkets();
|
|
3787
3787
|
let paginate = false;
|
|
3788
3788
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
|
|
@@ -3841,18 +3841,18 @@ export default class coinbase extends Exchange {
|
|
|
3841
3841
|
}
|
|
3842
3842
|
return this.parseTrades(trades, market, since, limit);
|
|
3843
3843
|
}
|
|
3844
|
+
/**
|
|
3845
|
+
* @method
|
|
3846
|
+
* @name coinbase#fetchOrderBook
|
|
3847
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
3848
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproductbook
|
|
3849
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
3850
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
3851
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3852
|
+
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the order book
|
|
3853
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
3854
|
+
*/
|
|
3844
3855
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
3845
|
-
/**
|
|
3846
|
-
* @method
|
|
3847
|
-
* @name coinbase#fetchOrderBook
|
|
3848
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
3849
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproductbook
|
|
3850
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
3851
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
3852
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3853
|
-
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the order book
|
|
3854
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
3855
|
-
*/
|
|
3856
3856
|
await this.loadMarkets();
|
|
3857
3857
|
const market = this.market(symbol);
|
|
3858
3858
|
const request = {
|
|
@@ -3895,16 +3895,16 @@ export default class coinbase extends Exchange {
|
|
|
3895
3895
|
const timestamp = this.parse8601(time);
|
|
3896
3896
|
return this.parseOrderBook(data, symbol, timestamp, 'bids', 'asks', 'price', 'size');
|
|
3897
3897
|
}
|
|
3898
|
+
/**
|
|
3899
|
+
* @method
|
|
3900
|
+
* @name coinbase#fetchBidsAsks
|
|
3901
|
+
* @description fetches the bid and ask price and volume for multiple markets
|
|
3902
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getbestbidask
|
|
3903
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
3904
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3905
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
3906
|
+
*/
|
|
3898
3907
|
async fetchBidsAsks(symbols = undefined, params = {}) {
|
|
3899
|
-
/**
|
|
3900
|
-
* @method
|
|
3901
|
-
* @name coinbase#fetchBidsAsks
|
|
3902
|
-
* @description fetches the bid and ask price and volume for multiple markets
|
|
3903
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getbestbidask
|
|
3904
|
-
* @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
3905
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3906
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
3907
|
-
*/
|
|
3908
3908
|
await this.loadMarkets();
|
|
3909
3909
|
symbols = this.marketSymbols(symbols);
|
|
3910
3910
|
const request = {};
|
|
@@ -3937,19 +3937,19 @@ export default class coinbase extends Exchange {
|
|
|
3937
3937
|
const tickers = this.safeList(response, 'pricebooks', []);
|
|
3938
3938
|
return this.parseTickers(tickers, symbols);
|
|
3939
3939
|
}
|
|
3940
|
+
/**
|
|
3941
|
+
* @method
|
|
3942
|
+
* @name coinbase#withdraw
|
|
3943
|
+
* @description make a withdrawal
|
|
3944
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#send-money
|
|
3945
|
+
* @param {string} code unified currency code
|
|
3946
|
+
* @param {float} amount the amount to withdraw
|
|
3947
|
+
* @param {string} address the address to withdraw to
|
|
3948
|
+
* @param {string} [tag] an optional tag for the withdrawal
|
|
3949
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3950
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3951
|
+
*/
|
|
3940
3952
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
3941
|
-
/**
|
|
3942
|
-
* @method
|
|
3943
|
-
* @name coinbase#withdraw
|
|
3944
|
-
* @description make a withdrawal
|
|
3945
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#send-money
|
|
3946
|
-
* @param {string} code unified currency code
|
|
3947
|
-
* @param {float} amount the amount to withdraw
|
|
3948
|
-
* @param {string} address the address to withdraw to
|
|
3949
|
-
* @param {string} [tag] an optional tag for the withdrawal
|
|
3950
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3951
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3952
|
-
*/
|
|
3953
3953
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
3954
3954
|
this.checkAddress(address);
|
|
3955
3955
|
await this.loadMarkets();
|
|
@@ -4031,16 +4031,16 @@ export default class coinbase extends Exchange {
|
|
|
4031
4031
|
const data = this.safeDict(response, 'data', {});
|
|
4032
4032
|
return this.parseTransaction(data, currency);
|
|
4033
4033
|
}
|
|
4034
|
+
/**
|
|
4035
|
+
* @method
|
|
4036
|
+
* @name coinbase#fetchDepositAddress
|
|
4037
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
4038
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
|
|
4039
|
+
* @param {string} code unified currency code
|
|
4040
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4041
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
4042
|
+
*/
|
|
4034
4043
|
async fetchDepositAddressesByNetwork(code, params = {}) {
|
|
4035
|
-
/**
|
|
4036
|
-
* @method
|
|
4037
|
-
* @name coinbase#fetchDepositAddress
|
|
4038
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
4039
|
-
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
|
|
4040
|
-
* @param {string} code unified currency code
|
|
4041
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4042
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
4043
|
-
*/
|
|
4044
4044
|
await this.loadMarkets();
|
|
4045
4045
|
const currency = this.currency(code);
|
|
4046
4046
|
let request = undefined;
|
|
@@ -4165,19 +4165,19 @@ export default class coinbase extends Exchange {
|
|
|
4165
4165
|
'tag': this.safeString(addressInfo, 'destination_tag'),
|
|
4166
4166
|
};
|
|
4167
4167
|
}
|
|
4168
|
+
/**
|
|
4169
|
+
* @method
|
|
4170
|
+
* @name coinbase#deposit
|
|
4171
|
+
* @description make a deposit
|
|
4172
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#deposit-funds
|
|
4173
|
+
* @param {string} code unified currency code
|
|
4174
|
+
* @param {float} amount the amount to deposit
|
|
4175
|
+
* @param {string} id the payment method id to be used for the deposit, can be retrieved from v2PrivateGetPaymentMethods
|
|
4176
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4177
|
+
* @param {string} [params.accountId] the id of the account to deposit into
|
|
4178
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4179
|
+
*/
|
|
4168
4180
|
async deposit(code, amount, id, params = {}) {
|
|
4169
|
-
/**
|
|
4170
|
-
* @method
|
|
4171
|
-
* @name coinbase#deposit
|
|
4172
|
-
* @description make a deposit
|
|
4173
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#deposit-funds
|
|
4174
|
-
* @param {string} code unified currency code
|
|
4175
|
-
* @param {float} amount the amount to deposit
|
|
4176
|
-
* @param {string} id the payment method id to be used for the deposit, can be retrieved from v2PrivateGetPaymentMethods
|
|
4177
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4178
|
-
* @param {string} [params.accountId] the id of the account to deposit into
|
|
4179
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4180
|
-
*/
|
|
4181
4181
|
await this.loadMarkets();
|
|
4182
4182
|
let accountId = this.safeString2(params, 'account_id', 'accountId');
|
|
4183
4183
|
params = this.omit(params, ['account_id', 'accountId']);
|
|
@@ -4236,18 +4236,18 @@ export default class coinbase extends Exchange {
|
|
|
4236
4236
|
const data = this.safeDict(response, 'data', {});
|
|
4237
4237
|
return this.parseTransaction(data);
|
|
4238
4238
|
}
|
|
4239
|
+
/**
|
|
4240
|
+
* @method
|
|
4241
|
+
* @name coinbase#fetchDeposit
|
|
4242
|
+
* @description fetch information on a deposit, fiat only, for crypto transactions use fetchLedger
|
|
4243
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#show-deposit
|
|
4244
|
+
* @param {string} id deposit id
|
|
4245
|
+
* @param {string} [code] unified currency code
|
|
4246
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4247
|
+
* @param {string} [params.accountId] the id of the account that the funds were deposited into
|
|
4248
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4249
|
+
*/
|
|
4239
4250
|
async fetchDeposit(id, code = undefined, params = {}) {
|
|
4240
|
-
/**
|
|
4241
|
-
* @method
|
|
4242
|
-
* @name coinbase#fetchDeposit
|
|
4243
|
-
* @description fetch information on a deposit, fiat only, for crypto transactions use fetchLedger
|
|
4244
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#show-deposit
|
|
4245
|
-
* @param {string} id deposit id
|
|
4246
|
-
* @param {string} [code] unified currency code
|
|
4247
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4248
|
-
* @param {string} [params.accountId] the id of the account that the funds were deposited into
|
|
4249
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4250
|
-
*/
|
|
4251
4251
|
await this.loadMarkets();
|
|
4252
4252
|
let accountId = this.safeString2(params, 'account_id', 'accountId');
|
|
4253
4253
|
params = this.omit(params, ['account_id', 'accountId']);
|
|
@@ -4304,21 +4304,21 @@ export default class coinbase extends Exchange {
|
|
|
4304
4304
|
const data = this.safeDict(response, 'data', {});
|
|
4305
4305
|
return this.parseTransaction(data);
|
|
4306
4306
|
}
|
|
4307
|
+
/**
|
|
4308
|
+
* @method
|
|
4309
|
+
* @name coinbase#fetchConvertQuote
|
|
4310
|
+
* @description fetch a quote for converting from one currency to another
|
|
4311
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_createconvertquote
|
|
4312
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4313
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
4314
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
4315
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4316
|
+
* @param {object} [params.trade_incentive_metadata] an object to fill in user incentive data
|
|
4317
|
+
* @param {string} [params.trade_incentive_metadata.user_incentive_id] the id of the incentive
|
|
4318
|
+
* @param {string} [params.trade_incentive_metadata.code_val] the code value of the incentive
|
|
4319
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4320
|
+
*/
|
|
4307
4321
|
async fetchConvertQuote(fromCode, toCode, amount = undefined, params = {}) {
|
|
4308
|
-
/**
|
|
4309
|
-
* @method
|
|
4310
|
-
* @name coinbase#fetchConvertQuote
|
|
4311
|
-
* @description fetch a quote for converting from one currency to another
|
|
4312
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_createconvertquote
|
|
4313
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4314
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
4315
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
4316
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4317
|
-
* @param {object} [params.trade_incentive_metadata] an object to fill in user incentive data
|
|
4318
|
-
* @param {string} [params.trade_incentive_metadata.user_incentive_id] the id of the incentive
|
|
4319
|
-
* @param {string} [params.trade_incentive_metadata.code_val] the code value of the incentive
|
|
4320
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4321
|
-
*/
|
|
4322
4322
|
await this.loadMarkets();
|
|
4323
4323
|
const request = {
|
|
4324
4324
|
'from_account': fromCode,
|
|
@@ -4329,19 +4329,19 @@ export default class coinbase extends Exchange {
|
|
|
4329
4329
|
const data = this.safeDict(response, 'trade', {});
|
|
4330
4330
|
return this.parseConversion(data);
|
|
4331
4331
|
}
|
|
4332
|
+
/**
|
|
4333
|
+
* @method
|
|
4334
|
+
* @name coinbase#createConvertTrade
|
|
4335
|
+
* @description convert from one currency to another
|
|
4336
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_commitconverttrade
|
|
4337
|
+
* @param {string} id the id of the trade that you want to make
|
|
4338
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4339
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
4340
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
4341
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4342
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4343
|
+
*/
|
|
4332
4344
|
async createConvertTrade(id, fromCode, toCode, amount = undefined, params = {}) {
|
|
4333
|
-
/**
|
|
4334
|
-
* @method
|
|
4335
|
-
* @name coinbase#createConvertTrade
|
|
4336
|
-
* @description convert from one currency to another
|
|
4337
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_commitconverttrade
|
|
4338
|
-
* @param {string} id the id of the trade that you want to make
|
|
4339
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4340
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
4341
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
4342
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4343
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4344
|
-
*/
|
|
4345
4345
|
await this.loadMarkets();
|
|
4346
4346
|
const request = {
|
|
4347
4347
|
'trade_id': id,
|
|
@@ -4352,18 +4352,18 @@ export default class coinbase extends Exchange {
|
|
|
4352
4352
|
const data = this.safeDict(response, 'trade', {});
|
|
4353
4353
|
return this.parseConversion(data);
|
|
4354
4354
|
}
|
|
4355
|
+
/**
|
|
4356
|
+
* @method
|
|
4357
|
+
* @name coinbase#fetchConvertTrade
|
|
4358
|
+
* @description fetch the data for a conversion trade
|
|
4359
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getconverttrade
|
|
4360
|
+
* @param {string} id the id of the trade that you want to commit
|
|
4361
|
+
* @param {string} code the unified currency code that was converted from
|
|
4362
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4363
|
+
* @param {strng} params.toCode the unified currency code that was converted into
|
|
4364
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4365
|
+
*/
|
|
4355
4366
|
async fetchConvertTrade(id, code = undefined, params = {}) {
|
|
4356
|
-
/**
|
|
4357
|
-
* @method
|
|
4358
|
-
* @name coinbase#fetchConvertTrade
|
|
4359
|
-
* @description fetch the data for a conversion trade
|
|
4360
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getconverttrade
|
|
4361
|
-
* @param {string} id the id of the trade that you want to commit
|
|
4362
|
-
* @param {string} code the unified currency code that was converted from
|
|
4363
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4364
|
-
* @param {strng} params.toCode the unified currency code that was converted into
|
|
4365
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4366
|
-
*/
|
|
4367
4367
|
await this.loadMarkets();
|
|
4368
4368
|
if (code === undefined) {
|
|
4369
4369
|
throw new ArgumentsRequired(this.id + ' fetchConvertTrade() requires a code argument');
|
|
@@ -4403,19 +4403,19 @@ export default class coinbase extends Exchange {
|
|
|
4403
4403
|
'fee': this.safeNumber(feeAmountStructure, 'value'),
|
|
4404
4404
|
};
|
|
4405
4405
|
}
|
|
4406
|
+
/**
|
|
4407
|
+
* @method
|
|
4408
|
+
* @name coinbase#closePosition
|
|
4409
|
+
* @description *futures only* closes open positions for a market
|
|
4410
|
+
* @see https://coinbase-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
|
|
4411
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
4412
|
+
* @param {string} [side] not used by coinbase
|
|
4413
|
+
* @param {object} [params] extra parameters specific to the coinbase api endpoint
|
|
4414
|
+
* @param {string} params.clientOrderId *mandatory* the client order id of the position to close
|
|
4415
|
+
* @param {float} [params.size] the size of the position to close, optional
|
|
4416
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4417
|
+
*/
|
|
4406
4418
|
async closePosition(symbol, side = undefined, params = {}) {
|
|
4407
|
-
/**
|
|
4408
|
-
* @method
|
|
4409
|
-
* @name coinbase#closePosition
|
|
4410
|
-
* @description *futures only* closes open positions for a market
|
|
4411
|
-
* @see https://coinbase-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
|
|
4412
|
-
* @param {string} symbol Unified CCXT market symbol
|
|
4413
|
-
* @param {string} [side] not used by coinbase
|
|
4414
|
-
* @param {object} [params] extra parameters specific to the coinbase api endpoint
|
|
4415
|
-
* @param {string} params.clientOrderId *mandatory* the client order id of the position to close
|
|
4416
|
-
* @param {float} [params.size] the size of the position to close, optional
|
|
4417
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4418
|
-
*/
|
|
4419
4419
|
await this.loadMarkets();
|
|
4420
4420
|
const market = this.market(symbol);
|
|
4421
4421
|
if (!market['future']) {
|
|
@@ -4434,18 +4434,18 @@ export default class coinbase extends Exchange {
|
|
|
4434
4434
|
const order = this.safeDict(response, 'success_response', {});
|
|
4435
4435
|
return this.parseOrder(order);
|
|
4436
4436
|
}
|
|
4437
|
+
/**
|
|
4438
|
+
* @method
|
|
4439
|
+
* @name coinbase#fetchPositions
|
|
4440
|
+
* @description fetch all open positions
|
|
4441
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmpositions
|
|
4442
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxpositions
|
|
4443
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
4444
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4445
|
+
* @param {string} [params.portfolio] the portfolio UUID to fetch positions for
|
|
4446
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4447
|
+
*/
|
|
4437
4448
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
4438
|
-
/**
|
|
4439
|
-
* @method
|
|
4440
|
-
* @name coinbase#fetchPositions
|
|
4441
|
-
* @description fetch all open positions
|
|
4442
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmpositions
|
|
4443
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxpositions
|
|
4444
|
-
* @param {string[]} [symbols] list of unified market symbols
|
|
4445
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4446
|
-
* @param {string} [params.portfolio] the portfolio UUID to fetch positions for
|
|
4447
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4448
|
-
*/
|
|
4449
4449
|
await this.loadMarkets();
|
|
4450
4450
|
symbols = this.marketSymbols(symbols);
|
|
4451
4451
|
let market = undefined;
|
|
@@ -4472,19 +4472,19 @@ export default class coinbase extends Exchange {
|
|
|
4472
4472
|
const positions = this.safeList(response, 'positions', []);
|
|
4473
4473
|
return this.parsePositions(positions, symbols);
|
|
4474
4474
|
}
|
|
4475
|
+
/**
|
|
4476
|
+
* @method
|
|
4477
|
+
* @name coinbase#fetchPosition
|
|
4478
|
+
* @description fetch data on a single open contract trade position
|
|
4479
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxposition
|
|
4480
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmposition
|
|
4481
|
+
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
4482
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4483
|
+
* @param {string} [params.product_id] *futures only* the product id of the position to fetch, required for futures markets only
|
|
4484
|
+
* @param {string} [params.portfolio] *perpetual/swaps only* the portfolio UUID to fetch the position for, required for perpetual/swaps markets only
|
|
4485
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4486
|
+
*/
|
|
4475
4487
|
async fetchPosition(symbol, params = {}) {
|
|
4476
|
-
/**
|
|
4477
|
-
* @method
|
|
4478
|
-
* @name coinbase#fetchPosition
|
|
4479
|
-
* @description fetch data on a single open contract trade position
|
|
4480
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxposition
|
|
4481
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmposition
|
|
4482
|
-
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
4483
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4484
|
-
* @param {string} [params.product_id] *futures only* the product id of the position to fetch, required for futures markets only
|
|
4485
|
-
* @param {string} [params.portfolio] *perpetual/swaps only* the portfolio UUID to fetch the position for, required for perpetual/swaps markets only
|
|
4486
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4487
|
-
*/
|
|
4488
4488
|
await this.loadMarkets();
|
|
4489
4489
|
const market = this.market(symbol);
|
|
4490
4490
|
let response = undefined;
|
|
@@ -4649,16 +4649,16 @@ export default class coinbase extends Exchange {
|
|
|
4649
4649
|
'takeProfitPrice': undefined,
|
|
4650
4650
|
});
|
|
4651
4651
|
}
|
|
4652
|
+
/**
|
|
4653
|
+
* @method
|
|
4654
|
+
* @name coinbase#fetchTradingFees
|
|
4655
|
+
* @see https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_gettransactionsummary/
|
|
4656
|
+
* @description fetch the trading fees for multiple markets
|
|
4657
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4658
|
+
* @param {string} [params.type] 'spot' or 'swap'
|
|
4659
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
4660
|
+
*/
|
|
4652
4661
|
async fetchTradingFees(params = {}) {
|
|
4653
|
-
/**
|
|
4654
|
-
* @method
|
|
4655
|
-
* @name coinbase#fetchTradingFees
|
|
4656
|
-
* @see https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_gettransactionsummary/
|
|
4657
|
-
* @description fetch the trading fees for multiple markets
|
|
4658
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4659
|
-
* @param {string} [params.type] 'spot' or 'swap'
|
|
4660
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
4661
|
-
*/
|
|
4662
4662
|
await this.loadMarkets();
|
|
4663
4663
|
let type = undefined;
|
|
4664
4664
|
[type, params] = this.handleMarketTypeAndParams('fetchTradingFees', undefined, params);
|