ccxt 4.4.30 → 4.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +123 -123
- package/dist/cjs/src/alpaca.js +237 -237
- package/dist/cjs/src/ascendex.js +342 -341
- package/dist/cjs/src/bigone.js +242 -242
- package/dist/cjs/src/binance.js +1339 -1291
- package/dist/cjs/src/bingx.js +639 -639
- package/dist/cjs/src/bit2c.js +111 -111
- package/dist/cjs/src/bitbank.js +142 -142
- package/dist/cjs/src/bitbns.js +140 -140
- package/dist/cjs/src/bitfinex.js +231 -231
- package/dist/cjs/src/bitfinex2.js +403 -403
- package/dist/cjs/src/bitflyer.js +184 -184
- package/dist/cjs/src/bitget.js +848 -846
- package/dist/cjs/src/bithumb.js +125 -124
- package/dist/cjs/src/bitmart.js +525 -525
- package/dist/cjs/src/bitmex.js +317 -317
- package/dist/cjs/src/bitopro.js +221 -221
- package/dist/cjs/src/bitrue.js +315 -315
- package/dist/cjs/src/bitso.js +220 -220
- package/dist/cjs/src/bitstamp.js +251 -251
- package/dist/cjs/src/bitteam.js +183 -183
- package/dist/cjs/src/bitvavo.js +247 -251
- package/dist/cjs/src/bl3p.js +82 -82
- package/dist/cjs/src/blockchaincom.js +211 -211
- package/dist/cjs/src/blofin.js +332 -331
- package/dist/cjs/src/btcalpha.js +166 -166
- package/dist/cjs/src/btcbox.js +108 -108
- package/dist/cjs/src/btcmarkets.js +198 -198
- package/dist/cjs/src/btcturk.js +124 -124
- package/dist/cjs/src/bybit.js +906 -900
- package/dist/cjs/src/cex.js +227 -226
- package/dist/cjs/src/coinbase.js +481 -481
- package/dist/cjs/src/coinbaseexchange.js +274 -274
- package/dist/cjs/src/coinbaseinternational.js +304 -304
- package/dist/cjs/src/coincatch.js +650 -650
- package/dist/cjs/src/coincheck.js +113 -113
- package/dist/cjs/src/coinex.js +611 -601
- package/dist/cjs/src/coinlist.js +304 -303
- package/dist/cjs/src/coinmate.js +162 -161
- package/dist/cjs/src/coinmetro.js +187 -187
- package/dist/cjs/src/coinone.js +124 -123
- package/dist/cjs/src/coinsph.js +237 -237
- package/dist/cjs/src/coinspot.js +82 -82
- package/dist/cjs/src/cryptocom.js +342 -341
- package/dist/cjs/src/currencycom.js +225 -224
- package/dist/cjs/src/delta.js +320 -320
- package/dist/cjs/src/deribit.js +411 -408
- package/dist/cjs/src/digifinex.js +432 -431
- package/dist/cjs/src/exmo.js +328 -327
- package/dist/cjs/src/gate.js +830 -791
- package/dist/cjs/src/gemini.js +199 -198
- package/dist/cjs/src/hashkey.js +520 -517
- package/dist/cjs/src/hitbtc.js +465 -462
- package/dist/cjs/src/hollaex.js +253 -252
- package/dist/cjs/src/htx.js +791 -848
- package/dist/cjs/src/huobijp.js +219 -218
- package/dist/cjs/src/hyperliquid.js +421 -417
- package/dist/cjs/src/idex.js +238 -237
- package/dist/cjs/src/independentreserve.js +133 -132
- package/dist/cjs/src/indodax.js +177 -171
- package/dist/cjs/src/kraken.js +381 -377
- package/dist/cjs/src/krakenfutures.js +285 -279
- package/dist/cjs/src/kucoin.js +632 -622
- package/dist/cjs/src/kucoinfutures.js +533 -457
- package/dist/cjs/src/kuna.js +283 -282
- package/dist/cjs/src/latoken.js +211 -210
- package/dist/cjs/src/lbank.js +268 -267
- package/dist/cjs/src/luno.js +174 -173
- package/dist/cjs/src/lykke.js +172 -171
- package/dist/cjs/src/mercado.js +123 -122
- package/dist/cjs/src/mexc.js +650 -646
- package/dist/cjs/src/ndax.js +229 -228
- package/dist/cjs/src/novadax.js +230 -229
- package/dist/cjs/src/oceanex.js +187 -186
- package/dist/cjs/src/okcoin.js +286 -285
- package/dist/cjs/src/okx.js +909 -904
- package/dist/cjs/src/onetrading.js +218 -218
- package/dist/cjs/src/oxfun.js +335 -334
- package/dist/cjs/src/p2b.js +154 -154
- package/dist/cjs/src/paradex.js +249 -244
- package/dist/cjs/src/paymium.js +101 -101
- package/dist/cjs/src/phemex.js +388 -390
- package/dist/cjs/src/poloniex.js +270 -270
- package/dist/cjs/src/poloniexfutures.js +250 -250
- package/dist/cjs/src/pro/alpaca.js +64 -64
- package/dist/cjs/src/pro/ascendex.js +64 -64
- package/dist/cjs/src/pro/binance.js +546 -543
- package/dist/cjs/src/pro/bingx.js +116 -116
- package/dist/cjs/src/pro/bitfinex.js +42 -42
- package/dist/cjs/src/pro/bitfinex2.js +66 -66
- package/dist/cjs/src/pro/bitget.js +188 -181
- package/dist/cjs/src/pro/bithumb.js +40 -40
- package/dist/cjs/src/pro/bitmart.js +121 -119
- package/dist/cjs/src/pro/bitmex.js +135 -133
- package/dist/cjs/src/pro/bitopro.js +49 -49
- package/dist/cjs/src/pro/bitrue.js +19 -19
- package/dist/cjs/src/pro/bitstamp.js +29 -29
- package/dist/cjs/src/pro/bitvavo.js +299 -301
- package/dist/cjs/src/pro/blockchaincom.js +62 -62
- package/dist/cjs/src/pro/blofin.js +132 -130
- package/dist/cjs/src/pro/bybit.js +317 -313
- package/dist/cjs/src/pro/cex.js +168 -168
- package/dist/cjs/src/pro/coinbase.js +93 -91
- package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
- package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
- package/dist/cjs/src/pro/coincatch.js +150 -143
- package/dist/cjs/src/pro/coincheck.js +21 -21
- package/dist/cjs/src/pro/coinex.js +110 -110
- package/dist/cjs/src/pro/coinone.js +30 -30
- package/dist/cjs/src/pro/cryptocom.js +227 -227
- package/dist/cjs/src/pro/currencycom.js +45 -45
- package/dist/cjs/src/pro/deribit.js +127 -127
- package/dist/cjs/src/pro/exmo.js +66 -66
- package/dist/cjs/src/pro/gate.js +287 -283
- package/dist/cjs/src/pro/gemini.js +74 -74
- package/dist/cjs/src/pro/hashkey.js +87 -85
- package/dist/cjs/src/pro/hitbtc.js +190 -190
- package/dist/cjs/src/pro/hollaex.js +51 -51
- package/dist/cjs/src/pro/htx.js +96 -94
- package/dist/cjs/src/pro/huobijp.js +38 -38
- package/dist/cjs/src/pro/hyperliquid.js +151 -150
- package/dist/cjs/src/pro/idex.js +48 -48
- package/dist/cjs/src/pro/independentreserve.js +19 -19
- package/dist/cjs/src/pro/kraken.js +167 -167
- package/dist/cjs/src/pro/krakenfutures.js +137 -138
- package/dist/cjs/src/pro/kucoin.js +167 -168
- package/dist/cjs/src/pro/kucoinfutures.js +147 -147
- package/dist/cjs/src/pro/lbank.js +95 -95
- package/dist/cjs/src/pro/luno.js +21 -21
- package/dist/cjs/src/pro/mexc.js +102 -103
- package/dist/cjs/src/pro/ndax.js +42 -42
- package/dist/cjs/src/pro/okcoin.js +61 -61
- package/dist/cjs/src/pro/okx.js +332 -330
- package/dist/cjs/src/pro/onetrading.js +71 -71
- package/dist/cjs/src/pro/oxfun.js +193 -191
- package/dist/cjs/src/pro/p2b.js +77 -77
- package/dist/cjs/src/pro/paradex.js +39 -39
- package/dist/cjs/src/pro/phemex.js +94 -94
- package/dist/cjs/src/pro/poloniex.js +171 -171
- package/dist/cjs/src/pro/poloniexfutures.js +62 -62
- package/dist/cjs/src/pro/probit.js +63 -63
- package/dist/cjs/src/pro/upbit.js +80 -80
- package/dist/cjs/src/pro/vertex.js +65 -63
- package/dist/cjs/src/pro/wazirx.js +70 -70
- package/dist/cjs/src/pro/whitebit.js +83 -83
- package/dist/cjs/src/pro/woo.js +106 -104
- package/dist/cjs/src/pro/woofipro.js +105 -103
- package/dist/cjs/src/pro/xt.js +119 -119
- package/dist/cjs/src/probit.js +229 -229
- package/dist/cjs/src/timex.js +198 -197
- package/dist/cjs/src/tokocrypto.js +214 -213
- package/dist/cjs/src/tradeogre.js +92 -91
- package/dist/cjs/src/upbit.js +243 -242
- package/dist/cjs/src/vertex.js +258 -258
- package/dist/cjs/src/wavesexchange.js +176 -172
- package/dist/cjs/src/wazirx.js +168 -168
- package/dist/cjs/src/whitebit.js +361 -361
- package/dist/cjs/src/woo.js +571 -572
- package/dist/cjs/src/woofipro.js +392 -391
- package/dist/cjs/src/xt.js +436 -435
- package/dist/cjs/src/yobit.js +159 -158
- package/dist/cjs/src/zaif.js +103 -103
- package/dist/cjs/src/zonda.js +168 -168
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +123 -0
- package/js/src/ace.js +123 -123
- package/js/src/alpaca.d.ts +237 -0
- package/js/src/alpaca.js +237 -237
- package/js/src/ascendex.d.ts +339 -0
- package/js/src/ascendex.js +342 -341
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +242 -0
- package/js/src/bigone.js +242 -242
- package/js/src/binance.d.ts +1306 -0
- package/js/src/binance.js +1339 -1291
- package/js/src/bingx.d.ts +639 -0
- package/js/src/bingx.js +639 -639
- package/js/src/bit2c.d.ts +111 -0
- package/js/src/bit2c.js +111 -111
- package/js/src/bitbank.d.ts +142 -0
- package/js/src/bitbank.js +142 -142
- package/js/src/bitbns.d.ts +140 -0
- package/js/src/bitbns.js +140 -140
- package/js/src/bitfinex.d.ts +231 -0
- package/js/src/bitfinex.js +231 -231
- package/js/src/bitfinex2.d.ts +403 -0
- package/js/src/bitfinex2.js +403 -403
- package/js/src/bitflyer.d.ts +184 -0
- package/js/src/bitflyer.js +184 -184
- package/js/src/bitget.d.ts +846 -0
- package/js/src/bitget.js +848 -846
- package/js/src/bithumb.d.ts +125 -0
- package/js/src/bithumb.js +125 -124
- package/js/src/bitmart.d.ts +525 -0
- package/js/src/bitmart.js +525 -525
- package/js/src/bitmex.d.ts +317 -0
- package/js/src/bitmex.js +317 -317
- package/js/src/bitopro.d.ts +221 -0
- package/js/src/bitopro.js +221 -221
- package/js/src/bitrue.d.ts +315 -0
- package/js/src/bitrue.js +315 -315
- package/js/src/bitso.d.ts +220 -0
- package/js/src/bitso.js +220 -220
- package/js/src/bitstamp.d.ts +251 -0
- package/js/src/bitstamp.js +251 -251
- package/js/src/bitteam.d.ts +183 -0
- package/js/src/bitteam.js +183 -183
- package/js/src/bitvavo.d.ts +247 -0
- package/js/src/bitvavo.js +247 -251
- package/js/src/bl3p.d.ts +82 -0
- package/js/src/bl3p.js +82 -82
- package/js/src/blockchaincom.d.ts +211 -0
- package/js/src/blockchaincom.js +211 -211
- package/js/src/blofin.d.ts +332 -0
- package/js/src/blofin.js +332 -331
- package/js/src/btcalpha.d.ts +166 -0
- package/js/src/btcalpha.js +166 -166
- package/js/src/btcbox.d.ts +108 -0
- package/js/src/btcbox.js +108 -108
- package/js/src/btcmarkets.d.ts +198 -0
- package/js/src/btcmarkets.js +198 -198
- package/js/src/btcturk.d.ts +124 -0
- package/js/src/btcturk.js +124 -124
- package/js/src/bybit.d.ts +906 -1
- package/js/src/bybit.js +906 -900
- package/js/src/cex.d.ts +227 -0
- package/js/src/cex.js +227 -226
- package/js/src/coinbase.d.ts +481 -0
- package/js/src/coinbase.js +481 -481
- package/js/src/coinbaseexchange.d.ts +274 -0
- package/js/src/coinbaseexchange.js +274 -274
- package/js/src/coinbaseinternational.d.ts +304 -0
- package/js/src/coinbaseinternational.js +304 -304
- package/js/src/coincatch.d.ts +646 -0
- package/js/src/coincatch.js +650 -650
- package/js/src/coincheck.d.ts +113 -0
- package/js/src/coincheck.js +113 -113
- package/js/src/coinex.d.ts +603 -0
- package/js/src/coinex.js +611 -601
- package/js/src/coinlist.d.ts +304 -0
- package/js/src/coinlist.js +304 -303
- package/js/src/coinmate.d.ts +162 -0
- package/js/src/coinmate.js +162 -161
- package/js/src/coinmetro.d.ts +187 -0
- package/js/src/coinmetro.js +187 -187
- package/js/src/coinone.d.ts +124 -0
- package/js/src/coinone.js +124 -123
- package/js/src/coinsph.d.ts +237 -0
- package/js/src/coinsph.js +237 -237
- package/js/src/coinspot.d.ts +82 -0
- package/js/src/coinspot.js +82 -82
- package/js/src/cryptocom.d.ts +342 -0
- package/js/src/cryptocom.js +342 -341
- package/js/src/currencycom.d.ts +225 -0
- package/js/src/currencycom.js +225 -224
- package/js/src/delta.d.ts +320 -0
- package/js/src/delta.js +320 -320
- package/js/src/deribit.d.ts +411 -0
- package/js/src/deribit.js +411 -408
- package/js/src/digifinex.d.ts +430 -0
- package/js/src/digifinex.js +432 -431
- package/js/src/exmo.d.ts +328 -0
- package/js/src/exmo.js +328 -327
- package/js/src/gate.d.ts +803 -1
- package/js/src/gate.js +830 -791
- package/js/src/gemini.d.ts +199 -0
- package/js/src/gemini.js +199 -198
- package/js/src/hashkey.d.ts +516 -0
- package/js/src/hashkey.js +520 -517
- package/js/src/hitbtc.d.ts +465 -0
- package/js/src/hitbtc.js +465 -462
- package/js/src/hollaex.d.ts +253 -0
- package/js/src/hollaex.js +253 -252
- package/js/src/htx.d.ts +765 -2
- package/js/src/htx.js +791 -848
- package/js/src/huobijp.d.ts +219 -0
- package/js/src/huobijp.js +219 -218
- package/js/src/hyperliquid.d.ts +419 -0
- package/js/src/hyperliquid.js +421 -417
- package/js/src/idex.d.ts +238 -0
- package/js/src/idex.js +238 -237
- package/js/src/independentreserve.d.ts +133 -0
- package/js/src/independentreserve.js +133 -132
- package/js/src/indodax.d.ts +171 -0
- package/js/src/indodax.js +177 -171
- package/js/src/kraken.d.ts +381 -0
- package/js/src/kraken.js +381 -377
- package/js/src/krakenfutures.d.ts +282 -0
- package/js/src/krakenfutures.js +285 -279
- package/js/src/kucoin.d.ts +613 -0
- package/js/src/kucoin.js +632 -622
- package/js/src/kucoinfutures.d.ts +441 -0
- package/js/src/kucoinfutures.js +533 -457
- package/js/src/kuna.d.ts +283 -0
- package/js/src/kuna.js +283 -282
- package/js/src/latoken.d.ts +211 -0
- package/js/src/latoken.js +211 -210
- package/js/src/lbank.d.ts +268 -0
- package/js/src/lbank.js +268 -267
- package/js/src/luno.d.ts +174 -0
- package/js/src/luno.js +174 -173
- package/js/src/lykke.d.ts +172 -0
- package/js/src/lykke.js +172 -171
- package/js/src/mercado.d.ts +123 -0
- package/js/src/mercado.js +123 -122
- package/js/src/mexc.d.ts +647 -0
- package/js/src/mexc.js +650 -646
- package/js/src/ndax.d.ts +229 -0
- package/js/src/ndax.js +229 -228
- package/js/src/novadax.d.ts +230 -0
- package/js/src/novadax.js +230 -229
- package/js/src/oceanex.d.ts +187 -0
- package/js/src/oceanex.js +187 -186
- package/js/src/okcoin.d.ts +286 -0
- package/js/src/okcoin.js +286 -285
- package/js/src/okx.d.ts +907 -0
- package/js/src/okx.js +909 -904
- package/js/src/onetrading.d.ts +218 -0
- package/js/src/onetrading.js +218 -218
- package/js/src/oxfun.d.ts +336 -3
- package/js/src/oxfun.js +335 -334
- package/js/src/p2b.d.ts +154 -0
- package/js/src/p2b.js +154 -154
- package/js/src/paradex.d.ts +241 -0
- package/js/src/paradex.js +249 -244
- package/js/src/paymium.d.ts +101 -0
- package/js/src/paymium.js +101 -101
- package/js/src/phemex.d.ts +366 -0
- package/js/src/phemex.js +388 -390
- package/js/src/poloniex.d.ts +270 -0
- package/js/src/poloniex.js +270 -270
- package/js/src/poloniexfutures.d.ts +250 -0
- package/js/src/poloniexfutures.js +250 -250
- package/js/src/pro/alpaca.d.ts +64 -0
- package/js/src/pro/alpaca.js +64 -64
- package/js/src/pro/ascendex.d.ts +64 -0
- package/js/src/pro/ascendex.js +64 -64
- package/js/src/pro/binance.d.ts +546 -0
- package/js/src/pro/binance.js +546 -543
- package/js/src/pro/bingx.d.ts +116 -0
- package/js/src/pro/bingx.js +116 -116
- package/js/src/pro/bitfinex.d.ts +42 -0
- package/js/src/pro/bitfinex.js +42 -42
- package/js/src/pro/bitfinex2.d.ts +66 -0
- package/js/src/pro/bitfinex2.js +66 -66
- package/js/src/pro/bitget.d.ts +187 -0
- package/js/src/pro/bitget.js +188 -181
- package/js/src/pro/bithumb.d.ts +40 -0
- package/js/src/pro/bithumb.js +40 -40
- package/js/src/pro/bitmart.d.ts +121 -0
- package/js/src/pro/bitmart.js +121 -119
- package/js/src/pro/bitmex.d.ts +135 -0
- package/js/src/pro/bitmex.js +135 -133
- package/js/src/pro/bitopro.d.ts +49 -0
- package/js/src/pro/bitopro.js +49 -49
- package/js/src/pro/bitrue.d.ts +19 -0
- package/js/src/pro/bitrue.js +19 -19
- package/js/src/pro/bitstamp.d.ts +29 -0
- package/js/src/pro/bitstamp.js +29 -29
- package/js/src/pro/bitvavo.d.ts +254 -1
- package/js/src/pro/bitvavo.js +299 -301
- package/js/src/pro/blockchaincom.d.ts +62 -0
- package/js/src/pro/blockchaincom.js +62 -62
- package/js/src/pro/blofin.d.ts +132 -0
- package/js/src/pro/blofin.js +132 -130
- package/js/src/pro/bybit.d.ts +317 -0
- package/js/src/pro/bybit.js +317 -313
- package/js/src/pro/cex.d.ts +168 -0
- package/js/src/pro/cex.js +168 -168
- package/js/src/pro/coinbase.d.ts +93 -0
- package/js/src/pro/coinbase.js +93 -91
- package/js/src/pro/coinbaseexchange.d.ts +95 -0
- package/js/src/pro/coinbaseexchange.js +95 -95
- package/js/src/pro/coinbaseinternational.d.ts +111 -0
- package/js/src/pro/coinbaseinternational.js +111 -111
- package/js/src/pro/coincatch.d.ts +150 -0
- package/js/src/pro/coincatch.js +150 -143
- package/js/src/pro/coincheck.d.ts +21 -0
- package/js/src/pro/coincheck.js +21 -21
- package/js/src/pro/coinex.d.ts +110 -0
- package/js/src/pro/coinex.js +110 -110
- package/js/src/pro/coinone.d.ts +30 -0
- package/js/src/pro/coinone.js +30 -30
- package/js/src/pro/cryptocom.d.ts +227 -0
- package/js/src/pro/cryptocom.js +227 -227
- package/js/src/pro/currencycom.d.ts +45 -0
- package/js/src/pro/currencycom.js +45 -45
- package/js/src/pro/deribit.d.ts +127 -0
- package/js/src/pro/deribit.js +127 -127
- package/js/src/pro/exmo.d.ts +66 -0
- package/js/src/pro/exmo.js +66 -66
- package/js/src/pro/gate.d.ts +287 -0
- package/js/src/pro/gate.js +287 -283
- package/js/src/pro/gemini.d.ts +74 -0
- package/js/src/pro/gemini.js +74 -74
- package/js/src/pro/hashkey.d.ts +87 -0
- package/js/src/pro/hashkey.js +87 -85
- package/js/src/pro/hitbtc.d.ts +190 -0
- package/js/src/pro/hitbtc.js +190 -190
- package/js/src/pro/hollaex.d.ts +51 -0
- package/js/src/pro/hollaex.js +51 -51
- package/js/src/pro/htx.d.ts +96 -0
- package/js/src/pro/htx.js +96 -94
- package/js/src/pro/huobijp.d.ts +38 -0
- package/js/src/pro/huobijp.js +38 -38
- package/js/src/pro/hyperliquid.d.ts +151 -0
- package/js/src/pro/hyperliquid.js +151 -150
- package/js/src/pro/idex.d.ts +48 -0
- package/js/src/pro/idex.js +48 -48
- package/js/src/pro/independentreserve.d.ts +19 -0
- package/js/src/pro/independentreserve.js +19 -19
- package/js/src/pro/kraken.d.ts +167 -0
- package/js/src/pro/kraken.js +167 -167
- package/js/src/pro/krakenfutures.d.ts +137 -0
- package/js/src/pro/krakenfutures.js +137 -138
- package/js/src/pro/kucoin.d.ts +167 -0
- package/js/src/pro/kucoin.js +167 -168
- package/js/src/pro/kucoinfutures.d.ts +147 -0
- package/js/src/pro/kucoinfutures.js +147 -147
- package/js/src/pro/lbank.d.ts +95 -0
- package/js/src/pro/lbank.js +95 -95
- package/js/src/pro/luno.d.ts +21 -0
- package/js/src/pro/luno.js +21 -21
- package/js/src/pro/mexc.d.ts +101 -0
- package/js/src/pro/mexc.js +102 -103
- package/js/src/pro/ndax.d.ts +42 -0
- package/js/src/pro/ndax.js +42 -42
- package/js/src/pro/okcoin.d.ts +61 -0
- package/js/src/pro/okcoin.js +61 -61
- package/js/src/pro/okx.d.ts +332 -0
- package/js/src/pro/okx.js +332 -330
- package/js/src/pro/onetrading.d.ts +71 -0
- package/js/src/pro/onetrading.js +71 -71
- package/js/src/pro/oxfun.d.ts +193 -0
- package/js/src/pro/oxfun.js +193 -191
- package/js/src/pro/p2b.d.ts +77 -0
- package/js/src/pro/p2b.js +77 -77
- package/js/src/pro/paradex.d.ts +39 -0
- package/js/src/pro/paradex.js +39 -39
- package/js/src/pro/phemex.d.ts +94 -0
- package/js/src/pro/phemex.js +94 -94
- package/js/src/pro/poloniex.d.ts +171 -0
- package/js/src/pro/poloniex.js +171 -171
- package/js/src/pro/poloniexfutures.d.ts +62 -0
- package/js/src/pro/poloniexfutures.js +62 -62
- package/js/src/pro/probit.d.ts +63 -0
- package/js/src/pro/probit.js +63 -63
- package/js/src/pro/upbit.d.ts +80 -0
- package/js/src/pro/upbit.js +80 -80
- package/js/src/pro/vertex.d.ts +65 -0
- package/js/src/pro/vertex.js +65 -63
- package/js/src/pro/wazirx.d.ts +70 -0
- package/js/src/pro/wazirx.js +70 -70
- package/js/src/pro/whitebit.d.ts +83 -0
- package/js/src/pro/whitebit.js +83 -83
- package/js/src/pro/woo.d.ts +106 -0
- package/js/src/pro/woo.js +106 -104
- package/js/src/pro/woofipro.d.ts +105 -0
- package/js/src/pro/woofipro.js +105 -103
- package/js/src/pro/xt.d.ts +119 -0
- package/js/src/pro/xt.js +119 -119
- package/js/src/probit.d.ts +229 -0
- package/js/src/probit.js +229 -229
- package/js/src/timex.d.ts +198 -0
- package/js/src/timex.js +198 -197
- package/js/src/tokocrypto.d.ts +214 -0
- package/js/src/tokocrypto.js +214 -213
- package/js/src/tradeogre.d.ts +92 -0
- package/js/src/tradeogre.js +92 -91
- package/js/src/upbit.d.ts +243 -0
- package/js/src/upbit.js +243 -242
- package/js/src/vertex.d.ts +258 -0
- package/js/src/vertex.js +258 -258
- package/js/src/wavesexchange.d.ts +176 -0
- package/js/src/wavesexchange.js +176 -172
- package/js/src/wazirx.d.ts +168 -0
- package/js/src/wazirx.js +168 -168
- package/js/src/whitebit.d.ts +361 -0
- package/js/src/whitebit.js +361 -361
- package/js/src/woo.d.ts +571 -0
- package/js/src/woo.js +571 -572
- package/js/src/woofipro.d.ts +392 -0
- package/js/src/woofipro.js +392 -391
- package/js/src/xt.d.ts +439 -4
- package/js/src/xt.js +436 -435
- package/js/src/yobit.d.ts +159 -0
- package/js/src/yobit.js +159 -158
- package/js/src/zaif.d.ts +103 -0
- package/js/src/zaif.js +103 -103
- package/js/src/zonda.d.ts +168 -0
- package/js/src/zonda.js +168 -168
- package/package.json +1 -1
package/js/src/woo.js
CHANGED
|
@@ -345,15 +345,15 @@ export default class woo extends Exchange {
|
|
|
345
345
|
'precisionMode': TICK_SIZE,
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* @method
|
|
350
|
+
* @name woo#fetchStatus
|
|
351
|
+
* @description the latest known information on the availability of the exchange API
|
|
352
|
+
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
353
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
354
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
355
|
+
*/
|
|
348
356
|
async fetchStatus(params = {}) {
|
|
349
|
-
/**
|
|
350
|
-
* @method
|
|
351
|
-
* @name woo#fetchStatus
|
|
352
|
-
* @description the latest known information on the availability of the exchange API
|
|
353
|
-
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
354
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
355
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
356
|
-
*/
|
|
357
357
|
const response = await this.v1PublicGetSystemInfo(params);
|
|
358
358
|
//
|
|
359
359
|
// {
|
|
@@ -384,15 +384,15 @@ export default class woo extends Exchange {
|
|
|
384
384
|
'info': response,
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* @method
|
|
389
|
+
* @name woo#fetchTime
|
|
390
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
391
|
+
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
392
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
393
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
394
|
+
*/
|
|
387
395
|
async fetchTime(params = {}) {
|
|
388
|
-
/**
|
|
389
|
-
* @method
|
|
390
|
-
* @name woo#fetchTime
|
|
391
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
392
|
-
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
393
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
394
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
395
|
-
*/
|
|
396
396
|
const response = await this.v1PublicGetSystemInfo(params);
|
|
397
397
|
//
|
|
398
398
|
// {
|
|
@@ -406,15 +406,15 @@ export default class woo extends Exchange {
|
|
|
406
406
|
//
|
|
407
407
|
return this.safeInteger(response, 'timestamp');
|
|
408
408
|
}
|
|
409
|
+
/**
|
|
410
|
+
* @method
|
|
411
|
+
* @name woo#fetchMarkets
|
|
412
|
+
* @description retrieves data on all markets for woo
|
|
413
|
+
* @see https://docs.woo.org/#exchange-information
|
|
414
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
415
|
+
* @returns {object[]} an array of objects representing market data
|
|
416
|
+
*/
|
|
409
417
|
async fetchMarkets(params = {}) {
|
|
410
|
-
/**
|
|
411
|
-
* @method
|
|
412
|
-
* @name woo#fetchMarkets
|
|
413
|
-
* @description retrieves data on all markets for woo
|
|
414
|
-
* @see https://docs.woo.org/#exchange-information
|
|
415
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
416
|
-
* @returns {object[]} an array of objects representing market data
|
|
417
|
-
*/
|
|
418
418
|
const response = await this.v1PublicGetInfo(params);
|
|
419
419
|
//
|
|
420
420
|
// {
|
|
@@ -524,18 +524,18 @@ export default class woo extends Exchange {
|
|
|
524
524
|
'info': market,
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
|
+
/**
|
|
528
|
+
* @method
|
|
529
|
+
* @name woo#fetchTrades
|
|
530
|
+
* @description get the list of most recent trades for a particular symbol
|
|
531
|
+
* @see https://docs.woo.org/#market-trades-public
|
|
532
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
533
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
534
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
535
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
536
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
537
|
+
*/
|
|
527
538
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
528
|
-
/**
|
|
529
|
-
* @method
|
|
530
|
-
* @name woo#fetchTrades
|
|
531
|
-
* @description get the list of most recent trades for a particular symbol
|
|
532
|
-
* @see https://docs.woo.org/#market-trades-public
|
|
533
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
534
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
535
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
536
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
537
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
538
|
-
*/
|
|
539
539
|
await this.loadMarkets();
|
|
540
540
|
const market = this.market(symbol);
|
|
541
541
|
const request = {
|
|
@@ -655,15 +655,15 @@ export default class woo extends Exchange {
|
|
|
655
655
|
}
|
|
656
656
|
return fee;
|
|
657
657
|
}
|
|
658
|
+
/**
|
|
659
|
+
* @method
|
|
660
|
+
* @name woo#fetchTradingFees
|
|
661
|
+
* @description fetch the trading fees for multiple markets
|
|
662
|
+
* @see https://docs.woo.org/#get-account-information-new
|
|
663
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
664
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
665
|
+
*/
|
|
658
666
|
async fetchTradingFees(params = {}) {
|
|
659
|
-
/**
|
|
660
|
-
* @method
|
|
661
|
-
* @name woo#fetchTradingFees
|
|
662
|
-
* @description fetch the trading fees for multiple markets
|
|
663
|
-
* @see https://docs.woo.org/#get-account-information-new
|
|
664
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
665
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
666
|
-
*/
|
|
667
667
|
await this.loadMarkets();
|
|
668
668
|
const response = await this.v3PrivateGetAccountinfo(params);
|
|
669
669
|
//
|
|
@@ -711,15 +711,15 @@ export default class woo extends Exchange {
|
|
|
711
711
|
}
|
|
712
712
|
return result;
|
|
713
713
|
}
|
|
714
|
+
/**
|
|
715
|
+
* @method
|
|
716
|
+
* @name woo#fetchCurrencies
|
|
717
|
+
* @description fetches all available currencies on an exchange
|
|
718
|
+
* @see https://docs.woo.org/#available-token-public
|
|
719
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
720
|
+
* @returns {object} an associative dictionary of currencies
|
|
721
|
+
*/
|
|
714
722
|
async fetchCurrencies(params = {}) {
|
|
715
|
-
/**
|
|
716
|
-
* @method
|
|
717
|
-
* @name woo#fetchCurrencies
|
|
718
|
-
* @description fetches all available currencies on an exchange
|
|
719
|
-
* @see https://docs.woo.org/#available-token-public
|
|
720
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
721
|
-
* @returns {object} an associative dictionary of currencies
|
|
722
|
-
*/
|
|
723
723
|
const result = {};
|
|
724
724
|
const tokenResponse = await this.v1PublicGetToken(params);
|
|
725
725
|
//
|
|
@@ -848,17 +848,17 @@ export default class woo extends Exchange {
|
|
|
848
848
|
}
|
|
849
849
|
return result;
|
|
850
850
|
}
|
|
851
|
+
/**
|
|
852
|
+
* @method
|
|
853
|
+
* @name woo#createMarketBuyOrderWithCost
|
|
854
|
+
* @description create a market buy order by providing the symbol and cost
|
|
855
|
+
* @see https://docs.woo.org/#send-order
|
|
856
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
857
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
858
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
859
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
860
|
+
*/
|
|
851
861
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
852
|
-
/**
|
|
853
|
-
* @method
|
|
854
|
-
* @name woo#createMarketBuyOrderWithCost
|
|
855
|
-
* @description create a market buy order by providing the symbol and cost
|
|
856
|
-
* @see https://docs.woo.org/#send-order
|
|
857
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
858
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
859
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
860
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
861
|
-
*/
|
|
862
862
|
await this.loadMarkets();
|
|
863
863
|
const market = this.market(symbol);
|
|
864
864
|
if (!market['spot']) {
|
|
@@ -866,17 +866,17 @@ export default class woo extends Exchange {
|
|
|
866
866
|
}
|
|
867
867
|
return await this.createOrder(symbol, 'market', 'buy', cost, 1, params);
|
|
868
868
|
}
|
|
869
|
+
/**
|
|
870
|
+
* @method
|
|
871
|
+
* @name woo#createMarketSellOrderWithCost
|
|
872
|
+
* @description create a market sell order by providing the symbol and cost
|
|
873
|
+
* @see https://docs.woo.org/#send-order
|
|
874
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
875
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
876
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
877
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
878
|
+
*/
|
|
869
879
|
async createMarketSellOrderWithCost(symbol, cost, params = {}) {
|
|
870
|
-
/**
|
|
871
|
-
* @method
|
|
872
|
-
* @name woo#createMarketSellOrderWithCost
|
|
873
|
-
* @description create a market sell order by providing the symbol and cost
|
|
874
|
-
* @see https://docs.woo.org/#send-order
|
|
875
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
876
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
877
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
878
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
879
|
-
*/
|
|
880
880
|
await this.loadMarkets();
|
|
881
881
|
const market = this.market(symbol);
|
|
882
882
|
if (!market['spot']) {
|
|
@@ -884,22 +884,22 @@ export default class woo extends Exchange {
|
|
|
884
884
|
}
|
|
885
885
|
return await this.createOrder(symbol, 'market', 'sell', cost, 1, params);
|
|
886
886
|
}
|
|
887
|
+
/**
|
|
888
|
+
* @method
|
|
889
|
+
* @name woo#createTrailingAmountOrder
|
|
890
|
+
* @description create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
|
891
|
+
* @see https://docs.woo.org/#send-algo-order
|
|
892
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
893
|
+
* @param {string} type 'market' or 'limit'
|
|
894
|
+
* @param {string} side 'buy' or 'sell'
|
|
895
|
+
* @param {float} amount how much you want to trade in units of the base currency, or number of contracts
|
|
896
|
+
* @param {float} [price] the price for the order to be filled at, in units of the quote currency, ignored in market orders
|
|
897
|
+
* @param {float} trailingAmount the quote amount to trail away from the current market price
|
|
898
|
+
* @param {float} trailingTriggerPrice the price to activate a trailing order, default uses the price argument
|
|
899
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
900
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
901
|
+
*/
|
|
887
902
|
async createTrailingAmountOrder(symbol, type, side, amount, price = undefined, trailingAmount = undefined, trailingTriggerPrice = undefined, params = {}) {
|
|
888
|
-
/**
|
|
889
|
-
* @method
|
|
890
|
-
* @name woo#createTrailingAmountOrder
|
|
891
|
-
* @description create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
|
|
892
|
-
* @see https://docs.woo.org/#send-algo-order
|
|
893
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
894
|
-
* @param {string} type 'market' or 'limit'
|
|
895
|
-
* @param {string} side 'buy' or 'sell'
|
|
896
|
-
* @param {float} amount how much you want to trade in units of the base currency, or number of contracts
|
|
897
|
-
* @param {float} [price] the price for the order to be filled at, in units of the quote currency, ignored in market orders
|
|
898
|
-
* @param {float} trailingAmount the quote amount to trail away from the current market price
|
|
899
|
-
* @param {float} trailingTriggerPrice the price to activate a trailing order, default uses the price argument
|
|
900
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
901
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
902
|
-
*/
|
|
903
903
|
if (trailingAmount === undefined) {
|
|
904
904
|
throw new ArgumentsRequired(this.id + ' createTrailingAmountOrder() requires a trailingAmount argument');
|
|
905
905
|
}
|
|
@@ -910,22 +910,22 @@ export default class woo extends Exchange {
|
|
|
910
910
|
params['trailingTriggerPrice'] = trailingTriggerPrice;
|
|
911
911
|
return await this.createOrder(symbol, type, side, amount, price, params);
|
|
912
912
|
}
|
|
913
|
+
/**
|
|
914
|
+
* @method
|
|
915
|
+
* @name woo#createTrailingPercentOrder
|
|
916
|
+
* @description create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
|
917
|
+
* @see https://docs.woo.org/#send-algo-order
|
|
918
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
919
|
+
* @param {string} type 'market' or 'limit'
|
|
920
|
+
* @param {string} side 'buy' or 'sell'
|
|
921
|
+
* @param {float} amount how much you want to trade in units of the base currency, or number of contracts
|
|
922
|
+
* @param {float} [price] the price for the order to be filled at, in units of the quote currency, ignored in market orders
|
|
923
|
+
* @param {float} trailingPercent the percent to trail away from the current market price
|
|
924
|
+
* @param {float} trailingTriggerPrice the price to activate a trailing order, default uses the price argument
|
|
925
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
926
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
927
|
+
*/
|
|
913
928
|
async createTrailingPercentOrder(symbol, type, side, amount, price = undefined, trailingPercent = undefined, trailingTriggerPrice = undefined, params = {}) {
|
|
914
|
-
/**
|
|
915
|
-
* @method
|
|
916
|
-
* @name woo#createTrailingPercentOrder
|
|
917
|
-
* @description create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
|
|
918
|
-
* @see https://docs.woo.org/#send-algo-order
|
|
919
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
920
|
-
* @param {string} type 'market' or 'limit'
|
|
921
|
-
* @param {string} side 'buy' or 'sell'
|
|
922
|
-
* @param {float} amount how much you want to trade in units of the base currency, or number of contracts
|
|
923
|
-
* @param {float} [price] the price for the order to be filled at, in units of the quote currency, ignored in market orders
|
|
924
|
-
* @param {float} trailingPercent the percent to trail away from the current market price
|
|
925
|
-
* @param {float} trailingTriggerPrice the price to activate a trailing order, default uses the price argument
|
|
926
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
927
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
928
|
-
*/
|
|
929
929
|
if (trailingPercent === undefined) {
|
|
930
930
|
throw new ArgumentsRequired(this.id + ' createTrailingPercentOrder() requires a trailingPercent argument');
|
|
931
931
|
}
|
|
@@ -936,33 +936,33 @@ export default class woo extends Exchange {
|
|
|
936
936
|
params['trailingTriggerPrice'] = trailingTriggerPrice;
|
|
937
937
|
return await this.createOrder(symbol, type, side, amount, price, params);
|
|
938
938
|
}
|
|
939
|
+
/**
|
|
940
|
+
* @method
|
|
941
|
+
* @name woo#createOrder
|
|
942
|
+
* @description create a trade order
|
|
943
|
+
* @see https://docs.woo.org/#send-order
|
|
944
|
+
* @see https://docs.woo.org/#send-algo-order
|
|
945
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
946
|
+
* @param {string} type 'market' or 'limit'
|
|
947
|
+
* @param {string} side 'buy' or 'sell'
|
|
948
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
949
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
950
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
951
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated', default 'cross'
|
|
952
|
+
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
953
|
+
* @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)
|
|
954
|
+
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
955
|
+
* @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)
|
|
956
|
+
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
957
|
+
* @param {float} [params.algoType] 'STOP' or 'TRAILING_STOP' or 'OCO' or 'CLOSE_POSITION'
|
|
958
|
+
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
959
|
+
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
960
|
+
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
961
|
+
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
962
|
+
* @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
|
|
963
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
964
|
+
*/
|
|
939
965
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
940
|
-
/**
|
|
941
|
-
* @method
|
|
942
|
-
* @name woo#createOrder
|
|
943
|
-
* @description create a trade order
|
|
944
|
-
* @see https://docs.woo.org/#send-order
|
|
945
|
-
* @see https://docs.woo.org/#send-algo-order
|
|
946
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
947
|
-
* @param {string} type 'market' or 'limit'
|
|
948
|
-
* @param {string} side 'buy' or 'sell'
|
|
949
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
950
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
951
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
952
|
-
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated', default 'cross'
|
|
953
|
-
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
954
|
-
* @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)
|
|
955
|
-
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
956
|
-
* @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)
|
|
957
|
-
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
958
|
-
* @param {float} [params.algoType] 'STOP' or 'TRAILING_STOP' or 'OCO' or 'CLOSE_POSITION'
|
|
959
|
-
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
960
|
-
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
961
|
-
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
962
|
-
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
963
|
-
* @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
|
|
964
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
965
|
-
*/
|
|
966
966
|
const reduceOnly = this.safeBool2(params, 'reduceOnly', 'reduce_only');
|
|
967
967
|
params = this.omit(params, ['reduceOnly', 'reduce_only']);
|
|
968
968
|
const orderType = type.toUpperCase();
|
|
@@ -1146,30 +1146,30 @@ export default class woo extends Exchange {
|
|
|
1146
1146
|
};
|
|
1147
1147
|
return this.safeString(modes, mode, mode);
|
|
1148
1148
|
}
|
|
1149
|
+
/**
|
|
1150
|
+
* @method
|
|
1151
|
+
* @name woo#editOrder
|
|
1152
|
+
* @description edit a trade order
|
|
1153
|
+
* @see https://docs.woo.org/#edit-order
|
|
1154
|
+
* @see https://docs.woo.org/#edit-order-by-client_order_id
|
|
1155
|
+
* @see https://docs.woo.org/#edit-algo-order
|
|
1156
|
+
* @see https://docs.woo.org/#edit-algo-order-by-client_order_id
|
|
1157
|
+
* @param {string} id order id
|
|
1158
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1159
|
+
* @param {string} type 'market' or 'limit'
|
|
1160
|
+
* @param {string} side 'buy' or 'sell'
|
|
1161
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1162
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1163
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1164
|
+
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
1165
|
+
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
1166
|
+
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
1167
|
+
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
1168
|
+
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
1169
|
+
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
1170
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1171
|
+
*/
|
|
1149
1172
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1150
|
-
/**
|
|
1151
|
-
* @method
|
|
1152
|
-
* @name woo#editOrder
|
|
1153
|
-
* @description edit a trade order
|
|
1154
|
-
* @see https://docs.woo.org/#edit-order
|
|
1155
|
-
* @see https://docs.woo.org/#edit-order-by-client_order_id
|
|
1156
|
-
* @see https://docs.woo.org/#edit-algo-order
|
|
1157
|
-
* @see https://docs.woo.org/#edit-algo-order-by-client_order_id
|
|
1158
|
-
* @param {string} id order id
|
|
1159
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1160
|
-
* @param {string} type 'market' or 'limit'
|
|
1161
|
-
* @param {string} side 'buy' or 'sell'
|
|
1162
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1163
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1164
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1165
|
-
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
1166
|
-
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
1167
|
-
* @param {float} [params.takeProfitPrice] price to trigger take-profit orders
|
|
1168
|
-
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
1169
|
-
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
1170
|
-
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
1171
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1172
|
-
*/
|
|
1173
1173
|
await this.loadMarkets();
|
|
1174
1174
|
const market = this.market(symbol);
|
|
1175
1175
|
const request = {
|
|
@@ -1243,20 +1243,20 @@ export default class woo extends Exchange {
|
|
|
1243
1243
|
const data = this.safeDict(response, 'data', {});
|
|
1244
1244
|
return this.parseOrder(data, market);
|
|
1245
1245
|
}
|
|
1246
|
+
/**
|
|
1247
|
+
* @method
|
|
1248
|
+
* @name woo#cancelOrder
|
|
1249
|
+
* @see https://docs.woo.org/#cancel-algo-order
|
|
1250
|
+
* @see https://docs.woo.org/#cancel-order
|
|
1251
|
+
* @see https://docs.woo.org/#cancel-order-by-client_order_id
|
|
1252
|
+
* @description cancels an open order
|
|
1253
|
+
* @param {string} id order id
|
|
1254
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1255
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1256
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1257
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1258
|
+
*/
|
|
1246
1259
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1247
|
-
/**
|
|
1248
|
-
* @method
|
|
1249
|
-
* @name woo#cancelOrder
|
|
1250
|
-
* @see https://docs.woo.org/#cancel-algo-order
|
|
1251
|
-
* @see https://docs.woo.org/#cancel-order
|
|
1252
|
-
* @see https://docs.woo.org/#cancel-order-by-client_order_id
|
|
1253
|
-
* @description cancels an open order
|
|
1254
|
-
* @param {string} id order id
|
|
1255
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1256
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1257
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1258
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1259
|
-
*/
|
|
1260
1260
|
const stop = this.safeBool(params, 'stop', false);
|
|
1261
1261
|
params = this.omit(params, 'stop');
|
|
1262
1262
|
if (!stop && (symbol === undefined)) {
|
|
@@ -1300,19 +1300,19 @@ export default class woo extends Exchange {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
return this.extend(this.parseOrder(response), extendParams);
|
|
1302
1302
|
}
|
|
1303
|
+
/**
|
|
1304
|
+
* @method
|
|
1305
|
+
* @name woo#cancelAllOrders
|
|
1306
|
+
* @see https://docs.woo.org/#cancel-all-pending-orders
|
|
1307
|
+
* @see https://docs.woo.org/#cancel-orders
|
|
1308
|
+
* @see https://docs.woo.org/#cancel-all-pending-algo-orders
|
|
1309
|
+
* @description cancel all open orders in a market
|
|
1310
|
+
* @param {string} symbol unified market symbol
|
|
1311
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1312
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1313
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1314
|
+
*/
|
|
1303
1315
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1304
|
-
/**
|
|
1305
|
-
* @method
|
|
1306
|
-
* @name woo#cancelAllOrders
|
|
1307
|
-
* @see https://docs.woo.org/#cancel-all-pending-orders
|
|
1308
|
-
* @see https://docs.woo.org/#cancel-orders
|
|
1309
|
-
* @see https://docs.woo.org/#cancel-all-pending-algo-orders
|
|
1310
|
-
* @description cancel all open orders in a market
|
|
1311
|
-
* @param {string} symbol unified market symbol
|
|
1312
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1313
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1314
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1315
|
-
*/
|
|
1316
1316
|
await this.loadMarkets();
|
|
1317
1317
|
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
1318
1318
|
params = this.omit(params, ['stop', 'trigger']);
|
|
@@ -1337,17 +1337,16 @@ export default class woo extends Exchange {
|
|
|
1337
1337
|
this.safeOrder(response),
|
|
1338
1338
|
];
|
|
1339
1339
|
}
|
|
1340
|
+
/**
|
|
1341
|
+
* @method
|
|
1342
|
+
* @name woo#cancelAllOrdersAfter
|
|
1343
|
+
* @description dead man's switch, cancel all orders after the given timeout
|
|
1344
|
+
* @see https://docs.woo.org/#cancel-all-after
|
|
1345
|
+
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
1346
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1347
|
+
* @returns {object} the api result
|
|
1348
|
+
*/
|
|
1340
1349
|
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
1341
|
-
/**
|
|
1342
|
-
* @method
|
|
1343
|
-
* @name woo#cancelAllOrdersAfter
|
|
1344
|
-
* @description dead man's switch, cancel all orders after the given timeout
|
|
1345
|
-
* @see https://docs.woo.org/#cancel-all-after
|
|
1346
|
-
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
1347
|
-
* @param {boolean} activated countdown
|
|
1348
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1349
|
-
* @returns {object} the api result
|
|
1350
|
-
*/
|
|
1351
1350
|
await this.loadMarkets();
|
|
1352
1351
|
const request = {
|
|
1353
1352
|
'trigger_after': (timeout > 0) ? timeout : 0,
|
|
@@ -1366,19 +1365,19 @@ export default class woo extends Exchange {
|
|
|
1366
1365
|
this.safeOrder(response),
|
|
1367
1366
|
];
|
|
1368
1367
|
}
|
|
1368
|
+
/**
|
|
1369
|
+
* @method
|
|
1370
|
+
* @name woo#fetchOrder
|
|
1371
|
+
* @see https://docs.woo.org/#get-algo-order
|
|
1372
|
+
* @see https://docs.woo.org/#get-order
|
|
1373
|
+
* @description fetches information on an order made by the user
|
|
1374
|
+
* @param {string} id the order id
|
|
1375
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1376
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1377
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1378
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1379
|
+
*/
|
|
1369
1380
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1370
|
-
/**
|
|
1371
|
-
* @method
|
|
1372
|
-
* @name woo#fetchOrder
|
|
1373
|
-
* @see https://docs.woo.org/#get-algo-order
|
|
1374
|
-
* @see https://docs.woo.org/#get-order
|
|
1375
|
-
* @description fetches information on an order made by the user
|
|
1376
|
-
* @param {string} id the order id
|
|
1377
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1378
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1379
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1380
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1381
|
-
*/
|
|
1382
1381
|
await this.loadMarkets();
|
|
1383
1382
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
1384
1383
|
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
@@ -1436,24 +1435,24 @@ export default class woo extends Exchange {
|
|
|
1436
1435
|
const orders = this.safeDict(response, 'data', response);
|
|
1437
1436
|
return this.parseOrder(orders, market);
|
|
1438
1437
|
}
|
|
1438
|
+
/**
|
|
1439
|
+
* @method
|
|
1440
|
+
* @name woo#fetchOrders
|
|
1441
|
+
* @description fetches information on multiple orders made by the user
|
|
1442
|
+
* @see https://docs.woo.org/#get-orders
|
|
1443
|
+
* @see https://docs.woo.org/#get-algo-orders
|
|
1444
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1445
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1446
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1447
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1448
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1449
|
+
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1450
|
+
* @param {string} [params.side] 'buy' or 'sell'
|
|
1451
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1452
|
+
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1453
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1454
|
+
*/
|
|
1439
1455
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1440
|
-
/**
|
|
1441
|
-
* @method
|
|
1442
|
-
* @name woo#fetchOrders
|
|
1443
|
-
* @description fetches information on multiple orders made by the user
|
|
1444
|
-
* @see https://docs.woo.org/#get-orders
|
|
1445
|
-
* @see https://docs.woo.org/#get-algo-orders
|
|
1446
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1447
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1448
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1449
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1450
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1451
|
-
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1452
|
-
* @param {string} [params.side] 'buy' or 'sell'
|
|
1453
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1454
|
-
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1455
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1456
|
-
*/
|
|
1457
1456
|
await this.loadMarkets();
|
|
1458
1457
|
let paginate = false;
|
|
1459
1458
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOrders', 'paginate');
|
|
@@ -1531,46 +1530,46 @@ export default class woo extends Exchange {
|
|
|
1531
1530
|
const orders = this.safeList(data, 'rows');
|
|
1532
1531
|
return this.parseOrders(orders, market, since, limit);
|
|
1533
1532
|
}
|
|
1533
|
+
/**
|
|
1534
|
+
* @method
|
|
1535
|
+
* @name woo#fetchOpenOrders
|
|
1536
|
+
* @description fetches information on multiple orders made by the user
|
|
1537
|
+
* @see https://docs.woo.org/#get-orders
|
|
1538
|
+
* @see https://docs.woo.org/#get-algo-orders
|
|
1539
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1540
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1541
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1542
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1543
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1544
|
+
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1545
|
+
* @param {string} [params.side] 'buy' or 'sell'
|
|
1546
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1547
|
+
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1548
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1549
|
+
*/
|
|
1534
1550
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1535
|
-
/**
|
|
1536
|
-
* @method
|
|
1537
|
-
* @name woo#fetchOpenOrders
|
|
1538
|
-
* @description fetches information on multiple orders made by the user
|
|
1539
|
-
* @see https://docs.woo.org/#get-orders
|
|
1540
|
-
* @see https://docs.woo.org/#get-algo-orders
|
|
1541
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1542
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1543
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1544
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1545
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1546
|
-
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1547
|
-
* @param {string} [params.side] 'buy' or 'sell'
|
|
1548
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1549
|
-
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1550
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1551
|
-
*/
|
|
1552
1551
|
await this.loadMarkets();
|
|
1553
1552
|
const extendedParams = this.extend(params, { 'status': 'INCOMPLETE' });
|
|
1554
1553
|
return await this.fetchOrders(symbol, since, limit, extendedParams);
|
|
1555
1554
|
}
|
|
1555
|
+
/**
|
|
1556
|
+
* @method
|
|
1557
|
+
* @name woo#fetchClosedOrders
|
|
1558
|
+
* @description fetches information on multiple orders made by the user
|
|
1559
|
+
* @see https://docs.woo.org/#get-orders
|
|
1560
|
+
* @see https://docs.woo.org/#get-algo-orders
|
|
1561
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1562
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1563
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1564
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1565
|
+
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1566
|
+
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1567
|
+
* @param {string} [params.side] 'buy' or 'sell'
|
|
1568
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1569
|
+
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1570
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1571
|
+
*/
|
|
1556
1572
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1557
|
-
/**
|
|
1558
|
-
* @method
|
|
1559
|
-
* @name woo#fetchClosedOrders
|
|
1560
|
-
* @description fetches information on multiple orders made by the user
|
|
1561
|
-
* @see https://docs.woo.org/#get-orders
|
|
1562
|
-
* @see https://docs.woo.org/#get-algo-orders
|
|
1563
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1564
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1565
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1566
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1567
|
-
* @param {boolean} [params.stop] whether the order is a stop/algo order
|
|
1568
|
-
* @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
|
|
1569
|
-
* @param {string} [params.side] 'buy' or 'sell'
|
|
1570
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
1571
|
-
* @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
|
|
1572
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1573
|
-
*/
|
|
1574
1573
|
await this.loadMarkets();
|
|
1575
1574
|
const extendedParams = this.extend(params, { 'status': 'COMPLETED' });
|
|
1576
1575
|
return await this.fetchOrders(symbol, since, limit, extendedParams);
|
|
@@ -1711,17 +1710,17 @@ export default class woo extends Exchange {
|
|
|
1711
1710
|
}
|
|
1712
1711
|
return status;
|
|
1713
1712
|
}
|
|
1713
|
+
/**
|
|
1714
|
+
* @method
|
|
1715
|
+
* @name woo#fetchOrderBook
|
|
1716
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1717
|
+
* @see https://docs.woo.org/#orderbook-snapshot-public
|
|
1718
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1719
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1720
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1721
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1722
|
+
*/
|
|
1714
1723
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1715
|
-
/**
|
|
1716
|
-
* @method
|
|
1717
|
-
* @name woo#fetchOrderBook
|
|
1718
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1719
|
-
* @see https://docs.woo.org/#orderbook-snapshot-public
|
|
1720
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1721
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1722
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1723
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1724
|
-
*/
|
|
1725
1724
|
await this.loadMarkets();
|
|
1726
1725
|
const market = this.market(symbol);
|
|
1727
1726
|
const request = {
|
|
@@ -1751,20 +1750,20 @@ export default class woo extends Exchange {
|
|
|
1751
1750
|
const timestamp = this.safeInteger(response, 'timestamp');
|
|
1752
1751
|
return this.parseOrderBook(response, symbol, timestamp, 'bids', 'asks', 'price', 'quantity');
|
|
1753
1752
|
}
|
|
1753
|
+
/**
|
|
1754
|
+
* @method
|
|
1755
|
+
* @name woo#fetchOHLCV
|
|
1756
|
+
* @see https://docs.woo.org/#kline-public
|
|
1757
|
+
* @see https://docs.woo.org/#kline-historical-data-public
|
|
1758
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1759
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1760
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1761
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1762
|
+
* @param {int} [limit] max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
|
|
1763
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1764
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1765
|
+
*/
|
|
1754
1766
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1755
|
-
/**
|
|
1756
|
-
* @method
|
|
1757
|
-
* @name woo#fetchOHLCV
|
|
1758
|
-
* @see https://docs.woo.org/#kline-public
|
|
1759
|
-
* @see https://docs.woo.org/#kline-historical-data-public
|
|
1760
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1761
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1762
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1763
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1764
|
-
* @param {int} [limit] max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
|
|
1765
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1766
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1767
|
-
*/
|
|
1768
1767
|
await this.loadMarkets();
|
|
1769
1768
|
const market = this.market(symbol);
|
|
1770
1769
|
const request = {
|
|
@@ -1847,19 +1846,19 @@ export default class woo extends Exchange {
|
|
|
1847
1846
|
this.safeNumber(ohlcv, 'volume'),
|
|
1848
1847
|
];
|
|
1849
1848
|
}
|
|
1849
|
+
/**
|
|
1850
|
+
* @method
|
|
1851
|
+
* @name woo#fetchOrderTrades
|
|
1852
|
+
* @description fetch all the trades made from a single order
|
|
1853
|
+
* @see https://docs.woo.org/#get-trades
|
|
1854
|
+
* @param {string} id order id
|
|
1855
|
+
* @param {string} symbol unified market symbol
|
|
1856
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1857
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1858
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1859
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1860
|
+
*/
|
|
1850
1861
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1851
|
-
/**
|
|
1852
|
-
* @method
|
|
1853
|
-
* @name woo#fetchOrderTrades
|
|
1854
|
-
* @description fetch all the trades made from a single order
|
|
1855
|
-
* @see https://docs.woo.org/#get-trades
|
|
1856
|
-
* @param {string} id order id
|
|
1857
|
-
* @param {string} symbol unified market symbol
|
|
1858
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1859
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1860
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1861
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1862
|
-
*/
|
|
1863
1862
|
await this.loadMarkets();
|
|
1864
1863
|
let market = undefined;
|
|
1865
1864
|
if (symbol !== undefined) {
|
|
@@ -1890,19 +1889,19 @@ export default class woo extends Exchange {
|
|
|
1890
1889
|
const trades = this.safeList(response, 'rows', []);
|
|
1891
1890
|
return this.parseTrades(trades, market, since, limit, params);
|
|
1892
1891
|
}
|
|
1892
|
+
/**
|
|
1893
|
+
* @method
|
|
1894
|
+
* @name woo#fetchMyTrades
|
|
1895
|
+
* @description fetch all trades made by the user
|
|
1896
|
+
* @see https://docs.woo.org/#get-trades
|
|
1897
|
+
* @param {string} symbol unified market symbol
|
|
1898
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1899
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1900
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1901
|
+
* @param {boolean} [params.paginate] set to true if you want to fetch trades with pagination
|
|
1902
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1903
|
+
*/
|
|
1893
1904
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1894
|
-
/**
|
|
1895
|
-
* @method
|
|
1896
|
-
* @name woo#fetchMyTrades
|
|
1897
|
-
* @description fetch all trades made by the user
|
|
1898
|
-
* @see https://docs.woo.org/#get-trades
|
|
1899
|
-
* @param {string} symbol unified market symbol
|
|
1900
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1901
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1902
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1903
|
-
* @param {boolean} [params.paginate] set to true if you want to fetch trades with pagination
|
|
1904
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1905
|
-
*/
|
|
1906
1905
|
await this.loadMarkets();
|
|
1907
1906
|
let paginate = false;
|
|
1908
1907
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
|
|
@@ -1951,15 +1950,15 @@ export default class woo extends Exchange {
|
|
|
1951
1950
|
const trades = this.safeList(response, 'rows', []);
|
|
1952
1951
|
return this.parseTrades(trades, market, since, limit, params);
|
|
1953
1952
|
}
|
|
1953
|
+
/**
|
|
1954
|
+
* @method
|
|
1955
|
+
* @name woo#fetchAccounts
|
|
1956
|
+
* @description fetch all the accounts associated with a profile
|
|
1957
|
+
* @see https://docs.woo.org/#get-assets-of-subaccounts
|
|
1958
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1959
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
1960
|
+
*/
|
|
1954
1961
|
async fetchAccounts(params = {}) {
|
|
1955
|
-
/**
|
|
1956
|
-
* @method
|
|
1957
|
-
* @name woo#fetchAccounts
|
|
1958
|
-
* @description fetch all the accounts associated with a profile
|
|
1959
|
-
* @see https://docs.woo.org/#get-assets-of-subaccounts
|
|
1960
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1961
|
-
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
1962
|
-
*/
|
|
1963
1962
|
const response = await this.v1PrivateGetSubAccountAssets(params);
|
|
1964
1963
|
//
|
|
1965
1964
|
// {
|
|
@@ -1997,15 +1996,15 @@ export default class woo extends Exchange {
|
|
|
1997
1996
|
'type': accountId === 'Main' ? 'main' : 'subaccount',
|
|
1998
1997
|
};
|
|
1999
1998
|
}
|
|
1999
|
+
/**
|
|
2000
|
+
* @method
|
|
2001
|
+
* @name woo#fetchBalance
|
|
2002
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2003
|
+
* @see https://docs.woo.org/#get-current-holding-get-balance-new
|
|
2004
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2005
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2006
|
+
*/
|
|
2000
2007
|
async fetchBalance(params = {}) {
|
|
2001
|
-
/**
|
|
2002
|
-
* @method
|
|
2003
|
-
* @name woo#fetchBalance
|
|
2004
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2005
|
-
* @see https://docs.woo.org/#get-current-holding-get-balance-new
|
|
2006
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2007
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2008
|
-
*/
|
|
2009
2008
|
await this.loadMarkets();
|
|
2010
2009
|
const response = await this.v3PrivateGetBalances(params);
|
|
2011
2010
|
//
|
|
@@ -2049,16 +2048,16 @@ export default class woo extends Exchange {
|
|
|
2049
2048
|
}
|
|
2050
2049
|
return this.safeBalance(result);
|
|
2051
2050
|
}
|
|
2051
|
+
/**
|
|
2052
|
+
* @method
|
|
2053
|
+
* @name woo#fetchDepositAddress
|
|
2054
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
2055
|
+
* @see https://docs.woo.org/#get-token-deposit-address
|
|
2056
|
+
* @param {string} code unified currency code
|
|
2057
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2058
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2059
|
+
*/
|
|
2052
2060
|
async fetchDepositAddress(code, params = {}) {
|
|
2053
|
-
/**
|
|
2054
|
-
* @method
|
|
2055
|
-
* @name woo#fetchDepositAddress
|
|
2056
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
2057
|
-
* @see https://docs.woo.org/#get-token-deposit-address
|
|
2058
|
-
* @param {string} code unified currency code
|
|
2059
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2060
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2061
|
-
*/
|
|
2062
2061
|
// this method is TODO because of networks unification
|
|
2063
2062
|
await this.loadMarkets();
|
|
2064
2063
|
const currency = this.currency(code);
|
|
@@ -2142,18 +2141,18 @@ export default class woo extends Exchange {
|
|
|
2142
2141
|
// }
|
|
2143
2142
|
return [currency, this.safeList(response, 'rows', [])];
|
|
2144
2143
|
}
|
|
2144
|
+
/**
|
|
2145
|
+
* @method
|
|
2146
|
+
* @name woo#fetchLedger
|
|
2147
|
+
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2148
|
+
* @see https://docs.woo.org/#get-asset-history
|
|
2149
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2150
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2151
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2152
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2153
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2154
|
+
*/
|
|
2145
2155
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2146
|
-
/**
|
|
2147
|
-
* @method
|
|
2148
|
-
* @name woo#fetchLedger
|
|
2149
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2150
|
-
* @see https://docs.woo.org/#get-asset-history
|
|
2151
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
2152
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2153
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2154
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2155
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2156
|
-
*/
|
|
2157
2156
|
const [currency, rows] = await this.getAssetHistoryRows(code, since, limit, params);
|
|
2158
2157
|
return this.parseLedger(rows, currency, since, limit, params);
|
|
2159
2158
|
}
|
|
@@ -2208,52 +2207,52 @@ export default class woo extends Exchange {
|
|
|
2208
2207
|
}
|
|
2209
2208
|
return currency;
|
|
2210
2209
|
}
|
|
2210
|
+
/**
|
|
2211
|
+
* @method
|
|
2212
|
+
* @name woo#fetchDeposits
|
|
2213
|
+
* @description fetch all deposits made to an account
|
|
2214
|
+
* @see https://docs.woo.org/#get-asset-history
|
|
2215
|
+
* @param {string} code unified currency code
|
|
2216
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2217
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2218
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2219
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2220
|
+
*/
|
|
2211
2221
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2212
|
-
/**
|
|
2213
|
-
* @method
|
|
2214
|
-
* @name woo#fetchDeposits
|
|
2215
|
-
* @description fetch all deposits made to an account
|
|
2216
|
-
* @see https://docs.woo.org/#get-asset-history
|
|
2217
|
-
* @param {string} code unified currency code
|
|
2218
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2219
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2220
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2221
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2222
|
-
*/
|
|
2223
2222
|
const request = {
|
|
2224
2223
|
'token_side': 'DEPOSIT',
|
|
2225
2224
|
};
|
|
2226
2225
|
return await this.fetchDepositsWithdrawals(code, since, limit, this.extend(request, params));
|
|
2227
2226
|
}
|
|
2227
|
+
/**
|
|
2228
|
+
* @method
|
|
2229
|
+
* @name woo#fetchWithdrawals
|
|
2230
|
+
* @description fetch all withdrawals made from an account
|
|
2231
|
+
* @see https://docs.woo.org/#get-asset-history
|
|
2232
|
+
* @param {string} code unified currency code
|
|
2233
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2234
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2235
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2236
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2237
|
+
*/
|
|
2228
2238
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2229
|
-
/**
|
|
2230
|
-
* @method
|
|
2231
|
-
* @name woo#fetchWithdrawals
|
|
2232
|
-
* @description fetch all withdrawals made from an account
|
|
2233
|
-
* @see https://docs.woo.org/#get-asset-history
|
|
2234
|
-
* @param {string} code unified currency code
|
|
2235
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2236
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2237
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2238
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2239
|
-
*/
|
|
2240
2239
|
const request = {
|
|
2241
2240
|
'token_side': 'WITHDRAW',
|
|
2242
2241
|
};
|
|
2243
2242
|
return await this.fetchDepositsWithdrawals(code, since, limit, this.extend(request, params));
|
|
2244
2243
|
}
|
|
2244
|
+
/**
|
|
2245
|
+
* @method
|
|
2246
|
+
* @name woo#fetchDepositsWithdrawals
|
|
2247
|
+
* @description fetch history of deposits and withdrawals
|
|
2248
|
+
* @see https://docs.woo.org/#get-asset-history
|
|
2249
|
+
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
2250
|
+
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2251
|
+
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2252
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2253
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2254
|
+
*/
|
|
2245
2255
|
async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2246
|
-
/**
|
|
2247
|
-
* @method
|
|
2248
|
-
* @name woo#fetchDepositsWithdrawals
|
|
2249
|
-
* @description fetch history of deposits and withdrawals
|
|
2250
|
-
* @see https://docs.woo.org/#get-asset-history
|
|
2251
|
-
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
2252
|
-
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2253
|
-
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2254
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2255
|
-
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2256
|
-
*/
|
|
2257
2256
|
const request = {
|
|
2258
2257
|
'type': 'BALANCE',
|
|
2259
2258
|
};
|
|
@@ -2317,19 +2316,19 @@ export default class woo extends Exchange {
|
|
|
2317
2316
|
};
|
|
2318
2317
|
return this.safeString(statuses, status, status);
|
|
2319
2318
|
}
|
|
2319
|
+
/**
|
|
2320
|
+
* @method
|
|
2321
|
+
* @name woo#transfer
|
|
2322
|
+
* @description transfer currency internally between wallets on the same account
|
|
2323
|
+
* @see https://docs.woo.org/#get-transfer-history
|
|
2324
|
+
* @param {string} code unified currency code
|
|
2325
|
+
* @param {float} amount amount to transfer
|
|
2326
|
+
* @param {string} fromAccount account to transfer from
|
|
2327
|
+
* @param {string} toAccount account to transfer to
|
|
2328
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2329
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2330
|
+
*/
|
|
2320
2331
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
2321
|
-
/**
|
|
2322
|
-
* @method
|
|
2323
|
-
* @name woo#transfer
|
|
2324
|
-
* @description transfer currency internally between wallets on the same account
|
|
2325
|
-
* @see https://docs.woo.org/#get-transfer-history
|
|
2326
|
-
* @param {string} code unified currency code
|
|
2327
|
-
* @param {float} amount amount to transfer
|
|
2328
|
-
* @param {string} fromAccount account to transfer from
|
|
2329
|
-
* @param {string} toAccount account to transfer to
|
|
2330
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2331
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2332
|
-
*/
|
|
2333
2332
|
await this.loadMarkets();
|
|
2334
2333
|
const currency = this.currency(code);
|
|
2335
2334
|
const request = {
|
|
@@ -2355,19 +2354,19 @@ export default class woo extends Exchange {
|
|
|
2355
2354
|
}
|
|
2356
2355
|
return transfer;
|
|
2357
2356
|
}
|
|
2357
|
+
/**
|
|
2358
|
+
* @method
|
|
2359
|
+
* @name woo#fetchTransfers
|
|
2360
|
+
* @description fetch a history of internal transfers made on an account
|
|
2361
|
+
* @see https://docs.woo.org/#get-transfer-history
|
|
2362
|
+
* @param {string} code unified currency code of the currency transferred
|
|
2363
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2364
|
+
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2365
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2366
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2367
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2368
|
+
*/
|
|
2358
2369
|
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2359
|
-
/**
|
|
2360
|
-
* @method
|
|
2361
|
-
* @name woo#fetchTransfers
|
|
2362
|
-
* @description fetch a history of internal transfers made on an account
|
|
2363
|
-
* @see https://docs.woo.org/#get-transfer-history
|
|
2364
|
-
* @param {string} code unified currency code of the currency transferred
|
|
2365
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2366
|
-
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2367
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2368
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2369
|
-
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2370
|
-
*/
|
|
2371
2370
|
const request = {};
|
|
2372
2371
|
if (limit !== undefined) {
|
|
2373
2372
|
request['size'] = limit;
|
|
@@ -2461,19 +2460,19 @@ export default class woo extends Exchange {
|
|
|
2461
2460
|
};
|
|
2462
2461
|
return this.safeString(statuses, status, status);
|
|
2463
2462
|
}
|
|
2463
|
+
/**
|
|
2464
|
+
* @method
|
|
2465
|
+
* @name woo#withdraw
|
|
2466
|
+
* @description make a withdrawal
|
|
2467
|
+
* @see https://docs.woo.org/#token-withdraw
|
|
2468
|
+
* @param {string} code unified currency code
|
|
2469
|
+
* @param {float} amount the amount to withdraw
|
|
2470
|
+
* @param {string} address the address to withdraw to
|
|
2471
|
+
* @param {string} tag
|
|
2472
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2473
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2474
|
+
*/
|
|
2464
2475
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2465
|
-
/**
|
|
2466
|
-
* @method
|
|
2467
|
-
* @name woo#withdraw
|
|
2468
|
-
* @description make a withdrawal
|
|
2469
|
-
* @see https://docs.woo.org/#token-withdraw
|
|
2470
|
-
* @param {string} code unified currency code
|
|
2471
|
-
* @param {float} amount the amount to withdraw
|
|
2472
|
-
* @param {string} address the address to withdraw to
|
|
2473
|
-
* @param {string} tag
|
|
2474
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2475
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2476
|
-
*/
|
|
2477
2476
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2478
2477
|
await this.loadMarkets();
|
|
2479
2478
|
this.checkAddress(address);
|
|
@@ -2504,18 +2503,18 @@ export default class woo extends Exchange {
|
|
|
2504
2503
|
//
|
|
2505
2504
|
return this.parseTransaction(response, currency);
|
|
2506
2505
|
}
|
|
2506
|
+
/**
|
|
2507
|
+
* @method
|
|
2508
|
+
* @name woo#repayMargin
|
|
2509
|
+
* @description repay borrowed margin and interest
|
|
2510
|
+
* @see https://docs.woo.org/#repay-interest
|
|
2511
|
+
* @param {string} code unified currency code of the currency to repay
|
|
2512
|
+
* @param {float} amount the amount to repay
|
|
2513
|
+
* @param {string} symbol not used by woo.repayMargin ()
|
|
2514
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2515
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
2516
|
+
*/
|
|
2507
2517
|
async repayMargin(code, amount, symbol = undefined, params = {}) {
|
|
2508
|
-
/**
|
|
2509
|
-
* @method
|
|
2510
|
-
* @name woo#repayMargin
|
|
2511
|
-
* @description repay borrowed margin and interest
|
|
2512
|
-
* @see https://docs.woo.org/#repay-interest
|
|
2513
|
-
* @param {string} code unified currency code of the currency to repay
|
|
2514
|
-
* @param {float} amount the amount to repay
|
|
2515
|
-
* @param {string} symbol not used by woo.repayMargin ()
|
|
2516
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2517
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
2518
|
-
*/
|
|
2519
2518
|
await this.loadMarkets();
|
|
2520
2519
|
let market = undefined;
|
|
2521
2520
|
if (symbol !== undefined) {
|
|
@@ -2685,19 +2684,19 @@ export default class woo extends Exchange {
|
|
|
2685
2684
|
'rate': rate,
|
|
2686
2685
|
};
|
|
2687
2686
|
}
|
|
2687
|
+
/**
|
|
2688
|
+
* @method
|
|
2689
|
+
* @name woo#fetchFundingHistory
|
|
2690
|
+
* @description fetch the history of funding payments paid and received on this account
|
|
2691
|
+
* @see https://docs.woo.org/#get-funding-fee-history
|
|
2692
|
+
* @param {string} [symbol] unified market symbol
|
|
2693
|
+
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
2694
|
+
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
2695
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2696
|
+
* @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)
|
|
2697
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
2698
|
+
*/
|
|
2688
2699
|
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2689
|
-
/**
|
|
2690
|
-
* @method
|
|
2691
|
-
* @name woo#fetchFundingHistory
|
|
2692
|
-
* @description fetch the history of funding payments paid and received on this account
|
|
2693
|
-
* @see https://docs.woo.org/#get-funding-fee-history
|
|
2694
|
-
* @param {string} [symbol] unified market symbol
|
|
2695
|
-
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
2696
|
-
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
2697
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2698
|
-
* @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)
|
|
2699
|
-
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
2700
|
-
*/
|
|
2701
2700
|
await this.loadMarkets();
|
|
2702
2701
|
let paginate = false;
|
|
2703
2702
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingHistory', 'paginate');
|
|
@@ -2796,28 +2795,28 @@ export default class woo extends Exchange {
|
|
|
2796
2795
|
'interval': intervalString + 'h',
|
|
2797
2796
|
};
|
|
2798
2797
|
}
|
|
2798
|
+
/**
|
|
2799
|
+
* @method
|
|
2800
|
+
* @name woo#fetchFundingInterval
|
|
2801
|
+
* @description fetch the current funding rate interval
|
|
2802
|
+
* @see https://docs.woox.io/#get-predicted-funding-rate-for-one-market-public
|
|
2803
|
+
* @param {string} symbol unified market symbol
|
|
2804
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2805
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2806
|
+
*/
|
|
2799
2807
|
async fetchFundingInterval(symbol, params = {}) {
|
|
2800
|
-
/**
|
|
2801
|
-
* @method
|
|
2802
|
-
* @name woo#fetchFundingInterval
|
|
2803
|
-
* @description fetch the current funding rate interval
|
|
2804
|
-
* @see https://docs.woox.io/#get-predicted-funding-rate-for-one-market-public
|
|
2805
|
-
* @param {string} symbol unified market symbol
|
|
2806
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2807
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2808
|
-
*/
|
|
2809
2808
|
return await this.fetchFundingRate(symbol, params);
|
|
2810
2809
|
}
|
|
2810
|
+
/**
|
|
2811
|
+
* @method
|
|
2812
|
+
* @name woo#fetchFundingRate
|
|
2813
|
+
* @description fetch the current funding rate
|
|
2814
|
+
* @see https://docs.woox.io/#get-predicted-funding-rate-for-one-market-public
|
|
2815
|
+
* @param {string} symbol unified market symbol
|
|
2816
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2817
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2818
|
+
*/
|
|
2811
2819
|
async fetchFundingRate(symbol, params = {}) {
|
|
2812
|
-
/**
|
|
2813
|
-
* @method
|
|
2814
|
-
* @name woo#fetchFundingRate
|
|
2815
|
-
* @description fetch the current funding rate
|
|
2816
|
-
* @see https://docs.woox.io/#get-predicted-funding-rate-for-one-market-public
|
|
2817
|
-
* @param {string} symbol unified market symbol
|
|
2818
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2819
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2820
|
-
*/
|
|
2821
2820
|
await this.loadMarkets();
|
|
2822
2821
|
const market = this.market(symbol);
|
|
2823
2822
|
const request = {
|
|
@@ -2840,16 +2839,16 @@ export default class woo extends Exchange {
|
|
|
2840
2839
|
//
|
|
2841
2840
|
return this.parseFundingRate(response, market);
|
|
2842
2841
|
}
|
|
2842
|
+
/**
|
|
2843
|
+
* @method
|
|
2844
|
+
* @name woo#fetchFundingRates
|
|
2845
|
+
* @description fetch the funding rate for multiple markets
|
|
2846
|
+
* @see https://docs.woox.io/#get-predicted-funding-rate-for-all-markets-public
|
|
2847
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2848
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2849
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
2850
|
+
*/
|
|
2843
2851
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
2844
|
-
/**
|
|
2845
|
-
* @method
|
|
2846
|
-
* @name woo#fetchFundingRates
|
|
2847
|
-
* @description fetch the funding rate for multiple markets
|
|
2848
|
-
* @see https://docs.woox.io/#get-predicted-funding-rate-for-all-markets-public
|
|
2849
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2850
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2851
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
2852
|
-
*/
|
|
2853
2852
|
await this.loadMarkets();
|
|
2854
2853
|
symbols = this.marketSymbols(symbols);
|
|
2855
2854
|
const response = await this.v1PublicGetFundingRates(params);
|
|
@@ -2873,20 +2872,20 @@ export default class woo extends Exchange {
|
|
|
2873
2872
|
const result = this.parseFundingRates(rows);
|
|
2874
2873
|
return this.filterByArray(result, 'symbol', symbols);
|
|
2875
2874
|
}
|
|
2875
|
+
/**
|
|
2876
|
+
* @method
|
|
2877
|
+
* @name woo#fetchFundingRateHistory
|
|
2878
|
+
* @description fetches historical funding rate prices
|
|
2879
|
+
* @see https://docs.woo.org/#get-funding-rate-history-for-one-market-public
|
|
2880
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2881
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2882
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2883
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2884
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2885
|
+
* @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)
|
|
2886
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2887
|
+
*/
|
|
2876
2888
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2877
|
-
/**
|
|
2878
|
-
* @method
|
|
2879
|
-
* @name woo#fetchFundingRateHistory
|
|
2880
|
-
* @description fetches historical funding rate prices
|
|
2881
|
-
* @see https://docs.woo.org/#get-funding-rate-history-for-one-market-public
|
|
2882
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2883
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2884
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2885
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2886
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2887
|
-
* @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)
|
|
2888
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2889
|
-
*/
|
|
2890
2889
|
await this.loadMarkets();
|
|
2891
2890
|
let paginate = false;
|
|
2892
2891
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
@@ -2940,17 +2939,17 @@ export default class woo extends Exchange {
|
|
|
2940
2939
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
2941
2940
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
2942
2941
|
}
|
|
2942
|
+
/**
|
|
2943
|
+
* @method
|
|
2944
|
+
* @name woo#setPositionMode
|
|
2945
|
+
* @description set hedged to true or false for a market
|
|
2946
|
+
* @see https://docs.woo.org/#update-position-mode
|
|
2947
|
+
* @param {bool} hedged set to true to use HEDGE_MODE, false for ONE_WAY
|
|
2948
|
+
* @param {string} symbol not used by woo setPositionMode
|
|
2949
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2950
|
+
* @returns {object} response from the exchange
|
|
2951
|
+
*/
|
|
2943
2952
|
async setPositionMode(hedged, symbol = undefined, params = {}) {
|
|
2944
|
-
/**
|
|
2945
|
-
* @method
|
|
2946
|
-
* @name woo#setPositionMode
|
|
2947
|
-
* @description set hedged to true or false for a market
|
|
2948
|
-
* @see https://docs.woo.org/#update-position-mode
|
|
2949
|
-
* @param {bool} hedged set to true to use HEDGE_MODE, false for ONE_WAY
|
|
2950
|
-
* @param {string} symbol not used by woo setPositionMode
|
|
2951
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2952
|
-
* @returns {object} response from the exchange
|
|
2953
|
-
*/
|
|
2954
2953
|
let hedgeMode = undefined;
|
|
2955
2954
|
if (hedged) {
|
|
2956
2955
|
hedgeMode = 'HEDGE_MODE';
|
|
@@ -2971,18 +2970,18 @@ export default class woo extends Exchange {
|
|
|
2971
2970
|
//
|
|
2972
2971
|
return response;
|
|
2973
2972
|
}
|
|
2973
|
+
/**
|
|
2974
|
+
* @method
|
|
2975
|
+
* @name woo#fetchLeverage
|
|
2976
|
+
* @description fetch the set leverage for a market
|
|
2977
|
+
* @see https://docs.woo.org/#get-account-information-new
|
|
2978
|
+
* @param {string} symbol unified market symbol
|
|
2979
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2980
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
2981
|
+
* @param {string} [params.position_mode] *for swap markets only* 'ONE_WAY' or 'HEDGE_MODE'
|
|
2982
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
2983
|
+
*/
|
|
2974
2984
|
async fetchLeverage(symbol, params = {}) {
|
|
2975
|
-
/**
|
|
2976
|
-
* @method
|
|
2977
|
-
* @name woo#fetchLeverage
|
|
2978
|
-
* @description fetch the set leverage for a market
|
|
2979
|
-
* @see https://docs.woo.org/#get-account-information-new
|
|
2980
|
-
* @param {string} symbol unified market symbol
|
|
2981
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2982
|
-
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
2983
|
-
* @param {string} [params.position_mode] *for swap markets only* 'ONE_WAY' or 'HEDGE_MODE'
|
|
2984
|
-
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
2985
|
-
*/
|
|
2986
2985
|
await this.loadMarkets();
|
|
2987
2986
|
const market = this.market(symbol);
|
|
2988
2987
|
let response = undefined;
|
|
@@ -3103,20 +3102,20 @@ export default class woo extends Exchange {
|
|
|
3103
3102
|
'shortLeverage': shortLeverage,
|
|
3104
3103
|
};
|
|
3105
3104
|
}
|
|
3105
|
+
/**
|
|
3106
|
+
* @method
|
|
3107
|
+
* @name woo#setLeverage
|
|
3108
|
+
* @description set the level of leverage for a market
|
|
3109
|
+
* @see https://docs.woo.org/#update-leverage-setting
|
|
3110
|
+
* @see https://docs.woo.org/#update-futures-leverage-setting
|
|
3111
|
+
* @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)
|
|
3112
|
+
* @param {string} [symbol] unified market symbol (is mandatory for swap markets)
|
|
3113
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3114
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
3115
|
+
* @param {string} [params.position_side] *for swap markets only* 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode.
|
|
3116
|
+
* @returns {object} response from the exchange
|
|
3117
|
+
*/
|
|
3106
3118
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
3107
|
-
/**
|
|
3108
|
-
* @method
|
|
3109
|
-
* @name woo#setLeverage
|
|
3110
|
-
* @description set the level of leverage for a market
|
|
3111
|
-
* @see https://docs.woo.org/#update-leverage-setting
|
|
3112
|
-
* @see https://docs.woo.org/#update-futures-leverage-setting
|
|
3113
|
-
* @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)
|
|
3114
|
-
* @param {string} [symbo] unified market symbol (is mandatory for swap markets)
|
|
3115
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3116
|
-
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
3117
|
-
* @param {string} [params.position_side] *for swap markets only* 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode.
|
|
3118
|
-
* @returns {object} response from the exchange
|
|
3119
|
-
*/
|
|
3120
3119
|
await this.loadMarkets();
|
|
3121
3120
|
const request = {
|
|
3122
3121
|
'leverage': leverage,
|
|
@@ -3139,32 +3138,32 @@ export default class woo extends Exchange {
|
|
|
3139
3138
|
throw new NotSupported(this.id + ' fetchLeverage() is not supported for ' + market['type'] + ' markets');
|
|
3140
3139
|
}
|
|
3141
3140
|
}
|
|
3141
|
+
/**
|
|
3142
|
+
* @method
|
|
3143
|
+
* @name woo#addMargin
|
|
3144
|
+
* @description add margin
|
|
3145
|
+
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3146
|
+
* @param {string} symbol unified market symbol
|
|
3147
|
+
* @param {float} amount amount of margin to add
|
|
3148
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3149
|
+
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3150
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3151
|
+
*/
|
|
3142
3152
|
async addMargin(symbol, amount, params = {}) {
|
|
3143
|
-
/**
|
|
3144
|
-
* @method
|
|
3145
|
-
* @name woo#addMargin
|
|
3146
|
-
* @description add margin
|
|
3147
|
-
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3148
|
-
* @param {string} symbol unified market symbol
|
|
3149
|
-
* @param {float} amount amount of margin to add
|
|
3150
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3151
|
-
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3152
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3153
|
-
*/
|
|
3154
3153
|
return await this.modifyMarginHelper(symbol, amount, 'ADD', params);
|
|
3155
3154
|
}
|
|
3155
|
+
/**
|
|
3156
|
+
* @method
|
|
3157
|
+
* @name woo#reduceMargin
|
|
3158
|
+
* @description remove margin from a position
|
|
3159
|
+
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3160
|
+
* @param {string} symbol unified market symbol
|
|
3161
|
+
* @param {float} amount amount of margin to remove
|
|
3162
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3163
|
+
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3164
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3165
|
+
*/
|
|
3156
3166
|
async reduceMargin(symbol, amount, params = {}) {
|
|
3157
|
-
/**
|
|
3158
|
-
* @method
|
|
3159
|
-
* @name woo#reduceMargin
|
|
3160
|
-
* @description remove margin from a position
|
|
3161
|
-
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3162
|
-
* @param {string} symbol unified market symbol
|
|
3163
|
-
* @param {float} amount amount of margin to remove
|
|
3164
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3165
|
-
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3166
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3167
|
-
*/
|
|
3168
3167
|
return await this.modifyMarginHelper(symbol, amount, 'REDUCE', params);
|
|
3169
3168
|
}
|
|
3170
3169
|
async modifyMarginHelper(symbol, amount, type, params = {}) {
|
|
@@ -3369,18 +3368,18 @@ export default class woo extends Exchange {
|
|
|
3369
3368
|
'takeProfitPrice': undefined,
|
|
3370
3369
|
});
|
|
3371
3370
|
}
|
|
3371
|
+
/**
|
|
3372
|
+
* @method
|
|
3373
|
+
* @name woo#fetchConvertQuote
|
|
3374
|
+
* @description fetch a quote for converting from one currency to another
|
|
3375
|
+
* @see https://docs.woo.org/#get-quote-rfq
|
|
3376
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
3377
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
3378
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
3379
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3380
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3381
|
+
*/
|
|
3372
3382
|
async fetchConvertQuote(fromCode, toCode, amount = undefined, params = {}) {
|
|
3373
|
-
/**
|
|
3374
|
-
* @method
|
|
3375
|
-
* @name woo#fetchConvertQuote
|
|
3376
|
-
* @description fetch a quote for converting from one currency to another
|
|
3377
|
-
* @see https://docs.woo.org/#get-quote-rfq
|
|
3378
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
3379
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
3380
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
3381
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3382
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3383
|
-
*/
|
|
3384
3383
|
await this.loadMarkets();
|
|
3385
3384
|
const request = {
|
|
3386
3385
|
'sellToken': fromCode.toUpperCase(),
|
|
@@ -3411,19 +3410,19 @@ export default class woo extends Exchange {
|
|
|
3411
3410
|
const toCurrency = this.currency(toCurrencyId);
|
|
3412
3411
|
return this.parseConversion(data, fromCurrency, toCurrency);
|
|
3413
3412
|
}
|
|
3413
|
+
/**
|
|
3414
|
+
* @method
|
|
3415
|
+
* @name woo#createConvertTrade
|
|
3416
|
+
* @description convert from one currency to another
|
|
3417
|
+
* @see https://docs.woo.org/#send-quote-rft
|
|
3418
|
+
* @param {string} id the id of the trade that you want to make
|
|
3419
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
3420
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
3421
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
3422
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3423
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3424
|
+
*/
|
|
3414
3425
|
async createConvertTrade(id, fromCode, toCode, amount = undefined, params = {}) {
|
|
3415
|
-
/**
|
|
3416
|
-
* @method
|
|
3417
|
-
* @name woo#createConvertTrade
|
|
3418
|
-
* @description convert from one currency to another
|
|
3419
|
-
* @see https://docs.woo.org/#send-quote-rft
|
|
3420
|
-
* @param {string} id the id of the trade that you want to make
|
|
3421
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
3422
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
3423
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
3424
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3425
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3426
|
-
*/
|
|
3427
3426
|
await this.loadMarkets();
|
|
3428
3427
|
const request = {
|
|
3429
3428
|
'quoteId': id,
|
|
@@ -3442,17 +3441,17 @@ export default class woo extends Exchange {
|
|
|
3442
3441
|
const data = this.safeDict(response, 'data', {});
|
|
3443
3442
|
return this.parseConversion(data);
|
|
3444
3443
|
}
|
|
3444
|
+
/**
|
|
3445
|
+
* @method
|
|
3446
|
+
* @name woo#fetchConvertTrade
|
|
3447
|
+
* @description fetch the data for a conversion trade
|
|
3448
|
+
* @see https://docs.woo.org/#get-quote-trade
|
|
3449
|
+
* @param {string} id the id of the trade that you want to fetch
|
|
3450
|
+
* @param {string} [code] the unified currency code of the conversion trade
|
|
3451
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3452
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3453
|
+
*/
|
|
3445
3454
|
async fetchConvertTrade(id, code = undefined, params = {}) {
|
|
3446
|
-
/**
|
|
3447
|
-
* @method
|
|
3448
|
-
* @name woo#fetchConvertTrade
|
|
3449
|
-
* @description fetch the data for a conversion trade
|
|
3450
|
-
* @see https://docs.woo.org/#get-quote-trade
|
|
3451
|
-
* @param {string} id the id of the trade that you want to fetch
|
|
3452
|
-
* @param {string} [code] the unified currency code of the conversion trade
|
|
3453
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3454
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3455
|
-
*/
|
|
3456
3455
|
await this.loadMarkets();
|
|
3457
3456
|
const request = {
|
|
3458
3457
|
'quoteId': id,
|
|
@@ -3485,19 +3484,19 @@ export default class woo extends Exchange {
|
|
|
3485
3484
|
}
|
|
3486
3485
|
return this.parseConversion(data, fromCurrency, toCurrency);
|
|
3487
3486
|
}
|
|
3487
|
+
/**
|
|
3488
|
+
* @method
|
|
3489
|
+
* @name woo#fetchConvertTradeHistory
|
|
3490
|
+
* @description fetch the users history of conversion trades
|
|
3491
|
+
* @see https://docs.woo.org/#get-quote-trades
|
|
3492
|
+
* @param {string} [code] the unified currency code
|
|
3493
|
+
* @param {int} [since] the earliest time in ms to fetch conversions for
|
|
3494
|
+
* @param {int} [limit] the maximum number of conversion structures to retrieve
|
|
3495
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3496
|
+
* @param {int} [params.until] timestamp in ms of the latest conversion to fetch
|
|
3497
|
+
* @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3498
|
+
*/
|
|
3488
3499
|
async fetchConvertTradeHistory(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3489
|
-
/**
|
|
3490
|
-
* @method
|
|
3491
|
-
* @name woo#fetchConvertTradeHistory
|
|
3492
|
-
* @description fetch the users history of conversion trades
|
|
3493
|
-
* @see https://docs.woo.org/#get-quote-trades
|
|
3494
|
-
* @param {string} [code] the unified currency code
|
|
3495
|
-
* @param {int} [since] the earliest time in ms to fetch conversions for
|
|
3496
|
-
* @param {int} [limit] the maximum number of conversion structures to retrieve
|
|
3497
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3498
|
-
* @param {int} [params.until] timestamp in ms of the latest conversion to fetch
|
|
3499
|
-
* @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
3500
|
-
*/
|
|
3501
3500
|
await this.loadMarkets();
|
|
3502
3501
|
let request = {};
|
|
3503
3502
|
[request, params] = this.handleUntilOption('endTime', request, params);
|
|
@@ -3586,15 +3585,15 @@ export default class woo extends Exchange {
|
|
|
3586
3585
|
'fee': undefined,
|
|
3587
3586
|
};
|
|
3588
3587
|
}
|
|
3588
|
+
/**
|
|
3589
|
+
* @method
|
|
3590
|
+
* @name woo#fetchConvertCurrencies
|
|
3591
|
+
* @description fetches all available currencies that can be converted
|
|
3592
|
+
* @see https://docs.woo.org/#get-quote-asset-info
|
|
3593
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3594
|
+
* @returns {object} an associative dictionary of currencies
|
|
3595
|
+
*/
|
|
3589
3596
|
async fetchConvertCurrencies(params = {}) {
|
|
3590
|
-
/**
|
|
3591
|
-
* @method
|
|
3592
|
-
* @name woo#fetchConvertCurrencies
|
|
3593
|
-
* @description fetches all available currencies that can be converted
|
|
3594
|
-
* @see https://docs.woo.org/#get-quote-asset-info
|
|
3595
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3596
|
-
* @returns {object} an associative dictionary of currencies
|
|
3597
|
-
*/
|
|
3598
3597
|
await this.loadMarkets();
|
|
3599
3598
|
const response = await this.v3PrivateGetConvertAssetInfo(params);
|
|
3600
3599
|
//
|