ccxt 4.1.56 → 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/README.md +3 -3
- package/build.sh +30 -18
- package/dist/ccxt.browser.js +3872 -3202
- package/dist/ccxt.browser.min.js +10 -10
- 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 +16 -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 +106 -85
- 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 +100 -77
- 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 +132 -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 +87 -82
- package/dist/cjs/src/p2b.js +79 -82
- 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/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- 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 +16 -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 +106 -85
- 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 +100 -77
- 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 +132 -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 +87 -82
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +79 -81
- 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 +1 -1
package/js/src/upbit.js
CHANGED
|
@@ -501,7 +501,7 @@ export default class upbit extends Exchange {
|
|
|
501
501
|
* @see https://docs.upbit.com/reference/%EC%A0%84%EC%B2%B4-%EA%B3%84%EC%A2%8C-%EC%A1%B0%ED%9A%8C
|
|
502
502
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
503
503
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
504
|
-
* @returns {object} a [balance structure]{@link https://
|
|
504
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
505
505
|
*/
|
|
506
506
|
await this.loadMarkets();
|
|
507
507
|
const response = await this.privateGetAccounts(params);
|
|
@@ -528,7 +528,7 @@ export default class upbit extends Exchange {
|
|
|
528
528
|
* @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
529
529
|
* @param {int} [limit] not used by upbit fetchOrderBooks ()
|
|
530
530
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
531
|
-
* @returns {object} a dictionary of [order book structures]{@link https://
|
|
531
|
+
* @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
|
|
532
532
|
*/
|
|
533
533
|
await this.loadMarkets();
|
|
534
534
|
let ids = undefined;
|
|
@@ -602,7 +602,7 @@ export default class upbit extends Exchange {
|
|
|
602
602
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
603
603
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
604
604
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
605
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
605
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
606
606
|
*/
|
|
607
607
|
const orderbooks = await this.fetchOrderBooks([symbol], limit, params);
|
|
608
608
|
return this.safeValue(orderbooks, symbol);
|
|
@@ -671,7 +671,7 @@ export default class upbit extends Exchange {
|
|
|
671
671
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
672
672
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
673
673
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
674
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
674
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
675
675
|
*/
|
|
676
676
|
await this.loadMarkets();
|
|
677
677
|
symbols = this.marketSymbols(symbols);
|
|
@@ -736,7 +736,7 @@ export default class upbit extends Exchange {
|
|
|
736
736
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
737
737
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
738
738
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
739
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
739
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
740
740
|
*/
|
|
741
741
|
const tickers = await this.fetchTickers([symbol], params);
|
|
742
742
|
return this.safeValue(tickers, symbol);
|
|
@@ -823,7 +823,7 @@ export default class upbit extends Exchange {
|
|
|
823
823
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
824
824
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
825
825
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
826
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
826
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
827
827
|
*/
|
|
828
828
|
await this.loadMarkets();
|
|
829
829
|
const market = this.market(symbol);
|
|
@@ -867,7 +867,7 @@ export default class upbit extends Exchange {
|
|
|
867
867
|
* @description fetch the trading fees for a market
|
|
868
868
|
* @param {string} symbol unified market symbol
|
|
869
869
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
870
|
-
* @returns {object} a [fee structure]{@link https://
|
|
870
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
871
871
|
*/
|
|
872
872
|
await this.loadMarkets();
|
|
873
873
|
const market = this.market(symbol);
|
|
@@ -1031,7 +1031,7 @@ export default class upbit extends Exchange {
|
|
|
1031
1031
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1032
1032
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1033
1033
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1034
|
-
* @returns {object} an [order structure]{@link https://
|
|
1034
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1035
1035
|
*/
|
|
1036
1036
|
if (type === 'market') {
|
|
1037
1037
|
// for market buy it requires the amount of quote currency to spend
|
|
@@ -1114,7 +1114,7 @@ export default class upbit extends Exchange {
|
|
|
1114
1114
|
* @param {string} id order id
|
|
1115
1115
|
* @param {string} symbol not used by upbit cancelOrder ()
|
|
1116
1116
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1117
|
-
* @returns {object} An [order structure]{@link https://
|
|
1117
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1118
1118
|
*/
|
|
1119
1119
|
await this.loadMarkets();
|
|
1120
1120
|
const request = {
|
|
@@ -1152,7 +1152,7 @@ export default class upbit extends Exchange {
|
|
|
1152
1152
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1153
1153
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1154
1154
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1155
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1155
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1156
1156
|
*/
|
|
1157
1157
|
await this.loadMarkets();
|
|
1158
1158
|
const request = {
|
|
@@ -1196,7 +1196,7 @@ export default class upbit extends Exchange {
|
|
|
1196
1196
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1197
1197
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1198
1198
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1199
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1199
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1200
1200
|
*/
|
|
1201
1201
|
await this.loadMarkets();
|
|
1202
1202
|
const request = {
|
|
@@ -1501,7 +1501,7 @@ export default class upbit extends Exchange {
|
|
|
1501
1501
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1502
1502
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1503
1503
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1504
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1504
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1505
1505
|
*/
|
|
1506
1506
|
return await this.fetchOrdersByState('wait', symbol, since, limit, params);
|
|
1507
1507
|
}
|
|
@@ -1515,7 +1515,7 @@ export default class upbit extends Exchange {
|
|
|
1515
1515
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1516
1516
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1517
1517
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1518
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1518
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1519
1519
|
*/
|
|
1520
1520
|
return await this.fetchOrdersByState('done', symbol, since, limit, params);
|
|
1521
1521
|
}
|
|
@@ -1529,7 +1529,7 @@ export default class upbit extends Exchange {
|
|
|
1529
1529
|
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
1530
1530
|
* @param {int} [limit] max number of orders to return, default is undefined
|
|
1531
1531
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1532
|
-
* @returns {object} a list of [order structures]{@link https://
|
|
1532
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1533
1533
|
*/
|
|
1534
1534
|
return await this.fetchOrdersByState('cancel', symbol, since, limit, params);
|
|
1535
1535
|
}
|
|
@@ -1541,7 +1541,7 @@ export default class upbit extends Exchange {
|
|
|
1541
1541
|
* @description fetches information on an order made by the user
|
|
1542
1542
|
* @param {string} symbol not used by upbit fetchOrder
|
|
1543
1543
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1544
|
-
* @returns {object} An [order structure]{@link https://
|
|
1544
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1545
1545
|
*/
|
|
1546
1546
|
await this.loadMarkets();
|
|
1547
1547
|
const request = {
|
|
@@ -1601,7 +1601,7 @@ export default class upbit extends Exchange {
|
|
|
1601
1601
|
* @description fetch deposit addresses for multiple currencies and chain types
|
|
1602
1602
|
* @param {string[]|undefined} codes list of unified currency codes, default is undefined
|
|
1603
1603
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1604
|
-
* @returns {object} a list of [address structures]{@link https://
|
|
1604
|
+
* @returns {object} a list of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1605
1605
|
*/
|
|
1606
1606
|
await this.loadMarkets();
|
|
1607
1607
|
const response = await this.privateGetDepositsCoinAddresses(params);
|
|
@@ -1655,7 +1655,7 @@ export default class upbit extends Exchange {
|
|
|
1655
1655
|
* @description fetch the deposit address for a currency associated with this account
|
|
1656
1656
|
* @param {string} code unified currency code
|
|
1657
1657
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1658
|
-
* @returns {object} an [address structure]{@link https://
|
|
1658
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1659
1659
|
*/
|
|
1660
1660
|
await this.loadMarkets();
|
|
1661
1661
|
const currency = this.currency(code);
|
|
@@ -1679,7 +1679,7 @@ export default class upbit extends Exchange {
|
|
|
1679
1679
|
* @description create a currency deposit address
|
|
1680
1680
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
1681
1681
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1682
|
-
* @returns {object} an [address structure]{@link https://
|
|
1682
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1683
1683
|
*/
|
|
1684
1684
|
await this.loadMarkets();
|
|
1685
1685
|
const currency = this.currency(code);
|
|
@@ -1720,7 +1720,7 @@ export default class upbit extends Exchange {
|
|
|
1720
1720
|
* @param {string} address the address to withdraw to
|
|
1721
1721
|
* @param {string} tag
|
|
1722
1722
|
* @param {object} [params] extra parameters specific to the upbit api endpoint
|
|
1723
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1723
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1724
1724
|
*/
|
|
1725
1725
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1726
1726
|
this.checkAddress(address);
|
package/js/src/wavesexchange.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import Exchange from './abstract/wavesexchange.js';
|
|
9
|
-
import { AuthenticationError, InsufficientFunds, InvalidOrder, AccountSuspended, ExchangeError, DuplicateOrderId, OrderNotFound, BadSymbol, ExchangeNotAvailable, BadRequest } from './base/errors.js';
|
|
9
|
+
import { AuthenticationError, InsufficientFunds, InvalidOrder, AccountSuspended, ExchangeError, DuplicateOrderId, OrderNotFound, BadSymbol, ExchangeNotAvailable, BadRequest, ArgumentsRequired } from './base/errors.js';
|
|
10
10
|
import { Precise } from './base/Precise.js';
|
|
11
11
|
import { ed25519 } from './static_dependencies/noble-curves/ed25519.js';
|
|
12
12
|
import { DECIMAL_PLACES } from './base/functions/number.js';
|
|
@@ -39,12 +39,11 @@ export default class wavesexchange extends Exchange {
|
|
|
39
39
|
'createStopMarketOrder': false,
|
|
40
40
|
'createStopOrder': false,
|
|
41
41
|
'fetchBalance': true,
|
|
42
|
-
'fetchBorrowRate': false,
|
|
43
42
|
'fetchBorrowRateHistories': false,
|
|
44
43
|
'fetchBorrowRateHistory': false,
|
|
45
|
-
'fetchBorrowRates': false,
|
|
46
|
-
'fetchBorrowRatesPerSymbol': false,
|
|
47
44
|
'fetchClosedOrders': true,
|
|
45
|
+
'fetchCrossBorrowRate': false,
|
|
46
|
+
'fetchCrossBorrowRates': false,
|
|
48
47
|
'fetchDepositAddress': true,
|
|
49
48
|
'fetchDepositWithdrawFee': 'emulated',
|
|
50
49
|
'fetchDepositWithdrawFees': true,
|
|
@@ -53,6 +52,8 @@ export default class wavesexchange extends Exchange {
|
|
|
53
52
|
'fetchFundingRateHistory': false,
|
|
54
53
|
'fetchFundingRates': false,
|
|
55
54
|
'fetchIndexOHLCV': false,
|
|
55
|
+
'fetchIsolatedBorrowRate': false,
|
|
56
|
+
'fetchIsolatedBorrowRates': false,
|
|
56
57
|
'fetchLeverage': false,
|
|
57
58
|
'fetchLeverageTiers': false,
|
|
58
59
|
'fetchMarginMode': false,
|
|
@@ -594,7 +595,7 @@ export default class wavesexchange extends Exchange {
|
|
|
594
595
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
595
596
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
596
597
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
597
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
598
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
598
599
|
*/
|
|
599
600
|
await this.loadMarkets();
|
|
600
601
|
const market = this.market(symbol);
|
|
@@ -854,7 +855,7 @@ export default class wavesexchange extends Exchange {
|
|
|
854
855
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
855
856
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
856
857
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
857
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
858
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
858
859
|
*/
|
|
859
860
|
await this.loadMarkets();
|
|
860
861
|
const market = this.market(symbol);
|
|
@@ -897,7 +898,7 @@ export default class wavesexchange extends Exchange {
|
|
|
897
898
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
898
899
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
899
900
|
* @param {object} [params] extra parameters specific to the aax api endpoint
|
|
900
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
901
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
901
902
|
*/
|
|
902
903
|
await this.loadMarkets();
|
|
903
904
|
const response = await this.marketGetTickers(params);
|
|
@@ -1059,7 +1060,7 @@ export default class wavesexchange extends Exchange {
|
|
|
1059
1060
|
* @description fetch the deposit address for a currency associated with this account
|
|
1060
1061
|
* @param {string} code unified currency code
|
|
1061
1062
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1062
|
-
* @returns {object} an [address structure]{@link https://
|
|
1063
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1063
1064
|
*/
|
|
1064
1065
|
await this.signIn();
|
|
1065
1066
|
const networks = this.safeValue(this.options, 'networks', {});
|
|
@@ -1293,7 +1294,7 @@ export default class wavesexchange extends Exchange {
|
|
|
1293
1294
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1294
1295
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1295
1296
|
* @param {float} [params.stopPrice] The price at which a stop order is triggered at
|
|
1296
|
-
* @returns {object} an [order structure]{@link https://
|
|
1297
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1297
1298
|
*/
|
|
1298
1299
|
this.checkRequiredDependencies();
|
|
1299
1300
|
this.checkRequiredKeys();
|
|
@@ -1475,7 +1476,7 @@ export default class wavesexchange extends Exchange {
|
|
|
1475
1476
|
* @param {string} id order id
|
|
1476
1477
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1477
1478
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1478
|
-
* @returns {object} An [order structure]{@link https://
|
|
1479
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1479
1480
|
*/
|
|
1480
1481
|
this.checkRequiredDependencies();
|
|
1481
1482
|
this.checkRequiredKeys();
|
|
@@ -1522,7 +1523,7 @@ export default class wavesexchange extends Exchange {
|
|
|
1522
1523
|
* @description fetches information on an order made by the user
|
|
1523
1524
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1524
1525
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1525
|
-
* @returns {object} An [order structure]{@link https://
|
|
1526
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1526
1527
|
*/
|
|
1527
1528
|
this.checkRequiredDependencies();
|
|
1528
1529
|
this.checkRequiredKeys();
|
|
@@ -1557,11 +1558,13 @@ export default class wavesexchange extends Exchange {
|
|
|
1557
1558
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1558
1559
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1559
1560
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1560
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1561
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1561
1562
|
*/
|
|
1562
1563
|
this.checkRequiredDependencies();
|
|
1563
1564
|
this.checkRequiredKeys();
|
|
1564
|
-
|
|
1565
|
+
if (symbol === undefined) {
|
|
1566
|
+
throw new ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument');
|
|
1567
|
+
}
|
|
1565
1568
|
await this.loadMarkets();
|
|
1566
1569
|
const market = this.market(symbol);
|
|
1567
1570
|
const timestamp = this.milliseconds();
|
|
@@ -1607,7 +1610,7 @@ export default class wavesexchange extends Exchange {
|
|
|
1607
1610
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1608
1611
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1609
1612
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1610
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1613
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1611
1614
|
*/
|
|
1612
1615
|
await this.loadMarkets();
|
|
1613
1616
|
await this.signIn();
|
|
@@ -1632,7 +1635,7 @@ export default class wavesexchange extends Exchange {
|
|
|
1632
1635
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1633
1636
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1634
1637
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1635
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1638
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1636
1639
|
*/
|
|
1637
1640
|
await this.loadMarkets();
|
|
1638
1641
|
await this.signIn();
|
|
@@ -1835,7 +1838,7 @@ export default class wavesexchange extends Exchange {
|
|
|
1835
1838
|
* @name wavesexchange#fetchBalance
|
|
1836
1839
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1837
1840
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1838
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1841
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1839
1842
|
*/
|
|
1840
1843
|
// makes a lot of different requests to get all the data
|
|
1841
1844
|
// in particular:
|
|
@@ -1989,7 +1992,7 @@ export default class wavesexchange extends Exchange {
|
|
|
1989
1992
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1990
1993
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1991
1994
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
1992
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1995
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1993
1996
|
*/
|
|
1994
1997
|
await this.loadMarkets();
|
|
1995
1998
|
const address = await this.getWavesAddress();
|
|
@@ -2081,7 +2084,7 @@ export default class wavesexchange extends Exchange {
|
|
|
2081
2084
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
2082
2085
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
2083
2086
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
2084
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
2087
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
2085
2088
|
*/
|
|
2086
2089
|
await this.loadMarkets();
|
|
2087
2090
|
const market = this.market(symbol);
|
|
@@ -2338,7 +2341,7 @@ export default class wavesexchange extends Exchange {
|
|
|
2338
2341
|
* @see https://docs.wx.network/en/api/gateways/withdraw/currencies
|
|
2339
2342
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2340
2343
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
2341
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
2344
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2342
2345
|
*/
|
|
2343
2346
|
await this.loadMarkets();
|
|
2344
2347
|
let data = [];
|
|
@@ -2435,7 +2438,7 @@ export default class wavesexchange extends Exchange {
|
|
|
2435
2438
|
* @param {string} address the address to withdraw to
|
|
2436
2439
|
* @param {string} tag
|
|
2437
2440
|
* @param {object} [params] extra parameters specific to the wavesexchange api endpoint
|
|
2438
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
2441
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2439
2442
|
*/
|
|
2440
2443
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2441
2444
|
// currently only works for BTC and WAVES
|
package/js/src/wazirx.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
6
|
|
|
7
7
|
import Exchange from './abstract/wazirx.js';
|
|
8
|
-
import { ExchangeError, BadRequest, RateLimitExceeded, BadSymbol, PermissionDenied, InsufficientFunds, InvalidOrder } from './base/errors.js';
|
|
8
|
+
import { ExchangeError, BadRequest, RateLimitExceeded, BadSymbol, PermissionDenied, InsufficientFunds, InvalidOrder, ArgumentsRequired } from './base/errors.js';
|
|
9
9
|
import { Precise } from './base/Precise.js';
|
|
10
10
|
import { TICK_SIZE } from './base/functions/number.js';
|
|
11
11
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
@@ -41,12 +41,11 @@ export default class wazirx extends Exchange {
|
|
|
41
41
|
'fetchBalance': true,
|
|
42
42
|
'fetchBidsAsks': false,
|
|
43
43
|
'fetchBorrowInterest': false,
|
|
44
|
-
'fetchBorrowRate': false,
|
|
45
44
|
'fetchBorrowRateHistories': false,
|
|
46
45
|
'fetchBorrowRateHistory': false,
|
|
47
|
-
'fetchBorrowRates': false,
|
|
48
|
-
'fetchBorrowRatesPerSymbol': false,
|
|
49
46
|
'fetchClosedOrders': false,
|
|
47
|
+
'fetchCrossBorrowRate': false,
|
|
48
|
+
'fetchCrossBorrowRates': false,
|
|
50
49
|
'fetchCurrencies': false,
|
|
51
50
|
'fetchDepositAddress': false,
|
|
52
51
|
'fetchDepositAddressesByNetwork': false,
|
|
@@ -57,6 +56,8 @@ export default class wazirx extends Exchange {
|
|
|
57
56
|
'fetchFundingRateHistory': false,
|
|
58
57
|
'fetchFundingRates': false,
|
|
59
58
|
'fetchIndexOHLCV': false,
|
|
59
|
+
'fetchIsolatedBorrowRate': false,
|
|
60
|
+
'fetchIsolatedBorrowRates': false,
|
|
60
61
|
'fetchIsolatedPositions': false,
|
|
61
62
|
'fetchLeverage': false,
|
|
62
63
|
'fetchLeverageTiers': false,
|
|
@@ -352,7 +353,7 @@ export default class wazirx extends Exchange {
|
|
|
352
353
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
353
354
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
354
355
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
355
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
356
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
356
357
|
*/
|
|
357
358
|
await this.loadMarkets();
|
|
358
359
|
const market = this.market(symbol);
|
|
@@ -387,7 +388,7 @@ export default class wazirx extends Exchange {
|
|
|
387
388
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
388
389
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
389
390
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
390
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
391
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
391
392
|
*/
|
|
392
393
|
await this.loadMarkets();
|
|
393
394
|
const market = this.market(symbol);
|
|
@@ -420,7 +421,7 @@ export default class wazirx extends Exchange {
|
|
|
420
421
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
421
422
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
422
423
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
423
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
424
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
424
425
|
*/
|
|
425
426
|
await this.loadMarkets();
|
|
426
427
|
const tickers = await this.publicGetTickers24hr();
|
|
@@ -460,7 +461,7 @@ export default class wazirx extends Exchange {
|
|
|
460
461
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
461
462
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
462
463
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
463
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
464
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
464
465
|
*/
|
|
465
466
|
await this.loadMarkets();
|
|
466
467
|
const market = this.market(symbol);
|
|
@@ -527,7 +528,7 @@ export default class wazirx extends Exchange {
|
|
|
527
528
|
* @see https://docs.wazirx.com/#system-status
|
|
528
529
|
* @description the latest known information on the availability of the exchange API
|
|
529
530
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
530
|
-
* @returns {object} a [status structure]{@link https://
|
|
531
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
531
532
|
*/
|
|
532
533
|
const response = await this.publicGetSystemStatus(params);
|
|
533
534
|
//
|
|
@@ -632,7 +633,7 @@ export default class wazirx extends Exchange {
|
|
|
632
633
|
* @see https://docs.wazirx.com/#fund-details-user_data
|
|
633
634
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
634
635
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
635
|
-
* @returns {object} a [balance structure]{@link https://
|
|
636
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
636
637
|
*/
|
|
637
638
|
await this.loadMarkets();
|
|
638
639
|
const response = await this.privateGetFunds(params);
|
|
@@ -657,9 +658,11 @@ export default class wazirx extends Exchange {
|
|
|
657
658
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
658
659
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
659
660
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
660
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
661
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
661
662
|
*/
|
|
662
|
-
|
|
663
|
+
if (symbol === undefined) {
|
|
664
|
+
throw new ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument');
|
|
665
|
+
}
|
|
663
666
|
await this.loadMarkets();
|
|
664
667
|
const market = this.market(symbol);
|
|
665
668
|
const request = {
|
|
@@ -715,7 +718,7 @@ export default class wazirx extends Exchange {
|
|
|
715
718
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
716
719
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
717
720
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
718
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
721
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
719
722
|
*/
|
|
720
723
|
await this.loadMarkets();
|
|
721
724
|
const request = {};
|
|
@@ -763,9 +766,11 @@ export default class wazirx extends Exchange {
|
|
|
763
766
|
* @description cancel all open orders in a market
|
|
764
767
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
765
768
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
766
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
769
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
767
770
|
*/
|
|
768
|
-
|
|
771
|
+
if (symbol === undefined) {
|
|
772
|
+
throw new ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
|
|
773
|
+
}
|
|
769
774
|
await this.loadMarkets();
|
|
770
775
|
const market = this.market(symbol);
|
|
771
776
|
const request = {
|
|
@@ -782,9 +787,11 @@ export default class wazirx extends Exchange {
|
|
|
782
787
|
* @param {string} id order id
|
|
783
788
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
784
789
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
785
|
-
* @returns {object} An [order structure]{@link https://
|
|
790
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
786
791
|
*/
|
|
787
|
-
|
|
792
|
+
if (symbol === undefined) {
|
|
793
|
+
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
794
|
+
}
|
|
788
795
|
await this.loadMarkets();
|
|
789
796
|
const market = this.market(symbol);
|
|
790
797
|
const request = {
|
|
@@ -806,7 +813,7 @@ export default class wazirx extends Exchange {
|
|
|
806
813
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
807
814
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
808
815
|
* @param {object} [params] extra parameters specific to the wazirx api endpoint
|
|
809
|
-
* @returns {object} an [order structure]{@link https://
|
|
816
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
810
817
|
*/
|
|
811
818
|
type = type.toLowerCase();
|
|
812
819
|
if ((type !== 'limit') && (type !== 'stop_limit')) {
|