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