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/woo.js
CHANGED
|
@@ -342,15 +342,15 @@ class woo extends woo$1 {
|
|
|
342
342
|
'precisionMode': number.TICK_SIZE,
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* @method
|
|
347
|
+
* @name woo#fetchStatus
|
|
348
|
+
* @description the latest known information on the availability of the exchange API
|
|
349
|
+
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
350
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
351
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
352
|
+
*/
|
|
345
353
|
async fetchStatus(params = {}) {
|
|
346
|
-
/**
|
|
347
|
-
* @method
|
|
348
|
-
* @name woo#fetchStatus
|
|
349
|
-
* @description the latest known information on the availability of the exchange API
|
|
350
|
-
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
351
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
352
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
353
|
-
*/
|
|
354
354
|
const response = await this.v1PublicGetSystemInfo(params);
|
|
355
355
|
//
|
|
356
356
|
// {
|
|
@@ -381,15 +381,15 @@ class woo extends woo$1 {
|
|
|
381
381
|
'info': response,
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* @method
|
|
386
|
+
* @name woo#fetchTime
|
|
387
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
388
|
+
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
389
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
390
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
391
|
+
*/
|
|
384
392
|
async fetchTime(params = {}) {
|
|
385
|
-
/**
|
|
386
|
-
* @method
|
|
387
|
-
* @name woo#fetchTime
|
|
388
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
389
|
-
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
390
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
391
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
392
|
-
*/
|
|
393
393
|
const response = await this.v1PublicGetSystemInfo(params);
|
|
394
394
|
//
|
|
395
395
|
// {
|
|
@@ -403,15 +403,15 @@ class woo extends woo$1 {
|
|
|
403
403
|
//
|
|
404
404
|
return this.safeInteger(response, 'timestamp');
|
|
405
405
|
}
|
|
406
|
+
/**
|
|
407
|
+
* @method
|
|
408
|
+
* @name woo#fetchMarkets
|
|
409
|
+
* @description retrieves data on all markets for woo
|
|
410
|
+
* @see https://docs.woo.org/#exchange-information
|
|
411
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
412
|
+
* @returns {object[]} an array of objects representing market data
|
|
413
|
+
*/
|
|
406
414
|
async fetchMarkets(params = {}) {
|
|
407
|
-
/**
|
|
408
|
-
* @method
|
|
409
|
-
* @name woo#fetchMarkets
|
|
410
|
-
* @description retrieves data on all markets for woo
|
|
411
|
-
* @see https://docs.woo.org/#exchange-information
|
|
412
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
413
|
-
* @returns {object[]} an array of objects representing market data
|
|
414
|
-
*/
|
|
415
415
|
const response = await this.v1PublicGetInfo(params);
|
|
416
416
|
//
|
|
417
417
|
// {
|
|
@@ -521,18 +521,18 @@ class woo extends woo$1 {
|
|
|
521
521
|
'info': market,
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
|
+
/**
|
|
525
|
+
* @method
|
|
526
|
+
* @name woo#fetchTrades
|
|
527
|
+
* @description get the list of most recent trades for a particular symbol
|
|
528
|
+
* @see https://docs.woo.org/#market-trades-public
|
|
529
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
530
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
531
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
532
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
533
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
534
|
+
*/
|
|
524
535
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
525
|
-
/**
|
|
526
|
-
* @method
|
|
527
|
-
* @name woo#fetchTrades
|
|
528
|
-
* @description get the list of most recent trades for a particular symbol
|
|
529
|
-
* @see https://docs.woo.org/#market-trades-public
|
|
530
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
531
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
532
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
533
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
534
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
535
|
-
*/
|
|
536
536
|
await this.loadMarkets();
|
|
537
537
|
const market = this.market(symbol);
|
|
538
538
|
const request = {
|
|
@@ -652,15 +652,15 @@ class woo extends woo$1 {
|
|
|
652
652
|
}
|
|
653
653
|
return fee;
|
|
654
654
|
}
|
|
655
|
+
/**
|
|
656
|
+
* @method
|
|
657
|
+
* @name woo#fetchTradingFees
|
|
658
|
+
* @description fetch the trading fees for multiple markets
|
|
659
|
+
* @see https://docs.woo.org/#get-account-information-new
|
|
660
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
661
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
662
|
+
*/
|
|
655
663
|
async fetchTradingFees(params = {}) {
|
|
656
|
-
/**
|
|
657
|
-
* @method
|
|
658
|
-
* @name woo#fetchTradingFees
|
|
659
|
-
* @description fetch the trading fees for multiple markets
|
|
660
|
-
* @see https://docs.woo.org/#get-account-information-new
|
|
661
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
662
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
663
|
-
*/
|
|
664
664
|
await this.loadMarkets();
|
|
665
665
|
const response = await this.v3PrivateGetAccountinfo(params);
|
|
666
666
|
//
|
|
@@ -708,15 +708,15 @@ class woo extends woo$1 {
|
|
|
708
708
|
}
|
|
709
709
|
return result;
|
|
710
710
|
}
|
|
711
|
+
/**
|
|
712
|
+
* @method
|
|
713
|
+
* @name woo#fetchCurrencies
|
|
714
|
+
* @description fetches all available currencies on an exchange
|
|
715
|
+
* @see https://docs.woo.org/#available-token-public
|
|
716
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
717
|
+
* @returns {object} an associative dictionary of currencies
|
|
718
|
+
*/
|
|
711
719
|
async fetchCurrencies(params = {}) {
|
|
712
|
-
/**
|
|
713
|
-
* @method
|
|
714
|
-
* @name woo#fetchCurrencies
|
|
715
|
-
* @description fetches all available currencies on an exchange
|
|
716
|
-
* @see https://docs.woo.org/#available-token-public
|
|
717
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
718
|
-
* @returns {object} an associative dictionary of currencies
|
|
719
|
-
*/
|
|
720
720
|
const result = {};
|
|
721
721
|
const tokenResponse = await this.v1PublicGetToken(params);
|
|
722
722
|
//
|
|
@@ -845,17 +845,17 @@ class woo extends woo$1 {
|
|
|
845
845
|
}
|
|
846
846
|
return result;
|
|
847
847
|
}
|
|
848
|
+
/**
|
|
849
|
+
* @method
|
|
850
|
+
* @name woo#createMarketBuyOrderWithCost
|
|
851
|
+
* @description create a market buy order by providing the symbol and cost
|
|
852
|
+
* @see https://docs.woo.org/#send-order
|
|
853
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
854
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
855
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
856
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
857
|
+
*/
|
|
848
858
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
849
|
-
/**
|
|
850
|
-
* @method
|
|
851
|
-
* @name woo#createMarketBuyOrderWithCost
|
|
852
|
-
* @description create a market buy order by providing the symbol and cost
|
|
853
|
-
* @see https://docs.woo.org/#send-order
|
|
854
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
855
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
856
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
857
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
858
|
-
*/
|
|
859
859
|
await this.loadMarkets();
|
|
860
860
|
const market = this.market(symbol);
|
|
861
861
|
if (!market['spot']) {
|
|
@@ -863,17 +863,17 @@ class woo extends woo$1 {
|
|
|
863
863
|
}
|
|
864
864
|
return await this.createOrder(symbol, 'market', 'buy', cost, 1, params);
|
|
865
865
|
}
|
|
866
|
+
/**
|
|
867
|
+
* @method
|
|
868
|
+
* @name woo#createMarketSellOrderWithCost
|
|
869
|
+
* @description create a market sell order by providing the symbol and cost
|
|
870
|
+
* @see https://docs.woo.org/#send-order
|
|
871
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
872
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
873
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
874
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
875
|
+
*/
|
|
866
876
|
async createMarketSellOrderWithCost(symbol, cost, params = {}) {
|
|
867
|
-
/**
|
|
868
|
-
* @method
|
|
869
|
-
* @name woo#createMarketSellOrderWithCost
|
|
870
|
-
* @description create a market sell order by providing the symbol and cost
|
|
871
|
-
* @see https://docs.woo.org/#send-order
|
|
872
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
873
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
874
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
875
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
876
|
-
*/
|
|
877
877
|
await this.loadMarkets();
|
|
878
878
|
const market = this.market(symbol);
|
|
879
879
|
if (!market['spot']) {
|
|
@@ -881,22 +881,22 @@ class woo extends woo$1 {
|
|
|
881
881
|
}
|
|
882
882
|
return await this.createOrder(symbol, 'market', 'sell', cost, 1, params);
|
|
883
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* @method
|
|
886
|
+
* @name woo#createTrailingAmountOrder
|
|
887
|
+
* @description create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
|
888
|
+
* @see https://docs.woo.org/#send-algo-order
|
|
889
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
890
|
+
* @param {string} type 'market' or 'limit'
|
|
891
|
+
* @param {string} side 'buy' or 'sell'
|
|
892
|
+
* @param {float} amount how much you want to trade in units of the base currency, or number of contracts
|
|
893
|
+
* @param {float} [price] the price for the order to be filled at, in units of the quote currency, ignored in market orders
|
|
894
|
+
* @param {float} trailingAmount the quote amount to trail away from the current market price
|
|
895
|
+
* @param {float} trailingTriggerPrice the price to activate a trailing order, default uses the price argument
|
|
896
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
897
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
898
|
+
*/
|
|
884
899
|
async createTrailingAmountOrder(symbol, type, side, amount, price = undefined, trailingAmount = undefined, trailingTriggerPrice = undefined, params = {}) {
|
|
885
|
-
/**
|
|
886
|
-
* @method
|
|
887
|
-
* @name woo#createTrailingAmountOrder
|
|
888
|
-
* @description create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
|
889
|
-
* @see https://docs.woo.org/#send-algo-order
|
|
890
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
891
|
-
* @param {string} type 'market' or 'limit'
|
|
892
|
-
* @param {string} side 'buy' or 'sell'
|
|
893
|
-
* @param {float} amount how much you want to trade in units of the base currency, or number of contracts
|
|
894
|
-
* @param {float} [price] the price for the order to be filled at, in units of the quote currency, ignored in market orders
|
|
895
|
-
* @param {float} trailingAmount the quote amount to trail away from the current market price
|
|
896
|
-
* @param {float} trailingTriggerPrice the price to activate a trailing order, default uses the price argument
|
|
897
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
898
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
899
|
-
*/
|
|
900
900
|
if (trailingAmount === undefined) {
|
|
901
901
|
throw new errors.ArgumentsRequired(this.id + ' createTrailingAmountOrder() requires a trailingAmount argument');
|
|
902
902
|
}
|
|
@@ -907,22 +907,22 @@ class woo extends woo$1 {
|
|
|
907
907
|
params['trailingTriggerPrice'] = trailingTriggerPrice;
|
|
908
908
|
return await this.createOrder(symbol, type, side, amount, price, params);
|
|
909
909
|
}
|
|
910
|
+
/**
|
|
911
|
+
* @method
|
|
912
|
+
* @name woo#createTrailingPercentOrder
|
|
913
|
+
* @description create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
|
914
|
+
* @see https://docs.woo.org/#send-algo-order
|
|
915
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
916
|
+
* @param {string} type 'market' or 'limit'
|
|
917
|
+
* @param {string} side 'buy' or 'sell'
|
|
918
|
+
* @param {float} amount how much you want to trade in units of the base currency, or number of contracts
|
|
919
|
+
* @param {float} [price] the price for the order to be filled at, in units of the quote currency, ignored in market orders
|
|
920
|
+
* @param {float} trailingPercent the percent to trail away from the current market price
|
|
921
|
+
* @param {float} trailingTriggerPrice the price to activate a trailing order, default uses the price argument
|
|
922
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
923
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
924
|
+
*/
|
|
910
925
|
async createTrailingPercentOrder(symbol, type, side, amount, price = undefined, trailingPercent = undefined, trailingTriggerPrice = undefined, params = {}) {
|
|
911
|
-
/**
|
|
912
|
-
* @method
|
|
913
|
-
* @name woo#createTrailingPercentOrder
|
|
914
|
-
* @description create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
|
915
|
-
* @see https://docs.woo.org/#send-algo-order
|
|
916
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
917
|
-
* @param {string} type 'market' or 'limit'
|
|
918
|
-
* @param {string} side 'buy' or 'sell'
|
|
919
|
-
* @param {float} amount how much you want to trade in units of the base currency, or number of contracts
|
|
920
|
-
* @param {float} [price] the price for the order to be filled at, in units of the quote currency, ignored in market orders
|
|
921
|
-
* @param {float} trailingPercent the percent to trail away from the current market price
|
|
922
|
-
* @param {float} trailingTriggerPrice the price to activate a trailing order, default uses the price argument
|
|
923
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
924
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
925
|
-
*/
|
|
926
926
|
if (trailingPercent === undefined) {
|
|
927
927
|
throw new errors.ArgumentsRequired(this.id + ' createTrailingPercentOrder() requires a trailingPercent argument');
|
|
928
928
|
}
|
|
@@ -933,33 +933,33 @@ class woo extends woo$1 {
|
|
|
933
933
|
params['trailingTriggerPrice'] = trailingTriggerPrice;
|
|
934
934
|
return await this.createOrder(symbol, type, side, amount, price, params);
|
|
935
935
|
}
|
|
936
|
+
/**
|
|
937
|
+
* @method
|
|
938
|
+
* @name woo#createOrder
|
|
939
|
+
* @description create a trade order
|
|
940
|
+
* @see https://docs.woo.org/#send-order
|
|
941
|
+
* @see https://docs.woo.org/#send-algo-order
|
|
942
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
943
|
+
* @param {string} type 'market' or 'limit'
|
|
944
|
+
* @param {string} side 'buy' or 'sell'
|
|
945
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
946
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
947
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
948
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated', default 'cross'
|
|
949
|
+
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
950
|
+
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
|
|
951
|
+
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
952
|
+
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
|
|
953
|
+
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
954
|
+
* @param {float} [params.algoType] 'STOP' or 'TRAILING_STOP' or 'OCO' or 'CLOSE_POSITION'
|
|
955
|
+
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
956
|
+
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
957
|
+
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
958
|
+
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
959
|
+
* @param {string} [params.position_side] 'SHORT' or 'LONG' - if position mode is HEDGE_MODE and the trading involves futures, then is required, otherwise this parameter is not required
|
|
960
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
961
|
+
*/
|
|
936
962
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
937
|
-
/**
|
|
938
|
-
* @method
|
|
939
|
-
* @name woo#createOrder
|
|
940
|
-
* @description create a trade order
|
|
941
|
-
* @see https://docs.woo.org/#send-order
|
|
942
|
-
* @see https://docs.woo.org/#send-algo-order
|
|
943
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
944
|
-
* @param {string} type 'market' or 'limit'
|
|
945
|
-
* @param {string} side 'buy' or 'sell'
|
|
946
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
947
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
948
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
949
|
-
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated', default 'cross'
|
|
950
|
-
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
951
|
-
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
|
|
952
|
-
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
953
|
-
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
|
|
954
|
-
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
955
|
-
* @param {float} [params.algoType] 'STOP' or 'TRAILING_STOP' or 'OCO' or 'CLOSE_POSITION'
|
|
956
|
-
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
957
|
-
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
958
|
-
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
959
|
-
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
960
|
-
* @param {string} [params.position_side] 'SHORT' or 'LONG' - if position mode is HEDGE_MODE and the trading involves futures, then is required, otherwise this parameter is not required
|
|
961
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
962
|
-
*/
|
|
963
963
|
const reduceOnly = this.safeBool2(params, 'reduceOnly', 'reduce_only');
|
|
964
964
|
params = this.omit(params, ['reduceOnly', 'reduce_only']);
|
|
965
965
|
const orderType = type.toUpperCase();
|
|
@@ -1143,30 +1143,30 @@ class woo extends woo$1 {
|
|
|
1143
1143
|
};
|
|
1144
1144
|
return this.safeString(modes, mode, mode);
|
|
1145
1145
|
}
|
|
1146
|
+
/**
|
|
1147
|
+
* @method
|
|
1148
|
+
* @name woo#editOrder
|
|
1149
|
+
* @description edit a trade order
|
|
1150
|
+
* @see https://docs.woo.org/#edit-order
|
|
1151
|
+
* @see https://docs.woo.org/#edit-order-by-client_order_id
|
|
1152
|
+
* @see https://docs.woo.org/#edit-algo-order
|
|
1153
|
+
* @see https://docs.woo.org/#edit-algo-order-by-client_order_id
|
|
1154
|
+
* @param {string} id order id
|
|
1155
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1156
|
+
* @param {string} type 'market' or 'limit'
|
|
1157
|
+
* @param {string} side 'buy' or 'sell'
|
|
1158
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1159
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1160
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1161
|
+
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
1162
|
+
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
1163
|
+
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
1164
|
+
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
1165
|
+
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
1166
|
+
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
1167
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1168
|
+
*/
|
|
1146
1169
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1147
|
-
/**
|
|
1148
|
-
* @method
|
|
1149
|
-
* @name woo#editOrder
|
|
1150
|
-
* @description edit a trade order
|
|
1151
|
-
* @see https://docs.woo.org/#edit-order
|
|
1152
|
-
* @see https://docs.woo.org/#edit-order-by-client_order_id
|
|
1153
|
-
* @see https://docs.woo.org/#edit-algo-order
|
|
1154
|
-
* @see https://docs.woo.org/#edit-algo-order-by-client_order_id
|
|
1155
|
-
* @param {string} id order id
|
|
1156
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1157
|
-
* @param {string} type 'market' or 'limit'
|
|
1158
|
-
* @param {string} side 'buy' or 'sell'
|
|
1159
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1160
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1161
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1162
|
-
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
1163
|
-
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
1164
|
-
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
1165
|
-
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
1166
|
-
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
1167
|
-
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
1168
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1169
|
-
*/
|
|
1170
1170
|
await this.loadMarkets();
|
|
1171
1171
|
const market = this.market(symbol);
|
|
1172
1172
|
const request = {
|
|
@@ -1240,20 +1240,20 @@ class woo extends woo$1 {
|
|
|
1240
1240
|
const data = this.safeDict(response, 'data', {});
|
|
1241
1241
|
return this.parseOrder(data, market);
|
|
1242
1242
|
}
|
|
1243
|
+
/**
|
|
1244
|
+
* @method
|
|
1245
|
+
* @name woo#cancelOrder
|
|
1246
|
+
* @see https://docs.woo.org/#cancel-algo-order
|
|
1247
|
+
* @see https://docs.woo.org/#cancel-order
|
|
1248
|
+
* @see https://docs.woo.org/#cancel-order-by-client_order_id
|
|
1249
|
+
* @description cancels an open order
|
|
1250
|
+
* @param {string} id order id
|
|
1251
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1252
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1253
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1254
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1255
|
+
*/
|
|
1243
1256
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1244
|
-
/**
|
|
1245
|
-
* @method
|
|
1246
|
-
* @name woo#cancelOrder
|
|
1247
|
-
* @see https://docs.woo.org/#cancel-algo-order
|
|
1248
|
-
* @see https://docs.woo.org/#cancel-order
|
|
1249
|
-
* @see https://docs.woo.org/#cancel-order-by-client_order_id
|
|
1250
|
-
* @description cancels an open order
|
|
1251
|
-
* @param {string} id order id
|
|
1252
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1253
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1254
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1255
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1256
|
-
*/
|
|
1257
1257
|
const stop = this.safeBool(params, 'stop', false);
|
|
1258
1258
|
params = this.omit(params, 'stop');
|
|
1259
1259
|
if (!stop && (symbol === undefined)) {
|
|
@@ -1297,19 +1297,19 @@ class woo extends woo$1 {
|
|
|
1297
1297
|
}
|
|
1298
1298
|
return this.extend(this.parseOrder(response), extendParams);
|
|
1299
1299
|
}
|
|
1300
|
+
/**
|
|
1301
|
+
* @method
|
|
1302
|
+
* @name woo#cancelAllOrders
|
|
1303
|
+
* @see https://docs.woo.org/#cancel-all-pending-orders
|
|
1304
|
+
* @see https://docs.woo.org/#cancel-orders
|
|
1305
|
+
* @see https://docs.woo.org/#cancel-all-pending-algo-orders
|
|
1306
|
+
* @description cancel all open orders in a market
|
|
1307
|
+
* @param {string} symbol unified market symbol
|
|
1308
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1309
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1310
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1311
|
+
*/
|
|
1300
1312
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1301
|
-
/**
|
|
1302
|
-
* @method
|
|
1303
|
-
* @name woo#cancelAllOrders
|
|
1304
|
-
* @see https://docs.woo.org/#cancel-all-pending-orders
|
|
1305
|
-
* @see https://docs.woo.org/#cancel-orders
|
|
1306
|
-
* @see https://docs.woo.org/#cancel-all-pending-algo-orders
|
|
1307
|
-
* @description cancel all open orders in a market
|
|
1308
|
-
* @param {string} symbol unified market symbol
|
|
1309
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1310
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1311
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1312
|
-
*/
|
|
1313
1313
|
await this.loadMarkets();
|
|
1314
1314
|
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
1315
1315
|
params = this.omit(params, ['stop', 'trigger']);
|
|
@@ -1334,17 +1334,16 @@ class woo extends woo$1 {
|
|
|
1334
1334
|
this.safeOrder(response),
|
|
1335
1335
|
];
|
|
1336
1336
|
}
|
|
1337
|
+
/**
|
|
1338
|
+
* @method
|
|
1339
|
+
* @name woo#cancelAllOrdersAfter
|
|
1340
|
+
* @description dead man's switch, cancel all orders after the given timeout
|
|
1341
|
+
* @see https://docs.woo.org/#cancel-all-after
|
|
1342
|
+
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
1343
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1344
|
+
* @returns {object} the api result
|
|
1345
|
+
*/
|
|
1337
1346
|
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
1338
|
-
/**
|
|
1339
|
-
* @method
|
|
1340
|
-
* @name woo#cancelAllOrdersAfter
|
|
1341
|
-
* @description dead man's switch, cancel all orders after the given timeout
|
|
1342
|
-
* @see https://docs.woo.org/#cancel-all-after
|
|
1343
|
-
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
1344
|
-
* @param {boolean} activated countdown
|
|
1345
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1346
|
-
* @returns {object} the api result
|
|
1347
|
-
*/
|
|
1348
1347
|
await this.loadMarkets();
|
|
1349
1348
|
const request = {
|
|
1350
1349
|
'trigger_after': (timeout > 0) ? timeout : 0,
|
|
@@ -1363,19 +1362,19 @@ class woo extends woo$1 {
|
|
|
1363
1362
|
this.safeOrder(response),
|
|
1364
1363
|
];
|
|
1365
1364
|
}
|
|
1365
|
+
/**
|
|
1366
|
+
* @method
|
|
1367
|
+
* @name woo#fetchOrder
|
|
1368
|
+
* @see https://docs.woo.org/#get-algo-order
|
|
1369
|
+
* @see https://docs.woo.org/#get-order
|
|
1370
|
+
* @description fetches information on an order made by the user
|
|
1371
|
+
* @param {string} id the order id
|
|
1372
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1373
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1374
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1375
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1376
|
+
*/
|
|
1366
1377
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1367
|
-
/**
|
|
1368
|
-
* @method
|
|
1369
|
-
* @name woo#fetchOrder
|
|
1370
|
-
* @see https://docs.woo.org/#get-algo-order
|
|
1371
|
-
* @see https://docs.woo.org/#get-order
|
|
1372
|
-
* @description fetches information on an order made by the user
|
|
1373
|
-
* @param {string} id the order id
|
|
1374
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1375
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1376
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1377
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1378
|
-
*/
|
|
1379
1378
|
await this.loadMarkets();
|
|
1380
1379
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
1381
1380
|
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
@@ -1433,24 +1432,24 @@ class woo extends woo$1 {
|
|
|
1433
1432
|
const orders = this.safeDict(response, 'data', response);
|
|
1434
1433
|
return this.parseOrder(orders, market);
|
|
1435
1434
|
}
|
|
1435
|
+
/**
|
|
1436
|
+
* @method
|
|
1437
|
+
* @name woo#fetchOrders
|
|
1438
|
+
* @description fetches information on multiple orders made by the user
|
|
1439
|
+
* @see https://docs.woo.org/#get-orders
|
|
1440
|
+
* @see https://docs.woo.org/#get-algo-orders
|
|
1441
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1442
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1443
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1444
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1445
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1446
|
+
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1447
|
+
* @param {string} [params.side] 'buy' or 'sell'
|
|
1448
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1449
|
+
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1450
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1451
|
+
*/
|
|
1436
1452
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1437
|
-
/**
|
|
1438
|
-
* @method
|
|
1439
|
-
* @name woo#fetchOrders
|
|
1440
|
-
* @description fetches information on multiple orders made by the user
|
|
1441
|
-
* @see https://docs.woo.org/#get-orders
|
|
1442
|
-
* @see https://docs.woo.org/#get-algo-orders
|
|
1443
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1444
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1445
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1446
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1447
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1448
|
-
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1449
|
-
* @param {string} [params.side] 'buy' or 'sell'
|
|
1450
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1451
|
-
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1452
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1453
|
-
*/
|
|
1454
1453
|
await this.loadMarkets();
|
|
1455
1454
|
let paginate = false;
|
|
1456
1455
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOrders', 'paginate');
|
|
@@ -1528,46 +1527,46 @@ class woo extends woo$1 {
|
|
|
1528
1527
|
const orders = this.safeList(data, 'rows');
|
|
1529
1528
|
return this.parseOrders(orders, market, since, limit);
|
|
1530
1529
|
}
|
|
1530
|
+
/**
|
|
1531
|
+
* @method
|
|
1532
|
+
* @name woo#fetchOpenOrders
|
|
1533
|
+
* @description fetches information on multiple orders made by the user
|
|
1534
|
+
* @see https://docs.woo.org/#get-orders
|
|
1535
|
+
* @see https://docs.woo.org/#get-algo-orders
|
|
1536
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1537
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1538
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1539
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1540
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1541
|
+
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1542
|
+
* @param {string} [params.side] 'buy' or 'sell'
|
|
1543
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1544
|
+
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1545
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1546
|
+
*/
|
|
1531
1547
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1532
|
-
/**
|
|
1533
|
-
* @method
|
|
1534
|
-
* @name woo#fetchOpenOrders
|
|
1535
|
-
* @description fetches information on multiple orders made by the user
|
|
1536
|
-
* @see https://docs.woo.org/#get-orders
|
|
1537
|
-
* @see https://docs.woo.org/#get-algo-orders
|
|
1538
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1539
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1540
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1541
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1542
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1543
|
-
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1544
|
-
* @param {string} [params.side] 'buy' or 'sell'
|
|
1545
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1546
|
-
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1547
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1548
|
-
*/
|
|
1549
1548
|
await this.loadMarkets();
|
|
1550
1549
|
const extendedParams = this.extend(params, { 'status': 'INCOMPLETE' });
|
|
1551
1550
|
return await this.fetchOrders(symbol, since, limit, extendedParams);
|
|
1552
1551
|
}
|
|
1552
|
+
/**
|
|
1553
|
+
* @method
|
|
1554
|
+
* @name woo#fetchClosedOrders
|
|
1555
|
+
* @description fetches information on multiple orders made by the user
|
|
1556
|
+
* @see https://docs.woo.org/#get-orders
|
|
1557
|
+
* @see https://docs.woo.org/#get-algo-orders
|
|
1558
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1559
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1560
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1561
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1562
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1563
|
+
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1564
|
+
* @param {string} [params.side] 'buy' or 'sell'
|
|
1565
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1566
|
+
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1567
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1568
|
+
*/
|
|
1553
1569
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1554
|
-
/**
|
|
1555
|
-
* @method
|
|
1556
|
-
* @name woo#fetchClosedOrders
|
|
1557
|
-
* @description fetches information on multiple orders made by the user
|
|
1558
|
-
* @see https://docs.woo.org/#get-orders
|
|
1559
|
-
* @see https://docs.woo.org/#get-algo-orders
|
|
1560
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1561
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1562
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1563
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1564
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1565
|
-
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1566
|
-
* @param {string} [params.side] 'buy' or 'sell'
|
|
1567
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1568
|
-
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1569
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1570
|
-
*/
|
|
1571
1570
|
await this.loadMarkets();
|
|
1572
1571
|
const extendedParams = this.extend(params, { 'status': 'COMPLETED' });
|
|
1573
1572
|
return await this.fetchOrders(symbol, since, limit, extendedParams);
|
|
@@ -1708,17 +1707,17 @@ class woo extends woo$1 {
|
|
|
1708
1707
|
}
|
|
1709
1708
|
return status;
|
|
1710
1709
|
}
|
|
1710
|
+
/**
|
|
1711
|
+
* @method
|
|
1712
|
+
* @name woo#fetchOrderBook
|
|
1713
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1714
|
+
* @see https://docs.woo.org/#orderbook-snapshot-public
|
|
1715
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1716
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1717
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1718
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1719
|
+
*/
|
|
1711
1720
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1712
|
-
/**
|
|
1713
|
-
* @method
|
|
1714
|
-
* @name woo#fetchOrderBook
|
|
1715
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1716
|
-
* @see https://docs.woo.org/#orderbook-snapshot-public
|
|
1717
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1718
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1719
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1720
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1721
|
-
*/
|
|
1722
1721
|
await this.loadMarkets();
|
|
1723
1722
|
const market = this.market(symbol);
|
|
1724
1723
|
const request = {
|
|
@@ -1748,20 +1747,20 @@ class woo extends woo$1 {
|
|
|
1748
1747
|
const timestamp = this.safeInteger(response, 'timestamp');
|
|
1749
1748
|
return this.parseOrderBook(response, symbol, timestamp, 'bids', 'asks', 'price', 'quantity');
|
|
1750
1749
|
}
|
|
1750
|
+
/**
|
|
1751
|
+
* @method
|
|
1752
|
+
* @name woo#fetchOHLCV
|
|
1753
|
+
* @see https://docs.woo.org/#kline-public
|
|
1754
|
+
* @see https://docs.woo.org/#kline-historical-data-public
|
|
1755
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1756
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1757
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1758
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1759
|
+
* @param {int} [limit] max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
|
|
1760
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1761
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1762
|
+
*/
|
|
1751
1763
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1752
|
-
/**
|
|
1753
|
-
* @method
|
|
1754
|
-
* @name woo#fetchOHLCV
|
|
1755
|
-
* @see https://docs.woo.org/#kline-public
|
|
1756
|
-
* @see https://docs.woo.org/#kline-historical-data-public
|
|
1757
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1758
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1759
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1760
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1761
|
-
* @param {int} [limit] max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
|
|
1762
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1763
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1764
|
-
*/
|
|
1765
1764
|
await this.loadMarkets();
|
|
1766
1765
|
const market = this.market(symbol);
|
|
1767
1766
|
const request = {
|
|
@@ -1844,19 +1843,19 @@ class woo extends woo$1 {
|
|
|
1844
1843
|
this.safeNumber(ohlcv, 'volume'),
|
|
1845
1844
|
];
|
|
1846
1845
|
}
|
|
1846
|
+
/**
|
|
1847
|
+
* @method
|
|
1848
|
+
* @name woo#fetchOrderTrades
|
|
1849
|
+
* @description fetch all the trades made from a single order
|
|
1850
|
+
* @see https://docs.woo.org/#get-trades
|
|
1851
|
+
* @param {string} id order id
|
|
1852
|
+
* @param {string} symbol unified market symbol
|
|
1853
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1854
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1855
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1856
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1857
|
+
*/
|
|
1847
1858
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1848
|
-
/**
|
|
1849
|
-
* @method
|
|
1850
|
-
* @name woo#fetchOrderTrades
|
|
1851
|
-
* @description fetch all the trades made from a single order
|
|
1852
|
-
* @see https://docs.woo.org/#get-trades
|
|
1853
|
-
* @param {string} id order id
|
|
1854
|
-
* @param {string} symbol unified market symbol
|
|
1855
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1856
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1857
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1858
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1859
|
-
*/
|
|
1860
1859
|
await this.loadMarkets();
|
|
1861
1860
|
let market = undefined;
|
|
1862
1861
|
if (symbol !== undefined) {
|
|
@@ -1887,19 +1886,19 @@ class woo extends woo$1 {
|
|
|
1887
1886
|
const trades = this.safeList(response, 'rows', []);
|
|
1888
1887
|
return this.parseTrades(trades, market, since, limit, params);
|
|
1889
1888
|
}
|
|
1889
|
+
/**
|
|
1890
|
+
* @method
|
|
1891
|
+
* @name woo#fetchMyTrades
|
|
1892
|
+
* @description fetch all trades made by the user
|
|
1893
|
+
* @see https://docs.woo.org/#get-trades
|
|
1894
|
+
* @param {string} symbol unified market symbol
|
|
1895
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1896
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1897
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1898
|
+
* @param {boolean} [params.paginate] set to true if you want to fetch trades with pagination
|
|
1899
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1900
|
+
*/
|
|
1890
1901
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1891
|
-
/**
|
|
1892
|
-
* @method
|
|
1893
|
-
* @name woo#fetchMyTrades
|
|
1894
|
-
* @description fetch all trades made by the user
|
|
1895
|
-
* @see https://docs.woo.org/#get-trades
|
|
1896
|
-
* @param {string} symbol unified market symbol
|
|
1897
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1898
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1899
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1900
|
-
* @param {boolean} [params.paginate] set to true if you want to fetch trades with pagination
|
|
1901
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1902
|
-
*/
|
|
1903
1902
|
await this.loadMarkets();
|
|
1904
1903
|
let paginate = false;
|
|
1905
1904
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
|
|
@@ -1948,15 +1947,15 @@ class woo extends woo$1 {
|
|
|
1948
1947
|
const trades = this.safeList(response, 'rows', []);
|
|
1949
1948
|
return this.parseTrades(trades, market, since, limit, params);
|
|
1950
1949
|
}
|
|
1950
|
+
/**
|
|
1951
|
+
* @method
|
|
1952
|
+
* @name woo#fetchAccounts
|
|
1953
|
+
* @description fetch all the accounts associated with a profile
|
|
1954
|
+
* @see https://docs.woo.org/#get-assets-of-subaccounts
|
|
1955
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1956
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
1957
|
+
*/
|
|
1951
1958
|
async fetchAccounts(params = {}) {
|
|
1952
|
-
/**
|
|
1953
|
-
* @method
|
|
1954
|
-
* @name woo#fetchAccounts
|
|
1955
|
-
* @description fetch all the accounts associated with a profile
|
|
1956
|
-
* @see https://docs.woo.org/#get-assets-of-subaccounts
|
|
1957
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1958
|
-
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
1959
|
-
*/
|
|
1960
1959
|
const response = await this.v1PrivateGetSubAccountAssets(params);
|
|
1961
1960
|
//
|
|
1962
1961
|
// {
|
|
@@ -1994,15 +1993,15 @@ class woo extends woo$1 {
|
|
|
1994
1993
|
'type': accountId === 'Main' ? 'main' : 'subaccount',
|
|
1995
1994
|
};
|
|
1996
1995
|
}
|
|
1996
|
+
/**
|
|
1997
|
+
* @method
|
|
1998
|
+
* @name woo#fetchBalance
|
|
1999
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2000
|
+
* @see https://docs.woo.org/#get-current-holding-get-balance-new
|
|
2001
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2002
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2003
|
+
*/
|
|
1997
2004
|
async fetchBalance(params = {}) {
|
|
1998
|
-
/**
|
|
1999
|
-
* @method
|
|
2000
|
-
* @name woo#fetchBalance
|
|
2001
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2002
|
-
* @see https://docs.woo.org/#get-current-holding-get-balance-new
|
|
2003
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2004
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2005
|
-
*/
|
|
2006
2005
|
await this.loadMarkets();
|
|
2007
2006
|
const response = await this.v3PrivateGetBalances(params);
|
|
2008
2007
|
//
|
|
@@ -2046,16 +2045,16 @@ class woo extends woo$1 {
|
|
|
2046
2045
|
}
|
|
2047
2046
|
return this.safeBalance(result);
|
|
2048
2047
|
}
|
|
2048
|
+
/**
|
|
2049
|
+
* @method
|
|
2050
|
+
* @name woo#fetchDepositAddress
|
|
2051
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
2052
|
+
* @see https://docs.woo.org/#get-token-deposit-address
|
|
2053
|
+
* @param {string} code unified currency code
|
|
2054
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2055
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2056
|
+
*/
|
|
2049
2057
|
async fetchDepositAddress(code, params = {}) {
|
|
2050
|
-
/**
|
|
2051
|
-
* @method
|
|
2052
|
-
* @name woo#fetchDepositAddress
|
|
2053
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
2054
|
-
* @see https://docs.woo.org/#get-token-deposit-address
|
|
2055
|
-
* @param {string} code unified currency code
|
|
2056
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2057
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2058
|
-
*/
|
|
2059
2058
|
// this method is TODO because of networks unification
|
|
2060
2059
|
await this.loadMarkets();
|
|
2061
2060
|
const currency = this.currency(code);
|
|
@@ -2139,18 +2138,18 @@ class woo extends woo$1 {
|
|
|
2139
2138
|
// }
|
|
2140
2139
|
return [currency, this.safeList(response, 'rows', [])];
|
|
2141
2140
|
}
|
|
2141
|
+
/**
|
|
2142
|
+
* @method
|
|
2143
|
+
* @name woo#fetchLedger
|
|
2144
|
+
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2145
|
+
* @see https://docs.woo.org/#get-asset-history
|
|
2146
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2147
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2148
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2149
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2150
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2151
|
+
*/
|
|
2142
2152
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2143
|
-
/**
|
|
2144
|
-
* @method
|
|
2145
|
-
* @name woo#fetchLedger
|
|
2146
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2147
|
-
* @see https://docs.woo.org/#get-asset-history
|
|
2148
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
2149
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2150
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2151
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2152
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2153
|
-
*/
|
|
2154
2153
|
const [currency, rows] = await this.getAssetHistoryRows(code, since, limit, params);
|
|
2155
2154
|
return this.parseLedger(rows, currency, since, limit, params);
|
|
2156
2155
|
}
|
|
@@ -2205,52 +2204,52 @@ class woo extends woo$1 {
|
|
|
2205
2204
|
}
|
|
2206
2205
|
return currency;
|
|
2207
2206
|
}
|
|
2207
|
+
/**
|
|
2208
|
+
* @method
|
|
2209
|
+
* @name woo#fetchDeposits
|
|
2210
|
+
* @description fetch all deposits made to an account
|
|
2211
|
+
* @see https://docs.woo.org/#get-asset-history
|
|
2212
|
+
* @param {string} code unified currency code
|
|
2213
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2214
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2215
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2216
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2217
|
+
*/
|
|
2208
2218
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2209
|
-
/**
|
|
2210
|
-
* @method
|
|
2211
|
-
* @name woo#fetchDeposits
|
|
2212
|
-
* @description fetch all deposits made to an account
|
|
2213
|
-
* @see https://docs.woo.org/#get-asset-history
|
|
2214
|
-
* @param {string} code unified currency code
|
|
2215
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2216
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2217
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2218
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2219
|
-
*/
|
|
2220
2219
|
const request = {
|
|
2221
2220
|
'token_side': 'DEPOSIT',
|
|
2222
2221
|
};
|
|
2223
2222
|
return await this.fetchDepositsWithdrawals(code, since, limit, this.extend(request, params));
|
|
2224
2223
|
}
|
|
2224
|
+
/**
|
|
2225
|
+
* @method
|
|
2226
|
+
* @name woo#fetchWithdrawals
|
|
2227
|
+
* @description fetch all withdrawals made from an account
|
|
2228
|
+
* @see https://docs.woo.org/#get-asset-history
|
|
2229
|
+
* @param {string} code unified currency code
|
|
2230
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2231
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2232
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2233
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2234
|
+
*/
|
|
2225
2235
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2226
|
-
/**
|
|
2227
|
-
* @method
|
|
2228
|
-
* @name woo#fetchWithdrawals
|
|
2229
|
-
* @description fetch all withdrawals made from an account
|
|
2230
|
-
* @see https://docs.woo.org/#get-asset-history
|
|
2231
|
-
* @param {string} code unified currency code
|
|
2232
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2233
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2234
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2235
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2236
|
-
*/
|
|
2237
2236
|
const request = {
|
|
2238
2237
|
'token_side': 'WITHDRAW',
|
|
2239
2238
|
};
|
|
2240
2239
|
return await this.fetchDepositsWithdrawals(code, since, limit, this.extend(request, params));
|
|
2241
2240
|
}
|
|
2241
|
+
/**
|
|
2242
|
+
* @method
|
|
2243
|
+
* @name woo#fetchDepositsWithdrawals
|
|
2244
|
+
* @description fetch history of deposits and withdrawals
|
|
2245
|
+
* @see https://docs.woo.org/#get-asset-history
|
|
2246
|
+
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
2247
|
+
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2248
|
+
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2249
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2250
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2251
|
+
*/
|
|
2242
2252
|
async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2243
|
-
/**
|
|
2244
|
-
* @method
|
|
2245
|
-
* @name woo#fetchDepositsWithdrawals
|
|
2246
|
-
* @description fetch history of deposits and withdrawals
|
|
2247
|
-
* @see https://docs.woo.org/#get-asset-history
|
|
2248
|
-
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
2249
|
-
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2250
|
-
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2251
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2252
|
-
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2253
|
-
*/
|
|
2254
2253
|
const request = {
|
|
2255
2254
|
'type': 'BALANCE',
|
|
2256
2255
|
};
|
|
@@ -2314,19 +2313,19 @@ class woo extends woo$1 {
|
|
|
2314
2313
|
};
|
|
2315
2314
|
return this.safeString(statuses, status, status);
|
|
2316
2315
|
}
|
|
2316
|
+
/**
|
|
2317
|
+
* @method
|
|
2318
|
+
* @name woo#transfer
|
|
2319
|
+
* @description transfer currency internally between wallets on the same account
|
|
2320
|
+
* @see https://docs.woo.org/#get-transfer-history
|
|
2321
|
+
* @param {string} code unified currency code
|
|
2322
|
+
* @param {float} amount amount to transfer
|
|
2323
|
+
* @param {string} fromAccount account to transfer from
|
|
2324
|
+
* @param {string} toAccount account to transfer to
|
|
2325
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2326
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2327
|
+
*/
|
|
2317
2328
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
2318
|
-
/**
|
|
2319
|
-
* @method
|
|
2320
|
-
* @name woo#transfer
|
|
2321
|
-
* @description transfer currency internally between wallets on the same account
|
|
2322
|
-
* @see https://docs.woo.org/#get-transfer-history
|
|
2323
|
-
* @param {string} code unified currency code
|
|
2324
|
-
* @param {float} amount amount to transfer
|
|
2325
|
-
* @param {string} fromAccount account to transfer from
|
|
2326
|
-
* @param {string} toAccount account to transfer to
|
|
2327
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2328
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2329
|
-
*/
|
|
2330
2329
|
await this.loadMarkets();
|
|
2331
2330
|
const currency = this.currency(code);
|
|
2332
2331
|
const request = {
|
|
@@ -2352,19 +2351,19 @@ class woo extends woo$1 {
|
|
|
2352
2351
|
}
|
|
2353
2352
|
return transfer;
|
|
2354
2353
|
}
|
|
2354
|
+
/**
|
|
2355
|
+
* @method
|
|
2356
|
+
* @name woo#fetchTransfers
|
|
2357
|
+
* @description fetch a history of internal transfers made on an account
|
|
2358
|
+
* @see https://docs.woo.org/#get-transfer-history
|
|
2359
|
+
* @param {string} code unified currency code of the currency transferred
|
|
2360
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2361
|
+
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2362
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2363
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2364
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2365
|
+
*/
|
|
2355
2366
|
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2356
|
-
/**
|
|
2357
|
-
* @method
|
|
2358
|
-
* @name woo#fetchTransfers
|
|
2359
|
-
* @description fetch a history of internal transfers made on an account
|
|
2360
|
-
* @see https://docs.woo.org/#get-transfer-history
|
|
2361
|
-
* @param {string} code unified currency code of the currency transferred
|
|
2362
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2363
|
-
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2364
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2365
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2366
|
-
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2367
|
-
*/
|
|
2368
2367
|
const request = {};
|
|
2369
2368
|
if (limit !== undefined) {
|
|
2370
2369
|
request['size'] = limit;
|
|
@@ -2458,19 +2457,19 @@ class woo extends woo$1 {
|
|
|
2458
2457
|
};
|
|
2459
2458
|
return this.safeString(statuses, status, status);
|
|
2460
2459
|
}
|
|
2460
|
+
/**
|
|
2461
|
+
* @method
|
|
2462
|
+
* @name woo#withdraw
|
|
2463
|
+
* @description make a withdrawal
|
|
2464
|
+
* @see https://docs.woo.org/#token-withdraw
|
|
2465
|
+
* @param {string} code unified currency code
|
|
2466
|
+
* @param {float} amount the amount to withdraw
|
|
2467
|
+
* @param {string} address the address to withdraw to
|
|
2468
|
+
* @param {string} tag
|
|
2469
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2470
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2471
|
+
*/
|
|
2461
2472
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2462
|
-
/**
|
|
2463
|
-
* @method
|
|
2464
|
-
* @name woo#withdraw
|
|
2465
|
-
* @description make a withdrawal
|
|
2466
|
-
* @see https://docs.woo.org/#token-withdraw
|
|
2467
|
-
* @param {string} code unified currency code
|
|
2468
|
-
* @param {float} amount the amount to withdraw
|
|
2469
|
-
* @param {string} address the address to withdraw to
|
|
2470
|
-
* @param {string} tag
|
|
2471
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2472
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2473
|
-
*/
|
|
2474
2473
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2475
2474
|
await this.loadMarkets();
|
|
2476
2475
|
this.checkAddress(address);
|
|
@@ -2501,18 +2500,18 @@ class woo extends woo$1 {
|
|
|
2501
2500
|
//
|
|
2502
2501
|
return this.parseTransaction(response, currency);
|
|
2503
2502
|
}
|
|
2503
|
+
/**
|
|
2504
|
+
* @method
|
|
2505
|
+
* @name woo#repayMargin
|
|
2506
|
+
* @description repay borrowed margin and interest
|
|
2507
|
+
* @see https://docs.woo.org/#repay-interest
|
|
2508
|
+
* @param {string} code unified currency code of the currency to repay
|
|
2509
|
+
* @param {float} amount the amount to repay
|
|
2510
|
+
* @param {string} symbol not used by woo.repayMargin ()
|
|
2511
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2512
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
2513
|
+
*/
|
|
2504
2514
|
async repayMargin(code, amount, symbol = undefined, params = {}) {
|
|
2505
|
-
/**
|
|
2506
|
-
* @method
|
|
2507
|
-
* @name woo#repayMargin
|
|
2508
|
-
* @description repay borrowed margin and interest
|
|
2509
|
-
* @see https://docs.woo.org/#repay-interest
|
|
2510
|
-
* @param {string} code unified currency code of the currency to repay
|
|
2511
|
-
* @param {float} amount the amount to repay
|
|
2512
|
-
* @param {string} symbol not used by woo.repayMargin ()
|
|
2513
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2514
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
2515
|
-
*/
|
|
2516
2515
|
await this.loadMarkets();
|
|
2517
2516
|
let market = undefined;
|
|
2518
2517
|
if (symbol !== undefined) {
|
|
@@ -2682,19 +2681,19 @@ class woo extends woo$1 {
|
|
|
2682
2681
|
'rate': rate,
|
|
2683
2682
|
};
|
|
2684
2683
|
}
|
|
2684
|
+
/**
|
|
2685
|
+
* @method
|
|
2686
|
+
* @name woo#fetchFundingHistory
|
|
2687
|
+
* @description fetch the history of funding payments paid and received on this account
|
|
2688
|
+
* @see https://docs.woo.org/#get-funding-fee-history
|
|
2689
|
+
* @param {string} [symbol] unified market symbol
|
|
2690
|
+
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
2691
|
+
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
2692
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2693
|
+
* @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)
|
|
2694
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
2695
|
+
*/
|
|
2685
2696
|
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2686
|
-
/**
|
|
2687
|
-
* @method
|
|
2688
|
-
* @name woo#fetchFundingHistory
|
|
2689
|
-
* @description fetch the history of funding payments paid and received on this account
|
|
2690
|
-
* @see https://docs.woo.org/#get-funding-fee-history
|
|
2691
|
-
* @param {string} [symbol] unified market symbol
|
|
2692
|
-
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
2693
|
-
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
2694
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2695
|
-
* @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)
|
|
2696
|
-
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
2697
|
-
*/
|
|
2698
2697
|
await this.loadMarkets();
|
|
2699
2698
|
let paginate = false;
|
|
2700
2699
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingHistory', 'paginate');
|
|
@@ -2793,28 +2792,28 @@ class woo extends woo$1 {
|
|
|
2793
2792
|
'interval': intervalString + 'h',
|
|
2794
2793
|
};
|
|
2795
2794
|
}
|
|
2795
|
+
/**
|
|
2796
|
+
* @method
|
|
2797
|
+
* @name woo#fetchFundingInterval
|
|
2798
|
+
* @description fetch the current funding rate interval
|
|
2799
|
+
* @see https://docs.woox.io/#get-predicted-funding-rate-for-one-market-public
|
|
2800
|
+
* @param {string} symbol unified market symbol
|
|
2801
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2802
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2803
|
+
*/
|
|
2796
2804
|
async fetchFundingInterval(symbol, params = {}) {
|
|
2797
|
-
/**
|
|
2798
|
-
* @method
|
|
2799
|
-
* @name woo#fetchFundingInterval
|
|
2800
|
-
* @description fetch the current funding rate interval
|
|
2801
|
-
* @see https://docs.woox.io/#get-predicted-funding-rate-for-one-market-public
|
|
2802
|
-
* @param {string} symbol unified market symbol
|
|
2803
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2804
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2805
|
-
*/
|
|
2806
2805
|
return await this.fetchFundingRate(symbol, params);
|
|
2807
2806
|
}
|
|
2807
|
+
/**
|
|
2808
|
+
* @method
|
|
2809
|
+
* @name woo#fetchFundingRate
|
|
2810
|
+
* @description fetch the current funding rate
|
|
2811
|
+
* @see https://docs.woox.io/#get-predicted-funding-rate-for-one-market-public
|
|
2812
|
+
* @param {string} symbol unified market symbol
|
|
2813
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2814
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2815
|
+
*/
|
|
2808
2816
|
async fetchFundingRate(symbol, params = {}) {
|
|
2809
|
-
/**
|
|
2810
|
-
* @method
|
|
2811
|
-
* @name woo#fetchFundingRate
|
|
2812
|
-
* @description fetch the current funding rate
|
|
2813
|
-
* @see https://docs.woox.io/#get-predicted-funding-rate-for-one-market-public
|
|
2814
|
-
* @param {string} symbol unified market symbol
|
|
2815
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2816
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2817
|
-
*/
|
|
2818
2817
|
await this.loadMarkets();
|
|
2819
2818
|
const market = this.market(symbol);
|
|
2820
2819
|
const request = {
|
|
@@ -2837,16 +2836,16 @@ class woo extends woo$1 {
|
|
|
2837
2836
|
//
|
|
2838
2837
|
return this.parseFundingRate(response, market);
|
|
2839
2838
|
}
|
|
2839
|
+
/**
|
|
2840
|
+
* @method
|
|
2841
|
+
* @name woo#fetchFundingRates
|
|
2842
|
+
* @description fetch the funding rate for multiple markets
|
|
2843
|
+
* @see https://docs.woox.io/#get-predicted-funding-rate-for-all-markets-public
|
|
2844
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2845
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2846
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
2847
|
+
*/
|
|
2840
2848
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
2841
|
-
/**
|
|
2842
|
-
* @method
|
|
2843
|
-
* @name woo#fetchFundingRates
|
|
2844
|
-
* @description fetch the funding rate for multiple markets
|
|
2845
|
-
* @see https://docs.woox.io/#get-predicted-funding-rate-for-all-markets-public
|
|
2846
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2847
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2848
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
2849
|
-
*/
|
|
2850
2849
|
await this.loadMarkets();
|
|
2851
2850
|
symbols = this.marketSymbols(symbols);
|
|
2852
2851
|
const response = await this.v1PublicGetFundingRates(params);
|
|
@@ -2870,20 +2869,20 @@ class woo extends woo$1 {
|
|
|
2870
2869
|
const result = this.parseFundingRates(rows);
|
|
2871
2870
|
return this.filterByArray(result, 'symbol', symbols);
|
|
2872
2871
|
}
|
|
2872
|
+
/**
|
|
2873
|
+
* @method
|
|
2874
|
+
* @name woo#fetchFundingRateHistory
|
|
2875
|
+
* @description fetches historical funding rate prices
|
|
2876
|
+
* @see https://docs.woo.org/#get-funding-rate-history-for-one-market-public
|
|
2877
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2878
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2879
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2880
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2881
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2882
|
+
* @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)
|
|
2883
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2884
|
+
*/
|
|
2873
2885
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2874
|
-
/**
|
|
2875
|
-
* @method
|
|
2876
|
-
* @name woo#fetchFundingRateHistory
|
|
2877
|
-
* @description fetches historical funding rate prices
|
|
2878
|
-
* @see https://docs.woo.org/#get-funding-rate-history-for-one-market-public
|
|
2879
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2880
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2881
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2882
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2883
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2884
|
-
* @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)
|
|
2885
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2886
|
-
*/
|
|
2887
2886
|
await this.loadMarkets();
|
|
2888
2887
|
let paginate = false;
|
|
2889
2888
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
@@ -2937,17 +2936,17 @@ class woo extends woo$1 {
|
|
|
2937
2936
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
2938
2937
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
2939
2938
|
}
|
|
2939
|
+
/**
|
|
2940
|
+
* @method
|
|
2941
|
+
* @name woo#setPositionMode
|
|
2942
|
+
* @description set hedged to true or false for a market
|
|
2943
|
+
* @see https://docs.woo.org/#update-position-mode
|
|
2944
|
+
* @param {bool} hedged set to true to use HEDGE_MODE, false for ONE_WAY
|
|
2945
|
+
* @param {string} symbol not used by woo setPositionMode
|
|
2946
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2947
|
+
* @returns {object} response from the exchange
|
|
2948
|
+
*/
|
|
2940
2949
|
async setPositionMode(hedged, symbol = undefined, params = {}) {
|
|
2941
|
-
/**
|
|
2942
|
-
* @method
|
|
2943
|
-
* @name woo#setPositionMode
|
|
2944
|
-
* @description set hedged to true or false for a market
|
|
2945
|
-
* @see https://docs.woo.org/#update-position-mode
|
|
2946
|
-
* @param {bool} hedged set to true to use HEDGE_MODE, false for ONE_WAY
|
|
2947
|
-
* @param {string} symbol not used by woo setPositionMode
|
|
2948
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2949
|
-
* @returns {object} response from the exchange
|
|
2950
|
-
*/
|
|
2951
2950
|
let hedgeMode = undefined;
|
|
2952
2951
|
if (hedged) {
|
|
2953
2952
|
hedgeMode = 'HEDGE_MODE';
|
|
@@ -2968,18 +2967,18 @@ class woo extends woo$1 {
|
|
|
2968
2967
|
//
|
|
2969
2968
|
return response;
|
|
2970
2969
|
}
|
|
2970
|
+
/**
|
|
2971
|
+
* @method
|
|
2972
|
+
* @name woo#fetchLeverage
|
|
2973
|
+
* @description fetch the set leverage for a market
|
|
2974
|
+
* @see https://docs.woo.org/#get-account-information-new
|
|
2975
|
+
* @param {string} symbol unified market symbol
|
|
2976
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2977
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
2978
|
+
* @param {string} [params.position_mode] *for swap markets only* 'ONE_WAY' or 'HEDGE_MODE'
|
|
2979
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
2980
|
+
*/
|
|
2971
2981
|
async fetchLeverage(symbol, params = {}) {
|
|
2972
|
-
/**
|
|
2973
|
-
* @method
|
|
2974
|
-
* @name woo#fetchLeverage
|
|
2975
|
-
* @description fetch the set leverage for a market
|
|
2976
|
-
* @see https://docs.woo.org/#get-account-information-new
|
|
2977
|
-
* @param {string} symbol unified market symbol
|
|
2978
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2979
|
-
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
2980
|
-
* @param {string} [params.position_mode] *for swap markets only* 'ONE_WAY' or 'HEDGE_MODE'
|
|
2981
|
-
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
2982
|
-
*/
|
|
2983
2982
|
await this.loadMarkets();
|
|
2984
2983
|
const market = this.market(symbol);
|
|
2985
2984
|
let response = undefined;
|
|
@@ -3100,20 +3099,20 @@ class woo extends woo$1 {
|
|
|
3100
3099
|
'shortLeverage': shortLeverage,
|
|
3101
3100
|
};
|
|
3102
3101
|
}
|
|
3102
|
+
/**
|
|
3103
|
+
* @method
|
|
3104
|
+
* @name woo#setLeverage
|
|
3105
|
+
* @description set the level of leverage for a market
|
|
3106
|
+
* @see https://docs.woo.org/#update-leverage-setting
|
|
3107
|
+
* @see https://docs.woo.org/#update-futures-leverage-setting
|
|
3108
|
+
* @param {float} leverage the rate of leverage (1, 2, 3, 4 or 5 for spot markets, 1, 2, 3, 4, 5, 10, 15, 20 for swap markets)
|
|
3109
|
+
* @param {string} [symbol] unified market symbol (is mandatory for swap markets)
|
|
3110
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3111
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
3112
|
+
* @param {string} [params.position_side] *for swap markets only* 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode.
|
|
3113
|
+
* @returns {object} response from the exchange
|
|
3114
|
+
*/
|
|
3103
3115
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
3104
|
-
/**
|
|
3105
|
-
* @method
|
|
3106
|
-
* @name woo#setLeverage
|
|
3107
|
-
* @description set the level of leverage for a market
|
|
3108
|
-
* @see https://docs.woo.org/#update-leverage-setting
|
|
3109
|
-
* @see https://docs.woo.org/#update-futures-leverage-setting
|
|
3110
|
-
* @param {float} leverage the rate of leverage (1, 2, 3, 4 or 5 for spot markets, 1, 2, 3, 4, 5, 10, 15, 20 for swap markets)
|
|
3111
|
-
* @param {string} [symbo] unified market symbol (is mandatory for swap markets)
|
|
3112
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3113
|
-
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
3114
|
-
* @param {string} [params.position_side] *for swap markets only* 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode.
|
|
3115
|
-
* @returns {object} response from the exchange
|
|
3116
|
-
*/
|
|
3117
3116
|
await this.loadMarkets();
|
|
3118
3117
|
const request = {
|
|
3119
3118
|
'leverage': leverage,
|
|
@@ -3136,32 +3135,32 @@ class woo extends woo$1 {
|
|
|
3136
3135
|
throw new errors.NotSupported(this.id + ' fetchLeverage() is not supported for ' + market['type'] + ' markets');
|
|
3137
3136
|
}
|
|
3138
3137
|
}
|
|
3138
|
+
/**
|
|
3139
|
+
* @method
|
|
3140
|
+
* @name woo#addMargin
|
|
3141
|
+
* @description add margin
|
|
3142
|
+
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3143
|
+
* @param {string} symbol unified market symbol
|
|
3144
|
+
* @param {float} amount amount of margin to add
|
|
3145
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3146
|
+
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3147
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3148
|
+
*/
|
|
3139
3149
|
async addMargin(symbol, amount, params = {}) {
|
|
3140
|
-
/**
|
|
3141
|
-
* @method
|
|
3142
|
-
* @name woo#addMargin
|
|
3143
|
-
* @description add margin
|
|
3144
|
-
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3145
|
-
* @param {string} symbol unified market symbol
|
|
3146
|
-
* @param {float} amount amount of margin to add
|
|
3147
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3148
|
-
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3149
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3150
|
-
*/
|
|
3151
3150
|
return await this.modifyMarginHelper(symbol, amount, 'ADD', params);
|
|
3152
3151
|
}
|
|
3152
|
+
/**
|
|
3153
|
+
* @method
|
|
3154
|
+
* @name woo#reduceMargin
|
|
3155
|
+
* @description remove margin from a position
|
|
3156
|
+
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3157
|
+
* @param {string} symbol unified market symbol
|
|
3158
|
+
* @param {float} amount amount of margin to remove
|
|
3159
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3160
|
+
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3161
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3162
|
+
*/
|
|
3153
3163
|
async reduceMargin(symbol, amount, params = {}) {
|
|
3154
|
-
/**
|
|
3155
|
-
* @method
|
|
3156
|
-
* @name woo#reduceMargin
|
|
3157
|
-
* @description remove margin from a position
|
|
3158
|
-
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3159
|
-
* @param {string} symbol unified market symbol
|
|
3160
|
-
* @param {float} amount amount of margin to remove
|
|
3161
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3162
|
-
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3163
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3164
|
-
*/
|
|
3165
3164
|
return await this.modifyMarginHelper(symbol, amount, 'REDUCE', params);
|
|
3166
3165
|
}
|
|
3167
3166
|
async modifyMarginHelper(symbol, amount, type, params = {}) {
|
|
@@ -3366,18 +3365,18 @@ class woo extends woo$1 {
|
|
|
3366
3365
|
'takeProfitPrice': undefined,
|
|
3367
3366
|
});
|
|
3368
3367
|
}
|
|
3368
|
+
/**
|
|
3369
|
+
* @method
|
|
3370
|
+
* @name woo#fetchConvertQuote
|
|
3371
|
+
* @description fetch a quote for converting from one currency to another
|
|
3372
|
+
* @see https://docs.woo.org/#get-quote-rfq
|
|
3373
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
3374
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
3375
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
3376
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3377
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3378
|
+
*/
|
|
3369
3379
|
async fetchConvertQuote(fromCode, toCode, amount = undefined, params = {}) {
|
|
3370
|
-
/**
|
|
3371
|
-
* @method
|
|
3372
|
-
* @name woo#fetchConvertQuote
|
|
3373
|
-
* @description fetch a quote for converting from one currency to another
|
|
3374
|
-
* @see https://docs.woo.org/#get-quote-rfq
|
|
3375
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
3376
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
3377
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
3378
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3379
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3380
|
-
*/
|
|
3381
3380
|
await this.loadMarkets();
|
|
3382
3381
|
const request = {
|
|
3383
3382
|
'sellToken': fromCode.toUpperCase(),
|
|
@@ -3408,19 +3407,19 @@ class woo extends woo$1 {
|
|
|
3408
3407
|
const toCurrency = this.currency(toCurrencyId);
|
|
3409
3408
|
return this.parseConversion(data, fromCurrency, toCurrency);
|
|
3410
3409
|
}
|
|
3410
|
+
/**
|
|
3411
|
+
* @method
|
|
3412
|
+
* @name woo#createConvertTrade
|
|
3413
|
+
* @description convert from one currency to another
|
|
3414
|
+
* @see https://docs.woo.org/#send-quote-rft
|
|
3415
|
+
* @param {string} id the id of the trade that you want to make
|
|
3416
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
3417
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
3418
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
3419
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3420
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3421
|
+
*/
|
|
3411
3422
|
async createConvertTrade(id, fromCode, toCode, amount = undefined, params = {}) {
|
|
3412
|
-
/**
|
|
3413
|
-
* @method
|
|
3414
|
-
* @name woo#createConvertTrade
|
|
3415
|
-
* @description convert from one currency to another
|
|
3416
|
-
* @see https://docs.woo.org/#send-quote-rft
|
|
3417
|
-
* @param {string} id the id of the trade that you want to make
|
|
3418
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
3419
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
3420
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
3421
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3422
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3423
|
-
*/
|
|
3424
3423
|
await this.loadMarkets();
|
|
3425
3424
|
const request = {
|
|
3426
3425
|
'quoteId': id,
|
|
@@ -3439,17 +3438,17 @@ class woo extends woo$1 {
|
|
|
3439
3438
|
const data = this.safeDict(response, 'data', {});
|
|
3440
3439
|
return this.parseConversion(data);
|
|
3441
3440
|
}
|
|
3441
|
+
/**
|
|
3442
|
+
* @method
|
|
3443
|
+
* @name woo#fetchConvertTrade
|
|
3444
|
+
* @description fetch the data for a conversion trade
|
|
3445
|
+
* @see https://docs.woo.org/#get-quote-trade
|
|
3446
|
+
* @param {string} id the id of the trade that you want to fetch
|
|
3447
|
+
* @param {string} [code] the unified currency code of the conversion trade
|
|
3448
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3449
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3450
|
+
*/
|
|
3442
3451
|
async fetchConvertTrade(id, code = undefined, params = {}) {
|
|
3443
|
-
/**
|
|
3444
|
-
* @method
|
|
3445
|
-
* @name woo#fetchConvertTrade
|
|
3446
|
-
* @description fetch the data for a conversion trade
|
|
3447
|
-
* @see https://docs.woo.org/#get-quote-trade
|
|
3448
|
-
* @param {string} id the id of the trade that you want to fetch
|
|
3449
|
-
* @param {string} [code] the unified currency code of the conversion trade
|
|
3450
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3451
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3452
|
-
*/
|
|
3453
3452
|
await this.loadMarkets();
|
|
3454
3453
|
const request = {
|
|
3455
3454
|
'quoteId': id,
|
|
@@ -3482,19 +3481,19 @@ class woo extends woo$1 {
|
|
|
3482
3481
|
}
|
|
3483
3482
|
return this.parseConversion(data, fromCurrency, toCurrency);
|
|
3484
3483
|
}
|
|
3484
|
+
/**
|
|
3485
|
+
* @method
|
|
3486
|
+
* @name woo#fetchConvertTradeHistory
|
|
3487
|
+
* @description fetch the users history of conversion trades
|
|
3488
|
+
* @see https://docs.woo.org/#get-quote-trades
|
|
3489
|
+
* @param {string} [code] the unified currency code
|
|
3490
|
+
* @param {int} [since] the earliest time in ms to fetch conversions for
|
|
3491
|
+
* @param {int} [limit] the maximum number of conversion structures to retrieve
|
|
3492
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3493
|
+
* @param {int} [params.until] timestamp in ms of the latest conversion to fetch
|
|
3494
|
+
* @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3495
|
+
*/
|
|
3485
3496
|
async fetchConvertTradeHistory(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3486
|
-
/**
|
|
3487
|
-
* @method
|
|
3488
|
-
* @name woo#fetchConvertTradeHistory
|
|
3489
|
-
* @description fetch the users history of conversion trades
|
|
3490
|
-
* @see https://docs.woo.org/#get-quote-trades
|
|
3491
|
-
* @param {string} [code] the unified currency code
|
|
3492
|
-
* @param {int} [since] the earliest time in ms to fetch conversions for
|
|
3493
|
-
* @param {int} [limit] the maximum number of conversion structures to retrieve
|
|
3494
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3495
|
-
* @param {int} [params.until] timestamp in ms of the latest conversion to fetch
|
|
3496
|
-
* @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3497
|
-
*/
|
|
3498
3497
|
await this.loadMarkets();
|
|
3499
3498
|
let request = {};
|
|
3500
3499
|
[request, params] = this.handleUntilOption('endTime', request, params);
|
|
@@ -3583,15 +3582,15 @@ class woo extends woo$1 {
|
|
|
3583
3582
|
'fee': undefined,
|
|
3584
3583
|
};
|
|
3585
3584
|
}
|
|
3585
|
+
/**
|
|
3586
|
+
* @method
|
|
3587
|
+
* @name woo#fetchConvertCurrencies
|
|
3588
|
+
* @description fetches all available currencies that can be converted
|
|
3589
|
+
* @see https://docs.woo.org/#get-quote-asset-info
|
|
3590
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3591
|
+
* @returns {object} an associative dictionary of currencies
|
|
3592
|
+
*/
|
|
3586
3593
|
async fetchConvertCurrencies(params = {}) {
|
|
3587
|
-
/**
|
|
3588
|
-
* @method
|
|
3589
|
-
* @name woo#fetchConvertCurrencies
|
|
3590
|
-
* @description fetches all available currencies that can be converted
|
|
3591
|
-
* @see https://docs.woo.org/#get-quote-asset-info
|
|
3592
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3593
|
-
* @returns {object} an associative dictionary of currencies
|
|
3594
|
-
*/
|
|
3595
3594
|
await this.loadMarkets();
|
|
3596
3595
|
const response = await this.v3PrivateGetConvertAssetInfo(params);
|
|
3597
3596
|
//
|