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/dist/cjs/src/coinbase.js
CHANGED
|
@@ -374,16 +374,16 @@ class coinbase extends coinbase$1 {
|
|
|
374
374
|
},
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* @method
|
|
379
|
+
* @name coinbase#fetchTime
|
|
380
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
381
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-time#http-request
|
|
382
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
383
|
+
* @param {string} [params.method] 'v2PublicGetTime' or 'v3PublicGetBrokerageTime' default is 'v2PublicGetTime'
|
|
384
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
385
|
+
*/
|
|
377
386
|
async fetchTime(params = {}) {
|
|
378
|
-
/**
|
|
379
|
-
* @method
|
|
380
|
-
* @name coinbase#fetchTime
|
|
381
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
382
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-time#http-request
|
|
383
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
384
|
-
* @param {string} [params.method] 'v2PublicGetTime' or 'v3PublicGetBrokerageTime' default is 'v2PublicGetTime'
|
|
385
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
386
|
-
*/
|
|
387
387
|
const defaultMethod = this.safeString(this.options, 'fetchTime', 'v2PublicGetTime');
|
|
388
388
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
389
389
|
params = this.omit(params, 'method');
|
|
@@ -412,17 +412,17 @@ class coinbase extends coinbase$1 {
|
|
|
412
412
|
}
|
|
413
413
|
return this.safeTimestamp2(response, 'epoch', 'epochSeconds');
|
|
414
414
|
}
|
|
415
|
+
/**
|
|
416
|
+
* @method
|
|
417
|
+
* @name coinbase#fetchAccounts
|
|
418
|
+
* @description fetch all the accounts associated with a profile
|
|
419
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
|
|
420
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
|
|
421
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
422
|
+
* @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)
|
|
423
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
424
|
+
*/
|
|
415
425
|
async fetchAccounts(params = {}) {
|
|
416
|
-
/**
|
|
417
|
-
* @method
|
|
418
|
-
* @name coinbase#fetchAccounts
|
|
419
|
-
* @description fetch all the accounts associated with a profile
|
|
420
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
|
|
421
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
|
|
422
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
423
|
-
* @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)
|
|
424
|
-
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
425
|
-
*/
|
|
426
426
|
const method = this.safeString(this.options, 'fetchAccounts', 'fetchAccountsV3');
|
|
427
427
|
if (method === 'fetchAccountsV3') {
|
|
428
428
|
return await this.fetchAccountsV3(params);
|
|
@@ -549,15 +549,15 @@ class coinbase extends coinbase$1 {
|
|
|
549
549
|
}
|
|
550
550
|
return this.parseAccounts(accounts, params);
|
|
551
551
|
}
|
|
552
|
+
/**
|
|
553
|
+
* @method
|
|
554
|
+
* @name coinbase#fetchPortfolios
|
|
555
|
+
* @description fetch all the portfolios
|
|
556
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getportfolios
|
|
557
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
558
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
559
|
+
*/
|
|
552
560
|
async fetchPortfolios(params = {}) {
|
|
553
|
-
/**
|
|
554
|
-
* @method
|
|
555
|
-
* @name coinbase#fetchPortfolios
|
|
556
|
-
* @description fetch all the portfolios
|
|
557
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getportfolios
|
|
558
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
559
|
-
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
560
|
-
*/
|
|
561
561
|
const response = await this.v3PrivateGetBrokeragePortfolios(params);
|
|
562
562
|
const portfolios = this.safeList(response, 'portfolios', []);
|
|
563
563
|
const result = [];
|
|
@@ -642,16 +642,16 @@ class coinbase extends coinbase$1 {
|
|
|
642
642
|
'info': account,
|
|
643
643
|
};
|
|
644
644
|
}
|
|
645
|
+
/**
|
|
646
|
+
* @method
|
|
647
|
+
* @name coinbase#createDepositAddress
|
|
648
|
+
* @description create a currency deposit address
|
|
649
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses#create-address
|
|
650
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
651
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
652
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
653
|
+
*/
|
|
645
654
|
async createDepositAddress(code, params = {}) {
|
|
646
|
-
/**
|
|
647
|
-
* @method
|
|
648
|
-
* @name coinbase#createDepositAddress
|
|
649
|
-
* @description create a currency deposit address
|
|
650
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses#create-address
|
|
651
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
652
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
653
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
654
|
-
*/
|
|
655
655
|
let accountId = this.safeString(params, 'account_id');
|
|
656
656
|
params = this.omit(params, 'account_id');
|
|
657
657
|
if (accountId === undefined) {
|
|
@@ -717,19 +717,19 @@ class coinbase extends coinbase$1 {
|
|
|
717
717
|
'info': response,
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
+
/**
|
|
721
|
+
* @method
|
|
722
|
+
* @name coinbase#fetchMySells
|
|
723
|
+
* @ignore
|
|
724
|
+
* @description fetch sells
|
|
725
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-sells#list-sells
|
|
726
|
+
* @param {string} symbol not used by coinbase fetchMySells ()
|
|
727
|
+
* @param {int} [since] timestamp in ms of the earliest sell, default is undefined
|
|
728
|
+
* @param {int} [limit] max number of sells to return, default is undefined
|
|
729
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
730
|
+
* @returns {object} a [list of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
731
|
+
*/
|
|
720
732
|
async fetchMySells(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
721
|
-
/**
|
|
722
|
-
* @method
|
|
723
|
-
* @name coinbase#fetchMySells
|
|
724
|
-
* @ignore
|
|
725
|
-
* @description fetch sells
|
|
726
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-sells#list-sells
|
|
727
|
-
* @param {string} symbol not used by coinbase fetchMySells ()
|
|
728
|
-
* @param {int} [since] timestamp in ms of the earliest sell, default is undefined
|
|
729
|
-
* @param {int} [limit] max number of sells to return, default is undefined
|
|
730
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
731
|
-
* @returns {object} a [list of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
732
|
-
*/
|
|
733
733
|
// v2 did't have an endpoint for all historical trades
|
|
734
734
|
const request = this.prepareAccountRequest(limit, params);
|
|
735
735
|
await this.loadMarkets();
|
|
@@ -737,19 +737,19 @@ class coinbase extends coinbase$1 {
|
|
|
737
737
|
const sells = await this.v2PrivateGetAccountsAccountIdSells(this.extend(request, query));
|
|
738
738
|
return this.parseTrades(sells['data'], undefined, since, limit);
|
|
739
739
|
}
|
|
740
|
+
/**
|
|
741
|
+
* @method
|
|
742
|
+
* @name coinbase#fetchMyBuys
|
|
743
|
+
* @ignore
|
|
744
|
+
* @description fetch buys
|
|
745
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#list-buys
|
|
746
|
+
* @param {string} symbol not used by coinbase fetchMyBuys ()
|
|
747
|
+
* @param {int} [since] timestamp in ms of the earliest buy, default is undefined
|
|
748
|
+
* @param {int} [limit] max number of buys to return, default is undefined
|
|
749
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
750
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
751
|
+
*/
|
|
740
752
|
async fetchMyBuys(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
741
|
-
/**
|
|
742
|
-
* @method
|
|
743
|
-
* @name coinbase#fetchMyBuys
|
|
744
|
-
* @ignore
|
|
745
|
-
* @description fetch buys
|
|
746
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#list-buys
|
|
747
|
-
* @param {string} symbol not used by coinbase fetchMyBuys ()
|
|
748
|
-
* @param {int} [since] timestamp in ms of the earliest buy, default is undefined
|
|
749
|
-
* @param {int} [limit] max number of buys to return, default is undefined
|
|
750
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
751
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
752
|
-
*/
|
|
753
753
|
// v2 did't have an endpoint for all historical trades
|
|
754
754
|
const request = this.prepareAccountRequest(limit, params);
|
|
755
755
|
await this.loadMarkets();
|
|
@@ -764,19 +764,19 @@ class coinbase extends coinbase$1 {
|
|
|
764
764
|
const response = await this[method](this.extend(request, params));
|
|
765
765
|
return this.parseTransactions(response['data'], undefined, since, limit);
|
|
766
766
|
}
|
|
767
|
+
/**
|
|
768
|
+
* @method
|
|
769
|
+
* @name coinbase#fetchWithdrawals
|
|
770
|
+
* @description Fetch all withdrawals made from an account. Won't return crypto withdrawals. Use fetchLedger for those.
|
|
771
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-withdrawals#list-withdrawals
|
|
772
|
+
* @param {string} code unified currency code
|
|
773
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
774
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
775
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
776
|
+
* @param {string} [params.currencyType] "fiat" or "crypto"
|
|
777
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
778
|
+
*/
|
|
767
779
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
768
|
-
/**
|
|
769
|
-
* @method
|
|
770
|
-
* @name coinbase#fetchWithdrawals
|
|
771
|
-
* @description Fetch all withdrawals made from an account. Won't return crypto withdrawals. Use fetchLedger for those.
|
|
772
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-withdrawals#list-withdrawals
|
|
773
|
-
* @param {string} code unified currency code
|
|
774
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
775
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
776
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
777
|
-
* @param {string} [params.currencyType] "fiat" or "crypto"
|
|
778
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
779
|
-
*/
|
|
780
780
|
let currencyType = undefined;
|
|
781
781
|
[currencyType, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'currencyType');
|
|
782
782
|
if (currencyType === 'crypto') {
|
|
@@ -785,19 +785,19 @@ class coinbase extends coinbase$1 {
|
|
|
785
785
|
}
|
|
786
786
|
return await this.fetchTransactionsWithMethod('v2PrivateGetAccountsAccountIdWithdrawals', code, since, limit, params);
|
|
787
787
|
}
|
|
788
|
+
/**
|
|
789
|
+
* @method
|
|
790
|
+
* @name coinbase#fetchDeposits
|
|
791
|
+
* @description Fetch all fiat deposits made to an account. Won't return crypto deposits or staking rewards. Use fetchLedger for those.
|
|
792
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-deposits#list-deposits
|
|
793
|
+
* @param {string} code unified currency code
|
|
794
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
795
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
796
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
797
|
+
* @param {string} [params.currencyType] "fiat" or "crypto"
|
|
798
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
799
|
+
*/
|
|
788
800
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
789
|
-
/**
|
|
790
|
-
* @method
|
|
791
|
-
* @name coinbase#fetchDeposits
|
|
792
|
-
* @description Fetch all fiat deposits made to an account. Won't return crypto deposits or staking rewards. Use fetchLedger for those.
|
|
793
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-deposits#list-deposits
|
|
794
|
-
* @param {string} code unified currency code
|
|
795
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
796
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
797
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
798
|
-
* @param {string} [params.currencyType] "fiat" or "crypto"
|
|
799
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
800
|
-
*/
|
|
801
801
|
let currencyType = undefined;
|
|
802
802
|
[currencyType, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'currencyType');
|
|
803
803
|
if (currencyType === 'crypto') {
|
|
@@ -806,18 +806,18 @@ class coinbase extends coinbase$1 {
|
|
|
806
806
|
}
|
|
807
807
|
return await this.fetchTransactionsWithMethod('v2PrivateGetAccountsAccountIdDeposits', code, since, limit, params);
|
|
808
808
|
}
|
|
809
|
+
/**
|
|
810
|
+
* @method
|
|
811
|
+
* @name coinbase#fetchDepositsWithdrawals
|
|
812
|
+
* @description fetch history of deposits and withdrawals
|
|
813
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions
|
|
814
|
+
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
815
|
+
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
816
|
+
* @param {int} [limit] max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
|
|
817
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
818
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
819
|
+
*/
|
|
809
820
|
async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
810
|
-
/**
|
|
811
|
-
* @method
|
|
812
|
-
* @name coinbase#fetchDepositsWithdrawals
|
|
813
|
-
* @description fetch history of deposits and withdrawals
|
|
814
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions
|
|
815
|
-
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
816
|
-
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
817
|
-
* @param {int} [limit] max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
|
|
818
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
819
|
-
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
820
|
-
*/
|
|
821
821
|
await this.loadMarkets();
|
|
822
822
|
const results = await this.fetchTransactionsWithMethod('v2PrivateGetAccountsAccountIdTransactions', code, since, limit, params);
|
|
823
823
|
return this.filterByArray(results, 'type', ['deposit', 'withdrawal'], false);
|
|
@@ -1181,18 +1181,18 @@ class coinbase extends coinbase$1 {
|
|
|
1181
1181
|
},
|
|
1182
1182
|
});
|
|
1183
1183
|
}
|
|
1184
|
+
/**
|
|
1185
|
+
* @method
|
|
1186
|
+
* @name coinbase#fetchMarkets
|
|
1187
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproducts
|
|
1188
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
|
1189
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1190
|
+
* @description retrieves data on all markets for coinbase
|
|
1191
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1192
|
+
* @param {boolean} [params.usePrivate] use private endpoint for fetching markets
|
|
1193
|
+
* @returns {object[]} an array of objects representing market data
|
|
1194
|
+
*/
|
|
1184
1195
|
async fetchMarkets(params = {}) {
|
|
1185
|
-
/**
|
|
1186
|
-
* @method
|
|
1187
|
-
* @name coinbase#fetchMarkets
|
|
1188
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproducts
|
|
1189
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
|
1190
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1191
|
-
* @description retrieves data on all markets for coinbase
|
|
1192
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1193
|
-
* @param {boolean} [params.usePrivate] use private endpoint for fetching markets
|
|
1194
|
-
* @returns {object[]} an array of objects representing market data
|
|
1195
|
-
*/
|
|
1196
1196
|
const method = this.safeString(this.options, 'fetchMarkets', 'fetchMarketsV3');
|
|
1197
1197
|
if (method === 'fetchMarketsV3') {
|
|
1198
1198
|
return await this.fetchMarketsV3(params);
|
|
@@ -1756,16 +1756,16 @@ class coinbase extends coinbase$1 {
|
|
|
1756
1756
|
}
|
|
1757
1757
|
return this.safeDict(this.options, 'fetchCurrencies', {});
|
|
1758
1758
|
}
|
|
1759
|
+
/**
|
|
1760
|
+
* @method
|
|
1761
|
+
* @name coinbase#fetchCurrencies
|
|
1762
|
+
* @description fetches all available currencies on an exchange
|
|
1763
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
|
1764
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1765
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1766
|
+
* @returns {object} an associative dictionary of currencies
|
|
1767
|
+
*/
|
|
1759
1768
|
async fetchCurrencies(params = {}) {
|
|
1760
|
-
/**
|
|
1761
|
-
* @method
|
|
1762
|
-
* @name coinbase#fetchCurrencies
|
|
1763
|
-
* @description fetches all available currencies on an exchange
|
|
1764
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies
|
|
1765
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1766
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1767
|
-
* @returns {object} an associative dictionary of currencies
|
|
1768
|
-
*/
|
|
1769
1769
|
const response = await this.fetchCurrenciesFromCache(params);
|
|
1770
1770
|
const currencies = this.safeList(response, 'currencies', []);
|
|
1771
1771
|
//
|
|
@@ -1848,18 +1848,18 @@ class coinbase extends coinbase$1 {
|
|
|
1848
1848
|
this.options['networksById'] = this.extend(networksById, this.options['networksById']);
|
|
1849
1849
|
return result;
|
|
1850
1850
|
}
|
|
1851
|
+
/**
|
|
1852
|
+
* @method
|
|
1853
|
+
* @name coinbase#fetchTickers
|
|
1854
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1855
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getproducts
|
|
1856
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1857
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1858
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1859
|
+
* @param {boolean} [params.usePrivate] use private endpoint for fetching tickers
|
|
1860
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1861
|
+
*/
|
|
1851
1862
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1852
|
-
/**
|
|
1853
|
-
* @method
|
|
1854
|
-
* @name coinbase#fetchTickers
|
|
1855
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1856
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getproducts
|
|
1857
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates
|
|
1858
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1859
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1860
|
-
* @param {boolean} [params.usePrivate] use private endpoint for fetching tickers
|
|
1861
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1862
|
-
*/
|
|
1863
1863
|
const method = this.safeString(this.options, 'fetchTickers', 'fetchTickersV3');
|
|
1864
1864
|
if (method === 'fetchTickersV3') {
|
|
1865
1865
|
return await this.fetchTickersV3(symbols, params);
|
|
@@ -1969,20 +1969,20 @@ class coinbase extends coinbase$1 {
|
|
|
1969
1969
|
}
|
|
1970
1970
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
1971
1971
|
}
|
|
1972
|
+
/**
|
|
1973
|
+
* @method
|
|
1974
|
+
* @name coinbase#fetchTicker
|
|
1975
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1976
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getmarkettrades
|
|
1977
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-spot-price
|
|
1978
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-buy-price
|
|
1979
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-sell-price
|
|
1980
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1981
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1982
|
+
* @param {boolean} [params.usePrivate] whether to use the private endpoint for fetching the ticker
|
|
1983
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1984
|
+
*/
|
|
1972
1985
|
async fetchTicker(symbol, params = {}) {
|
|
1973
|
-
/**
|
|
1974
|
-
* @method
|
|
1975
|
-
* @name coinbase#fetchTicker
|
|
1976
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1977
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getmarkettrades
|
|
1978
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-spot-price
|
|
1979
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-buy-price
|
|
1980
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-sell-price
|
|
1981
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1982
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1983
|
-
* @param {boolean} [params.usePrivate] whether to use the private endpoint for fetching the ticker
|
|
1984
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1985
|
-
*/
|
|
1986
1986
|
const method = this.safeString(this.options, 'fetchTicker', 'fetchTickerV3');
|
|
1987
1987
|
if (method === 'fetchTickerV3') {
|
|
1988
1988
|
return await this.fetchTickerV3(symbol, params);
|
|
@@ -2231,19 +2231,19 @@ class coinbase extends coinbase$1 {
|
|
|
2231
2231
|
}
|
|
2232
2232
|
return this.safeBalance(result);
|
|
2233
2233
|
}
|
|
2234
|
+
/**
|
|
2235
|
+
* @method
|
|
2236
|
+
* @name coinbase#fetchBalance
|
|
2237
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2238
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
|
|
2239
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
|
|
2240
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmbalancesummary
|
|
2241
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2242
|
+
* @param {boolean} [params.v3] default false, set true to use v3 api endpoint
|
|
2243
|
+
* @param {object} [params.type] "spot" (default) or "swap" or "future"
|
|
2244
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2245
|
+
*/
|
|
2234
2246
|
async fetchBalance(params = {}) {
|
|
2235
|
-
/**
|
|
2236
|
-
* @method
|
|
2237
|
-
* @name coinbase#fetchBalance
|
|
2238
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2239
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getaccounts
|
|
2240
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
|
|
2241
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmbalancesummary
|
|
2242
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2243
|
-
* @param {boolean} [params.v3] default false, set true to use v3 api endpoint
|
|
2244
|
-
* @param {object} [params.type] "spot" (default) or "swap" or "future"
|
|
2245
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2246
|
-
*/
|
|
2247
2247
|
await this.loadMarkets();
|
|
2248
2248
|
const request = {};
|
|
2249
2249
|
let response = undefined;
|
|
@@ -2337,19 +2337,19 @@ class coinbase extends coinbase$1 {
|
|
|
2337
2337
|
params['type'] = marketType;
|
|
2338
2338
|
return this.parseCustomBalance(response, params);
|
|
2339
2339
|
}
|
|
2340
|
+
/**
|
|
2341
|
+
* @method
|
|
2342
|
+
* @name coinbase#fetchLedger
|
|
2343
|
+
* @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.
|
|
2344
|
+
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions#list-transactions
|
|
2345
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2346
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2347
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2348
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2349
|
+
* @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)
|
|
2350
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2351
|
+
*/
|
|
2340
2352
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2341
|
-
/**
|
|
2342
|
-
* @method
|
|
2343
|
-
* @name coinbase#fetchLedger
|
|
2344
|
-
* @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.
|
|
2345
|
-
* @see https://docs.cdp.coinbase.com/coinbase-app/docs/api-transactions#list-transactions
|
|
2346
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
2347
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2348
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2349
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2350
|
-
* @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)
|
|
2351
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2352
|
-
*/
|
|
2353
2353
|
await this.loadMarkets();
|
|
2354
2354
|
let paginate = false;
|
|
2355
2355
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
@@ -2775,17 +2775,17 @@ class coinbase extends coinbase$1 {
|
|
|
2775
2775
|
}
|
|
2776
2776
|
return [request, params];
|
|
2777
2777
|
}
|
|
2778
|
+
/**
|
|
2779
|
+
* @method
|
|
2780
|
+
* @name coinbase#createMarketBuyOrderWithCost
|
|
2781
|
+
* @description create a market buy order by providing the symbol and cost
|
|
2782
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
|
|
2783
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2784
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2785
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2786
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2787
|
+
*/
|
|
2778
2788
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
2779
|
-
/**
|
|
2780
|
-
* @method
|
|
2781
|
-
* @name coinbase#createMarketBuyOrderWithCost
|
|
2782
|
-
* @description create a market buy order by providing the symbol and cost
|
|
2783
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
|
|
2784
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2785
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2786
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2787
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2788
|
-
*/
|
|
2789
2789
|
await this.loadMarkets();
|
|
2790
2790
|
const market = this.market(symbol);
|
|
2791
2791
|
if (!market['spot']) {
|
|
@@ -2794,35 +2794,35 @@ class coinbase extends coinbase$1 {
|
|
|
2794
2794
|
params['createMarketBuyOrderRequiresPrice'] = false;
|
|
2795
2795
|
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
2796
2796
|
}
|
|
2797
|
+
/**
|
|
2798
|
+
* @method
|
|
2799
|
+
* @name coinbase#createOrder
|
|
2800
|
+
* @description create a trade order
|
|
2801
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
|
|
2802
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2803
|
+
* @param {string} type 'market' or 'limit'
|
|
2804
|
+
* @param {string} side 'buy' or 'sell'
|
|
2805
|
+
* @param {float} amount how much you want to trade in units of the base currency, quote currency for 'market' 'buy' orders
|
|
2806
|
+
* @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
|
|
2807
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2808
|
+
* @param {float} [params.stopPrice] price to trigger stop orders
|
|
2809
|
+
* @param {float} [params.triggerPrice] price to trigger stop orders
|
|
2810
|
+
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
2811
|
+
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
2812
|
+
* @param {bool} [params.postOnly] true or false
|
|
2813
|
+
* @param {string} [params.timeInForce] 'GTC', 'IOC', 'GTD' or 'PO', 'FOK'
|
|
2814
|
+
* @param {string} [params.stop_direction] 'UNKNOWN_STOP_DIRECTION', 'STOP_DIRECTION_STOP_UP', 'STOP_DIRECTION_STOP_DOWN' the direction the stopPrice is triggered from
|
|
2815
|
+
* @param {string} [params.end_time] '2023-05-25T17:01:05.092Z' for 'GTD' orders
|
|
2816
|
+
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
2817
|
+
* @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
|
|
2818
|
+
* @param {float} [params.leverage] default to 1, the leverage to use for the order
|
|
2819
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2820
|
+
* @param {string} [params.retail_portfolio_id] portfolio uid
|
|
2821
|
+
* @param {boolean} [params.is_max] Used in conjunction with tradable_balance to indicate the user wants to use their entire tradable balance
|
|
2822
|
+
* @param {string} [params.tradable_balance] amount of tradable balance
|
|
2823
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2824
|
+
*/
|
|
2797
2825
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2798
|
-
/**
|
|
2799
|
-
* @method
|
|
2800
|
-
* @name coinbase#createOrder
|
|
2801
|
-
* @description create a trade order
|
|
2802
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_postorder
|
|
2803
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2804
|
-
* @param {string} type 'market' or 'limit'
|
|
2805
|
-
* @param {string} side 'buy' or 'sell'
|
|
2806
|
-
* @param {float} amount how much you want to trade in units of the base currency, quote currency for 'market' 'buy' orders
|
|
2807
|
-
* @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
|
|
2808
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2809
|
-
* @param {float} [params.stopPrice] price to trigger stop orders
|
|
2810
|
-
* @param {float} [params.triggerPrice] price to trigger stop orders
|
|
2811
|
-
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
2812
|
-
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
2813
|
-
* @param {bool} [params.postOnly] true or false
|
|
2814
|
-
* @param {string} [params.timeInForce] 'GTC', 'IOC', 'GTD' or 'PO', 'FOK'
|
|
2815
|
-
* @param {string} [params.stop_direction] 'UNKNOWN_STOP_DIRECTION', 'STOP_DIRECTION_STOP_UP', 'STOP_DIRECTION_STOP_DOWN' the direction the stopPrice is triggered from
|
|
2816
|
-
* @param {string} [params.end_time] '2023-05-25T17:01:05.092Z' for 'GTD' orders
|
|
2817
|
-
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
2818
|
-
* @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
|
|
2819
|
-
* @param {float} [params.leverage] default to 1, the leverage to use for the order
|
|
2820
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2821
|
-
* @param {string} [params.retail_portfolio_id] portfolio uid
|
|
2822
|
-
* @param {boolean} [params.is_max] Used in conjunction with tradable_balance to indicate the user wants to use their entire tradable balance
|
|
2823
|
-
* @param {string} [params.tradable_balance] amount of tradable balance
|
|
2824
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2825
|
-
*/
|
|
2826
2826
|
await this.loadMarkets();
|
|
2827
2827
|
const market = this.market(symbol);
|
|
2828
2828
|
const id = this.safeString(this.options, 'brokerId', 'ccxt');
|
|
@@ -3220,32 +3220,32 @@ class coinbase extends coinbase$1 {
|
|
|
3220
3220
|
};
|
|
3221
3221
|
return this.safeString(timeInForces, timeInForce, timeInForce);
|
|
3222
3222
|
}
|
|
3223
|
+
/**
|
|
3224
|
+
* @method
|
|
3225
|
+
* @name coinbase#cancelOrder
|
|
3226
|
+
* @description cancels an open order
|
|
3227
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
|
|
3228
|
+
* @param {string} id order id
|
|
3229
|
+
* @param {string} symbol not used by coinbase cancelOrder()
|
|
3230
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3231
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3232
|
+
*/
|
|
3223
3233
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
3224
|
-
/**
|
|
3225
|
-
* @method
|
|
3226
|
-
* @name coinbase#cancelOrder
|
|
3227
|
-
* @description cancels an open order
|
|
3228
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
|
|
3229
|
-
* @param {string} id order id
|
|
3230
|
-
* @param {string} symbol not used by coinbase cancelOrder()
|
|
3231
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3232
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3233
|
-
*/
|
|
3234
3234
|
await this.loadMarkets();
|
|
3235
3235
|
const orders = await this.cancelOrders([id], symbol, params);
|
|
3236
3236
|
return this.safeDict(orders, 0, {});
|
|
3237
3237
|
}
|
|
3238
|
+
/**
|
|
3239
|
+
* @method
|
|
3240
|
+
* @name coinbase#cancelOrders
|
|
3241
|
+
* @description cancel multiple orders
|
|
3242
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
|
|
3243
|
+
* @param {string[]} ids order ids
|
|
3244
|
+
* @param {string} symbol not used by coinbase cancelOrders()
|
|
3245
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3246
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3247
|
+
*/
|
|
3238
3248
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
3239
|
-
/**
|
|
3240
|
-
* @method
|
|
3241
|
-
* @name coinbase#cancelOrders
|
|
3242
|
-
* @description cancel multiple orders
|
|
3243
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_cancelorders
|
|
3244
|
-
* @param {string[]} ids order ids
|
|
3245
|
-
* @param {string} symbol not used by coinbase cancelOrders()
|
|
3246
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3247
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3248
|
-
*/
|
|
3249
3249
|
await this.loadMarkets();
|
|
3250
3250
|
let market = undefined;
|
|
3251
3251
|
if (symbol !== undefined) {
|
|
@@ -3275,22 +3275,22 @@ class coinbase extends coinbase$1 {
|
|
|
3275
3275
|
}
|
|
3276
3276
|
return this.parseOrders(orders, market);
|
|
3277
3277
|
}
|
|
3278
|
+
/**
|
|
3279
|
+
* @method
|
|
3280
|
+
* @name coinbase#editOrder
|
|
3281
|
+
* @description edit a trade order
|
|
3282
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_editorder
|
|
3283
|
+
* @param {string} id cancel order id
|
|
3284
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
3285
|
+
* @param {string} type 'market' or 'limit'
|
|
3286
|
+
* @param {string} side 'buy' or 'sell'
|
|
3287
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3288
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3289
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3290
|
+
* @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
|
|
3291
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3292
|
+
*/
|
|
3278
3293
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
3279
|
-
/**
|
|
3280
|
-
* @method
|
|
3281
|
-
* @name coinbase#editOrder
|
|
3282
|
-
* @description edit a trade order
|
|
3283
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_editorder
|
|
3284
|
-
* @param {string} id cancel order id
|
|
3285
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
3286
|
-
* @param {string} type 'market' or 'limit'
|
|
3287
|
-
* @param {string} side 'buy' or 'sell'
|
|
3288
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
3289
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3290
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3291
|
-
* @param {boolean} [params.preview] default to false, wether to use the test/preview endpoint or not
|
|
3292
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3293
|
-
*/
|
|
3294
3294
|
await this.loadMarkets();
|
|
3295
3295
|
const market = this.market(symbol);
|
|
3296
3296
|
const request = {
|
|
@@ -3322,17 +3322,17 @@ class coinbase extends coinbase$1 {
|
|
|
3322
3322
|
//
|
|
3323
3323
|
return this.parseOrder(response, market);
|
|
3324
3324
|
}
|
|
3325
|
+
/**
|
|
3326
|
+
* @method
|
|
3327
|
+
* @name coinbase#fetchOrder
|
|
3328
|
+
* @description fetches information on an order made by the user
|
|
3329
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorder
|
|
3330
|
+
* @param {string} id the order id
|
|
3331
|
+
* @param {string} symbol unified market symbol that the order was made in
|
|
3332
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3333
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3334
|
+
*/
|
|
3325
3335
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
3326
|
-
/**
|
|
3327
|
-
* @method
|
|
3328
|
-
* @name coinbase#fetchOrder
|
|
3329
|
-
* @description fetches information on an order made by the user
|
|
3330
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorder
|
|
3331
|
-
* @param {string} id the order id
|
|
3332
|
-
* @param {string} symbol unified market symbol that the order was made in
|
|
3333
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3334
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3335
|
-
*/
|
|
3336
3336
|
await this.loadMarkets();
|
|
3337
3337
|
let market = undefined;
|
|
3338
3338
|
if (symbol !== undefined) {
|
|
@@ -3384,20 +3384,20 @@ class coinbase extends coinbase$1 {
|
|
|
3384
3384
|
const order = this.safeDict(response, 'order', {});
|
|
3385
3385
|
return this.parseOrder(order, market);
|
|
3386
3386
|
}
|
|
3387
|
+
/**
|
|
3388
|
+
* @method
|
|
3389
|
+
* @name coinbase#fetchOrders
|
|
3390
|
+
* @description fetches information on multiple orders made by the user
|
|
3391
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3392
|
+
* @param {string} symbol unified market symbol that the orders were made in
|
|
3393
|
+
* @param {int} [since] the earliest time in ms to fetch orders
|
|
3394
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3395
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3396
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3397
|
+
* @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)
|
|
3398
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3399
|
+
*/
|
|
3387
3400
|
async fetchOrders(symbol = undefined, since = undefined, limit = 100, params = {}) {
|
|
3388
|
-
/**
|
|
3389
|
-
* @method
|
|
3390
|
-
* @name coinbase#fetchOrders
|
|
3391
|
-
* @description fetches information on multiple orders made by the user
|
|
3392
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3393
|
-
* @param {string} symbol unified market symbol that the orders were made in
|
|
3394
|
-
* @param {int} [since] the earliest time in ms to fetch orders
|
|
3395
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3396
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3397
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3398
|
-
* @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)
|
|
3399
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3400
|
-
*/
|
|
3401
3401
|
await this.loadMarkets();
|
|
3402
3402
|
let paginate = false;
|
|
3403
3403
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOrders', 'paginate');
|
|
@@ -3551,20 +3551,20 @@ class coinbase extends coinbase$1 {
|
|
|
3551
3551
|
}
|
|
3552
3552
|
return this.parseOrders(orders, market, since, limit);
|
|
3553
3553
|
}
|
|
3554
|
+
/**
|
|
3555
|
+
* @method
|
|
3556
|
+
* @name coinbase#fetchOpenOrders
|
|
3557
|
+
* @description fetches information on all currently open orders
|
|
3558
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3559
|
+
* @param {string} symbol unified market symbol of the orders
|
|
3560
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3561
|
+
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3562
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3563
|
+
* @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)
|
|
3564
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3565
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3566
|
+
*/
|
|
3554
3567
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3555
|
-
/**
|
|
3556
|
-
* @method
|
|
3557
|
-
* @name coinbase#fetchOpenOrders
|
|
3558
|
-
* @description fetches information on all currently open orders
|
|
3559
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3560
|
-
* @param {string} symbol unified market symbol of the orders
|
|
3561
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3562
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3563
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3564
|
-
* @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)
|
|
3565
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3566
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3567
|
-
*/
|
|
3568
3568
|
await this.loadMarkets();
|
|
3569
3569
|
let paginate = false;
|
|
3570
3570
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
|
|
@@ -3573,20 +3573,20 @@ class coinbase extends coinbase$1 {
|
|
|
3573
3573
|
}
|
|
3574
3574
|
return await this.fetchOrdersByStatus('OPEN', symbol, since, limit, params);
|
|
3575
3575
|
}
|
|
3576
|
+
/**
|
|
3577
|
+
* @method
|
|
3578
|
+
* @name coinbase#fetchClosedOrders
|
|
3579
|
+
* @description fetches information on multiple closed orders made by the user
|
|
3580
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3581
|
+
* @param {string} symbol unified market symbol of the orders
|
|
3582
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3583
|
+
* @param {int} [limit] the maximum number of closed order structures to retrieve
|
|
3584
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3585
|
+
* @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)
|
|
3586
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3587
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3588
|
+
*/
|
|
3576
3589
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3577
|
-
/**
|
|
3578
|
-
* @method
|
|
3579
|
-
* @name coinbase#fetchClosedOrders
|
|
3580
|
-
* @description fetches information on multiple closed orders made by the user
|
|
3581
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3582
|
-
* @param {string} symbol unified market symbol of the orders
|
|
3583
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3584
|
-
* @param {int} [limit] the maximum number of closed order structures to retrieve
|
|
3585
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3586
|
-
* @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)
|
|
3587
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3588
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3589
|
-
*/
|
|
3590
3590
|
await this.loadMarkets();
|
|
3591
3591
|
let paginate = false;
|
|
3592
3592
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchClosedOrders', 'paginate');
|
|
@@ -3595,36 +3595,36 @@ class coinbase extends coinbase$1 {
|
|
|
3595
3595
|
}
|
|
3596
3596
|
return await this.fetchOrdersByStatus('FILLED', symbol, since, limit, params);
|
|
3597
3597
|
}
|
|
3598
|
+
/**
|
|
3599
|
+
* @method
|
|
3600
|
+
* @name coinbase#fetchCanceledOrders
|
|
3601
|
+
* @description fetches information on multiple canceled orders made by the user
|
|
3602
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3603
|
+
* @param {string} symbol unified market symbol of the orders
|
|
3604
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3605
|
+
* @param {int} [limit] the maximum number of canceled order structures to retrieve
|
|
3606
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3607
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3608
|
+
*/
|
|
3598
3609
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3599
|
-
/**
|
|
3600
|
-
* @method
|
|
3601
|
-
* @name coinbase#fetchCanceledOrders
|
|
3602
|
-
* @description fetches information on multiple canceled orders made by the user
|
|
3603
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_gethistoricalorders
|
|
3604
|
-
* @param {string} symbol unified market symbol of the orders
|
|
3605
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3606
|
-
* @param {int} [limit] the maximum number of canceled order structures to retrieve
|
|
3607
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3608
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3609
|
-
*/
|
|
3610
3610
|
return await this.fetchOrdersByStatus('CANCELLED', symbol, since, limit, params);
|
|
3611
3611
|
}
|
|
3612
|
+
/**
|
|
3613
|
+
* @method
|
|
3614
|
+
* @name coinbase#fetchOHLCV
|
|
3615
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3616
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpubliccandles
|
|
3617
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3618
|
+
* @param {string} timeframe the length of time each candle represents
|
|
3619
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
3620
|
+
* @param {int} [limit] the maximum amount of candles to fetch, not used by coinbase
|
|
3621
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3622
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3623
|
+
* @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)
|
|
3624
|
+
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the candles
|
|
3625
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
3626
|
+
*/
|
|
3612
3627
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
3613
|
-
/**
|
|
3614
|
-
* @method
|
|
3615
|
-
* @name coinbase#fetchOHLCV
|
|
3616
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3617
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpubliccandles
|
|
3618
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3619
|
-
* @param {string} timeframe the length of time each candle represents
|
|
3620
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
3621
|
-
* @param {int} [limit] the maximum amount of candles to fetch, not used by coinbase
|
|
3622
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3623
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3624
|
-
* @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)
|
|
3625
|
-
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the candles
|
|
3626
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
3627
|
-
*/
|
|
3628
3628
|
await this.loadMarkets();
|
|
3629
3629
|
const maxLimit = 300;
|
|
3630
3630
|
limit = (limit === undefined) ? maxLimit : Math.min(limit, maxLimit);
|
|
@@ -3706,19 +3706,19 @@ class coinbase extends coinbase$1 {
|
|
|
3706
3706
|
this.safeNumber(ohlcv, 'volume'),
|
|
3707
3707
|
];
|
|
3708
3708
|
}
|
|
3709
|
+
/**
|
|
3710
|
+
* @method
|
|
3711
|
+
* @name coinbase#fetchTrades
|
|
3712
|
+
* @description get the list of most recent trades for a particular symbol
|
|
3713
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicmarkettrades
|
|
3714
|
+
* @param {string} symbol unified market symbol of the trades
|
|
3715
|
+
* @param {int} [since] not used by coinbase fetchTrades
|
|
3716
|
+
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
3717
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3718
|
+
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the trades
|
|
3719
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
3720
|
+
*/
|
|
3709
3721
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
3710
|
-
/**
|
|
3711
|
-
* @method
|
|
3712
|
-
* @name coinbase#fetchTrades
|
|
3713
|
-
* @description get the list of most recent trades for a particular symbol
|
|
3714
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicmarkettrades
|
|
3715
|
-
* @param {string} symbol unified market symbol of the trades
|
|
3716
|
-
* @param {int} [since] not used by coinbase fetchTrades
|
|
3717
|
-
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
3718
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3719
|
-
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the trades
|
|
3720
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
3721
|
-
*/
|
|
3722
3722
|
await this.loadMarkets();
|
|
3723
3723
|
const market = this.market(symbol);
|
|
3724
3724
|
const request = {
|
|
@@ -3766,20 +3766,20 @@ class coinbase extends coinbase$1 {
|
|
|
3766
3766
|
const trades = this.safeList(response, 'trades', []);
|
|
3767
3767
|
return this.parseTrades(trades, market, since, limit);
|
|
3768
3768
|
}
|
|
3769
|
+
/**
|
|
3770
|
+
* @method
|
|
3771
|
+
* @name coinbase#fetchMyTrades
|
|
3772
|
+
* @description fetch all trades made by the user
|
|
3773
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfills
|
|
3774
|
+
* @param {string} symbol unified market symbol of the trades
|
|
3775
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3776
|
+
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
3777
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3778
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3779
|
+
* @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)
|
|
3780
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
3781
|
+
*/
|
|
3769
3782
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3770
|
-
/**
|
|
3771
|
-
* @method
|
|
3772
|
-
* @name coinbase#fetchMyTrades
|
|
3773
|
-
* @description fetch all trades made by the user
|
|
3774
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfills
|
|
3775
|
-
* @param {string} symbol unified market symbol of the trades
|
|
3776
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3777
|
-
* @param {int} [limit] the maximum number of trade structures to fetch
|
|
3778
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3779
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
3780
|
-
* @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)
|
|
3781
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
3782
|
-
*/
|
|
3783
3783
|
await this.loadMarkets();
|
|
3784
3784
|
let paginate = false;
|
|
3785
3785
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
|
|
@@ -3838,18 +3838,18 @@ class coinbase extends coinbase$1 {
|
|
|
3838
3838
|
}
|
|
3839
3839
|
return this.parseTrades(trades, market, since, limit);
|
|
3840
3840
|
}
|
|
3841
|
+
/**
|
|
3842
|
+
* @method
|
|
3843
|
+
* @name coinbase#fetchOrderBook
|
|
3844
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
3845
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproductbook
|
|
3846
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
3847
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
3848
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3849
|
+
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the order book
|
|
3850
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
3851
|
+
*/
|
|
3841
3852
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
3842
|
-
/**
|
|
3843
|
-
* @method
|
|
3844
|
-
* @name coinbase#fetchOrderBook
|
|
3845
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
3846
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getpublicproductbook
|
|
3847
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
3848
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
3849
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3850
|
-
* @param {boolean} [params.usePrivate] default false, when true will use the private endpoint to fetch the order book
|
|
3851
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
3852
|
-
*/
|
|
3853
3853
|
await this.loadMarkets();
|
|
3854
3854
|
const market = this.market(symbol);
|
|
3855
3855
|
const request = {
|
|
@@ -3892,16 +3892,16 @@ class coinbase extends coinbase$1 {
|
|
|
3892
3892
|
const timestamp = this.parse8601(time);
|
|
3893
3893
|
return this.parseOrderBook(data, symbol, timestamp, 'bids', 'asks', 'price', 'size');
|
|
3894
3894
|
}
|
|
3895
|
+
/**
|
|
3896
|
+
* @method
|
|
3897
|
+
* @name coinbase#fetchBidsAsks
|
|
3898
|
+
* @description fetches the bid and ask price and volume for multiple markets
|
|
3899
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getbestbidask
|
|
3900
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
3901
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3902
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
3903
|
+
*/
|
|
3895
3904
|
async fetchBidsAsks(symbols = undefined, params = {}) {
|
|
3896
|
-
/**
|
|
3897
|
-
* @method
|
|
3898
|
-
* @name coinbase#fetchBidsAsks
|
|
3899
|
-
* @description fetches the bid and ask price and volume for multiple markets
|
|
3900
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getbestbidask
|
|
3901
|
-
* @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
3902
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3903
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
3904
|
-
*/
|
|
3905
3905
|
await this.loadMarkets();
|
|
3906
3906
|
symbols = this.marketSymbols(symbols);
|
|
3907
3907
|
const request = {};
|
|
@@ -3934,19 +3934,19 @@ class coinbase extends coinbase$1 {
|
|
|
3934
3934
|
const tickers = this.safeList(response, 'pricebooks', []);
|
|
3935
3935
|
return this.parseTickers(tickers, symbols);
|
|
3936
3936
|
}
|
|
3937
|
+
/**
|
|
3938
|
+
* @method
|
|
3939
|
+
* @name coinbase#withdraw
|
|
3940
|
+
* @description make a withdrawal
|
|
3941
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#send-money
|
|
3942
|
+
* @param {string} code unified currency code
|
|
3943
|
+
* @param {float} amount the amount to withdraw
|
|
3944
|
+
* @param {string} address the address to withdraw to
|
|
3945
|
+
* @param {string} [tag] an optional tag for the withdrawal
|
|
3946
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3947
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3948
|
+
*/
|
|
3937
3949
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
3938
|
-
/**
|
|
3939
|
-
* @method
|
|
3940
|
-
* @name coinbase#withdraw
|
|
3941
|
-
* @description make a withdrawal
|
|
3942
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#send-money
|
|
3943
|
-
* @param {string} code unified currency code
|
|
3944
|
-
* @param {float} amount the amount to withdraw
|
|
3945
|
-
* @param {string} address the address to withdraw to
|
|
3946
|
-
* @param {string} [tag] an optional tag for the withdrawal
|
|
3947
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3948
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3949
|
-
*/
|
|
3950
3950
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
3951
3951
|
this.checkAddress(address);
|
|
3952
3952
|
await this.loadMarkets();
|
|
@@ -4028,16 +4028,16 @@ class coinbase extends coinbase$1 {
|
|
|
4028
4028
|
const data = this.safeDict(response, 'data', {});
|
|
4029
4029
|
return this.parseTransaction(data, currency);
|
|
4030
4030
|
}
|
|
4031
|
+
/**
|
|
4032
|
+
* @method
|
|
4033
|
+
* @name coinbase#fetchDepositAddress
|
|
4034
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
4035
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
|
|
4036
|
+
* @param {string} code unified currency code
|
|
4037
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4038
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
4039
|
+
*/
|
|
4031
4040
|
async fetchDepositAddressesByNetwork(code, params = {}) {
|
|
4032
|
-
/**
|
|
4033
|
-
* @method
|
|
4034
|
-
* @name coinbase#fetchDepositAddress
|
|
4035
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
4036
|
-
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
|
|
4037
|
-
* @param {string} code unified currency code
|
|
4038
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4039
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
4040
|
-
*/
|
|
4041
4041
|
await this.loadMarkets();
|
|
4042
4042
|
const currency = this.currency(code);
|
|
4043
4043
|
let request = undefined;
|
|
@@ -4162,19 +4162,19 @@ class coinbase extends coinbase$1 {
|
|
|
4162
4162
|
'tag': this.safeString(addressInfo, 'destination_tag'),
|
|
4163
4163
|
};
|
|
4164
4164
|
}
|
|
4165
|
+
/**
|
|
4166
|
+
* @method
|
|
4167
|
+
* @name coinbase#deposit
|
|
4168
|
+
* @description make a deposit
|
|
4169
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#deposit-funds
|
|
4170
|
+
* @param {string} code unified currency code
|
|
4171
|
+
* @param {float} amount the amount to deposit
|
|
4172
|
+
* @param {string} id the payment method id to be used for the deposit, can be retrieved from v2PrivateGetPaymentMethods
|
|
4173
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4174
|
+
* @param {string} [params.accountId] the id of the account to deposit into
|
|
4175
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4176
|
+
*/
|
|
4165
4177
|
async deposit(code, amount, id, params = {}) {
|
|
4166
|
-
/**
|
|
4167
|
-
* @method
|
|
4168
|
-
* @name coinbase#deposit
|
|
4169
|
-
* @description make a deposit
|
|
4170
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#deposit-funds
|
|
4171
|
-
* @param {string} code unified currency code
|
|
4172
|
-
* @param {float} amount the amount to deposit
|
|
4173
|
-
* @param {string} id the payment method id to be used for the deposit, can be retrieved from v2PrivateGetPaymentMethods
|
|
4174
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4175
|
-
* @param {string} [params.accountId] the id of the account to deposit into
|
|
4176
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4177
|
-
*/
|
|
4178
4178
|
await this.loadMarkets();
|
|
4179
4179
|
let accountId = this.safeString2(params, 'account_id', 'accountId');
|
|
4180
4180
|
params = this.omit(params, ['account_id', 'accountId']);
|
|
@@ -4233,18 +4233,18 @@ class coinbase extends coinbase$1 {
|
|
|
4233
4233
|
const data = this.safeDict(response, 'data', {});
|
|
4234
4234
|
return this.parseTransaction(data);
|
|
4235
4235
|
}
|
|
4236
|
+
/**
|
|
4237
|
+
* @method
|
|
4238
|
+
* @name coinbase#fetchDeposit
|
|
4239
|
+
* @description fetch information on a deposit, fiat only, for crypto transactions use fetchLedger
|
|
4240
|
+
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#show-deposit
|
|
4241
|
+
* @param {string} id deposit id
|
|
4242
|
+
* @param {string} [code] unified currency code
|
|
4243
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4244
|
+
* @param {string} [params.accountId] the id of the account that the funds were deposited into
|
|
4245
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4246
|
+
*/
|
|
4236
4247
|
async fetchDeposit(id, code = undefined, params = {}) {
|
|
4237
|
-
/**
|
|
4238
|
-
* @method
|
|
4239
|
-
* @name coinbase#fetchDeposit
|
|
4240
|
-
* @description fetch information on a deposit, fiat only, for crypto transactions use fetchLedger
|
|
4241
|
-
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#show-deposit
|
|
4242
|
-
* @param {string} id deposit id
|
|
4243
|
-
* @param {string} [code] unified currency code
|
|
4244
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4245
|
-
* @param {string} [params.accountId] the id of the account that the funds were deposited into
|
|
4246
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4247
|
-
*/
|
|
4248
4248
|
await this.loadMarkets();
|
|
4249
4249
|
let accountId = this.safeString2(params, 'account_id', 'accountId');
|
|
4250
4250
|
params = this.omit(params, ['account_id', 'accountId']);
|
|
@@ -4301,21 +4301,21 @@ class coinbase extends coinbase$1 {
|
|
|
4301
4301
|
const data = this.safeDict(response, 'data', {});
|
|
4302
4302
|
return this.parseTransaction(data);
|
|
4303
4303
|
}
|
|
4304
|
+
/**
|
|
4305
|
+
* @method
|
|
4306
|
+
* @name coinbase#fetchConvertQuote
|
|
4307
|
+
* @description fetch a quote for converting from one currency to another
|
|
4308
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_createconvertquote
|
|
4309
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4310
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
4311
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
4312
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4313
|
+
* @param {object} [params.trade_incentive_metadata] an object to fill in user incentive data
|
|
4314
|
+
* @param {string} [params.trade_incentive_metadata.user_incentive_id] the id of the incentive
|
|
4315
|
+
* @param {string} [params.trade_incentive_metadata.code_val] the code value of the incentive
|
|
4316
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4317
|
+
*/
|
|
4304
4318
|
async fetchConvertQuote(fromCode, toCode, amount = undefined, params = {}) {
|
|
4305
|
-
/**
|
|
4306
|
-
* @method
|
|
4307
|
-
* @name coinbase#fetchConvertQuote
|
|
4308
|
-
* @description fetch a quote for converting from one currency to another
|
|
4309
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_createconvertquote
|
|
4310
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4311
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
4312
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
4313
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4314
|
-
* @param {object} [params.trade_incentive_metadata] an object to fill in user incentive data
|
|
4315
|
-
* @param {string} [params.trade_incentive_metadata.user_incentive_id] the id of the incentive
|
|
4316
|
-
* @param {string} [params.trade_incentive_metadata.code_val] the code value of the incentive
|
|
4317
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4318
|
-
*/
|
|
4319
4319
|
await this.loadMarkets();
|
|
4320
4320
|
const request = {
|
|
4321
4321
|
'from_account': fromCode,
|
|
@@ -4326,19 +4326,19 @@ class coinbase extends coinbase$1 {
|
|
|
4326
4326
|
const data = this.safeDict(response, 'trade', {});
|
|
4327
4327
|
return this.parseConversion(data);
|
|
4328
4328
|
}
|
|
4329
|
+
/**
|
|
4330
|
+
* @method
|
|
4331
|
+
* @name coinbase#createConvertTrade
|
|
4332
|
+
* @description convert from one currency to another
|
|
4333
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_commitconverttrade
|
|
4334
|
+
* @param {string} id the id of the trade that you want to make
|
|
4335
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4336
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
4337
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
4338
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4339
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4340
|
+
*/
|
|
4329
4341
|
async createConvertTrade(id, fromCode, toCode, amount = undefined, params = {}) {
|
|
4330
|
-
/**
|
|
4331
|
-
* @method
|
|
4332
|
-
* @name coinbase#createConvertTrade
|
|
4333
|
-
* @description convert from one currency to another
|
|
4334
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_commitconverttrade
|
|
4335
|
-
* @param {string} id the id of the trade that you want to make
|
|
4336
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
4337
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
4338
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
4339
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4340
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4341
|
-
*/
|
|
4342
4342
|
await this.loadMarkets();
|
|
4343
4343
|
const request = {
|
|
4344
4344
|
'trade_id': id,
|
|
@@ -4349,18 +4349,18 @@ class coinbase extends coinbase$1 {
|
|
|
4349
4349
|
const data = this.safeDict(response, 'trade', {});
|
|
4350
4350
|
return this.parseConversion(data);
|
|
4351
4351
|
}
|
|
4352
|
+
/**
|
|
4353
|
+
* @method
|
|
4354
|
+
* @name coinbase#fetchConvertTrade
|
|
4355
|
+
* @description fetch the data for a conversion trade
|
|
4356
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getconverttrade
|
|
4357
|
+
* @param {string} id the id of the trade that you want to commit
|
|
4358
|
+
* @param {string} code the unified currency code that was converted from
|
|
4359
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4360
|
+
* @param {strng} params.toCode the unified currency code that was converted into
|
|
4361
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4362
|
+
*/
|
|
4352
4363
|
async fetchConvertTrade(id, code = undefined, params = {}) {
|
|
4353
|
-
/**
|
|
4354
|
-
* @method
|
|
4355
|
-
* @name coinbase#fetchConvertTrade
|
|
4356
|
-
* @description fetch the data for a conversion trade
|
|
4357
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getconverttrade
|
|
4358
|
-
* @param {string} id the id of the trade that you want to commit
|
|
4359
|
-
* @param {string} code the unified currency code that was converted from
|
|
4360
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4361
|
-
* @param {strng} params.toCode the unified currency code that was converted into
|
|
4362
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
4363
|
-
*/
|
|
4364
4364
|
await this.loadMarkets();
|
|
4365
4365
|
if (code === undefined) {
|
|
4366
4366
|
throw new errors.ArgumentsRequired(this.id + ' fetchConvertTrade() requires a code argument');
|
|
@@ -4400,19 +4400,19 @@ class coinbase extends coinbase$1 {
|
|
|
4400
4400
|
'fee': this.safeNumber(feeAmountStructure, 'value'),
|
|
4401
4401
|
};
|
|
4402
4402
|
}
|
|
4403
|
+
/**
|
|
4404
|
+
* @method
|
|
4405
|
+
* @name coinbase#closePosition
|
|
4406
|
+
* @description *futures only* closes open positions for a market
|
|
4407
|
+
* @see https://coinbase-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
|
|
4408
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
4409
|
+
* @param {string} [side] not used by coinbase
|
|
4410
|
+
* @param {object} [params] extra parameters specific to the coinbase api endpoint
|
|
4411
|
+
* @param {string} params.clientOrderId *mandatory* the client order id of the position to close
|
|
4412
|
+
* @param {float} [params.size] the size of the position to close, optional
|
|
4413
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4414
|
+
*/
|
|
4403
4415
|
async closePosition(symbol, side = undefined, params = {}) {
|
|
4404
|
-
/**
|
|
4405
|
-
* @method
|
|
4406
|
-
* @name coinbase#closePosition
|
|
4407
|
-
* @description *futures only* closes open positions for a market
|
|
4408
|
-
* @see https://coinbase-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
|
|
4409
|
-
* @param {string} symbol Unified CCXT market symbol
|
|
4410
|
-
* @param {string} [side] not used by coinbase
|
|
4411
|
-
* @param {object} [params] extra parameters specific to the coinbase api endpoint
|
|
4412
|
-
* @param {string} params.clientOrderId *mandatory* the client order id of the position to close
|
|
4413
|
-
* @param {float} [params.size] the size of the position to close, optional
|
|
4414
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4415
|
-
*/
|
|
4416
4416
|
await this.loadMarkets();
|
|
4417
4417
|
const market = this.market(symbol);
|
|
4418
4418
|
if (!market['future']) {
|
|
@@ -4431,18 +4431,18 @@ class coinbase extends coinbase$1 {
|
|
|
4431
4431
|
const order = this.safeDict(response, 'success_response', {});
|
|
4432
4432
|
return this.parseOrder(order);
|
|
4433
4433
|
}
|
|
4434
|
+
/**
|
|
4435
|
+
* @method
|
|
4436
|
+
* @name coinbase#fetchPositions
|
|
4437
|
+
* @description fetch all open positions
|
|
4438
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmpositions
|
|
4439
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxpositions
|
|
4440
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
4441
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4442
|
+
* @param {string} [params.portfolio] the portfolio UUID to fetch positions for
|
|
4443
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4444
|
+
*/
|
|
4434
4445
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
4435
|
-
/**
|
|
4436
|
-
* @method
|
|
4437
|
-
* @name coinbase#fetchPositions
|
|
4438
|
-
* @description fetch all open positions
|
|
4439
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmpositions
|
|
4440
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxpositions
|
|
4441
|
-
* @param {string[]} [symbols] list of unified market symbols
|
|
4442
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4443
|
-
* @param {string} [params.portfolio] the portfolio UUID to fetch positions for
|
|
4444
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4445
|
-
*/
|
|
4446
4446
|
await this.loadMarkets();
|
|
4447
4447
|
symbols = this.marketSymbols(symbols);
|
|
4448
4448
|
let market = undefined;
|
|
@@ -4469,19 +4469,19 @@ class coinbase extends coinbase$1 {
|
|
|
4469
4469
|
const positions = this.safeList(response, 'positions', []);
|
|
4470
4470
|
return this.parsePositions(positions, symbols);
|
|
4471
4471
|
}
|
|
4472
|
+
/**
|
|
4473
|
+
* @method
|
|
4474
|
+
* @name coinbase#fetchPosition
|
|
4475
|
+
* @description fetch data on a single open contract trade position
|
|
4476
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxposition
|
|
4477
|
+
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmposition
|
|
4478
|
+
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
4479
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4480
|
+
* @param {string} [params.product_id] *futures only* the product id of the position to fetch, required for futures markets only
|
|
4481
|
+
* @param {string} [params.portfolio] *perpetual/swaps only* the portfolio UUID to fetch the position for, required for perpetual/swaps markets only
|
|
4482
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4483
|
+
*/
|
|
4472
4484
|
async fetchPosition(symbol, params = {}) {
|
|
4473
|
-
/**
|
|
4474
|
-
* @method
|
|
4475
|
-
* @name coinbase#fetchPosition
|
|
4476
|
-
* @description fetch data on a single open contract trade position
|
|
4477
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getintxposition
|
|
4478
|
-
* @see https://docs.cloud.coinbase.com/advanced-trade/reference/retailbrokerageapi_getfcmposition
|
|
4479
|
-
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
4480
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4481
|
-
* @param {string} [params.product_id] *futures only* the product id of the position to fetch, required for futures markets only
|
|
4482
|
-
* @param {string} [params.portfolio] *perpetual/swaps only* the portfolio UUID to fetch the position for, required for perpetual/swaps markets only
|
|
4483
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4484
|
-
*/
|
|
4485
4485
|
await this.loadMarkets();
|
|
4486
4486
|
const market = this.market(symbol);
|
|
4487
4487
|
let response = undefined;
|
|
@@ -4646,16 +4646,16 @@ class coinbase extends coinbase$1 {
|
|
|
4646
4646
|
'takeProfitPrice': undefined,
|
|
4647
4647
|
});
|
|
4648
4648
|
}
|
|
4649
|
+
/**
|
|
4650
|
+
* @method
|
|
4651
|
+
* @name coinbase#fetchTradingFees
|
|
4652
|
+
* @see https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_gettransactionsummary/
|
|
4653
|
+
* @description fetch the trading fees for multiple markets
|
|
4654
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4655
|
+
* @param {string} [params.type] 'spot' or 'swap'
|
|
4656
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
4657
|
+
*/
|
|
4649
4658
|
async fetchTradingFees(params = {}) {
|
|
4650
|
-
/**
|
|
4651
|
-
* @method
|
|
4652
|
-
* @name coinbase#fetchTradingFees
|
|
4653
|
-
* @see https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_gettransactionsummary/
|
|
4654
|
-
* @description fetch the trading fees for multiple markets
|
|
4655
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4656
|
-
* @param {string} [params.type] 'spot' or 'swap'
|
|
4657
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
4658
|
-
*/
|
|
4659
4659
|
await this.loadMarkets();
|
|
4660
4660
|
let type = undefined;
|
|
4661
4661
|
[type, params] = this.handleMarketTypeAndParams('fetchTradingFees', undefined, params);
|