ccxt 4.4.30 → 4.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +123 -123
- package/dist/cjs/src/alpaca.js +237 -237
- package/dist/cjs/src/ascendex.js +342 -341
- package/dist/cjs/src/bigone.js +242 -242
- package/dist/cjs/src/binance.js +1339 -1291
- package/dist/cjs/src/bingx.js +639 -639
- package/dist/cjs/src/bit2c.js +111 -111
- package/dist/cjs/src/bitbank.js +142 -142
- package/dist/cjs/src/bitbns.js +140 -140
- package/dist/cjs/src/bitfinex.js +231 -231
- package/dist/cjs/src/bitfinex2.js +403 -403
- package/dist/cjs/src/bitflyer.js +184 -184
- package/dist/cjs/src/bitget.js +848 -846
- package/dist/cjs/src/bithumb.js +125 -124
- package/dist/cjs/src/bitmart.js +525 -525
- package/dist/cjs/src/bitmex.js +317 -317
- package/dist/cjs/src/bitopro.js +221 -221
- package/dist/cjs/src/bitrue.js +315 -315
- package/dist/cjs/src/bitso.js +220 -220
- package/dist/cjs/src/bitstamp.js +251 -251
- package/dist/cjs/src/bitteam.js +183 -183
- package/dist/cjs/src/bitvavo.js +247 -251
- package/dist/cjs/src/bl3p.js +82 -82
- package/dist/cjs/src/blockchaincom.js +211 -211
- package/dist/cjs/src/blofin.js +332 -331
- package/dist/cjs/src/btcalpha.js +166 -166
- package/dist/cjs/src/btcbox.js +108 -108
- package/dist/cjs/src/btcmarkets.js +198 -198
- package/dist/cjs/src/btcturk.js +124 -124
- package/dist/cjs/src/bybit.js +906 -900
- package/dist/cjs/src/cex.js +227 -226
- package/dist/cjs/src/coinbase.js +481 -481
- package/dist/cjs/src/coinbaseexchange.js +274 -274
- package/dist/cjs/src/coinbaseinternational.js +304 -304
- package/dist/cjs/src/coincatch.js +650 -650
- package/dist/cjs/src/coincheck.js +113 -113
- package/dist/cjs/src/coinex.js +611 -601
- package/dist/cjs/src/coinlist.js +304 -303
- package/dist/cjs/src/coinmate.js +162 -161
- package/dist/cjs/src/coinmetro.js +187 -187
- package/dist/cjs/src/coinone.js +124 -123
- package/dist/cjs/src/coinsph.js +237 -237
- package/dist/cjs/src/coinspot.js +82 -82
- package/dist/cjs/src/cryptocom.js +342 -341
- package/dist/cjs/src/currencycom.js +225 -224
- package/dist/cjs/src/delta.js +320 -320
- package/dist/cjs/src/deribit.js +411 -408
- package/dist/cjs/src/digifinex.js +432 -431
- package/dist/cjs/src/exmo.js +328 -327
- package/dist/cjs/src/gate.js +830 -791
- package/dist/cjs/src/gemini.js +199 -198
- package/dist/cjs/src/hashkey.js +520 -517
- package/dist/cjs/src/hitbtc.js +465 -462
- package/dist/cjs/src/hollaex.js +253 -252
- package/dist/cjs/src/htx.js +791 -848
- package/dist/cjs/src/huobijp.js +219 -218
- package/dist/cjs/src/hyperliquid.js +421 -417
- package/dist/cjs/src/idex.js +238 -237
- package/dist/cjs/src/independentreserve.js +133 -132
- package/dist/cjs/src/indodax.js +177 -171
- package/dist/cjs/src/kraken.js +381 -377
- package/dist/cjs/src/krakenfutures.js +285 -279
- package/dist/cjs/src/kucoin.js +632 -622
- package/dist/cjs/src/kucoinfutures.js +533 -457
- package/dist/cjs/src/kuna.js +283 -282
- package/dist/cjs/src/latoken.js +211 -210
- package/dist/cjs/src/lbank.js +268 -267
- package/dist/cjs/src/luno.js +174 -173
- package/dist/cjs/src/lykke.js +172 -171
- package/dist/cjs/src/mercado.js +123 -122
- package/dist/cjs/src/mexc.js +650 -646
- package/dist/cjs/src/ndax.js +229 -228
- package/dist/cjs/src/novadax.js +230 -229
- package/dist/cjs/src/oceanex.js +187 -186
- package/dist/cjs/src/okcoin.js +286 -285
- package/dist/cjs/src/okx.js +909 -904
- package/dist/cjs/src/onetrading.js +218 -218
- package/dist/cjs/src/oxfun.js +335 -334
- package/dist/cjs/src/p2b.js +154 -154
- package/dist/cjs/src/paradex.js +249 -244
- package/dist/cjs/src/paymium.js +101 -101
- package/dist/cjs/src/phemex.js +388 -390
- package/dist/cjs/src/poloniex.js +270 -270
- package/dist/cjs/src/poloniexfutures.js +250 -250
- package/dist/cjs/src/pro/alpaca.js +64 -64
- package/dist/cjs/src/pro/ascendex.js +64 -64
- package/dist/cjs/src/pro/binance.js +546 -543
- package/dist/cjs/src/pro/bingx.js +116 -116
- package/dist/cjs/src/pro/bitfinex.js +42 -42
- package/dist/cjs/src/pro/bitfinex2.js +66 -66
- package/dist/cjs/src/pro/bitget.js +188 -181
- package/dist/cjs/src/pro/bithumb.js +40 -40
- package/dist/cjs/src/pro/bitmart.js +121 -119
- package/dist/cjs/src/pro/bitmex.js +135 -133
- package/dist/cjs/src/pro/bitopro.js +49 -49
- package/dist/cjs/src/pro/bitrue.js +19 -19
- package/dist/cjs/src/pro/bitstamp.js +29 -29
- package/dist/cjs/src/pro/bitvavo.js +299 -301
- package/dist/cjs/src/pro/blockchaincom.js +62 -62
- package/dist/cjs/src/pro/blofin.js +132 -130
- package/dist/cjs/src/pro/bybit.js +317 -313
- package/dist/cjs/src/pro/cex.js +168 -168
- package/dist/cjs/src/pro/coinbase.js +93 -91
- package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
- package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
- package/dist/cjs/src/pro/coincatch.js +150 -143
- package/dist/cjs/src/pro/coincheck.js +21 -21
- package/dist/cjs/src/pro/coinex.js +110 -110
- package/dist/cjs/src/pro/coinone.js +30 -30
- package/dist/cjs/src/pro/cryptocom.js +227 -227
- package/dist/cjs/src/pro/currencycom.js +45 -45
- package/dist/cjs/src/pro/deribit.js +127 -127
- package/dist/cjs/src/pro/exmo.js +66 -66
- package/dist/cjs/src/pro/gate.js +287 -283
- package/dist/cjs/src/pro/gemini.js +74 -74
- package/dist/cjs/src/pro/hashkey.js +87 -85
- package/dist/cjs/src/pro/hitbtc.js +190 -190
- package/dist/cjs/src/pro/hollaex.js +51 -51
- package/dist/cjs/src/pro/htx.js +96 -94
- package/dist/cjs/src/pro/huobijp.js +38 -38
- package/dist/cjs/src/pro/hyperliquid.js +151 -150
- package/dist/cjs/src/pro/idex.js +48 -48
- package/dist/cjs/src/pro/independentreserve.js +19 -19
- package/dist/cjs/src/pro/kraken.js +167 -167
- package/dist/cjs/src/pro/krakenfutures.js +137 -138
- package/dist/cjs/src/pro/kucoin.js +167 -168
- package/dist/cjs/src/pro/kucoinfutures.js +147 -147
- package/dist/cjs/src/pro/lbank.js +95 -95
- package/dist/cjs/src/pro/luno.js +21 -21
- package/dist/cjs/src/pro/mexc.js +102 -103
- package/dist/cjs/src/pro/ndax.js +42 -42
- package/dist/cjs/src/pro/okcoin.js +61 -61
- package/dist/cjs/src/pro/okx.js +332 -330
- package/dist/cjs/src/pro/onetrading.js +71 -71
- package/dist/cjs/src/pro/oxfun.js +193 -191
- package/dist/cjs/src/pro/p2b.js +77 -77
- package/dist/cjs/src/pro/paradex.js +39 -39
- package/dist/cjs/src/pro/phemex.js +94 -94
- package/dist/cjs/src/pro/poloniex.js +171 -171
- package/dist/cjs/src/pro/poloniexfutures.js +62 -62
- package/dist/cjs/src/pro/probit.js +63 -63
- package/dist/cjs/src/pro/upbit.js +80 -80
- package/dist/cjs/src/pro/vertex.js +65 -63
- package/dist/cjs/src/pro/wazirx.js +70 -70
- package/dist/cjs/src/pro/whitebit.js +83 -83
- package/dist/cjs/src/pro/woo.js +106 -104
- package/dist/cjs/src/pro/woofipro.js +105 -103
- package/dist/cjs/src/pro/xt.js +119 -119
- package/dist/cjs/src/probit.js +229 -229
- package/dist/cjs/src/timex.js +198 -197
- package/dist/cjs/src/tokocrypto.js +214 -213
- package/dist/cjs/src/tradeogre.js +92 -91
- package/dist/cjs/src/upbit.js +243 -242
- package/dist/cjs/src/vertex.js +258 -258
- package/dist/cjs/src/wavesexchange.js +176 -172
- package/dist/cjs/src/wazirx.js +168 -168
- package/dist/cjs/src/whitebit.js +361 -361
- package/dist/cjs/src/woo.js +571 -572
- package/dist/cjs/src/woofipro.js +392 -391
- package/dist/cjs/src/xt.js +436 -435
- package/dist/cjs/src/yobit.js +159 -158
- package/dist/cjs/src/zaif.js +103 -103
- package/dist/cjs/src/zonda.js +168 -168
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +123 -0
- package/js/src/ace.js +123 -123
- package/js/src/alpaca.d.ts +237 -0
- package/js/src/alpaca.js +237 -237
- package/js/src/ascendex.d.ts +339 -0
- package/js/src/ascendex.js +342 -341
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +242 -0
- package/js/src/bigone.js +242 -242
- package/js/src/binance.d.ts +1306 -0
- package/js/src/binance.js +1339 -1291
- package/js/src/bingx.d.ts +639 -0
- package/js/src/bingx.js +639 -639
- package/js/src/bit2c.d.ts +111 -0
- package/js/src/bit2c.js +111 -111
- package/js/src/bitbank.d.ts +142 -0
- package/js/src/bitbank.js +142 -142
- package/js/src/bitbns.d.ts +140 -0
- package/js/src/bitbns.js +140 -140
- package/js/src/bitfinex.d.ts +231 -0
- package/js/src/bitfinex.js +231 -231
- package/js/src/bitfinex2.d.ts +403 -0
- package/js/src/bitfinex2.js +403 -403
- package/js/src/bitflyer.d.ts +184 -0
- package/js/src/bitflyer.js +184 -184
- package/js/src/bitget.d.ts +846 -0
- package/js/src/bitget.js +848 -846
- package/js/src/bithumb.d.ts +125 -0
- package/js/src/bithumb.js +125 -124
- package/js/src/bitmart.d.ts +525 -0
- package/js/src/bitmart.js +525 -525
- package/js/src/bitmex.d.ts +317 -0
- package/js/src/bitmex.js +317 -317
- package/js/src/bitopro.d.ts +221 -0
- package/js/src/bitopro.js +221 -221
- package/js/src/bitrue.d.ts +315 -0
- package/js/src/bitrue.js +315 -315
- package/js/src/bitso.d.ts +220 -0
- package/js/src/bitso.js +220 -220
- package/js/src/bitstamp.d.ts +251 -0
- package/js/src/bitstamp.js +251 -251
- package/js/src/bitteam.d.ts +183 -0
- package/js/src/bitteam.js +183 -183
- package/js/src/bitvavo.d.ts +247 -0
- package/js/src/bitvavo.js +247 -251
- package/js/src/bl3p.d.ts +82 -0
- package/js/src/bl3p.js +82 -82
- package/js/src/blockchaincom.d.ts +211 -0
- package/js/src/blockchaincom.js +211 -211
- package/js/src/blofin.d.ts +332 -0
- package/js/src/blofin.js +332 -331
- package/js/src/btcalpha.d.ts +166 -0
- package/js/src/btcalpha.js +166 -166
- package/js/src/btcbox.d.ts +108 -0
- package/js/src/btcbox.js +108 -108
- package/js/src/btcmarkets.d.ts +198 -0
- package/js/src/btcmarkets.js +198 -198
- package/js/src/btcturk.d.ts +124 -0
- package/js/src/btcturk.js +124 -124
- package/js/src/bybit.d.ts +906 -1
- package/js/src/bybit.js +906 -900
- package/js/src/cex.d.ts +227 -0
- package/js/src/cex.js +227 -226
- package/js/src/coinbase.d.ts +481 -0
- package/js/src/coinbase.js +481 -481
- package/js/src/coinbaseexchange.d.ts +274 -0
- package/js/src/coinbaseexchange.js +274 -274
- package/js/src/coinbaseinternational.d.ts +304 -0
- package/js/src/coinbaseinternational.js +304 -304
- package/js/src/coincatch.d.ts +646 -0
- package/js/src/coincatch.js +650 -650
- package/js/src/coincheck.d.ts +113 -0
- package/js/src/coincheck.js +113 -113
- package/js/src/coinex.d.ts +603 -0
- package/js/src/coinex.js +611 -601
- package/js/src/coinlist.d.ts +304 -0
- package/js/src/coinlist.js +304 -303
- package/js/src/coinmate.d.ts +162 -0
- package/js/src/coinmate.js +162 -161
- package/js/src/coinmetro.d.ts +187 -0
- package/js/src/coinmetro.js +187 -187
- package/js/src/coinone.d.ts +124 -0
- package/js/src/coinone.js +124 -123
- package/js/src/coinsph.d.ts +237 -0
- package/js/src/coinsph.js +237 -237
- package/js/src/coinspot.d.ts +82 -0
- package/js/src/coinspot.js +82 -82
- package/js/src/cryptocom.d.ts +342 -0
- package/js/src/cryptocom.js +342 -341
- package/js/src/currencycom.d.ts +225 -0
- package/js/src/currencycom.js +225 -224
- package/js/src/delta.d.ts +320 -0
- package/js/src/delta.js +320 -320
- package/js/src/deribit.d.ts +411 -0
- package/js/src/deribit.js +411 -408
- package/js/src/digifinex.d.ts +430 -0
- package/js/src/digifinex.js +432 -431
- package/js/src/exmo.d.ts +328 -0
- package/js/src/exmo.js +328 -327
- package/js/src/gate.d.ts +803 -1
- package/js/src/gate.js +830 -791
- package/js/src/gemini.d.ts +199 -0
- package/js/src/gemini.js +199 -198
- package/js/src/hashkey.d.ts +516 -0
- package/js/src/hashkey.js +520 -517
- package/js/src/hitbtc.d.ts +465 -0
- package/js/src/hitbtc.js +465 -462
- package/js/src/hollaex.d.ts +253 -0
- package/js/src/hollaex.js +253 -252
- package/js/src/htx.d.ts +765 -2
- package/js/src/htx.js +791 -848
- package/js/src/huobijp.d.ts +219 -0
- package/js/src/huobijp.js +219 -218
- package/js/src/hyperliquid.d.ts +419 -0
- package/js/src/hyperliquid.js +421 -417
- package/js/src/idex.d.ts +238 -0
- package/js/src/idex.js +238 -237
- package/js/src/independentreserve.d.ts +133 -0
- package/js/src/independentreserve.js +133 -132
- package/js/src/indodax.d.ts +171 -0
- package/js/src/indodax.js +177 -171
- package/js/src/kraken.d.ts +381 -0
- package/js/src/kraken.js +381 -377
- package/js/src/krakenfutures.d.ts +282 -0
- package/js/src/krakenfutures.js +285 -279
- package/js/src/kucoin.d.ts +613 -0
- package/js/src/kucoin.js +632 -622
- package/js/src/kucoinfutures.d.ts +441 -0
- package/js/src/kucoinfutures.js +533 -457
- package/js/src/kuna.d.ts +283 -0
- package/js/src/kuna.js +283 -282
- package/js/src/latoken.d.ts +211 -0
- package/js/src/latoken.js +211 -210
- package/js/src/lbank.d.ts +268 -0
- package/js/src/lbank.js +268 -267
- package/js/src/luno.d.ts +174 -0
- package/js/src/luno.js +174 -173
- package/js/src/lykke.d.ts +172 -0
- package/js/src/lykke.js +172 -171
- package/js/src/mercado.d.ts +123 -0
- package/js/src/mercado.js +123 -122
- package/js/src/mexc.d.ts +647 -0
- package/js/src/mexc.js +650 -646
- package/js/src/ndax.d.ts +229 -0
- package/js/src/ndax.js +229 -228
- package/js/src/novadax.d.ts +230 -0
- package/js/src/novadax.js +230 -229
- package/js/src/oceanex.d.ts +187 -0
- package/js/src/oceanex.js +187 -186
- package/js/src/okcoin.d.ts +286 -0
- package/js/src/okcoin.js +286 -285
- package/js/src/okx.d.ts +907 -0
- package/js/src/okx.js +909 -904
- package/js/src/onetrading.d.ts +218 -0
- package/js/src/onetrading.js +218 -218
- package/js/src/oxfun.d.ts +336 -3
- package/js/src/oxfun.js +335 -334
- package/js/src/p2b.d.ts +154 -0
- package/js/src/p2b.js +154 -154
- package/js/src/paradex.d.ts +241 -0
- package/js/src/paradex.js +249 -244
- package/js/src/paymium.d.ts +101 -0
- package/js/src/paymium.js +101 -101
- package/js/src/phemex.d.ts +366 -0
- package/js/src/phemex.js +388 -390
- package/js/src/poloniex.d.ts +270 -0
- package/js/src/poloniex.js +270 -270
- package/js/src/poloniexfutures.d.ts +250 -0
- package/js/src/poloniexfutures.js +250 -250
- package/js/src/pro/alpaca.d.ts +64 -0
- package/js/src/pro/alpaca.js +64 -64
- package/js/src/pro/ascendex.d.ts +64 -0
- package/js/src/pro/ascendex.js +64 -64
- package/js/src/pro/binance.d.ts +546 -0
- package/js/src/pro/binance.js +546 -543
- package/js/src/pro/bingx.d.ts +116 -0
- package/js/src/pro/bingx.js +116 -116
- package/js/src/pro/bitfinex.d.ts +42 -0
- package/js/src/pro/bitfinex.js +42 -42
- package/js/src/pro/bitfinex2.d.ts +66 -0
- package/js/src/pro/bitfinex2.js +66 -66
- package/js/src/pro/bitget.d.ts +187 -0
- package/js/src/pro/bitget.js +188 -181
- package/js/src/pro/bithumb.d.ts +40 -0
- package/js/src/pro/bithumb.js +40 -40
- package/js/src/pro/bitmart.d.ts +121 -0
- package/js/src/pro/bitmart.js +121 -119
- package/js/src/pro/bitmex.d.ts +135 -0
- package/js/src/pro/bitmex.js +135 -133
- package/js/src/pro/bitopro.d.ts +49 -0
- package/js/src/pro/bitopro.js +49 -49
- package/js/src/pro/bitrue.d.ts +19 -0
- package/js/src/pro/bitrue.js +19 -19
- package/js/src/pro/bitstamp.d.ts +29 -0
- package/js/src/pro/bitstamp.js +29 -29
- package/js/src/pro/bitvavo.d.ts +254 -1
- package/js/src/pro/bitvavo.js +299 -301
- package/js/src/pro/blockchaincom.d.ts +62 -0
- package/js/src/pro/blockchaincom.js +62 -62
- package/js/src/pro/blofin.d.ts +132 -0
- package/js/src/pro/blofin.js +132 -130
- package/js/src/pro/bybit.d.ts +317 -0
- package/js/src/pro/bybit.js +317 -313
- package/js/src/pro/cex.d.ts +168 -0
- package/js/src/pro/cex.js +168 -168
- package/js/src/pro/coinbase.d.ts +93 -0
- package/js/src/pro/coinbase.js +93 -91
- package/js/src/pro/coinbaseexchange.d.ts +95 -0
- package/js/src/pro/coinbaseexchange.js +95 -95
- package/js/src/pro/coinbaseinternational.d.ts +111 -0
- package/js/src/pro/coinbaseinternational.js +111 -111
- package/js/src/pro/coincatch.d.ts +150 -0
- package/js/src/pro/coincatch.js +150 -143
- package/js/src/pro/coincheck.d.ts +21 -0
- package/js/src/pro/coincheck.js +21 -21
- package/js/src/pro/coinex.d.ts +110 -0
- package/js/src/pro/coinex.js +110 -110
- package/js/src/pro/coinone.d.ts +30 -0
- package/js/src/pro/coinone.js +30 -30
- package/js/src/pro/cryptocom.d.ts +227 -0
- package/js/src/pro/cryptocom.js +227 -227
- package/js/src/pro/currencycom.d.ts +45 -0
- package/js/src/pro/currencycom.js +45 -45
- package/js/src/pro/deribit.d.ts +127 -0
- package/js/src/pro/deribit.js +127 -127
- package/js/src/pro/exmo.d.ts +66 -0
- package/js/src/pro/exmo.js +66 -66
- package/js/src/pro/gate.d.ts +287 -0
- package/js/src/pro/gate.js +287 -283
- package/js/src/pro/gemini.d.ts +74 -0
- package/js/src/pro/gemini.js +74 -74
- package/js/src/pro/hashkey.d.ts +87 -0
- package/js/src/pro/hashkey.js +87 -85
- package/js/src/pro/hitbtc.d.ts +190 -0
- package/js/src/pro/hitbtc.js +190 -190
- package/js/src/pro/hollaex.d.ts +51 -0
- package/js/src/pro/hollaex.js +51 -51
- package/js/src/pro/htx.d.ts +96 -0
- package/js/src/pro/htx.js +96 -94
- package/js/src/pro/huobijp.d.ts +38 -0
- package/js/src/pro/huobijp.js +38 -38
- package/js/src/pro/hyperliquid.d.ts +151 -0
- package/js/src/pro/hyperliquid.js +151 -150
- package/js/src/pro/idex.d.ts +48 -0
- package/js/src/pro/idex.js +48 -48
- package/js/src/pro/independentreserve.d.ts +19 -0
- package/js/src/pro/independentreserve.js +19 -19
- package/js/src/pro/kraken.d.ts +167 -0
- package/js/src/pro/kraken.js +167 -167
- package/js/src/pro/krakenfutures.d.ts +137 -0
- package/js/src/pro/krakenfutures.js +137 -138
- package/js/src/pro/kucoin.d.ts +167 -0
- package/js/src/pro/kucoin.js +167 -168
- package/js/src/pro/kucoinfutures.d.ts +147 -0
- package/js/src/pro/kucoinfutures.js +147 -147
- package/js/src/pro/lbank.d.ts +95 -0
- package/js/src/pro/lbank.js +95 -95
- package/js/src/pro/luno.d.ts +21 -0
- package/js/src/pro/luno.js +21 -21
- package/js/src/pro/mexc.d.ts +101 -0
- package/js/src/pro/mexc.js +102 -103
- package/js/src/pro/ndax.d.ts +42 -0
- package/js/src/pro/ndax.js +42 -42
- package/js/src/pro/okcoin.d.ts +61 -0
- package/js/src/pro/okcoin.js +61 -61
- package/js/src/pro/okx.d.ts +332 -0
- package/js/src/pro/okx.js +332 -330
- package/js/src/pro/onetrading.d.ts +71 -0
- package/js/src/pro/onetrading.js +71 -71
- package/js/src/pro/oxfun.d.ts +193 -0
- package/js/src/pro/oxfun.js +193 -191
- package/js/src/pro/p2b.d.ts +77 -0
- package/js/src/pro/p2b.js +77 -77
- package/js/src/pro/paradex.d.ts +39 -0
- package/js/src/pro/paradex.js +39 -39
- package/js/src/pro/phemex.d.ts +94 -0
- package/js/src/pro/phemex.js +94 -94
- package/js/src/pro/poloniex.d.ts +171 -0
- package/js/src/pro/poloniex.js +171 -171
- package/js/src/pro/poloniexfutures.d.ts +62 -0
- package/js/src/pro/poloniexfutures.js +62 -62
- package/js/src/pro/probit.d.ts +63 -0
- package/js/src/pro/probit.js +63 -63
- package/js/src/pro/upbit.d.ts +80 -0
- package/js/src/pro/upbit.js +80 -80
- package/js/src/pro/vertex.d.ts +65 -0
- package/js/src/pro/vertex.js +65 -63
- package/js/src/pro/wazirx.d.ts +70 -0
- package/js/src/pro/wazirx.js +70 -70
- package/js/src/pro/whitebit.d.ts +83 -0
- package/js/src/pro/whitebit.js +83 -83
- package/js/src/pro/woo.d.ts +106 -0
- package/js/src/pro/woo.js +106 -104
- package/js/src/pro/woofipro.d.ts +105 -0
- package/js/src/pro/woofipro.js +105 -103
- package/js/src/pro/xt.d.ts +119 -0
- package/js/src/pro/xt.js +119 -119
- package/js/src/probit.d.ts +229 -0
- package/js/src/probit.js +229 -229
- package/js/src/timex.d.ts +198 -0
- package/js/src/timex.js +198 -197
- package/js/src/tokocrypto.d.ts +214 -0
- package/js/src/tokocrypto.js +214 -213
- package/js/src/tradeogre.d.ts +92 -0
- package/js/src/tradeogre.js +92 -91
- package/js/src/upbit.d.ts +243 -0
- package/js/src/upbit.js +243 -242
- package/js/src/vertex.d.ts +258 -0
- package/js/src/vertex.js +258 -258
- package/js/src/wavesexchange.d.ts +176 -0
- package/js/src/wavesexchange.js +176 -172
- package/js/src/wazirx.d.ts +168 -0
- package/js/src/wazirx.js +168 -168
- package/js/src/whitebit.d.ts +361 -0
- package/js/src/whitebit.js +361 -361
- package/js/src/woo.d.ts +571 -0
- package/js/src/woo.js +571 -572
- package/js/src/woofipro.d.ts +392 -0
- package/js/src/woofipro.js +392 -391
- package/js/src/xt.d.ts +439 -4
- package/js/src/xt.js +436 -435
- package/js/src/yobit.d.ts +159 -0
- package/js/src/yobit.js +159 -158
- package/js/src/zaif.d.ts +103 -0
- package/js/src/zaif.js +103 -103
- package/js/src/zonda.d.ts +168 -0
- package/js/src/zonda.js +168 -168
- package/package.json +1 -1
package/js/src/binance.d.ts
CHANGED
|
@@ -15,15 +15,89 @@ export default class binance extends Exchange {
|
|
|
15
15
|
costToPrecision(symbol: any, cost: any): string;
|
|
16
16
|
currencyToPrecision(code: any, fee: any, networkCode?: any): string;
|
|
17
17
|
nonce(): number;
|
|
18
|
+
/**
|
|
19
|
+
* @method
|
|
20
|
+
* @name binance#fetchTime
|
|
21
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
22
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#check-server-time // spot
|
|
23
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time // swap
|
|
24
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Check-Server-time // future
|
|
25
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
26
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
27
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
28
|
+
*/
|
|
18
29
|
fetchTime(params?: {}): Promise<number>;
|
|
30
|
+
/**
|
|
31
|
+
* @method
|
|
32
|
+
* @name binance#fetchCurrencies
|
|
33
|
+
* @description fetches all available currencies on an exchange
|
|
34
|
+
* @see https://developers.binance.com/docs/wallet/capital/all-coins-info
|
|
35
|
+
* @see https://developers.binance.com/docs/margin_trading/market-data/Get-All-Margin-Assets
|
|
36
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
37
|
+
* @returns {object} an associative dictionary of currencies
|
|
38
|
+
*/
|
|
19
39
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
40
|
+
/**
|
|
41
|
+
* @method
|
|
42
|
+
* @name binance#fetchMarkets
|
|
43
|
+
* @description retrieves data on all markets for binance
|
|
44
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#exchange-information // spot
|
|
45
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information // swap
|
|
46
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Exchange-Information // future
|
|
47
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Exchange-Information // option
|
|
48
|
+
* @see https://developers.binance.com/docs/margin_trading/market-data/Get-All-Cross-Margin-Pairs // cross margin
|
|
49
|
+
* @see https://developers.binance.com/docs/margin_trading/market-data/Get-All-Isolated-Margin-Symbol // isolated margin
|
|
50
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
51
|
+
* @returns {object[]} an array of objects representing market data
|
|
52
|
+
*/
|
|
20
53
|
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
21
54
|
parseMarket(market: Dict): Market;
|
|
22
55
|
parseBalanceHelper(entry: any): import("./base/types.js").BalanceAccount;
|
|
23
56
|
parseBalanceCustom(response: any, type?: any, marginMode?: any, isPortfolioMargin?: boolean): Balances;
|
|
57
|
+
/**
|
|
58
|
+
* @method
|
|
59
|
+
* @name binance#fetchBalance
|
|
60
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
61
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-information-user_data // spot
|
|
62
|
+
* @see https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details // cross margin
|
|
63
|
+
* @see https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info // isolated margin
|
|
64
|
+
* @see https://developers.binance.com/docs/wallet/asset/funding-wallet // funding
|
|
65
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V2 // swap
|
|
66
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Futures-Account-Balance // future
|
|
67
|
+
* @see https://developers.binance.com/docs/derivatives/option/account/Option-Account-Information // option
|
|
68
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Account-Balance // portfolio margin
|
|
69
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
70
|
+
* @param {string} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot' or 'papi'
|
|
71
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
|
|
72
|
+
* @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
|
|
73
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the balance for a portfolio margin account
|
|
74
|
+
* @param {string} [params.subType] 'linear' or 'inverse'
|
|
75
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
76
|
+
*/
|
|
24
77
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
78
|
+
/**
|
|
79
|
+
* @method
|
|
80
|
+
* @name binance#fetchOrderBook
|
|
81
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
82
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#order-book // spot
|
|
83
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book // swap
|
|
84
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Order-Book // future
|
|
85
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Order-Book // option
|
|
86
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
87
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
88
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
89
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
90
|
+
*/
|
|
25
91
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
26
92
|
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
93
|
+
/**
|
|
94
|
+
* @method
|
|
95
|
+
* @name binance#fetchStatus
|
|
96
|
+
* @description the latest known information on the availability of the exchange API
|
|
97
|
+
* @see https://developers.binance.com/docs/wallet/others/system-status
|
|
98
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
99
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
100
|
+
*/
|
|
27
101
|
fetchStatus(params?: {}): Promise<{
|
|
28
102
|
status: string;
|
|
29
103
|
updated: any;
|
|
@@ -31,8 +105,46 @@ export default class binance extends Exchange {
|
|
|
31
105
|
url: any;
|
|
32
106
|
info: any;
|
|
33
107
|
}>;
|
|
108
|
+
/**
|
|
109
|
+
* @method
|
|
110
|
+
* @name binance#fetchTicker
|
|
111
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
112
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics // spot
|
|
113
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#rolling-window-price-change-statistics // spot
|
|
114
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics // swap
|
|
115
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics // future
|
|
116
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics // option
|
|
117
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
118
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
119
|
+
* @param {boolean} [params.rolling] (spot only) default false, if true, uses the rolling 24 hour ticker endpoint /api/v3/ticker
|
|
120
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
121
|
+
*/
|
|
34
122
|
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
123
|
+
/**
|
|
124
|
+
* @method
|
|
125
|
+
* @name binance#fetchBidsAsks
|
|
126
|
+
* @description fetches the bid and ask price and volume for multiple markets
|
|
127
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-order-book-ticker // spot
|
|
128
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker // swap
|
|
129
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Order-Book-Ticker // future
|
|
130
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
131
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
132
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
133
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
134
|
+
*/
|
|
35
135
|
fetchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
136
|
+
/**
|
|
137
|
+
* @method
|
|
138
|
+
* @name binance#fetchLastPrices
|
|
139
|
+
* @description fetches the last price for multiple markets
|
|
140
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-price-ticker // spot
|
|
141
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker // swap
|
|
142
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Symbol-Price-Ticker // future
|
|
143
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the last prices
|
|
144
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
145
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
146
|
+
* @returns {object} a dictionary of lastprices structures
|
|
147
|
+
*/
|
|
36
148
|
fetchLastPrices(symbols?: Strings, params?: {}): Promise<import("./base/types.js").LastPrices>;
|
|
37
149
|
parseLastPrice(entry: any, market?: Market): {
|
|
38
150
|
symbol: string;
|
|
@@ -42,38 +154,503 @@ export default class binance extends Exchange {
|
|
|
42
154
|
side: any;
|
|
43
155
|
info: any;
|
|
44
156
|
};
|
|
157
|
+
/**
|
|
158
|
+
* @method
|
|
159
|
+
* @name binance#fetchTickers
|
|
160
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
161
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics // spot
|
|
162
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics // swap
|
|
163
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/24hr-Ticker-Price-Change-Statistics // future
|
|
164
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics // option
|
|
165
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
166
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
167
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
168
|
+
* @param {string} [params.type] 'spot', 'option', use params["subType"] for swap and future markets
|
|
169
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
170
|
+
*/
|
|
45
171
|
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
172
|
+
/**
|
|
173
|
+
* @method
|
|
174
|
+
* @name binance#fetchMarkPrice
|
|
175
|
+
* @description fetches mark price for the market
|
|
176
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#mark-price
|
|
177
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price
|
|
178
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
179
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
180
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
181
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
182
|
+
*/
|
|
46
183
|
fetchMarkPrice(symbol: string, params?: {}): Promise<Ticker>;
|
|
184
|
+
/**
|
|
185
|
+
* @method
|
|
186
|
+
* @name binance#fetchMarkPrices
|
|
187
|
+
* @description fetches mark prices for multiple markets
|
|
188
|
+
* @see https://binance-docs.github.io/apidocs/futures/en/#mark-price
|
|
189
|
+
* @see https://binance-docs.github.io/apidocs/delivery/en/#index-price-and-mark-price
|
|
190
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
191
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
192
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
193
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
194
|
+
*/
|
|
47
195
|
fetchMarkPrices(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
48
196
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
197
|
+
/**
|
|
198
|
+
* @method
|
|
199
|
+
* @name binance#fetchOHLCV
|
|
200
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
201
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#klinecandlestick-data
|
|
202
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
|
|
203
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
|
|
204
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
|
|
205
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
|
|
206
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data
|
|
207
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Kline-Candlestick-Data
|
|
208
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-Kline-Candlestick-Data
|
|
209
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Mark-Price-Kline-Candlestick-Data
|
|
210
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Premium-Index-Kline-Data
|
|
211
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
212
|
+
* @param {string} timeframe the length of time each candle represents
|
|
213
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
214
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
215
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
216
|
+
* @param {string} [params.price] "mark" or "index" for mark price and index price candles
|
|
217
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
218
|
+
* @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)
|
|
219
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
220
|
+
*/
|
|
49
221
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
50
222
|
parseTrade(trade: Dict, market?: Market): Trade;
|
|
223
|
+
/**
|
|
224
|
+
* @method
|
|
225
|
+
* @name binance#fetchTrades
|
|
226
|
+
* @description get the list of most recent trades for a particular symbol
|
|
227
|
+
* Default fetchTradesMethod
|
|
228
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#compressedaggregate-trades-list // publicGetAggTrades (spot)
|
|
229
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List // fapiPublicGetAggTrades (swap)
|
|
230
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Compressed-Aggregate-Trades-List // dapiPublicGetAggTrades (future)
|
|
231
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List // eapiPublicGetTrades (option)
|
|
232
|
+
* Other fetchTradesMethod
|
|
233
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#recent-trades-list // publicGetTrades (spot)
|
|
234
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List // fapiPublicGetTrades (swap)
|
|
235
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Recent-Trades-List // dapiPublicGetTrades (future)
|
|
236
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#old-trade-lookup // publicGetHistoricalTrades (spot)
|
|
237
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup // fapiPublicGetHistoricalTrades (swap)
|
|
238
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Old-Trades-Lookup // dapiPublicGetHistoricalTrades (future)
|
|
239
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup // eapiPublicGetHistoricalTrades (option)
|
|
240
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
241
|
+
* @param {int} [since] only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'
|
|
242
|
+
* @param {int} [limit] default 500, max 1000
|
|
243
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
244
|
+
* @param {int} [params.until] only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'
|
|
245
|
+
* @param {int} [params.fetchTradesMethod] 'publicGetAggTrades' (spot default), 'fapiPublicGetAggTrades' (swap default), 'dapiPublicGetAggTrades' (future default), 'eapiPublicGetTrades' (option default), 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', 'publicGetHistoricalTrades', 'fapiPublicGetHistoricalTrades', 'dapiPublicGetHistoricalTrades', 'eapiPublicGetHistoricalTrades'
|
|
246
|
+
* @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)
|
|
247
|
+
*
|
|
248
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
249
|
+
* @param {int} [params.fromId] trade id to fetch from, default gets most recent trades, not used when fetchTradesMethod is 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', or 'eapiPublicGetTrades'
|
|
250
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
251
|
+
*/
|
|
51
252
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
253
|
+
/**
|
|
254
|
+
* @method
|
|
255
|
+
* @name binance#editSpotOrder
|
|
256
|
+
* @ignore
|
|
257
|
+
* @description edit a trade order
|
|
258
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
|
|
259
|
+
* @param {string} id cancel order id
|
|
260
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
261
|
+
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
262
|
+
* @param {string} side 'buy' or 'sell'
|
|
263
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
264
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
265
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
266
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
267
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
268
|
+
*/
|
|
52
269
|
editSpotOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
53
270
|
editSpotOrderRequest(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
|
|
54
271
|
editContractOrderRequest(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Dict;
|
|
272
|
+
/**
|
|
273
|
+
* @method
|
|
274
|
+
* @name binance#editContractOrder
|
|
275
|
+
* @description edit a trade order
|
|
276
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
|
277
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
|
|
278
|
+
* @param {string} id cancel order id
|
|
279
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
280
|
+
* @param {string} type 'market' or 'limit'
|
|
281
|
+
* @param {string} side 'buy' or 'sell'
|
|
282
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
283
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
284
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
285
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
286
|
+
*/
|
|
55
287
|
editContractOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
288
|
+
/**
|
|
289
|
+
* @method
|
|
290
|
+
* @name binance#editOrder
|
|
291
|
+
* @description edit a trade order
|
|
292
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade
|
|
293
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
|
294
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
|
|
295
|
+
* @param {string} id cancel order id
|
|
296
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
297
|
+
* @param {string} type 'market' or 'limit'
|
|
298
|
+
* @param {string} side 'buy' or 'sell'
|
|
299
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
300
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
301
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
302
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
303
|
+
*/
|
|
56
304
|
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|
|
57
305
|
parseOrderStatus(status: Str): string;
|
|
58
306
|
parseOrder(order: Dict, market?: Market): Order;
|
|
307
|
+
/**
|
|
308
|
+
* @method
|
|
309
|
+
* @name binance#createOrders
|
|
310
|
+
* @description *contract only* create a list of trade orders
|
|
311
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Place-Multiple-Orders
|
|
312
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders
|
|
313
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Place-Multiple-Orders
|
|
314
|
+
* @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
|
|
315
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
316
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
317
|
+
*/
|
|
59
318
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
319
|
+
/**
|
|
320
|
+
* @method
|
|
321
|
+
* @name binance#createOrder
|
|
322
|
+
* @description create a trade order
|
|
323
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
324
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-trade
|
|
325
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order
|
|
326
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/New-Order
|
|
327
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/New-Order
|
|
328
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#sor
|
|
329
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-using-sor-trade
|
|
330
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Order
|
|
331
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Order
|
|
332
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-Margin-Order
|
|
333
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Conditional-Order
|
|
334
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Conditional-Order
|
|
335
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
336
|
+
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
337
|
+
* @param {string} side 'buy' or 'sell'
|
|
338
|
+
* @param {float} amount how much of you want to trade in units of the base currency
|
|
339
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
340
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
341
|
+
* @param {string} [params.reduceOnly] for swap and future reduceOnly is a string 'true' or 'false' that cant be sent with close position set to true or in hedge mode. For spot margin and option reduceOnly is a boolean.
|
|
342
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
343
|
+
* @param {boolean} [params.sor] *spot only* whether to use SOR (Smart Order Routing) or not, default is false
|
|
344
|
+
* @param {boolean} [params.test] *spot only* whether to use the test endpoint or not, default is false
|
|
345
|
+
* @param {float} [params.trailingPercent] the percent to trail away from the current market price
|
|
346
|
+
* @param {float} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
347
|
+
* @param {float} [params.triggerPrice] the price that a trigger order is triggered at
|
|
348
|
+
* @param {float} [params.stopLossPrice] the price that a stop loss order is triggered at
|
|
349
|
+
* @param {float} [params.takeProfitPrice] the price that a take profit order is triggered at
|
|
350
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to create an order in a portfolio margin account
|
|
351
|
+
* @param {string} [params.stopLossOrTakeProfit] 'stopLoss' or 'takeProfit', required for spot trailing orders
|
|
352
|
+
* @param {string} [params.positionSide] *swap and portfolio margin only* "BOTH" for one-way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
|
|
353
|
+
* @param {bool} [params.hedged] *swap and portfolio margin only* true for hedged mode, false for one way mode, default is false
|
|
354
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
355
|
+
*/
|
|
60
356
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
61
357
|
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
|
|
358
|
+
/**
|
|
359
|
+
* @method
|
|
360
|
+
* @name binance#createMarketOrderWithCost
|
|
361
|
+
* @description create a market order by providing the symbol, side and cost
|
|
362
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
363
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
364
|
+
* @param {string} side 'buy' or 'sell'
|
|
365
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
366
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
367
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
368
|
+
*/
|
|
62
369
|
createMarketOrderWithCost(symbol: string, side: OrderSide, cost: number, params?: {}): Promise<Order>;
|
|
370
|
+
/**
|
|
371
|
+
* @method
|
|
372
|
+
* @name binance#createMarketBuyOrderWithCost
|
|
373
|
+
* @description create a market buy order by providing the symbol and cost
|
|
374
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
375
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
376
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
377
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
378
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
379
|
+
*/
|
|
63
380
|
createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
381
|
+
/**
|
|
382
|
+
* @method
|
|
383
|
+
* @name binance#createMarketSellOrderWithCost
|
|
384
|
+
* @description create a market sell order by providing the symbol and cost
|
|
385
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade
|
|
386
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
387
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
388
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
389
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
390
|
+
*/
|
|
64
391
|
createMarketSellOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
392
|
+
/**
|
|
393
|
+
* @method
|
|
394
|
+
* @name binance#fetchOrder
|
|
395
|
+
* @description fetches information on an order made by the user
|
|
396
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-order-user_data
|
|
397
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Order
|
|
398
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Order
|
|
399
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Single-Order
|
|
400
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Order
|
|
401
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Order
|
|
402
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Order
|
|
403
|
+
* @param {string} id the order id
|
|
404
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
405
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
406
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
407
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch an order in a portfolio margin account
|
|
408
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
409
|
+
*/
|
|
65
410
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
411
|
+
/**
|
|
412
|
+
* @method
|
|
413
|
+
* @name binance#fetchOrders
|
|
414
|
+
* @description fetches information on multiple orders made by the user
|
|
415
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
416
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
417
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
418
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
419
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
|
420
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
|
421
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
|
422
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
|
423
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
|
424
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
425
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
426
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
427
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
428
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
429
|
+
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
430
|
+
* @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)
|
|
431
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
432
|
+
* @param {boolean} [params.stop] set to true if you would like to fetch portfolio margin account stop or conditional orders
|
|
433
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
434
|
+
*/
|
|
66
435
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
436
|
+
/**
|
|
437
|
+
* @method
|
|
438
|
+
* @name binance#fetchOpenOrders
|
|
439
|
+
* @description fetch all unfilled currently open orders
|
|
440
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#current-open-orders-user_data
|
|
441
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders
|
|
442
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Current-All-Open-Orders
|
|
443
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Current-Open-Option-Orders
|
|
444
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-Orders
|
|
445
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders
|
|
446
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Conditional-Orders
|
|
447
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Orders
|
|
448
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Conditional-Orders
|
|
449
|
+
* @param {string} symbol unified market symbol
|
|
450
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
451
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
452
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
453
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
454
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch open orders in the portfolio margin account
|
|
455
|
+
* @param {boolean} [params.stop] set to true if you would like to fetch portfolio margin account conditional orders
|
|
456
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
457
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
458
|
+
*/
|
|
67
459
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
460
|
+
/**
|
|
461
|
+
* @method
|
|
462
|
+
* @name binance#fetchOpenOrder
|
|
463
|
+
* @description fetch an open order by the id
|
|
464
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order
|
|
465
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Query-Current-Open-Order
|
|
466
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Order
|
|
467
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Conditional-Order
|
|
468
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Order
|
|
469
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Conditional-Order
|
|
470
|
+
* @param {string} id order id
|
|
471
|
+
* @param {string} symbol unified market symbol
|
|
472
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
473
|
+
* @param {string} [params.trigger] set to true if you would like to fetch portfolio margin account stop or conditional orders
|
|
474
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
475
|
+
*/
|
|
68
476
|
fetchOpenOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
477
|
+
/**
|
|
478
|
+
* @method
|
|
479
|
+
* @name binance#fetchClosedOrders
|
|
480
|
+
* @description fetches information on multiple closed orders made by the user
|
|
481
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
482
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
483
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
484
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
485
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
|
486
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
|
487
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
|
488
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
|
489
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
|
490
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
491
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
492
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
493
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
494
|
+
* @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)
|
|
495
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
496
|
+
* @param {boolean} [params.stop] set to true if you would like to fetch portfolio margin account stop or conditional orders
|
|
497
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
498
|
+
*/
|
|
69
499
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
500
|
+
/**
|
|
501
|
+
* @method
|
|
502
|
+
* @name binance#fetchCanceledOrders
|
|
503
|
+
* @description fetches information on multiple canceled orders made by the user
|
|
504
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
505
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
506
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
507
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
508
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
|
509
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
|
510
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
|
511
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
|
512
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
|
513
|
+
* @param {string} symbol unified market symbol of the market the orders were made in
|
|
514
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
515
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
516
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
517
|
+
* @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)
|
|
518
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
519
|
+
* @param {boolean} [params.stop] set to true if you would like to fetch portfolio margin account stop or conditional orders
|
|
520
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
521
|
+
*/
|
|
70
522
|
fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
523
|
+
/**
|
|
524
|
+
* @method
|
|
525
|
+
* @name binance#fetchCanceledAndClosedOrders
|
|
526
|
+
* @description fetches information on multiple canceled orders made by the user
|
|
527
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data
|
|
528
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders
|
|
529
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/All-Orders
|
|
530
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History
|
|
531
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders
|
|
532
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders
|
|
533
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders
|
|
534
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders
|
|
535
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders
|
|
536
|
+
* @param {string} symbol unified market symbol of the market the orders were made in
|
|
537
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
538
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
539
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
540
|
+
* @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)
|
|
541
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
542
|
+
* @param {boolean} [params.stop] set to true if you would like to fetch portfolio margin account stop or conditional orders
|
|
543
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
544
|
+
*/
|
|
71
545
|
fetchCanceledAndClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
546
|
+
/**
|
|
547
|
+
* @method
|
|
548
|
+
* @name binance#cancelOrder
|
|
549
|
+
* @description cancels an open order
|
|
550
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-order-trade
|
|
551
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order
|
|
552
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Order
|
|
553
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Cancel-Option-Order
|
|
554
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-Order
|
|
555
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Order
|
|
556
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Order
|
|
557
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Conditional-Order
|
|
558
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Conditional-Order
|
|
559
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-Order
|
|
560
|
+
* @param {string} id order id
|
|
561
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
562
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
563
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel an order in a portfolio margin account
|
|
564
|
+
* @param {boolean} [params.stop] set to true if you would like to cancel a portfolio margin account conditional order
|
|
565
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
566
|
+
*/
|
|
72
567
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
568
|
+
/**
|
|
569
|
+
* @method
|
|
570
|
+
* @name binance#cancelAllOrders
|
|
571
|
+
* @description cancel all open orders in a market
|
|
572
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-all-open-orders-on-a-symbol-trade
|
|
573
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders
|
|
574
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Cancel-all-Option-orders-on-specific-symbol
|
|
575
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders
|
|
576
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Orders
|
|
577
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Conditional-Orders
|
|
578
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Orders
|
|
579
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Conditional-Orders
|
|
580
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-All-Open-Orders-on-a-Symbol
|
|
581
|
+
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
582
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
583
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
584
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel orders in a portfolio margin account
|
|
585
|
+
* @param {boolean} [params.stop] set to true if you would like to cancel portfolio margin account conditional orders
|
|
586
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
587
|
+
*/
|
|
73
588
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
589
|
+
/**
|
|
590
|
+
* @method
|
|
591
|
+
* @name binance#cancelOrders
|
|
592
|
+
* @description cancel multiple orders
|
|
593
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders
|
|
594
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Cancel-Multiple-Orders
|
|
595
|
+
* @param {string[]} ids order ids
|
|
596
|
+
* @param {string} [symbol] unified market symbol
|
|
597
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
598
|
+
*
|
|
599
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
600
|
+
* @param {string[]} [params.origClientOrderIdList] max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
|
|
601
|
+
* @param {int[]} [params.recvWindow]
|
|
602
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
603
|
+
*/
|
|
74
604
|
cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
|
|
605
|
+
/**
|
|
606
|
+
* @method
|
|
607
|
+
* @name binance#fetchOrderTrades
|
|
608
|
+
* @description fetch all the trades made from a single order
|
|
609
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
|
|
610
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
|
|
611
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
|
|
612
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
|
|
613
|
+
* @param {string} id order id
|
|
614
|
+
* @param {string} symbol unified market symbol
|
|
615
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
616
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
617
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
618
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
619
|
+
*/
|
|
75
620
|
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
621
|
+
/**
|
|
622
|
+
* @method
|
|
623
|
+
* @name binance#fetchMyTrades
|
|
624
|
+
* @description fetch all trades made by the user
|
|
625
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data
|
|
626
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List
|
|
627
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Account-Trade-List
|
|
628
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List
|
|
629
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Account-Trade-List
|
|
630
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/UM-Account-Trade-List
|
|
631
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/CM-Account-Trade-List
|
|
632
|
+
* @param {string} symbol unified market symbol
|
|
633
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
634
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
635
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
636
|
+
* @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)
|
|
637
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
638
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch trades for a portfolio margin account
|
|
639
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
640
|
+
*/
|
|
76
641
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
642
|
+
/**
|
|
643
|
+
* @method
|
|
644
|
+
* @name binance#fetchMyDustTrades
|
|
645
|
+
* @description fetch all dust trades made by the user
|
|
646
|
+
* @see https://developers.binance.com/docs/wallet/asset/dust-log
|
|
647
|
+
* @param {string} symbol not used by binance fetchMyDustTrades ()
|
|
648
|
+
* @param {int} [since] the earliest time in ms to fetch my dust trades for
|
|
649
|
+
* @param {int} [limit] the maximum number of dust trades to retrieve
|
|
650
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
651
|
+
* @param {string} [params.type] 'spot' or 'margin', default spot
|
|
652
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
653
|
+
*/
|
|
77
654
|
fetchMyDustTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
78
655
|
parseDustTrade(trade: any, market?: Market): {
|
|
79
656
|
id: any;
|
|
@@ -93,7 +670,37 @@ export default class binance extends Exchange {
|
|
|
93
670
|
};
|
|
94
671
|
info: any;
|
|
95
672
|
};
|
|
673
|
+
/**
|
|
674
|
+
* @method
|
|
675
|
+
* @name binance#fetchDeposits
|
|
676
|
+
* @description fetch all deposits made to an account
|
|
677
|
+
* @see https://developers.binance.com/docs/wallet/capital/deposite-history
|
|
678
|
+
* @see https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History
|
|
679
|
+
* @param {string} code unified currency code
|
|
680
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
681
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
682
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
683
|
+
* @param {bool} [params.fiat] if true, only fiat deposits will be returned
|
|
684
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
685
|
+
* @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)
|
|
686
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
687
|
+
*/
|
|
96
688
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
689
|
+
/**
|
|
690
|
+
* @method
|
|
691
|
+
* @name binance#fetchWithdrawals
|
|
692
|
+
* @description fetch all withdrawals made from an account
|
|
693
|
+
* @see https://developers.binance.com/docs/wallet/capital/withdraw-history
|
|
694
|
+
* @see https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History
|
|
695
|
+
* @param {string} code unified currency code
|
|
696
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
697
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
698
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
699
|
+
* @param {bool} [params.fiat] if true, only fiat withdrawals will be returned
|
|
700
|
+
* @param {int} [params.until] the latest time in ms to fetch withdrawals for
|
|
701
|
+
* @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)
|
|
702
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
703
|
+
*/
|
|
97
704
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
98
705
|
parseTransactionStatusByType(status: any, type?: any): any;
|
|
99
706
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
@@ -108,24 +715,169 @@ export default class binance extends Exchange {
|
|
|
108
715
|
id: string;
|
|
109
716
|
amount: number;
|
|
110
717
|
};
|
|
718
|
+
/**
|
|
719
|
+
* @method
|
|
720
|
+
* @name binance#transfer
|
|
721
|
+
* @description transfer currency internally between wallets on the same account
|
|
722
|
+
* @see https://developers.binance.com/docs/wallet/asset/user-universal-transfer
|
|
723
|
+
* @param {string} code unified currency code
|
|
724
|
+
* @param {float} amount amount to transfer
|
|
725
|
+
* @param {string} fromAccount account to transfer from
|
|
726
|
+
* @param {string} toAccount account to transfer to
|
|
727
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
728
|
+
* @param {string} [params.type] exchange specific transfer type
|
|
729
|
+
* @param {string} [params.symbol] the unified symbol, required for isolated margin transfers
|
|
730
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
731
|
+
*/
|
|
111
732
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
733
|
+
/**
|
|
734
|
+
* @method
|
|
735
|
+
* @name binance#fetchTransfers
|
|
736
|
+
* @description fetch a history of internal transfers made on an account
|
|
737
|
+
* @see https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer
|
|
738
|
+
* @param {string} code unified currency code of the currency transferred
|
|
739
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
740
|
+
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
741
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
742
|
+
* @param {int} [params.until] the latest time in ms to fetch transfers for
|
|
743
|
+
* @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)
|
|
744
|
+
* @param {boolean} [params.internal] default false, when true will fetch pay trade history
|
|
745
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
746
|
+
*/
|
|
112
747
|
fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
|
|
748
|
+
/**
|
|
749
|
+
* @method
|
|
750
|
+
* @name binance#fetchDepositAddress
|
|
751
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
752
|
+
* @see https://developers.binance.com/docs/wallet/capital/deposite-address
|
|
753
|
+
* @param {string} code unified currency code
|
|
754
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
755
|
+
* @param {string} [params.network] network for fetch deposit address
|
|
756
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
757
|
+
*/
|
|
113
758
|
fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
|
|
114
759
|
parseDepositAddress(response: any, currency?: Currency): DepositAddress;
|
|
760
|
+
/**
|
|
761
|
+
* @method
|
|
762
|
+
* @name binance#fetchTransactionFees
|
|
763
|
+
* @deprecated
|
|
764
|
+
* @description please use fetchDepositWithdrawFees instead
|
|
765
|
+
* @see https://developers.binance.com/docs/wallet/capital/all-coins-info
|
|
766
|
+
* @param {string[]|undefined} codes not used by binance fetchTransactionFees ()
|
|
767
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
768
|
+
* @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
769
|
+
*/
|
|
115
770
|
fetchTransactionFees(codes?: Strings, params?: {}): Promise<{
|
|
116
771
|
withdraw: Dict;
|
|
117
772
|
deposit: {};
|
|
118
773
|
info: any;
|
|
119
774
|
}>;
|
|
775
|
+
/**
|
|
776
|
+
* @method
|
|
777
|
+
* @name binance#fetchDepositWithdrawFees
|
|
778
|
+
* @description fetch deposit and withdraw fees
|
|
779
|
+
* @see https://developers.binance.com/docs/wallet/capital/all-coins-info
|
|
780
|
+
* @param {string[]|undefined} codes not used by binance fetchDepositWithdrawFees ()
|
|
781
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
782
|
+
* @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
783
|
+
*/
|
|
120
784
|
fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
|
|
121
785
|
parseDepositWithdrawFee(fee: any, currency?: Currency): any;
|
|
786
|
+
/**
|
|
787
|
+
* @method
|
|
788
|
+
* @name binance#withdraw
|
|
789
|
+
* @description make a withdrawal
|
|
790
|
+
* @see https://developers.binance.com/docs/wallet/capital/withdraw
|
|
791
|
+
* @param {string} code unified currency code
|
|
792
|
+
* @param {float} amount the amount to withdraw
|
|
793
|
+
* @param {string} address the address to withdraw to
|
|
794
|
+
* @param {string} tag
|
|
795
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
796
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
797
|
+
*/
|
|
122
798
|
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
123
799
|
parseTradingFee(fee: Dict, market?: Market): TradingFeeInterface;
|
|
800
|
+
/**
|
|
801
|
+
* @method
|
|
802
|
+
* @name binance#fetchTradingFee
|
|
803
|
+
* @description fetch the trading fees for a market
|
|
804
|
+
* @see https://developers.binance.com/docs/wallet/asset/trade-fee
|
|
805
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate
|
|
806
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/User-Commission-Rate
|
|
807
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-UM
|
|
808
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-CM
|
|
809
|
+
* @param {string} symbol unified market symbol
|
|
810
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
811
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch trading fees in a portfolio margin account
|
|
812
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
813
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
814
|
+
*/
|
|
124
815
|
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
816
|
+
/**
|
|
817
|
+
* @method
|
|
818
|
+
* @name binance#fetchTradingFees
|
|
819
|
+
* @description fetch the trading fees for multiple markets
|
|
820
|
+
* @see https://developers.binance.com/docs/wallet/asset/trade-fee
|
|
821
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
822
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
823
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Config
|
|
824
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
825
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
826
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
827
|
+
*/
|
|
125
828
|
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
829
|
+
/**
|
|
830
|
+
* @method
|
|
831
|
+
* @name binance#futuresTransfer
|
|
832
|
+
* @ignore
|
|
833
|
+
* @description transfer between futures account
|
|
834
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/New-Future-Account-Transfer
|
|
835
|
+
* @param {string} code unified currency code
|
|
836
|
+
* @param {float} amount the amount to transfer
|
|
837
|
+
* @param {string} type 1 - transfer from spot account to USDT-Ⓜ futures account, 2 - transfer from USDT-Ⓜ futures account to spot account, 3 - transfer from spot account to COIN-Ⓜ futures account, 4 - transfer from COIN-Ⓜ futures account to spot account
|
|
838
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
839
|
+
* @param {float} params.recvWindow
|
|
840
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=futures-transfer-structure}
|
|
841
|
+
*/
|
|
126
842
|
futuresTransfer(code: string, amount: any, type: any, params?: {}): Promise<TransferEntry>;
|
|
843
|
+
/**
|
|
844
|
+
* @method
|
|
845
|
+
* @name binance#fetchFundingRate
|
|
846
|
+
* @description fetch the current funding rate
|
|
847
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price
|
|
848
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-and-Mark-Price
|
|
849
|
+
* @param {string} symbol unified market symbol
|
|
850
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
851
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
852
|
+
*/
|
|
127
853
|
fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
|
|
854
|
+
/**
|
|
855
|
+
* @method
|
|
856
|
+
* @name binance#fetchFundingRateHistory
|
|
857
|
+
* @description fetches historical funding rate prices
|
|
858
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History
|
|
859
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Get-Funding-Rate-History-of-Perpetual-Futures
|
|
860
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
861
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
862
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
863
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
864
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
865
|
+
* @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)
|
|
866
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
867
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
868
|
+
*/
|
|
128
869
|
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
|
|
870
|
+
/**
|
|
871
|
+
* @method
|
|
872
|
+
* @name binance#fetchFundingRates
|
|
873
|
+
* @description fetch the funding rate for multiple markets
|
|
874
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price
|
|
875
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Index-Price-and-Mark-Price
|
|
876
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
877
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
878
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
879
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
880
|
+
*/
|
|
129
881
|
fetchFundingRates(symbols?: Strings, params?: {}): Promise<FundingRates>;
|
|
130
882
|
parseFundingRate(contract: any, market?: Market): FundingRate;
|
|
131
883
|
parseAccountPositions(account: any, filterClosed?: boolean): any[];
|
|
@@ -183,21 +935,197 @@ export default class binance extends Exchange {
|
|
|
183
935
|
takeProfitPrice: any;
|
|
184
936
|
};
|
|
185
937
|
loadLeverageBrackets(reload?: boolean, params?: {}): Promise<any>;
|
|
938
|
+
/**
|
|
939
|
+
* @method
|
|
940
|
+
* @name binance#fetchLeverageTiers
|
|
941
|
+
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
942
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets
|
|
943
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Notional-Bracket-for-Symbol
|
|
944
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/UM-Notional-and-Leverage-Brackets
|
|
945
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/CM-Notional-and-Leverage-Brackets
|
|
946
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
947
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
948
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the leverage tiers for a portfolio margin account
|
|
949
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
950
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
951
|
+
*/
|
|
186
952
|
fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<LeverageTiers>;
|
|
187
953
|
parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
|
|
954
|
+
/**
|
|
955
|
+
* @method
|
|
956
|
+
* @name binance#fetchPosition
|
|
957
|
+
* @description fetch data on an open position
|
|
958
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
|
959
|
+
* @param {string} symbol unified market symbol of the market the position is held in
|
|
960
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
961
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
962
|
+
*/
|
|
188
963
|
fetchPosition(symbol: string, params?: {}): Promise<import("./base/types.js").Position>;
|
|
964
|
+
/**
|
|
965
|
+
* @method
|
|
966
|
+
* @name binance#fetchOptionPositions
|
|
967
|
+
* @description fetch data on open options positions
|
|
968
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
|
969
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
970
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
971
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
972
|
+
*/
|
|
189
973
|
fetchOptionPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
190
974
|
parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
|
|
975
|
+
/**
|
|
976
|
+
* @method
|
|
977
|
+
* @name binance#fetchPositions
|
|
978
|
+
* @description fetch all open positions
|
|
979
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
980
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
981
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
|
982
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
|
983
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information
|
|
984
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
985
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
986
|
+
* @param {object} [params.params] extra parameters specific to the exchange API endpoint
|
|
987
|
+
* @param {string} [params.method] method name to call, "positionRisk", "account" or "option", default is "positionRisk"
|
|
988
|
+
* @param {bool} [params.useV2] set to true if you want to use the obsolete endpoint, where some more additional fields were provided
|
|
989
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
990
|
+
*/
|
|
191
991
|
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
992
|
+
/**
|
|
993
|
+
* @method
|
|
994
|
+
* @name binance#fetchAccountPositions
|
|
995
|
+
* @ignore
|
|
996
|
+
* @description fetch account positions
|
|
997
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
998
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
999
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
|
1000
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
|
1001
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V3
|
|
1002
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
1003
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1004
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch positions in a portfolio margin account
|
|
1005
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1006
|
+
* @param {boolean} [params.filterClosed] set to true if you would like to filter out closed positions, default is false
|
|
1007
|
+
* @param {boolean} [params.useV2] set to true if you want to use obsolete endpoint, where some more additional fields were provided
|
|
1008
|
+
* @returns {object} data on account positions
|
|
1009
|
+
*/
|
|
192
1010
|
fetchAccountPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
1011
|
+
/**
|
|
1012
|
+
* @method
|
|
1013
|
+
* @name binance#fetchPositionsRisk
|
|
1014
|
+
* @ignore
|
|
1015
|
+
* @description fetch positions risk
|
|
1016
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V2
|
|
1017
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Position-Information
|
|
1018
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-UM-Position-Information
|
|
1019
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-CM-Position-Information
|
|
1020
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3
|
|
1021
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
1022
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1023
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch positions for a portfolio margin account
|
|
1024
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1025
|
+
* @param {bool} [params.useV2] set to true if you want to use the obsolete endpoint, where some more additional fields were provided
|
|
1026
|
+
* @returns {object} data on the positions risk
|
|
1027
|
+
*/
|
|
193
1028
|
fetchPositionsRisk(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
1029
|
+
/**
|
|
1030
|
+
* @method
|
|
1031
|
+
* @name binance#fetchFundingHistory
|
|
1032
|
+
* @description fetch the history of funding payments paid and received on this account
|
|
1033
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History
|
|
1034
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Income-History
|
|
1035
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Income-History
|
|
1036
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Income-History
|
|
1037
|
+
* @param {string} symbol unified market symbol
|
|
1038
|
+
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
1039
|
+
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
1040
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1041
|
+
* @param {int} [params.until] timestamp in ms of the latest funding history entry
|
|
1042
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the funding history for a portfolio margin account
|
|
1043
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1044
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
1045
|
+
*/
|
|
194
1046
|
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingHistory[]>;
|
|
1047
|
+
/**
|
|
1048
|
+
* @method
|
|
1049
|
+
* @name binance#setLeverage
|
|
1050
|
+
* @description set the level of leverage for a market
|
|
1051
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage
|
|
1052
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Initial-Leverage
|
|
1053
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-UM-Initial-Leverage
|
|
1054
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-CM-Initial-Leverage
|
|
1055
|
+
* @param {float} leverage the rate of leverage
|
|
1056
|
+
* @param {string} symbol unified market symbol
|
|
1057
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1058
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to set the leverage for a trading pair in a portfolio margin account
|
|
1059
|
+
* @returns {object} response from the exchange
|
|
1060
|
+
*/
|
|
195
1061
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
1062
|
+
/**
|
|
1063
|
+
* @method
|
|
1064
|
+
* @name binance#setMarginMode
|
|
1065
|
+
* @description set margin mode to 'cross' or 'isolated'
|
|
1066
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type
|
|
1067
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Margin-Type
|
|
1068
|
+
* @param {string} marginMode 'cross' or 'isolated'
|
|
1069
|
+
* @param {string} symbol unified market symbol
|
|
1070
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1071
|
+
* @returns {object} response from the exchange
|
|
1072
|
+
*/
|
|
196
1073
|
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
|
|
1074
|
+
/**
|
|
1075
|
+
* @method
|
|
1076
|
+
* @name binance#setPositionMode
|
|
1077
|
+
* @description set hedged to true or false for a market
|
|
1078
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode
|
|
1079
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Change-Position-Mode
|
|
1080
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Current-Position-Mode
|
|
1081
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Current-Position-Mode
|
|
1082
|
+
* @param {bool} hedged set to true to use dualSidePosition
|
|
1083
|
+
* @param {string} symbol not used by binance setPositionMode ()
|
|
1084
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1085
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to set the position mode for a portfolio margin account
|
|
1086
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1087
|
+
* @returns {object} response from the exchange
|
|
1088
|
+
*/
|
|
197
1089
|
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
|
|
1090
|
+
/**
|
|
1091
|
+
* @method
|
|
1092
|
+
* @name binance#fetchLeverages
|
|
1093
|
+
* @description fetch the set leverage for all markets
|
|
1094
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
1095
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
1096
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Account-Detail
|
|
1097
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Account-Detail
|
|
1098
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config
|
|
1099
|
+
* @param {string[]} [symbols] a list of unified market symbols
|
|
1100
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1101
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1102
|
+
* @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
1103
|
+
*/
|
|
198
1104
|
fetchLeverages(symbols?: Strings, params?: {}): Promise<Leverages>;
|
|
199
1105
|
parseLeverage(leverage: Dict, market?: Market): Leverage;
|
|
1106
|
+
/**
|
|
1107
|
+
* @method
|
|
1108
|
+
* @name binance#fetchSettlementHistory
|
|
1109
|
+
* @description fetches historical settlement records
|
|
1110
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Historical-Exercise-Records
|
|
1111
|
+
* @param {string} symbol unified market symbol of the settlement history
|
|
1112
|
+
* @param {int} [since] timestamp in ms
|
|
1113
|
+
* @param {int} [limit] number of records, default 100, max 100
|
|
1114
|
+
* @param {object} [params] exchange specific params
|
|
1115
|
+
* @returns {object[]} a list of [settlement history objects]{@link https://docs.ccxt.com/#/?id=settlement-history-structure}
|
|
1116
|
+
*/
|
|
200
1117
|
fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
1118
|
+
/**
|
|
1119
|
+
* @method
|
|
1120
|
+
* @name binance#fetchMySettlementHistory
|
|
1121
|
+
* @description fetches historical settlement records of the user
|
|
1122
|
+
* @see https://developers.binance.com/docs/derivatives/option/trade/User-Exercise-Record
|
|
1123
|
+
* @param {string} symbol unified market symbol of the settlement history
|
|
1124
|
+
* @param {int} [since] timestamp in ms
|
|
1125
|
+
* @param {int} [limit] number of records
|
|
1126
|
+
* @param {object} [params] exchange specific params
|
|
1127
|
+
* @returns {object[]} a list of [settlement history objects]
|
|
1128
|
+
*/
|
|
201
1129
|
fetchMySettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
202
1130
|
parseSettlement(settlement: any, market: any): {
|
|
203
1131
|
info: any;
|
|
@@ -207,7 +1135,36 @@ export default class binance extends Exchange {
|
|
|
207
1135
|
datetime: string;
|
|
208
1136
|
};
|
|
209
1137
|
parseSettlements(settlements: any, market: any): any[];
|
|
1138
|
+
/**
|
|
1139
|
+
* @method
|
|
1140
|
+
* @name binance#fetchLedgerEntry
|
|
1141
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1142
|
+
* @see https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow
|
|
1143
|
+
* @param {string} id the identification number of the ledger entry
|
|
1144
|
+
* @param {string} code unified currency code
|
|
1145
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1146
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1147
|
+
*/
|
|
210
1148
|
fetchLedgerEntry(id: string, code?: Str, params?: {}): Promise<LedgerEntry>;
|
|
1149
|
+
/**
|
|
1150
|
+
* @method
|
|
1151
|
+
* @name binance#fetchLedger
|
|
1152
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1153
|
+
* @see https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow
|
|
1154
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History
|
|
1155
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Income-History
|
|
1156
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Income-History
|
|
1157
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Income-History
|
|
1158
|
+
* @param {string} [code] unified currency code
|
|
1159
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
1160
|
+
* @param {int} [limit] max number of ledger entries to return
|
|
1161
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1162
|
+
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
1163
|
+
* @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)
|
|
1164
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the ledger for a portfolio margin account
|
|
1165
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1166
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1167
|
+
*/
|
|
211
1168
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
212
1169
|
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
213
1170
|
parseLedgerEntryType(type: any): string;
|
|
@@ -223,11 +1180,77 @@ export default class binance extends Exchange {
|
|
|
223
1180
|
request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
|
|
224
1181
|
modifyMarginHelper(symbol: string, amount: any, addOrReduce: any, params?: {}): Promise<any>;
|
|
225
1182
|
parseMarginModification(data: Dict, market?: Market): MarginModification;
|
|
1183
|
+
/**
|
|
1184
|
+
* @method
|
|
1185
|
+
* @name binance#reduceMargin
|
|
1186
|
+
* @description remove margin from a position
|
|
1187
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin
|
|
1188
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Isolated-Position-Margin
|
|
1189
|
+
* @param {string} symbol unified market symbol
|
|
1190
|
+
* @param {float} amount the amount of margin to remove
|
|
1191
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1192
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
1193
|
+
*/
|
|
226
1194
|
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
1195
|
+
/**
|
|
1196
|
+
* @method
|
|
1197
|
+
* @name binance#addMargin
|
|
1198
|
+
* @description add margin
|
|
1199
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin
|
|
1200
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Isolated-Position-Margin
|
|
1201
|
+
* @param {string} symbol unified market symbol
|
|
1202
|
+
* @param {float} amount amount of margin to add
|
|
1203
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1204
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
1205
|
+
*/
|
|
227
1206
|
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
1207
|
+
/**
|
|
1208
|
+
* @method
|
|
1209
|
+
* @name binance#fetchCrossBorrowRate
|
|
1210
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
1211
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History
|
|
1212
|
+
* @param {string} code unified currency code
|
|
1213
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1214
|
+
* @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
|
|
1215
|
+
*/
|
|
228
1216
|
fetchCrossBorrowRate(code: string, params?: {}): Promise<CrossBorrowRate>;
|
|
1217
|
+
/**
|
|
1218
|
+
* @method
|
|
1219
|
+
* @name binance#fetchIsolatedBorrowRate
|
|
1220
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
1221
|
+
* @see https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data
|
|
1222
|
+
* @param {string} symbol unified market symbol
|
|
1223
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1224
|
+
*
|
|
1225
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
1226
|
+
* @param {object} [params.vipLevel] user's current specific margin data will be returned if viplevel is omitted
|
|
1227
|
+
* @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
|
|
1228
|
+
*/
|
|
229
1229
|
fetchIsolatedBorrowRate(symbol: string, params?: {}): Promise<IsolatedBorrowRate>;
|
|
1230
|
+
/**
|
|
1231
|
+
* @method
|
|
1232
|
+
* @name binance#fetchIsolatedBorrowRates
|
|
1233
|
+
* @description fetch the borrow interest rates of all currencies
|
|
1234
|
+
* @see https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data
|
|
1235
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1236
|
+
* @param {object} [params.symbol] unified market symbol
|
|
1237
|
+
*
|
|
1238
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
1239
|
+
* @param {object} [params.vipLevel] user's current specific margin data will be returned if viplevel is omitted
|
|
1240
|
+
* @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
|
|
1241
|
+
*/
|
|
230
1242
|
fetchIsolatedBorrowRates(params?: {}): Promise<IsolatedBorrowRates>;
|
|
1243
|
+
/**
|
|
1244
|
+
* @method
|
|
1245
|
+
* @name binance#fetchBorrowRateHistory
|
|
1246
|
+
* @description retrieves a history of a currencies borrow interest rate at specific time slots
|
|
1247
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History
|
|
1248
|
+
* @param {string} code unified currency code
|
|
1249
|
+
* @param {int} [since] timestamp for the earliest borrow rate
|
|
1250
|
+
* @param {int} [limit] the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure} to retrieve
|
|
1251
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1252
|
+
* @returns {object[]} an array of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
|
|
1253
|
+
*/
|
|
231
1254
|
fetchBorrowRateHistory(code: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
232
1255
|
parseBorrowRate(info: any, currency?: Currency): {
|
|
233
1256
|
currency: string;
|
|
@@ -238,6 +1261,16 @@ export default class binance extends Exchange {
|
|
|
238
1261
|
info: any;
|
|
239
1262
|
};
|
|
240
1263
|
parseIsolatedBorrowRate(info: Dict, market?: Market): IsolatedBorrowRate;
|
|
1264
|
+
/**
|
|
1265
|
+
* @method
|
|
1266
|
+
* @name binance#createGiftCode
|
|
1267
|
+
* @description create gift code
|
|
1268
|
+
* @see https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card
|
|
1269
|
+
* @param {string} code gift code
|
|
1270
|
+
* @param {float} amount amount of currency for the gift
|
|
1271
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1272
|
+
* @returns {object} The gift code id, code, currency and amount
|
|
1273
|
+
*/
|
|
241
1274
|
createGiftCode(code: string, amount: any, params?: {}): Promise<{
|
|
242
1275
|
info: any;
|
|
243
1276
|
id: string;
|
|
@@ -245,10 +1278,57 @@ export default class binance extends Exchange {
|
|
|
245
1278
|
currency: string;
|
|
246
1279
|
amount: any;
|
|
247
1280
|
}>;
|
|
1281
|
+
/**
|
|
1282
|
+
* @method
|
|
1283
|
+
* @name binance#redeemGiftCode
|
|
1284
|
+
* @description redeem gift code
|
|
1285
|
+
* @see https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card
|
|
1286
|
+
* @param {string} giftcardCode
|
|
1287
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1288
|
+
* @returns {object} response from the exchange
|
|
1289
|
+
*/
|
|
248
1290
|
redeemGiftCode(giftcardCode: any, params?: {}): Promise<any>;
|
|
1291
|
+
/**
|
|
1292
|
+
* @method
|
|
1293
|
+
* @name binance#verifyGiftCode
|
|
1294
|
+
* @description verify gift code
|
|
1295
|
+
* @see https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number
|
|
1296
|
+
* @param {string} id reference number id
|
|
1297
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1298
|
+
* @returns {object} response from the exchange
|
|
1299
|
+
*/
|
|
249
1300
|
verifyGiftCode(id: string, params?: {}): Promise<any>;
|
|
1301
|
+
/**
|
|
1302
|
+
* @method
|
|
1303
|
+
* @name binance#fetchBorrowInterest
|
|
1304
|
+
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
1305
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History
|
|
1306
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Margin-BorrowLoan-Interest-History
|
|
1307
|
+
* @param {string} [code] unified currency code
|
|
1308
|
+
* @param {string} [symbol] unified market symbol when fetch interest in isolated markets
|
|
1309
|
+
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
1310
|
+
* @param {int} [limit] the maximum number of structures to retrieve
|
|
1311
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1312
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the borrow interest in a portfolio margin account
|
|
1313
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
1314
|
+
*/
|
|
250
1315
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<BorrowInterest[]>;
|
|
251
1316
|
parseBorrowInterest(info: Dict, market?: Market): BorrowInterest;
|
|
1317
|
+
/**
|
|
1318
|
+
* @method
|
|
1319
|
+
* @name binance#repayCrossMargin
|
|
1320
|
+
* @description repay borrowed margin and interest
|
|
1321
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay
|
|
1322
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
|
1323
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay-Debt
|
|
1324
|
+
* @param {string} code unified currency code of the currency to repay
|
|
1325
|
+
* @param {float} amount the amount to repay
|
|
1326
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1327
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to repay margin in a portfolio margin account
|
|
1328
|
+
* @param {string} [params.repayCrossMarginMethod] *portfolio margin only* 'papiPostRepayLoan' (default), 'papiPostMarginRepayDebt' (alternative)
|
|
1329
|
+
* @param {string} [params.specifyRepayAssets] *portfolio margin papiPostMarginRepayDebt only* specific asset list to repay debt
|
|
1330
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
1331
|
+
*/
|
|
252
1332
|
repayCrossMargin(code: string, amount: any, params?: {}): Promise<{
|
|
253
1333
|
id: number;
|
|
254
1334
|
currency: string;
|
|
@@ -258,6 +1338,17 @@ export default class binance extends Exchange {
|
|
|
258
1338
|
datetime: string;
|
|
259
1339
|
info: any;
|
|
260
1340
|
}>;
|
|
1341
|
+
/**
|
|
1342
|
+
* @method
|
|
1343
|
+
* @name binance#repayIsolatedMargin
|
|
1344
|
+
* @description repay borrowed margin and interest
|
|
1345
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
|
1346
|
+
* @param {string} symbol unified market symbol, required for isolated margin
|
|
1347
|
+
* @param {string} code unified currency code of the currency to repay
|
|
1348
|
+
* @param {float} amount the amount to repay
|
|
1349
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1350
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
1351
|
+
*/
|
|
261
1352
|
repayIsolatedMargin(symbol: string, code: string, amount: any, params?: {}): Promise<{
|
|
262
1353
|
id: number;
|
|
263
1354
|
currency: string;
|
|
@@ -267,6 +1358,18 @@ export default class binance extends Exchange {
|
|
|
267
1358
|
datetime: string;
|
|
268
1359
|
info: any;
|
|
269
1360
|
}>;
|
|
1361
|
+
/**
|
|
1362
|
+
* @method
|
|
1363
|
+
* @name binance#borrowCrossMargin
|
|
1364
|
+
* @description create a loan to borrow margin
|
|
1365
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
|
1366
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Borrow
|
|
1367
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
1368
|
+
* @param {float} amount the amount to borrow
|
|
1369
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1370
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to borrow margin in a portfolio margin account
|
|
1371
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
1372
|
+
*/
|
|
270
1373
|
borrowCrossMargin(code: string, amount: number, params?: {}): Promise<{
|
|
271
1374
|
id: number;
|
|
272
1375
|
currency: string;
|
|
@@ -276,6 +1379,17 @@ export default class binance extends Exchange {
|
|
|
276
1379
|
datetime: string;
|
|
277
1380
|
info: any;
|
|
278
1381
|
}>;
|
|
1382
|
+
/**
|
|
1383
|
+
* @method
|
|
1384
|
+
* @name binance#borrowIsolatedMargin
|
|
1385
|
+
* @description create a loan to borrow margin
|
|
1386
|
+
* @see https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay
|
|
1387
|
+
* @param {string} symbol unified market symbol, required for isolated margin
|
|
1388
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
1389
|
+
* @param {float} amount the amount to borrow
|
|
1390
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1391
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
1392
|
+
*/
|
|
279
1393
|
borrowIsolatedMargin(symbol: string, code: string, amount: number, params?: {}): Promise<{
|
|
280
1394
|
id: number;
|
|
281
1395
|
currency: string;
|
|
@@ -294,30 +1408,222 @@ export default class binance extends Exchange {
|
|
|
294
1408
|
datetime: string;
|
|
295
1409
|
info: any;
|
|
296
1410
|
};
|
|
1411
|
+
/**
|
|
1412
|
+
* @method
|
|
1413
|
+
* @name binance#fetchOpenInterestHistory
|
|
1414
|
+
* @description Retrieves the open interest history of a currency
|
|
1415
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics
|
|
1416
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Open-Interest-Statistics
|
|
1417
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
1418
|
+
* @param {string} timeframe "5m","15m","30m","1h","2h","4h","6h","12h", or "1d"
|
|
1419
|
+
* @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
|
|
1420
|
+
* @param {int} [limit] default 30, max 500
|
|
1421
|
+
* @param {object} [params] exchange specific parameters
|
|
1422
|
+
* @param {int} [params.until] the time(ms) of the latest record to retrieve as a unix timestamp
|
|
1423
|
+
* @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)
|
|
1424
|
+
* @returns {object} an array of [open interest structure]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
1425
|
+
*/
|
|
297
1426
|
fetchOpenInterestHistory(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OpenInterest[]>;
|
|
1427
|
+
/**
|
|
1428
|
+
* @method
|
|
1429
|
+
* @name binance#fetchOpenInterest
|
|
1430
|
+
* @description retrieves the open interest of a contract trading pair
|
|
1431
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest
|
|
1432
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Open-Interest
|
|
1433
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Open-Interest
|
|
1434
|
+
* @param {string} symbol unified CCXT market symbol
|
|
1435
|
+
* @param {object} [params] exchange specific parameters
|
|
1436
|
+
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
1437
|
+
*/
|
|
298
1438
|
fetchOpenInterest(symbol: string, params?: {}): Promise<OpenInterest>;
|
|
299
1439
|
parseOpenInterest(interest: any, market?: Market): OpenInterest;
|
|
1440
|
+
/**
|
|
1441
|
+
* @method
|
|
1442
|
+
* @name binance#fetchMyLiquidations
|
|
1443
|
+
* @description retrieves the users liquidated positions
|
|
1444
|
+
* @see https://developers.binance.com/docs/margin_trading/trade/Get-Force-Liquidation-Record
|
|
1445
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders
|
|
1446
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Users-Force-Orders
|
|
1447
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-UM-Force-Orders
|
|
1448
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-CM-Force-Orders
|
|
1449
|
+
* @param {string} [symbol] unified CCXT market symbol
|
|
1450
|
+
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
1451
|
+
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
1452
|
+
* @param {object} [params] exchange specific parameters for the binance api endpoint
|
|
1453
|
+
* @param {int} [params.until] timestamp in ms of the latest liquidation
|
|
1454
|
+
* @param {boolean} [params.paginate] *spot only* 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)
|
|
1455
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch liquidations in a portfolio margin account
|
|
1456
|
+
* @param {string} [params.type] "spot"
|
|
1457
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1458
|
+
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
1459
|
+
*/
|
|
300
1460
|
fetchMyLiquidations(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Liquidation[]>;
|
|
301
1461
|
parseLiquidation(liquidation: any, market?: Market): Liquidation;
|
|
1462
|
+
/**
|
|
1463
|
+
* @method
|
|
1464
|
+
* @name binance#fetchGreeks
|
|
1465
|
+
* @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
|
1466
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/Option-Mark-Price
|
|
1467
|
+
* @param {string} symbol unified symbol of the market to fetch greeks for
|
|
1468
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1469
|
+
* @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
|
|
1470
|
+
*/
|
|
302
1471
|
fetchGreeks(symbol: string, params?: {}): Promise<Greeks>;
|
|
303
1472
|
parseGreeks(greeks: Dict, market?: Market): Greeks;
|
|
304
1473
|
fetchTradingLimits(symbols?: Strings, params?: {}): Promise<Dict>;
|
|
1474
|
+
/**
|
|
1475
|
+
* @method
|
|
1476
|
+
* @name binance#fetchPositionMode
|
|
1477
|
+
* @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
|
|
1478
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode
|
|
1479
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Get-Current-Position-Mode
|
|
1480
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1481
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1482
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1483
|
+
* @returns {object} an object detailing whether the market is in hedged or one-way mode
|
|
1484
|
+
*/
|
|
305
1485
|
fetchPositionMode(symbol?: Str, params?: {}): Promise<{
|
|
306
1486
|
info: any;
|
|
307
1487
|
hedged: boolean;
|
|
308
1488
|
}>;
|
|
1489
|
+
/**
|
|
1490
|
+
* @method
|
|
1491
|
+
* @name binance#fetchMarginModes
|
|
1492
|
+
* @description fetches margin modes ("isolated" or "cross") that the market for the symbol in in, with symbol=undefined all markets for a subType (linear/inverse) are returned
|
|
1493
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
1494
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2
|
|
1495
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config
|
|
1496
|
+
* @param {string[]} symbols unified market symbols
|
|
1497
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1498
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1499
|
+
* @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
1500
|
+
*/
|
|
309
1501
|
fetchMarginModes(symbols?: Strings, params?: {}): Promise<MarginModes>;
|
|
1502
|
+
/**
|
|
1503
|
+
* @method
|
|
1504
|
+
* @name binance#fetchMarginMode
|
|
1505
|
+
* @description fetches the margin mode of a specific symbol
|
|
1506
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config
|
|
1507
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/Account-Information
|
|
1508
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1509
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1510
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1511
|
+
* @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
1512
|
+
*/
|
|
1513
|
+
fetchMarginMode(symbol: string, params?: {}): Promise<MarginMode>;
|
|
310
1514
|
parseMarginMode(marginMode: Dict, market?: any): MarginMode;
|
|
1515
|
+
/**
|
|
1516
|
+
* @method
|
|
1517
|
+
* @name binance#fetchOption
|
|
1518
|
+
* @description fetches option data that is commonly found in an option chain
|
|
1519
|
+
* @see https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics
|
|
1520
|
+
* @param {string} symbol unified market symbol
|
|
1521
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1522
|
+
* @returns {object} an [option chain structure]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
|
|
1523
|
+
*/
|
|
311
1524
|
fetchOption(symbol: string, params?: {}): Promise<Option>;
|
|
312
1525
|
parseOption(chain: Dict, currency?: Currency, market?: Market): Option;
|
|
1526
|
+
/**
|
|
1527
|
+
* @method
|
|
1528
|
+
* @name binance#fetchMarginAdjustmentHistory
|
|
1529
|
+
* @description fetches the history of margin added or reduced from contract isolated positions
|
|
1530
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History
|
|
1531
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Get-Position-Margin-Change-History
|
|
1532
|
+
* @param {string} symbol unified market symbol
|
|
1533
|
+
* @param {string} [type] "add" or "reduce"
|
|
1534
|
+
* @param {int} [since] timestamp in ms of the earliest change to fetch
|
|
1535
|
+
* @param {int} [limit] the maximum amount of changes to fetch
|
|
1536
|
+
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
1537
|
+
* @param {int} [params.until] timestamp in ms of the latest change to fetch
|
|
1538
|
+
* @returns {object[]} a list of [margin structures]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
1539
|
+
*/
|
|
313
1540
|
fetchMarginAdjustmentHistory(symbol?: Str, type?: Str, since?: Num, limit?: Num, params?: {}): Promise<MarginModification[]>;
|
|
1541
|
+
/**
|
|
1542
|
+
* @method
|
|
1543
|
+
* @name binance#fetchConvertCurrencies
|
|
1544
|
+
* @description fetches all available currencies that can be converted
|
|
1545
|
+
* @see https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset
|
|
1546
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1547
|
+
* @returns {object} an associative dictionary of currencies
|
|
1548
|
+
*/
|
|
314
1549
|
fetchConvertCurrencies(params?: {}): Promise<Currencies>;
|
|
1550
|
+
/**
|
|
1551
|
+
* @method
|
|
1552
|
+
* @name binance#fetchConvertQuote
|
|
1553
|
+
* @description fetch a quote for converting from one currency to another
|
|
1554
|
+
* @see https://developers.binance.com/docs/convert/trade/Send-quote-request
|
|
1555
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
1556
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
1557
|
+
* @param {float} amount how much you want to trade in units of the from currency
|
|
1558
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1559
|
+
* @param {string} [params.walletType] either 'SPOT' or 'FUNDING', the default is 'SPOT'
|
|
1560
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
1561
|
+
*/
|
|
315
1562
|
fetchConvertQuote(fromCode: string, toCode: string, amount?: Num, params?: {}): Promise<Conversion>;
|
|
1563
|
+
/**
|
|
1564
|
+
* @method
|
|
1565
|
+
* @name binance#createConvertTrade
|
|
1566
|
+
* @description convert from one currency to another
|
|
1567
|
+
* @see https://developers.binance.com/docs/convert/trade/Accept-Quote
|
|
1568
|
+
* @param {string} id the id of the trade that you want to make
|
|
1569
|
+
* @param {string} fromCode the currency that you want to sell and convert from
|
|
1570
|
+
* @param {string} toCode the currency that you want to buy and convert into
|
|
1571
|
+
* @param {float} [amount] how much you want to trade in units of the from currency
|
|
1572
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1573
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
1574
|
+
*/
|
|
316
1575
|
createConvertTrade(id: string, fromCode: string, toCode: string, amount?: Num, params?: {}): Promise<Conversion>;
|
|
1576
|
+
/**
|
|
1577
|
+
* @method
|
|
1578
|
+
* @name binance#fetchConvertTrade
|
|
1579
|
+
* @description fetch the data for a conversion trade
|
|
1580
|
+
* @see https://developers.binance.com/docs/convert/trade/Order-Status
|
|
1581
|
+
* @param {string} id the id of the trade that you want to fetch
|
|
1582
|
+
* @param {string} [code] the unified currency code of the conversion trade
|
|
1583
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1584
|
+
* @returns {object} a [conversion structure]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
1585
|
+
*/
|
|
317
1586
|
fetchConvertTrade(id: string, code?: Str, params?: {}): Promise<Conversion>;
|
|
1587
|
+
/**
|
|
1588
|
+
* @method
|
|
1589
|
+
* @name binance#fetchConvertTradeHistory
|
|
1590
|
+
* @description fetch the users history of conversion trades
|
|
1591
|
+
* @see https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History
|
|
1592
|
+
* @param {string} [code] the unified currency code
|
|
1593
|
+
* @param {int} [since] the earliest time in ms to fetch conversions for
|
|
1594
|
+
* @param {int} [limit] the maximum number of conversion structures to retrieve
|
|
1595
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1596
|
+
* @param {int} [params.until] timestamp in ms of the latest conversion to fetch
|
|
1597
|
+
* @returns {object[]} a list of [conversion structures]{@link https://docs.ccxt.com/#/?id=conversion-structure}
|
|
1598
|
+
*/
|
|
318
1599
|
fetchConvertTradeHistory(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Conversion[]>;
|
|
319
1600
|
parseConversion(conversion: Dict, fromCurrency?: Currency, toCurrency?: Currency): Conversion;
|
|
1601
|
+
/**
|
|
1602
|
+
* @method
|
|
1603
|
+
* @name binance#fetchFundingIntervals
|
|
1604
|
+
* @description fetch the funding rate interval for multiple markets
|
|
1605
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Info
|
|
1606
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Get-Funding-Info
|
|
1607
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
1608
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1609
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
1610
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
1611
|
+
*/
|
|
320
1612
|
fetchFundingIntervals(symbols?: Strings, params?: {}): Promise<FundingRates>;
|
|
1613
|
+
/**
|
|
1614
|
+
* @method
|
|
1615
|
+
* @name binance#fetchLongShortRatioHistory
|
|
1616
|
+
* @description fetches the long short ratio history for a unified market symbol
|
|
1617
|
+
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio
|
|
1618
|
+
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/Long-Short-Ratio
|
|
1619
|
+
* @param {string} symbol unified symbol of the market to fetch the long short ratio for
|
|
1620
|
+
* @param {string} [timeframe] the period for the ratio, default is 24 hours
|
|
1621
|
+
* @param {int} [since] the earliest time in ms to fetch ratios for
|
|
1622
|
+
* @param {int} [limit] the maximum number of long short ratio structures to retrieve
|
|
1623
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1624
|
+
* @param {int} [params.until] timestamp in ms of the latest ratio to fetch
|
|
1625
|
+
* @returns {object[]} an array of [long short ratio structures]{@link https://docs.ccxt.com/#/?id=long-short-ratio-structure}
|
|
1626
|
+
*/
|
|
321
1627
|
fetchLongShortRatioHistory(symbol?: Str, timeframe?: Str, since?: Int, limit?: Int, params?: {}): Promise<LongShortRatio[]>;
|
|
322
1628
|
parseLongShortRatio(info: Dict, market?: Market): LongShortRatio;
|
|
323
1629
|
}
|