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/deribit.js
CHANGED
|
@@ -498,15 +498,15 @@ export default class deribit extends Exchange {
|
|
|
498
498
|
}
|
|
499
499
|
return super.safeMarket(marketId, market, delimiter, marketType);
|
|
500
500
|
}
|
|
501
|
+
/**
|
|
502
|
+
* @method
|
|
503
|
+
* @name deribit#fetchTime
|
|
504
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
505
|
+
* @see https://docs.deribit.com/#public-get_time
|
|
506
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
507
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
508
|
+
*/
|
|
501
509
|
async fetchTime(params = {}) {
|
|
502
|
-
/**
|
|
503
|
-
* @method
|
|
504
|
-
* @name deribit#fetchTime
|
|
505
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
506
|
-
* @see https://docs.deribit.com/#public-get_time
|
|
507
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
508
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
509
|
-
*/
|
|
510
510
|
const response = await this.publicGetGetTime(params);
|
|
511
511
|
//
|
|
512
512
|
// {
|
|
@@ -520,15 +520,15 @@ export default class deribit extends Exchange {
|
|
|
520
520
|
//
|
|
521
521
|
return this.safeInteger(response, 'result');
|
|
522
522
|
}
|
|
523
|
+
/**
|
|
524
|
+
* @method
|
|
525
|
+
* @name deribit#fetchCurrencies
|
|
526
|
+
* @description fetches all available currencies on an exchange
|
|
527
|
+
* @see https://docs.deribit.com/#public-get_currencies
|
|
528
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
529
|
+
* @returns {object} an associative dictionary of currencies
|
|
530
|
+
*/
|
|
523
531
|
async fetchCurrencies(params = {}) {
|
|
524
|
-
/**
|
|
525
|
-
* @method
|
|
526
|
-
* @name deribit#fetchCurrencies
|
|
527
|
-
* @description fetches all available currencies on an exchange
|
|
528
|
-
* @see https://docs.deribit.com/#public-get_currencies
|
|
529
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
530
|
-
* @returns {object} an associative dictionary of currencies
|
|
531
|
-
*/
|
|
532
532
|
const response = await this.publicGetGetCurrencies(params);
|
|
533
533
|
//
|
|
534
534
|
// {
|
|
@@ -594,15 +594,15 @@ export default class deribit extends Exchange {
|
|
|
594
594
|
const code = this.safeValue(options, 'code', defaultCode);
|
|
595
595
|
return this.safeValue(params, 'code', code);
|
|
596
596
|
}
|
|
597
|
+
/**
|
|
598
|
+
* @method
|
|
599
|
+
* @name deribit#fetchStatus
|
|
600
|
+
* @description the latest known information on the availability of the exchange API
|
|
601
|
+
* @see https://docs.deribit.com/#public-status
|
|
602
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
603
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
604
|
+
*/
|
|
597
605
|
async fetchStatus(params = {}) {
|
|
598
|
-
/**
|
|
599
|
-
* @method
|
|
600
|
-
* @name deribit#fetchStatus
|
|
601
|
-
* @description the latest known information on the availability of the exchange API
|
|
602
|
-
* @see https://docs.deribit.com/#public-status
|
|
603
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
604
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
605
|
-
*/
|
|
606
606
|
const response = await this.publicGetStatus(params);
|
|
607
607
|
//
|
|
608
608
|
// {
|
|
@@ -627,15 +627,15 @@ export default class deribit extends Exchange {
|
|
|
627
627
|
'info': response,
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
|
+
/**
|
|
631
|
+
* @method
|
|
632
|
+
* @name deribit#fetchAccounts
|
|
633
|
+
* @description fetch all the accounts associated with a profile
|
|
634
|
+
* @see https://docs.deribit.com/#private-get_subaccounts
|
|
635
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
636
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
637
|
+
*/
|
|
630
638
|
async fetchAccounts(params = {}) {
|
|
631
|
-
/**
|
|
632
|
-
* @method
|
|
633
|
-
* @name deribit#fetchAccounts
|
|
634
|
-
* @description fetch all the accounts associated with a profile
|
|
635
|
-
* @see https://docs.deribit.com/#private-get_subaccounts
|
|
636
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
637
|
-
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
638
|
-
*/
|
|
639
639
|
await this.loadMarkets();
|
|
640
640
|
const response = await this.privateGetGetSubaccounts(params);
|
|
641
641
|
//
|
|
@@ -697,16 +697,16 @@ export default class deribit extends Exchange {
|
|
|
697
697
|
'code': this.safeCurrencyCode(undefined, currency),
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
+
/**
|
|
701
|
+
* @method
|
|
702
|
+
* @name deribit#fetchMarkets
|
|
703
|
+
* @description retrieves data on all markets for deribit
|
|
704
|
+
* @see https://docs.deribit.com/#public-get_currencies
|
|
705
|
+
* @see https://docs.deribit.com/#public-get_instruments
|
|
706
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
707
|
+
* @returns {object[]} an array of objects representing market data
|
|
708
|
+
*/
|
|
700
709
|
async fetchMarkets(params = {}) {
|
|
701
|
-
/**
|
|
702
|
-
* @method
|
|
703
|
-
* @name deribit#fetchMarkets
|
|
704
|
-
* @description retrieves data on all markets for deribit
|
|
705
|
-
* @see https://docs.deribit.com/#public-get_currencies
|
|
706
|
-
* @see https://docs.deribit.com/#public-get_instruments
|
|
707
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
708
|
-
* @returns {object[]} an array of objects representing market data
|
|
709
|
-
*/
|
|
710
710
|
const instrumentsResponses = [];
|
|
711
711
|
const result = [];
|
|
712
712
|
const parsedMarkets = {};
|
|
@@ -951,15 +951,15 @@ export default class deribit extends Exchange {
|
|
|
951
951
|
result[currencyCode] = account;
|
|
952
952
|
return this.safeBalance(result);
|
|
953
953
|
}
|
|
954
|
+
/**
|
|
955
|
+
* @method
|
|
956
|
+
* @name deribit#fetchBalance
|
|
957
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
958
|
+
* @see https://docs.deribit.com/#private-get_account_summary
|
|
959
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
960
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
961
|
+
*/
|
|
954
962
|
async fetchBalance(params = {}) {
|
|
955
|
-
/**
|
|
956
|
-
* @method
|
|
957
|
-
* @name deribit#fetchBalance
|
|
958
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
959
|
-
* @see https://docs.deribit.com/#private-get_account_summary
|
|
960
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
961
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
962
|
-
*/
|
|
963
963
|
await this.loadMarkets();
|
|
964
964
|
const code = this.codeFromOptions('fetchBalance', params);
|
|
965
965
|
const currency = this.currency(code);
|
|
@@ -1012,16 +1012,16 @@ export default class deribit extends Exchange {
|
|
|
1012
1012
|
const result = this.safeValue(response, 'result', {});
|
|
1013
1013
|
return this.parseBalance(result);
|
|
1014
1014
|
}
|
|
1015
|
+
/**
|
|
1016
|
+
* @method
|
|
1017
|
+
* @name deribit#createDepositAddress
|
|
1018
|
+
* @description create a currency deposit address
|
|
1019
|
+
* @see https://docs.deribit.com/#private-create_deposit_address
|
|
1020
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
1021
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1022
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1023
|
+
*/
|
|
1015
1024
|
async createDepositAddress(code, params = {}) {
|
|
1016
|
-
/**
|
|
1017
|
-
* @method
|
|
1018
|
-
* @name deribit#createDepositAddress
|
|
1019
|
-
* @description create a currency deposit address
|
|
1020
|
-
* @see https://docs.deribit.com/#private-create_deposit_address
|
|
1021
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
1022
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1023
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1024
|
-
*/
|
|
1025
1025
|
await this.loadMarkets();
|
|
1026
1026
|
const currency = this.currency(code);
|
|
1027
1027
|
const request = {
|
|
@@ -1050,16 +1050,16 @@ export default class deribit extends Exchange {
|
|
|
1050
1050
|
'info': response,
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
|
+
/**
|
|
1054
|
+
* @method
|
|
1055
|
+
* @name deribit#fetchDepositAddress
|
|
1056
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
1057
|
+
* @see https://docs.deribit.com/#private-get_current_deposit_address
|
|
1058
|
+
* @param {string} code unified currency code
|
|
1059
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1060
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1061
|
+
*/
|
|
1053
1062
|
async fetchDepositAddress(code, params = {}) {
|
|
1054
|
-
/**
|
|
1055
|
-
* @method
|
|
1056
|
-
* @name deribit#fetchDepositAddress
|
|
1057
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
1058
|
-
* @see https://docs.deribit.com/#private-get_current_deposit_address
|
|
1059
|
-
* @param {string} code unified currency code
|
|
1060
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1061
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1062
|
-
*/
|
|
1063
1063
|
await this.loadMarkets();
|
|
1064
1064
|
const currency = this.currency(code);
|
|
1065
1065
|
const request = {
|
|
@@ -1171,16 +1171,16 @@ export default class deribit extends Exchange {
|
|
|
1171
1171
|
'info': ticker,
|
|
1172
1172
|
}, market);
|
|
1173
1173
|
}
|
|
1174
|
+
/**
|
|
1175
|
+
* @method
|
|
1176
|
+
* @name deribit#fetchTicker
|
|
1177
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1178
|
+
* @see https://docs.deribit.com/#public-ticker
|
|
1179
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1180
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1181
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1182
|
+
*/
|
|
1174
1183
|
async fetchTicker(symbol, params = {}) {
|
|
1175
|
-
/**
|
|
1176
|
-
* @method
|
|
1177
|
-
* @name deribit#fetchTicker
|
|
1178
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1179
|
-
* @see https://docs.deribit.com/#public-ticker
|
|
1180
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1181
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1182
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1183
|
-
*/
|
|
1184
1184
|
await this.loadMarkets();
|
|
1185
1185
|
const market = this.market(symbol);
|
|
1186
1186
|
const request = {
|
|
@@ -1218,17 +1218,17 @@ export default class deribit extends Exchange {
|
|
|
1218
1218
|
const result = this.safeDict(response, 'result');
|
|
1219
1219
|
return this.parseTicker(result, market);
|
|
1220
1220
|
}
|
|
1221
|
+
/**
|
|
1222
|
+
* @method
|
|
1223
|
+
* @name deribit#fetchTickers
|
|
1224
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1225
|
+
* @see https://docs.deribit.com/#public-get_book_summary_by_currency
|
|
1226
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1227
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1228
|
+
* @param {string} [params.code] *required* the currency code to fetch the tickers for, eg. 'BTC', 'ETH'
|
|
1229
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1230
|
+
*/
|
|
1221
1231
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1222
|
-
/**
|
|
1223
|
-
* @method
|
|
1224
|
-
* @name deribit#fetchTickers
|
|
1225
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1226
|
-
* @see https://docs.deribit.com/#public-get_book_summary_by_currency
|
|
1227
|
-
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1228
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1229
|
-
* @param {string} [params.code] *required* the currency code to fetch the tickers for, eg. 'BTC', 'ETH'
|
|
1230
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1231
|
-
*/
|
|
1232
1232
|
await this.loadMarkets();
|
|
1233
1233
|
symbols = this.marketSymbols(symbols);
|
|
1234
1234
|
const code = this.safeString2(params, 'code', 'currency');
|
|
@@ -1280,21 +1280,21 @@ export default class deribit extends Exchange {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
return this.filterByArrayTickers(tickers, 'symbol', symbols);
|
|
1282
1282
|
}
|
|
1283
|
+
/**
|
|
1284
|
+
* @method
|
|
1285
|
+
* @name deribit#fetchOHLCV
|
|
1286
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1287
|
+
* @see https://docs.deribit.com/#public-get_tradingview_chart_data
|
|
1288
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1289
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1290
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1291
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1292
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1293
|
+
* @param {boolean} [params.paginate] whether to paginate the results, set to false by default
|
|
1294
|
+
* @param {int} [params.until] the latest time in ms to fetch ohlcv for
|
|
1295
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1296
|
+
*/
|
|
1283
1297
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1284
|
-
/**
|
|
1285
|
-
* @method
|
|
1286
|
-
* @name deribit#fetchOHLCV
|
|
1287
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1288
|
-
* @see https://docs.deribit.com/#public-get_tradingview_chart_data
|
|
1289
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1290
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1291
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1292
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1293
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1294
|
-
* @param {boolean} [params.paginate] whether to paginate the results, set to false by default
|
|
1295
|
-
* @param {int} [params.until] the latest time in ms to fetch ohlcv for
|
|
1296
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1297
|
-
*/
|
|
1298
1298
|
await this.loadMarkets();
|
|
1299
1299
|
let paginate = false;
|
|
1300
1300
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
|
|
@@ -1443,20 +1443,20 @@ export default class deribit extends Exchange {
|
|
|
1443
1443
|
'fee': fee,
|
|
1444
1444
|
}, market);
|
|
1445
1445
|
}
|
|
1446
|
+
/**
|
|
1447
|
+
* @method
|
|
1448
|
+
* @name deribit#fetchTrades
|
|
1449
|
+
* @see https://docs.deribit.com/#public-get_last_trades_by_instrument
|
|
1450
|
+
* @see https://docs.deribit.com/#public-get_last_trades_by_instrument_and_time
|
|
1451
|
+
* @description get the list of most recent trades for a particular symbol.
|
|
1452
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1453
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1454
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1455
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1456
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
1457
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1458
|
+
*/
|
|
1446
1459
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1447
|
-
/**
|
|
1448
|
-
* @method
|
|
1449
|
-
* @name deribit#fetchTrades
|
|
1450
|
-
* @see https://docs.deribit.com/#public-get_last_trades_by_instrument
|
|
1451
|
-
* @see https://docs.deribit.com/#public-get_last_trades_by_instrument_and_time
|
|
1452
|
-
* @description get the list of most recent trades for a particular symbol.
|
|
1453
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1454
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1455
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1456
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1457
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
1458
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1459
|
-
*/
|
|
1460
1460
|
await this.loadMarkets();
|
|
1461
1461
|
const market = this.market(symbol);
|
|
1462
1462
|
const request = {
|
|
@@ -1510,15 +1510,15 @@ export default class deribit extends Exchange {
|
|
|
1510
1510
|
const trades = this.safeList(result, 'trades', []);
|
|
1511
1511
|
return this.parseTrades(trades, market, since, limit);
|
|
1512
1512
|
}
|
|
1513
|
+
/**
|
|
1514
|
+
* @method
|
|
1515
|
+
* @name deribit#fetchTradingFees
|
|
1516
|
+
* @description fetch the trading fees for multiple markets
|
|
1517
|
+
* @see https://docs.deribit.com/#private-get_account_summary
|
|
1518
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1519
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1520
|
+
*/
|
|
1513
1521
|
async fetchTradingFees(params = {}) {
|
|
1514
|
-
/**
|
|
1515
|
-
* @method
|
|
1516
|
-
* @name deribit#fetchTradingFees
|
|
1517
|
-
* @description fetch the trading fees for multiple markets
|
|
1518
|
-
* @see https://docs.deribit.com/#private-get_account_summary
|
|
1519
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1520
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1521
|
-
*/
|
|
1522
1522
|
await this.loadMarkets();
|
|
1523
1523
|
const code = this.codeFromOptions('fetchTradingFees', params);
|
|
1524
1524
|
const currency = this.currency(code);
|
|
@@ -1631,17 +1631,17 @@ export default class deribit extends Exchange {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
return parsedFees;
|
|
1633
1633
|
}
|
|
1634
|
+
/**
|
|
1635
|
+
* @method
|
|
1636
|
+
* @name deribit#fetchOrderBook
|
|
1637
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1638
|
+
* @see https://docs.deribit.com/#public-get_order_book
|
|
1639
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1640
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1641
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1642
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1643
|
+
*/
|
|
1634
1644
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1635
|
-
/**
|
|
1636
|
-
* @method
|
|
1637
|
-
* @name deribit#fetchOrderBook
|
|
1638
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1639
|
-
* @see https://docs.deribit.com/#public-get_order_book
|
|
1640
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1641
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1642
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1643
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1644
|
-
*/
|
|
1645
1645
|
await this.loadMarkets();
|
|
1646
1646
|
const market = this.market(symbol);
|
|
1647
1647
|
const request = {
|
|
@@ -1822,16 +1822,17 @@ export default class deribit extends Exchange {
|
|
|
1822
1822
|
'trades': trades,
|
|
1823
1823
|
}, market);
|
|
1824
1824
|
}
|
|
1825
|
+
/**
|
|
1826
|
+
* @method
|
|
1827
|
+
* @name deribit#fetchOrder
|
|
1828
|
+
* @description fetches information on an order made by the user
|
|
1829
|
+
* @see https://docs.deribit.com/#private-get_order_state
|
|
1830
|
+
* @param {string} id order id
|
|
1831
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1832
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1833
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1834
|
+
*/
|
|
1825
1835
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1826
|
-
/**
|
|
1827
|
-
* @method
|
|
1828
|
-
* @name deribit#fetchOrder
|
|
1829
|
-
* @description fetches information on an order made by the user
|
|
1830
|
-
* @see https://docs.deribit.com/#private-get_order_state
|
|
1831
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1832
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1833
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1834
|
-
*/
|
|
1835
1836
|
await this.loadMarkets();
|
|
1836
1837
|
const request = {
|
|
1837
1838
|
'order_id': id,
|
|
@@ -1872,23 +1873,23 @@ export default class deribit extends Exchange {
|
|
|
1872
1873
|
const result = this.safeDict(response, 'result');
|
|
1873
1874
|
return this.parseOrder(result, market);
|
|
1874
1875
|
}
|
|
1876
|
+
/**
|
|
1877
|
+
* @method
|
|
1878
|
+
* @name deribit#createOrder
|
|
1879
|
+
* @description create a trade order
|
|
1880
|
+
* @see https://docs.deribit.com/#private-buy
|
|
1881
|
+
* @see https://docs.deribit.com/#private-sell
|
|
1882
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1883
|
+
* @param {string} type 'market' or 'limit'
|
|
1884
|
+
* @param {string} side 'buy' or 'sell'
|
|
1885
|
+
* @param {float} amount how much you want to trade in units of the base currency. For perpetual and inverse futures the amount is in USD units. For options it is in the underlying assets base currency.
|
|
1886
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1887
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1888
|
+
* @param {string} [params.trigger] the trigger type 'index_price', 'mark_price', or 'last_price', default is 'last_price'
|
|
1889
|
+
* @param {float} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
1890
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1891
|
+
*/
|
|
1875
1892
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1876
|
-
/**
|
|
1877
|
-
* @method
|
|
1878
|
-
* @name deribit#createOrder
|
|
1879
|
-
* @description create a trade order
|
|
1880
|
-
* @see https://docs.deribit.com/#private-buy
|
|
1881
|
-
* @see https://docs.deribit.com/#private-sell
|
|
1882
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1883
|
-
* @param {string} type 'market' or 'limit'
|
|
1884
|
-
* @param {string} side 'buy' or 'sell'
|
|
1885
|
-
* @param {float} amount how much you want to trade in units of the base currency. For perpetual and inverse futures the amount is in USD units. For options it is in the underlying assets base currency.
|
|
1886
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1887
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1888
|
-
* @param {string} [params.trigger] the trigger type 'index_price', 'mark_price', or 'last_price', default is 'last_price'
|
|
1889
|
-
* @param {float} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
1890
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1891
|
-
*/
|
|
1892
1893
|
await this.loadMarkets();
|
|
1893
1894
|
const market = this.market(symbol);
|
|
1894
1895
|
const request = {
|
|
@@ -2050,22 +2051,22 @@ export default class deribit extends Exchange {
|
|
|
2050
2051
|
order['trades'] = trades;
|
|
2051
2052
|
return this.parseOrder(order, market);
|
|
2052
2053
|
}
|
|
2054
|
+
/**
|
|
2055
|
+
* @method
|
|
2056
|
+
* @name deribit#editOrder
|
|
2057
|
+
* @description edit a trade order
|
|
2058
|
+
* @see https://docs.deribit.com/#private-edit
|
|
2059
|
+
* @param {string} id edit order id
|
|
2060
|
+
* @param {string} [symbol] unified symbol of the market to edit an order in
|
|
2061
|
+
* @param {string} [type] 'market' or 'limit'
|
|
2062
|
+
* @param {string} [side] 'buy' or 'sell'
|
|
2063
|
+
* @param {float} amount how much you want to trade in units of the base currency. For perpetual and inverse futures the amount is in USD units. For options it is in the underlying assets base currency.
|
|
2064
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2065
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2066
|
+
* @param {float} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
2067
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2068
|
+
*/
|
|
2053
2069
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
2054
|
-
/**
|
|
2055
|
-
* @method
|
|
2056
|
-
* @name deribit#editOrder
|
|
2057
|
-
* @description edit a trade order
|
|
2058
|
-
* @see https://docs.deribit.com/#private-edit
|
|
2059
|
-
* @param {string} id edit order id
|
|
2060
|
-
* @param {string} [symbol] unified symbol of the market to edit an order in
|
|
2061
|
-
* @param {string} [type] 'market' or 'limit'
|
|
2062
|
-
* @param {string} [side] 'buy' or 'sell'
|
|
2063
|
-
* @param {float} amount how much you want to trade in units of the base currency. For perpetual and inverse futures the amount is in USD units. For options it is in the underlying assets base currency.
|
|
2064
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2065
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2066
|
-
* @param {float} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
2067
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2068
|
-
*/
|
|
2069
2070
|
if (amount === undefined) {
|
|
2070
2071
|
throw new ArgumentsRequired(this.id + ' editOrder() requires an amount argument');
|
|
2071
2072
|
}
|
|
@@ -2095,17 +2096,17 @@ export default class deribit extends Exchange {
|
|
|
2095
2096
|
order['trades'] = trades;
|
|
2096
2097
|
return this.parseOrder(order);
|
|
2097
2098
|
}
|
|
2099
|
+
/**
|
|
2100
|
+
* @method
|
|
2101
|
+
* @name deribit#cancelOrder
|
|
2102
|
+
* @description cancels an open order
|
|
2103
|
+
* @see https://docs.deribit.com/#private-cancel
|
|
2104
|
+
* @param {string} id order id
|
|
2105
|
+
* @param {string} symbol not used by deribit cancelOrder ()
|
|
2106
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2107
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2108
|
+
*/
|
|
2098
2109
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
2099
|
-
/**
|
|
2100
|
-
* @method
|
|
2101
|
-
* @name deribit#cancelOrder
|
|
2102
|
-
* @description cancels an open order
|
|
2103
|
-
* @see https://docs.deribit.com/#private-cancel
|
|
2104
|
-
* @param {string} id order id
|
|
2105
|
-
* @param {string} symbol not used by deribit cancelOrder ()
|
|
2106
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2107
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2108
|
-
*/
|
|
2109
2110
|
await this.loadMarkets();
|
|
2110
2111
|
const request = {
|
|
2111
2112
|
'order_id': id,
|
|
@@ -2114,17 +2115,17 @@ export default class deribit extends Exchange {
|
|
|
2114
2115
|
const result = this.safeDict(response, 'result', {});
|
|
2115
2116
|
return this.parseOrder(result);
|
|
2116
2117
|
}
|
|
2118
|
+
/**
|
|
2119
|
+
* @method
|
|
2120
|
+
* @name deribit#cancelAllOrders
|
|
2121
|
+
* @description cancel all open orders
|
|
2122
|
+
* @see https://docs.deribit.com/#private-cancel_all
|
|
2123
|
+
* @see https://docs.deribit.com/#private-cancel_all_by_instrument
|
|
2124
|
+
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2125
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2126
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2127
|
+
*/
|
|
2117
2128
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
2118
|
-
/**
|
|
2119
|
-
* @method
|
|
2120
|
-
* @name deribit#cancelAllOrders
|
|
2121
|
-
* @description cancel all open orders
|
|
2122
|
-
* @see https://docs.deribit.com/#private-cancel_all
|
|
2123
|
-
* @see https://docs.deribit.com/#private-cancel_all_by_instrument
|
|
2124
|
-
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2125
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2126
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2127
|
-
*/
|
|
2128
2129
|
await this.loadMarkets();
|
|
2129
2130
|
const request = {};
|
|
2130
2131
|
let response = undefined;
|
|
@@ -2152,19 +2153,19 @@ export default class deribit extends Exchange {
|
|
|
2152
2153
|
}),
|
|
2153
2154
|
];
|
|
2154
2155
|
}
|
|
2156
|
+
/**
|
|
2157
|
+
* @method
|
|
2158
|
+
* @name deribit#fetchOpenOrders
|
|
2159
|
+
* @description fetch all unfilled currently open orders
|
|
2160
|
+
* @see https://docs.deribit.com/#private-get_open_orders_by_currency
|
|
2161
|
+
* @see https://docs.deribit.com/#private-get_open_orders_by_instrument
|
|
2162
|
+
* @param {string} symbol unified market symbol
|
|
2163
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2164
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2165
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2166
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2167
|
+
*/
|
|
2155
2168
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2156
|
-
/**
|
|
2157
|
-
* @method
|
|
2158
|
-
* @name deribit#fetchOpenOrders
|
|
2159
|
-
* @description fetch all unfilled currently open orders
|
|
2160
|
-
* @see https://docs.deribit.com/#private-get_open_orders_by_currency
|
|
2161
|
-
* @see https://docs.deribit.com/#private-get_open_orders_by_instrument
|
|
2162
|
-
* @param {string} symbol unified market symbol
|
|
2163
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2164
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2165
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2166
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2167
|
-
*/
|
|
2168
2169
|
await this.loadMarkets();
|
|
2169
2170
|
const request = {};
|
|
2170
2171
|
let market = undefined;
|
|
@@ -2183,19 +2184,19 @@ export default class deribit extends Exchange {
|
|
|
2183
2184
|
const result = this.safeList(response, 'result', []);
|
|
2184
2185
|
return this.parseOrders(result, market, since, limit);
|
|
2185
2186
|
}
|
|
2187
|
+
/**
|
|
2188
|
+
* @method
|
|
2189
|
+
* @name deribit#fetchClosedOrders
|
|
2190
|
+
* @description fetches information on multiple closed orders made by the user
|
|
2191
|
+
* @see https://docs.deribit.com/#private-get_order_history_by_currency
|
|
2192
|
+
* @see https://docs.deribit.com/#private-get_order_history_by_instrument
|
|
2193
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2194
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2195
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2196
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2197
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2198
|
+
*/
|
|
2186
2199
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2187
|
-
/**
|
|
2188
|
-
* @method
|
|
2189
|
-
* @name deribit#fetchClosedOrders
|
|
2190
|
-
* @description fetches information on multiple closed orders made by the user
|
|
2191
|
-
* @see https://docs.deribit.com/#private-get_order_history_by_currency
|
|
2192
|
-
* @see https://docs.deribit.com/#private-get_order_history_by_instrument
|
|
2193
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2194
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2195
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2196
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2197
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2198
|
-
*/
|
|
2199
2200
|
await this.loadMarkets();
|
|
2200
2201
|
const request = {};
|
|
2201
2202
|
let market = undefined;
|
|
@@ -2214,19 +2215,19 @@ export default class deribit extends Exchange {
|
|
|
2214
2215
|
const result = this.safeList(response, 'result', []);
|
|
2215
2216
|
return this.parseOrders(result, market, since, limit);
|
|
2216
2217
|
}
|
|
2218
|
+
/**
|
|
2219
|
+
* @method
|
|
2220
|
+
* @name deribit#fetchOrderTrades
|
|
2221
|
+
* @description fetch all the trades made from a single order
|
|
2222
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_order
|
|
2223
|
+
* @param {string} id order id
|
|
2224
|
+
* @param {string} symbol unified market symbol
|
|
2225
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2226
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2227
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2228
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2229
|
+
*/
|
|
2217
2230
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2218
|
-
/**
|
|
2219
|
-
* @method
|
|
2220
|
-
* @name deribit#fetchOrderTrades
|
|
2221
|
-
* @description fetch all the trades made from a single order
|
|
2222
|
-
* @see https://docs.deribit.com/#private-get_user_trades_by_order
|
|
2223
|
-
* @param {string} id order id
|
|
2224
|
-
* @param {string} symbol unified market symbol
|
|
2225
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2226
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2227
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2228
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2229
|
-
*/
|
|
2230
2231
|
await this.loadMarkets();
|
|
2231
2232
|
const request = {
|
|
2232
2233
|
'order_id': id,
|
|
@@ -2268,21 +2269,21 @@ export default class deribit extends Exchange {
|
|
|
2268
2269
|
const result = this.safeList(response, 'result', []);
|
|
2269
2270
|
return this.parseTrades(result, undefined, since, limit);
|
|
2270
2271
|
}
|
|
2272
|
+
/**
|
|
2273
|
+
* @method
|
|
2274
|
+
* @name deribit#fetchMyTrades
|
|
2275
|
+
* @description fetch all trades made by the user
|
|
2276
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_currency
|
|
2277
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_currency_and_time
|
|
2278
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_instrument
|
|
2279
|
+
* @see https://docs.deribit.com/#private-get_user_trades_by_instrument_and_time
|
|
2280
|
+
* @param {string} symbol unified market symbol
|
|
2281
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2282
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2283
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2284
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2285
|
+
*/
|
|
2271
2286
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2272
|
-
/**
|
|
2273
|
-
* @method
|
|
2274
|
-
* @name deribit#fetchMyTrades
|
|
2275
|
-
* @description fetch all trades made by the user
|
|
2276
|
-
* @see https://docs.deribit.com/#private-get_user_trades_by_currency
|
|
2277
|
-
* @see https://docs.deribit.com/#private-get_user_trades_by_currency_and_time
|
|
2278
|
-
* @see https://docs.deribit.com/#private-get_user_trades_by_instrument
|
|
2279
|
-
* @see https://docs.deribit.com/#private-get_user_trades_by_instrument_and_time
|
|
2280
|
-
* @param {string} symbol unified market symbol
|
|
2281
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2282
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2283
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2284
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2285
|
-
*/
|
|
2286
2287
|
await this.loadMarkets();
|
|
2287
2288
|
const request = {
|
|
2288
2289
|
'include_old': true,
|
|
@@ -2352,18 +2353,18 @@ export default class deribit extends Exchange {
|
|
|
2352
2353
|
const trades = this.safeList(result, 'trades', []);
|
|
2353
2354
|
return this.parseTrades(trades, market, since, limit);
|
|
2354
2355
|
}
|
|
2356
|
+
/**
|
|
2357
|
+
* @method
|
|
2358
|
+
* @name deribit#fetchDeposits
|
|
2359
|
+
* @description fetch all deposits made to an account
|
|
2360
|
+
* @see https://docs.deribit.com/#private-get_deposits
|
|
2361
|
+
* @param {string} code unified currency code
|
|
2362
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2363
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2364
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2365
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2366
|
+
*/
|
|
2355
2367
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2356
|
-
/**
|
|
2357
|
-
* @method
|
|
2358
|
-
* @name deribit#fetchDeposits
|
|
2359
|
-
* @description fetch all deposits made to an account
|
|
2360
|
-
* @see https://docs.deribit.com/#private-get_deposits
|
|
2361
|
-
* @param {string} code unified currency code
|
|
2362
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2363
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2364
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2365
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2366
|
-
*/
|
|
2367
2368
|
if (code === undefined) {
|
|
2368
2369
|
throw new ArgumentsRequired(this.id + ' fetchDeposits() requires a currency code argument');
|
|
2369
2370
|
}
|
|
@@ -2400,18 +2401,18 @@ export default class deribit extends Exchange {
|
|
|
2400
2401
|
const data = this.safeList(result, 'data', []);
|
|
2401
2402
|
return this.parseTransactions(data, currency, since, limit, params);
|
|
2402
2403
|
}
|
|
2404
|
+
/**
|
|
2405
|
+
* @method
|
|
2406
|
+
* @name deribit#fetchWithdrawals
|
|
2407
|
+
* @description fetch all withdrawals made from an account
|
|
2408
|
+
* @see https://docs.deribit.com/#private-get_withdrawals
|
|
2409
|
+
* @param {string} code unified currency code
|
|
2410
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2411
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2412
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2413
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2414
|
+
*/
|
|
2403
2415
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2404
|
-
/**
|
|
2405
|
-
* @method
|
|
2406
|
-
* @name deribit#fetchWithdrawals
|
|
2407
|
-
* @description fetch all withdrawals made from an account
|
|
2408
|
-
* @see https://docs.deribit.com/#private-get_withdrawals
|
|
2409
|
-
* @param {string} code unified currency code
|
|
2410
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2411
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2412
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2413
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2414
|
-
*/
|
|
2415
2416
|
if (code === undefined) {
|
|
2416
2417
|
throw new ArgumentsRequired(this.id + ' fetchWithdrawals() requires a currency code argument');
|
|
2417
2418
|
}
|
|
@@ -2594,16 +2595,16 @@ export default class deribit extends Exchange {
|
|
|
2594
2595
|
'takeProfitPrice': undefined,
|
|
2595
2596
|
});
|
|
2596
2597
|
}
|
|
2598
|
+
/**
|
|
2599
|
+
* @method
|
|
2600
|
+
* @name deribit#fetchPosition
|
|
2601
|
+
* @description fetch data on a single open contract trade position
|
|
2602
|
+
* @see https://docs.deribit.com/#private-get_position
|
|
2603
|
+
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
2604
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2605
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2606
|
+
*/
|
|
2597
2607
|
async fetchPosition(symbol, params = {}) {
|
|
2598
|
-
/**
|
|
2599
|
-
* @method
|
|
2600
|
-
* @name deribit#fetchPosition
|
|
2601
|
-
* @description fetch data on a single open contract trade position
|
|
2602
|
-
* @see https://docs.deribit.com/#private-get_position
|
|
2603
|
-
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
2604
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2605
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2606
|
-
*/
|
|
2607
2608
|
await this.loadMarkets();
|
|
2608
2609
|
const market = this.market(symbol);
|
|
2609
2610
|
const request = {
|
|
@@ -2639,17 +2640,17 @@ export default class deribit extends Exchange {
|
|
|
2639
2640
|
const result = this.safeDict(response, 'result');
|
|
2640
2641
|
return this.parsePosition(result);
|
|
2641
2642
|
}
|
|
2643
|
+
/**
|
|
2644
|
+
* @method
|
|
2645
|
+
* @name deribit#fetchPositions
|
|
2646
|
+
* @description fetch all open positions
|
|
2647
|
+
* @see https://docs.deribit.com/#private-get_positions
|
|
2648
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2649
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2650
|
+
* @param {string} [params.kind] market type filter for positions 'future', 'option', 'spot', 'future_combo' or 'option_combo'
|
|
2651
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2652
|
+
*/
|
|
2642
2653
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
2643
|
-
/**
|
|
2644
|
-
* @method
|
|
2645
|
-
* @name deribit#fetchPositions
|
|
2646
|
-
* @description fetch all open positions
|
|
2647
|
-
* @see https://docs.deribit.com/#private-get_positions
|
|
2648
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2649
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2650
|
-
* @param {string} [params.kind] market type filter for positions 'future', 'option', 'spot', 'future_combo' or 'option_combo'
|
|
2651
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2652
|
-
*/
|
|
2653
2654
|
await this.loadMarkets();
|
|
2654
2655
|
let kind = this.safeString(params, 'kind');
|
|
2655
2656
|
let code = undefined;
|
|
@@ -2712,16 +2713,16 @@ export default class deribit extends Exchange {
|
|
|
2712
2713
|
const result = this.safeList(response, 'result');
|
|
2713
2714
|
return this.parsePositions(result, symbols);
|
|
2714
2715
|
}
|
|
2716
|
+
/**
|
|
2717
|
+
* @method
|
|
2718
|
+
* @name deribit#fetchVolatilityHistory
|
|
2719
|
+
* @description fetch the historical volatility of an option market based on an underlying asset
|
|
2720
|
+
* @see https://docs.deribit.com/#public-get_historical_volatility
|
|
2721
|
+
* @param {string} code unified currency code
|
|
2722
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2723
|
+
* @returns {object[]} a list of [volatility history objects]{@link https://docs.ccxt.com/#/?id=volatility-structure}
|
|
2724
|
+
*/
|
|
2715
2725
|
async fetchVolatilityHistory(code, params = {}) {
|
|
2716
|
-
/**
|
|
2717
|
-
* @method
|
|
2718
|
-
* @name deribit#fetchVolatilityHistory
|
|
2719
|
-
* @description fetch the historical volatility of an option market based on an underlying asset
|
|
2720
|
-
* @see https://docs.deribit.com/#public-get_historical_volatility
|
|
2721
|
-
* @param {string} code unified currency code
|
|
2722
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2723
|
-
* @returns {object[]} a list of [volatility history objects]{@link https://docs.ccxt.com/#/?id=volatility-structure}
|
|
2724
|
-
*/
|
|
2725
2726
|
await this.loadMarkets();
|
|
2726
2727
|
const currency = this.currency(code);
|
|
2727
2728
|
const request = {
|
|
@@ -2773,18 +2774,18 @@ export default class deribit extends Exchange {
|
|
|
2773
2774
|
}
|
|
2774
2775
|
return result;
|
|
2775
2776
|
}
|
|
2777
|
+
/**
|
|
2778
|
+
* @method
|
|
2779
|
+
* @name deribit#fetchTransfers
|
|
2780
|
+
* @description fetch a history of internal transfers made on an account
|
|
2781
|
+
* @see https://docs.deribit.com/#private-get_transfers
|
|
2782
|
+
* @param {string} code unified currency code of the currency transferred
|
|
2783
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2784
|
+
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2785
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2786
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2787
|
+
*/
|
|
2776
2788
|
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2777
|
-
/**
|
|
2778
|
-
* @method
|
|
2779
|
-
* @name deribit#fetchTransfers
|
|
2780
|
-
* @description fetch a history of internal transfers made on an account
|
|
2781
|
-
* @see https://docs.deribit.com/#private-get_transfers
|
|
2782
|
-
* @param {string} code unified currency code of the currency transferred
|
|
2783
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2784
|
-
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2785
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2786
|
-
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2787
|
-
*/
|
|
2788
2789
|
if (code === undefined) {
|
|
2789
2790
|
throw new ArgumentsRequired(this.id + ' fetchTransfers() requires a currency code argument');
|
|
2790
2791
|
}
|
|
@@ -2834,20 +2835,20 @@ export default class deribit extends Exchange {
|
|
|
2834
2835
|
const transfers = this.safeList(result, 'data', []);
|
|
2835
2836
|
return this.parseTransfers(transfers, currency, since, limit, params);
|
|
2836
2837
|
}
|
|
2838
|
+
/**
|
|
2839
|
+
* @method
|
|
2840
|
+
* @name deribit#transfer
|
|
2841
|
+
* @description transfer currency internally between wallets on the same account
|
|
2842
|
+
* @see https://docs.deribit.com/#private-submit_transfer_to_user
|
|
2843
|
+
* @see https://docs.deribit.com/#private-submit_transfer_to_subaccount
|
|
2844
|
+
* @param {string} code unified currency code
|
|
2845
|
+
* @param {float} amount amount to transfer
|
|
2846
|
+
* @param {string} fromAccount account to transfer from
|
|
2847
|
+
* @param {string} toAccount account to transfer to
|
|
2848
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2849
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2850
|
+
*/
|
|
2837
2851
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
2838
|
-
/**
|
|
2839
|
-
* @method
|
|
2840
|
-
* @name deribit#transfer
|
|
2841
|
-
* @description transfer currency internally between wallets on the same account
|
|
2842
|
-
* @see https://docs.deribit.com/#private-submit_transfer_to_user
|
|
2843
|
-
* @see https://docs.deribit.com/#private-submit_transfer_to_subaccount
|
|
2844
|
-
* @param {string} code unified currency code
|
|
2845
|
-
* @param {float} amount amount to transfer
|
|
2846
|
-
* @param {string} fromAccount account to transfer from
|
|
2847
|
-
* @param {string} toAccount account to transfer to
|
|
2848
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2849
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2850
|
-
*/
|
|
2851
2852
|
await this.loadMarkets();
|
|
2852
2853
|
const currency = this.currency(code);
|
|
2853
2854
|
const request = {
|
|
@@ -2928,19 +2929,19 @@ export default class deribit extends Exchange {
|
|
|
2928
2929
|
};
|
|
2929
2930
|
return this.safeString(statuses, status, status);
|
|
2930
2931
|
}
|
|
2932
|
+
/**
|
|
2933
|
+
* @method
|
|
2934
|
+
* @name deribit#withdraw
|
|
2935
|
+
* @description make a withdrawal
|
|
2936
|
+
* @see https://docs.deribit.com/#private-withdraw
|
|
2937
|
+
* @param {string} code unified currency code
|
|
2938
|
+
* @param {float} amount the amount to withdraw
|
|
2939
|
+
* @param {string} address the address to withdraw to
|
|
2940
|
+
* @param {string} tag
|
|
2941
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2942
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2943
|
+
*/
|
|
2931
2944
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2932
|
-
/**
|
|
2933
|
-
* @method
|
|
2934
|
-
* @name deribit#withdraw
|
|
2935
|
-
* @description make a withdrawal
|
|
2936
|
-
* @see https://docs.deribit.com/#private-withdraw
|
|
2937
|
-
* @param {string} code unified currency code
|
|
2938
|
-
* @param {float} amount the amount to withdraw
|
|
2939
|
-
* @param {string} address the address to withdraw to
|
|
2940
|
-
* @param {string} tag
|
|
2941
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2942
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2943
|
-
*/
|
|
2944
2945
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2945
2946
|
this.checkAddress(address);
|
|
2946
2947
|
await this.loadMarkets();
|
|
@@ -2984,16 +2985,16 @@ export default class deribit extends Exchange {
|
|
|
2984
2985
|
'networks': {},
|
|
2985
2986
|
};
|
|
2986
2987
|
}
|
|
2988
|
+
/**
|
|
2989
|
+
* @method
|
|
2990
|
+
* @name deribit#fetchDepositWithdrawFees
|
|
2991
|
+
* @description fetch deposit and withdraw fees
|
|
2992
|
+
* @see https://docs.deribit.com/#public-get_currencies
|
|
2993
|
+
* @param {string[]|undefined} codes list of unified currency codes
|
|
2994
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2995
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2996
|
+
*/
|
|
2987
2997
|
async fetchDepositWithdrawFees(codes = undefined, params = {}) {
|
|
2988
|
-
/**
|
|
2989
|
-
* @method
|
|
2990
|
-
* @name deribit#fetchDepositWithdrawFees
|
|
2991
|
-
* @description fetch deposit and withdraw fees
|
|
2992
|
-
* @see https://docs.deribit.com/#public-get_currencies
|
|
2993
|
-
* @param {string[]|undefined} codes list of unified currency codes
|
|
2994
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2995
|
-
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2996
|
-
*/
|
|
2997
2998
|
await this.loadMarkets();
|
|
2998
2999
|
const response = await this.publicGetGetCurrencies(params);
|
|
2999
3000
|
//
|
|
@@ -3021,18 +3022,18 @@ export default class deribit extends Exchange {
|
|
|
3021
3022
|
const data = this.safeList(response, 'result', []);
|
|
3022
3023
|
return this.parseDepositWithdrawFees(data, codes, 'currency');
|
|
3023
3024
|
}
|
|
3025
|
+
/**
|
|
3026
|
+
* @method
|
|
3027
|
+
* @name deribit#fetchFundingRate
|
|
3028
|
+
* @description fetch the current funding rate
|
|
3029
|
+
* @see https://docs.deribit.com/#public-get_funding_rate_value
|
|
3030
|
+
* @param {string} symbol unified market symbol
|
|
3031
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3032
|
+
* @param {int} [params.start_timestamp] fetch funding rate starting from this timestamp
|
|
3033
|
+
* @param {int} [params.end_timestamp] fetch funding rate ending at this timestamp
|
|
3034
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3035
|
+
*/
|
|
3024
3036
|
async fetchFundingRate(symbol, params = {}) {
|
|
3025
|
-
/**
|
|
3026
|
-
* @method
|
|
3027
|
-
* @name deribit#fetchFundingRate
|
|
3028
|
-
* @description fetch the current funding rate
|
|
3029
|
-
* @see https://docs.deribit.com/#public-get_funding_rate_value
|
|
3030
|
-
* @param {string} symbol unified market symbol
|
|
3031
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3032
|
-
* @param {int} [params.start_timestamp] fetch funding rate starting from this timestamp
|
|
3033
|
-
* @param {int} [params.end_timestamp] fetch funding rate ending at this timestamp
|
|
3034
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3035
|
-
*/
|
|
3036
3037
|
await this.loadMarkets();
|
|
3037
3038
|
const market = this.market(symbol);
|
|
3038
3039
|
const time = this.milliseconds();
|
|
@@ -3054,18 +3055,20 @@ export default class deribit extends Exchange {
|
|
|
3054
3055
|
//
|
|
3055
3056
|
return this.parseFundingRate(response, market);
|
|
3056
3057
|
}
|
|
3058
|
+
/**
|
|
3059
|
+
* @method
|
|
3060
|
+
* @name deribit#fetchFundingRateHistory
|
|
3061
|
+
* @description fetch the current funding rate
|
|
3062
|
+
* @see https://docs.deribit.com/#public-get_funding_rate_history
|
|
3063
|
+
* @param {string} symbol unified market symbol
|
|
3064
|
+
* @param {int} [since] the earliest time in ms to fetch funding rate history for
|
|
3065
|
+
* @param {int} [limit] the maximum number of entries to retrieve
|
|
3066
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3067
|
+
* @param {int} [params.end_timestamp] fetch funding rate ending at this timestamp
|
|
3068
|
+
* @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)
|
|
3069
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3070
|
+
*/
|
|
3057
3071
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3058
|
-
/**
|
|
3059
|
-
* @method
|
|
3060
|
-
* @name deribit#fetchFundingRateHistory
|
|
3061
|
-
* @description fetch the current funding rate
|
|
3062
|
-
* @see https://docs.deribit.com/#public-get_funding_rate_history
|
|
3063
|
-
* @param {string} symbol unified market symbol
|
|
3064
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3065
|
-
* @param {int} [params.end_timestamp] fetch funding rate ending at this timestamp
|
|
3066
|
-
* @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)
|
|
3067
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3068
|
-
*/
|
|
3069
3072
|
await this.loadMarkets();
|
|
3070
3073
|
const market = this.market(symbol);
|
|
3071
3074
|
let paginate = false;
|
|
@@ -3151,19 +3154,19 @@ export default class deribit extends Exchange {
|
|
|
3151
3154
|
'interval': '8h',
|
|
3152
3155
|
};
|
|
3153
3156
|
}
|
|
3157
|
+
/**
|
|
3158
|
+
* @method
|
|
3159
|
+
* @name deribit#fetchLiquidations
|
|
3160
|
+
* @description retrieves the public liquidations of a trading pair
|
|
3161
|
+
* @see https://docs.deribit.com/#public-get_last_settlements_by_currency
|
|
3162
|
+
* @param {string} symbol unified CCXT market symbol
|
|
3163
|
+
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
3164
|
+
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
3165
|
+
* @param {object} [params] exchange specific parameters for the deribit api endpoint
|
|
3166
|
+
* @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)
|
|
3167
|
+
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
3168
|
+
*/
|
|
3154
3169
|
async fetchLiquidations(symbol, since = undefined, limit = undefined, params = {}) {
|
|
3155
|
-
/**
|
|
3156
|
-
* @method
|
|
3157
|
-
* @name deribit#fetchLiquidations
|
|
3158
|
-
* @description retrieves the public liquidations of a trading pair
|
|
3159
|
-
* @see https://docs.deribit.com/#public-get_last_settlements_by_currency
|
|
3160
|
-
* @param {string} symbol unified CCXT market symbol
|
|
3161
|
-
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
3162
|
-
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
3163
|
-
* @param {object} [params] exchange specific parameters for the deribit api endpoint
|
|
3164
|
-
* @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)
|
|
3165
|
-
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
3166
|
-
*/
|
|
3167
3170
|
await this.loadMarkets();
|
|
3168
3171
|
let paginate = false;
|
|
3169
3172
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLiquidations', 'paginate');
|
|
@@ -3229,18 +3232,18 @@ export default class deribit extends Exchange {
|
|
|
3229
3232
|
}
|
|
3230
3233
|
return data;
|
|
3231
3234
|
}
|
|
3235
|
+
/**
|
|
3236
|
+
* @method
|
|
3237
|
+
* @name deribit#fetchMyLiquidations
|
|
3238
|
+
* @description retrieves the users liquidated positions
|
|
3239
|
+
* @see https://docs.deribit.com/#private-get_settlement_history_by_instrument
|
|
3240
|
+
* @param {string} symbol unified CCXT market symbol
|
|
3241
|
+
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
3242
|
+
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
3243
|
+
* @param {object} [params] exchange specific parameters for the deribit api endpoint
|
|
3244
|
+
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
3245
|
+
*/
|
|
3232
3246
|
async fetchMyLiquidations(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3233
|
-
/**
|
|
3234
|
-
* @method
|
|
3235
|
-
* @name deribit#fetchMyLiquidations
|
|
3236
|
-
* @description retrieves the users liquidated positions
|
|
3237
|
-
* @see https://docs.deribit.com/#private-get_settlement_history_by_instrument
|
|
3238
|
-
* @param {string} symbol unified CCXT market symbol
|
|
3239
|
-
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
3240
|
-
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
3241
|
-
* @param {object} [params] exchange specific parameters for the deribit api endpoint
|
|
3242
|
-
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
3243
|
-
*/
|
|
3244
3247
|
if (symbol === undefined) {
|
|
3245
3248
|
throw new ArgumentsRequired(this.id + ' fetchMyLiquidations() requires a symbol argument');
|
|
3246
3249
|
}
|
|
@@ -3314,16 +3317,16 @@ export default class deribit extends Exchange {
|
|
|
3314
3317
|
'datetime': this.iso8601(timestamp),
|
|
3315
3318
|
});
|
|
3316
3319
|
}
|
|
3320
|
+
/**
|
|
3321
|
+
* @method
|
|
3322
|
+
* @name deribit#fetchGreeks
|
|
3323
|
+
* @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
|
3324
|
+
* @see https://docs.deribit.com/#public-ticker
|
|
3325
|
+
* @param {string} symbol unified symbol of the market to fetch greeks for
|
|
3326
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3327
|
+
* @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
|
|
3328
|
+
*/
|
|
3317
3329
|
async fetchGreeks(symbol, params = {}) {
|
|
3318
|
-
/**
|
|
3319
|
-
* @method
|
|
3320
|
-
* @name deribit#fetchGreeks
|
|
3321
|
-
* @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
|
3322
|
-
* @see https://docs.deribit.com/#public-ticker
|
|
3323
|
-
* @param {string} symbol unified symbol of the market to fetch greeks for
|
|
3324
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3325
|
-
* @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
|
|
3326
|
-
*/
|
|
3327
3330
|
await this.loadMarkets();
|
|
3328
3331
|
const market = this.market(symbol);
|
|
3329
3332
|
const request = {
|
|
@@ -3445,16 +3448,16 @@ export default class deribit extends Exchange {
|
|
|
3445
3448
|
'info': greeks,
|
|
3446
3449
|
};
|
|
3447
3450
|
}
|
|
3451
|
+
/**
|
|
3452
|
+
* @method
|
|
3453
|
+
* @name deribit#fetchOption
|
|
3454
|
+
* @description fetches option data that is commonly found in an option chain
|
|
3455
|
+
* @see https://docs.deribit.com/#public-get_book_summary_by_instrument
|
|
3456
|
+
* @param {string} symbol unified market symbol
|
|
3457
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3458
|
+
* @returns {object} an [option chain structure]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
|
|
3459
|
+
*/
|
|
3448
3460
|
async fetchOption(symbol, params = {}) {
|
|
3449
|
-
/**
|
|
3450
|
-
* @method
|
|
3451
|
-
* @name deribit#fetchOption
|
|
3452
|
-
* @description fetches option data that is commonly found in an option chain
|
|
3453
|
-
* @see https://docs.deribit.com/#public-get_book_summary_by_instrument
|
|
3454
|
-
* @param {string} symbol unified market symbol
|
|
3455
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3456
|
-
* @returns {object} an [option chain structure]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
|
|
3457
|
-
*/
|
|
3458
3461
|
await this.loadMarkets();
|
|
3459
3462
|
const market = this.market(symbol);
|
|
3460
3463
|
const request = {
|
|
@@ -3497,16 +3500,16 @@ export default class deribit extends Exchange {
|
|
|
3497
3500
|
const chain = this.safeDict(result, 0, {});
|
|
3498
3501
|
return this.parseOption(chain, undefined, market);
|
|
3499
3502
|
}
|
|
3503
|
+
/**
|
|
3504
|
+
* @method
|
|
3505
|
+
* @name deribit#fetchOptionChain
|
|
3506
|
+
* @description fetches data for an underlying asset that is commonly found in an option chain
|
|
3507
|
+
* @see https://docs.deribit.com/#public-get_book_summary_by_currency
|
|
3508
|
+
* @param {string} code base currency to fetch an option chain for
|
|
3509
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3510
|
+
* @returns {object} a list of [option chain structures]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
|
|
3511
|
+
*/
|
|
3500
3512
|
async fetchOptionChain(code, params = {}) {
|
|
3501
|
-
/**
|
|
3502
|
-
* @method
|
|
3503
|
-
* @name deribit#fetchOptionChain
|
|
3504
|
-
* @description fetches data for an underlying asset that is commonly found in an option chain
|
|
3505
|
-
* @see https://docs.deribit.com/#public-get_book_summary_by_currency
|
|
3506
|
-
* @param {string} currency base currency to fetch an option chain for
|
|
3507
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3508
|
-
* @returns {object} a list of [option chain structures]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
|
|
3509
|
-
*/
|
|
3510
3513
|
await this.loadMarkets();
|
|
3511
3514
|
const currency = this.currency(code);
|
|
3512
3515
|
const request = {
|