ccxt 4.4.30 → 4.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +123 -123
- package/dist/cjs/src/alpaca.js +237 -237
- package/dist/cjs/src/ascendex.js +342 -341
- package/dist/cjs/src/bigone.js +242 -242
- package/dist/cjs/src/binance.js +1339 -1291
- package/dist/cjs/src/bingx.js +639 -639
- package/dist/cjs/src/bit2c.js +111 -111
- package/dist/cjs/src/bitbank.js +142 -142
- package/dist/cjs/src/bitbns.js +140 -140
- package/dist/cjs/src/bitfinex.js +231 -231
- package/dist/cjs/src/bitfinex2.js +403 -403
- package/dist/cjs/src/bitflyer.js +184 -184
- package/dist/cjs/src/bitget.js +848 -846
- package/dist/cjs/src/bithumb.js +125 -124
- package/dist/cjs/src/bitmart.js +525 -525
- package/dist/cjs/src/bitmex.js +317 -317
- package/dist/cjs/src/bitopro.js +221 -221
- package/dist/cjs/src/bitrue.js +315 -315
- package/dist/cjs/src/bitso.js +220 -220
- package/dist/cjs/src/bitstamp.js +251 -251
- package/dist/cjs/src/bitteam.js +183 -183
- package/dist/cjs/src/bitvavo.js +247 -251
- package/dist/cjs/src/bl3p.js +82 -82
- package/dist/cjs/src/blockchaincom.js +211 -211
- package/dist/cjs/src/blofin.js +332 -331
- package/dist/cjs/src/btcalpha.js +166 -166
- package/dist/cjs/src/btcbox.js +108 -108
- package/dist/cjs/src/btcmarkets.js +198 -198
- package/dist/cjs/src/btcturk.js +124 -124
- package/dist/cjs/src/bybit.js +906 -900
- package/dist/cjs/src/cex.js +227 -226
- package/dist/cjs/src/coinbase.js +481 -481
- package/dist/cjs/src/coinbaseexchange.js +274 -274
- package/dist/cjs/src/coinbaseinternational.js +304 -304
- package/dist/cjs/src/coincatch.js +650 -650
- package/dist/cjs/src/coincheck.js +113 -113
- package/dist/cjs/src/coinex.js +611 -601
- package/dist/cjs/src/coinlist.js +304 -303
- package/dist/cjs/src/coinmate.js +162 -161
- package/dist/cjs/src/coinmetro.js +187 -187
- package/dist/cjs/src/coinone.js +124 -123
- package/dist/cjs/src/coinsph.js +237 -237
- package/dist/cjs/src/coinspot.js +82 -82
- package/dist/cjs/src/cryptocom.js +342 -341
- package/dist/cjs/src/currencycom.js +225 -224
- package/dist/cjs/src/delta.js +320 -320
- package/dist/cjs/src/deribit.js +411 -408
- package/dist/cjs/src/digifinex.js +432 -431
- package/dist/cjs/src/exmo.js +328 -327
- package/dist/cjs/src/gate.js +830 -791
- package/dist/cjs/src/gemini.js +199 -198
- package/dist/cjs/src/hashkey.js +520 -517
- package/dist/cjs/src/hitbtc.js +465 -462
- package/dist/cjs/src/hollaex.js +253 -252
- package/dist/cjs/src/htx.js +791 -848
- package/dist/cjs/src/huobijp.js +219 -218
- package/dist/cjs/src/hyperliquid.js +421 -417
- package/dist/cjs/src/idex.js +238 -237
- package/dist/cjs/src/independentreserve.js +133 -132
- package/dist/cjs/src/indodax.js +177 -171
- package/dist/cjs/src/kraken.js +381 -377
- package/dist/cjs/src/krakenfutures.js +285 -279
- package/dist/cjs/src/kucoin.js +632 -622
- package/dist/cjs/src/kucoinfutures.js +533 -457
- package/dist/cjs/src/kuna.js +283 -282
- package/dist/cjs/src/latoken.js +211 -210
- package/dist/cjs/src/lbank.js +268 -267
- package/dist/cjs/src/luno.js +174 -173
- package/dist/cjs/src/lykke.js +172 -171
- package/dist/cjs/src/mercado.js +123 -122
- package/dist/cjs/src/mexc.js +650 -646
- package/dist/cjs/src/ndax.js +229 -228
- package/dist/cjs/src/novadax.js +230 -229
- package/dist/cjs/src/oceanex.js +187 -186
- package/dist/cjs/src/okcoin.js +286 -285
- package/dist/cjs/src/okx.js +909 -904
- package/dist/cjs/src/onetrading.js +218 -218
- package/dist/cjs/src/oxfun.js +335 -334
- package/dist/cjs/src/p2b.js +154 -154
- package/dist/cjs/src/paradex.js +249 -244
- package/dist/cjs/src/paymium.js +101 -101
- package/dist/cjs/src/phemex.js +388 -390
- package/dist/cjs/src/poloniex.js +270 -270
- package/dist/cjs/src/poloniexfutures.js +250 -250
- package/dist/cjs/src/pro/alpaca.js +64 -64
- package/dist/cjs/src/pro/ascendex.js +64 -64
- package/dist/cjs/src/pro/binance.js +546 -543
- package/dist/cjs/src/pro/bingx.js +116 -116
- package/dist/cjs/src/pro/bitfinex.js +42 -42
- package/dist/cjs/src/pro/bitfinex2.js +66 -66
- package/dist/cjs/src/pro/bitget.js +188 -181
- package/dist/cjs/src/pro/bithumb.js +40 -40
- package/dist/cjs/src/pro/bitmart.js +121 -119
- package/dist/cjs/src/pro/bitmex.js +135 -133
- package/dist/cjs/src/pro/bitopro.js +49 -49
- package/dist/cjs/src/pro/bitrue.js +19 -19
- package/dist/cjs/src/pro/bitstamp.js +29 -29
- package/dist/cjs/src/pro/bitvavo.js +299 -301
- package/dist/cjs/src/pro/blockchaincom.js +62 -62
- package/dist/cjs/src/pro/blofin.js +132 -130
- package/dist/cjs/src/pro/bybit.js +317 -313
- package/dist/cjs/src/pro/cex.js +168 -168
- package/dist/cjs/src/pro/coinbase.js +93 -91
- package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
- package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
- package/dist/cjs/src/pro/coincatch.js +150 -143
- package/dist/cjs/src/pro/coincheck.js +21 -21
- package/dist/cjs/src/pro/coinex.js +110 -110
- package/dist/cjs/src/pro/coinone.js +30 -30
- package/dist/cjs/src/pro/cryptocom.js +227 -227
- package/dist/cjs/src/pro/currencycom.js +45 -45
- package/dist/cjs/src/pro/deribit.js +127 -127
- package/dist/cjs/src/pro/exmo.js +66 -66
- package/dist/cjs/src/pro/gate.js +287 -283
- package/dist/cjs/src/pro/gemini.js +74 -74
- package/dist/cjs/src/pro/hashkey.js +87 -85
- package/dist/cjs/src/pro/hitbtc.js +190 -190
- package/dist/cjs/src/pro/hollaex.js +51 -51
- package/dist/cjs/src/pro/htx.js +96 -94
- package/dist/cjs/src/pro/huobijp.js +38 -38
- package/dist/cjs/src/pro/hyperliquid.js +151 -150
- package/dist/cjs/src/pro/idex.js +48 -48
- package/dist/cjs/src/pro/independentreserve.js +19 -19
- package/dist/cjs/src/pro/kraken.js +167 -167
- package/dist/cjs/src/pro/krakenfutures.js +137 -138
- package/dist/cjs/src/pro/kucoin.js +167 -168
- package/dist/cjs/src/pro/kucoinfutures.js +147 -147
- package/dist/cjs/src/pro/lbank.js +95 -95
- package/dist/cjs/src/pro/luno.js +21 -21
- package/dist/cjs/src/pro/mexc.js +102 -103
- package/dist/cjs/src/pro/ndax.js +42 -42
- package/dist/cjs/src/pro/okcoin.js +61 -61
- package/dist/cjs/src/pro/okx.js +332 -330
- package/dist/cjs/src/pro/onetrading.js +71 -71
- package/dist/cjs/src/pro/oxfun.js +193 -191
- package/dist/cjs/src/pro/p2b.js +77 -77
- package/dist/cjs/src/pro/paradex.js +39 -39
- package/dist/cjs/src/pro/phemex.js +94 -94
- package/dist/cjs/src/pro/poloniex.js +171 -171
- package/dist/cjs/src/pro/poloniexfutures.js +62 -62
- package/dist/cjs/src/pro/probit.js +63 -63
- package/dist/cjs/src/pro/upbit.js +80 -80
- package/dist/cjs/src/pro/vertex.js +65 -63
- package/dist/cjs/src/pro/wazirx.js +70 -70
- package/dist/cjs/src/pro/whitebit.js +83 -83
- package/dist/cjs/src/pro/woo.js +106 -104
- package/dist/cjs/src/pro/woofipro.js +105 -103
- package/dist/cjs/src/pro/xt.js +119 -119
- package/dist/cjs/src/probit.js +229 -229
- package/dist/cjs/src/timex.js +198 -197
- package/dist/cjs/src/tokocrypto.js +214 -213
- package/dist/cjs/src/tradeogre.js +92 -91
- package/dist/cjs/src/upbit.js +243 -242
- package/dist/cjs/src/vertex.js +258 -258
- package/dist/cjs/src/wavesexchange.js +176 -172
- package/dist/cjs/src/wazirx.js +168 -168
- package/dist/cjs/src/whitebit.js +361 -361
- package/dist/cjs/src/woo.js +571 -572
- package/dist/cjs/src/woofipro.js +392 -391
- package/dist/cjs/src/xt.js +436 -435
- package/dist/cjs/src/yobit.js +159 -158
- package/dist/cjs/src/zaif.js +103 -103
- package/dist/cjs/src/zonda.js +168 -168
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +123 -0
- package/js/src/ace.js +123 -123
- package/js/src/alpaca.d.ts +237 -0
- package/js/src/alpaca.js +237 -237
- package/js/src/ascendex.d.ts +339 -0
- package/js/src/ascendex.js +342 -341
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +242 -0
- package/js/src/bigone.js +242 -242
- package/js/src/binance.d.ts +1306 -0
- package/js/src/binance.js +1339 -1291
- package/js/src/bingx.d.ts +639 -0
- package/js/src/bingx.js +639 -639
- package/js/src/bit2c.d.ts +111 -0
- package/js/src/bit2c.js +111 -111
- package/js/src/bitbank.d.ts +142 -0
- package/js/src/bitbank.js +142 -142
- package/js/src/bitbns.d.ts +140 -0
- package/js/src/bitbns.js +140 -140
- package/js/src/bitfinex.d.ts +231 -0
- package/js/src/bitfinex.js +231 -231
- package/js/src/bitfinex2.d.ts +403 -0
- package/js/src/bitfinex2.js +403 -403
- package/js/src/bitflyer.d.ts +184 -0
- package/js/src/bitflyer.js +184 -184
- package/js/src/bitget.d.ts +846 -0
- package/js/src/bitget.js +848 -846
- package/js/src/bithumb.d.ts +125 -0
- package/js/src/bithumb.js +125 -124
- package/js/src/bitmart.d.ts +525 -0
- package/js/src/bitmart.js +525 -525
- package/js/src/bitmex.d.ts +317 -0
- package/js/src/bitmex.js +317 -317
- package/js/src/bitopro.d.ts +221 -0
- package/js/src/bitopro.js +221 -221
- package/js/src/bitrue.d.ts +315 -0
- package/js/src/bitrue.js +315 -315
- package/js/src/bitso.d.ts +220 -0
- package/js/src/bitso.js +220 -220
- package/js/src/bitstamp.d.ts +251 -0
- package/js/src/bitstamp.js +251 -251
- package/js/src/bitteam.d.ts +183 -0
- package/js/src/bitteam.js +183 -183
- package/js/src/bitvavo.d.ts +247 -0
- package/js/src/bitvavo.js +247 -251
- package/js/src/bl3p.d.ts +82 -0
- package/js/src/bl3p.js +82 -82
- package/js/src/blockchaincom.d.ts +211 -0
- package/js/src/blockchaincom.js +211 -211
- package/js/src/blofin.d.ts +332 -0
- package/js/src/blofin.js +332 -331
- package/js/src/btcalpha.d.ts +166 -0
- package/js/src/btcalpha.js +166 -166
- package/js/src/btcbox.d.ts +108 -0
- package/js/src/btcbox.js +108 -108
- package/js/src/btcmarkets.d.ts +198 -0
- package/js/src/btcmarkets.js +198 -198
- package/js/src/btcturk.d.ts +124 -0
- package/js/src/btcturk.js +124 -124
- package/js/src/bybit.d.ts +906 -1
- package/js/src/bybit.js +906 -900
- package/js/src/cex.d.ts +227 -0
- package/js/src/cex.js +227 -226
- package/js/src/coinbase.d.ts +481 -0
- package/js/src/coinbase.js +481 -481
- package/js/src/coinbaseexchange.d.ts +274 -0
- package/js/src/coinbaseexchange.js +274 -274
- package/js/src/coinbaseinternational.d.ts +304 -0
- package/js/src/coinbaseinternational.js +304 -304
- package/js/src/coincatch.d.ts +646 -0
- package/js/src/coincatch.js +650 -650
- package/js/src/coincheck.d.ts +113 -0
- package/js/src/coincheck.js +113 -113
- package/js/src/coinex.d.ts +603 -0
- package/js/src/coinex.js +611 -601
- package/js/src/coinlist.d.ts +304 -0
- package/js/src/coinlist.js +304 -303
- package/js/src/coinmate.d.ts +162 -0
- package/js/src/coinmate.js +162 -161
- package/js/src/coinmetro.d.ts +187 -0
- package/js/src/coinmetro.js +187 -187
- package/js/src/coinone.d.ts +124 -0
- package/js/src/coinone.js +124 -123
- package/js/src/coinsph.d.ts +237 -0
- package/js/src/coinsph.js +237 -237
- package/js/src/coinspot.d.ts +82 -0
- package/js/src/coinspot.js +82 -82
- package/js/src/cryptocom.d.ts +342 -0
- package/js/src/cryptocom.js +342 -341
- package/js/src/currencycom.d.ts +225 -0
- package/js/src/currencycom.js +225 -224
- package/js/src/delta.d.ts +320 -0
- package/js/src/delta.js +320 -320
- package/js/src/deribit.d.ts +411 -0
- package/js/src/deribit.js +411 -408
- package/js/src/digifinex.d.ts +430 -0
- package/js/src/digifinex.js +432 -431
- package/js/src/exmo.d.ts +328 -0
- package/js/src/exmo.js +328 -327
- package/js/src/gate.d.ts +803 -1
- package/js/src/gate.js +830 -791
- package/js/src/gemini.d.ts +199 -0
- package/js/src/gemini.js +199 -198
- package/js/src/hashkey.d.ts +516 -0
- package/js/src/hashkey.js +520 -517
- package/js/src/hitbtc.d.ts +465 -0
- package/js/src/hitbtc.js +465 -462
- package/js/src/hollaex.d.ts +253 -0
- package/js/src/hollaex.js +253 -252
- package/js/src/htx.d.ts +765 -2
- package/js/src/htx.js +791 -848
- package/js/src/huobijp.d.ts +219 -0
- package/js/src/huobijp.js +219 -218
- package/js/src/hyperliquid.d.ts +419 -0
- package/js/src/hyperliquid.js +421 -417
- package/js/src/idex.d.ts +238 -0
- package/js/src/idex.js +238 -237
- package/js/src/independentreserve.d.ts +133 -0
- package/js/src/independentreserve.js +133 -132
- package/js/src/indodax.d.ts +171 -0
- package/js/src/indodax.js +177 -171
- package/js/src/kraken.d.ts +381 -0
- package/js/src/kraken.js +381 -377
- package/js/src/krakenfutures.d.ts +282 -0
- package/js/src/krakenfutures.js +285 -279
- package/js/src/kucoin.d.ts +613 -0
- package/js/src/kucoin.js +632 -622
- package/js/src/kucoinfutures.d.ts +441 -0
- package/js/src/kucoinfutures.js +533 -457
- package/js/src/kuna.d.ts +283 -0
- package/js/src/kuna.js +283 -282
- package/js/src/latoken.d.ts +211 -0
- package/js/src/latoken.js +211 -210
- package/js/src/lbank.d.ts +268 -0
- package/js/src/lbank.js +268 -267
- package/js/src/luno.d.ts +174 -0
- package/js/src/luno.js +174 -173
- package/js/src/lykke.d.ts +172 -0
- package/js/src/lykke.js +172 -171
- package/js/src/mercado.d.ts +123 -0
- package/js/src/mercado.js +123 -122
- package/js/src/mexc.d.ts +647 -0
- package/js/src/mexc.js +650 -646
- package/js/src/ndax.d.ts +229 -0
- package/js/src/ndax.js +229 -228
- package/js/src/novadax.d.ts +230 -0
- package/js/src/novadax.js +230 -229
- package/js/src/oceanex.d.ts +187 -0
- package/js/src/oceanex.js +187 -186
- package/js/src/okcoin.d.ts +286 -0
- package/js/src/okcoin.js +286 -285
- package/js/src/okx.d.ts +907 -0
- package/js/src/okx.js +909 -904
- package/js/src/onetrading.d.ts +218 -0
- package/js/src/onetrading.js +218 -218
- package/js/src/oxfun.d.ts +336 -3
- package/js/src/oxfun.js +335 -334
- package/js/src/p2b.d.ts +154 -0
- package/js/src/p2b.js +154 -154
- package/js/src/paradex.d.ts +241 -0
- package/js/src/paradex.js +249 -244
- package/js/src/paymium.d.ts +101 -0
- package/js/src/paymium.js +101 -101
- package/js/src/phemex.d.ts +366 -0
- package/js/src/phemex.js +388 -390
- package/js/src/poloniex.d.ts +270 -0
- package/js/src/poloniex.js +270 -270
- package/js/src/poloniexfutures.d.ts +250 -0
- package/js/src/poloniexfutures.js +250 -250
- package/js/src/pro/alpaca.d.ts +64 -0
- package/js/src/pro/alpaca.js +64 -64
- package/js/src/pro/ascendex.d.ts +64 -0
- package/js/src/pro/ascendex.js +64 -64
- package/js/src/pro/binance.d.ts +546 -0
- package/js/src/pro/binance.js +546 -543
- package/js/src/pro/bingx.d.ts +116 -0
- package/js/src/pro/bingx.js +116 -116
- package/js/src/pro/bitfinex.d.ts +42 -0
- package/js/src/pro/bitfinex.js +42 -42
- package/js/src/pro/bitfinex2.d.ts +66 -0
- package/js/src/pro/bitfinex2.js +66 -66
- package/js/src/pro/bitget.d.ts +187 -0
- package/js/src/pro/bitget.js +188 -181
- package/js/src/pro/bithumb.d.ts +40 -0
- package/js/src/pro/bithumb.js +40 -40
- package/js/src/pro/bitmart.d.ts +121 -0
- package/js/src/pro/bitmart.js +121 -119
- package/js/src/pro/bitmex.d.ts +135 -0
- package/js/src/pro/bitmex.js +135 -133
- package/js/src/pro/bitopro.d.ts +49 -0
- package/js/src/pro/bitopro.js +49 -49
- package/js/src/pro/bitrue.d.ts +19 -0
- package/js/src/pro/bitrue.js +19 -19
- package/js/src/pro/bitstamp.d.ts +29 -0
- package/js/src/pro/bitstamp.js +29 -29
- package/js/src/pro/bitvavo.d.ts +254 -1
- package/js/src/pro/bitvavo.js +299 -301
- package/js/src/pro/blockchaincom.d.ts +62 -0
- package/js/src/pro/blockchaincom.js +62 -62
- package/js/src/pro/blofin.d.ts +132 -0
- package/js/src/pro/blofin.js +132 -130
- package/js/src/pro/bybit.d.ts +317 -0
- package/js/src/pro/bybit.js +317 -313
- package/js/src/pro/cex.d.ts +168 -0
- package/js/src/pro/cex.js +168 -168
- package/js/src/pro/coinbase.d.ts +93 -0
- package/js/src/pro/coinbase.js +93 -91
- package/js/src/pro/coinbaseexchange.d.ts +95 -0
- package/js/src/pro/coinbaseexchange.js +95 -95
- package/js/src/pro/coinbaseinternational.d.ts +111 -0
- package/js/src/pro/coinbaseinternational.js +111 -111
- package/js/src/pro/coincatch.d.ts +150 -0
- package/js/src/pro/coincatch.js +150 -143
- package/js/src/pro/coincheck.d.ts +21 -0
- package/js/src/pro/coincheck.js +21 -21
- package/js/src/pro/coinex.d.ts +110 -0
- package/js/src/pro/coinex.js +110 -110
- package/js/src/pro/coinone.d.ts +30 -0
- package/js/src/pro/coinone.js +30 -30
- package/js/src/pro/cryptocom.d.ts +227 -0
- package/js/src/pro/cryptocom.js +227 -227
- package/js/src/pro/currencycom.d.ts +45 -0
- package/js/src/pro/currencycom.js +45 -45
- package/js/src/pro/deribit.d.ts +127 -0
- package/js/src/pro/deribit.js +127 -127
- package/js/src/pro/exmo.d.ts +66 -0
- package/js/src/pro/exmo.js +66 -66
- package/js/src/pro/gate.d.ts +287 -0
- package/js/src/pro/gate.js +287 -283
- package/js/src/pro/gemini.d.ts +74 -0
- package/js/src/pro/gemini.js +74 -74
- package/js/src/pro/hashkey.d.ts +87 -0
- package/js/src/pro/hashkey.js +87 -85
- package/js/src/pro/hitbtc.d.ts +190 -0
- package/js/src/pro/hitbtc.js +190 -190
- package/js/src/pro/hollaex.d.ts +51 -0
- package/js/src/pro/hollaex.js +51 -51
- package/js/src/pro/htx.d.ts +96 -0
- package/js/src/pro/htx.js +96 -94
- package/js/src/pro/huobijp.d.ts +38 -0
- package/js/src/pro/huobijp.js +38 -38
- package/js/src/pro/hyperliquid.d.ts +151 -0
- package/js/src/pro/hyperliquid.js +151 -150
- package/js/src/pro/idex.d.ts +48 -0
- package/js/src/pro/idex.js +48 -48
- package/js/src/pro/independentreserve.d.ts +19 -0
- package/js/src/pro/independentreserve.js +19 -19
- package/js/src/pro/kraken.d.ts +167 -0
- package/js/src/pro/kraken.js +167 -167
- package/js/src/pro/krakenfutures.d.ts +137 -0
- package/js/src/pro/krakenfutures.js +137 -138
- package/js/src/pro/kucoin.d.ts +167 -0
- package/js/src/pro/kucoin.js +167 -168
- package/js/src/pro/kucoinfutures.d.ts +147 -0
- package/js/src/pro/kucoinfutures.js +147 -147
- package/js/src/pro/lbank.d.ts +95 -0
- package/js/src/pro/lbank.js +95 -95
- package/js/src/pro/luno.d.ts +21 -0
- package/js/src/pro/luno.js +21 -21
- package/js/src/pro/mexc.d.ts +101 -0
- package/js/src/pro/mexc.js +102 -103
- package/js/src/pro/ndax.d.ts +42 -0
- package/js/src/pro/ndax.js +42 -42
- package/js/src/pro/okcoin.d.ts +61 -0
- package/js/src/pro/okcoin.js +61 -61
- package/js/src/pro/okx.d.ts +332 -0
- package/js/src/pro/okx.js +332 -330
- package/js/src/pro/onetrading.d.ts +71 -0
- package/js/src/pro/onetrading.js +71 -71
- package/js/src/pro/oxfun.d.ts +193 -0
- package/js/src/pro/oxfun.js +193 -191
- package/js/src/pro/p2b.d.ts +77 -0
- package/js/src/pro/p2b.js +77 -77
- package/js/src/pro/paradex.d.ts +39 -0
- package/js/src/pro/paradex.js +39 -39
- package/js/src/pro/phemex.d.ts +94 -0
- package/js/src/pro/phemex.js +94 -94
- package/js/src/pro/poloniex.d.ts +171 -0
- package/js/src/pro/poloniex.js +171 -171
- package/js/src/pro/poloniexfutures.d.ts +62 -0
- package/js/src/pro/poloniexfutures.js +62 -62
- package/js/src/pro/probit.d.ts +63 -0
- package/js/src/pro/probit.js +63 -63
- package/js/src/pro/upbit.d.ts +80 -0
- package/js/src/pro/upbit.js +80 -80
- package/js/src/pro/vertex.d.ts +65 -0
- package/js/src/pro/vertex.js +65 -63
- package/js/src/pro/wazirx.d.ts +70 -0
- package/js/src/pro/wazirx.js +70 -70
- package/js/src/pro/whitebit.d.ts +83 -0
- package/js/src/pro/whitebit.js +83 -83
- package/js/src/pro/woo.d.ts +106 -0
- package/js/src/pro/woo.js +106 -104
- package/js/src/pro/woofipro.d.ts +105 -0
- package/js/src/pro/woofipro.js +105 -103
- package/js/src/pro/xt.d.ts +119 -0
- package/js/src/pro/xt.js +119 -119
- package/js/src/probit.d.ts +229 -0
- package/js/src/probit.js +229 -229
- package/js/src/timex.d.ts +198 -0
- package/js/src/timex.js +198 -197
- package/js/src/tokocrypto.d.ts +214 -0
- package/js/src/tokocrypto.js +214 -213
- package/js/src/tradeogre.d.ts +92 -0
- package/js/src/tradeogre.js +92 -91
- package/js/src/upbit.d.ts +243 -0
- package/js/src/upbit.js +243 -242
- package/js/src/vertex.d.ts +258 -0
- package/js/src/vertex.js +258 -258
- package/js/src/wavesexchange.d.ts +176 -0
- package/js/src/wavesexchange.js +176 -172
- package/js/src/wazirx.d.ts +168 -0
- package/js/src/wazirx.js +168 -168
- package/js/src/whitebit.d.ts +361 -0
- package/js/src/whitebit.js +361 -361
- package/js/src/woo.d.ts +571 -0
- package/js/src/woo.js +571 -572
- package/js/src/woofipro.d.ts +392 -0
- package/js/src/woofipro.js +392 -391
- package/js/src/xt.d.ts +439 -4
- package/js/src/xt.js +436 -435
- package/js/src/yobit.d.ts +159 -0
- package/js/src/yobit.js +159 -158
- package/js/src/zaif.d.ts +103 -0
- package/js/src/zaif.js +103 -103
- package/js/src/zonda.d.ts +168 -0
- package/js/src/zonda.js +168 -168
- package/package.json +1 -1
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -1518,15 +1518,15 @@ class bitget extends bitget$1 {
|
|
|
1518
1518
|
params = this.omit(params, 'productType');
|
|
1519
1519
|
return [productType, params];
|
|
1520
1520
|
}
|
|
1521
|
+
/**
|
|
1522
|
+
* @method
|
|
1523
|
+
* @name bitget#fetchTime
|
|
1524
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1525
|
+
* @see https://www.bitget.com/api-doc/common/public/Get-Server-Time
|
|
1526
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1527
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1528
|
+
*/
|
|
1521
1529
|
async fetchTime(params = {}) {
|
|
1522
|
-
/**
|
|
1523
|
-
* @method
|
|
1524
|
-
* @name bitget#fetchTime
|
|
1525
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1526
|
-
* @see https://www.bitget.com/api-doc/common/public/Get-Server-Time
|
|
1527
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1528
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1529
|
-
*/
|
|
1530
1530
|
const response = await this.publicCommonGetV2PublicTime(params);
|
|
1531
1531
|
//
|
|
1532
1532
|
// {
|
|
@@ -1541,17 +1541,17 @@ class bitget extends bitget$1 {
|
|
|
1541
1541
|
const data = this.safeValue(response, 'data', {});
|
|
1542
1542
|
return this.safeInteger(data, 'serverTime');
|
|
1543
1543
|
}
|
|
1544
|
+
/**
|
|
1545
|
+
* @method
|
|
1546
|
+
* @name bitget#fetchMarkets
|
|
1547
|
+
* @description retrieves data on all markets for bitget
|
|
1548
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Symbols
|
|
1549
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
|
|
1550
|
+
* @see https://www.bitget.com/api-doc/margin/common/support-currencies
|
|
1551
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1552
|
+
* @returns {object[]} an array of objects representing market data
|
|
1553
|
+
*/
|
|
1544
1554
|
async fetchMarkets(params = {}) {
|
|
1545
|
-
/**
|
|
1546
|
-
* @method
|
|
1547
|
-
* @name bitget#fetchMarkets
|
|
1548
|
-
* @description retrieves data on all markets for bitget
|
|
1549
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Symbols
|
|
1550
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
|
|
1551
|
-
* @see https://www.bitget.com/api-doc/margin/common/support-currencies
|
|
1552
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1553
|
-
* @returns {object[]} an array of objects representing market data
|
|
1554
|
-
*/
|
|
1555
1555
|
if (this.options['adjustForTimeDifference']) {
|
|
1556
1556
|
await this.loadTimeDifference();
|
|
1557
1557
|
}
|
|
@@ -1820,15 +1820,15 @@ class bitget extends bitget$1 {
|
|
|
1820
1820
|
'info': market,
|
|
1821
1821
|
};
|
|
1822
1822
|
}
|
|
1823
|
+
/**
|
|
1824
|
+
* @method
|
|
1825
|
+
* @name bitget#fetchCurrencies
|
|
1826
|
+
* @description fetches all available currencies on an exchange
|
|
1827
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Coin-List
|
|
1828
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1829
|
+
* @returns {object} an associative dictionary of currencies
|
|
1830
|
+
*/
|
|
1823
1831
|
async fetchCurrencies(params = {}) {
|
|
1824
|
-
/**
|
|
1825
|
-
* @method
|
|
1826
|
-
* @name bitget#fetchCurrencies
|
|
1827
|
-
* @description fetches all available currencies on an exchange
|
|
1828
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Coin-List
|
|
1829
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1830
|
-
* @returns {object} an associative dictionary of currencies
|
|
1831
|
-
*/
|
|
1832
1832
|
const response = await this.publicSpotGetV2SpotPublicCoins(params);
|
|
1833
1833
|
//
|
|
1834
1834
|
// {
|
|
@@ -1949,21 +1949,21 @@ class bitget extends bitget$1 {
|
|
|
1949
1949
|
}
|
|
1950
1950
|
return result;
|
|
1951
1951
|
}
|
|
1952
|
+
/**
|
|
1953
|
+
* @method
|
|
1954
|
+
* @name bitget#fetchMarketLeverageTiers
|
|
1955
|
+
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
|
1956
|
+
* @see https://www.bitget.com/api-doc/contract/position/Get-Query-Position-Lever
|
|
1957
|
+
* @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Tier-Data
|
|
1958
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Tier-Data
|
|
1959
|
+
* @param {string} symbol unified market symbol
|
|
1960
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1961
|
+
* @param {string} [params.marginMode] for spot margin 'cross' or 'isolated', default is 'isolated'
|
|
1962
|
+
* @param {string} [params.code] required for cross spot margin
|
|
1963
|
+
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
1964
|
+
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
1965
|
+
*/
|
|
1952
1966
|
async fetchMarketLeverageTiers(symbol, params = {}) {
|
|
1953
|
-
/**
|
|
1954
|
-
* @method
|
|
1955
|
-
* @name bitget#fetchMarketLeverageTiers
|
|
1956
|
-
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
|
1957
|
-
* @see https://www.bitget.com/api-doc/contract/position/Get-Query-Position-Lever
|
|
1958
|
-
* @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Tier-Data
|
|
1959
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Tier-Data
|
|
1960
|
-
* @param {string} symbol unified market symbol
|
|
1961
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1962
|
-
* @param {string} [params.marginMode] for spot margin 'cross' or 'isolated', default is 'isolated'
|
|
1963
|
-
* @param {string} [params.code] required for cross spot margin
|
|
1964
|
-
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
1965
|
-
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
1966
|
-
*/
|
|
1967
1967
|
await this.loadMarkets();
|
|
1968
1968
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
1969
1969
|
let market = undefined;
|
|
@@ -2110,8 +2110,10 @@ class bitget extends bitget$1 {
|
|
|
2110
2110
|
const maxNotional = this.safeNumberN(item, ['endUnit', 'maxBorrowableAmount', 'baseMaxBorrowableAmount']);
|
|
2111
2111
|
const marginCurrency = this.safeString2(item, 'coin', 'baseCoin');
|
|
2112
2112
|
const currencyId = (marginCurrency !== undefined) ? marginCurrency : market['base'];
|
|
2113
|
+
const marketId = this.safeString(item, 'symbol');
|
|
2113
2114
|
tiers.push({
|
|
2114
2115
|
'tier': this.safeInteger2(item, 'level', 'tier'),
|
|
2116
|
+
'symbol': this.safeSymbol(marketId, market),
|
|
2115
2117
|
'currency': this.safeCurrencyCode(currencyId),
|
|
2116
2118
|
'minNotional': minNotional,
|
|
2117
2119
|
'maxNotional': maxNotional,
|
|
@@ -2123,21 +2125,21 @@ class bitget extends bitget$1 {
|
|
|
2123
2125
|
}
|
|
2124
2126
|
return tiers;
|
|
2125
2127
|
}
|
|
2128
|
+
/**
|
|
2129
|
+
* @method
|
|
2130
|
+
* @name bitget#fetchDeposits
|
|
2131
|
+
* @description fetch all deposits made to an account
|
|
2132
|
+
* @see https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record
|
|
2133
|
+
* @param {string} code unified currency code
|
|
2134
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2135
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2136
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2137
|
+
* @param {int} [params.until] end time in milliseconds
|
|
2138
|
+
* @param {string} [params.idLessThan] return records with id less than the provided value
|
|
2139
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2140
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2141
|
+
*/
|
|
2126
2142
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2127
|
-
/**
|
|
2128
|
-
* @method
|
|
2129
|
-
* @name bitget#fetchDeposits
|
|
2130
|
-
* @description fetch all deposits made to an account
|
|
2131
|
-
* @see https://www.bitget.com/api-doc/spot/account/Get-Deposit-Record
|
|
2132
|
-
* @param {string} code unified currency code
|
|
2133
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2134
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2135
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2136
|
-
* @param {int} [params.until] end time in milliseconds
|
|
2137
|
-
* @param {string} [params.idLessThan] return records with id less than the provided value
|
|
2138
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2139
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2140
|
-
*/
|
|
2141
2143
|
await this.loadMarkets();
|
|
2142
2144
|
let paginate = false;
|
|
2143
2145
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchDeposits', 'paginate');
|
|
@@ -2187,20 +2189,20 @@ class bitget extends bitget$1 {
|
|
|
2187
2189
|
const rawTransactions = this.safeList(response, 'data', []);
|
|
2188
2190
|
return this.parseTransactions(rawTransactions, currency, since, limit);
|
|
2189
2191
|
}
|
|
2192
|
+
/**
|
|
2193
|
+
* @method
|
|
2194
|
+
* @name bitget#withdraw
|
|
2195
|
+
* @description make a withdrawal
|
|
2196
|
+
* @see https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
|
|
2197
|
+
* @param {string} code unified currency code
|
|
2198
|
+
* @param {float} amount the amount to withdraw
|
|
2199
|
+
* @param {string} address the address to withdraw to
|
|
2200
|
+
* @param {string} tag
|
|
2201
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2202
|
+
* @param {string} [params.chain] the blockchain network the withdrawal is taking place on
|
|
2203
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2204
|
+
*/
|
|
2190
2205
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2191
|
-
/**
|
|
2192
|
-
* @method
|
|
2193
|
-
* @name bitget#withdraw
|
|
2194
|
-
* @description make a withdrawal
|
|
2195
|
-
* @see https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
|
|
2196
|
-
* @param {string} code unified currency code
|
|
2197
|
-
* @param {float} amount the amount to withdraw
|
|
2198
|
-
* @param {string} address the address to withdraw to
|
|
2199
|
-
* @param {string} tag
|
|
2200
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2201
|
-
* @param {string} [params.chain] the blockchain network the withdrawal is taking place on
|
|
2202
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2203
|
-
*/
|
|
2204
2206
|
this.checkAddress(address);
|
|
2205
2207
|
const chain = this.safeString2(params, 'chain', 'network');
|
|
2206
2208
|
params = this.omit(params, 'network');
|
|
@@ -2268,21 +2270,21 @@ class bitget extends bitget$1 {
|
|
|
2268
2270
|
}
|
|
2269
2271
|
return result;
|
|
2270
2272
|
}
|
|
2273
|
+
/**
|
|
2274
|
+
* @method
|
|
2275
|
+
* @name bitget#fetchWithdrawals
|
|
2276
|
+
* @description fetch all withdrawals made from an account
|
|
2277
|
+
* @see https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record
|
|
2278
|
+
* @param {string} code unified currency code
|
|
2279
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2280
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2281
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2282
|
+
* @param {int} [params.until] end time in milliseconds
|
|
2283
|
+
* @param {string} [params.idLessThan] return records with id less than the provided value
|
|
2284
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2285
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2286
|
+
*/
|
|
2271
2287
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2272
|
-
/**
|
|
2273
|
-
* @method
|
|
2274
|
-
* @name bitget#fetchWithdrawals
|
|
2275
|
-
* @description fetch all withdrawals made from an account
|
|
2276
|
-
* @see https://www.bitget.com/api-doc/spot/account/Get-Withdraw-Record
|
|
2277
|
-
* @param {string} code unified currency code
|
|
2278
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2279
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2280
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2281
|
-
* @param {int} [params.until] end time in milliseconds
|
|
2282
|
-
* @param {string} [params.idLessThan] return records with id less than the provided value
|
|
2283
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2284
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2285
|
-
*/
|
|
2286
2288
|
await this.loadMarkets();
|
|
2287
2289
|
let paginate = false;
|
|
2288
2290
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
|
|
@@ -2421,16 +2423,16 @@ class bitget extends bitget$1 {
|
|
|
2421
2423
|
};
|
|
2422
2424
|
return this.safeString(statuses, status, status);
|
|
2423
2425
|
}
|
|
2426
|
+
/**
|
|
2427
|
+
* @method
|
|
2428
|
+
* @name bitget#fetchDepositAddress
|
|
2429
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
2430
|
+
* @see https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address
|
|
2431
|
+
* @param {string} code unified currency code
|
|
2432
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2433
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2434
|
+
*/
|
|
2424
2435
|
async fetchDepositAddress(code, params = {}) {
|
|
2425
|
-
/**
|
|
2426
|
-
* @method
|
|
2427
|
-
* @name bitget#fetchDepositAddress
|
|
2428
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
2429
|
-
* @see https://www.bitget.com/api-doc/spot/account/Get-Deposit-Address
|
|
2430
|
-
* @param {string} code unified currency code
|
|
2431
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2432
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2433
|
-
*/
|
|
2434
2436
|
await this.loadMarkets();
|
|
2435
2437
|
const networkCode = this.safeString2(params, 'chain', 'network');
|
|
2436
2438
|
params = this.omit(params, 'network');
|
|
@@ -2488,18 +2490,18 @@ class bitget extends bitget$1 {
|
|
|
2488
2490
|
'tag': this.safeString(depositAddress, 'tag'),
|
|
2489
2491
|
};
|
|
2490
2492
|
}
|
|
2493
|
+
/**
|
|
2494
|
+
* @method
|
|
2495
|
+
* @name bitget#fetchOrderBook
|
|
2496
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
2497
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Orderbook
|
|
2498
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Merge-Depth
|
|
2499
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2500
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2501
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2502
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
2503
|
+
*/
|
|
2491
2504
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
2492
|
-
/**
|
|
2493
|
-
* @method
|
|
2494
|
-
* @name bitget#fetchOrderBook
|
|
2495
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
2496
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Orderbook
|
|
2497
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Merge-Depth
|
|
2498
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2499
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2500
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2501
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
2502
|
-
*/
|
|
2503
2505
|
await this.loadMarkets();
|
|
2504
2506
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
2505
2507
|
let market = undefined;
|
|
@@ -2662,17 +2664,17 @@ class bitget extends bitget$1 {
|
|
|
2662
2664
|
'info': ticker,
|
|
2663
2665
|
}, market);
|
|
2664
2666
|
}
|
|
2667
|
+
/**
|
|
2668
|
+
* @method
|
|
2669
|
+
* @name bitget#fetchTicker
|
|
2670
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
2671
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Tickers
|
|
2672
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Ticker
|
|
2673
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2674
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2675
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2676
|
+
*/
|
|
2665
2677
|
async fetchTicker(symbol, params = {}) {
|
|
2666
|
-
/**
|
|
2667
|
-
* @method
|
|
2668
|
-
* @name bitget#fetchTicker
|
|
2669
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
2670
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Tickers
|
|
2671
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Ticker
|
|
2672
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2673
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2674
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2675
|
-
*/
|
|
2676
2678
|
await this.loadMarkets();
|
|
2677
2679
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
2678
2680
|
let market = undefined;
|
|
@@ -2762,16 +2764,16 @@ class bitget extends bitget$1 {
|
|
|
2762
2764
|
const data = this.safeList(response, 'data', []);
|
|
2763
2765
|
return this.parseTicker(data[0], market);
|
|
2764
2766
|
}
|
|
2767
|
+
/**
|
|
2768
|
+
* @method
|
|
2769
|
+
* @name bitget#fetchMarkPrice
|
|
2770
|
+
* @description fetches the mark price for a specific market
|
|
2771
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Symbol-Price
|
|
2772
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2773
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2774
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2775
|
+
*/
|
|
2765
2776
|
async fetchMarkPrice(symbol, params = {}) {
|
|
2766
|
-
/**
|
|
2767
|
-
* @method
|
|
2768
|
-
* @name bitget#fetchMarkPrice
|
|
2769
|
-
* @description fetches the mark price for a specific market
|
|
2770
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Symbol-Price
|
|
2771
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2772
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2773
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2774
|
-
*/
|
|
2775
2777
|
await this.loadMarkets();
|
|
2776
2778
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
2777
2779
|
let market = undefined;
|
|
@@ -2798,19 +2800,19 @@ class bitget extends bitget$1 {
|
|
|
2798
2800
|
const data = this.safeList(response, 'data', []);
|
|
2799
2801
|
return this.parseTicker(data[0], market);
|
|
2800
2802
|
}
|
|
2803
|
+
/**
|
|
2804
|
+
* @method
|
|
2805
|
+
* @name bitget#fetchTickers
|
|
2806
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
2807
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Tickers
|
|
2808
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
|
2809
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
2810
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2811
|
+
* @param {string} [params.subType] *contract only* 'linear', 'inverse'
|
|
2812
|
+
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
2813
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2814
|
+
*/
|
|
2801
2815
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
2802
|
-
/**
|
|
2803
|
-
* @method
|
|
2804
|
-
* @name bitget#fetchTickers
|
|
2805
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
2806
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Tickers
|
|
2807
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
|
2808
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
2809
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2810
|
-
* @param {string} [params.subType] *contract only* 'linear', 'inverse'
|
|
2811
|
-
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
2812
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
2813
|
-
*/
|
|
2814
2816
|
await this.loadMarkets();
|
|
2815
2817
|
let market = undefined;
|
|
2816
2818
|
if (symbols !== undefined) {
|
|
@@ -3022,23 +3024,23 @@ class bitget extends bitget$1 {
|
|
|
3022
3024
|
'fee': fee,
|
|
3023
3025
|
}, market);
|
|
3024
3026
|
}
|
|
3027
|
+
/**
|
|
3028
|
+
* @method
|
|
3029
|
+
* @name bitget#fetchTrades
|
|
3030
|
+
* @description get the list of most recent trades for a particular symbol
|
|
3031
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Recent-Trades
|
|
3032
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Market-Trades
|
|
3033
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Recent-Fills
|
|
3034
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Fills-History
|
|
3035
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
3036
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
3037
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
3038
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3039
|
+
* @param {int} [params.until] *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* the latest time in ms to fetch trades for
|
|
3040
|
+
* @param {boolean} [params.paginate] *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* default false, when true will automatically paginate by calling this endpoint multiple times
|
|
3041
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
3042
|
+
*/
|
|
3025
3043
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
3026
|
-
/**
|
|
3027
|
-
* @method
|
|
3028
|
-
* @name bitget#fetchTrades
|
|
3029
|
-
* @description get the list of most recent trades for a particular symbol
|
|
3030
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Recent-Trades
|
|
3031
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Market-Trades
|
|
3032
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Recent-Fills
|
|
3033
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Fills-History
|
|
3034
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
3035
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
3036
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
3037
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3038
|
-
* @param {int} [params.until] *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* the latest time in ms to fetch trades for
|
|
3039
|
-
* @param {boolean} [params.paginate] *only applies to publicSpotGetV2SpotMarketFillsHistory and publicMixGetV2MixMarketFillsHistory* default false, when true will automatically paginate by calling this endpoint multiple times
|
|
3040
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
3041
|
-
*/
|
|
3042
3044
|
await this.loadMarkets();
|
|
3043
3045
|
let paginate = false;
|
|
3044
3046
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchTrades', 'paginate');
|
|
@@ -3142,17 +3144,17 @@ class bitget extends bitget$1 {
|
|
|
3142
3144
|
const data = this.safeList(response, 'data', []);
|
|
3143
3145
|
return this.parseTrades(data, market, since, limit);
|
|
3144
3146
|
}
|
|
3147
|
+
/**
|
|
3148
|
+
* @method
|
|
3149
|
+
* @name bitget#fetchTradingFee
|
|
3150
|
+
* @description fetch the trading fees for a market
|
|
3151
|
+
* @see https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
|
|
3152
|
+
* @param {string} symbol unified market symbol
|
|
3153
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3154
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
|
|
3155
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3156
|
+
*/
|
|
3145
3157
|
async fetchTradingFee(symbol, params = {}) {
|
|
3146
|
-
/**
|
|
3147
|
-
* @method
|
|
3148
|
-
* @name bitget#fetchTradingFee
|
|
3149
|
-
* @description fetch the trading fees for a market
|
|
3150
|
-
* @see https://www.bitget.com/api-doc/common/public/Get-Trade-Rate
|
|
3151
|
-
* @param {string} symbol unified market symbol
|
|
3152
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3153
|
-
* @param {string} [params.marginMode] 'isolated' or 'cross', for finding the fee rate of spot margin trading pairs
|
|
3154
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3155
|
-
*/
|
|
3156
3158
|
await this.loadMarkets();
|
|
3157
3159
|
const market = this.market(symbol);
|
|
3158
3160
|
const request = {
|
|
@@ -3186,19 +3188,19 @@ class bitget extends bitget$1 {
|
|
|
3186
3188
|
const data = this.safeValue(response, 'data', {});
|
|
3187
3189
|
return this.parseTradingFee(data, market);
|
|
3188
3190
|
}
|
|
3191
|
+
/**
|
|
3192
|
+
* @method
|
|
3193
|
+
* @name bitget#fetchTradingFees
|
|
3194
|
+
* @description fetch the trading fees for multiple markets
|
|
3195
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Symbols
|
|
3196
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
|
|
3197
|
+
* @see https://www.bitget.com/api-doc/margin/common/support-currencies
|
|
3198
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3199
|
+
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
3200
|
+
* @param {boolean} [params.margin] set to true for spot margin
|
|
3201
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
3202
|
+
*/
|
|
3189
3203
|
async fetchTradingFees(params = {}) {
|
|
3190
|
-
/**
|
|
3191
|
-
* @method
|
|
3192
|
-
* @name bitget#fetchTradingFees
|
|
3193
|
-
* @description fetch the trading fees for multiple markets
|
|
3194
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Symbols
|
|
3195
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts
|
|
3196
|
-
* @see https://www.bitget.com/api-doc/margin/common/support-currencies
|
|
3197
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3198
|
-
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
3199
|
-
* @param {boolean} [params.margin] set to true for spot margin
|
|
3200
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
3201
|
-
*/
|
|
3202
3204
|
await this.loadMarkets();
|
|
3203
3205
|
let response = undefined;
|
|
3204
3206
|
let marginMode = undefined;
|
|
@@ -3339,27 +3341,27 @@ class bitget extends bitget$1 {
|
|
|
3339
3341
|
this.safeNumber(ohlcv, 5),
|
|
3340
3342
|
];
|
|
3341
3343
|
}
|
|
3344
|
+
/**
|
|
3345
|
+
* @method
|
|
3346
|
+
* @name bitget#fetchOHLCV
|
|
3347
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3348
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Candle-Data
|
|
3349
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-History-Candle-Data
|
|
3350
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
|
|
3351
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-History-Candle-Data
|
|
3352
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-History-Index-Candle-Data
|
|
3353
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-History-Mark-Candle-Data
|
|
3354
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3355
|
+
* @param {string} timeframe the length of time each candle represents
|
|
3356
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
3357
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
3358
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3359
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
3360
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
3361
|
+
* @param {string} [params.price] *swap only* "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
|
|
3362
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
3363
|
+
*/
|
|
3342
3364
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
3343
|
-
/**
|
|
3344
|
-
* @method
|
|
3345
|
-
* @name bitget#fetchOHLCV
|
|
3346
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3347
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Candle-Data
|
|
3348
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-History-Candle-Data
|
|
3349
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Candle-Data
|
|
3350
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-History-Candle-Data
|
|
3351
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-History-Index-Candle-Data
|
|
3352
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-History-Mark-Candle-Data
|
|
3353
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3354
|
-
* @param {string} timeframe the length of time each candle represents
|
|
3355
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
3356
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
3357
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3358
|
-
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
3359
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
3360
|
-
* @param {string} [params.price] *swap only* "mark" (to fetch mark price candles) or "index" (to fetch index price candles)
|
|
3361
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
3362
|
-
*/
|
|
3363
3365
|
await this.loadMarkets();
|
|
3364
3366
|
const defaultLimit = 100; // default 100, max 1000
|
|
3365
3367
|
const maxLimitForRecentEndpoint = 1000;
|
|
@@ -3485,21 +3487,21 @@ class bitget extends bitget$1 {
|
|
|
3485
3487
|
const data = this.safeList(response, 'data', response);
|
|
3486
3488
|
return this.parseOHLCVs(data, market, timeframe, since, limit);
|
|
3487
3489
|
}
|
|
3490
|
+
/**
|
|
3491
|
+
* @method
|
|
3492
|
+
* @name bitget#fetchBalance
|
|
3493
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
3494
|
+
* @see https://www.bitget.com/api-doc/spot/account/Get-Account-Assets
|
|
3495
|
+
* @see https://www.bitget.com/api-doc/contract/account/Get-Account-List
|
|
3496
|
+
* @see https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Assets
|
|
3497
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/account/Get-Isolated-Assets
|
|
3498
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-assets
|
|
3499
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-assets
|
|
3500
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3501
|
+
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
3502
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
3503
|
+
*/
|
|
3488
3504
|
async fetchBalance(params = {}) {
|
|
3489
|
-
/**
|
|
3490
|
-
* @method
|
|
3491
|
-
* @name bitget#fetchBalance
|
|
3492
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
3493
|
-
* @see https://www.bitget.com/api-doc/spot/account/Get-Account-Assets
|
|
3494
|
-
* @see https://www.bitget.com/api-doc/contract/account/Get-Account-List
|
|
3495
|
-
* @see https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Assets
|
|
3496
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/account/Get-Isolated-Assets
|
|
3497
|
-
* @see https://bitgetlimited.github.io/apidoc/en/margin/#get-cross-assets
|
|
3498
|
-
* @see https://bitgetlimited.github.io/apidoc/en/margin/#get-isolated-assets
|
|
3499
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3500
|
-
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
3501
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
3502
|
-
*/
|
|
3503
3505
|
await this.loadMarkets();
|
|
3504
3506
|
const request = {};
|
|
3505
3507
|
let marketType = undefined;
|
|
@@ -4116,19 +4118,19 @@ class bitget extends bitget$1 {
|
|
|
4116
4118
|
'trades': undefined,
|
|
4117
4119
|
}, market);
|
|
4118
4120
|
}
|
|
4121
|
+
/**
|
|
4122
|
+
* @method
|
|
4123
|
+
* @name bitget#createMarketBuyOrderWithCost
|
|
4124
|
+
* @description create a market buy order by providing the symbol and cost
|
|
4125
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Place-Order
|
|
4126
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
|
|
4127
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
|
|
4128
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
4129
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
4130
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4131
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4132
|
+
*/
|
|
4119
4133
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
4120
|
-
/**
|
|
4121
|
-
* @method
|
|
4122
|
-
* @name bitget#createMarketBuyOrderWithCost
|
|
4123
|
-
* @description create a market buy order by providing the symbol and cost
|
|
4124
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Place-Order
|
|
4125
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
|
|
4126
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
|
|
4127
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
4128
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
4129
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4130
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4131
|
-
*/
|
|
4132
4134
|
await this.loadMarkets();
|
|
4133
4135
|
const market = this.market(symbol);
|
|
4134
4136
|
if (!market['spot']) {
|
|
@@ -4137,48 +4139,48 @@ class bitget extends bitget$1 {
|
|
|
4137
4139
|
params['createMarketBuyOrderRequiresPrice'] = false;
|
|
4138
4140
|
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
4139
4141
|
}
|
|
4142
|
+
/**
|
|
4143
|
+
* @method
|
|
4144
|
+
* @name bitget#createOrder
|
|
4145
|
+
* @description create a trade order
|
|
4146
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Place-Order
|
|
4147
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Place-Plan-Order
|
|
4148
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Place-Order
|
|
4149
|
+
* @see https://www.bitget.com/api-doc/contract/plan/Place-Tpsl-Order
|
|
4150
|
+
* @see https://www.bitget.com/api-doc/contract/plan/Place-Plan-Order
|
|
4151
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
|
|
4152
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
|
|
4153
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
4154
|
+
* @param {string} type 'market' or 'limit'
|
|
4155
|
+
* @param {string} side 'buy' or 'sell'
|
|
4156
|
+
* @param {float} amount how much you want to trade in units of the base currency
|
|
4157
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4158
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4159
|
+
* @param {float} [params.cost] *spot only* how much you want to trade in units of the quote currency, for market buy orders only
|
|
4160
|
+
* @param {float} [params.triggerPrice] *swap only* The price at which a trigger order is triggered at
|
|
4161
|
+
* @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
|
|
4162
|
+
* @param {float} [params.takeProfitPrice] *swap only* The price at which a take profit order is triggered at
|
|
4163
|
+
* @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)
|
|
4164
|
+
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
4165
|
+
* @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)
|
|
4166
|
+
* @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
|
|
4167
|
+
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
4168
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
4169
|
+
* @param {string} [params.loanType] *spot margin only* 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
|
|
4170
|
+
* @param {string} [params.holdSide] *contract stopLossPrice, takeProfitPrice only* Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell')
|
|
4171
|
+
* @param {float} [params.stopLoss.price] *swap only* the execution price for a stop loss attached to a trigger order
|
|
4172
|
+
* @param {float} [params.takeProfit.price] *swap only* the execution price for a take profit attached to a trigger order
|
|
4173
|
+
* @param {string} [params.stopLoss.type] *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
|
|
4174
|
+
* @param {string} [params.takeProfit.type] *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
|
|
4175
|
+
* @param {string} [params.trailingPercent] *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10
|
|
4176
|
+
* @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
|
|
4177
|
+
* @param {string} [params.triggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
|
|
4178
|
+
* @param {boolean} [params.oneWayMode] *swap and future only* required to set this to true in one_way_mode and you can leave this as undefined in hedge_mode, can adjust the mode using the setPositionMode() method
|
|
4179
|
+
* @param {bool} [params.hedged] *swap and future only* true for hedged mode, false for one way mode, default is false
|
|
4180
|
+
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
4181
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4182
|
+
*/
|
|
4140
4183
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
4141
|
-
/**
|
|
4142
|
-
* @method
|
|
4143
|
-
* @name bitget#createOrder
|
|
4144
|
-
* @description create a trade order
|
|
4145
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Place-Order
|
|
4146
|
-
* @see https://www.bitget.com/api-doc/spot/plan/Place-Plan-Order
|
|
4147
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Place-Order
|
|
4148
|
-
* @see https://www.bitget.com/api-doc/contract/plan/Place-Tpsl-Order
|
|
4149
|
-
* @see https://www.bitget.com/api-doc/contract/plan/Place-Plan-Order
|
|
4150
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Place-Order
|
|
4151
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
|
|
4152
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
4153
|
-
* @param {string} type 'market' or 'limit'
|
|
4154
|
-
* @param {string} side 'buy' or 'sell'
|
|
4155
|
-
* @param {float} amount how much you want to trade in units of the base currency
|
|
4156
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4157
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4158
|
-
* @param {float} [params.cost] *spot only* how much you want to trade in units of the quote currency, for market buy orders only
|
|
4159
|
-
* @param {float} [params.triggerPrice] *swap only* The price at which a trigger order is triggered at
|
|
4160
|
-
* @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
|
|
4161
|
-
* @param {float} [params.takeProfitPrice] *swap only* The price at which a take profit order is triggered at
|
|
4162
|
-
* @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)
|
|
4163
|
-
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
4164
|
-
* @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)
|
|
4165
|
-
* @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
|
|
4166
|
-
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
4167
|
-
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
4168
|
-
* @param {string} [params.loanType] *spot margin only* 'normal', 'autoLoan', 'autoRepay', or 'autoLoanAndRepay' default is 'normal'
|
|
4169
|
-
* @param {string} [params.holdSide] *contract stopLossPrice, takeProfitPrice only* Two-way position: ('long' or 'short'), one-way position: ('buy' or 'sell')
|
|
4170
|
-
* @param {float} [params.stopLoss.price] *swap only* the execution price for a stop loss attached to a trigger order
|
|
4171
|
-
* @param {float} [params.takeProfit.price] *swap only* the execution price for a take profit attached to a trigger order
|
|
4172
|
-
* @param {string} [params.stopLoss.type] *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
|
|
4173
|
-
* @param {string} [params.takeProfit.type] *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
|
|
4174
|
-
* @param {string} [params.trailingPercent] *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10
|
|
4175
|
-
* @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
|
|
4176
|
-
* @param {string} [params.triggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
|
|
4177
|
-
* @param {boolean} [params.oneWayMode] *swap and future only* required to set this to true in one_way_mode and you can leave this as undefined in hedge_mode, can adjust the mode using the setPositionMode() method
|
|
4178
|
-
* @param {bool} [params.hedged] *swap and future only* true for hedged mode, false for one way mode, default is false
|
|
4179
|
-
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
4180
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4181
|
-
*/
|
|
4182
4184
|
await this.loadMarkets();
|
|
4183
4185
|
const market = this.market(symbol);
|
|
4184
4186
|
const marginParams = this.handleMarginModeAndParams('createOrder', params);
|
|
@@ -4463,19 +4465,19 @@ class bitget extends bitget$1 {
|
|
|
4463
4465
|
}
|
|
4464
4466
|
return this.extend(request, params);
|
|
4465
4467
|
}
|
|
4468
|
+
/**
|
|
4469
|
+
* @method
|
|
4470
|
+
* @name bitget#createOrders
|
|
4471
|
+
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
4472
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Batch-Place-Orders
|
|
4473
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Batch-Order
|
|
4474
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Order
|
|
4475
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Order
|
|
4476
|
+
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
4477
|
+
* @param {object} [params] extra parameters specific to the api endpoint
|
|
4478
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4479
|
+
*/
|
|
4466
4480
|
async createOrders(orders, params = {}) {
|
|
4467
|
-
/**
|
|
4468
|
-
* @method
|
|
4469
|
-
* @name bitget#createOrders
|
|
4470
|
-
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
4471
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Batch-Place-Orders
|
|
4472
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Batch-Order
|
|
4473
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Order
|
|
4474
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Order
|
|
4475
|
-
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
4476
|
-
* @param {object} [params] extra parameters specific to the api endpoint
|
|
4477
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4478
|
-
*/
|
|
4479
4481
|
await this.loadMarkets();
|
|
4480
4482
|
const ordersRequests = [];
|
|
4481
4483
|
let symbol = undefined;
|
|
@@ -4575,38 +4577,38 @@ class bitget extends bitget$1 {
|
|
|
4575
4577
|
const both = this.arrayConcat(orderInfo, failure);
|
|
4576
4578
|
return this.parseOrders(both, market);
|
|
4577
4579
|
}
|
|
4580
|
+
/**
|
|
4581
|
+
* @method
|
|
4582
|
+
* @name bitget#editOrder
|
|
4583
|
+
* @description edit a trade order
|
|
4584
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Modify-Plan-Order
|
|
4585
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Modify-Order
|
|
4586
|
+
* @see https://www.bitget.com/api-doc/contract/plan/Modify-Tpsl-Order
|
|
4587
|
+
* @see https://www.bitget.com/api-doc/contract/plan/Modify-Plan-Order
|
|
4588
|
+
* @param {string} id cancel order id
|
|
4589
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
4590
|
+
* @param {string} type 'market' or 'limit'
|
|
4591
|
+
* @param {string} side 'buy' or 'sell'
|
|
4592
|
+
* @param {float} amount how much you want to trade in units of the base currency
|
|
4593
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4594
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4595
|
+
* @param {float} [params.triggerPrice] the price that a trigger order is triggered at
|
|
4596
|
+
* @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
|
|
4597
|
+
* @param {float} [params.takeProfitPrice] *swap only* The price at which a take profit order is triggered at
|
|
4598
|
+
* @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)
|
|
4599
|
+
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
4600
|
+
* @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)
|
|
4601
|
+
* @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
|
|
4602
|
+
* @param {float} [params.stopLoss.price] *swap only* the execution price for a stop loss attached to a trigger order
|
|
4603
|
+
* @param {float} [params.takeProfit.price] *swap only* the execution price for a take profit attached to a trigger order
|
|
4604
|
+
* @param {string} [params.stopLoss.type] *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
|
|
4605
|
+
* @param {string} [params.takeProfit.type] *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
|
|
4606
|
+
* @param {string} [params.trailingPercent] *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10
|
|
4607
|
+
* @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
|
|
4608
|
+
* @param {string} [params.newTriggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
|
|
4609
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4610
|
+
*/
|
|
4578
4611
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
4579
|
-
/**
|
|
4580
|
-
* @method
|
|
4581
|
-
* @name bitget#editOrder
|
|
4582
|
-
* @description edit a trade order
|
|
4583
|
-
* @see https://www.bitget.com/api-doc/spot/plan/Modify-Plan-Order
|
|
4584
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Modify-Order
|
|
4585
|
-
* @see https://www.bitget.com/api-doc/contract/plan/Modify-Tpsl-Order
|
|
4586
|
-
* @see https://www.bitget.com/api-doc/contract/plan/Modify-Plan-Order
|
|
4587
|
-
* @param {string} id cancel order id
|
|
4588
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
4589
|
-
* @param {string} type 'market' or 'limit'
|
|
4590
|
-
* @param {string} side 'buy' or 'sell'
|
|
4591
|
-
* @param {float} amount how much you want to trade in units of the base currency
|
|
4592
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4593
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4594
|
-
* @param {float} [params.triggerPrice] the price that a trigger order is triggered at
|
|
4595
|
-
* @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
|
|
4596
|
-
* @param {float} [params.takeProfitPrice] *swap only* The price at which a take profit order is triggered at
|
|
4597
|
-
* @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)
|
|
4598
|
-
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
4599
|
-
* @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)
|
|
4600
|
-
* @param {float} [params.stopLoss.triggerPrice] *swap only* stop loss trigger price
|
|
4601
|
-
* @param {float} [params.stopLoss.price] *swap only* the execution price for a stop loss attached to a trigger order
|
|
4602
|
-
* @param {float} [params.takeProfit.price] *swap only* the execution price for a take profit attached to a trigger order
|
|
4603
|
-
* @param {string} [params.stopLoss.type] *swap only* the type for a stop loss attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
|
|
4604
|
-
* @param {string} [params.takeProfit.type] *swap only* the type for a take profit attached to a trigger order, 'fill_price', 'index_price' or 'mark_price', default is 'mark_price'
|
|
4605
|
-
* @param {string} [params.trailingPercent] *swap and future only* the percent to trail away from the current market price, rate can not be greater than 10
|
|
4606
|
-
* @param {string} [params.trailingTriggerPrice] *swap and future only* the price to trigger a trailing stop order, default uses the price argument
|
|
4607
|
-
* @param {string} [params.newTriggerType] *swap and future only* 'fill_price', 'mark_price' or 'index_price'
|
|
4608
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4609
|
-
*/
|
|
4610
4612
|
await this.loadMarkets();
|
|
4611
4613
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
4612
4614
|
let market = undefined;
|
|
@@ -4753,26 +4755,26 @@ class bitget extends bitget$1 {
|
|
|
4753
4755
|
const data = this.safeDict(response, 'data', {});
|
|
4754
4756
|
return this.parseOrder(data, market);
|
|
4755
4757
|
}
|
|
4758
|
+
/**
|
|
4759
|
+
* @method
|
|
4760
|
+
* @name bitget#cancelOrder
|
|
4761
|
+
* @description cancels an open order
|
|
4762
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Cancel-Order
|
|
4763
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Cancel-Plan-Order
|
|
4764
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Cancel-Order
|
|
4765
|
+
* @see https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
|
|
4766
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Cancel-Order
|
|
4767
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Cancel-Order
|
|
4768
|
+
* @param {string} id order id
|
|
4769
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
4770
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4771
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
4772
|
+
* @param {boolean} [params.stop] set to true for canceling trigger orders
|
|
4773
|
+
* @param {string} [params.planType] *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
|
|
4774
|
+
* @param {boolean} [params.trailing] set to true if you want to cancel a trailing order
|
|
4775
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4776
|
+
*/
|
|
4756
4777
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
4757
|
-
/**
|
|
4758
|
-
* @method
|
|
4759
|
-
* @name bitget#cancelOrder
|
|
4760
|
-
* @description cancels an open order
|
|
4761
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Cancel-Order
|
|
4762
|
-
* @see https://www.bitget.com/api-doc/spot/plan/Cancel-Plan-Order
|
|
4763
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Cancel-Order
|
|
4764
|
-
* @see https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
|
|
4765
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Cancel-Order
|
|
4766
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Cancel-Order
|
|
4767
|
-
* @param {string} id order id
|
|
4768
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
4769
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4770
|
-
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
4771
|
-
* @param {boolean} [params.stop] set to true for canceling trigger orders
|
|
4772
|
-
* @param {string} [params.planType] *swap only* either profit_plan, loss_plan, normal_plan, pos_profit, pos_loss, moving_plan or track_plan
|
|
4773
|
-
* @param {boolean} [params.trailing] set to true if you want to cancel a trailing order
|
|
4774
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4775
|
-
*/
|
|
4776
4778
|
if (symbol === undefined) {
|
|
4777
4779
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
4778
4780
|
}
|
|
@@ -4896,23 +4898,23 @@ class bitget extends bitget$1 {
|
|
|
4896
4898
|
}
|
|
4897
4899
|
return this.parseOrder(order, market);
|
|
4898
4900
|
}
|
|
4901
|
+
/**
|
|
4902
|
+
* @method
|
|
4903
|
+
* @name bitget#cancelOrders
|
|
4904
|
+
* @description cancel multiple orders
|
|
4905
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Batch-Cancel-Orders
|
|
4906
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
|
|
4907
|
+
* @see https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
|
|
4908
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Cancel-Order
|
|
4909
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Cancel-Orders
|
|
4910
|
+
* @param {string[]} ids order ids
|
|
4911
|
+
* @param {string} symbol unified market symbol, default is undefined
|
|
4912
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4913
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
4914
|
+
* @param {boolean} [params.stop] *contract only* set to true for canceling trigger orders
|
|
4915
|
+
* @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4916
|
+
*/
|
|
4899
4917
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
4900
|
-
/**
|
|
4901
|
-
* @method
|
|
4902
|
-
* @name bitget#cancelOrders
|
|
4903
|
-
* @description cancel multiple orders
|
|
4904
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Batch-Cancel-Orders
|
|
4905
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
|
|
4906
|
-
* @see https://www.bitget.com/api-doc/contract/plan/Cancel-Plan-Order
|
|
4907
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Cross-Batch-Cancel-Order
|
|
4908
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Batch-Cancel-Orders
|
|
4909
|
-
* @param {string[]} ids order ids
|
|
4910
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
4911
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4912
|
-
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
4913
|
-
* @param {boolean} [params.stop] *contract only* set to true for canceling trigger orders
|
|
4914
|
-
* @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4915
|
-
*/
|
|
4916
4918
|
if (symbol === undefined) {
|
|
4917
4919
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
4918
4920
|
}
|
|
@@ -4992,22 +4994,22 @@ class bitget extends bitget$1 {
|
|
|
4992
4994
|
const orders = this.safeList(data, 'successList', []);
|
|
4993
4995
|
return this.parseOrders(orders, market);
|
|
4994
4996
|
}
|
|
4997
|
+
/**
|
|
4998
|
+
* @method
|
|
4999
|
+
* @name bitget#cancelAllOrders
|
|
5000
|
+
* @description cancel all open orders
|
|
5001
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Cancel-Symbol-Orders
|
|
5002
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Batch-Cancel-Plan-Order
|
|
5003
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
|
|
5004
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
|
|
5005
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
|
|
5006
|
+
* @param {string} symbol unified market symbol
|
|
5007
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5008
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
5009
|
+
* @param {boolean} [params.stop] *contract only* set to true for canceling trigger orders
|
|
5010
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5011
|
+
*/
|
|
4995
5012
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
4996
|
-
/**
|
|
4997
|
-
* @method
|
|
4998
|
-
* @name bitget#cancelAllOrders
|
|
4999
|
-
* @description cancel all open orders
|
|
5000
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Cancel-Symbol-Orders
|
|
5001
|
-
* @see https://www.bitget.com/api-doc/spot/plan/Batch-Cancel-Plan-Order
|
|
5002
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
|
|
5003
|
-
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
|
|
5004
|
-
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
|
|
5005
|
-
* @param {string} symbol unified market symbol
|
|
5006
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5007
|
-
* @param {string} [params.marginMode] 'isolated' or 'cross' for spot margin trading
|
|
5008
|
-
* @param {boolean} [params.stop] *contract only* set to true for canceling trigger orders
|
|
5009
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5010
|
-
*/
|
|
5011
5013
|
if (symbol === undefined) {
|
|
5012
5014
|
throw new errors.ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
|
|
5013
5015
|
}
|
|
@@ -5118,18 +5120,18 @@ class bitget extends bitget$1 {
|
|
|
5118
5120
|
const responseList = this.arrayConcat(resultList, failureList);
|
|
5119
5121
|
return this.parseOrders(responseList);
|
|
5120
5122
|
}
|
|
5123
|
+
/**
|
|
5124
|
+
* @method
|
|
5125
|
+
* @name bitget#fetchOrder
|
|
5126
|
+
* @description fetches information on an order made by the user
|
|
5127
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
|
|
5128
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
|
|
5129
|
+
* @param {string} id the order id
|
|
5130
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
5131
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5132
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5133
|
+
*/
|
|
5121
5134
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
5122
|
-
/**
|
|
5123
|
-
* @method
|
|
5124
|
-
* @name bitget#fetchOrder
|
|
5125
|
-
* @description fetches information on an order made by the user
|
|
5126
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
|
|
5127
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
|
|
5128
|
-
* @param {string} id the order id
|
|
5129
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
5130
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5131
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5132
|
-
*/
|
|
5133
5135
|
if (symbol === undefined) {
|
|
5134
5136
|
throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
5135
5137
|
}
|
|
@@ -5242,29 +5244,29 @@ class bitget extends bitget$1 {
|
|
|
5242
5244
|
// const first = this.safeDict (data, 0, data);
|
|
5243
5245
|
// return this.parseOrder (first, market);
|
|
5244
5246
|
}
|
|
5247
|
+
/**
|
|
5248
|
+
* @method
|
|
5249
|
+
* @name bitget#fetchOpenOrders
|
|
5250
|
+
* @description fetch all unfilled currently open orders
|
|
5251
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Get-Unfilled-Orders
|
|
5252
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Get-Current-Plan-Order
|
|
5253
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-Pending
|
|
5254
|
+
* @see https://www.bitget.com/api-doc/contract/plan/get-orders-plan-pending
|
|
5255
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Open-Orders
|
|
5256
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Open-Orders
|
|
5257
|
+
* @param {string} symbol unified market symbol
|
|
5258
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
5259
|
+
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
5260
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5261
|
+
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
5262
|
+
* @param {string} [params.planType] *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
|
|
5263
|
+
* @param {boolean} [params.stop] set to true for fetching trigger orders
|
|
5264
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5265
|
+
* @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
|
5266
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
5267
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5268
|
+
*/
|
|
5245
5269
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5246
|
-
/**
|
|
5247
|
-
* @method
|
|
5248
|
-
* @name bitget#fetchOpenOrders
|
|
5249
|
-
* @description fetch all unfilled currently open orders
|
|
5250
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Get-Unfilled-Orders
|
|
5251
|
-
* @see https://www.bitget.com/api-doc/spot/plan/Get-Current-Plan-Order
|
|
5252
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-Pending
|
|
5253
|
-
* @see https://www.bitget.com/api-doc/contract/plan/get-orders-plan-pending
|
|
5254
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Open-Orders
|
|
5255
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Open-Orders
|
|
5256
|
-
* @param {string} symbol unified market symbol
|
|
5257
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
5258
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
5259
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5260
|
-
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
5261
|
-
* @param {string} [params.planType] *contract stop only* 'normal_plan': average trigger order, 'profit_loss': opened tp/sl orders, 'track_plan': trailing stop order, default is 'normal_plan'
|
|
5262
|
-
* @param {boolean} [params.stop] set to true for fetching trigger orders
|
|
5263
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5264
|
-
* @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
|
5265
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
5266
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5267
|
-
*/
|
|
5268
5270
|
await this.loadMarkets();
|
|
5269
5271
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
5270
5272
|
let market = undefined;
|
|
@@ -5553,75 +5555,75 @@ class bitget extends bitget$1 {
|
|
|
5553
5555
|
}
|
|
5554
5556
|
return this.parseOrders(data, market, since, limit);
|
|
5555
5557
|
}
|
|
5558
|
+
/**
|
|
5559
|
+
* @method
|
|
5560
|
+
* @name bitget#fetchClosedOrders
|
|
5561
|
+
* @description fetches information on multiple closed orders made by the user
|
|
5562
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
|
5563
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
|
5564
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
|
5565
|
+
* @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
|
5566
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
|
5567
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
|
5568
|
+
* @param {string} symbol unified market symbol of the closed orders
|
|
5569
|
+
* @param {int} [since] timestamp in ms of the earliest order
|
|
5570
|
+
* @param {int} [limit] the max number of closed orders to return
|
|
5571
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5572
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
5573
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5574
|
+
* @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
|
5575
|
+
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
5576
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
5577
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5578
|
+
*/
|
|
5556
5579
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5557
|
-
/**
|
|
5558
|
-
* @method
|
|
5559
|
-
* @name bitget#fetchClosedOrders
|
|
5560
|
-
* @description fetches information on multiple closed orders made by the user
|
|
5561
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
|
5562
|
-
* @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
|
5563
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
|
5564
|
-
* @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
|
5565
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
|
5566
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
|
5567
|
-
* @param {string} symbol unified market symbol of the closed orders
|
|
5568
|
-
* @param {int} [since] timestamp in ms of the earliest order
|
|
5569
|
-
* @param {int} [limit] the max number of closed orders to return
|
|
5570
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5571
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
5572
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5573
|
-
* @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
|
5574
|
-
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
5575
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
5576
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5577
|
-
*/
|
|
5578
5580
|
await this.loadMarkets();
|
|
5579
5581
|
const orders = await this.fetchCanceledAndClosedOrders(symbol, since, limit, params);
|
|
5580
5582
|
return this.filterBy(orders, 'status', 'closed');
|
|
5581
5583
|
}
|
|
5584
|
+
/**
|
|
5585
|
+
* @method
|
|
5586
|
+
* @name bitget#fetchCanceledOrders
|
|
5587
|
+
* @description fetches information on multiple canceled orders made by the user
|
|
5588
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
|
5589
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
|
5590
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
|
5591
|
+
* @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
|
5592
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
|
5593
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
|
5594
|
+
* @param {string} symbol unified market symbol of the canceled orders
|
|
5595
|
+
* @param {int} [since] timestamp in ms of the earliest order
|
|
5596
|
+
* @param {int} [limit] the max number of canceled orders to return
|
|
5597
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5598
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
5599
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5600
|
+
* @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
|
5601
|
+
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
5602
|
+
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
5603
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5604
|
+
*/
|
|
5582
5605
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5583
|
-
/**
|
|
5584
|
-
* @method
|
|
5585
|
-
* @name bitget#fetchCanceledOrders
|
|
5586
|
-
* @description fetches information on multiple canceled orders made by the user
|
|
5587
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
|
5588
|
-
* @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
|
5589
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
|
5590
|
-
* @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
|
5591
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
|
5592
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
|
5593
|
-
* @param {string} symbol unified market symbol of the canceled orders
|
|
5594
|
-
* @param {int} [since] timestamp in ms of the earliest order
|
|
5595
|
-
* @param {int} [limit] the max number of canceled orders to return
|
|
5596
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5597
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
5598
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5599
|
-
* @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
|
5600
|
-
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
5601
|
-
* @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
|
|
5602
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5603
|
-
*/
|
|
5604
5606
|
await this.loadMarkets();
|
|
5605
5607
|
const orders = await this.fetchCanceledAndClosedOrders(symbol, since, limit, params);
|
|
5606
5608
|
return this.filterBy(orders, 'status', 'canceled');
|
|
5607
5609
|
}
|
|
5610
|
+
/**
|
|
5611
|
+
* @method
|
|
5612
|
+
* @name bitget#fetchCanceledAndClosedOrders
|
|
5613
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
|
5614
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
|
5615
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
|
5616
|
+
* @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
|
5617
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
|
5618
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
|
5619
|
+
* @description fetches information on multiple canceled and closed orders made by the user
|
|
5620
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
5621
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
5622
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
5623
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5624
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5625
|
+
*/
|
|
5608
5626
|
async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5609
|
-
/**
|
|
5610
|
-
* @method
|
|
5611
|
-
* @name bitget#fetchCanceledAndClosedOrders
|
|
5612
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Get-History-Orders
|
|
5613
|
-
* @see https://www.bitget.com/api-doc/spot/plan/Get-History-Plan-Order
|
|
5614
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Get-Orders-History
|
|
5615
|
-
* @see https://www.bitget.com/api-doc/contract/plan/orders-plan-history
|
|
5616
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-History
|
|
5617
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Order-History
|
|
5618
|
-
* @description fetches information on multiple canceled and closed orders made by the user
|
|
5619
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
5620
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
5621
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
5622
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5623
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5624
|
-
*/
|
|
5625
5627
|
await this.loadMarkets();
|
|
5626
5628
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
5627
5629
|
let market = undefined;
|
|
@@ -5918,23 +5920,23 @@ class bitget extends bitget$1 {
|
|
|
5918
5920
|
const orders = this.safeList(response, 'data', []);
|
|
5919
5921
|
return this.parseOrders(orders, market, since, limit);
|
|
5920
5922
|
}
|
|
5923
|
+
/**
|
|
5924
|
+
* @method
|
|
5925
|
+
* @name bitget#fetchLedger
|
|
5926
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
5927
|
+
* @see https://www.bitget.com/api-doc/spot/account/Get-Account-Bills
|
|
5928
|
+
* @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
|
|
5929
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
5930
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
5931
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
5932
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5933
|
+
* @param {int} [params.until] end time in ms
|
|
5934
|
+
* @param {string} [params.symbol] *contract only* unified market symbol
|
|
5935
|
+
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
5936
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5937
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
5938
|
+
*/
|
|
5921
5939
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5922
|
-
/**
|
|
5923
|
-
* @method
|
|
5924
|
-
* @name bitget#fetchLedger
|
|
5925
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
5926
|
-
* @see https://www.bitget.com/api-doc/spot/account/Get-Account-Bills
|
|
5927
|
-
* @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
|
|
5928
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
5929
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
5930
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
5931
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5932
|
-
* @param {int} [params.until] end time in ms
|
|
5933
|
-
* @param {string} [params.symbol] *contract only* unified market symbol
|
|
5934
|
-
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
5935
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5936
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
5937
|
-
*/
|
|
5938
5940
|
await this.loadMarkets();
|
|
5939
5941
|
const symbol = this.safeString(params, 'symbol');
|
|
5940
5942
|
params = this.omit(params, 'symbol');
|
|
@@ -6143,23 +6145,23 @@ class bitget extends bitget$1 {
|
|
|
6143
6145
|
};
|
|
6144
6146
|
return this.safeString(types, type, type);
|
|
6145
6147
|
}
|
|
6148
|
+
/**
|
|
6149
|
+
* @method
|
|
6150
|
+
* @name bitget#fetchMyTrades
|
|
6151
|
+
* @description fetch all trades made by the user
|
|
6152
|
+
* @see https://www.bitget.com/api-doc/spot/trade/Get-Fills
|
|
6153
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Fills
|
|
6154
|
+
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-Fills
|
|
6155
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Transaction-Details
|
|
6156
|
+
* @param {string} symbol unified market symbol
|
|
6157
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
6158
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
6159
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6160
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
6161
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
6162
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
6163
|
+
*/
|
|
6146
6164
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6147
|
-
/**
|
|
6148
|
-
* @method
|
|
6149
|
-
* @name bitget#fetchMyTrades
|
|
6150
|
-
* @description fetch all trades made by the user
|
|
6151
|
-
* @see https://www.bitget.com/api-doc/spot/trade/Get-Fills
|
|
6152
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Get-Order-Fills
|
|
6153
|
-
* @see https://www.bitget.com/api-doc/margin/cross/trade/Get-Cross-Order-Fills
|
|
6154
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/trade/Get-Isolated-Transaction-Details
|
|
6155
|
-
* @param {string} symbol unified market symbol
|
|
6156
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
6157
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
6158
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6159
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
6160
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
6161
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
6162
|
-
*/
|
|
6163
6165
|
if (symbol === undefined) {
|
|
6164
6166
|
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
6165
6167
|
}
|
|
@@ -6332,16 +6334,16 @@ class bitget extends bitget$1 {
|
|
|
6332
6334
|
}
|
|
6333
6335
|
return this.parseTrades(data, market, since, limit);
|
|
6334
6336
|
}
|
|
6337
|
+
/**
|
|
6338
|
+
* @method
|
|
6339
|
+
* @name bitget#fetchPosition
|
|
6340
|
+
* @description fetch data on a single open contract trade position
|
|
6341
|
+
* @see https://www.bitget.com/api-doc/contract/position/get-single-position
|
|
6342
|
+
* @param {string} symbol unified market symbol of the market the position is held in
|
|
6343
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6344
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
6345
|
+
*/
|
|
6335
6346
|
async fetchPosition(symbol, params = {}) {
|
|
6336
|
-
/**
|
|
6337
|
-
* @method
|
|
6338
|
-
* @name bitget#fetchPosition
|
|
6339
|
-
* @description fetch data on a single open contract trade position
|
|
6340
|
-
* @see https://www.bitget.com/api-doc/contract/position/get-single-position
|
|
6341
|
-
* @param {string} symbol unified market symbol of the market the position is held in
|
|
6342
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6343
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
6344
|
-
*/
|
|
6345
6347
|
await this.loadMarkets();
|
|
6346
6348
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
6347
6349
|
let market = undefined;
|
|
@@ -6394,22 +6396,22 @@ class bitget extends bitget$1 {
|
|
|
6394
6396
|
const first = this.safeDict(data, 0, {});
|
|
6395
6397
|
return this.parsePosition(first, market);
|
|
6396
6398
|
}
|
|
6399
|
+
/**
|
|
6400
|
+
* @method
|
|
6401
|
+
* @name bitget#fetchPositions
|
|
6402
|
+
* @description fetch all open positions
|
|
6403
|
+
* @see https://www.bitget.com/api-doc/contract/position/get-all-position
|
|
6404
|
+
* @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
|
|
6405
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
6406
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6407
|
+
* @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
|
|
6408
|
+
* @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
6409
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
6410
|
+
* @param {boolean} [params.useHistoryEndpoint] default false, when true will use the historic endpoint to fetch positions
|
|
6411
|
+
* @param {string} [params.method] either (default) 'privateMixGetV2MixPositionAllPosition' or 'privateMixGetV2MixPositionHistoryPosition'
|
|
6412
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
6413
|
+
*/
|
|
6397
6414
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
6398
|
-
/**
|
|
6399
|
-
* @method
|
|
6400
|
-
* @name bitget#fetchPositions
|
|
6401
|
-
* @description fetch all open positions
|
|
6402
|
-
* @see https://www.bitget.com/api-doc/contract/position/get-all-position
|
|
6403
|
-
* @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
|
|
6404
|
-
* @param {string[]} [symbols] list of unified market symbols
|
|
6405
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6406
|
-
* @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
|
|
6407
|
-
* @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
6408
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
6409
|
-
* @param {boolean} [params.useHistoryEndpoint] default false, when true will use the historic endpoint to fetch positions
|
|
6410
|
-
* @param {string} [params.method] either (default) 'privateMixGetV2MixPositionAllPosition' or 'privateMixGetV2MixPositionHistoryPosition'
|
|
6411
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
6412
|
-
*/
|
|
6413
6415
|
await this.loadMarkets();
|
|
6414
6416
|
let paginate = false;
|
|
6415
6417
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchPositions', 'paginate');
|
|
@@ -6725,19 +6727,19 @@ class bitget extends bitget$1 {
|
|
|
6725
6727
|
'takeProfitPrice': undefined,
|
|
6726
6728
|
});
|
|
6727
6729
|
}
|
|
6730
|
+
/**
|
|
6731
|
+
* @method
|
|
6732
|
+
* @name bitget#fetchFundingRateHistory
|
|
6733
|
+
* @description fetches historical funding rate prices
|
|
6734
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-History-Funding-Rate
|
|
6735
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
6736
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
6737
|
+
* @param {int} [limit] the maximum amount of funding rate structures to fetch
|
|
6738
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6739
|
+
* @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)
|
|
6740
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
6741
|
+
*/
|
|
6728
6742
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6729
|
-
/**
|
|
6730
|
-
* @method
|
|
6731
|
-
* @name bitget#fetchFundingRateHistory
|
|
6732
|
-
* @description fetches historical funding rate prices
|
|
6733
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-History-Funding-Rate
|
|
6734
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
6735
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
6736
|
-
* @param {int} [limit] the maximum amount of funding rate structures to fetch
|
|
6737
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6738
|
-
* @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)
|
|
6739
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
6740
|
-
*/
|
|
6741
6743
|
if (symbol === undefined) {
|
|
6742
6744
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
6743
6745
|
}
|
|
@@ -6800,16 +6802,16 @@ class bitget extends bitget$1 {
|
|
|
6800
6802
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
6801
6803
|
return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
|
|
6802
6804
|
}
|
|
6805
|
+
/**
|
|
6806
|
+
* @method
|
|
6807
|
+
* @name bitget#fetchFundingRate
|
|
6808
|
+
* @description fetch the current funding rate
|
|
6809
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Current-Funding-Rate
|
|
6810
|
+
* @param {string} symbol unified market symbol
|
|
6811
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6812
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
6813
|
+
*/
|
|
6803
6814
|
async fetchFundingRate(symbol, params = {}) {
|
|
6804
|
-
/**
|
|
6805
|
-
* @method
|
|
6806
|
-
* @name bitget#fetchFundingRate
|
|
6807
|
-
* @description fetch the current funding rate
|
|
6808
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Current-Funding-Rate
|
|
6809
|
-
* @param {string} symbol unified market symbol
|
|
6810
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6811
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
6812
|
-
*/
|
|
6813
6815
|
await this.loadMarkets();
|
|
6814
6816
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
6815
6817
|
let market = undefined;
|
|
@@ -6846,18 +6848,18 @@ class bitget extends bitget$1 {
|
|
|
6846
6848
|
const data = this.safeValue(response, 'data', []);
|
|
6847
6849
|
return this.parseFundingRate(data[0], market);
|
|
6848
6850
|
}
|
|
6851
|
+
/**
|
|
6852
|
+
* @method
|
|
6853
|
+
* @name bitget#fetchFundingRates
|
|
6854
|
+
* @description fetch the current funding rates for all markets
|
|
6855
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
|
6856
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
6857
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6858
|
+
* @param {string} [params.subType] *contract only* 'linear', 'inverse'
|
|
6859
|
+
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
6860
|
+
* @returns {object} a dictionary of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
6861
|
+
*/
|
|
6849
6862
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
6850
|
-
/**
|
|
6851
|
-
* @method
|
|
6852
|
-
* @name bitget#fetchFundingRates
|
|
6853
|
-
* @description fetch the current funding rates for all markets
|
|
6854
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
|
6855
|
-
* @param {string[]} [symbols] list of unified market symbols
|
|
6856
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6857
|
-
* @param {string} [params.subType] *contract only* 'linear', 'inverse'
|
|
6858
|
-
* @param {string} [params.productType] *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
6859
|
-
* @returns {object} a dictionary of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
6860
|
-
*/
|
|
6861
6863
|
await this.loadMarkets();
|
|
6862
6864
|
let market = undefined;
|
|
6863
6865
|
if (symbols !== undefined) {
|
|
@@ -6985,20 +6987,20 @@ class bitget extends bitget$1 {
|
|
|
6985
6987
|
'interval': intervalString,
|
|
6986
6988
|
};
|
|
6987
6989
|
}
|
|
6990
|
+
/**
|
|
6991
|
+
* @method
|
|
6992
|
+
* @name bitget#fetchFundingHistory
|
|
6993
|
+
* @description fetch the funding history
|
|
6994
|
+
* @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
|
|
6995
|
+
* @param {string} symbol unified market symbol
|
|
6996
|
+
* @param {int} [since] the starting timestamp in milliseconds
|
|
6997
|
+
* @param {int} [limit] the number of entries to return
|
|
6998
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6999
|
+
* @param {int} [params.until] the latest time in ms to fetch funding history for
|
|
7000
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
7001
|
+
* @returns {object[]} a list of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
7002
|
+
*/
|
|
6988
7003
|
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6989
|
-
/**
|
|
6990
|
-
* @method
|
|
6991
|
-
* @name bitget#fetchFundingHistory
|
|
6992
|
-
* @description fetch the funding history
|
|
6993
|
-
* @see https://www.bitget.com/api-doc/contract/account/Get-Account-Bill
|
|
6994
|
-
* @param {string} symbol unified market symbol
|
|
6995
|
-
* @param {int} [since] the starting timestamp in milliseconds
|
|
6996
|
-
* @param {int} [limit] the number of entries to return
|
|
6997
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6998
|
-
* @param {int} [params.until] the latest time in ms to fetch funding history for
|
|
6999
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
7000
|
-
* @returns {object[]} a list of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
7001
|
-
*/
|
|
7002
7004
|
await this.loadMarkets();
|
|
7003
7005
|
if (symbol === undefined) {
|
|
7004
7006
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
|
|
@@ -7163,17 +7165,17 @@ class bitget extends bitget$1 {
|
|
|
7163
7165
|
'datetime': undefined,
|
|
7164
7166
|
};
|
|
7165
7167
|
}
|
|
7168
|
+
/**
|
|
7169
|
+
* @method
|
|
7170
|
+
* @name bitget#reduceMargin
|
|
7171
|
+
* @description remove margin from a position
|
|
7172
|
+
* @see https://www.bitget.com/api-doc/contract/account/Change-Margin
|
|
7173
|
+
* @param {string} symbol unified market symbol
|
|
7174
|
+
* @param {float} amount the amount of margin to remove
|
|
7175
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7176
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
7177
|
+
*/
|
|
7166
7178
|
async reduceMargin(symbol, amount, params = {}) {
|
|
7167
|
-
/**
|
|
7168
|
-
* @method
|
|
7169
|
-
* @name bitget#reduceMargin
|
|
7170
|
-
* @description remove margin from a position
|
|
7171
|
-
* @see https://www.bitget.com/api-doc/contract/account/Change-Margin
|
|
7172
|
-
* @param {string} symbol unified market symbol
|
|
7173
|
-
* @param {float} amount the amount of margin to remove
|
|
7174
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7175
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
7176
|
-
*/
|
|
7177
7179
|
if (amount > 0) {
|
|
7178
7180
|
throw new errors.BadRequest(this.id + ' reduceMargin() amount parameter must be a negative value');
|
|
7179
7181
|
}
|
|
@@ -7183,33 +7185,33 @@ class bitget extends bitget$1 {
|
|
|
7183
7185
|
}
|
|
7184
7186
|
return await this.modifyMarginHelper(symbol, amount, 'reduce', params);
|
|
7185
7187
|
}
|
|
7188
|
+
/**
|
|
7189
|
+
* @method
|
|
7190
|
+
* @name bitget#addMargin
|
|
7191
|
+
* @description add margin
|
|
7192
|
+
* @see https://www.bitget.com/api-doc/contract/account/Change-Margin
|
|
7193
|
+
* @param {string} symbol unified market symbol
|
|
7194
|
+
* @param {float} amount the amount of margin to add
|
|
7195
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7196
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
7197
|
+
*/
|
|
7186
7198
|
async addMargin(symbol, amount, params = {}) {
|
|
7187
|
-
/**
|
|
7188
|
-
* @method
|
|
7189
|
-
* @name bitget#addMargin
|
|
7190
|
-
* @description add margin
|
|
7191
|
-
* @see https://www.bitget.com/api-doc/contract/account/Change-Margin
|
|
7192
|
-
* @param {string} symbol unified market symbol
|
|
7193
|
-
* @param {float} amount the amount of margin to add
|
|
7194
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7195
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
7196
|
-
*/
|
|
7197
7199
|
const holdSide = this.safeString(params, 'holdSide');
|
|
7198
7200
|
if (holdSide === undefined) {
|
|
7199
7201
|
throw new errors.ArgumentsRequired(this.id + ' addMargin() requires a holdSide parameter, either long or short');
|
|
7200
7202
|
}
|
|
7201
7203
|
return await this.modifyMarginHelper(symbol, amount, 'add', params);
|
|
7202
7204
|
}
|
|
7205
|
+
/**
|
|
7206
|
+
* @method
|
|
7207
|
+
* @name bitget#fetchLeverage
|
|
7208
|
+
* @description fetch the set leverage for a market
|
|
7209
|
+
* @see https://www.bitget.com/api-doc/contract/account/Get-Single-Account
|
|
7210
|
+
* @param {string} symbol unified market symbol
|
|
7211
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7212
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
7213
|
+
*/
|
|
7203
7214
|
async fetchLeverage(symbol, params = {}) {
|
|
7204
|
-
/**
|
|
7205
|
-
* @method
|
|
7206
|
-
* @name bitget#fetchLeverage
|
|
7207
|
-
* @description fetch the set leverage for a market
|
|
7208
|
-
* @see https://www.bitget.com/api-doc/contract/account/Get-Single-Account
|
|
7209
|
-
* @param {string} symbol unified market symbol
|
|
7210
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7211
|
-
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
7212
|
-
*/
|
|
7213
7215
|
await this.loadMarkets();
|
|
7214
7216
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
7215
7217
|
let market = undefined;
|
|
@@ -7268,18 +7270,18 @@ class bitget extends bitget$1 {
|
|
|
7268
7270
|
'shortLeverage': this.safeInteger(leverage, 'isolatedShortLever'),
|
|
7269
7271
|
};
|
|
7270
7272
|
}
|
|
7273
|
+
/**
|
|
7274
|
+
* @method
|
|
7275
|
+
* @name bitget#setLeverage
|
|
7276
|
+
* @description set the level of leverage for a market
|
|
7277
|
+
* @see https://www.bitget.com/api-doc/contract/account/Change-Leverage
|
|
7278
|
+
* @param {int} leverage the rate of leverage
|
|
7279
|
+
* @param {string} symbol unified market symbol
|
|
7280
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7281
|
+
* @param {string} [params.holdSide] *isolated only* position direction, 'long' or 'short'
|
|
7282
|
+
* @returns {object} response from the exchange
|
|
7283
|
+
*/
|
|
7271
7284
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
7272
|
-
/**
|
|
7273
|
-
* @method
|
|
7274
|
-
* @name bitget#setLeverage
|
|
7275
|
-
* @description set the level of leverage for a market
|
|
7276
|
-
* @see https://www.bitget.com/api-doc/contract/account/Change-Leverage
|
|
7277
|
-
* @param {int} leverage the rate of leverage
|
|
7278
|
-
* @param {string} symbol unified market symbol
|
|
7279
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7280
|
-
* @param {string} [params.holdSide] *isolated only* position direction, 'long' or 'short'
|
|
7281
|
-
* @returns {object} response from the exchange
|
|
7282
|
-
*/
|
|
7283
7285
|
if (symbol === undefined) {
|
|
7284
7286
|
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
7285
7287
|
}
|
|
@@ -7320,17 +7322,17 @@ class bitget extends bitget$1 {
|
|
|
7320
7322
|
//
|
|
7321
7323
|
return response;
|
|
7322
7324
|
}
|
|
7325
|
+
/**
|
|
7326
|
+
* @method
|
|
7327
|
+
* @name bitget#setMarginMode
|
|
7328
|
+
* @description set margin mode to 'cross' or 'isolated'
|
|
7329
|
+
* @see https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode
|
|
7330
|
+
* @param {string} marginMode 'cross' or 'isolated'
|
|
7331
|
+
* @param {string} symbol unified market symbol
|
|
7332
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7333
|
+
* @returns {object} response from the exchange
|
|
7334
|
+
*/
|
|
7323
7335
|
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
7324
|
-
/**
|
|
7325
|
-
* @method
|
|
7326
|
-
* @name bitget#setMarginMode
|
|
7327
|
-
* @description set margin mode to 'cross' or 'isolated'
|
|
7328
|
-
* @see https://www.bitget.com/api-doc/contract/account/Change-Margin-Mode
|
|
7329
|
-
* @param {string} marginMode 'cross' or 'isolated'
|
|
7330
|
-
* @param {string} symbol unified market symbol
|
|
7331
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7332
|
-
* @returns {object} response from the exchange
|
|
7333
|
-
*/
|
|
7334
7336
|
if (symbol === undefined) {
|
|
7335
7337
|
throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
7336
7338
|
}
|
|
@@ -7376,18 +7378,18 @@ class bitget extends bitget$1 {
|
|
|
7376
7378
|
//
|
|
7377
7379
|
return response;
|
|
7378
7380
|
}
|
|
7381
|
+
/**
|
|
7382
|
+
* @method
|
|
7383
|
+
* @name bitget#setPositionMode
|
|
7384
|
+
* @description set hedged to true or false for a market
|
|
7385
|
+
* @see https://www.bitget.com/api-doc/contract/account/Change-Hold-Mode
|
|
7386
|
+
* @param {bool} hedged set to true to use dualSidePosition
|
|
7387
|
+
* @param {string} symbol not used by bitget setPositionMode ()
|
|
7388
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7389
|
+
* @param {string} [params.productType] required if symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
7390
|
+
* @returns {object} response from the exchange
|
|
7391
|
+
*/
|
|
7379
7392
|
async setPositionMode(hedged, symbol = undefined, params = {}) {
|
|
7380
|
-
/**
|
|
7381
|
-
* @method
|
|
7382
|
-
* @name bitget#setPositionMode
|
|
7383
|
-
* @description set hedged to true or false for a market
|
|
7384
|
-
* @see https://www.bitget.com/api-doc/contract/account/Change-Hold-Mode
|
|
7385
|
-
* @param {bool} hedged set to true to use dualSidePosition
|
|
7386
|
-
* @param {string} symbol not used by bitget setPositionMode ()
|
|
7387
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7388
|
-
* @param {string} [params.productType] required if symbol is undefined: 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
7389
|
-
* @returns {object} response from the exchange
|
|
7390
|
-
*/
|
|
7391
7393
|
await this.loadMarkets();
|
|
7392
7394
|
const posMode = hedged ? 'hedge_mode' : 'one_way_mode';
|
|
7393
7395
|
let market = undefined;
|
|
@@ -7420,16 +7422,16 @@ class bitget extends bitget$1 {
|
|
|
7420
7422
|
//
|
|
7421
7423
|
return response;
|
|
7422
7424
|
}
|
|
7425
|
+
/**
|
|
7426
|
+
* @method
|
|
7427
|
+
* @name bitget#fetchOpenInterest
|
|
7428
|
+
* @description retrieves the open interest of a contract trading pair
|
|
7429
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Open-Interest
|
|
7430
|
+
* @param {string} symbol unified CCXT market symbol
|
|
7431
|
+
* @param {object} [params] exchange specific parameters
|
|
7432
|
+
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
7433
|
+
*/
|
|
7423
7434
|
async fetchOpenInterest(symbol, params = {}) {
|
|
7424
|
-
/**
|
|
7425
|
-
* @method
|
|
7426
|
-
* @name bitget#fetchOpenInterest
|
|
7427
|
-
* @description retrieves the open interest of a contract trading pair
|
|
7428
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Open-Interest
|
|
7429
|
-
* @param {string} symbol unified CCXT market symbol
|
|
7430
|
-
* @param {object} [params] exchange specific parameters
|
|
7431
|
-
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
7432
|
-
*/
|
|
7433
7435
|
await this.loadMarkets();
|
|
7434
7436
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
7435
7437
|
let market = undefined;
|
|
@@ -7493,19 +7495,19 @@ class bitget extends bitget$1 {
|
|
|
7493
7495
|
'info': interest,
|
|
7494
7496
|
}, market);
|
|
7495
7497
|
}
|
|
7498
|
+
/**
|
|
7499
|
+
* @method
|
|
7500
|
+
* @name bitget#fetchTransfers
|
|
7501
|
+
* @description fetch a history of internal transfers made on an account
|
|
7502
|
+
* @see https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords
|
|
7503
|
+
* @param {string} code unified currency code of the currency transferred
|
|
7504
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
7505
|
+
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
7506
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7507
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
7508
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
7509
|
+
*/
|
|
7496
7510
|
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
7497
|
-
/**
|
|
7498
|
-
* @method
|
|
7499
|
-
* @name bitget#fetchTransfers
|
|
7500
|
-
* @description fetch a history of internal transfers made on an account
|
|
7501
|
-
* @see https://www.bitget.com/api-doc/spot/account/Get-Account-TransferRecords
|
|
7502
|
-
* @param {string} code unified currency code of the currency transferred
|
|
7503
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
7504
|
-
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
7505
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7506
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
7507
|
-
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
7508
|
-
*/
|
|
7509
7511
|
if (code === undefined) {
|
|
7510
7512
|
throw new errors.ArgumentsRequired(this.id + ' fetchTransfers() requires a code argument');
|
|
7511
7513
|
}
|
|
@@ -7553,21 +7555,21 @@ class bitget extends bitget$1 {
|
|
|
7553
7555
|
const data = this.safeList(response, 'data', []);
|
|
7554
7556
|
return this.parseTransfers(data, currency, since, limit);
|
|
7555
7557
|
}
|
|
7558
|
+
/**
|
|
7559
|
+
* @method
|
|
7560
|
+
* @name bitget#transfer
|
|
7561
|
+
* @description transfer currency internally between wallets on the same account
|
|
7562
|
+
* @see https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
|
|
7563
|
+
* @param {string} code unified currency code
|
|
7564
|
+
* @param {float} amount amount to transfer
|
|
7565
|
+
* @param {string} fromAccount account to transfer from
|
|
7566
|
+
* @param {string} toAccount account to transfer to
|
|
7567
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7568
|
+
* @param {string} [params.symbol] unified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account
|
|
7569
|
+
* @param {string} [params.clientOid] custom id
|
|
7570
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
7571
|
+
*/
|
|
7556
7572
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
7557
|
-
/**
|
|
7558
|
-
* @method
|
|
7559
|
-
* @name bitget#transfer
|
|
7560
|
-
* @description transfer currency internally between wallets on the same account
|
|
7561
|
-
* @see https://www.bitget.com/api-doc/spot/account/Wallet-Transfer
|
|
7562
|
-
* @param {string} code unified currency code
|
|
7563
|
-
* @param {float} amount amount to transfer
|
|
7564
|
-
* @param {string} fromAccount account to transfer from
|
|
7565
|
-
* @param {string} toAccount account to transfer to
|
|
7566
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7567
|
-
* @param {string} [params.symbol] unified CCXT market symbol, required when transferring to or from an account type that is a leveraged position-by-position account
|
|
7568
|
-
* @param {string} [params.clientOid] custom id
|
|
7569
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
7570
|
-
*/
|
|
7571
7573
|
await this.loadMarkets();
|
|
7572
7574
|
const currency = this.currency(code);
|
|
7573
7575
|
const accountsByType = this.safeValue(this.options, 'accountsByType', {});
|
|
@@ -7706,16 +7708,16 @@ class bitget extends bitget$1 {
|
|
|
7706
7708
|
}
|
|
7707
7709
|
return result;
|
|
7708
7710
|
}
|
|
7711
|
+
/**
|
|
7712
|
+
* @method
|
|
7713
|
+
* @name bitget#fetchDepositWithdrawFees
|
|
7714
|
+
* @description fetch deposit and withdraw fees
|
|
7715
|
+
* @see https://www.bitget.com/api-doc/spot/market/Get-Coin-List
|
|
7716
|
+
* @param {string[]|undefined} codes list of unified currency codes
|
|
7717
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7718
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
7719
|
+
*/
|
|
7709
7720
|
async fetchDepositWithdrawFees(codes = undefined, params = {}) {
|
|
7710
|
-
/**
|
|
7711
|
-
* @method
|
|
7712
|
-
* @name bitget#fetchDepositWithdrawFees
|
|
7713
|
-
* @description fetch deposit and withdraw fees
|
|
7714
|
-
* @see https://www.bitget.com/api-doc/spot/market/Get-Coin-List
|
|
7715
|
-
* @param {string[]|undefined} codes list of unified currency codes
|
|
7716
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7717
|
-
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
7718
|
-
*/
|
|
7719
7721
|
await this.loadMarkets();
|
|
7720
7722
|
const response = await this.publicSpotGetV2SpotPublicCoins(params);
|
|
7721
7723
|
//
|
|
@@ -7750,17 +7752,17 @@ class bitget extends bitget$1 {
|
|
|
7750
7752
|
const data = this.safeList(response, 'data', []);
|
|
7751
7753
|
return this.parseDepositWithdrawFees(data, codes, 'coin');
|
|
7752
7754
|
}
|
|
7755
|
+
/**
|
|
7756
|
+
* @method
|
|
7757
|
+
* @name bitget#borrowCrossMargin
|
|
7758
|
+
* @description create a loan to borrow margin
|
|
7759
|
+
* @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
|
|
7760
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
7761
|
+
* @param {string} amount the amount to borrow
|
|
7762
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7763
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
7764
|
+
*/
|
|
7753
7765
|
async borrowCrossMargin(code, amount, params = {}) {
|
|
7754
|
-
/**
|
|
7755
|
-
* @method
|
|
7756
|
-
* @name bitget#borrowCrossMargin
|
|
7757
|
-
* @description create a loan to borrow margin
|
|
7758
|
-
* @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Borrow
|
|
7759
|
-
* @param {string} code unified currency code of the currency to borrow
|
|
7760
|
-
* @param {string} amount the amount to borrow
|
|
7761
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7762
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
7763
|
-
*/
|
|
7764
7766
|
await this.loadMarkets();
|
|
7765
7767
|
const currency = this.currency(code);
|
|
7766
7768
|
const request = {
|
|
@@ -7783,18 +7785,18 @@ class bitget extends bitget$1 {
|
|
|
7783
7785
|
const data = this.safeValue(response, 'data', {});
|
|
7784
7786
|
return this.parseMarginLoan(data, currency);
|
|
7785
7787
|
}
|
|
7788
|
+
/**
|
|
7789
|
+
* @method
|
|
7790
|
+
* @name bitget#borrowIsolatedMargin
|
|
7791
|
+
* @description create a loan to borrow margin
|
|
7792
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
|
|
7793
|
+
* @param {string} symbol unified market symbol
|
|
7794
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
7795
|
+
* @param {string} amount the amount to borrow
|
|
7796
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7797
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
7798
|
+
*/
|
|
7786
7799
|
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
7787
|
-
/**
|
|
7788
|
-
* @method
|
|
7789
|
-
* @name bitget#borrowIsolatedMargin
|
|
7790
|
-
* @description create a loan to borrow margin
|
|
7791
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Borrow
|
|
7792
|
-
* @param {string} symbol unified market symbol
|
|
7793
|
-
* @param {string} code unified currency code of the currency to borrow
|
|
7794
|
-
* @param {string} amount the amount to borrow
|
|
7795
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7796
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
7797
|
-
*/
|
|
7798
7800
|
await this.loadMarkets();
|
|
7799
7801
|
const currency = this.currency(code);
|
|
7800
7802
|
const market = this.market(symbol);
|
|
@@ -7820,18 +7822,18 @@ class bitget extends bitget$1 {
|
|
|
7820
7822
|
const data = this.safeValue(response, 'data', {});
|
|
7821
7823
|
return this.parseMarginLoan(data, currency, market);
|
|
7822
7824
|
}
|
|
7825
|
+
/**
|
|
7826
|
+
* @method
|
|
7827
|
+
* @name bitget#repayIsolatedMargin
|
|
7828
|
+
* @description repay borrowed margin and interest
|
|
7829
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay
|
|
7830
|
+
* @param {string} symbol unified market symbol
|
|
7831
|
+
* @param {string} code unified currency code of the currency to repay
|
|
7832
|
+
* @param {string} amount the amount to repay
|
|
7833
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7834
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
7835
|
+
*/
|
|
7823
7836
|
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
7824
|
-
/**
|
|
7825
|
-
* @method
|
|
7826
|
-
* @name bitget#repayIsolatedMargin
|
|
7827
|
-
* @description repay borrowed margin and interest
|
|
7828
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Repay
|
|
7829
|
-
* @param {string} symbol unified market symbol
|
|
7830
|
-
* @param {string} code unified currency code of the currency to repay
|
|
7831
|
-
* @param {string} amount the amount to repay
|
|
7832
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7833
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
7834
|
-
*/
|
|
7835
7837
|
await this.loadMarkets();
|
|
7836
7838
|
const currency = this.currency(code);
|
|
7837
7839
|
const market = this.market(symbol);
|
|
@@ -7858,17 +7860,17 @@ class bitget extends bitget$1 {
|
|
|
7858
7860
|
const data = this.safeValue(response, 'data', {});
|
|
7859
7861
|
return this.parseMarginLoan(data, currency, market);
|
|
7860
7862
|
}
|
|
7863
|
+
/**
|
|
7864
|
+
* @method
|
|
7865
|
+
* @name bitget#repayCrossMargin
|
|
7866
|
+
* @description repay borrowed margin and interest
|
|
7867
|
+
* @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay
|
|
7868
|
+
* @param {string} code unified currency code of the currency to repay
|
|
7869
|
+
* @param {string} amount the amount to repay
|
|
7870
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7871
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
7872
|
+
*/
|
|
7861
7873
|
async repayCrossMargin(code, amount, params = {}) {
|
|
7862
|
-
/**
|
|
7863
|
-
* @method
|
|
7864
|
-
* @name bitget#repayCrossMargin
|
|
7865
|
-
* @description repay borrowed margin and interest
|
|
7866
|
-
* @see https://www.bitget.com/api-doc/margin/cross/account/Cross-Repay
|
|
7867
|
-
* @param {string} code unified currency code of the currency to repay
|
|
7868
|
-
* @param {string} amount the amount to repay
|
|
7869
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7870
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
7871
|
-
*/
|
|
7872
7874
|
await this.loadMarkets();
|
|
7873
7875
|
const currency = this.currency(code);
|
|
7874
7876
|
const request = {
|
|
@@ -7946,22 +7948,22 @@ class bitget extends bitget$1 {
|
|
|
7946
7948
|
'info': info,
|
|
7947
7949
|
};
|
|
7948
7950
|
}
|
|
7951
|
+
/**
|
|
7952
|
+
* @method
|
|
7953
|
+
* @name bitget#fetchMyLiquidations
|
|
7954
|
+
* @description retrieves the users liquidated positions
|
|
7955
|
+
* @see https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Liquidation-Records
|
|
7956
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Liquidation-Records
|
|
7957
|
+
* @param {string} [symbol] unified CCXT market symbol
|
|
7958
|
+
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
7959
|
+
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
7960
|
+
* @param {object} [params] exchange specific parameters for the bitget api endpoint
|
|
7961
|
+
* @param {int} [params.until] timestamp in ms of the latest liquidation
|
|
7962
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' default value is 'cross'
|
|
7963
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
7964
|
+
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
7965
|
+
*/
|
|
7949
7966
|
async fetchMyLiquidations(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
7950
|
-
/**
|
|
7951
|
-
* @method
|
|
7952
|
-
* @name bitget#fetchMyLiquidations
|
|
7953
|
-
* @description retrieves the users liquidated positions
|
|
7954
|
-
* @see https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Liquidation-Records
|
|
7955
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Liquidation-Records
|
|
7956
|
-
* @param {string} [symbol] unified CCXT market symbol
|
|
7957
|
-
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
7958
|
-
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
7959
|
-
* @param {object} [params] exchange specific parameters for the bitget api endpoint
|
|
7960
|
-
* @param {int} [params.until] timestamp in ms of the latest liquidation
|
|
7961
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' default value is 'cross'
|
|
7962
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
7963
|
-
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
7964
|
-
*/
|
|
7965
7967
|
await this.loadMarkets();
|
|
7966
7968
|
let paginate = false;
|
|
7967
7969
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchMyLiquidations', 'paginate');
|
|
@@ -8105,16 +8107,16 @@ class bitget extends bitget$1 {
|
|
|
8105
8107
|
'datetime': this.iso8601(timestamp),
|
|
8106
8108
|
});
|
|
8107
8109
|
}
|
|
8110
|
+
/**
|
|
8111
|
+
* @method
|
|
8112
|
+
* @name bitget#fetchIsolatedBorrowRate
|
|
8113
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
8114
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount
|
|
8115
|
+
* @param {string} symbol unified market symbol
|
|
8116
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8117
|
+
* @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
|
|
8118
|
+
*/
|
|
8108
8119
|
async fetchIsolatedBorrowRate(symbol, params = {}) {
|
|
8109
|
-
/**
|
|
8110
|
-
* @method
|
|
8111
|
-
* @name bitget#fetchIsolatedBorrowRate
|
|
8112
|
-
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
8113
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/account/Isolated-Margin-Interest-Rate-And-Max-Borrowable-Amount
|
|
8114
|
-
* @param {string} symbol unified market symbol
|
|
8115
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8116
|
-
* @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
|
|
8117
|
-
*/
|
|
8118
8120
|
await this.loadMarkets();
|
|
8119
8121
|
const market = this.market(symbol);
|
|
8120
8122
|
const request = {
|
|
@@ -8220,17 +8222,17 @@ class bitget extends bitget$1 {
|
|
|
8220
8222
|
'info': info,
|
|
8221
8223
|
};
|
|
8222
8224
|
}
|
|
8225
|
+
/**
|
|
8226
|
+
* @method
|
|
8227
|
+
* @name bitget#fetchCrossBorrowRate
|
|
8228
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
8229
|
+
* @see https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Margin-Interest-Rate-And-Borrowable
|
|
8230
|
+
* @param {string} code unified currency code
|
|
8231
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8232
|
+
* @param {string} [params.symbol] required for isolated margin
|
|
8233
|
+
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
8234
|
+
*/
|
|
8223
8235
|
async fetchCrossBorrowRate(code, params = {}) {
|
|
8224
|
-
/**
|
|
8225
|
-
* @method
|
|
8226
|
-
* @name bitget#fetchCrossBorrowRate
|
|
8227
|
-
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
8228
|
-
* @see https://www.bitget.com/api-doc/margin/cross/account/Get-Cross-Margin-Interest-Rate-And-Borrowable
|
|
8229
|
-
* @param {string} code unified currency code
|
|
8230
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8231
|
-
* @param {string} [params.symbol] required for isolated margin
|
|
8232
|
-
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
8233
|
-
*/
|
|
8234
8236
|
await this.loadMarkets();
|
|
8235
8237
|
const currency = this.currency(code);
|
|
8236
8238
|
const request = {
|
|
@@ -8300,21 +8302,21 @@ class bitget extends bitget$1 {
|
|
|
8300
8302
|
'info': info,
|
|
8301
8303
|
};
|
|
8302
8304
|
}
|
|
8305
|
+
/**
|
|
8306
|
+
* @method
|
|
8307
|
+
* @name bitget#fetchBorrowInterest
|
|
8308
|
+
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
8309
|
+
* @see https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Interest-Records
|
|
8310
|
+
* @see https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Interest-Records
|
|
8311
|
+
* @param {string} [code] unified currency code
|
|
8312
|
+
* @param {string} [symbol] unified market symbol when fetching interest in isolated markets
|
|
8313
|
+
* @param {int} [since] the earliest time in ms to fetch borrow interest for
|
|
8314
|
+
* @param {int} [limit] the maximum number of structures to retrieve
|
|
8315
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8316
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
8317
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
8318
|
+
*/
|
|
8303
8319
|
async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
8304
|
-
/**
|
|
8305
|
-
* @method
|
|
8306
|
-
* @name bitget#fetchBorrowInterest
|
|
8307
|
-
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
8308
|
-
* @see https://www.bitget.com/api-doc/margin/cross/record/Get-Cross-Interest-Records
|
|
8309
|
-
* @see https://www.bitget.com/api-doc/margin/isolated/record/Get-Isolated-Interest-Records
|
|
8310
|
-
* @param {string} [code] unified currency code
|
|
8311
|
-
* @param {string} [symbol] unified market symbol when fetching interest in isolated markets
|
|
8312
|
-
* @param {int} [since] the earliest time in ms to fetch borrow interest for
|
|
8313
|
-
* @param {int} [limit] the maximum number of structures to retrieve
|
|
8314
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8315
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
8316
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
8317
|
-
*/
|
|
8318
8320
|
await this.loadMarkets();
|
|
8319
8321
|
let paginate = false;
|
|
8320
8322
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchBorrowInterest', 'paginate');
|
|
@@ -8453,17 +8455,17 @@ class bitget extends bitget$1 {
|
|
|
8453
8455
|
'datetime': this.iso8601(timestamp),
|
|
8454
8456
|
};
|
|
8455
8457
|
}
|
|
8458
|
+
/**
|
|
8459
|
+
* @method
|
|
8460
|
+
* @name bitget#closePosition
|
|
8461
|
+
* @description closes an open position for a market
|
|
8462
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
|
|
8463
|
+
* @param {string} symbol unified CCXT market symbol
|
|
8464
|
+
* @param {string} [side] one-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
|
|
8465
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8466
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
8467
|
+
*/
|
|
8456
8468
|
async closePosition(symbol, side = undefined, params = {}) {
|
|
8457
|
-
/**
|
|
8458
|
-
* @method
|
|
8459
|
-
* @name bitget#closePosition
|
|
8460
|
-
* @description closes an open position for a market
|
|
8461
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
|
|
8462
|
-
* @param {string} symbol unified CCXT market symbol
|
|
8463
|
-
* @param {string} [side] one-way mode: 'buy' or 'sell', hedge-mode: 'long' or 'short'
|
|
8464
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8465
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
8466
|
-
*/
|
|
8467
8469
|
await this.loadMarkets();
|
|
8468
8470
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
8469
8471
|
let market = undefined;
|
|
@@ -8505,16 +8507,16 @@ class bitget extends bitget$1 {
|
|
|
8505
8507
|
const order = this.safeList(data, 'successList', []);
|
|
8506
8508
|
return this.parseOrder(order[0], market);
|
|
8507
8509
|
}
|
|
8510
|
+
/**
|
|
8511
|
+
* @method
|
|
8512
|
+
* @name bitget#closeAllPositions
|
|
8513
|
+
* @description closes all open positions for a market type
|
|
8514
|
+
* @see https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
|
|
8515
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8516
|
+
* @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
8517
|
+
* @returns {object[]} A list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
8518
|
+
*/
|
|
8508
8519
|
async closeAllPositions(params = {}) {
|
|
8509
|
-
/**
|
|
8510
|
-
* @method
|
|
8511
|
-
* @name bitget#closeAllPositions
|
|
8512
|
-
* @description closes all open positions for a market type
|
|
8513
|
-
* @see https://www.bitget.com/api-doc/contract/trade/Flash-Close-Position
|
|
8514
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8515
|
-
* @param {string} [params.productType] 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
|
8516
|
-
* @returns {object[]} A list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
8517
|
-
*/
|
|
8518
8520
|
await this.loadMarkets();
|
|
8519
8521
|
let productType = undefined;
|
|
8520
8522
|
[productType, params] = this.handleProductTypeAndParams(undefined, params);
|
|
@@ -8543,16 +8545,16 @@ class bitget extends bitget$1 {
|
|
|
8543
8545
|
const orderInfo = this.safeList(data, 'successList', []);
|
|
8544
8546
|
return this.parsePositions(orderInfo, undefined, params);
|
|
8545
8547
|
}
|
|
8548
|
+
/**
|
|
8549
|
+
* @method
|
|
8550
|
+
* @name bitget#fetchMarginMode
|
|
8551
|
+
* @description fetches the margin mode of a trading pair
|
|
8552
|
+
* @see https://www.bitget.com/api-doc/contract/account/Get-Single-Account
|
|
8553
|
+
* @param {string} symbol unified symbol of the market to fetch the margin mode for
|
|
8554
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8555
|
+
* @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
8556
|
+
*/
|
|
8546
8557
|
async fetchMarginMode(symbol, params = {}) {
|
|
8547
|
-
/**
|
|
8548
|
-
* @method
|
|
8549
|
-
* @name bitget#fetchMarginMode
|
|
8550
|
-
* @description fetches the margin mode of a trading pair
|
|
8551
|
-
* @see https://www.bitget.com/api-doc/contract/account/Get-Single-Account
|
|
8552
|
-
* @param {string} symbol unified symbol of the market to fetch the margin mode for
|
|
8553
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8554
|
-
* @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
8555
|
-
*/
|
|
8556
8558
|
await this.loadMarkets();
|
|
8557
8559
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
8558
8560
|
let market = undefined;
|
|
@@ -8611,22 +8613,22 @@ class bitget extends bitget$1 {
|
|
|
8611
8613
|
'marginMode': marginType,
|
|
8612
8614
|
};
|
|
8613
8615
|
}
|
|
8616
|
+
/**
|
|
8617
|
+
* @method
|
|
8618
|
+
* @name bitget#fetchPositionsHistory
|
|
8619
|
+
* @description fetches historical positions
|
|
8620
|
+
* @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
|
|
8621
|
+
* @param {string[]} [symbols] unified contract symbols
|
|
8622
|
+
* @param {int} [since] timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
|
|
8623
|
+
* @param {int} [limit] the maximum amount of records to fetch, default=20, max=100
|
|
8624
|
+
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
8625
|
+
* @param {int} [params.until] timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
|
|
8626
|
+
*
|
|
8627
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
8628
|
+
* @param {string} [params.productType] USDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
|
|
8629
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
8630
|
+
*/
|
|
8614
8631
|
async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
|
|
8615
|
-
/**
|
|
8616
|
-
* @method
|
|
8617
|
-
* @name bitget#fetchPositionsHistory
|
|
8618
|
-
* @description fetches historical positions
|
|
8619
|
-
* @see https://www.bitget.com/api-doc/contract/position/Get-History-Position
|
|
8620
|
-
* @param {string[]} [symbols] unified contract symbols
|
|
8621
|
-
* @param {int} [since] timestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
|
|
8622
|
-
* @param {int} [limit] the maximum amount of records to fetch, default=20, max=100
|
|
8623
|
-
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
8624
|
-
* @param {int} [params.until] timestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
|
|
8625
|
-
*
|
|
8626
|
-
* EXCHANGE SPECIFIC PARAMETERS
|
|
8627
|
-
* @param {string} [params.productType] USDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
|
|
8628
|
-
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
8629
|
-
*/
|
|
8630
8632
|
await this.loadMarkets();
|
|
8631
8633
|
const until = this.safeInteger(params, 'until');
|
|
8632
8634
|
params = this.omit(params, 'until');
|
|
@@ -8682,18 +8684,18 @@ class bitget extends bitget$1 {
|
|
|
8682
8684
|
const positions = this.parsePositions(responseList, symbols, params);
|
|
8683
8685
|
return this.filterBySinceLimit(positions, since, limit);
|
|
8684
8686
|
}
|
|
8687
|
+
/**
|
|
8688
|
+
* @method
|
|
8689
|
+
* @name bitget#fetchConvertQuote
|
|
8690
|
+
* @description fetch a quote for converting from one currency to another
|
|
8691
|
+
* @see https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price
|
|
8692
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
8693
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
8694
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
8695
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8696
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
8697
|
+
*/
|
|
8685
8698
|
async fetchConvertQuote(fromCode, toCode, amount = undefined, params = {}) {
|
|
8686
|
-
/**
|
|
8687
|
-
* @method
|
|
8688
|
-
* @name bitget#fetchConvertQuote
|
|
8689
|
-
* @description fetch a quote for converting from one currency to another
|
|
8690
|
-
* @see https://www.bitget.com/api-doc/common/convert/Get-Quoted-Price
|
|
8691
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
8692
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
8693
|
-
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
8694
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8695
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
8696
|
-
*/
|
|
8697
8699
|
await this.loadMarkets();
|
|
8698
8700
|
const request = {
|
|
8699
8701
|
'fromCoin': fromCode,
|
|
@@ -8724,21 +8726,21 @@ class bitget extends bitget$1 {
|
|
|
8724
8726
|
const toCurrency = this.currency(toCurrencyId);
|
|
8725
8727
|
return this.parseConversion(data, fromCurrency, toCurrency);
|
|
8726
8728
|
}
|
|
8729
|
+
/**
|
|
8730
|
+
* @method
|
|
8731
|
+
* @name bitget#createConvertTrade
|
|
8732
|
+
* @description convert from one currency to another
|
|
8733
|
+
* @see https://www.bitget.com/api-doc/common/convert/Trade
|
|
8734
|
+
* @param {string} id the id of the trade that you want to make
|
|
8735
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
8736
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
8737
|
+
* @param {float} amount how much you want to trade in units of the from currency
|
|
8738
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8739
|
+
* @param {string} params.price the price of the conversion, obtained from fetchConvertQuote()
|
|
8740
|
+
* @param {string} params.toAmount the amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote()
|
|
8741
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
8742
|
+
*/
|
|
8727
8743
|
async createConvertTrade(id, fromCode, toCode, amount = undefined, params = {}) {
|
|
8728
|
-
/**
|
|
8729
|
-
* @method
|
|
8730
|
-
* @name bitget#createConvertTrade
|
|
8731
|
-
* @description convert from one currency to another
|
|
8732
|
-
* @see https://www.bitget.com/api-doc/common/convert/Trade
|
|
8733
|
-
* @param {string} id the id of the trade that you want to make
|
|
8734
|
-
* @param {string} fromCode the currency that you want to sell and convert from
|
|
8735
|
-
* @param {string} toCode the currency that you want to buy and convert into
|
|
8736
|
-
* @param {float} amount how much you want to trade in units of the from currency
|
|
8737
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8738
|
-
* @param {string} params.price the price of the conversion, obtained from fetchConvertQuote()
|
|
8739
|
-
* @param {string} params.toAmount the amount you want to trade in units of the toCurrency, obtained from fetchConvertQuote()
|
|
8740
|
-
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
8741
|
-
*/
|
|
8742
8744
|
await this.loadMarkets();
|
|
8743
8745
|
const price = this.safeString2(params, 'price', 'cnvtPrice');
|
|
8744
8746
|
if (price === undefined) {
|
|
@@ -8776,18 +8778,18 @@ class bitget extends bitget$1 {
|
|
|
8776
8778
|
const toCurrency = this.currency(toCurrencyId);
|
|
8777
8779
|
return this.parseConversion(data, undefined, toCurrency);
|
|
8778
8780
|
}
|
|
8781
|
+
/**
|
|
8782
|
+
* @method
|
|
8783
|
+
* @name bitget#fetchConvertTradeHistory
|
|
8784
|
+
* @description fetch the users history of conversion trades
|
|
8785
|
+
* @see https://www.bitget.com/api-doc/common/convert/Get-Convert-Record
|
|
8786
|
+
* @param {string} [code] the unified currency code
|
|
8787
|
+
* @param {int} [since] the earliest time in ms to fetch conversions for
|
|
8788
|
+
* @param {int} [limit] the maximum number of conversion structures to retrieve
|
|
8789
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8790
|
+
* @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
8791
|
+
*/
|
|
8779
8792
|
async fetchConvertTradeHistory(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
8780
|
-
/**
|
|
8781
|
-
* @method
|
|
8782
|
-
* @name bitget#fetchConvertTradeHistory
|
|
8783
|
-
* @description fetch the users history of conversion trades
|
|
8784
|
-
* @see https://www.bitget.com/api-doc/common/convert/Get-Convert-Record
|
|
8785
|
-
* @param {string} [code] the unified currency code
|
|
8786
|
-
* @param {int} [since] the earliest time in ms to fetch conversions for
|
|
8787
|
-
* @param {int} [limit] the maximum number of conversion structures to retrieve
|
|
8788
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8789
|
-
* @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
8790
|
-
*/
|
|
8791
8793
|
await this.loadMarkets();
|
|
8792
8794
|
const request = {};
|
|
8793
8795
|
const msInDay = 86400000;
|
|
@@ -8890,15 +8892,15 @@ class bitget extends bitget$1 {
|
|
|
8890
8892
|
'fee': this.safeNumber(conversion, 'fee'),
|
|
8891
8893
|
};
|
|
8892
8894
|
}
|
|
8895
|
+
/**
|
|
8896
|
+
* @method
|
|
8897
|
+
* @name bitget#fetchConvertCurrencies
|
|
8898
|
+
* @description fetches all available currencies that can be converted
|
|
8899
|
+
* @see https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies
|
|
8900
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8901
|
+
* @returns {object} an associative dictionary of currencies
|
|
8902
|
+
*/
|
|
8893
8903
|
async fetchConvertCurrencies(params = {}) {
|
|
8894
|
-
/**
|
|
8895
|
-
* @method
|
|
8896
|
-
* @name bitget#fetchConvertCurrencies
|
|
8897
|
-
* @description fetches all available currencies that can be converted
|
|
8898
|
-
* @see https://www.bitget.com/api-doc/common/convert/Get-Convert-Currencies
|
|
8899
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8900
|
-
* @returns {object} an associative dictionary of currencies
|
|
8901
|
-
*/
|
|
8902
8904
|
await this.loadMarkets();
|
|
8903
8905
|
const response = await this.privateConvertGetV2ConvertCurrencies(params);
|
|
8904
8906
|
//
|
|
@@ -8953,16 +8955,16 @@ class bitget extends bitget$1 {
|
|
|
8953
8955
|
}
|
|
8954
8956
|
return result;
|
|
8955
8957
|
}
|
|
8958
|
+
/**
|
|
8959
|
+
* @method
|
|
8960
|
+
* @name bitget#fetchFundingInterval
|
|
8961
|
+
* @description fetch the current funding rate interval
|
|
8962
|
+
* @see https://www.bitget.com/api-doc/contract/market/Get-Symbol-Next-Funding-Time
|
|
8963
|
+
* @param {string} symbol unified market symbol
|
|
8964
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8965
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
8966
|
+
*/
|
|
8956
8967
|
async fetchFundingInterval(symbol, params = {}) {
|
|
8957
|
-
/**
|
|
8958
|
-
* @method
|
|
8959
|
-
* @name bitget#fetchFundingInterval
|
|
8960
|
-
* @description fetch the current funding rate interval
|
|
8961
|
-
* @see https://www.bitget.com/api-doc/contract/market/Get-Symbol-Next-Funding-Time
|
|
8962
|
-
* @param {string} symbol unified market symbol
|
|
8963
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8964
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
8965
|
-
*/
|
|
8966
8968
|
await this.loadMarkets();
|
|
8967
8969
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
8968
8970
|
let market = undefined;
|
|
@@ -8998,20 +9000,20 @@ class bitget extends bitget$1 {
|
|
|
8998
9000
|
const first = this.safeDict(data, 0, {});
|
|
8999
9001
|
return this.parseFundingRate(first, market);
|
|
9000
9002
|
}
|
|
9003
|
+
/**
|
|
9004
|
+
* @method
|
|
9005
|
+
* @name bitget#fetchLongShortRatioHistory
|
|
9006
|
+
* @description fetches the long short ratio history for a unified market symbol
|
|
9007
|
+
* @see https://www.bitget.com/api-doc/common/apidata/Margin-Ls-Ratio
|
|
9008
|
+
* @see https://www.bitget.com/api-doc/common/apidata/Account-Long-Short
|
|
9009
|
+
* @param {string} symbol unified symbol of the market to fetch the long short ratio for
|
|
9010
|
+
* @param {string} [timeframe] the period for the ratio
|
|
9011
|
+
* @param {int} [since] the earliest time in ms to fetch ratios for
|
|
9012
|
+
* @param {int} [limit] the maximum number of long short ratio structures to retrieve
|
|
9013
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
9014
|
+
* @returns {object[]} an array of [long short ratio structures]{@link https://docs.ccxt.com/#/?id=long-short-ratio-structure}
|
|
9015
|
+
*/
|
|
9001
9016
|
async fetchLongShortRatioHistory(symbol = undefined, timeframe = undefined, since = undefined, limit = undefined, params = {}) {
|
|
9002
|
-
/**
|
|
9003
|
-
* @method
|
|
9004
|
-
* @name bitget#fetchLongShortRatioHistory
|
|
9005
|
-
* @description fetches the long short ratio history for a unified market symbol
|
|
9006
|
-
* @see https://www.bitget.com/api-doc/common/apidata/Margin-Ls-Ratio
|
|
9007
|
-
* @see https://www.bitget.com/api-doc/common/apidata/Account-Long-Short
|
|
9008
|
-
* @param {string} symbol unified symbol of the market to fetch the long short ratio for
|
|
9009
|
-
* @param {string} [timeframe] the period for the ratio
|
|
9010
|
-
* @param {int} [since] the earliest time in ms to fetch ratios for
|
|
9011
|
-
* @param {int} [limit] the maximum number of long short ratio structures to retrieve
|
|
9012
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
9013
|
-
* @returns {object[]} an array of [long short ratio structures]{@link https://docs.ccxt.com/#/?id=long-short-ratio-structure}
|
|
9014
|
-
*/
|
|
9015
9017
|
await this.loadMarkets();
|
|
9016
9018
|
const market = this.market(symbol);
|
|
9017
9019
|
const request = {
|