ccxt 4.2.31 → 4.2.35
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/.gitattributes +1 -0
- package/CONTRIBUTING.md +20 -1
- package/README.md +8 -7
- package/build.sh +9 -2
- package/cleanup.sh +3 -0
- package/dist/ccxt.browser.js +741 -501
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +3 -2
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/base/Exchange.js +62 -20
- package/dist/cjs/src/bigone.js +21 -1
- package/dist/cjs/src/binance.js +59 -15
- package/dist/cjs/src/bingx.js +4 -3
- package/dist/cjs/src/bit2c.js +12 -0
- package/dist/cjs/src/bitfinex2.js +12 -1
- package/dist/cjs/src/bitget.js +3 -3
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitrue.js +3 -3
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/bybit.js +1 -1
- package/dist/cjs/src/coinbase.js +2 -2
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/cryptocom.js +10 -10
- package/dist/cjs/src/gate.js +34 -29
- package/dist/cjs/src/kraken.js +39 -0
- package/dist/cjs/src/krakenfutures.js +25 -3
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/mexc.js +2 -1
- package/dist/cjs/src/okx.js +4 -3
- package/dist/cjs/src/phemex.js +8 -8
- package/dist/cjs/src/pro/alpaca.js +8 -4
- package/dist/cjs/src/pro/ascendex.js +1 -2
- package/dist/cjs/src/pro/binance.js +17 -13
- package/dist/cjs/src/pro/bingx.js +1 -1
- package/dist/cjs/src/pro/bitfinex.js +21 -24
- package/dist/cjs/src/pro/bitfinex2.js +13 -17
- package/dist/cjs/src/pro/bitget.js +3 -1
- package/dist/cjs/src/pro/bitmart.js +3 -8
- package/dist/cjs/src/pro/bitmex.js +4 -7
- package/dist/cjs/src/pro/bitopro.js +2 -5
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +2 -3
- package/dist/cjs/src/pro/bitvavo.js +12 -5
- package/dist/cjs/src/pro/blockchaincom.js +22 -23
- package/dist/cjs/src/pro/bybit.js +5 -5
- package/dist/cjs/src/pro/cex.js +7 -7
- package/dist/cjs/src/pro/coinbase.js +3 -2
- package/dist/cjs/src/pro/coinbasepro.js +1 -1
- package/dist/cjs/src/pro/coinex.js +15 -13
- package/dist/cjs/src/pro/currencycom.js +5 -7
- package/dist/cjs/src/pro/deribit.js +4 -4
- package/dist/cjs/src/pro/exmo.js +15 -13
- package/dist/cjs/src/pro/gate.js +1 -1
- package/dist/cjs/src/pro/gemini.js +4 -2
- package/dist/cjs/src/pro/hitbtc.js +9 -8
- package/dist/cjs/src/pro/hollaex.js +2 -2
- package/dist/cjs/src/pro/htx.js +6 -7
- package/dist/cjs/src/pro/huobijp.js +3 -5
- package/dist/cjs/src/pro/idex.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +14 -13
- package/dist/cjs/src/pro/kraken.js +10 -16
- package/dist/cjs/src/pro/krakenfutures.js +10 -6
- package/dist/cjs/src/pro/kucoin.js +10 -11
- package/dist/cjs/src/pro/kucoinfutures.js +12 -11
- package/dist/cjs/src/pro/lbank.js +10 -10
- package/dist/cjs/src/pro/luno.js +12 -14
- package/dist/cjs/src/pro/mexc.js +3 -2
- package/dist/cjs/src/pro/ndax.js +7 -13
- package/dist/cjs/src/pro/okcoin.js +7 -12
- package/dist/cjs/src/pro/okx.js +6 -11
- package/dist/cjs/src/pro/onetrading.js +16 -15
- package/dist/cjs/src/pro/p2b.js +5 -3
- package/dist/cjs/src/pro/phemex.js +16 -11
- package/dist/cjs/src/pro/poloniex.js +6 -4
- package/dist/cjs/src/pro/poloniexfutures.js +14 -9
- package/dist/cjs/src/pro/probit.js +15 -11
- package/dist/cjs/src/pro/upbit.js +8 -8
- package/dist/cjs/src/pro/wazirx.js +6 -3
- package/dist/cjs/src/pro/woo.js +8 -6
- package/dist/cjs/src/probit.js +3 -3
- package/dist/cjs/src/tokocrypto.js +2 -2
- package/dist/cjs/src/wavesexchange.js +2 -1
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/yobit.js +39 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +1 -1
- package/js/src/ace.js +3 -2
- package/js/src/alpaca.d.ts +1 -1
- package/js/src/ascendex.d.ts +5 -15
- package/js/src/ascendex.js +1 -1
- package/js/src/base/Exchange.d.ts +86 -78
- package/js/src/base/Exchange.js +62 -20
- package/js/src/base/types.d.ts +90 -6
- package/js/src/bigone.d.ts +5 -15
- package/js/src/bigone.js +21 -1
- package/js/src/binance.d.ts +13 -23
- package/js/src/binance.js +59 -15
- package/js/src/bingx.d.ts +6 -16
- package/js/src/bingx.js +4 -3
- package/js/src/bit2c.d.ts +1 -1
- package/js/src/bit2c.js +12 -0
- package/js/src/bitbank.d.ts +2 -2
- package/js/src/bitbns.d.ts +1 -1
- package/js/src/bitfinex.d.ts +5 -5
- package/js/src/bitfinex2.d.ts +7 -17
- package/js/src/bitfinex2.js +12 -1
- package/js/src/bitflyer.d.ts +5 -5
- package/js/src/bitforex.d.ts +1 -1
- package/js/src/bitget.d.ts +8 -38
- package/js/src/bitget.js +3 -3
- package/js/src/bithumb.d.ts +2 -2
- package/js/src/bitmart.d.ts +10 -21
- package/js/src/bitmart.js +1 -1
- package/js/src/bitmex.d.ts +3 -3
- package/js/src/bitopro.d.ts +2 -2
- package/js/src/bitrue.d.ts +5 -15
- package/js/src/bitrue.js +3 -3
- package/js/src/bitso.d.ts +4 -4
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitteam.d.ts +1 -1
- package/js/src/bitvavo.d.ts +3 -3
- package/js/src/bl3p.d.ts +1 -1
- package/js/src/blockchaincom.d.ts +2 -2
- package/js/src/blockchaincom.js +1 -1
- package/js/src/btcalpha.d.ts +1 -1
- package/js/src/btcbox.d.ts +1 -1
- package/js/src/btcmarkets.d.ts +3 -3
- package/js/src/btcturk.d.ts +1 -1
- package/js/src/bybit.d.ts +8 -8
- package/js/src/bybit.js +1 -1
- package/js/src/cex.d.ts +1 -1
- package/js/src/coinbase.d.ts +6 -50
- package/js/src/coinbase.js +2 -2
- package/js/src/coinbasepro.d.ts +2 -2
- package/js/src/coincheck.d.ts +1 -1
- package/js/src/coinex.d.ts +8 -8
- package/js/src/coinex.js +1 -1
- package/js/src/coinlist.d.ts +4 -14
- package/js/src/coinmate.d.ts +2 -2
- package/js/src/coinmetro.d.ts +2 -2
- package/js/src/coinone.d.ts +1 -1
- package/js/src/coinsph.d.ts +2 -2
- package/js/src/coinspot.d.ts +1 -1
- package/js/src/cryptocom.d.ts +4 -4
- package/js/src/cryptocom.js +10 -10
- package/js/src/currencycom.d.ts +2 -2
- package/js/src/delta.d.ts +2 -2
- package/js/src/deribit.d.ts +4 -14
- package/js/src/digifinex.d.ts +10 -38
- package/js/src/exmo.d.ts +2 -2
- package/js/src/gate.d.ts +8 -18
- package/js/src/gate.js +34 -29
- package/js/src/gemini.d.ts +2 -2
- package/js/src/hitbtc.d.ts +6 -16
- package/js/src/hollaex.d.ts +2 -2
- package/js/src/htx.d.ts +11 -21
- package/js/src/huobijp.d.ts +4 -4
- package/js/src/idex.d.ts +3 -3
- package/js/src/independentreserve.d.ts +2 -2
- package/js/src/indodax.d.ts +2 -2
- package/js/src/kraken.d.ts +5 -5
- package/js/src/kraken.js +39 -0
- package/js/src/krakenfutures.d.ts +7 -7
- package/js/src/krakenfutures.js +25 -3
- package/js/src/kucoin.d.ts +8 -29
- package/js/src/kucoin.js +1 -1
- package/js/src/kucoinfutures.d.ts +4 -4
- package/js/src/kuna.d.ts +2 -2
- package/js/src/latoken.d.ts +4 -14
- package/js/src/lbank.d.ts +2 -5
- package/js/src/luno.d.ts +1 -1
- package/js/src/lykke.d.ts +2 -2
- package/js/src/mercado.d.ts +2 -2
- package/js/src/mexc.d.ts +6 -6
- package/js/src/mexc.js +2 -1
- package/js/src/ndax.d.ts +2 -2
- package/js/src/novadax.d.ts +4 -15
- package/js/src/oceanex.d.ts +1 -1
- package/js/src/okcoin.d.ts +5 -15
- package/js/src/okx.d.ts +8 -18
- package/js/src/okx.js +4 -3
- package/js/src/onetrading.d.ts +2 -2
- package/js/src/p2b.d.ts +1 -1
- package/js/src/paymium.d.ts +3 -13
- package/js/src/phemex.d.ts +5 -5
- package/js/src/phemex.js +8 -8
- package/js/src/poloniex.d.ts +4 -14
- package/js/src/poloniexfutures.d.ts +1 -1
- package/js/src/pro/alpaca.d.ts +2 -2
- package/js/src/pro/alpaca.js +8 -4
- package/js/src/pro/ascendex.d.ts +2 -2
- package/js/src/pro/ascendex.js +1 -2
- package/js/src/pro/binance.d.ts +3 -3
- package/js/src/pro/binance.js +17 -13
- package/js/src/pro/bingx.d.ts +1 -1
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/bitfinex.d.ts +2 -2
- package/js/src/pro/bitfinex.js +21 -24
- package/js/src/pro/bitfinex2.d.ts +2 -2
- package/js/src/pro/bitfinex2.js +13 -17
- package/js/src/pro/bitget.js +3 -1
- package/js/src/pro/bitmart.d.ts +3 -3
- package/js/src/pro/bitmart.js +3 -8
- package/js/src/pro/bitmex.d.ts +1 -1
- package/js/src/pro/bitmex.js +4 -7
- package/js/src/pro/bitopro.d.ts +1 -1
- package/js/src/pro/bitopro.js +2 -5
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.d.ts +1 -1
- package/js/src/pro/bitstamp.js +2 -3
- package/js/src/pro/bitvavo.d.ts +3 -3
- package/js/src/pro/bitvavo.js +12 -5
- package/js/src/pro/blockchaincom.d.ts +8 -8
- package/js/src/pro/blockchaincom.js +22 -23
- package/js/src/pro/bybit.d.ts +2 -2
- package/js/src/pro/bybit.js +5 -5
- package/js/src/pro/cex.d.ts +1 -1
- package/js/src/pro/cex.js +7 -7
- package/js/src/pro/coinbase.d.ts +1 -1
- package/js/src/pro/coinbase.js +3 -2
- package/js/src/pro/coinbasepro.d.ts +1 -1
- package/js/src/pro/coinbasepro.js +1 -1
- package/js/src/pro/coinex.d.ts +2 -2
- package/js/src/pro/coinex.js +15 -13
- package/js/src/pro/currencycom.d.ts +1 -1
- package/js/src/pro/currencycom.js +5 -7
- package/js/src/pro/deribit.d.ts +2 -2
- package/js/src/pro/deribit.js +4 -4
- package/js/src/pro/exmo.d.ts +2 -2
- package/js/src/pro/exmo.js +15 -13
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/gemini.d.ts +1 -1
- package/js/src/pro/gemini.js +4 -2
- package/js/src/pro/hitbtc.d.ts +2 -2
- package/js/src/pro/hitbtc.js +9 -8
- package/js/src/pro/hollaex.d.ts +2 -2
- package/js/src/pro/hollaex.js +2 -2
- package/js/src/pro/htx.d.ts +2 -2
- package/js/src/pro/htx.js +6 -7
- package/js/src/pro/huobijp.d.ts +1 -1
- package/js/src/pro/huobijp.js +3 -5
- package/js/src/pro/idex.js +1 -1
- package/js/src/pro/independentreserve.d.ts +1 -1
- package/js/src/pro/independentreserve.js +14 -13
- package/js/src/pro/kraken.d.ts +2 -2
- package/js/src/pro/kraken.js +10 -16
- package/js/src/pro/krakenfutures.d.ts +1 -1
- package/js/src/pro/krakenfutures.js +10 -6
- package/js/src/pro/kucoin.d.ts +3 -3
- package/js/src/pro/kucoin.js +10 -11
- package/js/src/pro/kucoinfutures.d.ts +3 -3
- package/js/src/pro/kucoinfutures.js +12 -11
- package/js/src/pro/lbank.d.ts +1 -1
- package/js/src/pro/lbank.js +10 -10
- package/js/src/pro/luno.d.ts +2 -2
- package/js/src/pro/luno.js +12 -14
- package/js/src/pro/mexc.d.ts +2 -2
- package/js/src/pro/mexc.js +3 -2
- package/js/src/pro/ndax.d.ts +3 -3
- package/js/src/pro/ndax.js +7 -13
- package/js/src/pro/okcoin.d.ts +1 -1
- package/js/src/pro/okcoin.js +7 -12
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +6 -11
- package/js/src/pro/onetrading.d.ts +1 -1
- package/js/src/pro/onetrading.js +16 -15
- package/js/src/pro/p2b.d.ts +1 -1
- package/js/src/pro/p2b.js +5 -3
- package/js/src/pro/phemex.d.ts +3 -3
- package/js/src/pro/phemex.js +16 -11
- package/js/src/pro/poloniex.d.ts +1 -1
- package/js/src/pro/poloniex.js +6 -4
- package/js/src/pro/poloniexfutures.d.ts +4 -4
- package/js/src/pro/poloniexfutures.js +13 -10
- package/js/src/pro/probit.d.ts +1 -1
- package/js/src/pro/probit.js +14 -12
- package/js/src/pro/upbit.js +8 -8
- package/js/src/pro/wazirx.d.ts +1 -1
- package/js/src/pro/wazirx.js +6 -3
- package/js/src/pro/woo.d.ts +3 -3
- package/js/src/pro/woo.js +8 -6
- package/js/src/probit.d.ts +3 -3
- package/js/src/probit.js +3 -3
- package/js/src/timex.d.ts +1 -1
- package/js/src/tokocrypto.d.ts +3 -3
- package/js/src/tokocrypto.js +2 -2
- package/js/src/upbit.d.ts +2 -2
- package/js/src/wavesexchange.d.ts +3 -4
- package/js/src/wavesexchange.js +2 -1
- package/js/src/wazirx.d.ts +1 -1
- package/js/src/whitebit.d.ts +5 -15
- package/js/src/woo.d.ts +5 -15
- package/js/src/woo.js +1 -1
- package/js/src/yobit.d.ts +21 -6
- package/js/src/yobit.js +39 -0
- package/js/src/zaif.d.ts +2 -2
- package/js/src/zonda.d.ts +4 -14
- package/package.json +22 -8
- package/skip-tests.json +9 -1
- package/tests-manager.sh +1 -2
package/dist/cjs/src/bit2c.js
CHANGED
|
@@ -208,6 +208,7 @@ class bit2c extends bit2c$1 {
|
|
|
208
208
|
* @method
|
|
209
209
|
* @name bit2c#fetchBalance
|
|
210
210
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
211
|
+
* @see https://bit2c.co.il/home/api#balance
|
|
211
212
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
212
213
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
213
214
|
*/
|
|
@@ -262,6 +263,7 @@ class bit2c extends bit2c$1 {
|
|
|
262
263
|
* @method
|
|
263
264
|
* @name bit2c#fetchOrderBook
|
|
264
265
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
266
|
+
* @see https://bit2c.co.il/home/api#orderb
|
|
265
267
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
266
268
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
267
269
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -308,6 +310,7 @@ class bit2c extends bit2c$1 {
|
|
|
308
310
|
* @method
|
|
309
311
|
* @name bit2c#fetchTicker
|
|
310
312
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
313
|
+
* @see https://bit2c.co.il/home/api#ticker
|
|
311
314
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
312
315
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
313
316
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -325,6 +328,8 @@ class bit2c extends bit2c$1 {
|
|
|
325
328
|
* @method
|
|
326
329
|
* @name bit2c#fetchTrades
|
|
327
330
|
* @description get the list of most recent trades for a particular symbol
|
|
331
|
+
* @see https://bit2c.co.il/home/api#transactions
|
|
332
|
+
* @see https://bit2c.co.il/home/api#trades
|
|
328
333
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
329
334
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
330
335
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -367,6 +372,7 @@ class bit2c extends bit2c$1 {
|
|
|
367
372
|
* @method
|
|
368
373
|
* @name bit2c#fetchTradingFees
|
|
369
374
|
* @description fetch the trading fees for multiple markets
|
|
375
|
+
* @see https://bit2c.co.il/home/api#balance
|
|
370
376
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
371
377
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
372
378
|
*/
|
|
@@ -415,6 +421,7 @@ class bit2c extends bit2c$1 {
|
|
|
415
421
|
* @method
|
|
416
422
|
* @name bit2c#createOrder
|
|
417
423
|
* @description create a trade order
|
|
424
|
+
* @see https://bit2c.co.il/home/api#addo
|
|
418
425
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
419
426
|
* @param {string} type 'market' or 'limit'
|
|
420
427
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -448,6 +455,7 @@ class bit2c extends bit2c$1 {
|
|
|
448
455
|
* @method
|
|
449
456
|
* @name bit2c#cancelOrder
|
|
450
457
|
* @description cancels an open order
|
|
458
|
+
* @see https://bit2c.co.il/home/api#cancelo
|
|
451
459
|
* @param {string} id order id
|
|
452
460
|
* @param {string} symbol Not used by bit2c cancelOrder ()
|
|
453
461
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -463,6 +471,7 @@ class bit2c extends bit2c$1 {
|
|
|
463
471
|
* @method
|
|
464
472
|
* @name bit2c#fetchOpenOrders
|
|
465
473
|
* @description fetch all unfilled currently open orders
|
|
474
|
+
* @see https://bit2c.co.il/home/api#geto
|
|
466
475
|
* @param {string} symbol unified market symbol
|
|
467
476
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
468
477
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
@@ -488,6 +497,7 @@ class bit2c extends bit2c$1 {
|
|
|
488
497
|
* @method
|
|
489
498
|
* @name bit2c#fetchOrder
|
|
490
499
|
* @description fetches information on an order made by the user
|
|
500
|
+
* @see https://bit2c.co.il/home/api#getoid
|
|
491
501
|
* @param {string} symbol unified market symbol
|
|
492
502
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
493
503
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -640,6 +650,7 @@ class bit2c extends bit2c$1 {
|
|
|
640
650
|
* @method
|
|
641
651
|
* @name bit2c#fetchMyTrades
|
|
642
652
|
* @description fetch all trades made by the user
|
|
653
|
+
* @see https://bit2c.co.il/home/api#orderh
|
|
643
654
|
* @param {string} symbol unified market symbol
|
|
644
655
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
645
656
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -820,6 +831,7 @@ class bit2c extends bit2c$1 {
|
|
|
820
831
|
* @method
|
|
821
832
|
* @name bit2c#fetchDepositAddress
|
|
822
833
|
* @description fetch the deposit address for a currency associated with this account
|
|
834
|
+
* @see https://bit2c.co.il/home/api#addc
|
|
823
835
|
* @param {string} code unified currency code
|
|
824
836
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
825
837
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
@@ -25,11 +25,13 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
25
25
|
'has': {
|
|
26
26
|
'CORS': undefined,
|
|
27
27
|
'spot': true,
|
|
28
|
-
'margin':
|
|
28
|
+
'margin': true,
|
|
29
29
|
'swap': true,
|
|
30
30
|
'future': undefined,
|
|
31
31
|
'option': undefined,
|
|
32
32
|
'addMargin': false,
|
|
33
|
+
'borrowCrossMargin': false,
|
|
34
|
+
'borrowIsolatedMargin': false,
|
|
33
35
|
'cancelAllOrders': true,
|
|
34
36
|
'cancelOrder': true,
|
|
35
37
|
'cancelOrders': true,
|
|
@@ -46,8 +48,13 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
46
48
|
'createTriggerOrder': true,
|
|
47
49
|
'editOrder': true,
|
|
48
50
|
'fetchBalance': true,
|
|
51
|
+
'fetchBorrowInterest': false,
|
|
52
|
+
'fetchBorrowRateHistories': false,
|
|
53
|
+
'fetchBorrowRateHistory': false,
|
|
49
54
|
'fetchClosedOrder': true,
|
|
50
55
|
'fetchClosedOrders': true,
|
|
56
|
+
'fetchCrossBorrowRate': false,
|
|
57
|
+
'fetchCrossBorrowRates': false,
|
|
51
58
|
'fetchCurrencies': true,
|
|
52
59
|
'fetchDepositAddress': true,
|
|
53
60
|
'fetchDepositsWithdrawals': true,
|
|
@@ -56,6 +63,8 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
56
63
|
'fetchFundingRateHistory': true,
|
|
57
64
|
'fetchFundingRates': true,
|
|
58
65
|
'fetchIndexOHLCV': false,
|
|
66
|
+
'fetchIsolatedBorrowRate': false,
|
|
67
|
+
'fetchIsolatedBorrowRates': false,
|
|
59
68
|
'fetchLedger': true,
|
|
60
69
|
'fetchLeverage': false,
|
|
61
70
|
'fetchLeverageTiers': false,
|
|
@@ -83,6 +92,8 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
83
92
|
'fetchTransactionFees': undefined,
|
|
84
93
|
'fetchTransactions': 'emulated',
|
|
85
94
|
'reduceMargin': false,
|
|
95
|
+
'repayCrossMargin': false,
|
|
96
|
+
'repayIsolatedMargin': false,
|
|
86
97
|
'setLeverage': false,
|
|
87
98
|
'setMargin': true,
|
|
88
99
|
'setMarginMode': false,
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -4135,7 +4135,7 @@ class bitget extends bitget$1 {
|
|
|
4135
4135
|
const isTakeProfit = takeProfit !== undefined;
|
|
4136
4136
|
const isStopLossOrTakeProfitTrigger = isStopLossTriggerOrder || isTakeProfitTriggerOrder;
|
|
4137
4137
|
const isStopLossOrTakeProfit = isStopLoss || isTakeProfit;
|
|
4138
|
-
const trailingTriggerPrice = this.safeString(params, 'trailingTriggerPrice', price);
|
|
4138
|
+
const trailingTriggerPrice = this.safeString(params, 'trailingTriggerPrice', this.numberToString(price));
|
|
4139
4139
|
const trailingPercent = this.safeString2(params, 'trailingPercent', 'callbackRatio');
|
|
4140
4140
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
4141
4141
|
if (this.sum(isTriggerOrder, isStopLossTriggerOrder, isTakeProfitTriggerOrder, isTrailingPercentOrder) > 1) {
|
|
@@ -6958,7 +6958,7 @@ class bitget extends bitget$1 {
|
|
|
6958
6958
|
* @name bitget#setLeverage
|
|
6959
6959
|
* @description set the level of leverage for a market
|
|
6960
6960
|
* @see https://www.bitget.com/api-doc/contract/account/Change-Leverage
|
|
6961
|
-
* @param {
|
|
6961
|
+
* @param {int} leverage the rate of leverage
|
|
6962
6962
|
* @param {string} symbol unified market symbol
|
|
6963
6963
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6964
6964
|
* @param {string} [params.holdSide] *isolated only* position direction, 'long' or 'short'
|
|
@@ -6982,7 +6982,7 @@ class bitget extends bitget$1 {
|
|
|
6982
6982
|
const request = {
|
|
6983
6983
|
'symbol': market['id'],
|
|
6984
6984
|
'marginCoin': market['settleId'],
|
|
6985
|
-
'leverage': leverage,
|
|
6985
|
+
'leverage': this.numberToString(leverage),
|
|
6986
6986
|
'productType': productType,
|
|
6987
6987
|
// 'holdSide': 'long',
|
|
6988
6988
|
};
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -2416,7 +2416,7 @@ class bitmart extends bitmart$1 {
|
|
|
2416
2416
|
}
|
|
2417
2417
|
const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPrice', 'trigger_price']);
|
|
2418
2418
|
const isTriggerOrder = triggerPrice !== undefined;
|
|
2419
|
-
const trailingTriggerPrice = this.safeString2(params, 'trailingTriggerPrice', 'activation_price', price);
|
|
2419
|
+
const trailingTriggerPrice = this.safeString2(params, 'trailingTriggerPrice', 'activation_price', this.numberToString(price));
|
|
2420
2420
|
const trailingPercent = this.safeString2(params, 'trailingPercent', 'callback_rate');
|
|
2421
2421
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
2422
2422
|
if (isLimitOrder) {
|
package/dist/cjs/src/bitrue.js
CHANGED
|
@@ -1973,9 +1973,9 @@ class bitrue extends bitrue$1 {
|
|
|
1973
1973
|
const amountString = this.numberToString(amount);
|
|
1974
1974
|
const priceString = this.numberToString(price);
|
|
1975
1975
|
const quoteAmount = Precise["default"].stringMul(amountString, priceString);
|
|
1976
|
-
|
|
1977
|
-
request['amount'] = this.costToPrecision(symbol,
|
|
1978
|
-
request['volume'] = this.costToPrecision(symbol,
|
|
1976
|
+
const requestAmount = (cost !== undefined) ? cost : quoteAmount;
|
|
1977
|
+
request['amount'] = this.costToPrecision(symbol, requestAmount);
|
|
1978
|
+
request['volume'] = this.costToPrecision(symbol, requestAmount);
|
|
1979
1979
|
}
|
|
1980
1980
|
}
|
|
1981
1981
|
else {
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -3692,7 +3692,7 @@ class bybit extends bybit$1 {
|
|
|
3692
3692
|
const takeProfitTriggerPrice = this.safeValue(params, 'takeProfitPrice');
|
|
3693
3693
|
const stopLoss = this.safeValue(params, 'stopLoss');
|
|
3694
3694
|
const takeProfit = this.safeValue(params, 'takeProfit');
|
|
3695
|
-
const trailingTriggerPrice = this.safeString2(params, 'trailingTriggerPrice', 'activePrice', price);
|
|
3695
|
+
const trailingTriggerPrice = this.safeString2(params, 'trailingTriggerPrice', 'activePrice', this.numberToString(price));
|
|
3696
3696
|
const trailingAmount = this.safeString2(params, 'trailingAmount', 'trailingStop');
|
|
3697
3697
|
const isTrailingAmountOrder = trailingAmount !== undefined;
|
|
3698
3698
|
const isStopLossTriggerOrder = stopLossTriggerPrice !== undefined;
|
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -1622,7 +1622,7 @@ class coinbase extends coinbase$1 {
|
|
|
1622
1622
|
'info': ticker,
|
|
1623
1623
|
}, market);
|
|
1624
1624
|
}
|
|
1625
|
-
|
|
1625
|
+
parseCustomBalance(response, params = {}) {
|
|
1626
1626
|
const balances = this.safeValue2(response, 'data', 'accounts', []);
|
|
1627
1627
|
const accounts = this.safeValue(params, 'type', this.options['accounts']);
|
|
1628
1628
|
const v3Accounts = this.safeValue(params, 'type', this.options['v3Accounts']);
|
|
@@ -1773,7 +1773,7 @@ class coinbase extends coinbase$1 {
|
|
|
1773
1773
|
// "size": 9
|
|
1774
1774
|
// }
|
|
1775
1775
|
//
|
|
1776
|
-
return this.
|
|
1776
|
+
return this.parseCustomBalance(response, params);
|
|
1777
1777
|
}
|
|
1778
1778
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1779
1779
|
/**
|
package/dist/cjs/src/coinex.js
CHANGED
|
@@ -4370,7 +4370,7 @@ class coinex extends coinex$1 {
|
|
|
4370
4370
|
const request = {
|
|
4371
4371
|
'coin_type': currency['id'],
|
|
4372
4372
|
'coin_address': address,
|
|
4373
|
-
'actual_amount': parseFloat(amount),
|
|
4373
|
+
'actual_amount': parseFloat(this.numberToString(amount)),
|
|
4374
4374
|
'transfer_method': 'onchain', // onchain, local
|
|
4375
4375
|
};
|
|
4376
4376
|
if (networkCode !== undefined) {
|
|
@@ -1067,10 +1067,10 @@ class cryptocom extends cryptocom$1 {
|
|
|
1067
1067
|
const isTakeProfitTrigger = (takeProfitPrice !== undefined);
|
|
1068
1068
|
if (isTrigger) {
|
|
1069
1069
|
request['ref_price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1070
|
-
|
|
1070
|
+
const priceString = this.numberToString(price);
|
|
1071
1071
|
if ((uppercaseType === 'LIMIT') || (uppercaseType === 'STOP_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) {
|
|
1072
1072
|
if (side === 'buy') {
|
|
1073
|
-
if (Precise["default"].stringLt(
|
|
1073
|
+
if (Precise["default"].stringLt(priceString, triggerPrice)) {
|
|
1074
1074
|
request['type'] = 'TAKE_PROFIT_LIMIT';
|
|
1075
1075
|
}
|
|
1076
1076
|
else {
|
|
@@ -1078,7 +1078,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
else {
|
|
1081
|
-
if (Precise["default"].stringLt(
|
|
1081
|
+
if (Precise["default"].stringLt(priceString, triggerPrice)) {
|
|
1082
1082
|
request['type'] = 'STOP_LIMIT';
|
|
1083
1083
|
}
|
|
1084
1084
|
else {
|
|
@@ -1088,7 +1088,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
else {
|
|
1090
1090
|
if (side === 'buy') {
|
|
1091
|
-
if (Precise["default"].stringLt(
|
|
1091
|
+
if (Precise["default"].stringLt(priceString, triggerPrice)) {
|
|
1092
1092
|
request['type'] = 'TAKE_PROFIT';
|
|
1093
1093
|
}
|
|
1094
1094
|
else {
|
|
@@ -1096,7 +1096,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
1098
|
else {
|
|
1099
|
-
if (Precise["default"].stringLt(
|
|
1099
|
+
if (Precise["default"].stringLt(priceString, triggerPrice)) {
|
|
1100
1100
|
request['type'] = 'STOP_LOSS';
|
|
1101
1101
|
}
|
|
1102
1102
|
else {
|
|
@@ -1287,10 +1287,10 @@ class cryptocom extends cryptocom$1 {
|
|
|
1287
1287
|
const isStopLossTrigger = (stopLossPrice !== undefined);
|
|
1288
1288
|
const isTakeProfitTrigger = (takeProfitPrice !== undefined);
|
|
1289
1289
|
if (isTrigger) {
|
|
1290
|
-
|
|
1290
|
+
const priceString = this.numberToString(price);
|
|
1291
1291
|
if ((uppercaseType === 'LIMIT') || (uppercaseType === 'STOP_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) {
|
|
1292
1292
|
if (side === 'buy') {
|
|
1293
|
-
if (Precise["default"].stringLt(
|
|
1293
|
+
if (Precise["default"].stringLt(priceString, triggerPrice)) {
|
|
1294
1294
|
request['type'] = 'TAKE_PROFIT_LIMIT';
|
|
1295
1295
|
}
|
|
1296
1296
|
else {
|
|
@@ -1298,7 +1298,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
1300
|
else {
|
|
1301
|
-
if (Precise["default"].stringLt(
|
|
1301
|
+
if (Precise["default"].stringLt(priceString, triggerPrice)) {
|
|
1302
1302
|
request['type'] = 'STOP_LIMIT';
|
|
1303
1303
|
}
|
|
1304
1304
|
else {
|
|
@@ -1308,7 +1308,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
else {
|
|
1310
1310
|
if (side === 'buy') {
|
|
1311
|
-
if (Precise["default"].stringLt(
|
|
1311
|
+
if (Precise["default"].stringLt(priceString, triggerPrice)) {
|
|
1312
1312
|
request['type'] = 'TAKE_PROFIT';
|
|
1313
1313
|
}
|
|
1314
1314
|
else {
|
|
@@ -1316,7 +1316,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
1318
|
else {
|
|
1319
|
-
if (Precise["default"].stringLt(
|
|
1319
|
+
if (Precise["default"].stringLt(priceString, triggerPrice)) {
|
|
1320
1320
|
request['type'] = 'STOP_LOSS';
|
|
1321
1321
|
}
|
|
1322
1322
|
else {
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -1618,32 +1618,34 @@ class gate extends gate$1 {
|
|
|
1618
1618
|
let withdrawAvailable = this.safeValue(result[code], 'withdraw');
|
|
1619
1619
|
withdrawAvailable = (withdrawEnabled) ? withdrawEnabled : withdrawAvailable;
|
|
1620
1620
|
const networks = this.safeValue(result[code], 'networks', {});
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
'
|
|
1634
|
-
'
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
'
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
'
|
|
1643
|
-
|
|
1621
|
+
if (networkCode !== undefined) {
|
|
1622
|
+
networks[networkCode] = {
|
|
1623
|
+
'info': entry,
|
|
1624
|
+
'id': networkId,
|
|
1625
|
+
'network': networkCode,
|
|
1626
|
+
'currencyId': currencyId,
|
|
1627
|
+
'lowerCaseCurrencyId': currencyIdLower,
|
|
1628
|
+
'deposit': depositEnabled,
|
|
1629
|
+
'withdraw': withdrawEnabled,
|
|
1630
|
+
'active': active,
|
|
1631
|
+
'fee': undefined,
|
|
1632
|
+
'precision': this.parseNumber('1e-4'),
|
|
1633
|
+
'limits': {
|
|
1634
|
+
'amount': {
|
|
1635
|
+
'min': undefined,
|
|
1636
|
+
'max': undefined,
|
|
1637
|
+
},
|
|
1638
|
+
'withdraw': {
|
|
1639
|
+
'min': undefined,
|
|
1640
|
+
'max': undefined,
|
|
1641
|
+
},
|
|
1642
|
+
'deposit': {
|
|
1643
|
+
'min': undefined,
|
|
1644
|
+
'max': undefined,
|
|
1645
|
+
},
|
|
1644
1646
|
},
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
+
};
|
|
1648
|
+
}
|
|
1647
1649
|
result[code]['networks'] = networks;
|
|
1648
1650
|
const info = this.safeValue(result[code], 'info', []);
|
|
1649
1651
|
info.push(entry);
|
|
@@ -2599,6 +2601,7 @@ class gate extends gate$1 {
|
|
|
2599
2601
|
const [type, query] = this.handleMarketTypeAndParams('fetchTickers', market, params);
|
|
2600
2602
|
const [request, requestParams] = this.prepareRequest(undefined, type, query);
|
|
2601
2603
|
let response = undefined;
|
|
2604
|
+
request['timezone'] = 'utc0'; // default to utc
|
|
2602
2605
|
if (type === 'spot' || type === 'margin') {
|
|
2603
2606
|
response = await this.publicSpotGetTickers(this.extend(request, requestParams));
|
|
2604
2607
|
}
|
|
@@ -2616,7 +2619,7 @@ class gate extends gate$1 {
|
|
|
2616
2619
|
response = await this.publicOptionsGetTickers(this.extend(request, requestParams));
|
|
2617
2620
|
}
|
|
2618
2621
|
else {
|
|
2619
|
-
throw new errors.NotSupported(this.id + ' fetchTickers() not support this market type');
|
|
2622
|
+
throw new errors.NotSupported(this.id + ' fetchTickers() not support this market type, provide symbols or set params["defaultType"] to one from spot/margin/swap/future/option');
|
|
2620
2623
|
}
|
|
2621
2624
|
return this.parseTickers(response, symbols);
|
|
2622
2625
|
}
|
|
@@ -5187,16 +5190,17 @@ class gate extends gate$1 {
|
|
|
5187
5190
|
const defaultMarginMode = this.safeString2(this.options, 'marginMode', 'defaultMarginMode');
|
|
5188
5191
|
const crossLeverageLimit = this.safeString(query, 'cross_leverage_limit');
|
|
5189
5192
|
let marginMode = this.safeString(query, 'marginMode', defaultMarginMode);
|
|
5193
|
+
let stringifiedMargin = this.numberToString(leverage);
|
|
5190
5194
|
if (crossLeverageLimit !== undefined) {
|
|
5191
5195
|
marginMode = 'cross';
|
|
5192
|
-
|
|
5196
|
+
stringifiedMargin = crossLeverageLimit;
|
|
5193
5197
|
}
|
|
5194
5198
|
if (marginMode === 'cross' || marginMode === 'cross_margin') {
|
|
5195
|
-
request['cross_leverage_limit'] =
|
|
5199
|
+
request['cross_leverage_limit'] = stringifiedMargin;
|
|
5196
5200
|
request['leverage'] = '0';
|
|
5197
5201
|
}
|
|
5198
5202
|
else {
|
|
5199
|
-
request['leverage'] =
|
|
5203
|
+
request['leverage'] = stringifiedMargin;
|
|
5200
5204
|
}
|
|
5201
5205
|
let response = undefined;
|
|
5202
5206
|
if (market['swap']) {
|
|
@@ -6931,6 +6935,7 @@ class gate extends gate$1 {
|
|
|
6931
6935
|
return this.parseGreeks(entry, market);
|
|
6932
6936
|
}
|
|
6933
6937
|
}
|
|
6938
|
+
return undefined;
|
|
6934
6939
|
}
|
|
6935
6940
|
parseGreeks(greeks, market = undefined) {
|
|
6936
6941
|
//
|
package/dist/cjs/src/kraken.js
CHANGED
|
@@ -1509,6 +1509,41 @@ class kraken extends kraken$1 {
|
|
|
1509
1509
|
// "txid": "OTI672-HJFAO-XOIPPK"
|
|
1510
1510
|
// }
|
|
1511
1511
|
//
|
|
1512
|
+
// {
|
|
1513
|
+
// "error": [],
|
|
1514
|
+
// "result": {
|
|
1515
|
+
// "open": {
|
|
1516
|
+
// "OXVPSU-Q726F-L3SDEP": {
|
|
1517
|
+
// "refid": null,
|
|
1518
|
+
// "userref": 0,
|
|
1519
|
+
// "status": "open",
|
|
1520
|
+
// "opentm": 1706893367.4656649,
|
|
1521
|
+
// "starttm": 0,
|
|
1522
|
+
// "expiretm": 0,
|
|
1523
|
+
// "descr": {
|
|
1524
|
+
// "pair": "XRPEUR",
|
|
1525
|
+
// "type": "sell",
|
|
1526
|
+
// "ordertype": "trailing-stop",
|
|
1527
|
+
// "price": "+50.0000%",
|
|
1528
|
+
// "price2": "0",
|
|
1529
|
+
// "leverage": "none",
|
|
1530
|
+
// "order": "sell 10.00000000 XRPEUR @ trailing stop +50.0000%",
|
|
1531
|
+
// "close": ""
|
|
1532
|
+
// },
|
|
1533
|
+
// "vol": "10.00000000",
|
|
1534
|
+
// "vol_exec": "0.00000000",
|
|
1535
|
+
// "cost": "0.00000000",
|
|
1536
|
+
// "fee": "0.00000000",
|
|
1537
|
+
// "price": "0.00000000",
|
|
1538
|
+
// "stopprice": "0.23424000",
|
|
1539
|
+
// "limitprice": "0.46847000",
|
|
1540
|
+
// "misc": "",
|
|
1541
|
+
// "oflags": "fciq",
|
|
1542
|
+
// "trigger": "index"
|
|
1543
|
+
// }
|
|
1544
|
+
// }
|
|
1545
|
+
// }
|
|
1546
|
+
//
|
|
1512
1547
|
const description = this.safeValue(order, 'descr', {});
|
|
1513
1548
|
const orderDescription = this.safeString(description, 'order', description);
|
|
1514
1549
|
let side = undefined;
|
|
@@ -1550,6 +1585,10 @@ class kraken extends kraken$1 {
|
|
|
1550
1585
|
// kraken truncates the cost in the api response so we will ignore it and calculate it from average & filled
|
|
1551
1586
|
// const cost = this.safeString (order, 'cost');
|
|
1552
1587
|
price = this.safeString(description, 'price', price);
|
|
1588
|
+
// when type = trailling stop returns price = '+50.0000%'
|
|
1589
|
+
if ((price !== undefined) && price.endsWith('%')) {
|
|
1590
|
+
price = undefined; // this is not the price we want
|
|
1591
|
+
}
|
|
1553
1592
|
if ((price === undefined) || Precise["default"].stringEquals(price, '0')) {
|
|
1554
1593
|
price = this.safeString(description, 'price2');
|
|
1555
1594
|
}
|
|
@@ -151,10 +151,32 @@ class krakenfutures extends krakenfutures$1 {
|
|
|
151
151
|
},
|
|
152
152
|
'fees': {
|
|
153
153
|
'trading': {
|
|
154
|
-
'tierBased':
|
|
154
|
+
'tierBased': true,
|
|
155
155
|
'percentage': true,
|
|
156
|
-
'
|
|
157
|
-
'
|
|
156
|
+
'taker': this.parseNumber('0.0005'),
|
|
157
|
+
'maker': this.parseNumber('0.0002'),
|
|
158
|
+
'tiers': {
|
|
159
|
+
'taker': [
|
|
160
|
+
[this.parseNumber('0'), this.parseNumber('0.0005')],
|
|
161
|
+
[this.parseNumber('100000'), this.parseNumber('0.0004')],
|
|
162
|
+
[this.parseNumber('1000000'), this.parseNumber('0.0003')],
|
|
163
|
+
[this.parseNumber('5000000'), this.parseNumber('0.00025')],
|
|
164
|
+
[this.parseNumber('10000000'), this.parseNumber('0.0002')],
|
|
165
|
+
[this.parseNumber('20000000'), this.parseNumber('0.00015')],
|
|
166
|
+
[this.parseNumber('50000000'), this.parseNumber('0.000125')],
|
|
167
|
+
[this.parseNumber('100000000'), this.parseNumber('0.0001')],
|
|
168
|
+
],
|
|
169
|
+
'maker': [
|
|
170
|
+
[this.parseNumber('0'), this.parseNumber('0.0002')],
|
|
171
|
+
[this.parseNumber('100000'), this.parseNumber('0.0015')],
|
|
172
|
+
[this.parseNumber('1000000'), this.parseNumber('0.000125')],
|
|
173
|
+
[this.parseNumber('5000000'), this.parseNumber('0.0001')],
|
|
174
|
+
[this.parseNumber('10000000'), this.parseNumber('0.000075')],
|
|
175
|
+
[this.parseNumber('20000000'), this.parseNumber('0.00005')],
|
|
176
|
+
[this.parseNumber('50000000'), this.parseNumber('0.000025')],
|
|
177
|
+
[this.parseNumber('100000000'), this.parseNumber('0')],
|
|
178
|
+
],
|
|
179
|
+
},
|
|
158
180
|
},
|
|
159
181
|
},
|
|
160
182
|
'exceptions': {
|
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -4422,7 +4422,7 @@ class kucoin extends kucoin$1 {
|
|
|
4422
4422
|
let endpart = '';
|
|
4423
4423
|
headers = (headers !== undefined) ? headers : {};
|
|
4424
4424
|
let url = this.urls['api'][api];
|
|
4425
|
-
if (
|
|
4425
|
+
if (!this.isEmpty(query)) {
|
|
4426
4426
|
if ((method === 'GET') || (method === 'DELETE')) {
|
|
4427
4427
|
endpoint += '?' + this.rawencode(query);
|
|
4428
4428
|
}
|
package/dist/cjs/src/mexc.js
CHANGED
|
@@ -1355,7 +1355,8 @@ class mexc extends mexc$1 {
|
|
|
1355
1355
|
}
|
|
1356
1356
|
return orderbook;
|
|
1357
1357
|
}
|
|
1358
|
-
parseBidAsk(bidask, priceKey = 0, amountKey = 1,
|
|
1358
|
+
parseBidAsk(bidask, priceKey = 0, amountKey = 1, countOrIdKey = 2) {
|
|
1359
|
+
const countKey = 2;
|
|
1359
1360
|
const price = this.safeNumber(bidask, priceKey);
|
|
1360
1361
|
const amount = this.safeNumber(bidask, amountKey);
|
|
1361
1362
|
const count = this.safeNumber(bidask, countKey);
|
package/dist/cjs/src/okx.js
CHANGED
|
@@ -1521,8 +1521,8 @@ class okx extends okx$1 {
|
|
|
1521
1521
|
// "msg": ""
|
|
1522
1522
|
// }
|
|
1523
1523
|
//
|
|
1524
|
-
const
|
|
1525
|
-
return this.parseMarkets(
|
|
1524
|
+
const dataResponse = this.safeValue(response, 'data', []);
|
|
1525
|
+
return this.parseMarkets(dataResponse);
|
|
1526
1526
|
}
|
|
1527
1527
|
safeNetwork(networkId) {
|
|
1528
1528
|
const networksById = {
|
|
@@ -3149,7 +3149,7 @@ class okx extends okx$1 {
|
|
|
3149
3149
|
* @param {string[]|string} ids order ids
|
|
3150
3150
|
* @returns {string[]} list of order ids
|
|
3151
3151
|
*/
|
|
3152
|
-
if (typeof ids === 'string') {
|
|
3152
|
+
if ((ids !== undefined) && typeof ids === 'string') {
|
|
3153
3153
|
return ids.split(',');
|
|
3154
3154
|
}
|
|
3155
3155
|
else {
|
|
@@ -7228,6 +7228,7 @@ class okx extends okx$1 {
|
|
|
7228
7228
|
return this.parseGreeks(entry, market);
|
|
7229
7229
|
}
|
|
7230
7230
|
}
|
|
7231
|
+
return undefined;
|
|
7231
7232
|
}
|
|
7232
7233
|
parseGreeks(greeks, market = undefined) {
|
|
7233
7234
|
//
|
package/dist/cjs/src/phemex.js
CHANGED
|
@@ -1130,7 +1130,7 @@ class phemex extends phemex$1 {
|
|
|
1130
1130
|
return orderbook;
|
|
1131
1131
|
}
|
|
1132
1132
|
toEn(n, scale) {
|
|
1133
|
-
const stringN =
|
|
1133
|
+
const stringN = this.numberToString(n);
|
|
1134
1134
|
const precise = new Precise["default"](stringN);
|
|
1135
1135
|
precise.decimals = precise.decimals - scale;
|
|
1136
1136
|
precise.reduce();
|
|
@@ -2523,11 +2523,11 @@ class phemex extends phemex$1 {
|
|
|
2523
2523
|
}
|
|
2524
2524
|
}
|
|
2525
2525
|
cost = (cost === undefined) ? amount : cost;
|
|
2526
|
-
const costString =
|
|
2526
|
+
const costString = this.numberToString(cost);
|
|
2527
2527
|
request['quoteQtyEv'] = this.toEv(costString, market);
|
|
2528
2528
|
}
|
|
2529
2529
|
else {
|
|
2530
|
-
const amountString =
|
|
2530
|
+
const amountString = this.numberToString(amount);
|
|
2531
2531
|
request['baseQtyEv'] = this.toEv(amountString, market);
|
|
2532
2532
|
}
|
|
2533
2533
|
}
|
|
@@ -2545,7 +2545,7 @@ class phemex extends phemex$1 {
|
|
|
2545
2545
|
request['orderQtyRq'] = amount;
|
|
2546
2546
|
}
|
|
2547
2547
|
else {
|
|
2548
|
-
request['orderQty'] =
|
|
2548
|
+
request['orderQty'] = this.parseToInt(amount);
|
|
2549
2549
|
}
|
|
2550
2550
|
if (stopPrice !== undefined) {
|
|
2551
2551
|
const triggerType = this.safeString(params, 'triggerType', 'ByMarkPrice');
|
|
@@ -4342,10 +4342,10 @@ class phemex extends phemex$1 {
|
|
|
4342
4342
|
request['leverageRr'] = leverage;
|
|
4343
4343
|
}
|
|
4344
4344
|
else {
|
|
4345
|
-
const
|
|
4346
|
-
const
|
|
4347
|
-
request['longLeverageRr'] =
|
|
4348
|
-
request['shortLeverageRr'] =
|
|
4345
|
+
const longVar = (longLeverageRr !== undefined) ? longLeverageRr : leverage;
|
|
4346
|
+
const shortVar = (shortLeverageRr !== undefined) ? shortLeverageRr : leverage;
|
|
4347
|
+
request['longLeverageRr'] = longVar;
|
|
4348
|
+
request['shortLeverageRr'] = shortVar;
|
|
4349
4349
|
}
|
|
4350
4350
|
response = await this.privatePutGPositionsLeverage(this.extend(request, params));
|
|
4351
4351
|
}
|
|
@@ -612,13 +612,16 @@ class alpaca extends alpaca$1 {
|
|
|
612
612
|
const T = this.safeString(data, 'T');
|
|
613
613
|
const msg = this.safeValue(data, 'msg', {});
|
|
614
614
|
if (T === 'subscription') {
|
|
615
|
-
|
|
615
|
+
this.handleSubscription(client, data);
|
|
616
|
+
return;
|
|
616
617
|
}
|
|
617
618
|
if (T === 'success' && msg === 'connected') {
|
|
618
|
-
|
|
619
|
+
this.handleConnected(client, data);
|
|
620
|
+
return;
|
|
619
621
|
}
|
|
620
622
|
if (T === 'success' && msg === 'authenticated') {
|
|
621
|
-
|
|
623
|
+
this.handleAuthenticate(client, data);
|
|
624
|
+
return;
|
|
622
625
|
}
|
|
623
626
|
const methods = {
|
|
624
627
|
'error': this.handleErrorMessage,
|
|
@@ -647,7 +650,8 @@ class alpaca extends alpaca$1 {
|
|
|
647
650
|
}
|
|
648
651
|
handleMessage(client, message) {
|
|
649
652
|
if (Array.isArray(message)) {
|
|
650
|
-
|
|
653
|
+
this.handleCryptoMessage(client, message);
|
|
654
|
+
return;
|
|
651
655
|
}
|
|
652
656
|
this.handleTradingMessage(client, message);
|
|
653
657
|
}
|