ccxt 4.0.74 → 4.0.76
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 +4 -4
- package/dist/ccxt.browser.js +2635 -2383
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +11 -11
- package/dist/cjs/src/alpaca.js +7 -7
- package/dist/cjs/src/ascendex.js +25 -25
- package/dist/cjs/src/base/Exchange.js +4 -4
- package/dist/cjs/src/bigone.js +19 -19
- package/dist/cjs/src/binance.js +56 -56
- package/dist/cjs/src/bingx.js +85 -40
- package/dist/cjs/src/bit2c.js +12 -12
- package/dist/cjs/src/bitbank.js +13 -13
- package/dist/cjs/src/bitbns.js +14 -14
- package/dist/cjs/src/bitfinex.js +21 -21
- package/dist/cjs/src/bitfinex2.js +29 -29
- package/dist/cjs/src/bitflyer.js +17 -17
- package/dist/cjs/src/bitforex.js +11 -11
- package/dist/cjs/src/bitget.js +39 -39
- package/dist/cjs/src/bithumb.js +11 -11
- package/dist/cjs/src/bitmart.js +44 -31
- package/dist/cjs/src/bitmex.js +24 -24
- package/dist/cjs/src/bitopro.js +21 -21
- package/dist/cjs/src/bitpanda.js +21 -21
- package/dist/cjs/src/bitrue.js +18 -18
- package/dist/cjs/src/bitso.js +21 -21
- package/dist/cjs/src/bitstamp.js +21 -21
- package/dist/cjs/src/bitstamp1.js +8 -8
- package/dist/cjs/src/bittrex.js +27 -27
- package/dist/cjs/src/bitvavo.js +19 -19
- package/dist/cjs/src/bkex.js +21 -21
- package/dist/cjs/src/bl3p.js +8 -8
- package/dist/cjs/src/blockchaincom.js +21 -21
- package/dist/cjs/src/btcalpha.js +15 -15
- package/dist/cjs/src/btcbox.js +10 -10
- package/dist/cjs/src/btcmarkets.js +17 -17
- package/dist/cjs/src/btctradeua.js +8 -8
- package/dist/cjs/src/btcturk.js +11 -11
- package/dist/cjs/src/bybit.js +153 -121
- package/dist/cjs/src/cex.js +14 -14
- package/dist/cjs/src/coinbase.js +23 -23
- package/dist/cjs/src/coinbasepro.js +24 -24
- package/dist/cjs/src/coincheck.js +12 -12
- package/dist/cjs/src/coinex.js +87 -41
- package/dist/cjs/src/coinfalcon.js +16 -16
- package/dist/cjs/src/coinmate.js +14 -14
- package/dist/cjs/src/coinone.js +12 -12
- package/dist/cjs/src/coinsph.js +27 -22
- package/dist/cjs/src/coinspot.js +8 -8
- package/dist/cjs/src/cryptocom.js +29 -29
- package/dist/cjs/src/currencycom.js +20 -20
- package/dist/cjs/src/delta.js +25 -25
- package/dist/cjs/src/deribit.js +30 -30
- package/dist/cjs/src/digifinex.js +31 -31
- package/dist/cjs/src/exmo.js +26 -26
- package/dist/cjs/src/gate.js +38 -38
- package/dist/cjs/src/gemini.js +17 -17
- package/dist/cjs/src/hitbtc.js +34 -34
- package/dist/cjs/src/hollaex.js +23 -23
- package/dist/cjs/src/huobi.js +45 -45
- package/dist/cjs/src/huobijp.js +20 -20
- package/dist/cjs/src/idex.js +19 -19
- package/dist/cjs/src/independentreserve.js +12 -12
- package/dist/cjs/src/indodax.js +14 -14
- package/dist/cjs/src/kraken.js +27 -27
- package/dist/cjs/src/krakenfutures.js +12 -12
- package/dist/cjs/src/kucoin.js +33 -33
- package/dist/cjs/src/kucoinfutures.js +24 -24
- package/dist/cjs/src/kuna.js +12 -12
- package/dist/cjs/src/latoken.js +17 -17
- package/dist/cjs/src/lbank.js +12 -12
- package/dist/cjs/src/lbank2.js +23 -23
- package/dist/cjs/src/luno.js +16 -16
- package/dist/cjs/src/lykke.js +16 -16
- package/dist/cjs/src/mercado.js +12 -12
- package/dist/cjs/src/mexc.js +44 -42
- package/dist/cjs/src/ndax.js +20 -20
- package/dist/cjs/src/novadax.js +20 -20
- package/dist/cjs/src/oceanex.js +16 -16
- package/dist/cjs/src/okcoin.js +21 -21
- package/dist/cjs/src/okx.js +52 -52
- package/dist/cjs/src/paymium.js +11 -11
- package/dist/cjs/src/phemex.js +26 -26
- package/dist/cjs/src/poloniex.js +237 -136
- package/dist/cjs/src/poloniexfutures.js +18 -18
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +4 -4
- package/dist/cjs/src/pro/binance.js +16 -16
- package/dist/cjs/src/pro/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +6 -6
- package/dist/cjs/src/pro/bitget.js +6 -6
- package/dist/cjs/src/pro/bitmart.js +4 -4
- package/dist/cjs/src/pro/bitmex.js +6 -6
- package/dist/cjs/src/pro/bitopro.js +4 -4
- package/dist/cjs/src/pro/bitpanda.js +6 -6
- package/dist/cjs/src/pro/bitrue.js +2 -2
- package/dist/cjs/src/pro/bitstamp.js +3 -3
- package/dist/cjs/src/pro/bittrex.js +6 -6
- package/dist/cjs/src/pro/bitvavo.js +5 -5
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/bybit.js +6 -6
- package/dist/cjs/src/pro/cex.js +7 -7
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +6 -6
- package/dist/cjs/src/pro/coinex.js +5 -5
- package/dist/cjs/src/pro/cryptocom.js +10 -10
- package/dist/cjs/src/pro/currencycom.js +4 -4
- package/dist/cjs/src/pro/deribit.js +6 -6
- package/dist/cjs/src/pro/exmo.js +5 -5
- package/dist/cjs/src/pro/gate.js +7 -7
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/hitbtc.js +3 -3
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/huobi.js +6 -6
- package/dist/cjs/src/pro/huobijp.js +3 -3
- package/dist/cjs/src/pro/idex.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +12 -12
- package/dist/cjs/src/pro/krakenfutures.js +7 -7
- package/dist/cjs/src/pro/kucoin.js +6 -6
- package/dist/cjs/src/pro/kucoinfutures.js +6 -5
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +6 -6
- package/dist/cjs/src/pro/ndax.js +3 -3
- package/dist/cjs/src/pro/okcoin.js +5 -5
- package/dist/cjs/src/pro/okx.js +19 -18
- package/dist/cjs/src/pro/phemex.js +6 -6
- package/dist/cjs/src/pro/poloniex.js +7 -7
- package/dist/cjs/src/pro/poloniexfutures.js +5 -5
- package/dist/cjs/src/pro/probit.js +6 -6
- package/dist/cjs/src/pro/upbit.js +3 -3
- package/dist/cjs/src/pro/wazirx.js +6 -6
- package/dist/cjs/src/pro/whitebit.js +6 -6
- package/dist/cjs/src/probit.js +19 -19
- package/dist/cjs/src/tidex.js +13 -13
- package/dist/cjs/src/timex.js +16 -16
- package/dist/cjs/src/tokocrypto.js +18 -18
- package/dist/cjs/src/upbit.js +20 -20
- package/dist/cjs/src/wavesexchange.js +16 -16
- package/dist/cjs/src/wazirx.js +12 -12
- package/dist/cjs/src/whitebit.js +24 -24
- package/dist/cjs/src/woo.js +30 -24
- package/dist/cjs/src/yobit.js +16 -16
- package/dist/cjs/src/zaif.js +10 -10
- package/dist/cjs/src/zonda.js +15 -15
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +2 -0
- package/js/src/abstract/bitmart.d.ts +13 -0
- package/js/src/abstract/bybit.d.ts +33 -21
- package/js/src/abstract/coinsph.d.ts +5 -0
- package/js/src/abstract/woo.d.ts +6 -0
- package/js/src/ace.js +11 -11
- package/js/src/alpaca.js +7 -7
- package/js/src/ascendex.js +25 -25
- package/js/src/base/Exchange.js +4 -4
- package/js/src/bigone.js +19 -19
- package/js/src/binance.js +56 -56
- package/js/src/bingx.d.ts +1 -0
- package/js/src/bingx.js +85 -40
- package/js/src/bit2c.js +12 -12
- package/js/src/bitbank.js +13 -13
- package/js/src/bitbns.js +14 -14
- package/js/src/bitfinex.js +21 -21
- package/js/src/bitfinex2.js +29 -29
- package/js/src/bitflyer.js +17 -17
- package/js/src/bitforex.js +11 -11
- package/js/src/bitget.js +39 -39
- package/js/src/bithumb.js +11 -11
- package/js/src/bitmart.js +44 -31
- package/js/src/bitmex.js +24 -24
- package/js/src/bitopro.js +21 -21
- package/js/src/bitpanda.js +21 -21
- package/js/src/bitrue.js +18 -18
- package/js/src/bitso.js +21 -21
- package/js/src/bitstamp.js +21 -21
- package/js/src/bitstamp1.js +8 -8
- package/js/src/bittrex.js +27 -27
- package/js/src/bitvavo.js +19 -19
- package/js/src/bkex.js +21 -21
- package/js/src/bl3p.js +8 -8
- package/js/src/blockchaincom.js +21 -21
- package/js/src/btcalpha.js +15 -15
- package/js/src/btcbox.js +10 -10
- package/js/src/btcmarkets.js +17 -17
- package/js/src/btctradeua.js +8 -8
- package/js/src/btcturk.js +11 -11
- package/js/src/bybit.js +153 -121
- package/js/src/cex.js +14 -14
- package/js/src/coinbase.js +23 -23
- package/js/src/coinbasepro.js +24 -24
- package/js/src/coincheck.js +12 -12
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +87 -41
- package/js/src/coinfalcon.js +16 -16
- package/js/src/coinmate.js +14 -14
- package/js/src/coinone.js +12 -12
- package/js/src/coinsph.js +27 -22
- package/js/src/coinspot.js +8 -8
- package/js/src/cryptocom.js +29 -29
- package/js/src/currencycom.js +20 -20
- package/js/src/delta.js +25 -25
- package/js/src/deribit.js +30 -30
- package/js/src/digifinex.js +31 -31
- package/js/src/exmo.js +26 -26
- package/js/src/gate.js +38 -38
- package/js/src/gemini.js +17 -17
- package/js/src/hitbtc.js +34 -34
- package/js/src/hollaex.js +23 -23
- package/js/src/huobi.js +45 -45
- package/js/src/huobijp.js +20 -20
- package/js/src/idex.js +19 -19
- package/js/src/independentreserve.js +12 -12
- package/js/src/indodax.js +14 -14
- package/js/src/kraken.js +27 -27
- package/js/src/krakenfutures.js +12 -12
- package/js/src/kucoin.js +33 -33
- package/js/src/kucoinfutures.js +24 -24
- package/js/src/kuna.js +12 -12
- package/js/src/latoken.js +17 -17
- package/js/src/lbank.js +12 -12
- package/js/src/lbank2.js +23 -23
- package/js/src/luno.js +16 -16
- package/js/src/lykke.js +16 -16
- package/js/src/mercado.js +12 -12
- package/js/src/mexc.js +45 -43
- package/js/src/ndax.js +20 -20
- package/js/src/novadax.js +20 -20
- package/js/src/oceanex.js +16 -16
- package/js/src/okcoin.js +21 -21
- package/js/src/okx.js +52 -52
- package/js/src/paymium.js +11 -11
- package/js/src/phemex.js +26 -26
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +237 -136
- package/js/src/poloniexfutures.js +18 -18
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +4 -4
- package/js/src/pro/binance.js +16 -16
- package/js/src/pro/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.js +6 -6
- package/js/src/pro/bitget.js +6 -6
- package/js/src/pro/bitmart.js +4 -4
- package/js/src/pro/bitmex.js +6 -6
- package/js/src/pro/bitopro.js +4 -4
- package/js/src/pro/bitpanda.js +6 -6
- package/js/src/pro/bitrue.js +2 -2
- package/js/src/pro/bitstamp.js +3 -3
- package/js/src/pro/bittrex.js +6 -6
- package/js/src/pro/bitvavo.js +5 -5
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/bybit.js +6 -6
- package/js/src/pro/cex.js +7 -7
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +6 -6
- package/js/src/pro/coinex.js +5 -5
- package/js/src/pro/cryptocom.js +10 -10
- package/js/src/pro/currencycom.js +4 -4
- package/js/src/pro/deribit.js +6 -6
- package/js/src/pro/exmo.js +5 -5
- package/js/src/pro/gate.js +7 -7
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/hitbtc.js +3 -3
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/huobi.js +6 -6
- package/js/src/pro/huobijp.js +3 -3
- package/js/src/pro/idex.js +4 -4
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.js +12 -12
- package/js/src/pro/krakenfutures.js +7 -7
- package/js/src/pro/kucoin.js +6 -6
- package/js/src/pro/kucoinfutures.js +6 -5
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.js +6 -6
- package/js/src/pro/ndax.js +3 -3
- package/js/src/pro/okcoin.js +5 -5
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +19 -18
- package/js/src/pro/phemex.js +6 -6
- package/js/src/pro/poloniex.js +7 -7
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/pro/probit.js +6 -6
- package/js/src/pro/upbit.js +3 -3
- package/js/src/pro/wazirx.js +6 -6
- package/js/src/pro/whitebit.js +6 -6
- package/js/src/probit.js +19 -19
- package/js/src/tidex.js +13 -13
- package/js/src/timex.js +16 -16
- package/js/src/tokocrypto.js +18 -18
- package/js/src/upbit.js +20 -20
- package/js/src/wavesexchange.js +16 -16
- package/js/src/wazirx.js +12 -12
- package/js/src/whitebit.js +24 -24
- package/js/src/woo.js +30 -24
- package/js/src/yobit.js +16 -16
- package/js/src/zaif.js +10 -10
- package/js/src/zonda.js +15 -15
- package/package.json +1 -1
- package/skip-tests.json +2 -0
package/js/src/poloniex.js
CHANGED
|
@@ -29,9 +29,9 @@ export default class poloniex extends Exchange {
|
|
|
29
29
|
'CORS': undefined,
|
|
30
30
|
'spot': true,
|
|
31
31
|
'margin': undefined,
|
|
32
|
-
'swap':
|
|
33
|
-
'future':
|
|
34
|
-
'option':
|
|
32
|
+
'swap': false,
|
|
33
|
+
'future': false,
|
|
34
|
+
'option': false,
|
|
35
35
|
'cancelAllOrders': true,
|
|
36
36
|
'cancelOrder': true,
|
|
37
37
|
'createDepositAddress': true,
|
|
@@ -554,26 +554,33 @@ export default class poloniex extends Exchange {
|
|
|
554
554
|
//
|
|
555
555
|
// {
|
|
556
556
|
// "symbol" : "BTC_USDT",
|
|
557
|
-
// "open" : "
|
|
558
|
-
// "low" : "
|
|
559
|
-
// "high" : "
|
|
560
|
-
// "close" : "
|
|
561
|
-
// "quantity" : "
|
|
562
|
-
// "amount" : "
|
|
563
|
-
// "tradeCount" :
|
|
564
|
-
// "startTime" :
|
|
565
|
-
// "closeTime" :
|
|
557
|
+
// "open" : "26053.33",
|
|
558
|
+
// "low" : "26053.33",
|
|
559
|
+
// "high" : "26798.02",
|
|
560
|
+
// "close" : "26447.58",
|
|
561
|
+
// "quantity" : "6116.210188",
|
|
562
|
+
// "amount" : "161082122.88450926",
|
|
563
|
+
// "tradeCount" : "134709",
|
|
564
|
+
// "startTime" : "1692784440000",
|
|
565
|
+
// "closeTime" : "1692870839630",
|
|
566
566
|
// "displayName" : "BTC/USDT",
|
|
567
|
-
// "dailyChange" : "0.
|
|
568
|
-
// "
|
|
567
|
+
// "dailyChange" : "0.0151",
|
|
568
|
+
// "bid" : "26447.57",
|
|
569
|
+
// "bidQuantity" : "0.016313",
|
|
570
|
+
// "ask" : "26447.58",
|
|
571
|
+
// "askQuantity" : "0.068307",
|
|
572
|
+
// "ts" : "1692870845446",
|
|
573
|
+
// "markPrice" : "26444.11"
|
|
569
574
|
// }
|
|
570
575
|
//
|
|
571
576
|
const timestamp = this.safeInteger(ticker, 'ts');
|
|
572
577
|
const marketId = this.safeString(ticker, 'symbol');
|
|
573
578
|
market = this.safeMarket(marketId);
|
|
574
579
|
const close = this.safeString(ticker, 'close');
|
|
575
|
-
const relativeChange = this.safeString(ticker, '
|
|
580
|
+
const relativeChange = this.safeString(ticker, 'dailyChange');
|
|
576
581
|
const percentage = Precise.stringMul(relativeChange, '100');
|
|
582
|
+
const bidVolume = this.safeString(ticker, 'bidQuantity');
|
|
583
|
+
const askVolume = this.safeString(ticker, 'askQuantity');
|
|
577
584
|
return this.safeTicker({
|
|
578
585
|
'id': marketId,
|
|
579
586
|
'symbol': market['symbol'],
|
|
@@ -581,10 +588,10 @@ export default class poloniex extends Exchange {
|
|
|
581
588
|
'datetime': this.iso8601(timestamp),
|
|
582
589
|
'high': this.safeString(ticker, 'high'),
|
|
583
590
|
'low': this.safeString(ticker, 'low'),
|
|
584
|
-
'bid':
|
|
585
|
-
'bidVolume':
|
|
586
|
-
'ask':
|
|
587
|
-
'askVolume':
|
|
591
|
+
'bid': this.safeString(ticker, 'bid'),
|
|
592
|
+
'bidVolume': bidVolume,
|
|
593
|
+
'ask': this.safeString(ticker, 'ask'),
|
|
594
|
+
'askVolume': askVolume,
|
|
588
595
|
'vwap': undefined,
|
|
589
596
|
'open': this.safeString(ticker, 'open'),
|
|
590
597
|
'close': close,
|
|
@@ -606,7 +613,7 @@ export default class poloniex extends Exchange {
|
|
|
606
613
|
* @see https://docs.poloniex.com/#public-endpoints-market-data-ticker
|
|
607
614
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
608
615
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
609
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
616
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
610
617
|
*/
|
|
611
618
|
await this.loadMarkets();
|
|
612
619
|
symbols = this.marketSymbols(symbols);
|
|
@@ -614,19 +621,24 @@ export default class poloniex extends Exchange {
|
|
|
614
621
|
//
|
|
615
622
|
// [
|
|
616
623
|
// {
|
|
617
|
-
//
|
|
618
|
-
//
|
|
619
|
-
//
|
|
620
|
-
//
|
|
621
|
-
//
|
|
622
|
-
//
|
|
623
|
-
//
|
|
624
|
-
//
|
|
625
|
-
//
|
|
626
|
-
//
|
|
627
|
-
//
|
|
628
|
-
//
|
|
629
|
-
//
|
|
624
|
+
// "symbol" : "BTC_USDT",
|
|
625
|
+
// "open" : "26053.33",
|
|
626
|
+
// "low" : "26053.33",
|
|
627
|
+
// "high" : "26798.02",
|
|
628
|
+
// "close" : "26447.58",
|
|
629
|
+
// "quantity" : "6116.210188",
|
|
630
|
+
// "amount" : "161082122.88450926",
|
|
631
|
+
// "tradeCount" : "134709",
|
|
632
|
+
// "startTime" : "1692784440000",
|
|
633
|
+
// "closeTime" : "1692870839630",
|
|
634
|
+
// "displayName" : "BTC/USDT",
|
|
635
|
+
// "dailyChange" : "0.0151",
|
|
636
|
+
// "bid" : "26447.57",
|
|
637
|
+
// "bidQuantity" : "0.016313",
|
|
638
|
+
// "ask" : "26447.58",
|
|
639
|
+
// "askQuantity" : "0.068307",
|
|
640
|
+
// "ts" : "1692870845446",
|
|
641
|
+
// "markPrice" : "26444.11"
|
|
630
642
|
// }
|
|
631
643
|
// ]
|
|
632
644
|
//
|
|
@@ -773,7 +785,7 @@ export default class poloniex extends Exchange {
|
|
|
773
785
|
* @see https://docs.poloniex.com/#public-endpoints-market-data-ticker
|
|
774
786
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
775
787
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
776
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
788
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
777
789
|
*/
|
|
778
790
|
await this.loadMarkets();
|
|
779
791
|
const market = this.market(symbol);
|
|
@@ -784,18 +796,23 @@ export default class poloniex extends Exchange {
|
|
|
784
796
|
//
|
|
785
797
|
// {
|
|
786
798
|
// "symbol" : "BTC_USDT",
|
|
787
|
-
// "open" : "
|
|
788
|
-
// "low" : "
|
|
789
|
-
// "high" : "
|
|
790
|
-
// "close" : "
|
|
791
|
-
// "quantity" : "
|
|
792
|
-
// "amount" : "
|
|
793
|
-
// "tradeCount" :
|
|
794
|
-
// "startTime" :
|
|
795
|
-
// "closeTime" :
|
|
799
|
+
// "open" : "26053.33",
|
|
800
|
+
// "low" : "26053.33",
|
|
801
|
+
// "high" : "26798.02",
|
|
802
|
+
// "close" : "26447.58",
|
|
803
|
+
// "quantity" : "6116.210188",
|
|
804
|
+
// "amount" : "161082122.88450926",
|
|
805
|
+
// "tradeCount" : "134709",
|
|
806
|
+
// "startTime" : "1692784440000",
|
|
807
|
+
// "closeTime" : "1692870839630",
|
|
796
808
|
// "displayName" : "BTC/USDT",
|
|
797
|
-
// "dailyChange" : "0.
|
|
798
|
-
// "
|
|
809
|
+
// "dailyChange" : "0.0151",
|
|
810
|
+
// "bid" : "26447.57",
|
|
811
|
+
// "bidQuantity" : "0.016313",
|
|
812
|
+
// "ask" : "26447.58",
|
|
813
|
+
// "askQuantity" : "0.068307",
|
|
814
|
+
// "ts" : "1692870845446",
|
|
815
|
+
// "markPrice" : "26444.11"
|
|
799
816
|
// }
|
|
800
817
|
//
|
|
801
818
|
return this.parseTicker(response, market);
|
|
@@ -901,7 +918,7 @@ export default class poloniex extends Exchange {
|
|
|
901
918
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
902
919
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
903
920
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
904
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
921
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
905
922
|
*/
|
|
906
923
|
await this.loadMarkets();
|
|
907
924
|
const market = this.market(symbol);
|
|
@@ -937,7 +954,7 @@ export default class poloniex extends Exchange {
|
|
|
937
954
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
938
955
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
939
956
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
940
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
957
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
941
958
|
*/
|
|
942
959
|
await this.loadMarkets();
|
|
943
960
|
let market = undefined;
|
|
@@ -1082,6 +1099,7 @@ export default class poloniex extends Exchange {
|
|
|
1082
1099
|
};
|
|
1083
1100
|
}
|
|
1084
1101
|
const clientOrderId = this.safeString(order, 'clientOrderId');
|
|
1102
|
+
const triggerPrice = this.safeString2(order, 'triggerPrice', 'stopPrice');
|
|
1085
1103
|
return this.safeOrder({
|
|
1086
1104
|
'info': order,
|
|
1087
1105
|
'id': id,
|
|
@@ -1096,8 +1114,8 @@ export default class poloniex extends Exchange {
|
|
|
1096
1114
|
'postOnly': undefined,
|
|
1097
1115
|
'side': side,
|
|
1098
1116
|
'price': price,
|
|
1099
|
-
'stopPrice':
|
|
1100
|
-
'triggerPrice':
|
|
1117
|
+
'stopPrice': triggerPrice,
|
|
1118
|
+
'triggerPrice': triggerPrice,
|
|
1101
1119
|
'cost': undefined,
|
|
1102
1120
|
'average': this.safeString(order, 'avgPrice'),
|
|
1103
1121
|
'amount': amount,
|
|
@@ -1135,11 +1153,13 @@ export default class poloniex extends Exchange {
|
|
|
1135
1153
|
* @name poloniex#fetchOpenOrders
|
|
1136
1154
|
* @description fetch all unfilled currently open orders
|
|
1137
1155
|
* @see https://docs.poloniex.com/#authenticated-endpoints-orders-open-orders
|
|
1156
|
+
* @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
|
|
1138
1157
|
* @param {string} symbol unified market symbol
|
|
1139
1158
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1140
1159
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1141
1160
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1142
|
-
* @
|
|
1161
|
+
* @param {boolean} [params.stop] set true to fetch trigger orders instead of regular orders
|
|
1162
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1143
1163
|
*/
|
|
1144
1164
|
await this.loadMarkets();
|
|
1145
1165
|
let market = undefined;
|
|
@@ -1151,7 +1171,15 @@ export default class poloniex extends Exchange {
|
|
|
1151
1171
|
if (limit !== undefined) {
|
|
1152
1172
|
request['limit'] = limit;
|
|
1153
1173
|
}
|
|
1154
|
-
const
|
|
1174
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1175
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1176
|
+
let response = undefined;
|
|
1177
|
+
if (isTrigger) {
|
|
1178
|
+
response = await this.privateGetSmartorders(this.extend(request, params));
|
|
1179
|
+
}
|
|
1180
|
+
else {
|
|
1181
|
+
response = await this.privateGetOrders(this.extend(request, params));
|
|
1182
|
+
}
|
|
1155
1183
|
//
|
|
1156
1184
|
// [
|
|
1157
1185
|
// {
|
|
@@ -1169,6 +1197,7 @@ export default class poloniex extends Exchange {
|
|
|
1169
1197
|
// "amount" : "0",
|
|
1170
1198
|
// "filledQuantity" : "0",
|
|
1171
1199
|
// "filledAmount" : "0",
|
|
1200
|
+
// "stopPrice": "3750.00", // for trigger orders
|
|
1172
1201
|
// "createTime" : 16xxxxxxxxx26,
|
|
1173
1202
|
// "updateTime" : 16xxxxxxxxx36
|
|
1174
1203
|
// }
|
|
@@ -1178,36 +1207,46 @@ export default class poloniex extends Exchange {
|
|
|
1178
1207
|
return this.parseOrders(response, market, since, limit, extension);
|
|
1179
1208
|
}
|
|
1180
1209
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
//
|
|
1195
|
-
//
|
|
1196
|
-
//
|
|
1210
|
+
//
|
|
1211
|
+
// @method
|
|
1212
|
+
// @name poloniex#createOrder
|
|
1213
|
+
// @description create a trade order
|
|
1214
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
|
|
1215
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
|
|
1216
|
+
// @param {string} symbol unified symbol of the market to create an order in
|
|
1217
|
+
// @param {string} type 'market' or 'limit'
|
|
1218
|
+
// @param {string} side 'buy' or 'sell'
|
|
1219
|
+
// @param {float} amount how much of currency you want to trade in units of base currency
|
|
1220
|
+
// @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1221
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1222
|
+
// <<<<<<< HEAD
|
|
1223
|
+
// @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
|
|
1224
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1225
|
+
// =======
|
|
1226
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1227
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1228
|
+
//
|
|
1197
1229
|
await this.loadMarkets();
|
|
1198
1230
|
const market = this.market(symbol);
|
|
1199
1231
|
if (!market['spot']) {
|
|
1200
1232
|
throw new NotSupported(this.id + ' createOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
|
|
1201
1233
|
}
|
|
1202
|
-
|
|
1234
|
+
let request = {
|
|
1203
1235
|
'symbol': market['id'],
|
|
1204
1236
|
'side': side,
|
|
1205
1237
|
// 'timeInForce': timeInForce,
|
|
1206
1238
|
// 'accountType': 'SPOT',
|
|
1207
1239
|
// 'amount': amount,
|
|
1208
1240
|
};
|
|
1209
|
-
const
|
|
1210
|
-
|
|
1241
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1242
|
+
[request, params] = this.orderRequest(symbol, type, side, amount, request, price, params);
|
|
1243
|
+
let response = undefined;
|
|
1244
|
+
if (triggerPrice !== undefined) {
|
|
1245
|
+
response = await this.privatePostSmartorders(this.extend(request, params));
|
|
1246
|
+
}
|
|
1247
|
+
else {
|
|
1248
|
+
response = await this.privatePostOrders(this.extend(request, params));
|
|
1249
|
+
}
|
|
1211
1250
|
//
|
|
1212
1251
|
// {
|
|
1213
1252
|
// "id" : "78923648051920896",
|
|
@@ -1224,9 +1263,14 @@ export default class poloniex extends Exchange {
|
|
|
1224
1263
|
let upperCaseType = type.toUpperCase();
|
|
1225
1264
|
const isMarket = upperCaseType === 'MARKET';
|
|
1226
1265
|
const isPostOnly = this.isPostOnly(isMarket, upperCaseType === 'LIMIT_MAKER', params);
|
|
1227
|
-
|
|
1266
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1267
|
+
params = this.omit(params, ['postOnly', 'triggerPrice', 'stopPrice']);
|
|
1268
|
+
if (triggerPrice !== undefined) {
|
|
1269
|
+
upperCaseType = (price === undefined) ? 'STOP' : 'STOP_LIMIT';
|
|
1270
|
+
request['stopPrice'] = triggerPrice;
|
|
1271
|
+
}
|
|
1272
|
+
else if (isPostOnly) {
|
|
1228
1273
|
upperCaseType = 'LIMIT_MAKER';
|
|
1229
|
-
params = this.omit(params, 'postOnly');
|
|
1230
1274
|
}
|
|
1231
1275
|
request['type'] = upperCaseType;
|
|
1232
1276
|
if (isMarket) {
|
|
@@ -1250,31 +1294,44 @@ export default class poloniex extends Exchange {
|
|
|
1250
1294
|
return [request, params];
|
|
1251
1295
|
}
|
|
1252
1296
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1297
|
+
//
|
|
1298
|
+
// @method
|
|
1299
|
+
// @name poloniex#editOrder
|
|
1300
|
+
// @description edit a trade order
|
|
1301
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
|
|
1302
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
|
|
1303
|
+
// @param {string} id order id
|
|
1304
|
+
// @param {string} symbol unified symbol of the market to create an order in
|
|
1305
|
+
// @param {string} type 'market' or 'limit'
|
|
1306
|
+
// @param {string} side 'buy' or 'sell'
|
|
1307
|
+
// @param {float} [amount] how much of the currency you want to trade in units of the base currency
|
|
1308
|
+
// @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1309
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1310
|
+
// <<<<<<< HEAD
|
|
1311
|
+
// @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1312
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1313
|
+
// =======
|
|
1314
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1315
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1316
|
+
//
|
|
1267
1317
|
await this.loadMarkets();
|
|
1268
1318
|
const market = this.market(symbol);
|
|
1269
1319
|
if (!market['spot']) {
|
|
1270
1320
|
throw new NotSupported(this.id + ' editOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted');
|
|
1271
1321
|
}
|
|
1272
|
-
|
|
1322
|
+
let request = {
|
|
1273
1323
|
'id': id,
|
|
1274
1324
|
// 'timeInForce': timeInForce,
|
|
1275
1325
|
};
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1326
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
1327
|
+
[request, params] = this.orderRequest(symbol, type, side, amount, request, price, params);
|
|
1328
|
+
let response = undefined;
|
|
1329
|
+
if (triggerPrice !== undefined) {
|
|
1330
|
+
response = await this.privatePutSmartordersId(this.extend(request, params));
|
|
1331
|
+
}
|
|
1332
|
+
else {
|
|
1333
|
+
response = await this.privatePutOrdersId(this.extend(request, params));
|
|
1334
|
+
}
|
|
1278
1335
|
//
|
|
1279
1336
|
// {
|
|
1280
1337
|
// "id" : "78923648051920896",
|
|
@@ -1287,16 +1344,22 @@ export default class poloniex extends Exchange {
|
|
|
1287
1344
|
return this.parseOrder(response, market);
|
|
1288
1345
|
}
|
|
1289
1346
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1347
|
+
//
|
|
1348
|
+
// @method
|
|
1349
|
+
// @name poloniex#cancelOrder
|
|
1350
|
+
// @description cancels an open order
|
|
1351
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-order-by-id
|
|
1352
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-order-by-id // trigger orders
|
|
1353
|
+
// @param {string} id order id
|
|
1354
|
+
// @param {string} symbol unified symbol of the market the order was made in
|
|
1355
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1356
|
+
// <<<<<<< HEAD
|
|
1357
|
+
// @param {boolean} [params.trigger] true if canceling a trigger order
|
|
1358
|
+
// @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1359
|
+
// =======
|
|
1360
|
+
// @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1361
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1362
|
+
//
|
|
1300
1363
|
await this.loadMarkets();
|
|
1301
1364
|
const request = {};
|
|
1302
1365
|
const clientOrderId = this.safeValue(params, 'clientOrderId');
|
|
@@ -1304,8 +1367,15 @@ export default class poloniex extends Exchange {
|
|
|
1304
1367
|
id = clientOrderId;
|
|
1305
1368
|
}
|
|
1306
1369
|
request['id'] = id;
|
|
1307
|
-
|
|
1308
|
-
|
|
1370
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1371
|
+
params = this.omit(params, ['clientOrderId', 'trigger', 'stop']);
|
|
1372
|
+
let response = undefined;
|
|
1373
|
+
if (isTrigger) {
|
|
1374
|
+
response = await this.privateDeleteSmartordersId(this.extend(request, params));
|
|
1375
|
+
}
|
|
1376
|
+
else {
|
|
1377
|
+
response = await this.privateDeleteOrdersId(this.extend(request, params));
|
|
1378
|
+
}
|
|
1309
1379
|
//
|
|
1310
1380
|
// {
|
|
1311
1381
|
// "orderId":"210832697138888704",
|
|
@@ -1318,18 +1388,25 @@ export default class poloniex extends Exchange {
|
|
|
1318
1388
|
return this.parseOrder(response);
|
|
1319
1389
|
}
|
|
1320
1390
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1391
|
+
//
|
|
1392
|
+
// @method
|
|
1393
|
+
// @name poloniex#cancelAllOrders
|
|
1394
|
+
// @description cancel all open orders
|
|
1395
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
|
|
1396
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
|
|
1397
|
+
// @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1398
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1399
|
+
// <<<<<<< HEAD
|
|
1400
|
+
// @param {boolean} [params.trigger] true if canceling trigger orders
|
|
1401
|
+
// @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1402
|
+
// =======
|
|
1403
|
+
// @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1404
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1405
|
+
//
|
|
1330
1406
|
await this.loadMarkets();
|
|
1331
1407
|
const request = {
|
|
1332
|
-
|
|
1408
|
+
// 'accountTypes': 'SPOT',
|
|
1409
|
+
'symbols': [],
|
|
1333
1410
|
};
|
|
1334
1411
|
let market = undefined;
|
|
1335
1412
|
if (symbol !== undefined) {
|
|
@@ -1338,7 +1415,15 @@ export default class poloniex extends Exchange {
|
|
|
1338
1415
|
market['id'],
|
|
1339
1416
|
];
|
|
1340
1417
|
}
|
|
1341
|
-
const
|
|
1418
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1419
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1420
|
+
let response = undefined;
|
|
1421
|
+
if (isTrigger) {
|
|
1422
|
+
response = await this.privateDeleteSmartorders(this.extend(request, params));
|
|
1423
|
+
}
|
|
1424
|
+
else {
|
|
1425
|
+
response = await this.privateDeleteOrders(this.extend(request, params));
|
|
1426
|
+
}
|
|
1342
1427
|
//
|
|
1343
1428
|
// [
|
|
1344
1429
|
// {
|
|
@@ -1356,25 +1441,40 @@ export default class poloniex extends Exchange {
|
|
|
1356
1441
|
// }
|
|
1357
1442
|
// ]
|
|
1358
1443
|
//
|
|
1359
|
-
return response;
|
|
1444
|
+
return this.parseOrders(response, market);
|
|
1360
1445
|
}
|
|
1361
1446
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1447
|
+
//
|
|
1448
|
+
// @method
|
|
1449
|
+
// @name poloniex#fetchOrder
|
|
1450
|
+
// @description fetch an order by it's id
|
|
1451
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
|
|
1452
|
+
// @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
|
|
1453
|
+
// @param {string} id order id
|
|
1454
|
+
// @param {string} symbol unified market symbol, default is undefined
|
|
1455
|
+
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1456
|
+
// <<<<<<< HEAD
|
|
1457
|
+
// @param {boolean} [params.trigger] true if fetching a trigger order
|
|
1458
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1459
|
+
// =======
|
|
1460
|
+
// @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1461
|
+
// >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
|
|
1462
|
+
//
|
|
1372
1463
|
await this.loadMarkets();
|
|
1373
1464
|
id = id.toString();
|
|
1374
1465
|
const request = {
|
|
1375
1466
|
'id': id,
|
|
1376
1467
|
};
|
|
1377
|
-
const
|
|
1468
|
+
const isTrigger = this.safeValue2(params, 'trigger', 'stop');
|
|
1469
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
1470
|
+
let response = undefined;
|
|
1471
|
+
if (isTrigger) {
|
|
1472
|
+
response = await this.privateGetSmartordersId(this.extend(request, params));
|
|
1473
|
+
response = this.safeValue(response, 0);
|
|
1474
|
+
}
|
|
1475
|
+
else {
|
|
1476
|
+
response = await this.privateGetOrdersId(this.extend(request, params));
|
|
1477
|
+
}
|
|
1378
1478
|
//
|
|
1379
1479
|
// {
|
|
1380
1480
|
// "id": "21934611974062080",
|
|
@@ -1391,6 +1491,7 @@ export default class poloniex extends Exchange {
|
|
|
1391
1491
|
// "amount": "0.00",
|
|
1392
1492
|
// "filledQuantity": "0.00",
|
|
1393
1493
|
// "filledAmount": "0.00",
|
|
1494
|
+
// "stopPrice": "3750.00", // for trigger orders
|
|
1394
1495
|
// "createTime": 1646196019020,
|
|
1395
1496
|
// "updateTime": 1646196019020
|
|
1396
1497
|
// }
|
|
@@ -1416,7 +1517,7 @@ export default class poloniex extends Exchange {
|
|
|
1416
1517
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1417
1518
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1418
1519
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1419
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1520
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1420
1521
|
*/
|
|
1421
1522
|
await this.loadMarkets();
|
|
1422
1523
|
const request = {
|
|
@@ -1474,7 +1575,7 @@ export default class poloniex extends Exchange {
|
|
|
1474
1575
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1475
1576
|
* @see https://docs.poloniex.com/#authenticated-endpoints-accounts-all-account-balances
|
|
1476
1577
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1477
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1578
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1478
1579
|
*/
|
|
1479
1580
|
await this.loadMarkets();
|
|
1480
1581
|
const request = {
|
|
@@ -1506,7 +1607,7 @@ export default class poloniex extends Exchange {
|
|
|
1506
1607
|
* @description fetch the trading fees for multiple markets
|
|
1507
1608
|
* @see https://docs.poloniex.com/#authenticated-endpoints-accounts-fee-info
|
|
1508
1609
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1509
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
1610
|
+
* @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
|
|
1510
1611
|
*/
|
|
1511
1612
|
await this.loadMarkets();
|
|
1512
1613
|
const response = await this.privateGetFeeinfo(params);
|
|
@@ -1541,7 +1642,7 @@ export default class poloniex extends Exchange {
|
|
|
1541
1642
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1542
1643
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1543
1644
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1544
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
1645
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
1545
1646
|
*/
|
|
1546
1647
|
await this.loadMarkets();
|
|
1547
1648
|
const market = this.market(symbol);
|
|
@@ -1597,7 +1698,7 @@ export default class poloniex extends Exchange {
|
|
|
1597
1698
|
* @see https://docs.poloniex.com/#authenticated-endpoints-wallets-deposit-addresses
|
|
1598
1699
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
1599
1700
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1600
|
-
* @returns {object} an [address structure]{@link https://
|
|
1701
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
1601
1702
|
*/
|
|
1602
1703
|
await this.loadMarkets();
|
|
1603
1704
|
const currency = this.currency(code);
|
|
@@ -1648,7 +1749,7 @@ export default class poloniex extends Exchange {
|
|
|
1648
1749
|
* @see https://docs.poloniex.com/#authenticated-endpoints-wallets-deposit-addresses
|
|
1649
1750
|
* @param {string} code unified currency code
|
|
1650
1751
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1651
|
-
* @returns {object} an [address structure]{@link https://
|
|
1752
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
1652
1753
|
*/
|
|
1653
1754
|
await this.loadMarkets();
|
|
1654
1755
|
const currency = this.currency(code);
|
|
@@ -1702,7 +1803,7 @@ export default class poloniex extends Exchange {
|
|
|
1702
1803
|
* @param {string} fromAccount account to transfer from
|
|
1703
1804
|
* @param {string} toAccount account to transfer to
|
|
1704
1805
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1705
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
1806
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
1706
1807
|
*/
|
|
1707
1808
|
await this.loadMarkets();
|
|
1708
1809
|
const currency = this.currency(code);
|
|
@@ -1753,7 +1854,7 @@ export default class poloniex extends Exchange {
|
|
|
1753
1854
|
* @param {string} address the address to withdraw to
|
|
1754
1855
|
* @param {string} tag
|
|
1755
1856
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1756
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1857
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1757
1858
|
*/
|
|
1758
1859
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1759
1860
|
this.checkAddress(address);
|
|
@@ -1877,7 +1978,7 @@ export default class poloniex extends Exchange {
|
|
|
1877
1978
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1878
1979
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1879
1980
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1880
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
1981
|
+
* @returns {object} a list of [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1881
1982
|
*/
|
|
1882
1983
|
await this.loadMarkets();
|
|
1883
1984
|
const response = await this.fetchTransactionsHelper(code, since, limit, params);
|
|
@@ -1902,7 +2003,7 @@ export default class poloniex extends Exchange {
|
|
|
1902
2003
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1903
2004
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1904
2005
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1905
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2006
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1906
2007
|
*/
|
|
1907
2008
|
const response = await this.fetchTransactionsHelper(code, since, limit, params);
|
|
1908
2009
|
let currency = undefined;
|
|
@@ -1921,7 +2022,7 @@ export default class poloniex extends Exchange {
|
|
|
1921
2022
|
* @see https://docs.poloniex.com/#public-endpoints-reference-data-currency-information
|
|
1922
2023
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
1923
2024
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1924
|
-
* @returns {object[]} a list of [fees structures]{@link https://
|
|
2025
|
+
* @returns {object[]} a list of [fees structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
1925
2026
|
*/
|
|
1926
2027
|
await this.loadMarkets();
|
|
1927
2028
|
const response = await this.publicGetCurrencies(this.extend(params, { 'includeMultiChainCurrencies': true }));
|
|
@@ -2047,7 +2148,7 @@ export default class poloniex extends Exchange {
|
|
|
2047
2148
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2048
2149
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2049
2150
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
2050
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2151
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
2051
2152
|
*/
|
|
2052
2153
|
const response = await this.fetchTransactionsHelper(code, since, limit, params);
|
|
2053
2154
|
let currency = undefined;
|