ccxt 4.4.30 → 4.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +123 -123
- package/dist/cjs/src/alpaca.js +237 -237
- package/dist/cjs/src/ascendex.js +342 -341
- package/dist/cjs/src/bigone.js +242 -242
- package/dist/cjs/src/binance.js +1339 -1291
- package/dist/cjs/src/bingx.js +639 -639
- package/dist/cjs/src/bit2c.js +111 -111
- package/dist/cjs/src/bitbank.js +142 -142
- package/dist/cjs/src/bitbns.js +140 -140
- package/dist/cjs/src/bitfinex.js +231 -231
- package/dist/cjs/src/bitfinex2.js +403 -403
- package/dist/cjs/src/bitflyer.js +184 -184
- package/dist/cjs/src/bitget.js +848 -846
- package/dist/cjs/src/bithumb.js +125 -124
- package/dist/cjs/src/bitmart.js +525 -525
- package/dist/cjs/src/bitmex.js +317 -317
- package/dist/cjs/src/bitopro.js +221 -221
- package/dist/cjs/src/bitrue.js +315 -315
- package/dist/cjs/src/bitso.js +220 -220
- package/dist/cjs/src/bitstamp.js +251 -251
- package/dist/cjs/src/bitteam.js +183 -183
- package/dist/cjs/src/bitvavo.js +247 -251
- package/dist/cjs/src/bl3p.js +82 -82
- package/dist/cjs/src/blockchaincom.js +211 -211
- package/dist/cjs/src/blofin.js +332 -331
- package/dist/cjs/src/btcalpha.js +166 -166
- package/dist/cjs/src/btcbox.js +108 -108
- package/dist/cjs/src/btcmarkets.js +198 -198
- package/dist/cjs/src/btcturk.js +124 -124
- package/dist/cjs/src/bybit.js +906 -900
- package/dist/cjs/src/cex.js +227 -226
- package/dist/cjs/src/coinbase.js +481 -481
- package/dist/cjs/src/coinbaseexchange.js +274 -274
- package/dist/cjs/src/coinbaseinternational.js +304 -304
- package/dist/cjs/src/coincatch.js +650 -650
- package/dist/cjs/src/coincheck.js +113 -113
- package/dist/cjs/src/coinex.js +611 -601
- package/dist/cjs/src/coinlist.js +304 -303
- package/dist/cjs/src/coinmate.js +162 -161
- package/dist/cjs/src/coinmetro.js +187 -187
- package/dist/cjs/src/coinone.js +124 -123
- package/dist/cjs/src/coinsph.js +237 -237
- package/dist/cjs/src/coinspot.js +82 -82
- package/dist/cjs/src/cryptocom.js +342 -341
- package/dist/cjs/src/currencycom.js +225 -224
- package/dist/cjs/src/delta.js +320 -320
- package/dist/cjs/src/deribit.js +411 -408
- package/dist/cjs/src/digifinex.js +432 -431
- package/dist/cjs/src/exmo.js +328 -327
- package/dist/cjs/src/gate.js +830 -791
- package/dist/cjs/src/gemini.js +199 -198
- package/dist/cjs/src/hashkey.js +520 -517
- package/dist/cjs/src/hitbtc.js +465 -462
- package/dist/cjs/src/hollaex.js +253 -252
- package/dist/cjs/src/htx.js +791 -848
- package/dist/cjs/src/huobijp.js +219 -218
- package/dist/cjs/src/hyperliquid.js +421 -417
- package/dist/cjs/src/idex.js +238 -237
- package/dist/cjs/src/independentreserve.js +133 -132
- package/dist/cjs/src/indodax.js +177 -171
- package/dist/cjs/src/kraken.js +381 -377
- package/dist/cjs/src/krakenfutures.js +285 -279
- package/dist/cjs/src/kucoin.js +632 -622
- package/dist/cjs/src/kucoinfutures.js +533 -457
- package/dist/cjs/src/kuna.js +283 -282
- package/dist/cjs/src/latoken.js +211 -210
- package/dist/cjs/src/lbank.js +268 -267
- package/dist/cjs/src/luno.js +174 -173
- package/dist/cjs/src/lykke.js +172 -171
- package/dist/cjs/src/mercado.js +123 -122
- package/dist/cjs/src/mexc.js +650 -646
- package/dist/cjs/src/ndax.js +229 -228
- package/dist/cjs/src/novadax.js +230 -229
- package/dist/cjs/src/oceanex.js +187 -186
- package/dist/cjs/src/okcoin.js +286 -285
- package/dist/cjs/src/okx.js +909 -904
- package/dist/cjs/src/onetrading.js +218 -218
- package/dist/cjs/src/oxfun.js +335 -334
- package/dist/cjs/src/p2b.js +154 -154
- package/dist/cjs/src/paradex.js +249 -244
- package/dist/cjs/src/paymium.js +101 -101
- package/dist/cjs/src/phemex.js +388 -390
- package/dist/cjs/src/poloniex.js +270 -270
- package/dist/cjs/src/poloniexfutures.js +250 -250
- package/dist/cjs/src/pro/alpaca.js +64 -64
- package/dist/cjs/src/pro/ascendex.js +64 -64
- package/dist/cjs/src/pro/binance.js +546 -543
- package/dist/cjs/src/pro/bingx.js +116 -116
- package/dist/cjs/src/pro/bitfinex.js +42 -42
- package/dist/cjs/src/pro/bitfinex2.js +66 -66
- package/dist/cjs/src/pro/bitget.js +188 -181
- package/dist/cjs/src/pro/bithumb.js +40 -40
- package/dist/cjs/src/pro/bitmart.js +121 -119
- package/dist/cjs/src/pro/bitmex.js +135 -133
- package/dist/cjs/src/pro/bitopro.js +49 -49
- package/dist/cjs/src/pro/bitrue.js +19 -19
- package/dist/cjs/src/pro/bitstamp.js +29 -29
- package/dist/cjs/src/pro/bitvavo.js +299 -301
- package/dist/cjs/src/pro/blockchaincom.js +62 -62
- package/dist/cjs/src/pro/blofin.js +132 -130
- package/dist/cjs/src/pro/bybit.js +317 -313
- package/dist/cjs/src/pro/cex.js +168 -168
- package/dist/cjs/src/pro/coinbase.js +93 -91
- package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
- package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
- package/dist/cjs/src/pro/coincatch.js +150 -143
- package/dist/cjs/src/pro/coincheck.js +21 -21
- package/dist/cjs/src/pro/coinex.js +110 -110
- package/dist/cjs/src/pro/coinone.js +30 -30
- package/dist/cjs/src/pro/cryptocom.js +227 -227
- package/dist/cjs/src/pro/currencycom.js +45 -45
- package/dist/cjs/src/pro/deribit.js +127 -127
- package/dist/cjs/src/pro/exmo.js +66 -66
- package/dist/cjs/src/pro/gate.js +287 -283
- package/dist/cjs/src/pro/gemini.js +74 -74
- package/dist/cjs/src/pro/hashkey.js +87 -85
- package/dist/cjs/src/pro/hitbtc.js +190 -190
- package/dist/cjs/src/pro/hollaex.js +51 -51
- package/dist/cjs/src/pro/htx.js +96 -94
- package/dist/cjs/src/pro/huobijp.js +38 -38
- package/dist/cjs/src/pro/hyperliquid.js +151 -150
- package/dist/cjs/src/pro/idex.js +48 -48
- package/dist/cjs/src/pro/independentreserve.js +19 -19
- package/dist/cjs/src/pro/kraken.js +167 -167
- package/dist/cjs/src/pro/krakenfutures.js +137 -138
- package/dist/cjs/src/pro/kucoin.js +167 -168
- package/dist/cjs/src/pro/kucoinfutures.js +147 -147
- package/dist/cjs/src/pro/lbank.js +95 -95
- package/dist/cjs/src/pro/luno.js +21 -21
- package/dist/cjs/src/pro/mexc.js +102 -103
- package/dist/cjs/src/pro/ndax.js +42 -42
- package/dist/cjs/src/pro/okcoin.js +61 -61
- package/dist/cjs/src/pro/okx.js +332 -330
- package/dist/cjs/src/pro/onetrading.js +71 -71
- package/dist/cjs/src/pro/oxfun.js +193 -191
- package/dist/cjs/src/pro/p2b.js +77 -77
- package/dist/cjs/src/pro/paradex.js +39 -39
- package/dist/cjs/src/pro/phemex.js +94 -94
- package/dist/cjs/src/pro/poloniex.js +171 -171
- package/dist/cjs/src/pro/poloniexfutures.js +62 -62
- package/dist/cjs/src/pro/probit.js +63 -63
- package/dist/cjs/src/pro/upbit.js +80 -80
- package/dist/cjs/src/pro/vertex.js +65 -63
- package/dist/cjs/src/pro/wazirx.js +70 -70
- package/dist/cjs/src/pro/whitebit.js +83 -83
- package/dist/cjs/src/pro/woo.js +106 -104
- package/dist/cjs/src/pro/woofipro.js +105 -103
- package/dist/cjs/src/pro/xt.js +119 -119
- package/dist/cjs/src/probit.js +229 -229
- package/dist/cjs/src/timex.js +198 -197
- package/dist/cjs/src/tokocrypto.js +214 -213
- package/dist/cjs/src/tradeogre.js +92 -91
- package/dist/cjs/src/upbit.js +243 -242
- package/dist/cjs/src/vertex.js +258 -258
- package/dist/cjs/src/wavesexchange.js +176 -172
- package/dist/cjs/src/wazirx.js +168 -168
- package/dist/cjs/src/whitebit.js +361 -361
- package/dist/cjs/src/woo.js +571 -572
- package/dist/cjs/src/woofipro.js +392 -391
- package/dist/cjs/src/xt.js +436 -435
- package/dist/cjs/src/yobit.js +159 -158
- package/dist/cjs/src/zaif.js +103 -103
- package/dist/cjs/src/zonda.js +168 -168
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +123 -0
- package/js/src/ace.js +123 -123
- package/js/src/alpaca.d.ts +237 -0
- package/js/src/alpaca.js +237 -237
- package/js/src/ascendex.d.ts +339 -0
- package/js/src/ascendex.js +342 -341
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +242 -0
- package/js/src/bigone.js +242 -242
- package/js/src/binance.d.ts +1306 -0
- package/js/src/binance.js +1339 -1291
- package/js/src/bingx.d.ts +639 -0
- package/js/src/bingx.js +639 -639
- package/js/src/bit2c.d.ts +111 -0
- package/js/src/bit2c.js +111 -111
- package/js/src/bitbank.d.ts +142 -0
- package/js/src/bitbank.js +142 -142
- package/js/src/bitbns.d.ts +140 -0
- package/js/src/bitbns.js +140 -140
- package/js/src/bitfinex.d.ts +231 -0
- package/js/src/bitfinex.js +231 -231
- package/js/src/bitfinex2.d.ts +403 -0
- package/js/src/bitfinex2.js +403 -403
- package/js/src/bitflyer.d.ts +184 -0
- package/js/src/bitflyer.js +184 -184
- package/js/src/bitget.d.ts +846 -0
- package/js/src/bitget.js +848 -846
- package/js/src/bithumb.d.ts +125 -0
- package/js/src/bithumb.js +125 -124
- package/js/src/bitmart.d.ts +525 -0
- package/js/src/bitmart.js +525 -525
- package/js/src/bitmex.d.ts +317 -0
- package/js/src/bitmex.js +317 -317
- package/js/src/bitopro.d.ts +221 -0
- package/js/src/bitopro.js +221 -221
- package/js/src/bitrue.d.ts +315 -0
- package/js/src/bitrue.js +315 -315
- package/js/src/bitso.d.ts +220 -0
- package/js/src/bitso.js +220 -220
- package/js/src/bitstamp.d.ts +251 -0
- package/js/src/bitstamp.js +251 -251
- package/js/src/bitteam.d.ts +183 -0
- package/js/src/bitteam.js +183 -183
- package/js/src/bitvavo.d.ts +247 -0
- package/js/src/bitvavo.js +247 -251
- package/js/src/bl3p.d.ts +82 -0
- package/js/src/bl3p.js +82 -82
- package/js/src/blockchaincom.d.ts +211 -0
- package/js/src/blockchaincom.js +211 -211
- package/js/src/blofin.d.ts +332 -0
- package/js/src/blofin.js +332 -331
- package/js/src/btcalpha.d.ts +166 -0
- package/js/src/btcalpha.js +166 -166
- package/js/src/btcbox.d.ts +108 -0
- package/js/src/btcbox.js +108 -108
- package/js/src/btcmarkets.d.ts +198 -0
- package/js/src/btcmarkets.js +198 -198
- package/js/src/btcturk.d.ts +124 -0
- package/js/src/btcturk.js +124 -124
- package/js/src/bybit.d.ts +906 -1
- package/js/src/bybit.js +906 -900
- package/js/src/cex.d.ts +227 -0
- package/js/src/cex.js +227 -226
- package/js/src/coinbase.d.ts +481 -0
- package/js/src/coinbase.js +481 -481
- package/js/src/coinbaseexchange.d.ts +274 -0
- package/js/src/coinbaseexchange.js +274 -274
- package/js/src/coinbaseinternational.d.ts +304 -0
- package/js/src/coinbaseinternational.js +304 -304
- package/js/src/coincatch.d.ts +646 -0
- package/js/src/coincatch.js +650 -650
- package/js/src/coincheck.d.ts +113 -0
- package/js/src/coincheck.js +113 -113
- package/js/src/coinex.d.ts +603 -0
- package/js/src/coinex.js +611 -601
- package/js/src/coinlist.d.ts +304 -0
- package/js/src/coinlist.js +304 -303
- package/js/src/coinmate.d.ts +162 -0
- package/js/src/coinmate.js +162 -161
- package/js/src/coinmetro.d.ts +187 -0
- package/js/src/coinmetro.js +187 -187
- package/js/src/coinone.d.ts +124 -0
- package/js/src/coinone.js +124 -123
- package/js/src/coinsph.d.ts +237 -0
- package/js/src/coinsph.js +237 -237
- package/js/src/coinspot.d.ts +82 -0
- package/js/src/coinspot.js +82 -82
- package/js/src/cryptocom.d.ts +342 -0
- package/js/src/cryptocom.js +342 -341
- package/js/src/currencycom.d.ts +225 -0
- package/js/src/currencycom.js +225 -224
- package/js/src/delta.d.ts +320 -0
- package/js/src/delta.js +320 -320
- package/js/src/deribit.d.ts +411 -0
- package/js/src/deribit.js +411 -408
- package/js/src/digifinex.d.ts +430 -0
- package/js/src/digifinex.js +432 -431
- package/js/src/exmo.d.ts +328 -0
- package/js/src/exmo.js +328 -327
- package/js/src/gate.d.ts +803 -1
- package/js/src/gate.js +830 -791
- package/js/src/gemini.d.ts +199 -0
- package/js/src/gemini.js +199 -198
- package/js/src/hashkey.d.ts +516 -0
- package/js/src/hashkey.js +520 -517
- package/js/src/hitbtc.d.ts +465 -0
- package/js/src/hitbtc.js +465 -462
- package/js/src/hollaex.d.ts +253 -0
- package/js/src/hollaex.js +253 -252
- package/js/src/htx.d.ts +765 -2
- package/js/src/htx.js +791 -848
- package/js/src/huobijp.d.ts +219 -0
- package/js/src/huobijp.js +219 -218
- package/js/src/hyperliquid.d.ts +419 -0
- package/js/src/hyperliquid.js +421 -417
- package/js/src/idex.d.ts +238 -0
- package/js/src/idex.js +238 -237
- package/js/src/independentreserve.d.ts +133 -0
- package/js/src/independentreserve.js +133 -132
- package/js/src/indodax.d.ts +171 -0
- package/js/src/indodax.js +177 -171
- package/js/src/kraken.d.ts +381 -0
- package/js/src/kraken.js +381 -377
- package/js/src/krakenfutures.d.ts +282 -0
- package/js/src/krakenfutures.js +285 -279
- package/js/src/kucoin.d.ts +613 -0
- package/js/src/kucoin.js +632 -622
- package/js/src/kucoinfutures.d.ts +441 -0
- package/js/src/kucoinfutures.js +533 -457
- package/js/src/kuna.d.ts +283 -0
- package/js/src/kuna.js +283 -282
- package/js/src/latoken.d.ts +211 -0
- package/js/src/latoken.js +211 -210
- package/js/src/lbank.d.ts +268 -0
- package/js/src/lbank.js +268 -267
- package/js/src/luno.d.ts +174 -0
- package/js/src/luno.js +174 -173
- package/js/src/lykke.d.ts +172 -0
- package/js/src/lykke.js +172 -171
- package/js/src/mercado.d.ts +123 -0
- package/js/src/mercado.js +123 -122
- package/js/src/mexc.d.ts +647 -0
- package/js/src/mexc.js +650 -646
- package/js/src/ndax.d.ts +229 -0
- package/js/src/ndax.js +229 -228
- package/js/src/novadax.d.ts +230 -0
- package/js/src/novadax.js +230 -229
- package/js/src/oceanex.d.ts +187 -0
- package/js/src/oceanex.js +187 -186
- package/js/src/okcoin.d.ts +286 -0
- package/js/src/okcoin.js +286 -285
- package/js/src/okx.d.ts +907 -0
- package/js/src/okx.js +909 -904
- package/js/src/onetrading.d.ts +218 -0
- package/js/src/onetrading.js +218 -218
- package/js/src/oxfun.d.ts +336 -3
- package/js/src/oxfun.js +335 -334
- package/js/src/p2b.d.ts +154 -0
- package/js/src/p2b.js +154 -154
- package/js/src/paradex.d.ts +241 -0
- package/js/src/paradex.js +249 -244
- package/js/src/paymium.d.ts +101 -0
- package/js/src/paymium.js +101 -101
- package/js/src/phemex.d.ts +366 -0
- package/js/src/phemex.js +388 -390
- package/js/src/poloniex.d.ts +270 -0
- package/js/src/poloniex.js +270 -270
- package/js/src/poloniexfutures.d.ts +250 -0
- package/js/src/poloniexfutures.js +250 -250
- package/js/src/pro/alpaca.d.ts +64 -0
- package/js/src/pro/alpaca.js +64 -64
- package/js/src/pro/ascendex.d.ts +64 -0
- package/js/src/pro/ascendex.js +64 -64
- package/js/src/pro/binance.d.ts +546 -0
- package/js/src/pro/binance.js +546 -543
- package/js/src/pro/bingx.d.ts +116 -0
- package/js/src/pro/bingx.js +116 -116
- package/js/src/pro/bitfinex.d.ts +42 -0
- package/js/src/pro/bitfinex.js +42 -42
- package/js/src/pro/bitfinex2.d.ts +66 -0
- package/js/src/pro/bitfinex2.js +66 -66
- package/js/src/pro/bitget.d.ts +187 -0
- package/js/src/pro/bitget.js +188 -181
- package/js/src/pro/bithumb.d.ts +40 -0
- package/js/src/pro/bithumb.js +40 -40
- package/js/src/pro/bitmart.d.ts +121 -0
- package/js/src/pro/bitmart.js +121 -119
- package/js/src/pro/bitmex.d.ts +135 -0
- package/js/src/pro/bitmex.js +135 -133
- package/js/src/pro/bitopro.d.ts +49 -0
- package/js/src/pro/bitopro.js +49 -49
- package/js/src/pro/bitrue.d.ts +19 -0
- package/js/src/pro/bitrue.js +19 -19
- package/js/src/pro/bitstamp.d.ts +29 -0
- package/js/src/pro/bitstamp.js +29 -29
- package/js/src/pro/bitvavo.d.ts +254 -1
- package/js/src/pro/bitvavo.js +299 -301
- package/js/src/pro/blockchaincom.d.ts +62 -0
- package/js/src/pro/blockchaincom.js +62 -62
- package/js/src/pro/blofin.d.ts +132 -0
- package/js/src/pro/blofin.js +132 -130
- package/js/src/pro/bybit.d.ts +317 -0
- package/js/src/pro/bybit.js +317 -313
- package/js/src/pro/cex.d.ts +168 -0
- package/js/src/pro/cex.js +168 -168
- package/js/src/pro/coinbase.d.ts +93 -0
- package/js/src/pro/coinbase.js +93 -91
- package/js/src/pro/coinbaseexchange.d.ts +95 -0
- package/js/src/pro/coinbaseexchange.js +95 -95
- package/js/src/pro/coinbaseinternational.d.ts +111 -0
- package/js/src/pro/coinbaseinternational.js +111 -111
- package/js/src/pro/coincatch.d.ts +150 -0
- package/js/src/pro/coincatch.js +150 -143
- package/js/src/pro/coincheck.d.ts +21 -0
- package/js/src/pro/coincheck.js +21 -21
- package/js/src/pro/coinex.d.ts +110 -0
- package/js/src/pro/coinex.js +110 -110
- package/js/src/pro/coinone.d.ts +30 -0
- package/js/src/pro/coinone.js +30 -30
- package/js/src/pro/cryptocom.d.ts +227 -0
- package/js/src/pro/cryptocom.js +227 -227
- package/js/src/pro/currencycom.d.ts +45 -0
- package/js/src/pro/currencycom.js +45 -45
- package/js/src/pro/deribit.d.ts +127 -0
- package/js/src/pro/deribit.js +127 -127
- package/js/src/pro/exmo.d.ts +66 -0
- package/js/src/pro/exmo.js +66 -66
- package/js/src/pro/gate.d.ts +287 -0
- package/js/src/pro/gate.js +287 -283
- package/js/src/pro/gemini.d.ts +74 -0
- package/js/src/pro/gemini.js +74 -74
- package/js/src/pro/hashkey.d.ts +87 -0
- package/js/src/pro/hashkey.js +87 -85
- package/js/src/pro/hitbtc.d.ts +190 -0
- package/js/src/pro/hitbtc.js +190 -190
- package/js/src/pro/hollaex.d.ts +51 -0
- package/js/src/pro/hollaex.js +51 -51
- package/js/src/pro/htx.d.ts +96 -0
- package/js/src/pro/htx.js +96 -94
- package/js/src/pro/huobijp.d.ts +38 -0
- package/js/src/pro/huobijp.js +38 -38
- package/js/src/pro/hyperliquid.d.ts +151 -0
- package/js/src/pro/hyperliquid.js +151 -150
- package/js/src/pro/idex.d.ts +48 -0
- package/js/src/pro/idex.js +48 -48
- package/js/src/pro/independentreserve.d.ts +19 -0
- package/js/src/pro/independentreserve.js +19 -19
- package/js/src/pro/kraken.d.ts +167 -0
- package/js/src/pro/kraken.js +167 -167
- package/js/src/pro/krakenfutures.d.ts +137 -0
- package/js/src/pro/krakenfutures.js +137 -138
- package/js/src/pro/kucoin.d.ts +167 -0
- package/js/src/pro/kucoin.js +167 -168
- package/js/src/pro/kucoinfutures.d.ts +147 -0
- package/js/src/pro/kucoinfutures.js +147 -147
- package/js/src/pro/lbank.d.ts +95 -0
- package/js/src/pro/lbank.js +95 -95
- package/js/src/pro/luno.d.ts +21 -0
- package/js/src/pro/luno.js +21 -21
- package/js/src/pro/mexc.d.ts +101 -0
- package/js/src/pro/mexc.js +102 -103
- package/js/src/pro/ndax.d.ts +42 -0
- package/js/src/pro/ndax.js +42 -42
- package/js/src/pro/okcoin.d.ts +61 -0
- package/js/src/pro/okcoin.js +61 -61
- package/js/src/pro/okx.d.ts +332 -0
- package/js/src/pro/okx.js +332 -330
- package/js/src/pro/onetrading.d.ts +71 -0
- package/js/src/pro/onetrading.js +71 -71
- package/js/src/pro/oxfun.d.ts +193 -0
- package/js/src/pro/oxfun.js +193 -191
- package/js/src/pro/p2b.d.ts +77 -0
- package/js/src/pro/p2b.js +77 -77
- package/js/src/pro/paradex.d.ts +39 -0
- package/js/src/pro/paradex.js +39 -39
- package/js/src/pro/phemex.d.ts +94 -0
- package/js/src/pro/phemex.js +94 -94
- package/js/src/pro/poloniex.d.ts +171 -0
- package/js/src/pro/poloniex.js +171 -171
- package/js/src/pro/poloniexfutures.d.ts +62 -0
- package/js/src/pro/poloniexfutures.js +62 -62
- package/js/src/pro/probit.d.ts +63 -0
- package/js/src/pro/probit.js +63 -63
- package/js/src/pro/upbit.d.ts +80 -0
- package/js/src/pro/upbit.js +80 -80
- package/js/src/pro/vertex.d.ts +65 -0
- package/js/src/pro/vertex.js +65 -63
- package/js/src/pro/wazirx.d.ts +70 -0
- package/js/src/pro/wazirx.js +70 -70
- package/js/src/pro/whitebit.d.ts +83 -0
- package/js/src/pro/whitebit.js +83 -83
- package/js/src/pro/woo.d.ts +106 -0
- package/js/src/pro/woo.js +106 -104
- package/js/src/pro/woofipro.d.ts +105 -0
- package/js/src/pro/woofipro.js +105 -103
- package/js/src/pro/xt.d.ts +119 -0
- package/js/src/pro/xt.js +119 -119
- package/js/src/probit.d.ts +229 -0
- package/js/src/probit.js +229 -229
- package/js/src/timex.d.ts +198 -0
- package/js/src/timex.js +198 -197
- package/js/src/tokocrypto.d.ts +214 -0
- package/js/src/tokocrypto.js +214 -213
- package/js/src/tradeogre.d.ts +92 -0
- package/js/src/tradeogre.js +92 -91
- package/js/src/upbit.d.ts +243 -0
- package/js/src/upbit.js +243 -242
- package/js/src/vertex.d.ts +258 -0
- package/js/src/vertex.js +258 -258
- package/js/src/wavesexchange.d.ts +176 -0
- package/js/src/wavesexchange.js +176 -172
- package/js/src/wazirx.d.ts +168 -0
- package/js/src/wazirx.js +168 -168
- package/js/src/whitebit.d.ts +361 -0
- package/js/src/whitebit.js +361 -361
- package/js/src/woo.d.ts +571 -0
- package/js/src/woo.js +571 -572
- package/js/src/woofipro.d.ts +392 -0
- package/js/src/woofipro.js +392 -391
- package/js/src/xt.d.ts +439 -4
- package/js/src/xt.js +436 -435
- package/js/src/yobit.d.ts +159 -0
- package/js/src/yobit.js +159 -158
- package/js/src/zaif.d.ts +103 -0
- package/js/src/zaif.js +103 -103
- package/js/src/zonda.d.ts +168 -0
- package/js/src/zonda.js +168 -168
- package/package.json +1 -1
package/js/src/kraken.js
CHANGED
|
@@ -462,15 +462,15 @@ export default class kraken extends Exchange {
|
|
|
462
462
|
feeToPrecision(symbol, fee) {
|
|
463
463
|
return this.decimalToPrecision(fee, TRUNCATE, this.markets[symbol]['precision']['amount'], this.precisionMode);
|
|
464
464
|
}
|
|
465
|
+
/**
|
|
466
|
+
* @method
|
|
467
|
+
* @name kraken#fetchMarkets
|
|
468
|
+
* @description retrieves data on all markets for kraken
|
|
469
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTradableAssetPairs
|
|
470
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
471
|
+
* @returns {object[]} an array of objects representing market data
|
|
472
|
+
*/
|
|
465
473
|
async fetchMarkets(params = {}) {
|
|
466
|
-
/**
|
|
467
|
-
* @method
|
|
468
|
-
* @name kraken#fetchMarkets
|
|
469
|
-
* @description retrieves data on all markets for kraken
|
|
470
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTradableAssetPairs
|
|
471
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
472
|
-
* @returns {object[]} an array of objects representing market data
|
|
473
|
-
*/
|
|
474
474
|
if (this.options['adjustForTimeDifference']) {
|
|
475
475
|
await this.loadTimeDifference();
|
|
476
476
|
}
|
|
@@ -651,15 +651,15 @@ export default class kraken extends Exchange {
|
|
|
651
651
|
}
|
|
652
652
|
return result;
|
|
653
653
|
}
|
|
654
|
+
/**
|
|
655
|
+
* @method
|
|
656
|
+
* @name kraken#fetchStatus
|
|
657
|
+
* @description the latest known information on the availability of the exchange API
|
|
658
|
+
* @see https://docs.kraken.com/api/docs/rest-api/get-system-status/
|
|
659
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
660
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
661
|
+
*/
|
|
654
662
|
async fetchStatus(params = {}) {
|
|
655
|
-
/**
|
|
656
|
-
* @method
|
|
657
|
-
* @name kraken#fetchStatus
|
|
658
|
-
* @description the latest known information on the availability of the exchange API
|
|
659
|
-
* @see https://docs.kraken.com/api/docs/rest-api/get-system-status/
|
|
660
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
661
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
662
|
-
*/
|
|
663
663
|
const response = await this.publicGetSystemStatus(params);
|
|
664
664
|
//
|
|
665
665
|
// {
|
|
@@ -677,15 +677,15 @@ export default class kraken extends Exchange {
|
|
|
677
677
|
'info': response,
|
|
678
678
|
};
|
|
679
679
|
}
|
|
680
|
+
/**
|
|
681
|
+
* @method
|
|
682
|
+
* @name kraken#fetchCurrencies
|
|
683
|
+
* @description fetches all available currencies on an exchange
|
|
684
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getAssetInfo
|
|
685
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
686
|
+
* @returns {object} an associative dictionary of currencies
|
|
687
|
+
*/
|
|
680
688
|
async fetchCurrencies(params = {}) {
|
|
681
|
-
/**
|
|
682
|
-
* @method
|
|
683
|
-
* @name kraken#fetchCurrencies
|
|
684
|
-
* @description fetches all available currencies on an exchange
|
|
685
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getAssetInfo
|
|
686
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
687
|
-
* @returns {object} an associative dictionary of currencies
|
|
688
|
-
*/
|
|
689
689
|
const response = await this.publicGetAssets(params);
|
|
690
690
|
//
|
|
691
691
|
// {
|
|
@@ -741,16 +741,16 @@ export default class kraken extends Exchange {
|
|
|
741
741
|
}
|
|
742
742
|
return result;
|
|
743
743
|
}
|
|
744
|
+
/**
|
|
745
|
+
* @method
|
|
746
|
+
* @name kraken#fetchTradingFee
|
|
747
|
+
* @description fetch the trading fees for a market
|
|
748
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradeVolume
|
|
749
|
+
* @param {string} symbol unified market symbol
|
|
750
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
751
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
752
|
+
*/
|
|
744
753
|
async fetchTradingFee(symbol, params = {}) {
|
|
745
|
-
/**
|
|
746
|
-
* @method
|
|
747
|
-
* @name kraken#fetchTradingFee
|
|
748
|
-
* @description fetch the trading fees for a market
|
|
749
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradeVolume
|
|
750
|
-
* @param {string} symbol unified market symbol
|
|
751
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
752
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
753
|
-
*/
|
|
754
754
|
await this.loadMarkets();
|
|
755
755
|
const market = this.market(symbol);
|
|
756
756
|
const request = {
|
|
@@ -810,17 +810,17 @@ export default class kraken extends Exchange {
|
|
|
810
810
|
const timestamp = this.safeInteger(bidask, 2);
|
|
811
811
|
return [price, amount, timestamp];
|
|
812
812
|
}
|
|
813
|
+
/**
|
|
814
|
+
* @method
|
|
815
|
+
* @name kraken#fetchOrderBook
|
|
816
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
817
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getOrderBook
|
|
818
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
819
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
820
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
821
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
822
|
+
*/
|
|
813
823
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
814
|
-
/**
|
|
815
|
-
* @method
|
|
816
|
-
* @name kraken#fetchOrderBook
|
|
817
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
818
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getOrderBook
|
|
819
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
820
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
821
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
822
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
823
|
-
*/
|
|
824
824
|
await this.loadMarkets();
|
|
825
825
|
const market = this.market(symbol);
|
|
826
826
|
if (market['darkpool']) {
|
|
@@ -912,16 +912,16 @@ export default class kraken extends Exchange {
|
|
|
912
912
|
'info': ticker,
|
|
913
913
|
}, market);
|
|
914
914
|
}
|
|
915
|
+
/**
|
|
916
|
+
* @method
|
|
917
|
+
* @name kraken#fetchTickers
|
|
918
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
919
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTickerInformation
|
|
920
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
921
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
922
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
923
|
+
*/
|
|
915
924
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
916
|
-
/**
|
|
917
|
-
* @method
|
|
918
|
-
* @name kraken#fetchTickers
|
|
919
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
920
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTickerInformation
|
|
921
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
922
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
923
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
924
|
-
*/
|
|
925
925
|
await this.loadMarkets();
|
|
926
926
|
const request = {};
|
|
927
927
|
if (symbols !== undefined) {
|
|
@@ -949,16 +949,16 @@ export default class kraken extends Exchange {
|
|
|
949
949
|
}
|
|
950
950
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
951
951
|
}
|
|
952
|
+
/**
|
|
953
|
+
* @method
|
|
954
|
+
* @name kraken#fetchTicker
|
|
955
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
956
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTickerInformation
|
|
957
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
958
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
959
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
960
|
+
*/
|
|
952
961
|
async fetchTicker(symbol, params = {}) {
|
|
953
|
-
/**
|
|
954
|
-
* @method
|
|
955
|
-
* @name kraken#fetchTicker
|
|
956
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
957
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTickerInformation
|
|
958
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
959
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
960
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
961
|
-
*/
|
|
962
962
|
await this.loadMarkets();
|
|
963
963
|
const darkpool = symbol.indexOf('.d') >= 0;
|
|
964
964
|
if (darkpool) {
|
|
@@ -994,20 +994,20 @@ export default class kraken extends Exchange {
|
|
|
994
994
|
this.safeNumber(ohlcv, 6),
|
|
995
995
|
];
|
|
996
996
|
}
|
|
997
|
+
/**
|
|
998
|
+
* @method
|
|
999
|
+
* @name kraken#fetchOHLCV
|
|
1000
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1001
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getOHLCData
|
|
1002
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1003
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1004
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1005
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1006
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1007
|
+
* @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)
|
|
1008
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1009
|
+
*/
|
|
997
1010
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
998
|
-
/**
|
|
999
|
-
* @method
|
|
1000
|
-
* @name kraken#fetchOHLCV
|
|
1001
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1002
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getOHLCData
|
|
1003
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1004
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1005
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1006
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1007
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1008
|
-
* @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)
|
|
1009
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1010
|
-
*/
|
|
1011
1011
|
await this.loadMarkets();
|
|
1012
1012
|
let paginate = false;
|
|
1013
1013
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
|
|
@@ -1113,20 +1113,20 @@ export default class kraken extends Exchange {
|
|
|
1113
1113
|
},
|
|
1114
1114
|
}, currency);
|
|
1115
1115
|
}
|
|
1116
|
+
/**
|
|
1117
|
+
* @method
|
|
1118
|
+
* @name kraken#fetchLedger
|
|
1119
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1120
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getLedgers
|
|
1121
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
1122
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1123
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1124
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1125
|
+
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
1126
|
+
* @param {int} [params.end] timestamp in seconds of the latest ledger entry
|
|
1127
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1128
|
+
*/
|
|
1116
1129
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1117
|
-
/**
|
|
1118
|
-
* @method
|
|
1119
|
-
* @name kraken#fetchLedger
|
|
1120
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1121
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getLedgers
|
|
1122
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
1123
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1124
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1125
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1126
|
-
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
1127
|
-
* @param {int} [params.end] timestamp in seconds of the latest ledger entry
|
|
1128
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1129
|
-
*/
|
|
1130
1130
|
// https://www.kraken.com/features/api#get-ledgers-info
|
|
1131
1131
|
await this.loadMarkets();
|
|
1132
1132
|
const request = {};
|
|
@@ -1325,18 +1325,18 @@ export default class kraken extends Exchange {
|
|
|
1325
1325
|
'fee': fee,
|
|
1326
1326
|
}, market);
|
|
1327
1327
|
}
|
|
1328
|
+
/**
|
|
1329
|
+
* @method
|
|
1330
|
+
* @name kraken#fetchTrades
|
|
1331
|
+
* @description get the list of most recent trades for a particular symbol
|
|
1332
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getRecentTrades
|
|
1333
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1334
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1335
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1336
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1337
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1338
|
+
*/
|
|
1328
1339
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1329
|
-
/**
|
|
1330
|
-
* @method
|
|
1331
|
-
* @name kraken#fetchTrades
|
|
1332
|
-
* @description get the list of most recent trades for a particular symbol
|
|
1333
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getRecentTrades
|
|
1334
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1335
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1336
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1337
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1338
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1339
|
-
*/
|
|
1340
1340
|
await this.loadMarkets();
|
|
1341
1341
|
const market = this.market(symbol);
|
|
1342
1342
|
const id = market['id'];
|
|
@@ -1395,15 +1395,15 @@ export default class kraken extends Exchange {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
return this.safeBalance(result);
|
|
1397
1397
|
}
|
|
1398
|
+
/**
|
|
1399
|
+
* @method
|
|
1400
|
+
* @name kraken#fetchBalance
|
|
1401
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1402
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getExtendedBalance
|
|
1403
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1404
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1405
|
+
*/
|
|
1398
1406
|
async fetchBalance(params = {}) {
|
|
1399
|
-
/**
|
|
1400
|
-
* @method
|
|
1401
|
-
* @name kraken#fetchBalance
|
|
1402
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1403
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getExtendedBalance
|
|
1404
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1405
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1406
|
-
*/
|
|
1407
1407
|
await this.loadMarkets();
|
|
1408
1408
|
const response = await this.privatePostBalanceEx(params);
|
|
1409
1409
|
//
|
|
@@ -1423,61 +1423,61 @@ export default class kraken extends Exchange {
|
|
|
1423
1423
|
//
|
|
1424
1424
|
return this.parseBalance(response);
|
|
1425
1425
|
}
|
|
1426
|
+
/**
|
|
1427
|
+
* @method
|
|
1428
|
+
* @name kraken#createMarketOrderWithCost
|
|
1429
|
+
* @description create a market order by providing the symbol, side and cost
|
|
1430
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/addOrder
|
|
1431
|
+
* @param {string} symbol unified symbol of the market to create an order in (only USD markets are supported)
|
|
1432
|
+
* @param {string} side 'buy' or 'sell'
|
|
1433
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
1434
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1435
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1436
|
+
*/
|
|
1426
1437
|
async createMarketOrderWithCost(symbol, side, cost, params = {}) {
|
|
1427
|
-
/**
|
|
1428
|
-
* @method
|
|
1429
|
-
* @name kraken#createMarketOrderWithCost
|
|
1430
|
-
* @description create a market order by providing the symbol, side and cost
|
|
1431
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/addOrder
|
|
1432
|
-
* @param {string} symbol unified symbol of the market to create an order in (only USD markets are supported)
|
|
1433
|
-
* @param {string} side 'buy' or 'sell'
|
|
1434
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
1435
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1436
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1437
|
-
*/
|
|
1438
1438
|
await this.loadMarkets();
|
|
1439
1439
|
// only buy orders are supported by the endpoint
|
|
1440
1440
|
params['cost'] = cost;
|
|
1441
1441
|
return await this.createOrder(symbol, 'market', side, cost, undefined, params);
|
|
1442
1442
|
}
|
|
1443
|
+
/**
|
|
1444
|
+
* @method
|
|
1445
|
+
* @name kraken#createMarketBuyOrderWithCost
|
|
1446
|
+
* @description create a market buy order by providing the symbol, side and cost
|
|
1447
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/addOrder
|
|
1448
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1449
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
1450
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1451
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1452
|
+
*/
|
|
1443
1453
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
1444
|
-
/**
|
|
1445
|
-
* @method
|
|
1446
|
-
* @name kraken#createMarketBuyOrderWithCost
|
|
1447
|
-
* @description create a market buy order by providing the symbol, side and cost
|
|
1448
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/addOrder
|
|
1449
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1450
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
1451
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1452
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1453
|
-
*/
|
|
1454
1454
|
await this.loadMarkets();
|
|
1455
1455
|
return await this.createMarketOrderWithCost(symbol, 'buy', cost, params);
|
|
1456
1456
|
}
|
|
1457
|
+
/**
|
|
1458
|
+
* @method
|
|
1459
|
+
* @name kraken#createOrder
|
|
1460
|
+
* @description create a trade order
|
|
1461
|
+
* @see https://docs.kraken.com/api/docs/rest-api/add-order
|
|
1462
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1463
|
+
* @param {string} type 'market' or 'limit'
|
|
1464
|
+
* @param {string} side 'buy' or 'sell'
|
|
1465
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1466
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1467
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1468
|
+
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
1469
|
+
* @param {bool} [params.reduceOnly] *margin only* indicates if this order is to reduce the size of a position
|
|
1470
|
+
* @param {float} [params.stopLossPrice] *margin only* the price that a stop loss order is triggered at
|
|
1471
|
+
* @param {float} [params.takeProfitPrice] *margin only* the price that a take profit order is triggered at
|
|
1472
|
+
* @param {string} [params.trailingAmount] *margin only* the quote amount to trail away from the current market price
|
|
1473
|
+
* @param {string} [params.trailingPercent] *margin only* the percent to trail away from the current market price
|
|
1474
|
+
* @param {string} [params.trailingLimitAmount] *margin only* the quote amount away from the trailingAmount
|
|
1475
|
+
* @param {string} [params.trailingLimitPercent] *margin only* the percent away from the trailingAmount
|
|
1476
|
+
* @param {string} [params.offset] *margin only* '+' or '-' whether you want the trailingLimitAmount value to be positive or negative, default is negative '-'
|
|
1477
|
+
* @param {string} [params.trigger] *margin only* the activation price type, 'last' or 'index', default is 'last'
|
|
1478
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1479
|
+
*/
|
|
1457
1480
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1458
|
-
/**
|
|
1459
|
-
* @method
|
|
1460
|
-
* @name kraken#createOrder
|
|
1461
|
-
* @description create a trade order
|
|
1462
|
-
* @see https://docs.kraken.com/api/docs/rest-api/add-order
|
|
1463
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1464
|
-
* @param {string} type 'market' or 'limit'
|
|
1465
|
-
* @param {string} side 'buy' or 'sell'
|
|
1466
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1467
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1468
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1469
|
-
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
1470
|
-
* @param {bool} [params.reduceOnly] *margin only* indicates if this order is to reduce the size of a position
|
|
1471
|
-
* @param {float} [params.stopLossPrice] *margin only* the price that a stop loss order is triggered at
|
|
1472
|
-
* @param {float} [params.takeProfitPrice] *margin only* the price that a take profit order is triggered at
|
|
1473
|
-
* @param {string} [params.trailingAmount] *margin only* the quote amount to trail away from the current market price
|
|
1474
|
-
* @param {string} [params.trailingPercent] *margin only* the percent to trail away from the current market price
|
|
1475
|
-
* @param {string} [params.trailingLimitAmount] *margin only* the quote amount away from the trailingAmount
|
|
1476
|
-
* @param {string} [params.trailingLimitPercent] *margin only* the percent away from the trailingAmount
|
|
1477
|
-
* @param {string} [params.offset] *margin only* '+' or '-' whether you want the trailingLimitAmount value to be positive or negative, default is negative '-'
|
|
1478
|
-
* @param {string} [params.trigger] *margin only* the activation price type, 'last' or 'index', default is 'last'
|
|
1479
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1480
|
-
*/
|
|
1481
1481
|
await this.loadMarkets();
|
|
1482
1482
|
const market = this.market(symbol);
|
|
1483
1483
|
const request = {
|
|
@@ -1938,27 +1938,27 @@ export default class kraken extends Exchange {
|
|
|
1938
1938
|
params = this.omit(params, ['timeInForce', 'reduceOnly', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingLimitAmount', 'trailingLimitPercent', 'offset']);
|
|
1939
1939
|
return [request, params];
|
|
1940
1940
|
}
|
|
1941
|
+
/**
|
|
1942
|
+
* @method
|
|
1943
|
+
* @name kraken#editOrder
|
|
1944
|
+
* @description edit a trade order
|
|
1945
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/editOrder
|
|
1946
|
+
* @param {string} id order id
|
|
1947
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1948
|
+
* @param {string} type 'market' or 'limit'
|
|
1949
|
+
* @param {string} side 'buy' or 'sell'
|
|
1950
|
+
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
1951
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1952
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1953
|
+
* @param {float} [params.stopLossPrice] *margin only* the price that a stop loss order is triggered at
|
|
1954
|
+
* @param {float} [params.takeProfitPrice] *margin only* the price that a take profit order is triggered at
|
|
1955
|
+
* @param {string} [params.trailingAmount] *margin only* the quote price away from the current market price
|
|
1956
|
+
* @param {string} [params.trailingLimitAmount] *margin only* the quote amount away from the trailingAmount
|
|
1957
|
+
* @param {string} [params.offset] *margin only* '+' or '-' whether you want the trailingLimitAmount value to be positive or negative, default is negative '-'
|
|
1958
|
+
* @param {string} [params.trigger] *margin only* the activation price type, 'last' or 'index', default is 'last'
|
|
1959
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1960
|
+
*/
|
|
1941
1961
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1942
|
-
/**
|
|
1943
|
-
* @method
|
|
1944
|
-
* @name kraken#editOrder
|
|
1945
|
-
* @description edit a trade order
|
|
1946
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/editOrder
|
|
1947
|
-
* @param {string} id order id
|
|
1948
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1949
|
-
* @param {string} type 'market' or 'limit'
|
|
1950
|
-
* @param {string} side 'buy' or 'sell'
|
|
1951
|
-
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
1952
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1953
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1954
|
-
* @param {float} [params.stopLossPrice] *margin only* the price that a stop loss order is triggered at
|
|
1955
|
-
* @param {float} [params.takeProfitPrice] *margin only* the price that a take profit order is triggered at
|
|
1956
|
-
* @param {string} [params.trailingAmount] *margin only* the quote price away from the current market price
|
|
1957
|
-
* @param {string} [params.trailingLimitAmount] *margin only* the quote amount away from the trailingAmount
|
|
1958
|
-
* @param {string} [params.offset] *margin only* '+' or '-' whether you want the trailingLimitAmount value to be positive or negative, default is negative '-'
|
|
1959
|
-
* @param {string} [params.trigger] *margin only* the activation price type, 'last' or 'index', default is 'last'
|
|
1960
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1961
|
-
*/
|
|
1962
1962
|
await this.loadMarkets();
|
|
1963
1963
|
const market = this.market(symbol);
|
|
1964
1964
|
if (!market['spot']) {
|
|
@@ -1992,16 +1992,17 @@ export default class kraken extends Exchange {
|
|
|
1992
1992
|
const data = this.safeDict(response, 'result', {});
|
|
1993
1993
|
return this.parseOrder(data, market);
|
|
1994
1994
|
}
|
|
1995
|
+
/**
|
|
1996
|
+
* @method
|
|
1997
|
+
* @name kraken#fetchOrder
|
|
1998
|
+
* @description fetches information on an order made by the user
|
|
1999
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getOrdersInfo
|
|
2000
|
+
* @param {string} id order id
|
|
2001
|
+
* @param {string} symbol not used by kraken fetchOrder
|
|
2002
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2003
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2004
|
+
*/
|
|
1995
2005
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1996
|
-
/**
|
|
1997
|
-
* @method
|
|
1998
|
-
* @name kraken#fetchOrder
|
|
1999
|
-
* @description fetches information on an order made by the user
|
|
2000
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getOrdersInfo
|
|
2001
|
-
* @param {string} symbol not used by kraken fetchOrder
|
|
2002
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2003
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2004
|
-
*/
|
|
2005
2006
|
await this.loadMarkets();
|
|
2006
2007
|
const clientOrderId = this.safeValue2(params, 'userref', 'clientOrderId');
|
|
2007
2008
|
const request = {
|
|
@@ -2058,19 +2059,19 @@ export default class kraken extends Exchange {
|
|
|
2058
2059
|
}
|
|
2059
2060
|
return this.parseOrder(this.extend({ 'id': id }, result[id]));
|
|
2060
2061
|
}
|
|
2062
|
+
/**
|
|
2063
|
+
* @method
|
|
2064
|
+
* @name kraken#fetchOrderTrades
|
|
2065
|
+
* @description fetch all the trades made from a single order
|
|
2066
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradesInfo
|
|
2067
|
+
* @param {string} id order id
|
|
2068
|
+
* @param {string} symbol unified market symbol
|
|
2069
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2070
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2071
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2072
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2073
|
+
*/
|
|
2061
2074
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2062
|
-
/**
|
|
2063
|
-
* @method
|
|
2064
|
-
* @name kraken#fetchOrderTrades
|
|
2065
|
-
* @description fetch all the trades made from a single order
|
|
2066
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradesInfo
|
|
2067
|
-
* @param {string} id order id
|
|
2068
|
-
* @param {string} symbol unified market symbol
|
|
2069
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2070
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2071
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2072
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2073
|
-
*/
|
|
2074
2075
|
const orderTrades = this.safeValue(params, 'trades');
|
|
2075
2076
|
const tradeIds = [];
|
|
2076
2077
|
if (orderTrades === undefined) {
|
|
@@ -2141,16 +2142,17 @@ export default class kraken extends Exchange {
|
|
|
2141
2142
|
}
|
|
2142
2143
|
return result;
|
|
2143
2144
|
}
|
|
2145
|
+
/**
|
|
2146
|
+
* @method
|
|
2147
|
+
* @name kraken#fetchOrdersByIds
|
|
2148
|
+
* @description fetch orders by the list of order id
|
|
2149
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getClosedOrders
|
|
2150
|
+
* @param {string[]} [ids] list of order id
|
|
2151
|
+
* @param {string} [symbol] unified ccxt market symbol
|
|
2152
|
+
* @param {object} [params] extra parameters specific to the kraken api endpoint
|
|
2153
|
+
* @returns {object[]} a list of [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2154
|
+
*/
|
|
2144
2155
|
async fetchOrdersByIds(ids, symbol = undefined, params = {}) {
|
|
2145
|
-
/**
|
|
2146
|
-
* @method
|
|
2147
|
-
* @name kraken#fetchOrdersByIds
|
|
2148
|
-
* @description fetch orders by the list of order id
|
|
2149
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getClosedOrders
|
|
2150
|
-
* @param {string[]|undefined} ids list of order id
|
|
2151
|
-
* @param {object} [params] extra parameters specific to the kraken api endpoint
|
|
2152
|
-
* @returns {object[]} a list of [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2153
|
-
*/
|
|
2154
2156
|
await this.loadMarkets();
|
|
2155
2157
|
const response = await this.privatePostQueryOrders(this.extend({
|
|
2156
2158
|
'trades': true,
|
|
@@ -2167,20 +2169,20 @@ export default class kraken extends Exchange {
|
|
|
2167
2169
|
}
|
|
2168
2170
|
return orders;
|
|
2169
2171
|
}
|
|
2172
|
+
/**
|
|
2173
|
+
* @method
|
|
2174
|
+
* @name kraken#fetchMyTrades
|
|
2175
|
+
* @description fetch all trades made by the user
|
|
2176
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradeHistory
|
|
2177
|
+
* @param {string} symbol unified market symbol
|
|
2178
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2179
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2180
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2181
|
+
* @param {int} [params.until] timestamp in ms of the latest trade entry
|
|
2182
|
+
* @param {int} [params.end] timestamp in seconds of the latest trade entry
|
|
2183
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2184
|
+
*/
|
|
2170
2185
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2171
|
-
/**
|
|
2172
|
-
* @method
|
|
2173
|
-
* @name kraken#fetchMyTrades
|
|
2174
|
-
* @description fetch all trades made by the user
|
|
2175
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradeHistory
|
|
2176
|
-
* @param {string} symbol unified market symbol
|
|
2177
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2178
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2179
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2180
|
-
* @param {int} [params.until] timestamp in ms of the latest trade entry
|
|
2181
|
-
* @param {int} [params.end] timestamp in seconds of the latest trade entry
|
|
2182
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2183
|
-
*/
|
|
2184
2186
|
await this.loadMarkets();
|
|
2185
2187
|
const request = {
|
|
2186
2188
|
// 'type': 'all', // any position, closed position, closing position, no position
|
|
@@ -2238,17 +2240,17 @@ export default class kraken extends Exchange {
|
|
|
2238
2240
|
}
|
|
2239
2241
|
return this.parseTrades(trades, market, since, limit);
|
|
2240
2242
|
}
|
|
2243
|
+
/**
|
|
2244
|
+
* @method
|
|
2245
|
+
* @name kraken#cancelOrder
|
|
2246
|
+
* @description cancels an open order
|
|
2247
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelOrder
|
|
2248
|
+
* @param {string} id order id
|
|
2249
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
2250
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2251
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2252
|
+
*/
|
|
2241
2253
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
2242
|
-
/**
|
|
2243
|
-
* @method
|
|
2244
|
-
* @name kraken#cancelOrder
|
|
2245
|
-
* @description cancels an open order
|
|
2246
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelOrder
|
|
2247
|
-
* @param {string} id order id
|
|
2248
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2249
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2250
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2251
|
-
*/
|
|
2252
2254
|
await this.loadMarkets();
|
|
2253
2255
|
let response = undefined;
|
|
2254
2256
|
const clientOrderId = this.safeValue2(params, 'userref', 'clientOrderId', id);
|
|
@@ -2279,17 +2281,17 @@ export default class kraken extends Exchange {
|
|
|
2279
2281
|
'info': response,
|
|
2280
2282
|
});
|
|
2281
2283
|
}
|
|
2284
|
+
/**
|
|
2285
|
+
* @method
|
|
2286
|
+
* @name kraken#cancelOrders
|
|
2287
|
+
* @description cancel multiple orders
|
|
2288
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelOrderBatch
|
|
2289
|
+
* @param {string[]} ids open orders transaction ID (txid) or user reference (userref)
|
|
2290
|
+
* @param {string} symbol unified market symbol
|
|
2291
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2292
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2293
|
+
*/
|
|
2282
2294
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
2283
|
-
/**
|
|
2284
|
-
* @method
|
|
2285
|
-
* @name kraken#cancelOrders
|
|
2286
|
-
* @description cancel multiple orders
|
|
2287
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelOrderBatch
|
|
2288
|
-
* @param {string[]} ids open orders transaction ID (txid) or user reference (userref)
|
|
2289
|
-
* @param {string} symbol unified market symbol
|
|
2290
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2291
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2292
|
-
*/
|
|
2293
2295
|
const request = {
|
|
2294
2296
|
'orders': ids,
|
|
2295
2297
|
};
|
|
@@ -2308,16 +2310,16 @@ export default class kraken extends Exchange {
|
|
|
2308
2310
|
}),
|
|
2309
2311
|
];
|
|
2310
2312
|
}
|
|
2313
|
+
/**
|
|
2314
|
+
* @method
|
|
2315
|
+
* @name kraken#cancelAllOrders
|
|
2316
|
+
* @description cancel all open orders
|
|
2317
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelAllOrders
|
|
2318
|
+
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2319
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2320
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2321
|
+
*/
|
|
2311
2322
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
2312
|
-
/**
|
|
2313
|
-
* @method
|
|
2314
|
-
* @name kraken#cancelAllOrders
|
|
2315
|
-
* @description cancel all open orders
|
|
2316
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelAllOrders
|
|
2317
|
-
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2318
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2319
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2320
|
-
*/
|
|
2321
2323
|
await this.loadMarkets();
|
|
2322
2324
|
const response = await this.privatePostCancelAll(params);
|
|
2323
2325
|
//
|
|
@@ -2334,16 +2336,16 @@ export default class kraken extends Exchange {
|
|
|
2334
2336
|
}),
|
|
2335
2337
|
];
|
|
2336
2338
|
}
|
|
2339
|
+
/**
|
|
2340
|
+
* @method
|
|
2341
|
+
* @name kraken#cancelAllOrdersAfter
|
|
2342
|
+
* @description dead man's switch, cancel all orders after the given timeout
|
|
2343
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelAllOrdersAfter
|
|
2344
|
+
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
2345
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2346
|
+
* @returns {object} the api result
|
|
2347
|
+
*/
|
|
2337
2348
|
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
2338
|
-
/**
|
|
2339
|
-
* @method
|
|
2340
|
-
* @name kraken#cancelAllOrdersAfter
|
|
2341
|
-
* @description dead man's switch, cancel all orders after the given timeout
|
|
2342
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Trading/operation/cancelAllOrdersAfter
|
|
2343
|
-
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
2344
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2345
|
-
* @returns {object} the api result
|
|
2346
|
-
*/
|
|
2347
2349
|
if (timeout > 86400000) {
|
|
2348
2350
|
throw new BadRequest(this.id + 'cancelAllOrdersAfter timeout should be less than 86400000 milliseconds');
|
|
2349
2351
|
}
|
|
@@ -2363,18 +2365,18 @@ export default class kraken extends Exchange {
|
|
|
2363
2365
|
//
|
|
2364
2366
|
return response;
|
|
2365
2367
|
}
|
|
2368
|
+
/**
|
|
2369
|
+
* @method
|
|
2370
|
+
* @name kraken#fetchOpenOrders
|
|
2371
|
+
* @description fetch all unfilled currently open orders
|
|
2372
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getOpenOrders
|
|
2373
|
+
* @param {string} symbol unified market symbol
|
|
2374
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2375
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2376
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2377
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2378
|
+
*/
|
|
2366
2379
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2367
|
-
/**
|
|
2368
|
-
* @method
|
|
2369
|
-
* @name kraken#fetchOpenOrders
|
|
2370
|
-
* @description fetch all unfilled currently open orders
|
|
2371
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getOpenOrders
|
|
2372
|
-
* @param {string} symbol unified market symbol
|
|
2373
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2374
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2375
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2376
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2377
|
-
*/
|
|
2378
2380
|
await this.loadMarkets();
|
|
2379
2381
|
const request = {};
|
|
2380
2382
|
if (since !== undefined) {
|
|
@@ -2395,19 +2397,19 @@ export default class kraken extends Exchange {
|
|
|
2395
2397
|
const orders = this.safeDict(result, 'open', {});
|
|
2396
2398
|
return this.parseOrders(orders, market, since, limit);
|
|
2397
2399
|
}
|
|
2400
|
+
/**
|
|
2401
|
+
* @method
|
|
2402
|
+
* @name kraken#fetchClosedOrders
|
|
2403
|
+
* @description fetches information on multiple closed orders made by the user
|
|
2404
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getClosedOrders
|
|
2405
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2406
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2407
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2408
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2409
|
+
* @param {int} [params.until] timestamp in ms of the latest entry
|
|
2410
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2411
|
+
*/
|
|
2398
2412
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2399
|
-
/**
|
|
2400
|
-
* @method
|
|
2401
|
-
* @name kraken#fetchClosedOrders
|
|
2402
|
-
* @description fetches information on multiple closed orders made by the user
|
|
2403
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getClosedOrders
|
|
2404
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2405
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2406
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2407
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2408
|
-
* @param {int} [params.until] timestamp in ms of the latest entry
|
|
2409
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2410
|
-
*/
|
|
2411
2413
|
await this.loadMarkets();
|
|
2412
2414
|
let request = {};
|
|
2413
2415
|
if (since !== undefined) {
|
|
@@ -2603,20 +2605,20 @@ export default class kraken extends Exchange {
|
|
|
2603
2605
|
}
|
|
2604
2606
|
return this.filterByCurrencySinceLimit(result, code, since, limit);
|
|
2605
2607
|
}
|
|
2608
|
+
/**
|
|
2609
|
+
* @method
|
|
2610
|
+
* @name kraken#fetchDeposits
|
|
2611
|
+
* @description fetch all deposits made to an account
|
|
2612
|
+
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getStatusRecentDeposits
|
|
2613
|
+
* @param {string} code unified currency code
|
|
2614
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2615
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2616
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2617
|
+
* @param {int} [params.until] timestamp in ms of the latest transaction entry
|
|
2618
|
+
* @param {int} [params.end] timestamp in seconds of the latest transaction entry
|
|
2619
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2620
|
+
*/
|
|
2606
2621
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2607
|
-
/**
|
|
2608
|
-
* @method
|
|
2609
|
-
* @name kraken#fetchDeposits
|
|
2610
|
-
* @description fetch all deposits made to an account
|
|
2611
|
-
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getStatusRecentDeposits
|
|
2612
|
-
* @param {string} code unified currency code
|
|
2613
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2614
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2615
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2616
|
-
* @param {int} [params.until] timestamp in ms of the latest transaction entry
|
|
2617
|
-
* @param {int} [params.end] timestamp in seconds of the latest transaction entry
|
|
2618
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2619
|
-
*/
|
|
2620
2622
|
// https://www.kraken.com/en-us/help/api#deposit-status
|
|
2621
2623
|
await this.loadMarkets();
|
|
2622
2624
|
const request = {};
|
|
@@ -2650,15 +2652,15 @@ export default class kraken extends Exchange {
|
|
|
2650
2652
|
//
|
|
2651
2653
|
return this.parseTransactionsByType('deposit', response['result'], code, since, limit);
|
|
2652
2654
|
}
|
|
2655
|
+
/**
|
|
2656
|
+
* @method
|
|
2657
|
+
* @name kraken#fetchTime
|
|
2658
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
2659
|
+
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getServerTime
|
|
2660
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2661
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
2662
|
+
*/
|
|
2653
2663
|
async fetchTime(params = {}) {
|
|
2654
|
-
/**
|
|
2655
|
-
* @method
|
|
2656
|
-
* @name kraken#fetchTime
|
|
2657
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
2658
|
-
* @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getServerTime
|
|
2659
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2660
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
2661
|
-
*/
|
|
2662
2664
|
// https://www.kraken.com/en-us/features/api#get-server-time
|
|
2663
2665
|
const response = await this.publicGetTime(params);
|
|
2664
2666
|
//
|
|
@@ -2673,21 +2675,21 @@ export default class kraken extends Exchange {
|
|
|
2673
2675
|
const result = this.safeValue(response, 'result', {});
|
|
2674
2676
|
return this.safeTimestamp(result, 'unixtime');
|
|
2675
2677
|
}
|
|
2678
|
+
/**
|
|
2679
|
+
* @method
|
|
2680
|
+
* @name kraken#fetchWithdrawals
|
|
2681
|
+
* @description fetch all withdrawals made from an account
|
|
2682
|
+
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getStatusRecentWithdrawals
|
|
2683
|
+
* @param {string} code unified currency code
|
|
2684
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2685
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2686
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2687
|
+
* @param {int} [params.until] timestamp in ms of the latest transaction entry
|
|
2688
|
+
* @param {int} [params.end] timestamp in seconds of the latest transaction entry
|
|
2689
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times
|
|
2690
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2691
|
+
*/
|
|
2676
2692
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2677
|
-
/**
|
|
2678
|
-
* @method
|
|
2679
|
-
* @name kraken#fetchWithdrawals
|
|
2680
|
-
* @description fetch all withdrawals made from an account
|
|
2681
|
-
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getStatusRecentWithdrawals
|
|
2682
|
-
* @param {string} code unified currency code
|
|
2683
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2684
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2685
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2686
|
-
* @param {int} [params.until] timestamp in ms of the latest transaction entry
|
|
2687
|
-
* @param {int} [params.end] timestamp in seconds of the latest transaction entry
|
|
2688
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times
|
|
2689
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2690
|
-
*/
|
|
2691
2693
|
await this.loadMarkets();
|
|
2692
2694
|
let paginate = false;
|
|
2693
2695
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
|
|
@@ -2770,31 +2772,31 @@ export default class kraken extends Exchange {
|
|
|
2770
2772
|
}
|
|
2771
2773
|
return data;
|
|
2772
2774
|
}
|
|
2775
|
+
/**
|
|
2776
|
+
* @method
|
|
2777
|
+
* @name kraken#createDepositAddress
|
|
2778
|
+
* @description create a currency deposit address
|
|
2779
|
+
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getDepositAddresses
|
|
2780
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
2781
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2782
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2783
|
+
*/
|
|
2773
2784
|
async createDepositAddress(code, params = {}) {
|
|
2774
|
-
/**
|
|
2775
|
-
* @method
|
|
2776
|
-
* @name kraken#createDepositAddress
|
|
2777
|
-
* @description create a currency deposit address
|
|
2778
|
-
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getDepositAddresses
|
|
2779
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
2780
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2781
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2782
|
-
*/
|
|
2783
2785
|
const request = {
|
|
2784
2786
|
'new': 'true',
|
|
2785
2787
|
};
|
|
2786
2788
|
return await this.fetchDepositAddress(code, this.extend(request, params));
|
|
2787
2789
|
}
|
|
2790
|
+
/**
|
|
2791
|
+
* @method
|
|
2792
|
+
* @name kraken#fetchDepositMethods
|
|
2793
|
+
* @description fetch deposit methods for a currency associated with this account
|
|
2794
|
+
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getDepositMethods
|
|
2795
|
+
* @param {string} code unified currency code
|
|
2796
|
+
* @param {object} [params] extra parameters specific to the kraken api endpoint
|
|
2797
|
+
* @returns {object} of deposit methods
|
|
2798
|
+
*/
|
|
2788
2799
|
async fetchDepositMethods(code, params = {}) {
|
|
2789
|
-
/**
|
|
2790
|
-
* @method
|
|
2791
|
-
* @name kraken#fetchDepositMethods
|
|
2792
|
-
* @description fetch deposit methods for a currency associated with this account
|
|
2793
|
-
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getDepositMethods
|
|
2794
|
-
* @param {string} code unified currency code
|
|
2795
|
-
* @param {object} [params] extra parameters specific to the kraken api endpoint
|
|
2796
|
-
* @returns {object} of deposit methods
|
|
2797
|
-
*/
|
|
2798
2800
|
await this.loadMarkets();
|
|
2799
2801
|
const currency = this.currency(code);
|
|
2800
2802
|
const request = {
|
|
@@ -2826,16 +2828,16 @@ export default class kraken extends Exchange {
|
|
|
2826
2828
|
//
|
|
2827
2829
|
return this.safeValue(response, 'result');
|
|
2828
2830
|
}
|
|
2831
|
+
/**
|
|
2832
|
+
* @method
|
|
2833
|
+
* @name kraken#fetchDepositAddress
|
|
2834
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
2835
|
+
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getDepositAddresses
|
|
2836
|
+
* @param {string} code unified currency code
|
|
2837
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2838
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2839
|
+
*/
|
|
2829
2840
|
async fetchDepositAddress(code, params = {}) {
|
|
2830
|
-
/**
|
|
2831
|
-
* @method
|
|
2832
|
-
* @name kraken#fetchDepositAddress
|
|
2833
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
2834
|
-
* @see https://docs.kraken.com/rest/#tag/Funding/operation/getDepositAddresses
|
|
2835
|
-
* @param {string} code unified currency code
|
|
2836
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2837
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2838
|
-
*/
|
|
2839
2841
|
await this.loadMarkets();
|
|
2840
2842
|
const currency = this.currency(code);
|
|
2841
2843
|
let network = this.safeStringUpper(params, 'network');
|
|
@@ -2908,19 +2910,19 @@ export default class kraken extends Exchange {
|
|
|
2908
2910
|
'tag': tag,
|
|
2909
2911
|
};
|
|
2910
2912
|
}
|
|
2913
|
+
/**
|
|
2914
|
+
* @method
|
|
2915
|
+
* @name kraken#withdraw
|
|
2916
|
+
* @description make a withdrawal
|
|
2917
|
+
* @see https://docs.kraken.com/rest/#tag/Funding/operation/withdrawFunds
|
|
2918
|
+
* @param {string} code unified currency code
|
|
2919
|
+
* @param {float} amount the amount to withdraw
|
|
2920
|
+
* @param {string} address the address to withdraw to
|
|
2921
|
+
* @param {string} tag
|
|
2922
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2923
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2924
|
+
*/
|
|
2911
2925
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2912
|
-
/**
|
|
2913
|
-
* @method
|
|
2914
|
-
* @name kraken#withdraw
|
|
2915
|
-
* @description make a withdrawal
|
|
2916
|
-
* @see https://docs.kraken.com/rest/#tag/Funding/operation/withdrawFunds
|
|
2917
|
-
* @param {string} code unified currency code
|
|
2918
|
-
* @param {float} amount the amount to withdraw
|
|
2919
|
-
* @param {string} address the address to withdraw to
|
|
2920
|
-
* @param {string} tag
|
|
2921
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2922
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2923
|
-
*/
|
|
2924
2926
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2925
2927
|
this.checkAddress(address);
|
|
2926
2928
|
if ('key' in params) {
|
|
@@ -2945,16 +2947,16 @@ export default class kraken extends Exchange {
|
|
|
2945
2947
|
}
|
|
2946
2948
|
throw new ExchangeError(this.id + " withdraw() requires a 'key' parameter (withdrawal key name, as set up on your account)");
|
|
2947
2949
|
}
|
|
2950
|
+
/**
|
|
2951
|
+
* @method
|
|
2952
|
+
* @name kraken#fetchPositions
|
|
2953
|
+
* @description fetch all open positions
|
|
2954
|
+
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getOpenPositions
|
|
2955
|
+
* @param {string[]} [symbols] not used by kraken fetchPositions ()
|
|
2956
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2957
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2958
|
+
*/
|
|
2948
2959
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
2949
|
-
/**
|
|
2950
|
-
* @method
|
|
2951
|
-
* @name kraken#fetchPositions
|
|
2952
|
-
* @description fetch all open positions
|
|
2953
|
-
* @see https://docs.kraken.com/rest/#tag/Account-Data/operation/getOpenPositions
|
|
2954
|
-
* @param {string[]} [symbols] not used by kraken fetchPositions ()
|
|
2955
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2956
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2957
|
-
*/
|
|
2958
2960
|
await this.loadMarkets();
|
|
2959
2961
|
const request = {
|
|
2960
2962
|
// 'txid': 'comma delimited list of transaction ids to restrict output to',
|
|
@@ -3068,30 +3070,32 @@ export default class kraken extends Exchange {
|
|
|
3068
3070
|
};
|
|
3069
3071
|
return this.safeString(accountByType, account, account);
|
|
3070
3072
|
}
|
|
3073
|
+
/**
|
|
3074
|
+
* @method
|
|
3075
|
+
* @name kraken#transferOut
|
|
3076
|
+
* @description transfer from spot wallet to futures wallet
|
|
3077
|
+
* @see https://docs.kraken.com/rest/#tag/User-Funding/operation/walletTransfer
|
|
3078
|
+
* @param {str} code Unified currency code
|
|
3079
|
+
* @param {float} amount Size of the transfer
|
|
3080
|
+
* @param {dict} [params] Exchange specific parameters
|
|
3081
|
+
* @returns a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
3082
|
+
*/
|
|
3071
3083
|
async transferOut(code, amount, params = {}) {
|
|
3072
|
-
/**
|
|
3073
|
-
* @description transfer from spot wallet to futures wallet
|
|
3074
|
-
* @see https://docs.kraken.com/rest/#tag/User-Funding/operation/walletTransfer
|
|
3075
|
-
* @param {str} code Unified currency code
|
|
3076
|
-
* @param {float} amount Size of the transfer
|
|
3077
|
-
* @param {dict} [params] Exchange specific parameters
|
|
3078
|
-
* @returns a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
3079
|
-
*/
|
|
3080
3084
|
return await this.transfer(code, amount, 'spot', 'swap', params);
|
|
3081
3085
|
}
|
|
3086
|
+
/**
|
|
3087
|
+
* @method
|
|
3088
|
+
* @name kraken#transfer
|
|
3089
|
+
* @see https://docs.kraken.com/rest/#tag/User-Funding/operation/walletTransfer
|
|
3090
|
+
* @description transfers currencies between sub-accounts (only spot->swap direction is supported)
|
|
3091
|
+
* @param {string} code Unified currency code
|
|
3092
|
+
* @param {float} amount Size of the transfer
|
|
3093
|
+
* @param {string} fromAccount 'spot' or 'Spot Wallet'
|
|
3094
|
+
* @param {string} toAccount 'swap' or 'Futures Wallet'
|
|
3095
|
+
* @param {object} [params] Exchange specific parameters
|
|
3096
|
+
* @returns a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
3097
|
+
*/
|
|
3082
3098
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
3083
|
-
/**
|
|
3084
|
-
* @method
|
|
3085
|
-
* @name kraken#transfer
|
|
3086
|
-
* @see https://docs.kraken.com/rest/#tag/User-Funding/operation/walletTransfer
|
|
3087
|
-
* @description transfers currencies between sub-accounts (only spot->swap direction is supported)
|
|
3088
|
-
* @param {string} code Unified currency code
|
|
3089
|
-
* @param {float} amount Size of the transfer
|
|
3090
|
-
* @param {string} fromAccount 'spot' or 'Spot Wallet'
|
|
3091
|
-
* @param {string} toAccount 'swap' or 'Futures Wallet'
|
|
3092
|
-
* @param {object} [params] Exchange specific parameters
|
|
3093
|
-
* @returns a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
3094
|
-
*/
|
|
3095
3099
|
await this.loadMarkets();
|
|
3096
3100
|
const currency = this.currency(code);
|
|
3097
3101
|
fromAccount = this.parseAccountType(fromAccount);
|