ccxt 4.5.82 → 4.5.83
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 +5 -4
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/abstract/prediction/sxbet.js +11 -0
- package/dist/cjs/src/apex.js +1 -0
- package/dist/cjs/src/aster.js +2 -2
- package/dist/cjs/src/base/Exchange.js +1 -1
- package/dist/cjs/src/bigone.js +2 -2
- package/dist/cjs/src/binance.js +10 -10
- package/dist/cjs/src/bingx.js +3 -3
- package/dist/cjs/src/bit2c.js +4 -4
- package/dist/cjs/src/bitbank.js +15 -15
- package/dist/cjs/src/bitfinex.js +15 -15
- package/dist/cjs/src/bitget.js +109 -73
- package/dist/cjs/src/bitmex.js +7 -7
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +6 -6
- package/dist/cjs/src/bitso.js +18 -18
- package/dist/cjs/src/bitstamp.js +5 -5
- package/dist/cjs/src/bitteam.js +32 -32
- package/dist/cjs/src/bittrade.js +10 -10
- package/dist/cjs/src/bitvavo.js +9 -9
- package/dist/cjs/src/blockchaincom.js +2 -2
- package/dist/cjs/src/btcbox.js +2 -2
- package/dist/cjs/src/btcmarkets.js +2 -2
- package/dist/cjs/src/btcturk.js +2 -2
- package/dist/cjs/src/btse.js +2 -2
- package/dist/cjs/src/bybitid.js +4 -0
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinbaseexchange.js +13 -13
- package/dist/cjs/src/coincheck.js +4 -4
- package/dist/cjs/src/coinex.js +10 -10
- package/dist/cjs/src/coinmate.js +4 -4
- package/dist/cjs/src/coinone.js +4 -4
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +5 -5
- package/dist/cjs/src/deribit.js +31 -31
- package/dist/cjs/src/derive.js +1 -1
- package/dist/cjs/src/digifinex.js +31 -31
- package/dist/cjs/src/gate.js +25 -25
- package/dist/cjs/src/gemini.js +5 -5
- package/dist/cjs/src/grvt.js +1 -1
- package/dist/cjs/src/hibachi.js +5 -5
- package/dist/cjs/src/hitbtc.js +15 -15
- package/dist/cjs/src/hollaex.js +15 -15
- package/dist/cjs/src/htx.js +52 -52
- package/dist/cjs/src/hyperliquid.js +2 -2
- package/dist/cjs/src/independentreserve.js +2 -2
- package/dist/cjs/src/indodax.js +8 -8
- package/dist/cjs/src/kraken.js +29 -29
- package/dist/cjs/src/krakenfutures.js +16 -16
- package/dist/cjs/src/kucoin.js +15 -15
- package/dist/cjs/src/latoken.js +8 -8
- package/dist/cjs/src/lbank.js +31 -31
- package/dist/cjs/src/lighter.js +2 -2
- package/dist/cjs/src/luno.js +2 -2
- package/dist/cjs/src/mercado.js +12 -12
- package/dist/cjs/src/mexc.js +27 -27
- package/dist/cjs/src/modetrade.js +10 -10
- package/dist/cjs/src/ndax.js +4 -4
- package/dist/cjs/src/okx.js +19 -20
- package/dist/cjs/src/onetrading.js +7 -7
- package/dist/cjs/src/p2b.js +8 -8
- package/dist/cjs/src/pacifica.js +9 -3
- package/dist/cjs/src/paymium.js +2 -2
- package/dist/cjs/src/phemex.js +37 -37
- package/dist/cjs/src/poloniex.js +14 -14
- package/dist/cjs/src/prediction/sxbet.js +2710 -0
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/apex.js +6 -6
- package/dist/cjs/src/pro/aster.js +8 -8
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +26 -26
- package/dist/cjs/src/pro/bingx.js +11 -11
- package/dist/cjs/src/pro/bitfinex.js +11 -11
- package/dist/cjs/src/pro/bitget.js +20 -20
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +12 -12
- package/dist/cjs/src/pro/bitopro.js +5 -5
- package/dist/cjs/src/pro/bitrue.js +7 -7
- package/dist/cjs/src/pro/bitstamp.js +5 -5
- package/dist/cjs/src/pro/bittrade.js +11 -11
- package/dist/cjs/src/pro/bitvavo.js +16 -16
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/blofin.js +2 -2
- package/dist/cjs/src/pro/bybit.js +21 -21
- package/dist/cjs/src/pro/bydfi.js +2 -2
- package/dist/cjs/src/pro/cex.js +19 -19
- package/dist/cjs/src/pro/coinbase.js +2 -2
- package/dist/cjs/src/pro/coinbaseexchange.js +9 -9
- package/dist/cjs/src/pro/coinbaseinternational.js +2 -2
- package/dist/cjs/src/pro/coincheck.js +2 -2
- package/dist/cjs/src/pro/coinex.js +3 -3
- package/dist/cjs/src/pro/coinone.js +6 -6
- package/dist/cjs/src/pro/cryptocom.js +10 -10
- package/dist/cjs/src/pro/deribit.js +13 -13
- package/dist/cjs/src/pro/derive.js +4 -4
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/extended.js +16 -10
- package/dist/cjs/src/pro/gate.js +10 -10
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/grvt.js +2 -2
- package/dist/cjs/src/pro/hashkey.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +6 -6
- package/dist/cjs/src/pro/hollaex.js +3 -3
- package/dist/cjs/src/pro/htx.js +28 -28
- package/dist/cjs/src/pro/hyperliquid.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +7 -7
- package/dist/cjs/src/pro/krakenfutures.js +12 -12
- package/dist/cjs/src/pro/kucoin.js +12 -12
- package/dist/cjs/src/pro/lbank.js +16 -16
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +8 -8
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/mudrex.js +2 -2
- package/dist/cjs/src/pro/nado.js +3 -3
- package/dist/cjs/src/pro/ndax.js +6 -6
- package/dist/cjs/src/pro/okx.js +20 -20
- package/dist/cjs/src/pro/onetrading.js +14 -14
- package/dist/cjs/src/pro/p2b.js +5 -5
- package/dist/cjs/src/pro/pacifica.js +1 -1
- package/dist/cjs/src/pro/paradex.js +1 -1
- package/dist/cjs/src/pro/phemex.js +13 -13
- package/dist/cjs/src/pro/poloniex.js +17 -17
- package/dist/cjs/src/pro/toobit.js +2 -2
- package/dist/cjs/src/pro/upbit.js +4 -4
- package/dist/cjs/src/pro/weex.js +2 -2
- package/dist/cjs/src/pro/whitebit.js +12 -12
- package/dist/cjs/src/pro/woo.js +13 -13
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.js +3 -3
- package/dist/cjs/src/tokocrypto.js +20 -20
- package/dist/cjs/src/upbit.js +12 -12
- package/dist/cjs/src/whitebit.js +15 -15
- package/dist/cjs/src/woo.js +3 -3
- package/dist/cjs/src/woofipro.js +14 -14
- package/dist/cjs/src/zaif.js +9 -3
- package/dist/cjs/src/zebpay.js +1 -1
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/prediction/sxbet.d.ts +41 -0
- package/js/src/abstract/prediction/sxbet.js +11 -0
- package/js/src/alpaca.d.ts +28 -33
- package/js/src/apex.d.ts +28 -42
- package/js/src/apex.js +1 -0
- package/js/src/aster.d.ts +58 -108
- package/js/src/aster.js +2 -2
- package/js/src/backpack.d.ts +34 -48
- package/js/src/base/Exchange.d.ts +304 -320
- package/js/src/base/Exchange.js +1 -1
- package/js/src/bigone.d.ts +24 -29
- package/js/src/bigone.js +2 -2
- package/js/src/binance.d.ts +112 -138
- package/js/src/binance.js +10 -10
- package/js/src/binancecoinm.d.ts +3 -2
- package/js/src/binanceusdm.d.ts +3 -2
- package/js/src/bingx.d.ts +65 -84
- package/js/src/bingx.js +3 -3
- package/js/src/bit2c.d.ts +13 -18
- package/js/src/bit2c.js +4 -4
- package/js/src/bitbank.d.ts +16 -21
- package/js/src/bitbank.js +15 -15
- package/js/src/bitbns.d.ts +15 -20
- package/js/src/bitfinex.d.ts +46 -51
- package/js/src/bitfinex.js +15 -15
- package/js/src/bitflyer.d.ts +20 -25
- package/js/src/bitget.d.ts +105 -93
- package/js/src/bitget.js +109 -73
- package/js/src/bithumb.d.ts +26 -31
- package/js/src/bitmex.d.ts +48 -65
- package/js/src/bitmex.js +7 -7
- package/js/src/bitopro.d.ts +25 -41
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.d.ts +30 -45
- package/js/src/bitrue.js +6 -6
- package/js/src/bitso.d.ts +24 -29
- package/js/src/bitso.js +18 -18
- package/js/src/bitstamp.d.ts +36 -47
- package/js/src/bitstamp.js +5 -5
- package/js/src/bitteam.d.ts +22 -27
- package/js/src/bitteam.js +32 -32
- package/js/src/bittrade.d.ts +35 -46
- package/js/src/bittrade.js +10 -10
- package/js/src/bitvavo.d.ts +43 -48
- package/js/src/bitvavo.js +9 -9
- package/js/src/blockchaincom.d.ts +26 -31
- package/js/src/blockchaincom.js +2 -2
- package/js/src/blofin.d.ts +38 -43
- package/js/src/btcbox.d.ts +14 -19
- package/js/src/btcbox.js +2 -2
- package/js/src/btcmarkets.d.ts +25 -30
- package/js/src/btcmarkets.js +2 -2
- package/js/src/btcturk.d.ts +13 -18
- package/js/src/btcturk.js +2 -2
- package/js/src/btse.d.ts +44 -50
- package/js/src/btse.js +2 -2
- package/js/src/bullish.d.ts +35 -57
- package/js/src/bybit.d.ts +95 -106
- package/js/src/bybitid.js +4 -0
- package/js/src/bydfi.d.ts +37 -48
- package/js/src/cex.d.ts +29 -34
- package/js/src/coinbase.d.ts +66 -82
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbaseexchange.d.ts +33 -43
- package/js/src/coinbaseexchange.js +13 -13
- package/js/src/coinbaseinternational.d.ts +34 -73
- package/js/src/coincheck.d.ts +13 -18
- package/js/src/coincheck.js +4 -4
- package/js/src/coinex.d.ts +63 -68
- package/js/src/coinex.js +10 -10
- package/js/src/coinmate.d.ts +15 -20
- package/js/src/coinmate.js +4 -4
- package/js/src/coinone.d.ts +14 -19
- package/js/src/coinone.js +4 -4
- package/js/src/coinsph.d.ts +32 -37
- package/js/src/coinsph.js +5 -5
- package/js/src/coinspot.d.ts +10 -15
- package/js/src/cryptocom.d.ts +48 -64
- package/js/src/cryptocom.js +5 -5
- package/js/src/cryptomus.d.ts +15 -23
- package/js/src/deepcoin.d.ts +43 -48
- package/js/src/delta.d.ts +43 -54
- package/js/src/deribit.d.ts +48 -69
- package/js/src/deribit.js +31 -31
- package/js/src/derive.d.ts +28 -42
- package/js/src/derive.js +1 -1
- package/js/src/digifinex.d.ts +54 -67
- package/js/src/digifinex.js +31 -31
- package/js/src/dydx.d.ts +26 -31
- package/js/src/extended.d.ts +51 -56
- package/js/src/foxbit.d.ts +34 -64
- package/js/src/gate.d.ts +94 -162
- package/js/src/gate.js +25 -25
- package/js/src/gemini.d.ts +33 -43
- package/js/src/gemini.js +5 -5
- package/js/src/grvt.d.ts +36 -47
- package/js/src/grvt.js +1 -1
- package/js/src/hashkey.d.ts +58 -78
- package/js/src/hibachi.d.ts +42 -52
- package/js/src/hibachi.js +5 -5
- package/js/src/hitbtc.d.ts +49 -56
- package/js/src/hitbtc.js +15 -15
- package/js/src/hollaex.d.ts +26 -31
- package/js/src/hollaex.js +15 -15
- package/js/src/htx.d.ts +80 -121
- package/js/src/htx.js +52 -52
- package/js/src/hyperliquid.d.ts +77 -127
- package/js/src/hyperliquid.js +2 -2
- package/js/src/independentreserve.d.ts +15 -20
- package/js/src/independentreserve.js +2 -2
- package/js/src/indodax.d.ts +19 -24
- package/js/src/indodax.js +8 -8
- package/js/src/kraken.d.ts +43 -55
- package/js/src/kraken.js +29 -29
- package/js/src/krakenfutures.d.ts +34 -39
- package/js/src/krakenfutures.js +16 -16
- package/js/src/kucoin.d.ts +121 -132
- package/js/src/kucoin.js +15 -15
- package/js/src/kucoinfutures.d.ts +4 -4
- package/js/src/latoken.d.ts +24 -29
- package/js/src/latoken.js +8 -8
- package/js/src/lbank.d.ts +40 -53
- package/js/src/lbank.js +31 -31
- package/js/src/lighter.d.ts +40 -45
- package/js/src/lighter.js +2 -2
- package/js/src/luno.d.ts +25 -30
- package/js/src/luno.js +2 -2
- package/js/src/mercado.d.ts +15 -20
- package/js/src/mercado.js +12 -12
- package/js/src/mexc.d.ts +70 -83
- package/js/src/mexc.js +27 -27
- package/js/src/modetrade.d.ts +43 -57
- package/js/src/modetrade.js +10 -10
- package/js/src/mudrex.d.ts +25 -35
- package/js/src/nado.d.ts +45 -50
- package/js/src/ndax.d.ts +27 -32
- package/js/src/ndax.js +4 -4
- package/js/src/okx.d.ts +97 -108
- package/js/src/okx.js +19 -20
- package/js/src/onetrading.d.ts +23 -31
- package/js/src/onetrading.js +7 -7
- package/js/src/p2b.d.ts +17 -22
- package/js/src/p2b.js +8 -8
- package/js/src/pacifica.d.ts +55 -73
- package/js/src/pacifica.js +9 -3
- package/js/src/paradex.d.ts +47 -68
- package/js/src/paymium.d.ts +12 -17
- package/js/src/paymium.js +2 -2
- package/js/src/phemex.d.ts +47 -52
- package/js/src/phemex.js +37 -37
- package/js/src/poloniex.d.ts +45 -50
- package/js/src/poloniex.js +14 -14
- package/js/src/prediction/sxbet.d.ts +595 -0
- package/js/src/prediction/sxbet.js +2708 -0
- package/js/src/pro/alpaca.d.ts +23 -23
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/apex.d.ts +28 -28
- package/js/src/pro/apex.js +6 -6
- package/js/src/pro/aster.d.ts +33 -33
- package/js/src/pro/aster.js +8 -8
- package/js/src/pro/backpack.d.ts +28 -28
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +57 -57
- package/js/src/pro/binance.js +26 -26
- package/js/src/pro/bingx.d.ts +26 -26
- package/js/src/pro/bingx.js +11 -11
- package/js/src/pro/bitfinex.d.ts +25 -25
- package/js/src/pro/bitfinex.js +11 -11
- package/js/src/pro/bitget.d.ts +41 -41
- package/js/src/pro/bitget.js +20 -20
- package/js/src/pro/bithumb.d.ts +15 -15
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmex.d.ts +29 -29
- package/js/src/pro/bitmex.js +12 -12
- package/js/src/pro/bitopro.d.ts +13 -13
- package/js/src/pro/bitopro.js +5 -5
- package/js/src/pro/bitrue.d.ts +25 -25
- package/js/src/pro/bitrue.js +7 -7
- package/js/src/pro/bitstamp.d.ts +21 -21
- package/js/src/pro/bitstamp.js +5 -5
- package/js/src/pro/bittrade.d.ts +19 -19
- package/js/src/pro/bittrade.js +11 -11
- package/js/src/pro/bitvavo.d.ts +62 -62
- package/js/src/pro/bitvavo.js +16 -16
- package/js/src/pro/blockchaincom.d.ts +19 -19
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/blofin.d.ts +23 -23
- package/js/src/pro/blofin.js +2 -2
- package/js/src/pro/bullish.d.ts +19 -25
- package/js/src/pro/bybit.d.ts +42 -45
- package/js/src/pro/bybit.js +21 -21
- package/js/src/pro/bydfi.d.ts +24 -24
- package/js/src/pro/bydfi.js +2 -2
- package/js/src/pro/cex.d.ts +37 -37
- package/js/src/pro/cex.js +19 -19
- package/js/src/pro/coinbase.d.ts +19 -19
- package/js/src/pro/coinbase.js +2 -2
- package/js/src/pro/coinbaseexchange.d.ts +25 -25
- package/js/src/pro/coinbaseexchange.js +9 -9
- package/js/src/pro/coinbaseinternational.d.ts +20 -20
- package/js/src/pro/coinbaseinternational.js +2 -2
- package/js/src/pro/coincheck.d.ts +5 -5
- package/js/src/pro/coincheck.js +2 -2
- package/js/src/pro/coinex.d.ts +24 -24
- package/js/src/pro/coinex.js +3 -3
- package/js/src/pro/coinone.d.ts +9 -11
- package/js/src/pro/coinone.js +6 -6
- package/js/src/pro/cryptocom.d.ts +40 -40
- package/js/src/pro/cryptocom.js +10 -10
- package/js/src/pro/deepcoin.d.ts +24 -32
- package/js/src/pro/deribit.d.ts +24 -24
- package/js/src/pro/deribit.js +13 -13
- package/js/src/pro/derive.d.ts +22 -22
- package/js/src/pro/derive.js +4 -4
- package/js/src/pro/dydx.d.ts +9 -9
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/extended.d.ts +22 -22
- package/js/src/pro/extended.js +16 -10
- package/js/src/pro/gate.d.ts +50 -50
- package/js/src/pro/gate.js +10 -10
- package/js/src/pro/gemini.d.ts +26 -26
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/grvt.d.ts +22 -22
- package/js/src/pro/grvt.js +2 -2
- package/js/src/pro/hashkey.d.ts +19 -19
- package/js/src/pro/hashkey.js +2 -2
- package/js/src/pro/hitbtc.d.ts +32 -32
- package/js/src/pro/hitbtc.js +6 -6
- package/js/src/pro/hollaex.d.ts +15 -17
- package/js/src/pro/hollaex.js +3 -3
- package/js/src/pro/htx.d.ts +36 -36
- package/js/src/pro/htx.js +28 -28
- package/js/src/pro/hyperliquid.d.ts +29 -31
- package/js/src/pro/hyperliquid.js +1 -1
- package/js/src/pro/independentreserve.d.ts +10 -10
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.d.ts +41 -55
- package/js/src/pro/kraken.js +7 -7
- package/js/src/pro/krakenfutures.d.ts +32 -32
- package/js/src/pro/krakenfutures.js +12 -12
- package/js/src/pro/kucoin.d.ts +69 -72
- package/js/src/pro/kucoin.js +12 -12
- package/js/src/pro/kucoinfutures.d.ts +4 -4
- package/js/src/pro/lbank.d.ts +22 -22
- package/js/src/pro/lbank.js +16 -16
- package/js/src/pro/lighter.d.ts +27 -27
- package/js/src/pro/luno.d.ts +8 -8
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.d.ts +33 -33
- package/js/src/pro/mexc.js +8 -8
- package/js/src/pro/modetrade.d.ts +37 -39
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/mudrex.d.ts +8 -8
- package/js/src/pro/mudrex.js +2 -2
- package/js/src/pro/nado.d.ts +42 -46
- package/js/src/pro/nado.js +3 -3
- package/js/src/pro/ndax.d.ts +12 -12
- package/js/src/pro/ndax.js +6 -6
- package/js/src/pro/okx.d.ts +49 -49
- package/js/src/pro/okx.js +20 -20
- package/js/src/pro/onetrading.d.ts +28 -28
- package/js/src/pro/onetrading.js +14 -14
- package/js/src/pro/p2b.d.ts +15 -19
- package/js/src/pro/p2b.js +5 -5
- package/js/src/pro/pacifica.d.ts +22 -22
- package/js/src/pro/pacifica.js +1 -1
- package/js/src/pro/paradex.d.ts +18 -18
- package/js/src/pro/paradex.js +1 -1
- package/js/src/pro/phemex.d.ts +25 -25
- package/js/src/pro/phemex.js +13 -13
- package/js/src/pro/poloniex.d.ts +30 -32
- package/js/src/pro/poloniex.js +17 -17
- package/js/src/pro/toobit.d.ts +31 -31
- package/js/src/pro/toobit.js +2 -2
- package/js/src/pro/upbit.d.ts +24 -24
- package/js/src/pro/upbit.js +4 -4
- package/js/src/pro/weex.d.ts +39 -39
- package/js/src/pro/weex.js +2 -2
- package/js/src/pro/whitebit.d.ts +26 -30
- package/js/src/pro/whitebit.js +12 -12
- package/js/src/pro/woo.d.ts +44 -46
- package/js/src/pro/woo.js +13 -13
- package/js/src/pro/woofipro.d.ts +39 -41
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.d.ts +20 -20
- package/js/src/pro/xt.js +3 -3
- package/js/src/revolutx.d.ts +17 -17
- package/js/src/tokocrypto.d.ts +25 -30
- package/js/src/tokocrypto.js +20 -20
- package/js/src/toobit.d.ts +45 -79
- package/js/src/upbit.d.ts +28 -61
- package/js/src/upbit.js +12 -12
- package/js/src/weex.d.ts +57 -68
- package/js/src/whitebit.d.ts +53 -64
- package/js/src/whitebit.js +15 -15
- package/js/src/woo.d.ts +61 -75
- package/js/src/woo.js +3 -3
- package/js/src/woofipro.d.ts +53 -67
- package/js/src/woofipro.js +14 -14
- package/js/src/xt.d.ts +57 -67
- package/js/src/zaif.d.ts +11 -16
- package/js/src/zaif.js +9 -3
- package/js/src/zebpay.d.ts +32 -37
- package/js/src/zebpay.js +1 -1
- package/package.json +2 -2
package/dist/cjs/src/btcturk.js
CHANGED
|
@@ -551,7 +551,7 @@ class btcturk extends btcturk$1["default"] {
|
|
|
551
551
|
await this.loadMarkets();
|
|
552
552
|
}
|
|
553
553
|
const tickers = await this.fetchTickers([symbol], params);
|
|
554
|
-
return this.
|
|
554
|
+
return this.safeDict(tickers, symbol);
|
|
555
555
|
}
|
|
556
556
|
parseTrade(trade, market = undefined) {
|
|
557
557
|
//
|
|
@@ -703,7 +703,7 @@ class btcturk extends btcturk$1["default"] {
|
|
|
703
703
|
const market = this.market(symbol);
|
|
704
704
|
const request = {
|
|
705
705
|
'symbol': market['id'],
|
|
706
|
-
'resolution': this.
|
|
706
|
+
'resolution': this.safeString(this.timeframes, timeframe, timeframe), // allows the user to pass custom timeframes if needed
|
|
707
707
|
};
|
|
708
708
|
const until = this.safeInteger(params, 'until', this.milliseconds());
|
|
709
709
|
request['to'] = this.parseToInt((until / 1000));
|
package/dist/cjs/src/btse.js
CHANGED
|
@@ -738,9 +738,9 @@ class btse extends btse$1["default"] {
|
|
|
738
738
|
type = 'swap';
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
let fees = this.
|
|
741
|
+
let fees = this.safeDict(this.fees, 'contract', {});
|
|
742
742
|
if (isSpot) {
|
|
743
|
-
fees = this.
|
|
743
|
+
fees = this.safeDict(this.fees, 'spot', {});
|
|
744
744
|
}
|
|
745
745
|
return this.safeMarketStructure({
|
|
746
746
|
'id': id,
|
package/dist/cjs/src/bybitid.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var bybit = require('./bybit.js');
|
|
6
|
+
var errors = require('./base/errors.js');
|
|
6
7
|
|
|
7
8
|
// ----------------------------------------------------------------------------
|
|
8
9
|
// ---------------------------------------------------------------------------
|
|
@@ -27,6 +28,9 @@ class bybitid extends bybit["default"] {
|
|
|
27
28
|
'fees': 'https://help.bybit.com/hc/en-us/articles/360039261154',
|
|
28
29
|
'referral': undefined,
|
|
29
30
|
},
|
|
31
|
+
'httpExceptions': {
|
|
32
|
+
'403': errors.PermissionDenied, // error:The Amazon CloudFront distribution is configured to block access from your country
|
|
33
|
+
},
|
|
30
34
|
});
|
|
31
35
|
}
|
|
32
36
|
}
|
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -1605,7 +1605,7 @@ class coinbase extends coinbase$1["default"] {
|
|
|
1605
1605
|
const newMarkets = [];
|
|
1606
1606
|
for (let i = 0; i < result.length; i++) {
|
|
1607
1607
|
const market = result[i];
|
|
1608
|
-
const info = this.
|
|
1608
|
+
const info = this.safeDict(market, 'info', {});
|
|
1609
1609
|
const realMarketIds = this.safeList(info, 'alias_to', []);
|
|
1610
1610
|
const length = realMarketIds.length;
|
|
1611
1611
|
if (length > 0) {
|
|
@@ -682,7 +682,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
682
682
|
'settleId': undefined,
|
|
683
683
|
'type': 'spot',
|
|
684
684
|
'spot': true,
|
|
685
|
-
'margin': this.
|
|
685
|
+
'margin': this.safeBool(market, 'margin_enabled'),
|
|
686
686
|
'swap': false,
|
|
687
687
|
'future': false,
|
|
688
688
|
'option': false,
|
|
@@ -898,7 +898,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
898
898
|
last = this.safeString(ticker, 4);
|
|
899
899
|
}
|
|
900
900
|
else {
|
|
901
|
-
timestamp = this.parse8601(this.
|
|
901
|
+
timestamp = this.parse8601(this.safeString(ticker, 'time'));
|
|
902
902
|
bid = this.safeString(ticker, 'bid');
|
|
903
903
|
ask = this.safeString(ticker, 'ask');
|
|
904
904
|
high = this.safeString(ticker, 'high');
|
|
@@ -971,8 +971,8 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
971
971
|
const delimiter = '-';
|
|
972
972
|
for (let i = 0; i < marketIds.length; i++) {
|
|
973
973
|
const marketId = marketIds[i];
|
|
974
|
-
const entry = this.
|
|
975
|
-
const first = this.
|
|
974
|
+
const entry = this.safeList(response, marketId, []);
|
|
975
|
+
const first = this.safeList(entry, 0, []);
|
|
976
976
|
const market = this.safeMarket(marketId, undefined, delimiter);
|
|
977
977
|
const symbol = market['symbol'];
|
|
978
978
|
result[symbol] = this.parseTicker(first, market);
|
|
@@ -1380,7 +1380,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
1380
1380
|
const type = this.safeString(order, 'type');
|
|
1381
1381
|
const side = this.safeString(order, 'side');
|
|
1382
1382
|
const timeInForce = this.safeString(order, 'time_in_force');
|
|
1383
|
-
const postOnly = this.
|
|
1383
|
+
const postOnly = this.safeBool(order, 'post_only');
|
|
1384
1384
|
const triggerPrice = this.safeNumber(order, 'stop_price');
|
|
1385
1385
|
const clientOrderId = this.safeString(order, 'client_oid');
|
|
1386
1386
|
return this.safeOrder({
|
|
@@ -1588,7 +1588,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
1588
1588
|
if (timeInForce !== undefined) {
|
|
1589
1589
|
request['time_in_force'] = timeInForce;
|
|
1590
1590
|
}
|
|
1591
|
-
const postOnly = this.
|
|
1591
|
+
const postOnly = this.safeBool2(params, 'postOnly', 'post_only', false);
|
|
1592
1592
|
if (postOnly === true) {
|
|
1593
1593
|
request['post_only'] = true;
|
|
1594
1594
|
}
|
|
@@ -1793,10 +1793,10 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
1793
1793
|
const amount = this.parseNumber(amountString);
|
|
1794
1794
|
const after = this.parseNumber(afterString);
|
|
1795
1795
|
const before = this.parseNumber(beforeString);
|
|
1796
|
-
const timestamp = this.parse8601(this.
|
|
1796
|
+
const timestamp = this.parse8601(this.safeString(item, 'created_at'));
|
|
1797
1797
|
const type = this.parseLedgerEntryType(this.safeString(item, 'type'));
|
|
1798
1798
|
const code = this.safeCurrencyCode(undefined, currency);
|
|
1799
|
-
const details = this.
|
|
1799
|
+
const details = this.safeDict(item, 'details', {});
|
|
1800
1800
|
let account = undefined;
|
|
1801
1801
|
let referenceAccount = undefined;
|
|
1802
1802
|
let referenceId = undefined;
|
|
@@ -1850,7 +1850,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
1850
1850
|
await this.loadAccounts();
|
|
1851
1851
|
const currency = this.currency(code);
|
|
1852
1852
|
const accountsByCurrencyCode = this.indexBy(this.accounts, 'code');
|
|
1853
|
-
const account = this.
|
|
1853
|
+
const account = this.safeDict(accountsByCurrencyCode, code);
|
|
1854
1854
|
if (account === undefined) {
|
|
1855
1855
|
throw new errors.ExchangeError(this.id + ' fetchLedger() could not find account id for ' + code);
|
|
1856
1856
|
}
|
|
@@ -1905,7 +1905,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
1905
1905
|
if (code !== undefined) {
|
|
1906
1906
|
currency = this.currency(code);
|
|
1907
1907
|
const accountsByCurrencyCode = this.indexBy(this.accounts, 'code');
|
|
1908
|
-
const account = this.
|
|
1908
|
+
const account = this.safeDict(accountsByCurrencyCode, code);
|
|
1909
1909
|
if (account === undefined) {
|
|
1910
1910
|
throw new errors.ExchangeError(this.id + ' fetchDepositsWithdrawals() could not find account id for ' + code);
|
|
1911
1911
|
}
|
|
@@ -1953,7 +1953,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
1953
1953
|
response = this.toArray(transfers);
|
|
1954
1954
|
for (let i = 0; i < response.length; i++) {
|
|
1955
1955
|
const account_id = this.safeString(response[i], 'account_id');
|
|
1956
|
-
const account = this.
|
|
1956
|
+
const account = this.safeDict(this.accountsById, account_id);
|
|
1957
1957
|
const codeInner = this.safeString(account, 'code');
|
|
1958
1958
|
response[i]['currency'] = codeInner;
|
|
1959
1959
|
}
|
|
@@ -2071,7 +2071,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
2071
2071
|
// }
|
|
2072
2072
|
// ]
|
|
2073
2073
|
//
|
|
2074
|
-
const details = this.
|
|
2074
|
+
const details = this.safeDict(transaction, 'details', {});
|
|
2075
2075
|
const timestamp = this.parse8601(this.safeString(transaction, 'created_at'));
|
|
2076
2076
|
const currencyId = this.safeString(transaction, 'currency');
|
|
2077
2077
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
@@ -2141,7 +2141,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
2141
2141
|
this.options['coinbaseAccountsByCurrencyId'] = this.indexBy(accounts, 'currency');
|
|
2142
2142
|
}
|
|
2143
2143
|
const currencyId = currency['id'];
|
|
2144
|
-
const account = this.
|
|
2144
|
+
const account = this.safeDict(this.options['coinbaseAccountsByCurrencyId'], currencyId);
|
|
2145
2145
|
if (account === undefined) {
|
|
2146
2146
|
// eslint-disable-next-line quotes
|
|
2147
2147
|
throw new errors.InvalidAddress(this.id + " createDepositAddress() could not find currency code " + code + " with id = " + currencyId + " in this.options['coinbaseAccountsByCurrencyId']");
|
|
@@ -365,7 +365,7 @@ class coincheck extends coincheck$1["default"] {
|
|
|
365
365
|
market = this.market(symbol);
|
|
366
366
|
}
|
|
367
367
|
const response = await this.privateGetExchangeOrdersOpens(params);
|
|
368
|
-
const rawOrders = this.
|
|
368
|
+
const rawOrders = this.safeList(response, 'orders', []);
|
|
369
369
|
const parsedOrders = this.parseOrders(rawOrders, market, since, limit);
|
|
370
370
|
const result = [];
|
|
371
371
|
for (let i = 0; i < parsedOrders.length; i++) {
|
|
@@ -566,7 +566,7 @@ class coincheck extends coincheck$1["default"] {
|
|
|
566
566
|
else if (this.safeString(trade, 'liquidity') === 'M') {
|
|
567
567
|
takerOrMaker = 'maker';
|
|
568
568
|
}
|
|
569
|
-
const funds = this.
|
|
569
|
+
const funds = this.safeDict(trade, 'funds', {});
|
|
570
570
|
amountString = this.safeString(funds, baseId);
|
|
571
571
|
costString = this.safeString(funds, quoteId);
|
|
572
572
|
fee = {
|
|
@@ -710,7 +710,7 @@ class coincheck extends coincheck$1["default"] {
|
|
|
710
710
|
// }
|
|
711
711
|
// }
|
|
712
712
|
//
|
|
713
|
-
const fees = this.
|
|
713
|
+
const fees = this.safeDict(response, 'exchange_fees', {});
|
|
714
714
|
const result = {};
|
|
715
715
|
const symbols = this.symbols;
|
|
716
716
|
if (symbols === undefined) {
|
|
@@ -719,7 +719,7 @@ class coincheck extends coincheck$1["default"] {
|
|
|
719
719
|
for (let i = 0; i < symbols.length; i++) {
|
|
720
720
|
const symbol = symbols[i];
|
|
721
721
|
const market = this.market(symbol);
|
|
722
|
-
const fee = this.
|
|
722
|
+
const fee = this.safeDict(fees, market['id'], {});
|
|
723
723
|
result[symbol] = {
|
|
724
724
|
'info': fee,
|
|
725
725
|
'symbol': symbol,
|
package/dist/cjs/src/coinex.js
CHANGED
|
@@ -1170,7 +1170,7 @@ class coinex extends coinex$1["default"] {
|
|
|
1170
1170
|
symbols = this.marketSymbols(symbols);
|
|
1171
1171
|
let market = undefined;
|
|
1172
1172
|
if (symbols !== undefined) {
|
|
1173
|
-
const symbol = this.
|
|
1173
|
+
const symbol = this.safeString(symbols, 0);
|
|
1174
1174
|
market = this.market(symbol);
|
|
1175
1175
|
}
|
|
1176
1176
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchTickers', market, params);
|
|
@@ -1607,7 +1607,7 @@ class coinex extends coinex$1["default"] {
|
|
|
1607
1607
|
return result;
|
|
1608
1608
|
}
|
|
1609
1609
|
parseTradingFee(fee, market = undefined) {
|
|
1610
|
-
const marketId = this.
|
|
1610
|
+
const marketId = this.safeString(fee, 'market');
|
|
1611
1611
|
const symbol = this.safeSymbol(marketId, market);
|
|
1612
1612
|
return {
|
|
1613
1613
|
'info': fee,
|
|
@@ -2587,9 +2587,9 @@ class coinex extends coinex$1["default"] {
|
|
|
2587
2587
|
}
|
|
2588
2588
|
const type = this.safeString(rawOrder, 'type');
|
|
2589
2589
|
const side = this.safeString(rawOrder, 'side');
|
|
2590
|
-
const amount = this.
|
|
2591
|
-
const price = this.
|
|
2592
|
-
const orderParams = this.
|
|
2590
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
2591
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
2592
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
2593
2593
|
if (type !== 'limit') {
|
|
2594
2594
|
throw new errors.NotSupported(this.id + ' createOrders() does not support ' + type + ' orders, only limit orders are accepted');
|
|
2595
2595
|
}
|
|
@@ -3125,8 +3125,8 @@ class coinex extends coinex$1["default"] {
|
|
|
3125
3125
|
orderSymbols.push(marketId);
|
|
3126
3126
|
}
|
|
3127
3127
|
const id = this.safeString(rawOrder, 'id');
|
|
3128
|
-
const amount = this.
|
|
3129
|
-
const price = this.
|
|
3128
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
3129
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
3130
3130
|
let orderParams = this.safeDict(rawOrder, 'params', {});
|
|
3131
3131
|
let marginMode = undefined;
|
|
3132
3132
|
[marginMode, orderParams] = this.handleMarginModeAndParams('editOrders', orderParams);
|
|
@@ -4943,7 +4943,7 @@ class coinex extends coinex$1["default"] {
|
|
|
4943
4943
|
const request = {};
|
|
4944
4944
|
let market = undefined;
|
|
4945
4945
|
if (symbols !== undefined) {
|
|
4946
|
-
const symbol = this.
|
|
4946
|
+
const symbol = this.safeString(symbols, 0);
|
|
4947
4947
|
market = this.market(symbol);
|
|
4948
4948
|
if (market['swap'] !== true) {
|
|
4949
4949
|
throw new errors.BadSymbol(this.id + ' fetchFundingRates() supports swap contracts only');
|
|
@@ -5298,7 +5298,7 @@ class coinex extends coinex$1["default"] {
|
|
|
5298
5298
|
const currencyId = this.safeString(transfer, 'ccy');
|
|
5299
5299
|
const fromId = this.safeString(transfer, 'from_account_type');
|
|
5300
5300
|
const toId = this.safeString(transfer, 'to_account_type');
|
|
5301
|
-
const accountsById = this.
|
|
5301
|
+
const accountsById = this.safeDict(this.options, 'accountsById', {});
|
|
5302
5302
|
return {
|
|
5303
5303
|
'id': undefined,
|
|
5304
5304
|
'timestamp': timestamp,
|
|
@@ -5617,7 +5617,7 @@ class coinex extends coinex$1["default"] {
|
|
|
5617
5617
|
// "message": "OK"
|
|
5618
5618
|
// }
|
|
5619
5619
|
//
|
|
5620
|
-
const rows = this.
|
|
5620
|
+
const rows = this.safeList(response, 'data', []);
|
|
5621
5621
|
const interest = this.parseBorrowInterests(rows, market);
|
|
5622
5622
|
return this.filterByCurrencySinceLimit(interest, code, since, limit);
|
|
5623
5623
|
}
|
package/dist/cjs/src/coinmate.js
CHANGED
|
@@ -452,7 +452,7 @@ class coinmate extends coinmate$1["default"] {
|
|
|
452
452
|
for (let i = 0; i < currencyIds.length; i++) {
|
|
453
453
|
const currencyId = currencyIds[i];
|
|
454
454
|
const code = this.safeCurrencyCode(currencyId);
|
|
455
|
-
const balance = this.
|
|
455
|
+
const balance = this.safeDict(balances, currencyId);
|
|
456
456
|
const account = this.account();
|
|
457
457
|
account['free'] = this.safeString(balance, 'available');
|
|
458
458
|
account['used'] = this.safeString(balance, 'reserved');
|
|
@@ -760,7 +760,7 @@ class coinmate extends coinmate$1["default"] {
|
|
|
760
760
|
await this.loadMarkets();
|
|
761
761
|
}
|
|
762
762
|
const currency = this.currency(code);
|
|
763
|
-
const withdrawOptions = this.
|
|
763
|
+
const withdrawOptions = this.safeDict(this.options, 'withdraw', {});
|
|
764
764
|
const methods = this.safeDict(withdrawOptions, 'methods', {});
|
|
765
765
|
const method = this.safeString(methods, code);
|
|
766
766
|
if (method === undefined) {
|
|
@@ -815,7 +815,7 @@ class coinmate extends coinmate$1["default"] {
|
|
|
815
815
|
// }
|
|
816
816
|
// }
|
|
817
817
|
//
|
|
818
|
-
const data = this.
|
|
818
|
+
const data = this.safeDict(response, 'data', {});
|
|
819
819
|
const transaction = this.parseTransaction(data, currency);
|
|
820
820
|
const fillResponseFromRequest = this.safeBool(withdrawOptions, 'fillResponseFromRequest', true);
|
|
821
821
|
if (fillResponseFromRequest === true) {
|
|
@@ -988,7 +988,7 @@ class coinmate extends coinmate$1["default"] {
|
|
|
988
988
|
// "data": { maker: '0.3', taker: "0.35", timestamp: "1646253217815" }
|
|
989
989
|
// }
|
|
990
990
|
//
|
|
991
|
-
const data = this.
|
|
991
|
+
const data = this.safeDict(response, 'data', {});
|
|
992
992
|
const makerString = this.safeString(data, 'maker');
|
|
993
993
|
const takerString = this.safeString(data, 'taker');
|
|
994
994
|
const maker = this.parseNumber(Precise["default"].stringDiv(makerString, '100'));
|
package/dist/cjs/src/coinone.js
CHANGED
|
@@ -411,7 +411,7 @@ class coinone extends coinone$1["default"] {
|
|
|
411
411
|
const tickers = this.safeList(response, 'tickers', []);
|
|
412
412
|
const result = [];
|
|
413
413
|
for (let i = 0; i < tickers.length; i++) {
|
|
414
|
-
const entry = this.
|
|
414
|
+
const entry = this.safeDict(tickers, i);
|
|
415
415
|
const id = this.safeString(entry, 'id');
|
|
416
416
|
const baseId = this.safeStringUpper(entry, 'target_currency');
|
|
417
417
|
const quoteId = this.safeStringUpper(entry, 'quote_currency');
|
|
@@ -1231,10 +1231,10 @@ class coinone extends coinone$1["default"] {
|
|
|
1231
1231
|
continue;
|
|
1232
1232
|
}
|
|
1233
1233
|
const parts = key.split('_');
|
|
1234
|
-
const currencyId = this.
|
|
1235
|
-
const secondPart = this.
|
|
1234
|
+
const currencyId = this.safeString(parts, 0);
|
|
1235
|
+
const secondPart = this.safeString(parts, 1);
|
|
1236
1236
|
const code = this.safeCurrencyCode(currencyId);
|
|
1237
|
-
let depositAddress = this.
|
|
1237
|
+
let depositAddress = this.safeDict(result, code);
|
|
1238
1238
|
if (depositAddress === undefined) {
|
|
1239
1239
|
depositAddress = {
|
|
1240
1240
|
'info': value,
|
package/dist/cjs/src/coinsph.js
CHANGED
|
@@ -820,9 +820,9 @@ class coinsph extends coinsph$1["default"] {
|
|
|
820
820
|
const base = this.safeCurrencyCode(baseId);
|
|
821
821
|
const quote = this.safeCurrencyCode(quoteId);
|
|
822
822
|
const limits = this.indexBy(this.safeList(market, 'filters', []), 'filterType');
|
|
823
|
-
const amountLimits = this.
|
|
824
|
-
const priceLimits = this.
|
|
825
|
-
const costLimits = this.
|
|
823
|
+
const amountLimits = this.safeDict(limits, 'LOT_SIZE', {});
|
|
824
|
+
const priceLimits = this.safeDict(limits, 'PRICE_FILTER', {});
|
|
825
|
+
const costLimits = this.safeDict(limits, 'NOTIONAL', {});
|
|
826
826
|
result.push({
|
|
827
827
|
'id': id,
|
|
828
828
|
'symbol': base + '/' + quote,
|
|
@@ -1420,7 +1420,7 @@ class coinsph extends coinsph$1["default"] {
|
|
|
1420
1420
|
'type': orderType,
|
|
1421
1421
|
'side': orderSide,
|
|
1422
1422
|
};
|
|
1423
|
-
const options = this.
|
|
1423
|
+
const options = this.safeDict(this.options, 'createOrder', {});
|
|
1424
1424
|
let newOrderRespType = this.safeValue(options, 'newOrderRespType', {});
|
|
1425
1425
|
// if limit order
|
|
1426
1426
|
if (orderType === 'LIMIT' || orderType === 'STOP_LOSS_LIMIT' || orderType === 'TAKE_PROFIT_LIMIT' || orderType === 'LIMIT_MAKER') {
|
|
@@ -1923,7 +1923,7 @@ class coinsph extends coinsph$1["default"] {
|
|
|
1923
1923
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
1924
1924
|
*/
|
|
1925
1925
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
1926
|
-
const options = this.
|
|
1926
|
+
const options = this.safeDict(this.options, 'withdraw');
|
|
1927
1927
|
const warning = this.safeBool(options, 'warning', true);
|
|
1928
1928
|
if (warning === true) {
|
|
1929
1929
|
throw new errors.InvalidAddress(this.id + " withdraw() makes a withdrawals only to coins_ph account, add .options['withdraw']['warning'] = false to make a withdrawal to your coins_ph account");
|
|
@@ -1214,7 +1214,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
1214
1214
|
//
|
|
1215
1215
|
const result = this.safeDict(response, 'result', {});
|
|
1216
1216
|
const data = this.safeList(result, 'data', []);
|
|
1217
|
-
const orderBook = this.
|
|
1217
|
+
const orderBook = this.safeDict(data, 0);
|
|
1218
1218
|
const timestamp = this.safeInteger(orderBook, 't');
|
|
1219
1219
|
return this.parseOrderBook(orderBook, symbol, timestamp);
|
|
1220
1220
|
}
|
|
@@ -2529,7 +2529,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
2529
2529
|
const created = this.safeInteger(order, 'create_time');
|
|
2530
2530
|
const marketId = this.safeString(order, 'instrument_name');
|
|
2531
2531
|
const symbol = this.safeSymbol(marketId, market);
|
|
2532
|
-
const execInst = this.
|
|
2532
|
+
const execInst = this.safeList(order, 'exec_inst');
|
|
2533
2533
|
let postOnly = undefined;
|
|
2534
2534
|
if (execInst !== undefined) {
|
|
2535
2535
|
postOnly = false;
|
|
@@ -2767,7 +2767,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
2767
2767
|
await this.loadMarkets();
|
|
2768
2768
|
}
|
|
2769
2769
|
const response = await this.v1PrivatePostPrivateGetCurrencyNetworks(params);
|
|
2770
|
-
const data = this.
|
|
2770
|
+
const data = this.safeDict(response, 'result');
|
|
2771
2771
|
const currencyMap = this.safeList(data, 'currency_map');
|
|
2772
2772
|
return this.parseDepositWithdrawFees(currencyMap, codes, 'full_name');
|
|
2773
2773
|
}
|
|
@@ -3054,7 +3054,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
3054
3054
|
const sorted = this.sortBy(settlements, 'timestamp');
|
|
3055
3055
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
3056
3056
|
}
|
|
3057
|
-
parseSettlement(settlement, market) {
|
|
3057
|
+
parseSettlement(settlement, market = undefined) {
|
|
3058
3058
|
//
|
|
3059
3059
|
// {
|
|
3060
3060
|
// "i": "BTCUSD-230526",
|
|
@@ -3073,7 +3073,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
3073
3073
|
'datetime': this.iso8601(timestamp),
|
|
3074
3074
|
};
|
|
3075
3075
|
}
|
|
3076
|
-
parseSettlements(settlements, market) {
|
|
3076
|
+
parseSettlements(settlements, market = undefined) {
|
|
3077
3077
|
//
|
|
3078
3078
|
// [
|
|
3079
3079
|
// {
|
package/dist/cjs/src/deribit.js
CHANGED
|
@@ -705,10 +705,10 @@ class deribit extends deribit$1["default"] {
|
|
|
705
705
|
});
|
|
706
706
|
}
|
|
707
707
|
codeFromOptions(methodName, params = {}) {
|
|
708
|
-
const defaultCode = this.
|
|
709
|
-
const options = this.
|
|
710
|
-
const code = this.
|
|
711
|
-
return this.
|
|
708
|
+
const defaultCode = this.safeString(this.options, 'code', 'BTC');
|
|
709
|
+
const options = this.safeDict(this.options, methodName, {});
|
|
710
|
+
const code = this.safeString(options, 'code', defaultCode);
|
|
711
|
+
return this.safeString(params, 'code', code);
|
|
712
712
|
}
|
|
713
713
|
/**
|
|
714
714
|
* @method
|
|
@@ -732,7 +732,7 @@ class deribit extends deribit$1["default"] {
|
|
|
732
732
|
// "testnet": false
|
|
733
733
|
// }
|
|
734
734
|
//
|
|
735
|
-
const result = this.
|
|
735
|
+
const result = this.safeDict(response, 'result');
|
|
736
736
|
const locked = this.safeString(result, 'locked');
|
|
737
737
|
const updateTime = this.safeIntegerProduct(response, 'usIn', 0.001, this.milliseconds());
|
|
738
738
|
return {
|
|
@@ -790,7 +790,7 @@ class deribit extends deribit$1["default"] {
|
|
|
790
790
|
// "testnet": false
|
|
791
791
|
// }
|
|
792
792
|
//
|
|
793
|
-
const result = this.
|
|
793
|
+
const result = this.safeList(response, 'result', []);
|
|
794
794
|
return this.parseAccounts(result);
|
|
795
795
|
}
|
|
796
796
|
parseAccount(account) {
|
|
@@ -956,7 +956,7 @@ class deribit extends deribit$1["default"] {
|
|
|
956
956
|
const base = this.safeCurrencyCode(baseId);
|
|
957
957
|
const quote = this.safeCurrencyCode(quoteId);
|
|
958
958
|
const settle = this.safeCurrencyCode(settleId);
|
|
959
|
-
const settlementPeriod = this.
|
|
959
|
+
const settlementPeriod = this.safeString(market, 'settlement_period');
|
|
960
960
|
const swap = (settlementPeriod === 'perpetual');
|
|
961
961
|
if (kind === undefined) {
|
|
962
962
|
throw new errors.ExchangeError(this.id + ' method() missing kind');
|
|
@@ -1027,7 +1027,7 @@ class deribit extends deribit$1["default"] {
|
|
|
1027
1027
|
'swap': swap,
|
|
1028
1028
|
'future': future,
|
|
1029
1029
|
'option': option,
|
|
1030
|
-
'active': this.
|
|
1030
|
+
'active': this.safeBool(market, 'is_active'),
|
|
1031
1031
|
'contract': !isSpot,
|
|
1032
1032
|
'linear': linear,
|
|
1033
1033
|
'inverse': inverse,
|
|
@@ -1194,7 +1194,7 @@ class deribit extends deribit$1["default"] {
|
|
|
1194
1194
|
// }
|
|
1195
1195
|
// }
|
|
1196
1196
|
//
|
|
1197
|
-
const result = this.
|
|
1197
|
+
const result = this.safeDict(response, 'result', {});
|
|
1198
1198
|
const address = this.safeString(result, 'address');
|
|
1199
1199
|
this.checkAddress(address);
|
|
1200
1200
|
return {
|
|
@@ -1240,7 +1240,7 @@ class deribit extends deribit$1["default"] {
|
|
|
1240
1240
|
// "testnet": false
|
|
1241
1241
|
// }
|
|
1242
1242
|
//
|
|
1243
|
-
const result = this.
|
|
1243
|
+
const result = this.safeDict(response, 'result', {});
|
|
1244
1244
|
const address = this.safeString(result, 'address');
|
|
1245
1245
|
this.checkAddress(address);
|
|
1246
1246
|
return {
|
|
@@ -1302,7 +1302,7 @@ class deribit extends deribit$1["default"] {
|
|
|
1302
1302
|
const marketId = this.safeString(ticker, 'instrument_name');
|
|
1303
1303
|
const symbol = this.safeSymbol(marketId, market);
|
|
1304
1304
|
const last = this.safeString2(ticker, 'last_price', 'last');
|
|
1305
|
-
const stats = this.
|
|
1305
|
+
const stats = this.safeDict(ticker, 'stats', ticker);
|
|
1306
1306
|
return this.safeTicker({
|
|
1307
1307
|
'symbol': symbol,
|
|
1308
1308
|
'timestamp': timestamp,
|
|
@@ -1701,7 +1701,7 @@ class deribit extends deribit$1["default"] {
|
|
|
1701
1701
|
// "testnet":false
|
|
1702
1702
|
// }
|
|
1703
1703
|
//
|
|
1704
|
-
const result = this.
|
|
1704
|
+
const result = this.safeDict(response, 'result', {});
|
|
1705
1705
|
const trades = this.safeList(result, 'trades', []);
|
|
1706
1706
|
return this.parseTrades(trades, market, since, limit);
|
|
1707
1707
|
}
|
|
@@ -1773,7 +1773,7 @@ class deribit extends deribit$1["default"] {
|
|
|
1773
1773
|
// "testnet": false
|
|
1774
1774
|
// }
|
|
1775
1775
|
//
|
|
1776
|
-
const result = this.
|
|
1776
|
+
const result = this.safeDict(response, 'result', {});
|
|
1777
1777
|
const fees = this.safeList(result, 'fees', []);
|
|
1778
1778
|
let perpetualFee = {};
|
|
1779
1779
|
let futureFee = {};
|
|
@@ -1890,7 +1890,7 @@ class deribit extends deribit$1["default"] {
|
|
|
1890
1890
|
// "testnet": false
|
|
1891
1891
|
// }
|
|
1892
1892
|
//
|
|
1893
|
-
const result = this.
|
|
1893
|
+
const result = this.safeDict(response, 'result', {});
|
|
1894
1894
|
const timestamp = this.safeInteger(result, 'timestamp');
|
|
1895
1895
|
const nonce = this.safeInteger(result, 'change_id');
|
|
1896
1896
|
const orderbook = this.parseOrderBook(result, market['symbol'], timestamp);
|
|
@@ -1993,9 +1993,9 @@ class deribit extends deribit$1["default"] {
|
|
|
1993
1993
|
const rawType = this.safeString(order, 'order_type');
|
|
1994
1994
|
const type = this.parseOrderType(rawType);
|
|
1995
1995
|
// injected in createOrder
|
|
1996
|
-
const trades = this.
|
|
1996
|
+
const trades = this.safeList(order, 'trades');
|
|
1997
1997
|
const timeInForce = this.parseTimeInForce(this.safeString(order, 'time_in_force'));
|
|
1998
|
-
const postOnly = this.
|
|
1998
|
+
const postOnly = this.safeBool(order, 'post_only');
|
|
1999
1999
|
return this.safeOrder({
|
|
2000
2000
|
'info': order,
|
|
2001
2001
|
'id': id,
|
|
@@ -2247,9 +2247,9 @@ class deribit extends deribit$1["default"] {
|
|
|
2247
2247
|
// }
|
|
2248
2248
|
// }
|
|
2249
2249
|
//
|
|
2250
|
-
const result = this.
|
|
2250
|
+
const result = this.safeDict(response, 'result', {});
|
|
2251
2251
|
const order = this.safeValue(result, 'order');
|
|
2252
|
-
const trades = this.
|
|
2252
|
+
const trades = this.safeList(result, 'trades', []);
|
|
2253
2253
|
order['trades'] = trades;
|
|
2254
2254
|
return this.parseOrder(order, market);
|
|
2255
2255
|
}
|
|
@@ -2294,9 +2294,9 @@ class deribit extends deribit$1["default"] {
|
|
|
2294
2294
|
params = this.omit(params, 'trigger_offset');
|
|
2295
2295
|
}
|
|
2296
2296
|
const response = await this.privateGetEdit(this.extend(request, params));
|
|
2297
|
-
const result = this.
|
|
2297
|
+
const result = this.safeDict(response, 'result', {});
|
|
2298
2298
|
const order = this.safeValue(result, 'order');
|
|
2299
|
-
const trades = this.
|
|
2299
|
+
const trades = this.safeList(result, 'trades', []);
|
|
2300
2300
|
order['trades'] = trades;
|
|
2301
2301
|
return this.parseOrder(order);
|
|
2302
2302
|
}
|
|
@@ -2571,7 +2571,7 @@ class deribit extends deribit$1["default"] {
|
|
|
2571
2571
|
// }
|
|
2572
2572
|
// }
|
|
2573
2573
|
//
|
|
2574
|
-
const result = this.
|
|
2574
|
+
const result = this.safeDict(response, 'result', {});
|
|
2575
2575
|
const trades = this.safeList(result, 'trades', []);
|
|
2576
2576
|
return this.parseTrades(trades, market, since, limit);
|
|
2577
2577
|
}
|
|
@@ -2621,7 +2621,7 @@ class deribit extends deribit$1["default"] {
|
|
|
2621
2621
|
// }
|
|
2622
2622
|
// }
|
|
2623
2623
|
//
|
|
2624
|
-
const result = this.
|
|
2624
|
+
const result = this.safeDict(response, 'result', {});
|
|
2625
2625
|
const data = this.safeList(result, 'data', []);
|
|
2626
2626
|
return this.parseTransactions(data, currency, since, limit, params);
|
|
2627
2627
|
}
|
|
@@ -2675,7 +2675,7 @@ class deribit extends deribit$1["default"] {
|
|
|
2675
2675
|
// }
|
|
2676
2676
|
// }
|
|
2677
2677
|
//
|
|
2678
|
-
const result = this.
|
|
2678
|
+
const result = this.safeDict(response, 'result', {});
|
|
2679
2679
|
const data = this.safeList(result, 'data', []);
|
|
2680
2680
|
return this.parseTransactions(data, currency, since, limit, params);
|
|
2681
2681
|
}
|
|
@@ -3047,7 +3047,7 @@ class deribit extends deribit$1["default"] {
|
|
|
3047
3047
|
// }
|
|
3048
3048
|
// }
|
|
3049
3049
|
//
|
|
3050
|
-
const result = this.
|
|
3050
|
+
const result = this.safeDict(response, 'result', {});
|
|
3051
3051
|
const transfers = this.safeList(result, 'data', []);
|
|
3052
3052
|
return this.parseTransfers(transfers, currency, since, limit, params);
|
|
3053
3053
|
}
|
|
@@ -3077,7 +3077,7 @@ class deribit extends deribit$1["default"] {
|
|
|
3077
3077
|
let method = this.safeString(params, 'method');
|
|
3078
3078
|
params = this.omit(params, 'method');
|
|
3079
3079
|
if (method === undefined) {
|
|
3080
|
-
const transferOptions = this.
|
|
3080
|
+
const transferOptions = this.safeDict(this.options, 'transfer', {});
|
|
3081
3081
|
method = this.safeString(transferOptions, 'method', 'privateGetSubmitTransferToSubaccount');
|
|
3082
3082
|
}
|
|
3083
3083
|
let response = undefined;
|
|
@@ -3463,9 +3463,9 @@ class deribit extends deribit$1["default"] {
|
|
|
3463
3463
|
// "testnet": false
|
|
3464
3464
|
// }
|
|
3465
3465
|
//
|
|
3466
|
-
const result = this.
|
|
3466
|
+
const result = this.safeDict(response, 'result', {});
|
|
3467
3467
|
const cursor = this.safeString(result, 'continuation');
|
|
3468
|
-
const settlements = this.
|
|
3468
|
+
const settlements = this.safeList(result, 'settlements', []);
|
|
3469
3469
|
const settlementsWithCursor = this.addPaginationCursorToResult(cursor, settlements);
|
|
3470
3470
|
return this.parseLiquidations(settlementsWithCursor, market, since, limit);
|
|
3471
3471
|
}
|
|
@@ -3540,7 +3540,7 @@ class deribit extends deribit$1["default"] {
|
|
|
3540
3540
|
// "testnet": false
|
|
3541
3541
|
// }
|
|
3542
3542
|
//
|
|
3543
|
-
const result = this.
|
|
3543
|
+
const result = this.safeDict(response, 'result', {});
|
|
3544
3544
|
const settlements = this.safeList(result, 'settlements', []);
|
|
3545
3545
|
return this.parseLiquidations(settlements, market, since, limit);
|
|
3546
3546
|
}
|
|
@@ -3634,7 +3634,7 @@ class deribit extends deribit$1["default"] {
|
|
|
3634
3634
|
// "testnet": false
|
|
3635
3635
|
// }
|
|
3636
3636
|
//
|
|
3637
|
-
const result = this.
|
|
3637
|
+
const result = this.safeDict(response, 'result', {});
|
|
3638
3638
|
return this.parseGreeks(result, market);
|
|
3639
3639
|
}
|
|
3640
3640
|
parseGreeks(greeks, market = undefined) {
|
|
@@ -3680,7 +3680,7 @@ class deribit extends deribit$1["default"] {
|
|
|
3680
3680
|
const timestamp = this.safeInteger(greeks, 'timestamp');
|
|
3681
3681
|
const marketId = this.safeString(greeks, 'instrument_name');
|
|
3682
3682
|
const symbol = this.safeSymbol(marketId, market);
|
|
3683
|
-
const stats = this.
|
|
3683
|
+
const stats = this.safeDict(greeks, 'greeks', {});
|
|
3684
3684
|
return {
|
|
3685
3685
|
'symbol': symbol,
|
|
3686
3686
|
'timestamp': timestamp,
|
|
@@ -4008,7 +4008,7 @@ class deribit extends deribit$1["default"] {
|
|
|
4008
4008
|
// "usDiff": 36
|
|
4009
4009
|
// }
|
|
4010
4010
|
//
|
|
4011
|
-
const error = this.
|
|
4011
|
+
const error = this.safeDict(response, 'error');
|
|
4012
4012
|
if (error !== undefined) {
|
|
4013
4013
|
const errorCode = this.safeString(error, 'code');
|
|
4014
4014
|
const feedback = this.id + ' ' + body;
|
package/dist/cjs/src/derive.js
CHANGED
|
@@ -1826,7 +1826,7 @@ class derive extends derive$1["default"] {
|
|
|
1826
1826
|
// "id": "e5a88d4f-7ac7-40cd-aec9-e0e8152b8b92"
|
|
1827
1827
|
// }
|
|
1828
1828
|
//
|
|
1829
|
-
const data = this.
|
|
1829
|
+
const data = this.safeDict(response, 'result');
|
|
1830
1830
|
const page = this.safeInteger(params, 'page');
|
|
1831
1831
|
if (page !== undefined) {
|
|
1832
1832
|
const pagination = this.safeDict(data, 'pagination');
|