ccxt 4.1.55 → 4.1.57
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/.git-templates/hooks/pre-push +2 -2
- package/CONTRIBUTING.md +1 -1
- package/README.md +6 -6
- package/build.sh +30 -8
- package/dist/ccxt.browser.js +5592 -4907
- package/dist/ccxt.browser.min.js +13 -13
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +17 -13
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +35 -29
- package/dist/cjs/src/base/Exchange.js +39 -26
- package/dist/cjs/src/base/Precise.js +1 -3
- package/dist/cjs/src/bigone.js +24 -20
- package/dist/cjs/src/binance.js +97 -76
- package/dist/cjs/src/bingx.js +63 -44
- package/dist/cjs/src/bit2c.js +18 -15
- package/dist/cjs/src/bitbank.js +17 -15
- package/dist/cjs/src/bitbns.js +28 -18
- package/dist/cjs/src/bitfinex.js +23 -21
- package/dist/cjs/src/bitfinex2.js +32 -28
- package/dist/cjs/src/bitflyer.js +28 -20
- package/dist/cjs/src/bitforex.js +25 -18
- package/dist/cjs/src/bitget.js +184 -147
- package/dist/cjs/src/bithumb.js +23 -16
- package/dist/cjs/src/bitmart.js +129 -94
- package/dist/cjs/src/bitmex.js +104 -64
- package/dist/cjs/src/bitopro.js +38 -26
- package/dist/cjs/src/bitpanda.js +24 -23
- package/dist/cjs/src/bitrue.js +33 -24
- package/dist/cjs/src/bitso.js +24 -23
- package/dist/cjs/src/bitstamp.js +24 -23
- package/dist/cjs/src/bittrex.js +30 -29
- package/dist/cjs/src/bitvavo.js +38 -30
- package/dist/cjs/src/bl3p.js +11 -10
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +18 -17
- package/dist/cjs/src/btcbox.js +13 -12
- package/dist/cjs/src/btcmarkets.js +20 -19
- package/dist/cjs/src/btcturk.js +14 -13
- package/dist/cjs/src/bybit.js +84 -54
- package/dist/cjs/src/cex.js +16 -14
- package/dist/cjs/src/coinbase.js +29 -27
- package/dist/cjs/src/coinbasepro.js +27 -25
- package/dist/cjs/src/coincheck.js +15 -14
- package/dist/cjs/src/coinex.js +101 -78
- package/dist/cjs/src/coinlist.js +28 -27
- package/dist/cjs/src/coinmate.js +20 -17
- package/dist/cjs/src/coinone.js +21 -16
- package/dist/cjs/src/coinsph.js +37 -28
- package/dist/cjs/src/coinspot.js +12 -11
- package/dist/cjs/src/cryptocom.js +40 -202
- package/dist/cjs/src/currencycom.js +32 -25
- package/dist/cjs/src/delta.js +34 -28
- package/dist/cjs/src/deribit.js +39 -36
- package/dist/cjs/src/digifinex.js +64 -44
- package/dist/cjs/src/exmo.js +29 -27
- package/dist/cjs/src/gate.js +67 -53
- package/dist/cjs/src/gemini.js +23 -20
- package/dist/cjs/src/hitbtc.js +65 -56
- package/dist/cjs/src/hollaex.js +30 -27
- package/dist/cjs/src/htx.js +135 -143
- package/dist/cjs/src/huobijp.js +22 -20
- package/dist/cjs/src/idex.js +22 -21
- package/dist/cjs/src/independentreserve.js +15 -14
- package/dist/cjs/src/indodax.js +30 -26
- package/dist/cjs/src/kraken.js +29 -27
- package/dist/cjs/src/krakenfutures.js +29 -22
- package/dist/cjs/src/kucoin.js +48 -43
- package/dist/cjs/src/kucoinfutures.js +33 -28
- package/dist/cjs/src/kuna.js +25 -24
- package/dist/cjs/src/latoken.js +24 -22
- package/dist/cjs/src/lbank.js +45 -30
- package/dist/cjs/src/luno.js +22 -19
- package/dist/cjs/src/lykke.js +19 -17
- package/dist/cjs/src/mercado.js +30 -19
- package/dist/cjs/src/mexc.js +60 -49
- package/dist/cjs/src/ndax.js +23 -22
- package/dist/cjs/src/novadax.js +23 -22
- package/dist/cjs/src/oceanex.js +22 -19
- package/dist/cjs/src/okcoin.js +29 -23
- package/dist/cjs/src/okx.js +92 -84
- package/dist/cjs/src/p2b.js +80 -83
- package/dist/cjs/src/paymium.js +10 -10
- package/dist/cjs/src/phemex.js +63 -40
- package/dist/cjs/src/poloniex.js +22 -22
- package/dist/cjs/src/poloniexfutures.js +23 -19
- 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/bingx.js +1 -1
- 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 +7 -7
- package/dist/cjs/src/pro/bitmart.js +7 -5
- 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 +6 -4
- package/dist/cjs/src/pro/bittrex.js +6 -6
- package/dist/cjs/src/pro/bitvavo.js +11 -7
- package/dist/cjs/src/pro/blockchaincom.js +8 -8
- package/dist/cjs/src/pro/bybit.js +7 -7
- package/dist/cjs/src/pro/cex.js +13 -9
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +11 -10
- package/dist/cjs/src/pro/coinex.js +7 -9
- package/dist/cjs/src/pro/cryptocom.js +9 -9
- 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 +12 -14
- 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 +263 -4
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/htx.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 +10 -10
- package/dist/cjs/src/pro/krakenfutures.js +41 -17
- package/dist/cjs/src/pro/kucoin.js +7 -7
- package/dist/cjs/src/pro/kucoinfutures.js +8 -6
- 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 +12 -12
- 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 +8 -8
- package/dist/cjs/src/pro/whitebit.js +12 -8
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/probit.js +28 -23
- package/dist/cjs/src/tidex.js +16 -15
- package/dist/cjs/src/timex.js +19 -18
- package/dist/cjs/src/tokocrypto.js +27 -22
- package/dist/cjs/src/upbit.js +19 -19
- package/dist/cjs/src/wavesexchange.js +22 -19
- package/dist/cjs/src/wazirx.js +24 -17
- package/dist/cjs/src/whitebit.js +33 -27
- package/dist/cjs/src/woo.js +44 -34
- package/dist/cjs/src/yobit.js +25 -20
- package/dist/cjs/src/zaif.js +9 -9
- package/dist/cjs/src/zonda.js +18 -17
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitbank.d.ts +1 -0
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- package/js/src/abstract/htx.d.ts +3 -0
- package/js/src/abstract/huobi.d.ts +3 -0
- package/js/src/abstract/huobipro.d.ts +3 -0
- package/js/src/abstract/okex.d.ts +3 -1
- package/js/src/abstract/okex5.d.ts +3 -1
- package/js/src/abstract/okx.d.ts +3 -1
- package/js/src/ace.js +18 -14
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +35 -29
- package/js/src/base/Exchange.d.ts +37 -34
- package/js/src/base/Exchange.js +39 -26
- package/js/src/base/Precise.d.ts +4 -4
- package/js/src/base/Precise.js +1 -3
- package/js/src/base/functions/type.d.ts +25 -25
- package/js/src/base/types.d.ts +21 -14
- package/js/src/bigone.js +25 -21
- package/js/src/binance.d.ts +2 -2
- package/js/src/binance.js +97 -76
- package/js/src/bingx.js +63 -44
- package/js/src/bit2c.js +19 -16
- package/js/src/bitbank.js +17 -15
- package/js/src/bitbns.js +28 -18
- package/js/src/bitfinex.js +23 -21
- package/js/src/bitfinex2.js +32 -28
- package/js/src/bitflyer.js +28 -20
- package/js/src/bitforex.js +26 -19
- package/js/src/bitget.d.ts +25 -3
- package/js/src/bitget.js +184 -147
- package/js/src/bithumb.js +23 -16
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +129 -94
- package/js/src/bitmex.d.ts +2 -2
- package/js/src/bitmex.js +104 -64
- package/js/src/bitopro.js +38 -26
- package/js/src/bitpanda.js +24 -23
- package/js/src/bitrue.js +33 -24
- package/js/src/bitso.js +24 -23
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitstamp.js +24 -23
- package/js/src/bittrex.js +30 -29
- package/js/src/bitvavo.js +38 -30
- package/js/src/bl3p.js +11 -10
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +18 -17
- package/js/src/btcbox.js +13 -12
- package/js/src/btcmarkets.js +20 -19
- package/js/src/btcturk.js +14 -13
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +84 -54
- package/js/src/cex.js +16 -14
- package/js/src/coinbase.js +29 -27
- package/js/src/coinbasepro.js +27 -25
- package/js/src/coincheck.js +15 -14
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +101 -78
- package/js/src/coinlist.js +28 -27
- package/js/src/coinmate.js +21 -18
- package/js/src/coinone.js +21 -16
- package/js/src/coinsph.js +37 -28
- package/js/src/coinspot.js +12 -11
- package/js/src/cryptocom.d.ts +0 -23
- package/js/src/cryptocom.js +40 -202
- package/js/src/currencycom.js +32 -25
- package/js/src/delta.js +35 -29
- package/js/src/deribit.js +39 -36
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/digifinex.js +65 -45
- package/js/src/exmo.js +29 -27
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +67 -53
- package/js/src/gemini.js +23 -20
- package/js/src/hitbtc.d.ts +1 -0
- package/js/src/hitbtc.js +65 -56
- package/js/src/hollaex.js +30 -27
- package/js/src/htx.d.ts +11 -3
- package/js/src/htx.js +135 -143
- package/js/src/huobijp.js +23 -21
- package/js/src/idex.js +22 -21
- package/js/src/independentreserve.js +15 -14
- package/js/src/indodax.js +30 -26
- package/js/src/kraken.js +29 -27
- package/js/src/krakenfutures.js +29 -22
- package/js/src/kucoin.d.ts +1 -1
- package/js/src/kucoin.js +48 -43
- package/js/src/kucoinfutures.js +33 -28
- package/js/src/kuna.js +25 -24
- package/js/src/latoken.js +25 -23
- package/js/src/lbank.js +46 -31
- package/js/src/luno.js +22 -19
- package/js/src/lykke.js +19 -17
- package/js/src/mercado.js +30 -19
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +60 -49
- package/js/src/ndax.js +23 -22
- package/js/src/novadax.js +23 -22
- package/js/src/oceanex.js +22 -19
- package/js/src/okcoin.js +29 -23
- package/js/src/okx.d.ts +2 -2
- package/js/src/okx.js +92 -84
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +80 -82
- package/js/src/paymium.js +10 -10
- package/js/src/phemex.js +63 -40
- package/js/src/poloniex.js +22 -22
- package/js/src/poloniexfutures.js +23 -19
- 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/bingx.js +1 -1
- package/js/src/pro/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.d.ts +1 -1
- package/js/src/pro/bitfinex2.js +6 -6
- package/js/src/pro/bitget.js +7 -7
- package/js/src/pro/bitmart.js +7 -5
- 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 +7 -5
- package/js/src/pro/bittrex.js +6 -6
- package/js/src/pro/bitvavo.js +12 -8
- package/js/src/pro/blockchaincom.js +8 -8
- package/js/src/pro/bybit.js +7 -7
- package/js/src/pro/cex.js +14 -10
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +12 -11
- package/js/src/pro/coinex.js +7 -9
- package/js/src/pro/cryptocom.js +9 -9
- package/js/src/pro/currencycom.js +4 -4
- package/js/src/pro/deribit.js +6 -6
- package/js/src/pro/exmo.js +12 -14
- package/js/src/pro/gate.js +7 -7
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/hitbtc.d.ts +8 -1
- package/js/src/pro/hitbtc.js +264 -5
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/htx.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 +10 -10
- package/js/src/pro/krakenfutures.d.ts +1 -0
- package/js/src/pro/krakenfutures.js +42 -18
- package/js/src/pro/kucoin.js +7 -7
- package/js/src/pro/kucoinfutures.js +8 -6
- 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.js +12 -12
- 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 +8 -8
- package/js/src/pro/whitebit.js +13 -9
- package/js/src/pro/woo.js +1 -1
- package/js/src/probit.js +29 -24
- package/js/src/tidex.js +16 -15
- package/js/src/timex.js +19 -18
- package/js/src/tokocrypto.js +28 -23
- package/js/src/upbit.js +19 -19
- package/js/src/wavesexchange.js +23 -20
- package/js/src/wazirx.js +25 -18
- package/js/src/whitebit.js +33 -27
- package/js/src/woo.js +45 -35
- package/js/src/yobit.js +25 -20
- package/js/src/zaif.js +9 -9
- package/js/src/zonda.js +18 -17
- package/package.json +2 -2
- package/js/src/bitstamp1.d.ts +0 -28
- package/js/src/bitstamp1.js +0 -430
- package/js/src/lbank2.d.ts +0 -90
- package/js/src/lbank2.js +0 -2779
package/js/src/phemex.js
CHANGED
|
@@ -43,12 +43,11 @@ export default class phemex extends Exchange {
|
|
|
43
43
|
'createStopOrder': true,
|
|
44
44
|
'editOrder': true,
|
|
45
45
|
'fetchBalance': true,
|
|
46
|
-
'fetchBorrowRate': false,
|
|
47
46
|
'fetchBorrowRateHistories': false,
|
|
48
47
|
'fetchBorrowRateHistory': false,
|
|
49
|
-
'fetchBorrowRates': false,
|
|
50
|
-
'fetchBorrowRatesPerSymbol': false,
|
|
51
48
|
'fetchClosedOrders': true,
|
|
49
|
+
'fetchCrossBorrowRate': false,
|
|
50
|
+
'fetchCrossBorrowRates': false,
|
|
52
51
|
'fetchCurrencies': true,
|
|
53
52
|
'fetchDepositAddress': true,
|
|
54
53
|
'fetchDeposits': true,
|
|
@@ -58,6 +57,8 @@ export default class phemex extends Exchange {
|
|
|
58
57
|
'fetchFundingRateHistory': true,
|
|
59
58
|
'fetchFundingRates': false,
|
|
60
59
|
'fetchIndexOHLCV': false,
|
|
60
|
+
'fetchIsolatedBorrowRate': false,
|
|
61
|
+
'fetchIsolatedBorrowRates': false,
|
|
61
62
|
'fetchLeverage': false,
|
|
62
63
|
'fetchLeverageTiers': true,
|
|
63
64
|
'fetchMarketLeverageTiers': 'emulated',
|
|
@@ -980,7 +981,7 @@ export default class phemex extends Exchange {
|
|
|
980
981
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
981
982
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
982
983
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
983
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
984
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
984
985
|
*/
|
|
985
986
|
await this.loadMarkets();
|
|
986
987
|
const market = this.market(symbol);
|
|
@@ -1289,7 +1290,7 @@ export default class phemex extends Exchange {
|
|
|
1289
1290
|
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#query24hrsticker
|
|
1290
1291
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1291
1292
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
1292
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1293
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1293
1294
|
*/
|
|
1294
1295
|
await this.loadMarkets();
|
|
1295
1296
|
const market = this.market(symbol);
|
|
@@ -1364,7 +1365,7 @@ export default class phemex extends Exchange {
|
|
|
1364
1365
|
* @see https://phemex-docs.github.io/#query-24-hours-ticker-for-all-symbols // inverse
|
|
1365
1366
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1366
1367
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
1367
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1368
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1368
1369
|
*/
|
|
1369
1370
|
await this.loadMarkets();
|
|
1370
1371
|
let market = undefined;
|
|
@@ -1402,7 +1403,7 @@ export default class phemex extends Exchange {
|
|
|
1402
1403
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1403
1404
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1404
1405
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
1405
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1406
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1406
1407
|
*/
|
|
1407
1408
|
await this.loadMarkets();
|
|
1408
1409
|
const market = this.market(symbol);
|
|
@@ -1811,7 +1812,7 @@ export default class phemex extends Exchange {
|
|
|
1811
1812
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1812
1813
|
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#query-account-positions
|
|
1813
1814
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
1814
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1815
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1815
1816
|
*/
|
|
1816
1817
|
await this.loadMarkets();
|
|
1817
1818
|
let type = undefined;
|
|
@@ -2327,7 +2328,7 @@ export default class phemex extends Exchange {
|
|
|
2327
2328
|
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
2328
2329
|
* @param {object} [params.stopLoss] *swap only* *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
|
|
2329
2330
|
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
2330
|
-
* @returns {object} an [order structure]{@link https://
|
|
2331
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2331
2332
|
*/
|
|
2332
2333
|
await this.loadMarkets();
|
|
2333
2334
|
const market = this.market(symbol);
|
|
@@ -2624,7 +2625,7 @@ export default class phemex extends Exchange {
|
|
|
2624
2625
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
|
|
2625
2626
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
2626
2627
|
* @param {string} [params.posSide] either 'Merged' or 'Long' or 'Short'
|
|
2627
|
-
* @returns {object} an [order structure]{@link https://
|
|
2628
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2628
2629
|
*/
|
|
2629
2630
|
await this.loadMarkets();
|
|
2630
2631
|
const market = this.market(symbol);
|
|
@@ -2697,9 +2698,11 @@ export default class phemex extends Exchange {
|
|
|
2697
2698
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2698
2699
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
2699
2700
|
* @param {string} [params.posSide] either 'Merged' or 'Long' or 'Short'
|
|
2700
|
-
* @returns {object} An [order structure]{@link https://
|
|
2701
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2701
2702
|
*/
|
|
2702
|
-
|
|
2703
|
+
if (symbol === undefined) {
|
|
2704
|
+
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
2705
|
+
}
|
|
2703
2706
|
await this.loadMarkets();
|
|
2704
2707
|
const market = this.market(symbol);
|
|
2705
2708
|
const request = {
|
|
@@ -2736,9 +2739,11 @@ export default class phemex extends Exchange {
|
|
|
2736
2739
|
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#cancelall
|
|
2737
2740
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
2738
2741
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
2739
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
2742
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2740
2743
|
*/
|
|
2741
|
-
|
|
2744
|
+
if (symbol === undefined) {
|
|
2745
|
+
throw new ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
|
|
2746
|
+
}
|
|
2742
2747
|
await this.loadMarkets();
|
|
2743
2748
|
const request = {
|
|
2744
2749
|
// 'symbol': market['id'],
|
|
@@ -2763,9 +2768,11 @@ export default class phemex extends Exchange {
|
|
|
2763
2768
|
* @description fetches information on an order made by the user
|
|
2764
2769
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
2765
2770
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
2766
|
-
* @returns {object} An [order structure]{@link https://
|
|
2771
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2767
2772
|
*/
|
|
2768
|
-
|
|
2773
|
+
if (symbol === undefined) {
|
|
2774
|
+
throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
2775
|
+
}
|
|
2769
2776
|
await this.loadMarkets();
|
|
2770
2777
|
const market = this.market(symbol);
|
|
2771
2778
|
if (market['settle'] === 'USDT') {
|
|
@@ -2810,9 +2817,11 @@ export default class phemex extends Exchange {
|
|
|
2810
2817
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2811
2818
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2812
2819
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
2813
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2820
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2814
2821
|
*/
|
|
2815
|
-
|
|
2822
|
+
if (symbol === undefined) {
|
|
2823
|
+
throw new ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument');
|
|
2824
|
+
}
|
|
2816
2825
|
await this.loadMarkets();
|
|
2817
2826
|
const market = this.market(symbol);
|
|
2818
2827
|
const request = {
|
|
@@ -2848,9 +2857,11 @@ export default class phemex extends Exchange {
|
|
|
2848
2857
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2849
2858
|
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
2850
2859
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
2851
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2860
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2852
2861
|
*/
|
|
2853
|
-
|
|
2862
|
+
if (symbol === undefined) {
|
|
2863
|
+
throw new ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
2864
|
+
}
|
|
2854
2865
|
await this.loadMarkets();
|
|
2855
2866
|
const market = this.market(symbol);
|
|
2856
2867
|
let method = 'privateGetSpotOrders';
|
|
@@ -2892,9 +2903,11 @@ export default class phemex extends Exchange {
|
|
|
2892
2903
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2893
2904
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2894
2905
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
2895
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
2906
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2896
2907
|
*/
|
|
2897
|
-
|
|
2908
|
+
if (symbol === undefined) {
|
|
2909
|
+
throw new ArgumentsRequired(this.id + ' fetchClosedOrders() requires a symbol argument');
|
|
2910
|
+
}
|
|
2898
2911
|
await this.loadMarkets();
|
|
2899
2912
|
const market = this.market(symbol);
|
|
2900
2913
|
const request = {
|
|
@@ -2971,9 +2984,11 @@ export default class phemex extends Exchange {
|
|
|
2971
2984
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2972
2985
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2973
2986
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
2974
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
2987
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2975
2988
|
*/
|
|
2976
|
-
|
|
2989
|
+
if (symbol === undefined) {
|
|
2990
|
+
throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
2991
|
+
}
|
|
2977
2992
|
await this.loadMarkets();
|
|
2978
2993
|
const market = this.market(symbol);
|
|
2979
2994
|
let method = 'privateGetExchangeSpotOrderTrades';
|
|
@@ -3123,7 +3138,7 @@ export default class phemex extends Exchange {
|
|
|
3123
3138
|
* @description fetch the deposit address for a currency associated with this account
|
|
3124
3139
|
* @param {string} code unified currency code
|
|
3125
3140
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
3126
|
-
* @returns {object} an [address structure]{@link https://
|
|
3141
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
3127
3142
|
*/
|
|
3128
3143
|
await this.loadMarkets();
|
|
3129
3144
|
const currency = this.currency(code);
|
|
@@ -3173,7 +3188,7 @@ export default class phemex extends Exchange {
|
|
|
3173
3188
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
3174
3189
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
3175
3190
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
3176
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
3191
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3177
3192
|
*/
|
|
3178
3193
|
await this.loadMarkets();
|
|
3179
3194
|
let currency = undefined;
|
|
@@ -3213,7 +3228,7 @@ export default class phemex extends Exchange {
|
|
|
3213
3228
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
3214
3229
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
3215
3230
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
3216
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
3231
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3217
3232
|
*/
|
|
3218
3233
|
await this.loadMarkets();
|
|
3219
3234
|
let currency = undefined;
|
|
@@ -3339,7 +3354,7 @@ export default class phemex extends Exchange {
|
|
|
3339
3354
|
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#query-account-positions
|
|
3340
3355
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3341
3356
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
3342
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
3357
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3343
3358
|
*/
|
|
3344
3359
|
await this.loadMarkets();
|
|
3345
3360
|
symbols = this.marketSymbols(symbols);
|
|
@@ -3613,9 +3628,11 @@ export default class phemex extends Exchange {
|
|
|
3613
3628
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
3614
3629
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
3615
3630
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
3616
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
3631
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
3617
3632
|
*/
|
|
3618
|
-
|
|
3633
|
+
if (symbol === undefined) {
|
|
3634
|
+
throw new ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
|
|
3635
|
+
}
|
|
3619
3636
|
await this.loadMarkets();
|
|
3620
3637
|
const market = this.market(symbol);
|
|
3621
3638
|
const request = {
|
|
@@ -3683,7 +3700,7 @@ export default class phemex extends Exchange {
|
|
|
3683
3700
|
* @description fetch the current funding rate
|
|
3684
3701
|
* @param {string} symbol unified market symbol
|
|
3685
3702
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
3686
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
3703
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3687
3704
|
*/
|
|
3688
3705
|
await this.loadMarkets();
|
|
3689
3706
|
const market = this.market(symbol);
|
|
@@ -3796,7 +3813,7 @@ export default class phemex extends Exchange {
|
|
|
3796
3813
|
* @param {string} symbol unified market symbol of the market to set margin in
|
|
3797
3814
|
* @param {float} amount the amount to set the margin to
|
|
3798
3815
|
* @param {object} [params] parameters specific to the phemex api endpoint
|
|
3799
|
-
* @returns {object} A [margin structure]{@link https://
|
|
3816
|
+
* @returns {object} A [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3800
3817
|
*/
|
|
3801
3818
|
await this.loadMarkets();
|
|
3802
3819
|
const market = this.market(symbol);
|
|
@@ -3853,7 +3870,9 @@ export default class phemex extends Exchange {
|
|
|
3853
3870
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
3854
3871
|
* @returns {object} response from the exchange
|
|
3855
3872
|
*/
|
|
3856
|
-
|
|
3873
|
+
if (symbol === undefined) {
|
|
3874
|
+
throw new ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
3875
|
+
}
|
|
3857
3876
|
await this.loadMarkets();
|
|
3858
3877
|
const market = this.market(symbol);
|
|
3859
3878
|
if (!market['swap'] || market['settle'] === 'USDT') {
|
|
@@ -3911,7 +3930,7 @@ export default class phemex extends Exchange {
|
|
|
3911
3930
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
3912
3931
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3913
3932
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
3914
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://
|
|
3933
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
3915
3934
|
*/
|
|
3916
3935
|
await this.loadMarkets();
|
|
3917
3936
|
if (symbols !== undefined) {
|
|
@@ -4089,7 +4108,9 @@ export default class phemex extends Exchange {
|
|
|
4089
4108
|
*/
|
|
4090
4109
|
// WARNING: THIS WILL INCREASE LIQUIDATION PRICE FOR OPEN ISOLATED LONG POSITIONS
|
|
4091
4110
|
// AND DECREASE LIQUIDATION PRICE FOR OPEN ISOLATED SHORT POSITIONS
|
|
4092
|
-
|
|
4111
|
+
if (symbol === undefined) {
|
|
4112
|
+
throw new ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
4113
|
+
}
|
|
4093
4114
|
if ((leverage < 1) || (leverage > 100)) {
|
|
4094
4115
|
throw new BadRequest(this.id + ' setLeverage() leverage should be between 1 and 100');
|
|
4095
4116
|
}
|
|
@@ -4131,7 +4152,7 @@ export default class phemex extends Exchange {
|
|
|
4131
4152
|
* @param {string} toAccount account to transfer to
|
|
4132
4153
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
4133
4154
|
* @param {string} [params.bizType] for transferring between main and sub-acounts either 'SPOT' or 'PERPETUAL' default is 'SPOT'
|
|
4134
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
4155
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4135
4156
|
*/
|
|
4136
4157
|
await this.loadMarkets();
|
|
4137
4158
|
const currency = this.currency(code);
|
|
@@ -4216,7 +4237,7 @@ export default class phemex extends Exchange {
|
|
|
4216
4237
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
4217
4238
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
4218
4239
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
4219
|
-
* @returns {object[]} a list of [transfer structures]{@link https://
|
|
4240
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4220
4241
|
*/
|
|
4221
4242
|
await this.loadMarkets();
|
|
4222
4243
|
if (code === undefined) {
|
|
@@ -4330,13 +4351,15 @@ export default class phemex extends Exchange {
|
|
|
4330
4351
|
* @see https://phemex-docs.github.io/#query-funding-rate-history-2
|
|
4331
4352
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
4332
4353
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
4333
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://
|
|
4354
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
4334
4355
|
* @param {object} [params] extra parameters specific to the phemex api endpoint
|
|
4335
4356
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
4336
4357
|
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
4337
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
4358
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
4338
4359
|
*/
|
|
4339
|
-
|
|
4360
|
+
if (symbol === undefined) {
|
|
4361
|
+
throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
4362
|
+
}
|
|
4340
4363
|
await this.loadMarkets();
|
|
4341
4364
|
const market = this.market(symbol);
|
|
4342
4365
|
const isUsdtSettled = market['settle'] === 'USDT';
|
package/js/src/poloniex.js
CHANGED
|
@@ -634,7 +634,7 @@ export default class poloniex extends Exchange {
|
|
|
634
634
|
* @see https://docs.poloniex.com/#public-endpoints-market-data-ticker
|
|
635
635
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
636
636
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
637
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
637
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
638
638
|
*/
|
|
639
639
|
await this.loadMarkets();
|
|
640
640
|
symbols = this.marketSymbols(symbols);
|
|
@@ -806,7 +806,7 @@ export default class poloniex extends Exchange {
|
|
|
806
806
|
* @see https://docs.poloniex.com/#public-endpoints-market-data-ticker
|
|
807
807
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
808
808
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
809
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
809
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
810
810
|
*/
|
|
811
811
|
await this.loadMarkets();
|
|
812
812
|
const market = this.market(symbol);
|
|
@@ -939,7 +939,7 @@ export default class poloniex extends Exchange {
|
|
|
939
939
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
940
940
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
941
941
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
942
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
942
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
943
943
|
*/
|
|
944
944
|
await this.loadMarkets();
|
|
945
945
|
const market = this.market(symbol);
|
|
@@ -977,7 +977,7 @@ export default class poloniex extends Exchange {
|
|
|
977
977
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
978
978
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
979
979
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
980
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
980
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
981
981
|
*/
|
|
982
982
|
await this.loadMarkets();
|
|
983
983
|
let paginate = false;
|
|
@@ -1188,7 +1188,7 @@ export default class poloniex extends Exchange {
|
|
|
1188
1188
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1189
1189
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1190
1190
|
* @param {boolean} [params.stop] set true to fetch trigger orders instead of regular orders
|
|
1191
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1191
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1192
1192
|
*/
|
|
1193
1193
|
await this.loadMarkets();
|
|
1194
1194
|
let market = undefined;
|
|
@@ -1249,7 +1249,7 @@ export default class poloniex extends Exchange {
|
|
|
1249
1249
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1250
1250
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1251
1251
|
* @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
|
|
1252
|
-
* @returns {object} an [order structure]{@link https://
|
|
1252
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1253
1253
|
*/
|
|
1254
1254
|
await this.loadMarkets();
|
|
1255
1255
|
const market = this.market(symbol);
|
|
@@ -1333,7 +1333,7 @@ export default class poloniex extends Exchange {
|
|
|
1333
1333
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1334
1334
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1335
1335
|
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1336
|
-
* @returns {object} an [order structure]{@link https://
|
|
1336
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1337
1337
|
*/
|
|
1338
1338
|
await this.loadMarkets();
|
|
1339
1339
|
const market = this.market(symbol);
|
|
@@ -1375,7 +1375,7 @@ export default class poloniex extends Exchange {
|
|
|
1375
1375
|
// @param {string} symbol unified symbol of the market the order was made in
|
|
1376
1376
|
// @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1377
1377
|
// @param {boolean} [params.trigger] true if canceling a trigger order
|
|
1378
|
-
// @returns {object} An [order structure]{@link https://
|
|
1378
|
+
// @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1379
1379
|
//
|
|
1380
1380
|
await this.loadMarkets();
|
|
1381
1381
|
const request = {};
|
|
@@ -1414,7 +1414,7 @@ export default class poloniex extends Exchange {
|
|
|
1414
1414
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1415
1415
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1416
1416
|
* @param {boolean} [params.trigger] true if canceling trigger orders
|
|
1417
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1417
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1418
1418
|
*/
|
|
1419
1419
|
await this.loadMarkets();
|
|
1420
1420
|
const request = {
|
|
@@ -1467,7 +1467,7 @@ export default class poloniex extends Exchange {
|
|
|
1467
1467
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1468
1468
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1469
1469
|
* @param {boolean} [params.trigger] true if fetching a trigger order
|
|
1470
|
-
* @returns {object} an [order structure]{@link https://
|
|
1470
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1471
1471
|
*/
|
|
1472
1472
|
await this.loadMarkets();
|
|
1473
1473
|
id = id.toString();
|
|
@@ -1526,7 +1526,7 @@ export default class poloniex extends Exchange {
|
|
|
1526
1526
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1527
1527
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1528
1528
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1529
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
1529
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1530
1530
|
*/
|
|
1531
1531
|
await this.loadMarkets();
|
|
1532
1532
|
const request = {
|
|
@@ -1584,7 +1584,7 @@ export default class poloniex extends Exchange {
|
|
|
1584
1584
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1585
1585
|
* @see https://docs.poloniex.com/#authenticated-endpoints-accounts-all-account-balances
|
|
1586
1586
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1587
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1587
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1588
1588
|
*/
|
|
1589
1589
|
await this.loadMarkets();
|
|
1590
1590
|
const request = {
|
|
@@ -1616,7 +1616,7 @@ export default class poloniex extends Exchange {
|
|
|
1616
1616
|
* @description fetch the trading fees for multiple markets
|
|
1617
1617
|
* @see https://docs.poloniex.com/#authenticated-endpoints-accounts-fee-info
|
|
1618
1618
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1619
|
-
* @returns {object} a dictionary of [fee structures]{@link https://
|
|
1619
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1620
1620
|
*/
|
|
1621
1621
|
await this.loadMarkets();
|
|
1622
1622
|
const response = await this.privateGetFeeinfo(params);
|
|
@@ -1651,7 +1651,7 @@ export default class poloniex extends Exchange {
|
|
|
1651
1651
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1652
1652
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1653
1653
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1654
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
1654
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1655
1655
|
*/
|
|
1656
1656
|
await this.loadMarkets();
|
|
1657
1657
|
const market = this.market(symbol);
|
|
@@ -1707,7 +1707,7 @@ export default class poloniex extends Exchange {
|
|
|
1707
1707
|
* @see https://docs.poloniex.com/#authenticated-endpoints-wallets-deposit-addresses
|
|
1708
1708
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
1709
1709
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1710
|
-
* @returns {object} an [address structure]{@link https://
|
|
1710
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1711
1711
|
*/
|
|
1712
1712
|
await this.loadMarkets();
|
|
1713
1713
|
const currency = this.currency(code);
|
|
@@ -1758,7 +1758,7 @@ export default class poloniex extends Exchange {
|
|
|
1758
1758
|
* @see https://docs.poloniex.com/#authenticated-endpoints-wallets-deposit-addresses
|
|
1759
1759
|
* @param {string} code unified currency code
|
|
1760
1760
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1761
|
-
* @returns {object} an [address structure]{@link https://
|
|
1761
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1762
1762
|
*/
|
|
1763
1763
|
await this.loadMarkets();
|
|
1764
1764
|
const currency = this.currency(code);
|
|
@@ -1812,7 +1812,7 @@ export default class poloniex extends Exchange {
|
|
|
1812
1812
|
* @param {string} fromAccount account to transfer from
|
|
1813
1813
|
* @param {string} toAccount account to transfer to
|
|
1814
1814
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1815
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
1815
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1816
1816
|
*/
|
|
1817
1817
|
await this.loadMarkets();
|
|
1818
1818
|
const currency = this.currency(code);
|
|
@@ -1863,7 +1863,7 @@ export default class poloniex extends Exchange {
|
|
|
1863
1863
|
* @param {string} address the address to withdraw to
|
|
1864
1864
|
* @param {string} tag
|
|
1865
1865
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1866
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1866
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1867
1867
|
*/
|
|
1868
1868
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1869
1869
|
this.checkAddress(address);
|
|
@@ -1987,7 +1987,7 @@ export default class poloniex extends Exchange {
|
|
|
1987
1987
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1988
1988
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1989
1989
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
1990
|
-
* @returns {object} a list of [transaction structure]{@link https://
|
|
1990
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1991
1991
|
*/
|
|
1992
1992
|
await this.loadMarkets();
|
|
1993
1993
|
const response = await this.fetchTransactionsHelper(code, since, limit, params);
|
|
@@ -2012,7 +2012,7 @@ export default class poloniex extends Exchange {
|
|
|
2012
2012
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2013
2013
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2014
2014
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
2015
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2015
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2016
2016
|
*/
|
|
2017
2017
|
const response = await this.fetchTransactionsHelper(code, since, limit, params);
|
|
2018
2018
|
let currency = undefined;
|
|
@@ -2031,7 +2031,7 @@ export default class poloniex extends Exchange {
|
|
|
2031
2031
|
* @see https://docs.poloniex.com/#public-endpoints-reference-data-currency-information
|
|
2032
2032
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2033
2033
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
2034
|
-
* @returns {object[]} a list of [fees structures]{@link https://
|
|
2034
|
+
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2035
2035
|
*/
|
|
2036
2036
|
await this.loadMarkets();
|
|
2037
2037
|
const response = await this.publicGetCurrencies(this.extend(params, { 'includeMultiChainCurrencies': true }));
|
|
@@ -2158,7 +2158,7 @@ export default class poloniex extends Exchange {
|
|
|
2158
2158
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2159
2159
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2160
2160
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
2161
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
2161
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2162
2162
|
*/
|
|
2163
2163
|
const response = await this.fetchTransactionsHelper(code, since, limit, params);
|
|
2164
2164
|
let currency = undefined;
|