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
|
@@ -490,15 +490,15 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
490
490
|
// Prices submit with a precision larger than 5 will be cut by the API.
|
|
491
491
|
return this.decimalToPrecision(price, number.TRUNCATE, 8, number.DECIMAL_PLACES);
|
|
492
492
|
}
|
|
493
|
+
/**
|
|
494
|
+
* @method
|
|
495
|
+
* @name bitfinex2#fetchStatus
|
|
496
|
+
* @description the latest known information on the availability of the exchange API
|
|
497
|
+
* @see https://docs.bitfinex.com/reference/rest-public-platform-status
|
|
498
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
499
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
500
|
+
*/
|
|
493
501
|
async fetchStatus(params = {}) {
|
|
494
|
-
/**
|
|
495
|
-
* @method
|
|
496
|
-
* @name bitfinex2#fetchStatus
|
|
497
|
-
* @description the latest known information on the availability of the exchange API
|
|
498
|
-
* @see https://docs.bitfinex.com/reference/rest-public-platform-status
|
|
499
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
500
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
501
|
-
*/
|
|
502
502
|
//
|
|
503
503
|
// [1] // operative
|
|
504
504
|
// [0] // maintenance
|
|
@@ -513,15 +513,15 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
513
513
|
'info': response,
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* @method
|
|
518
|
+
* @name bitfinex2#fetchMarkets
|
|
519
|
+
* @description retrieves data on all markets for bitfinex2
|
|
520
|
+
* @see https://docs.bitfinex.com/reference/rest-public-conf
|
|
521
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
522
|
+
* @returns {object[]} an array of objects representing market data
|
|
523
|
+
*/
|
|
516
524
|
async fetchMarkets(params = {}) {
|
|
517
|
-
/**
|
|
518
|
-
* @method
|
|
519
|
-
* @name bitfinex2#fetchMarkets
|
|
520
|
-
* @description retrieves data on all markets for bitfinex2
|
|
521
|
-
* @see https://docs.bitfinex.com/reference/rest-public-conf
|
|
522
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
523
|
-
* @returns {object[]} an array of objects representing market data
|
|
524
|
-
*/
|
|
525
525
|
const spotMarketsInfoPromise = this.publicGetConfPubInfoPair(params);
|
|
526
526
|
const futuresMarketsInfoPromise = this.publicGetConfPubInfoPairFutures(params);
|
|
527
527
|
const marginIdsPromise = this.publicGetConfPubListPairMargin(params);
|
|
@@ -644,15 +644,15 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
644
644
|
}
|
|
645
645
|
return result;
|
|
646
646
|
}
|
|
647
|
+
/**
|
|
648
|
+
* @method
|
|
649
|
+
* @name bitfinex2#fetchCurrencies
|
|
650
|
+
* @description fetches all available currencies on an exchange
|
|
651
|
+
* @see https://docs.bitfinex.com/reference/rest-public-conf
|
|
652
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
653
|
+
* @returns {object} an associative dictionary of currencies
|
|
654
|
+
*/
|
|
647
655
|
async fetchCurrencies(params = {}) {
|
|
648
|
-
/**
|
|
649
|
-
* @method
|
|
650
|
-
* @name bitfinex2#fetchCurrencies
|
|
651
|
-
* @description fetches all available currencies on an exchange
|
|
652
|
-
* @see https://docs.bitfinex.com/reference/rest-public-conf
|
|
653
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
654
|
-
* @returns {object} an associative dictionary of currencies
|
|
655
|
-
*/
|
|
656
656
|
const labels = [
|
|
657
657
|
'pub:list:currency',
|
|
658
658
|
'pub:map:currency:sym',
|
|
@@ -835,15 +835,15 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
835
835
|
}
|
|
836
836
|
return result;
|
|
837
837
|
}
|
|
838
|
+
/**
|
|
839
|
+
* @method
|
|
840
|
+
* @name bitfinex2#fetchBalance
|
|
841
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
842
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-wallets
|
|
843
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
844
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
845
|
+
*/
|
|
838
846
|
async fetchBalance(params = {}) {
|
|
839
|
-
/**
|
|
840
|
-
* @method
|
|
841
|
-
* @name bitfinex2#fetchBalance
|
|
842
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
843
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-wallets
|
|
844
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
845
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
846
|
-
*/
|
|
847
847
|
// this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances)
|
|
848
848
|
// there is a difference between this and the v1 api, namely trading wallet is called margin in v2
|
|
849
849
|
await this.loadMarkets();
|
|
@@ -880,19 +880,19 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
880
880
|
}
|
|
881
881
|
return this.safeBalance(result);
|
|
882
882
|
}
|
|
883
|
+
/**
|
|
884
|
+
* @method
|
|
885
|
+
* @name bitfinex2#transfer
|
|
886
|
+
* @description transfer currency internally between wallets on the same account
|
|
887
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-transfer
|
|
888
|
+
* @param {string} code unified currency code
|
|
889
|
+
* @param {float} amount amount to transfer
|
|
890
|
+
* @param {string} fromAccount account to transfer from
|
|
891
|
+
* @param {string} toAccount account to transfer to
|
|
892
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
893
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
894
|
+
*/
|
|
883
895
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
884
|
-
/**
|
|
885
|
-
* @method
|
|
886
|
-
* @name bitfinex2#transfer
|
|
887
|
-
* @description transfer currency internally between wallets on the same account
|
|
888
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-transfer
|
|
889
|
-
* @param {string} code unified currency code
|
|
890
|
-
* @param {float} amount amount to transfer
|
|
891
|
-
* @param {string} fromAccount account to transfer from
|
|
892
|
-
* @param {string} toAccount account to transfer to
|
|
893
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
894
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
895
|
-
*/
|
|
896
896
|
// transferring between derivatives wallet and regular wallet is not documented in their API
|
|
897
897
|
// however we support it in CCXT (from just looking at web inspector)
|
|
898
898
|
await this.loadMarkets();
|
|
@@ -1027,17 +1027,17 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
return currencyId;
|
|
1029
1029
|
}
|
|
1030
|
+
/**
|
|
1031
|
+
* @method
|
|
1032
|
+
* @name bitfinex2#fetchOrderBook
|
|
1033
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1034
|
+
* @see https://docs.bitfinex.com/reference/rest-public-book
|
|
1035
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1036
|
+
* @param {int} [limit] the maximum amount of order book entries to return, bitfinex only allows 1, 25, or 100
|
|
1037
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1038
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1039
|
+
*/
|
|
1030
1040
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1031
|
-
/**
|
|
1032
|
-
* @method
|
|
1033
|
-
* @name bitfinex2#fetchOrderBook
|
|
1034
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1035
|
-
* @see https://docs.bitfinex.com/reference/rest-public-book
|
|
1036
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1037
|
-
* @param {int} [limit] the maximum amount of order book entries to return, bitfinex only allows 1, 25, or 100
|
|
1038
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1039
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1040
|
-
*/
|
|
1041
1041
|
await this.loadMarkets();
|
|
1042
1042
|
const precision = this.safeValue(this.options, 'precision', 'R0');
|
|
1043
1043
|
const market = this.market(symbol);
|
|
@@ -1145,16 +1145,16 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1145
1145
|
'info': result,
|
|
1146
1146
|
}, market);
|
|
1147
1147
|
}
|
|
1148
|
+
/**
|
|
1149
|
+
* @method
|
|
1150
|
+
* @name bitfinex2#fetchTickers
|
|
1151
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1152
|
+
* @see https://docs.bitfinex.com/reference/rest-public-tickers
|
|
1153
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1154
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1155
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1156
|
+
*/
|
|
1148
1157
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1149
|
-
/**
|
|
1150
|
-
* @method
|
|
1151
|
-
* @name bitfinex2#fetchTickers
|
|
1152
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1153
|
-
* @see https://docs.bitfinex.com/reference/rest-public-tickers
|
|
1154
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1155
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1156
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1157
|
-
*/
|
|
1158
1158
|
await this.loadMarkets();
|
|
1159
1159
|
symbols = this.marketSymbols(symbols);
|
|
1160
1160
|
const request = {};
|
|
@@ -1215,16 +1215,16 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
1217
1217
|
}
|
|
1218
|
+
/**
|
|
1219
|
+
* @method
|
|
1220
|
+
* @name bitfinex2#fetchTicker
|
|
1221
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1222
|
+
* @see https://docs.bitfinex.com/reference/rest-public-ticker
|
|
1223
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1224
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1225
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1226
|
+
*/
|
|
1218
1227
|
async fetchTicker(symbol, params = {}) {
|
|
1219
|
-
/**
|
|
1220
|
-
* @method
|
|
1221
|
-
* @name bitfinex2#fetchTicker
|
|
1222
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1223
|
-
* @see https://docs.bitfinex.com/reference/rest-public-ticker
|
|
1224
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1225
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1226
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1227
|
-
*/
|
|
1228
1228
|
await this.loadMarkets();
|
|
1229
1229
|
const market = this.market(symbol);
|
|
1230
1230
|
const request = {
|
|
@@ -1318,20 +1318,20 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1318
1318
|
'info': tradeList,
|
|
1319
1319
|
}, market);
|
|
1320
1320
|
}
|
|
1321
|
+
/**
|
|
1322
|
+
* @method
|
|
1323
|
+
* @name bitfinex2#fetchTrades
|
|
1324
|
+
* @description get the list of most recent trades for a particular symbol
|
|
1325
|
+
* @see https://docs.bitfinex.com/reference/rest-public-trades
|
|
1326
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1327
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1328
|
+
* @param {int} [limit] the maximum amount of trades to fetch, default 120, max 10000
|
|
1329
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1330
|
+
* @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)
|
|
1331
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1332
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1333
|
+
*/
|
|
1321
1334
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1322
|
-
/**
|
|
1323
|
-
* @method
|
|
1324
|
-
* @name bitfinex2#fetchTrades
|
|
1325
|
-
* @description get the list of most recent trades for a particular symbol
|
|
1326
|
-
* @see https://docs.bitfinex.com/reference/rest-public-trades
|
|
1327
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1328
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1329
|
-
* @param {int} [limit] the maximum amount of trades to fetch, default 120, max 10000
|
|
1330
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1331
|
-
* @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)
|
|
1332
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1333
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1334
|
-
*/
|
|
1335
1335
|
await this.loadMarkets();
|
|
1336
1336
|
let paginate = false;
|
|
1337
1337
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchTrades', 'paginate');
|
|
@@ -1370,21 +1370,21 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
return this.parseTrades(tradesList, market, undefined, limit);
|
|
1372
1372
|
}
|
|
1373
|
+
/**
|
|
1374
|
+
* @method
|
|
1375
|
+
* @name bitfinex2#fetchOHLCV
|
|
1376
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1377
|
+
* @see https://docs.bitfinex.com/reference/rest-public-candles
|
|
1378
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1379
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1380
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1381
|
+
* @param {int} [limit] the maximum amount of candles to fetch, default 100 max 10000
|
|
1382
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1383
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1384
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
1385
|
+
* @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)
|
|
1386
|
+
*/
|
|
1373
1387
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = 100, params = {}) {
|
|
1374
|
-
/**
|
|
1375
|
-
* @method
|
|
1376
|
-
* @name bitfinex2#fetchOHLCV
|
|
1377
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1378
|
-
* @see https://docs.bitfinex.com/reference/rest-public-candles
|
|
1379
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1380
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1381
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1382
|
-
* @param {int} [limit] the maximum amount of candles to fetch, default 100 max 10000
|
|
1383
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1384
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1385
|
-
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
1386
|
-
* @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)
|
|
1387
|
-
*/
|
|
1388
1388
|
await this.loadMarkets();
|
|
1389
1389
|
let paginate = false;
|
|
1390
1390
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
|
|
@@ -1641,29 +1641,29 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1641
1641
|
params = this.omit(params, ['triggerPrice', 'stopPrice', 'timeInForce', 'postOnly', 'reduceOnly', 'trailingAmount', 'clientOrderId']);
|
|
1642
1642
|
return this.extend(request, params);
|
|
1643
1643
|
}
|
|
1644
|
+
/**
|
|
1645
|
+
* @method
|
|
1646
|
+
* @name bitfinex2#createOrder
|
|
1647
|
+
* @description create an order on the exchange
|
|
1648
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-submit-order
|
|
1649
|
+
* @param {string} symbol unified CCXT market symbol
|
|
1650
|
+
* @param {string} type 'limit' or 'market'
|
|
1651
|
+
* @param {string} side 'buy' or 'sell'
|
|
1652
|
+
* @param {float} amount the amount of currency to trade
|
|
1653
|
+
* @param {float} [price] price of the order
|
|
1654
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1655
|
+
* @param {float} [params.stopPrice] the price that triggers a trigger order
|
|
1656
|
+
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1657
|
+
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
1658
|
+
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
1659
|
+
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
1660
|
+
* @param {int} [params.lev] leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive.
|
|
1661
|
+
* @param {string} [params.price_aux_limit] order price for stop limit orders
|
|
1662
|
+
* @param {string} [params.price_oco_stop] OCO stop price
|
|
1663
|
+
* @param {string} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
|
|
1664
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1665
|
+
*/
|
|
1644
1666
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1645
|
-
/**
|
|
1646
|
-
* @method
|
|
1647
|
-
* @name bitfinex2#createOrder
|
|
1648
|
-
* @description create an order on the exchange
|
|
1649
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-submit-order
|
|
1650
|
-
* @param {string} symbol unified CCXT market symbol
|
|
1651
|
-
* @param {string} type 'limit' or 'market'
|
|
1652
|
-
* @param {string} side 'buy' or 'sell'
|
|
1653
|
-
* @param {float} amount the amount of currency to trade
|
|
1654
|
-
* @param {float} [price] price of the order
|
|
1655
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1656
|
-
* @param {float} [params.stopPrice] the price that triggers a trigger order
|
|
1657
|
-
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1658
|
-
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
1659
|
-
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
1660
|
-
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
1661
|
-
* @param {int} [params.lev] leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive.
|
|
1662
|
-
* @param {string} [params.price_aux_limit] order price for stop limit orders
|
|
1663
|
-
* @param {string} [params.price_oco_stop] OCO stop price
|
|
1664
|
-
* @param {string} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
|
|
1665
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1666
|
-
*/
|
|
1667
1667
|
await this.loadMarkets();
|
|
1668
1668
|
const market = this.market(symbol);
|
|
1669
1669
|
const request = this.createOrderRequest(symbol, type, side, amount, price, params);
|
|
@@ -1725,16 +1725,16 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1725
1725
|
const order = this.safeList(orders, 0);
|
|
1726
1726
|
return this.parseOrder(this.extend({ 'result': order }), market);
|
|
1727
1727
|
}
|
|
1728
|
+
/**
|
|
1729
|
+
* @method
|
|
1730
|
+
* @name bitfinex2#createOrders
|
|
1731
|
+
* @description create a list of trade orders
|
|
1732
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-order-multi
|
|
1733
|
+
* @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
|
|
1734
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1735
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1736
|
+
*/
|
|
1728
1737
|
async createOrders(orders, params = {}) {
|
|
1729
|
-
/**
|
|
1730
|
-
* @method
|
|
1731
|
-
* @name bitfinex2#createOrders
|
|
1732
|
-
* @description create a list of trade orders
|
|
1733
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-order-multi
|
|
1734
|
-
* @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
|
|
1735
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1736
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1737
|
-
*/
|
|
1738
1738
|
await this.loadMarkets();
|
|
1739
1739
|
const ordersRequests = [];
|
|
1740
1740
|
for (let i = 0; i < orders.length; i++) {
|
|
@@ -1786,16 +1786,16 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
return this.parseOrders(results);
|
|
1788
1788
|
}
|
|
1789
|
+
/**
|
|
1790
|
+
* @method
|
|
1791
|
+
* @name bitfinex2#cancelAllOrders
|
|
1792
|
+
* @description cancel all open orders
|
|
1793
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
|
1794
|
+
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1795
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1796
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1797
|
+
*/
|
|
1789
1798
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1790
|
-
/**
|
|
1791
|
-
* @method
|
|
1792
|
-
* @name bitfinex2#cancelAllOrders
|
|
1793
|
-
* @description cancel all open orders
|
|
1794
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
|
1795
|
-
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1796
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1797
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1798
|
-
*/
|
|
1799
1799
|
await this.loadMarkets();
|
|
1800
1800
|
const request = {
|
|
1801
1801
|
'all': 1,
|
|
@@ -1808,17 +1808,17 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
return this.parseOrders(ordersList);
|
|
1810
1810
|
}
|
|
1811
|
+
/**
|
|
1812
|
+
* @method
|
|
1813
|
+
* @name bitfinex2#cancelOrder
|
|
1814
|
+
* @description cancels an open order
|
|
1815
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-cancel-order
|
|
1816
|
+
* @param {string} id order id
|
|
1817
|
+
* @param {string} symbol Not used by bitfinex2 cancelOrder ()
|
|
1818
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1819
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1820
|
+
*/
|
|
1811
1821
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1812
|
-
/**
|
|
1813
|
-
* @method
|
|
1814
|
-
* @name bitfinex2#cancelOrder
|
|
1815
|
-
* @description cancels an open order
|
|
1816
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-cancel-order
|
|
1817
|
-
* @param {string} id order id
|
|
1818
|
-
* @param {string} symbol Not used by bitfinex2 cancelOrder ()
|
|
1819
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1820
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1821
|
-
*/
|
|
1822
1822
|
await this.loadMarkets();
|
|
1823
1823
|
const cid = this.safeValue2(params, 'cid', 'clientOrderId'); // client order id
|
|
1824
1824
|
let request = undefined;
|
|
@@ -1843,17 +1843,17 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1843
1843
|
const orderObject = { 'result': order };
|
|
1844
1844
|
return this.parseOrder(orderObject);
|
|
1845
1845
|
}
|
|
1846
|
+
/**
|
|
1847
|
+
* @method
|
|
1848
|
+
* @name bitfinex2#cancelOrders
|
|
1849
|
+
* @description cancel multiple orders at the same time
|
|
1850
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
|
1851
|
+
* @param {string[]} ids order ids
|
|
1852
|
+
* @param {string} symbol unified market symbol, default is undefined
|
|
1853
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1854
|
+
* @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1855
|
+
*/
|
|
1846
1856
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
1847
|
-
/**
|
|
1848
|
-
* @method
|
|
1849
|
-
* @name bitfinex2#cancelOrders
|
|
1850
|
-
* @description cancel multiple orders at the same time
|
|
1851
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
|
|
1852
|
-
* @param {string[]} ids order ids
|
|
1853
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
1854
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1855
|
-
* @returns {object} an array of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1856
|
-
*/
|
|
1857
1857
|
await this.loadMarkets();
|
|
1858
1858
|
for (let i = 0; i < ids.length; i++) {
|
|
1859
1859
|
ids[i] = this.parseToNumeric(ids[i]);
|
|
@@ -1923,18 +1923,18 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1923
1923
|
}
|
|
1924
1924
|
return this.parseOrders(ordersList, market);
|
|
1925
1925
|
}
|
|
1926
|
+
/**
|
|
1927
|
+
* @method
|
|
1928
|
+
* @name bitfinex2#fetchOpenOrder
|
|
1929
|
+
* @description fetch an open order by it's id
|
|
1930
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
1931
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
1932
|
+
* @param {string} id order id
|
|
1933
|
+
* @param {string} symbol unified market symbol, default is undefined
|
|
1934
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1935
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1936
|
+
*/
|
|
1926
1937
|
async fetchOpenOrder(id, symbol = undefined, params = {}) {
|
|
1927
|
-
/**
|
|
1928
|
-
* @method
|
|
1929
|
-
* @name bitfinex2#fetchOpenOrder
|
|
1930
|
-
* @description fetch an open order by it's id
|
|
1931
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
1932
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
1933
|
-
* @param {string} id order id
|
|
1934
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
1935
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1936
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1937
|
-
*/
|
|
1938
1938
|
const request = {
|
|
1939
1939
|
'id': [parseInt(id)],
|
|
1940
1940
|
};
|
|
@@ -1945,18 +1945,18 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
return order;
|
|
1947
1947
|
}
|
|
1948
|
+
/**
|
|
1949
|
+
* @method
|
|
1950
|
+
* @name bitfinex2#fetchClosedOrder
|
|
1951
|
+
* @description fetch an open order by it's id
|
|
1952
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
1953
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
1954
|
+
* @param {string} id order id
|
|
1955
|
+
* @param {string} symbol unified market symbol, default is undefined
|
|
1956
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1957
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1958
|
+
*/
|
|
1948
1959
|
async fetchClosedOrder(id, symbol = undefined, params = {}) {
|
|
1949
|
-
/**
|
|
1950
|
-
* @method
|
|
1951
|
-
* @name bitfinex2#fetchClosedOrder
|
|
1952
|
-
* @description fetch an open order by it's id
|
|
1953
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
1954
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
1955
|
-
* @param {string} id order id
|
|
1956
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
1957
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1958
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1959
|
-
*/
|
|
1960
1960
|
const request = {
|
|
1961
1961
|
'id': [parseInt(id)],
|
|
1962
1962
|
};
|
|
@@ -1967,19 +1967,19 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
return order;
|
|
1969
1969
|
}
|
|
1970
|
+
/**
|
|
1971
|
+
* @method
|
|
1972
|
+
* @name bitfinex2#fetchOpenOrders
|
|
1973
|
+
* @description fetch all unfilled currently open orders
|
|
1974
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
1975
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
1976
|
+
* @param {string} symbol unified market symbol
|
|
1977
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1978
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1979
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1980
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1981
|
+
*/
|
|
1970
1982
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1971
|
-
/**
|
|
1972
|
-
* @method
|
|
1973
|
-
* @name bitfinex2#fetchOpenOrders
|
|
1974
|
-
* @description fetch all unfilled currently open orders
|
|
1975
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
1976
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
1977
|
-
* @param {string} symbol unified market symbol
|
|
1978
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1979
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1980
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1981
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1982
|
-
*/
|
|
1983
1983
|
await this.loadMarkets();
|
|
1984
1984
|
const request = {};
|
|
1985
1985
|
let market = undefined;
|
|
@@ -2036,21 +2036,21 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2036
2036
|
}
|
|
2037
2037
|
return this.parseOrders(ordersList, market, since, limit);
|
|
2038
2038
|
}
|
|
2039
|
+
/**
|
|
2040
|
+
* @method
|
|
2041
|
+
* @name bitfinex2#fetchClosedOrders
|
|
2042
|
+
* @description fetches information on multiple closed orders made by the user
|
|
2043
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
2044
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
2045
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2046
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2047
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2048
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2049
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2050
|
+
* @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)
|
|
2051
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2052
|
+
*/
|
|
2039
2053
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2040
|
-
/**
|
|
2041
|
-
* @method
|
|
2042
|
-
* @name bitfinex2#fetchClosedOrders
|
|
2043
|
-
* @description fetches information on multiple closed orders made by the user
|
|
2044
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
2045
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
2046
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2047
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2048
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2049
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2050
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2051
|
-
* @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)
|
|
2052
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2053
|
-
*/
|
|
2054
2054
|
// returns the most recent closed or canceled orders up to circa two weeks ago
|
|
2055
2055
|
await this.loadMarkets();
|
|
2056
2056
|
let paginate = false;
|
|
@@ -2120,19 +2120,19 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2120
2120
|
}
|
|
2121
2121
|
return this.parseOrders(ordersList, market, since, limit);
|
|
2122
2122
|
}
|
|
2123
|
+
/**
|
|
2124
|
+
* @method
|
|
2125
|
+
* @name bitfinex2#fetchOrderTrades
|
|
2126
|
+
* @description fetch all the trades made from a single order
|
|
2127
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-order-trades
|
|
2128
|
+
* @param {string} id order id
|
|
2129
|
+
* @param {string} symbol unified market symbol
|
|
2130
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2131
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2132
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2133
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2134
|
+
*/
|
|
2123
2135
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2124
|
-
/**
|
|
2125
|
-
* @method
|
|
2126
|
-
* @name bitfinex2#fetchOrderTrades
|
|
2127
|
-
* @description fetch all the trades made from a single order
|
|
2128
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-order-trades
|
|
2129
|
-
* @param {string} id order id
|
|
2130
|
-
* @param {string} symbol unified market symbol
|
|
2131
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2132
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2133
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2134
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2135
|
-
*/
|
|
2136
2136
|
if (symbol === undefined) {
|
|
2137
2137
|
throw new errors.ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
|
|
2138
2138
|
}
|
|
@@ -2151,19 +2151,19 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2151
2151
|
}
|
|
2152
2152
|
return this.parseTrades(tradesList, market, since, limit);
|
|
2153
2153
|
}
|
|
2154
|
+
/**
|
|
2155
|
+
* @method
|
|
2156
|
+
* @name bitfinex2#fetchMyTrades
|
|
2157
|
+
* @description fetch all trades made by the user
|
|
2158
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-trades
|
|
2159
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-trades-by-symbol
|
|
2160
|
+
* @param {string} symbol unified market symbol
|
|
2161
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2162
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2163
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2164
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2165
|
+
*/
|
|
2154
2166
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2155
|
-
/**
|
|
2156
|
-
* @method
|
|
2157
|
-
* @name bitfinex2#fetchMyTrades
|
|
2158
|
-
* @description fetch all trades made by the user
|
|
2159
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-trades
|
|
2160
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-trades-by-symbol
|
|
2161
|
-
* @param {string} symbol unified market symbol
|
|
2162
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2163
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2164
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2165
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2166
|
-
*/
|
|
2167
2167
|
await this.loadMarkets();
|
|
2168
2168
|
let market = undefined;
|
|
2169
2169
|
const request = {
|
|
@@ -2190,32 +2190,32 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
return this.parseTrades(tradesList, market, since, limit);
|
|
2192
2192
|
}
|
|
2193
|
+
/**
|
|
2194
|
+
* @method
|
|
2195
|
+
* @name bitfinex2#createDepositAddress
|
|
2196
|
+
* @description create a currency deposit address
|
|
2197
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
|
2198
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
2199
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2200
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2201
|
+
*/
|
|
2193
2202
|
async createDepositAddress(code, params = {}) {
|
|
2194
|
-
/**
|
|
2195
|
-
* @method
|
|
2196
|
-
* @name bitfinex2#createDepositAddress
|
|
2197
|
-
* @description create a currency deposit address
|
|
2198
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
|
2199
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
2200
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2201
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2202
|
-
*/
|
|
2203
2203
|
await this.loadMarkets();
|
|
2204
2204
|
const request = {
|
|
2205
2205
|
'op_renew': 1,
|
|
2206
2206
|
};
|
|
2207
2207
|
return await this.fetchDepositAddress(code, this.extend(request, params));
|
|
2208
2208
|
}
|
|
2209
|
+
/**
|
|
2210
|
+
* @method
|
|
2211
|
+
* @name bitfinex2#fetchDepositAddress
|
|
2212
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
2213
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
|
2214
|
+
* @param {string} code unified currency code
|
|
2215
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2216
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2217
|
+
*/
|
|
2209
2218
|
async fetchDepositAddress(code, params = {}) {
|
|
2210
|
-
/**
|
|
2211
|
-
* @method
|
|
2212
|
-
* @name bitfinex2#fetchDepositAddress
|
|
2213
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
2214
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
|
|
2215
|
-
* @param {string} code unified currency code
|
|
2216
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2217
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2218
|
-
*/
|
|
2219
2219
|
await this.loadMarkets();
|
|
2220
2220
|
const currency = this.currency(code);
|
|
2221
2221
|
// if not provided explicitly we will try to match using the currency name
|
|
@@ -2422,15 +2422,15 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2422
2422
|
},
|
|
2423
2423
|
};
|
|
2424
2424
|
}
|
|
2425
|
+
/**
|
|
2426
|
+
* @method
|
|
2427
|
+
* @name bitfinex2#fetchTradingFees
|
|
2428
|
+
* @description fetch the trading fees for multiple markets
|
|
2429
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-summary
|
|
2430
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2431
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
2432
|
+
*/
|
|
2425
2433
|
async fetchTradingFees(params = {}) {
|
|
2426
|
-
/**
|
|
2427
|
-
* @method
|
|
2428
|
-
* @name bitfinex2#fetchTradingFees
|
|
2429
|
-
* @description fetch the trading fees for multiple markets
|
|
2430
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-summary
|
|
2431
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2432
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
2433
|
-
*/
|
|
2434
2434
|
await this.loadMarkets();
|
|
2435
2435
|
const response = await this.privatePostAuthRSummary(params);
|
|
2436
2436
|
//
|
|
@@ -2536,19 +2536,19 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2536
2536
|
}
|
|
2537
2537
|
return result;
|
|
2538
2538
|
}
|
|
2539
|
+
/**
|
|
2540
|
+
* @method
|
|
2541
|
+
* @name bitfinex2#fetchDepositsWithdrawals
|
|
2542
|
+
* @description fetch history of deposits and withdrawals
|
|
2543
|
+
* @see https://docs.bitfinex.com/reference/movement-info
|
|
2544
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-movements
|
|
2545
|
+
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
2546
|
+
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2547
|
+
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2548
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2549
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2550
|
+
*/
|
|
2539
2551
|
async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2540
|
-
/**
|
|
2541
|
-
* @method
|
|
2542
|
-
* @name bitfinex2#fetchDepositsWithdrawals
|
|
2543
|
-
* @description fetch history of deposits and withdrawals
|
|
2544
|
-
* @see https://docs.bitfinex.com/reference/movement-info
|
|
2545
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-movements
|
|
2546
|
-
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
2547
|
-
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
2548
|
-
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
2549
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2550
|
-
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2551
|
-
*/
|
|
2552
2552
|
await this.loadMarkets();
|
|
2553
2553
|
let currency = undefined;
|
|
2554
2554
|
const request = {};
|
|
@@ -2597,19 +2597,19 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2597
2597
|
//
|
|
2598
2598
|
return this.parseTransactions(response, currency, since, limit);
|
|
2599
2599
|
}
|
|
2600
|
+
/**
|
|
2601
|
+
* @method
|
|
2602
|
+
* @name bitfinex2#withdraw
|
|
2603
|
+
* @description make a withdrawal
|
|
2604
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-withdraw
|
|
2605
|
+
* @param {string} code unified currency code
|
|
2606
|
+
* @param {float} amount the amount to withdraw
|
|
2607
|
+
* @param {string} address the address to withdraw to
|
|
2608
|
+
* @param {string} tag
|
|
2609
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2610
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2611
|
+
*/
|
|
2600
2612
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2601
|
-
/**
|
|
2602
|
-
* @method
|
|
2603
|
-
* @name bitfinex2#withdraw
|
|
2604
|
-
* @description make a withdrawal
|
|
2605
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-withdraw
|
|
2606
|
-
* @param {string} code unified currency code
|
|
2607
|
-
* @param {float} amount the amount to withdraw
|
|
2608
|
-
* @param {string} address the address to withdraw to
|
|
2609
|
-
* @param {string} tag
|
|
2610
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2611
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2612
|
-
*/
|
|
2613
2613
|
this.checkAddress(address);
|
|
2614
2614
|
await this.loadMarkets();
|
|
2615
2615
|
const currency = this.currency(code);
|
|
@@ -2687,16 +2687,16 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2687
2687
|
'address': address,
|
|
2688
2688
|
});
|
|
2689
2689
|
}
|
|
2690
|
+
/**
|
|
2691
|
+
* @method
|
|
2692
|
+
* @name bitfinex2#fetchPositions
|
|
2693
|
+
* @description fetch all open positions
|
|
2694
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-positions
|
|
2695
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2696
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2697
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2698
|
+
*/
|
|
2690
2699
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
2691
|
-
/**
|
|
2692
|
-
* @method
|
|
2693
|
-
* @name bitfinex2#fetchPositions
|
|
2694
|
-
* @description fetch all open positions
|
|
2695
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-positions
|
|
2696
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2697
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2698
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2699
|
-
*/
|
|
2700
2700
|
await this.loadMarkets();
|
|
2701
2701
|
symbols = this.marketSymbols(symbols);
|
|
2702
2702
|
const response = await this.privatePostAuthRPositions(params);
|
|
@@ -2947,20 +2947,20 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
2947
2947
|
'fee': undefined,
|
|
2948
2948
|
}, currency);
|
|
2949
2949
|
}
|
|
2950
|
+
/**
|
|
2951
|
+
* @method
|
|
2952
|
+
* @name bitfinex2#fetchLedger
|
|
2953
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2954
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-ledgers
|
|
2955
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2956
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2957
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined, max is 2500
|
|
2958
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2959
|
+
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
2960
|
+
* @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)
|
|
2961
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2962
|
+
*/
|
|
2950
2963
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2951
|
-
/**
|
|
2952
|
-
* @method
|
|
2953
|
-
* @name bitfinex2#fetchLedger
|
|
2954
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2955
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-ledgers
|
|
2956
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
2957
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2958
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined, max is 2500
|
|
2959
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2960
|
-
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
2961
|
-
* @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)
|
|
2962
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2963
|
-
*/
|
|
2964
2964
|
await this.loadMarkets();
|
|
2965
2965
|
let paginate = false;
|
|
2966
2966
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
@@ -3007,16 +3007,16 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3007
3007
|
}
|
|
3008
3008
|
return this.parseLedger(ledgerObjects, currency, since, limit);
|
|
3009
3009
|
}
|
|
3010
|
+
/**
|
|
3011
|
+
* @method
|
|
3012
|
+
* @name bitfinex2#fetchFundingRates
|
|
3013
|
+
* @description fetch the current funding rate for multiple symbols
|
|
3014
|
+
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
3015
|
+
* @param {string[]} symbols list of unified market symbols
|
|
3016
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3017
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3018
|
+
*/
|
|
3010
3019
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
3011
|
-
/**
|
|
3012
|
-
* @method
|
|
3013
|
-
* @name bitfinex2#fetchFundingRates
|
|
3014
|
-
* @description fetch the current funding rate for multiple symbols
|
|
3015
|
-
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
3016
|
-
* @param {string[]} symbols list of unified market symbols
|
|
3017
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3018
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3019
|
-
*/
|
|
3020
3020
|
if (symbols === undefined) {
|
|
3021
3021
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRates() requires a symbols argument');
|
|
3022
3022
|
}
|
|
@@ -3058,20 +3058,20 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3058
3058
|
//
|
|
3059
3059
|
return this.parseFundingRates(response);
|
|
3060
3060
|
}
|
|
3061
|
+
/**
|
|
3062
|
+
* @method
|
|
3063
|
+
* @name bitfinex2#fetchFundingRateHistory
|
|
3064
|
+
* @description fetches historical funding rate prices
|
|
3065
|
+
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
|
|
3066
|
+
* @param {string} symbol unified market symbol
|
|
3067
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate entry
|
|
3068
|
+
* @param {int} [limit] max number of funding rate entrys to return
|
|
3069
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3070
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
3071
|
+
* @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)
|
|
3072
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3073
|
+
*/
|
|
3061
3074
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3062
|
-
/**
|
|
3063
|
-
* @method
|
|
3064
|
-
* @name bitfinex2#fetchFundingRateHistory
|
|
3065
|
-
* @description fetches historical funding rate prices
|
|
3066
|
-
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
|
|
3067
|
-
* @param {string} symbol unified market symbol
|
|
3068
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate entry
|
|
3069
|
-
* @param {int} [limit] max number of funding rate entrys to return
|
|
3070
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3071
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
3072
|
-
* @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)
|
|
3073
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3074
|
-
*/
|
|
3075
3075
|
if (symbol === undefined) {
|
|
3076
3076
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
3077
3077
|
}
|
|
@@ -3239,16 +3239,16 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3239
3239
|
'previousFundingDatetime': undefined,
|
|
3240
3240
|
};
|
|
3241
3241
|
}
|
|
3242
|
+
/**
|
|
3243
|
+
* @method
|
|
3244
|
+
* @name bitfinex2#fetchOpenInterest
|
|
3245
|
+
* @description retrieves the open interest of a contract trading pair
|
|
3246
|
+
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
3247
|
+
* @param {string} symbol unified CCXT market symbol
|
|
3248
|
+
* @param {object} [params] exchange specific parameters
|
|
3249
|
+
* @returns {object} an [open interest structure]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
3250
|
+
*/
|
|
3242
3251
|
async fetchOpenInterest(symbol, params = {}) {
|
|
3243
|
-
/**
|
|
3244
|
-
* @method
|
|
3245
|
-
* @name bitfinex2#fetchOpenInterest
|
|
3246
|
-
* @description retrieves the open interest of a contract trading pair
|
|
3247
|
-
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
|
|
3248
|
-
* @param {string} symbol unified CCXT market symbol
|
|
3249
|
-
* @param {object} [params] exchange specific parameters
|
|
3250
|
-
* @returns {object} an [open interest structure]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
3251
|
-
*/
|
|
3252
3252
|
await this.loadMarkets();
|
|
3253
3253
|
const market = this.market(symbol);
|
|
3254
3254
|
const request = {
|
|
@@ -3288,21 +3288,21 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3288
3288
|
const oi = this.safeList(response, 0);
|
|
3289
3289
|
return this.parseOpenInterest(oi, market);
|
|
3290
3290
|
}
|
|
3291
|
+
/**
|
|
3292
|
+
* @method
|
|
3293
|
+
* @name bitfinex2#fetchOpenInterestHistory
|
|
3294
|
+
* @description retrieves the open interest history of a currency
|
|
3295
|
+
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
|
|
3296
|
+
* @param {string} symbol unified CCXT market symbol
|
|
3297
|
+
* @param {string} timeframe the time period of each row of data, not used by bitfinex2
|
|
3298
|
+
* @param {int} [since] the time in ms of the earliest record to retrieve as a unix timestamp
|
|
3299
|
+
* @param {int} [limit] the number of records in the response
|
|
3300
|
+
* @param {object} [params] exchange specific parameters
|
|
3301
|
+
* @param {int} [params.until] the time in ms of the latest record to retrieve as a unix timestamp
|
|
3302
|
+
* @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)
|
|
3303
|
+
* @returns An array of [open interest structures]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
3304
|
+
*/
|
|
3291
3305
|
async fetchOpenInterestHistory(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
3292
|
-
/**
|
|
3293
|
-
* @method
|
|
3294
|
-
* @name bitfinex2#fetchOpenInterestHistory
|
|
3295
|
-
* @description retrieves the open interest history of a currency
|
|
3296
|
-
* @see https://docs.bitfinex.com/reference/rest-public-derivatives-status-history
|
|
3297
|
-
* @param {string} symbol unified CCXT market symbol
|
|
3298
|
-
* @param {string} timeframe the time period of each row of data, not used by bitfinex2
|
|
3299
|
-
* @param {int} [since] the time in ms of the earliest record to retrieve as a unix timestamp
|
|
3300
|
-
* @param {int} [limit] the number of records in the response
|
|
3301
|
-
* @param {object} [params] exchange specific parameters
|
|
3302
|
-
* @param {int} [params.until] the time in ms of the latest record to retrieve as a unix timestamp
|
|
3303
|
-
* @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)
|
|
3304
|
-
* @returns An array of [open interest structures]{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
3305
|
-
*/
|
|
3306
3306
|
await this.loadMarkets();
|
|
3307
3307
|
let paginate = false;
|
|
3308
3308
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOpenInterestHistory', 'paginate');
|
|
@@ -3424,20 +3424,20 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3424
3424
|
'info': interest,
|
|
3425
3425
|
}, market);
|
|
3426
3426
|
}
|
|
3427
|
+
/**
|
|
3428
|
+
* @method
|
|
3429
|
+
* @name bitfinex2#fetchLiquidations
|
|
3430
|
+
* @description retrieves the public liquidations of a trading pair
|
|
3431
|
+
* @see https://docs.bitfinex.com/reference/rest-public-liquidations
|
|
3432
|
+
* @param {string} symbol unified CCXT market symbol
|
|
3433
|
+
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
3434
|
+
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
3435
|
+
* @param {object} [params] exchange specific parameters
|
|
3436
|
+
* @param {int} [params.until] timestamp in ms of the latest liquidation
|
|
3437
|
+
* @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)
|
|
3438
|
+
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
3439
|
+
*/
|
|
3427
3440
|
async fetchLiquidations(symbol, since = undefined, limit = undefined, params = {}) {
|
|
3428
|
-
/**
|
|
3429
|
-
* @method
|
|
3430
|
-
* @name bitfinex2#fetchLiquidations
|
|
3431
|
-
* @description retrieves the public liquidations of a trading pair
|
|
3432
|
-
* @see https://docs.bitfinex.com/reference/rest-public-liquidations
|
|
3433
|
-
* @param {string} symbol unified CCXT market symbol
|
|
3434
|
-
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
3435
|
-
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
3436
|
-
* @param {object} [params] exchange specific parameters
|
|
3437
|
-
* @param {int} [params.until] timestamp in ms of the latest liquidation
|
|
3438
|
-
* @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)
|
|
3439
|
-
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
3440
|
-
*/
|
|
3441
3441
|
await this.loadMarkets();
|
|
3442
3442
|
let paginate = false;
|
|
3443
3443
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLiquidations', 'paginate');
|
|
@@ -3514,17 +3514,17 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3514
3514
|
'datetime': this.iso8601(timestamp),
|
|
3515
3515
|
});
|
|
3516
3516
|
}
|
|
3517
|
+
/**
|
|
3518
|
+
* @method
|
|
3519
|
+
* @name bitfinex2#setMargin
|
|
3520
|
+
* @description either adds or reduces margin in a swap position in order to set the margin to a specific value
|
|
3521
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-deriv-pos-collateral-set
|
|
3522
|
+
* @param {string} symbol unified market symbol of the market to set margin in
|
|
3523
|
+
* @param {float} amount the amount to set the margin to
|
|
3524
|
+
* @param {object} [params] parameters specific to the exchange API endpoint
|
|
3525
|
+
* @returns {object} A [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
|
|
3526
|
+
*/
|
|
3517
3527
|
async setMargin(symbol, amount, params = {}) {
|
|
3518
|
-
/**
|
|
3519
|
-
* @method
|
|
3520
|
-
* @name bitfinex2#setMargin
|
|
3521
|
-
* @description either adds or reduces margin in a swap position in order to set the margin to a specific value
|
|
3522
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-deriv-pos-collateral-set
|
|
3523
|
-
* @param {string} symbol unified market symbol of the market to set margin in
|
|
3524
|
-
* @param {float} amount the amount to set the margin to
|
|
3525
|
-
* @param {object} [params] parameters specific to the exchange API endpoint
|
|
3526
|
-
* @returns {object} A [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
|
|
3527
|
-
*/
|
|
3528
3528
|
await this.loadMarkets();
|
|
3529
3529
|
const market = this.market(symbol);
|
|
3530
3530
|
if (!market['swap']) {
|
|
@@ -3570,18 +3570,18 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3570
3570
|
'datetime': undefined,
|
|
3571
3571
|
};
|
|
3572
3572
|
}
|
|
3573
|
+
/**
|
|
3574
|
+
* @method
|
|
3575
|
+
* @name bitfinex2#fetchOrder
|
|
3576
|
+
* @description fetches information on an order made by the user
|
|
3577
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
3578
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
3579
|
+
* @param {string} id the order id
|
|
3580
|
+
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
3581
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3582
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3583
|
+
*/
|
|
3573
3584
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
3574
|
-
/**
|
|
3575
|
-
* @method
|
|
3576
|
-
* @name bitfinex2#fetchOrder
|
|
3577
|
-
* @description fetches information on an order made by the user
|
|
3578
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders
|
|
3579
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol
|
|
3580
|
-
* @param {string} id the order id
|
|
3581
|
-
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
3582
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3583
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3584
|
-
*/
|
|
3585
3585
|
await this.loadMarkets();
|
|
3586
3586
|
const request = {
|
|
3587
3587
|
'id': [this.parseToNumeric(id)],
|
|
@@ -3637,28 +3637,28 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3637
3637
|
const order = this.safeList(response, 0);
|
|
3638
3638
|
return this.parseOrder(order, market);
|
|
3639
3639
|
}
|
|
3640
|
+
/**
|
|
3641
|
+
* @method
|
|
3642
|
+
* @name bitfinex2#editOrder
|
|
3643
|
+
* @description edit a trade order
|
|
3644
|
+
* @see https://docs.bitfinex.com/reference/rest-auth-update-order
|
|
3645
|
+
* @param {string} id edit order id
|
|
3646
|
+
* @param {string} symbol unified symbol of the market to edit an order in
|
|
3647
|
+
* @param {string} type 'market' or 'limit'
|
|
3648
|
+
* @param {string} side 'buy' or 'sell'
|
|
3649
|
+
* @param {float} amount how much you want to trade in units of the base currency
|
|
3650
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3651
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3652
|
+
* @param {float} [params.stopPrice] the price that triggers a trigger order
|
|
3653
|
+
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
3654
|
+
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
3655
|
+
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
3656
|
+
* @param {int} [params.leverage] leverage for a derivative order, supported by derivative symbol orders only, the value should be between 1 and 100 inclusive
|
|
3657
|
+
* @param {int} [params.clientOrderId] a unique client order id for the order
|
|
3658
|
+
* @param {float} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
|
|
3659
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3660
|
+
*/
|
|
3640
3661
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
3641
|
-
/**
|
|
3642
|
-
* @method
|
|
3643
|
-
* @name bitfinex2#editOrder
|
|
3644
|
-
* @description edit a trade order
|
|
3645
|
-
* @see https://docs.bitfinex.com/reference/rest-auth-update-order
|
|
3646
|
-
* @param {string} id edit order id
|
|
3647
|
-
* @param {string} symbol unified symbol of the market to edit an order in
|
|
3648
|
-
* @param {string} type 'market' or 'limit'
|
|
3649
|
-
* @param {string} side 'buy' or 'sell'
|
|
3650
|
-
* @param {float} amount how much you want to trade in units of the base currency
|
|
3651
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3652
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3653
|
-
* @param {float} [params.stopPrice] the price that triggers a trigger order
|
|
3654
|
-
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
|
3655
|
-
* @param {boolean} [params.reduceOnly] indicates that the order is to reduce the size of a position
|
|
3656
|
-
* @param {int} [params.flags] additional order parameters: 4096 (Post Only), 1024 (Reduce Only), 16384 (OCO), 64 (Hidden), 512 (Close), 524288 (No Var Rates)
|
|
3657
|
-
* @param {int} [params.leverage] leverage for a derivative order, supported by derivative symbol orders only, the value should be between 1 and 100 inclusive
|
|
3658
|
-
* @param {int} [params.clientOrderId] a unique client order id for the order
|
|
3659
|
-
* @param {float} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
|
|
3660
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3661
|
-
*/
|
|
3662
3662
|
await this.loadMarkets();
|
|
3663
3663
|
const market = this.market(symbol);
|
|
3664
3664
|
const request = {
|