ccxt 4.0.75 → 4.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.js +659 -461
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +2 -2
- package/dist/cjs/src/alpaca.js +1 -1
- package/dist/cjs/src/ascendex.js +3 -3
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/bigone.js +2 -2
- package/dist/cjs/src/binance.js +5 -5
- package/dist/cjs/src/bingx.js +83 -23
- package/dist/cjs/src/bit2c.js +2 -2
- package/dist/cjs/src/bitbank.js +2 -2
- package/dist/cjs/src/bitbns.js +2 -2
- package/dist/cjs/src/bitfinex.js +2 -2
- package/dist/cjs/src/bitfinex2.js +4 -4
- package/dist/cjs/src/bitflyer.js +2 -2
- package/dist/cjs/src/bitforex.js +2 -2
- package/dist/cjs/src/bitget.js +5 -5
- package/dist/cjs/src/bithumb.js +2 -2
- package/dist/cjs/src/bitmart.js +2 -2
- package/dist/cjs/src/bitmex.js +5 -5
- package/dist/cjs/src/bitopro.js +3 -3
- package/dist/cjs/src/bitpanda.js +2 -2
- package/dist/cjs/src/bitrue.js +3 -3
- package/dist/cjs/src/bitso.js +2 -2
- package/dist/cjs/src/bitstamp.js +2 -2
- package/dist/cjs/src/bitstamp1.js +2 -2
- package/dist/cjs/src/bittrex.js +3 -3
- package/dist/cjs/src/bitvavo.js +3 -3
- package/dist/cjs/src/bkex.js +4 -4
- package/dist/cjs/src/bl3p.js +2 -2
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/btcalpha.js +2 -2
- package/dist/cjs/src/btcbox.js +2 -2
- package/dist/cjs/src/btcmarkets.js +2 -2
- package/dist/cjs/src/btctradeua.js +2 -2
- package/dist/cjs/src/btcturk.js +2 -2
- package/dist/cjs/src/bybit.js +5 -5
- package/dist/cjs/src/cex.js +2 -2
- package/dist/cjs/src/coinbase.js +3 -3
- package/dist/cjs/src/coinbasepro.js +2 -2
- package/dist/cjs/src/coincheck.js +2 -2
- package/dist/cjs/src/coinex.js +6 -6
- package/dist/cjs/src/coinfalcon.js +2 -2
- package/dist/cjs/src/coinmate.js +2 -2
- package/dist/cjs/src/coinone.js +2 -2
- package/dist/cjs/src/coinsph.js +7 -2
- package/dist/cjs/src/coinspot.js +2 -2
- package/dist/cjs/src/cryptocom.js +5 -5
- package/dist/cjs/src/currencycom.js +2 -2
- package/dist/cjs/src/delta.js +2 -2
- package/dist/cjs/src/deribit.js +3 -3
- package/dist/cjs/src/digifinex.js +4 -4
- package/dist/cjs/src/exmo.js +2 -2
- package/dist/cjs/src/gate.js +46 -4
- package/dist/cjs/src/gemini.js +3 -3
- package/dist/cjs/src/hitbtc.js +4 -4
- package/dist/cjs/src/hollaex.js +3 -3
- package/dist/cjs/src/huobi.js +5 -5
- package/dist/cjs/src/huobijp.js +2 -2
- package/dist/cjs/src/idex.js +2 -2
- package/dist/cjs/src/independentreserve.js +2 -2
- package/dist/cjs/src/indodax.js +2 -2
- package/dist/cjs/src/kraken.js +2 -2
- package/dist/cjs/src/kucoin.js +4 -4
- package/dist/cjs/src/kucoinfutures.js +5 -5
- package/dist/cjs/src/kuna.js +2 -2
- package/dist/cjs/src/latoken.js +2 -2
- package/dist/cjs/src/lbank.js +2 -2
- package/dist/cjs/src/lbank2.js +2 -2
- package/dist/cjs/src/luno.js +2 -2
- package/dist/cjs/src/lykke.js +2 -2
- package/dist/cjs/src/mercado.js +2 -2
- package/dist/cjs/src/mexc.js +6 -4
- package/dist/cjs/src/ndax.js +2 -2
- package/dist/cjs/src/novadax.js +2 -2
- package/dist/cjs/src/oceanex.js +2 -2
- package/dist/cjs/src/okcoin.js +2 -2
- package/dist/cjs/src/okx.js +4 -4
- package/dist/cjs/src/paymium.js +2 -2
- package/dist/cjs/src/phemex.js +2 -2
- package/dist/cjs/src/poloniex.js +165 -81
- package/dist/cjs/src/poloniexfutures.js +2 -2
- package/dist/cjs/src/pro/ascendex.js +2 -2
- package/dist/cjs/src/pro/binance.js +6 -6
- package/dist/cjs/src/pro/bitfinex.js +1 -1
- package/dist/cjs/src/pro/bitfinex2.js +2 -2
- package/dist/cjs/src/pro/bitget.js +2 -2
- package/dist/cjs/src/pro/bitmart.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +2 -2
- package/dist/cjs/src/pro/bitopro.js +2 -2
- package/dist/cjs/src/pro/bitpanda.js +6 -6
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/bittrex.js +2 -2
- package/dist/cjs/src/pro/bitvavo.js +1 -1
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/cex.js +4 -4
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +1 -1
- package/dist/cjs/src/pro/coinex.js +2 -2
- package/dist/cjs/src/pro/cryptocom.js +3 -3
- package/dist/cjs/src/pro/currencycom.js +2 -2
- package/dist/cjs/src/pro/deribit.js +3 -3
- package/dist/cjs/src/pro/exmo.js +3 -3
- package/dist/cjs/src/pro/gate.js +2 -2
- package/dist/cjs/src/pro/gemini.js +1 -1
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/pro/hollaex.js +2 -2
- package/dist/cjs/src/pro/huobi.js +2 -2
- package/dist/cjs/src/pro/huobijp.js +1 -1
- package/dist/cjs/src/pro/idex.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/kraken.js +6 -6
- package/dist/cjs/src/pro/krakenfutures.js +5 -5
- package/dist/cjs/src/pro/kucoin.js +2 -2
- package/dist/cjs/src/pro/kucoinfutures.js +3 -2
- package/dist/cjs/src/pro/luno.js +1 -1
- package/dist/cjs/src/pro/mexc.js +6 -6
- package/dist/cjs/src/pro/ndax.js +1 -1
- package/dist/cjs/src/pro/okcoin.js +2 -2
- package/dist/cjs/src/pro/okx.js +10 -7
- package/dist/cjs/src/pro/phemex.js +2 -2
- package/dist/cjs/src/pro/poloniex.js +6 -6
- 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 +1 -1
- package/dist/cjs/src/pro/wazirx.js +3 -3
- package/dist/cjs/src/pro/whitebit.js +2 -2
- package/dist/cjs/src/probit.js +2 -2
- package/dist/cjs/src/tidex.js +2 -2
- package/dist/cjs/src/timex.js +2 -2
- package/dist/cjs/src/tokocrypto.js +2 -2
- package/dist/cjs/src/upbit.js +2 -2
- package/dist/cjs/src/wavesexchange.js +3 -3
- package/dist/cjs/src/wazirx.js +2 -2
- package/dist/cjs/src/whitebit.js +4 -3
- package/dist/cjs/src/woo.js +2 -2
- package/dist/cjs/src/yobit.js +2 -2
- package/dist/cjs/src/zaif.js +2 -2
- package/dist/cjs/src/zonda.js +2 -2
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +2 -0
- package/js/src/abstract/coinsph.d.ts +5 -0
- package/js/src/abstract/gate.d.ts +24 -0
- package/js/src/abstract/gateio.d.ts +24 -0
- package/js/src/ace.js +2 -2
- package/js/src/alpaca.js +1 -1
- package/js/src/ascendex.js +3 -3
- package/js/src/base/Exchange.js +2 -2
- package/js/src/bigone.js +2 -2
- package/js/src/binance.js +5 -5
- package/js/src/bingx.d.ts +1 -0
- package/js/src/bingx.js +83 -23
- package/js/src/bit2c.js +2 -2
- package/js/src/bitbank.js +2 -2
- package/js/src/bitbns.js +2 -2
- package/js/src/bitfinex.js +2 -2
- package/js/src/bitfinex2.js +4 -4
- package/js/src/bitflyer.js +2 -2
- package/js/src/bitforex.js +2 -2
- package/js/src/bitget.js +5 -5
- package/js/src/bithumb.js +2 -2
- package/js/src/bitmart.js +2 -2
- package/js/src/bitmex.js +5 -5
- package/js/src/bitopro.js +3 -3
- package/js/src/bitpanda.js +2 -2
- package/js/src/bitrue.js +3 -3
- package/js/src/bitso.js +2 -2
- package/js/src/bitstamp.js +2 -2
- package/js/src/bitstamp1.js +2 -2
- package/js/src/bittrex.js +3 -3
- package/js/src/bitvavo.js +3 -3
- package/js/src/bkex.js +4 -4
- package/js/src/bl3p.js +2 -2
- package/js/src/blockchaincom.js +1 -1
- package/js/src/btcalpha.js +2 -2
- package/js/src/btcbox.js +2 -2
- package/js/src/btcmarkets.js +2 -2
- package/js/src/btctradeua.js +2 -2
- package/js/src/btcturk.js +2 -2
- package/js/src/bybit.js +5 -5
- package/js/src/cex.js +2 -2
- package/js/src/coinbase.js +3 -3
- package/js/src/coinbasepro.js +2 -2
- package/js/src/coincheck.js +2 -2
- package/js/src/coinex.js +6 -6
- package/js/src/coinfalcon.js +2 -2
- package/js/src/coinmate.js +2 -2
- package/js/src/coinone.js +2 -2
- package/js/src/coinsph.js +7 -2
- package/js/src/coinspot.js +2 -2
- package/js/src/cryptocom.js +5 -5
- package/js/src/currencycom.js +2 -2
- package/js/src/delta.js +2 -2
- package/js/src/deribit.js +3 -3
- package/js/src/digifinex.js +4 -4
- package/js/src/exmo.js +2 -2
- package/js/src/gate.js +46 -4
- package/js/src/gemini.js +3 -3
- package/js/src/hitbtc.js +4 -4
- package/js/src/hollaex.js +3 -3
- package/js/src/huobi.js +5 -5
- package/js/src/huobijp.js +2 -2
- package/js/src/idex.js +2 -2
- package/js/src/independentreserve.js +2 -2
- package/js/src/indodax.js +2 -2
- package/js/src/kraken.js +2 -2
- package/js/src/kucoin.js +4 -4
- package/js/src/kucoinfutures.js +5 -5
- package/js/src/kuna.js +2 -2
- package/js/src/latoken.js +2 -2
- package/js/src/lbank.js +2 -2
- package/js/src/lbank2.js +2 -2
- package/js/src/luno.js +2 -2
- package/js/src/lykke.js +2 -2
- package/js/src/mercado.js +2 -2
- package/js/src/mexc.js +7 -5
- package/js/src/ndax.js +2 -2
- package/js/src/novadax.js +2 -2
- package/js/src/oceanex.js +2 -2
- package/js/src/okcoin.js +2 -2
- package/js/src/okx.js +4 -4
- package/js/src/paymium.js +2 -2
- package/js/src/phemex.js +2 -2
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +165 -81
- package/js/src/poloniexfutures.js +2 -2
- package/js/src/pro/ascendex.js +2 -2
- package/js/src/pro/binance.js +6 -6
- package/js/src/pro/bitfinex.js +1 -1
- package/js/src/pro/bitfinex2.js +2 -2
- package/js/src/pro/bitget.js +2 -2
- package/js/src/pro/bitmart.js +1 -1
- package/js/src/pro/bitmex.js +2 -2
- package/js/src/pro/bitopro.js +2 -2
- package/js/src/pro/bitpanda.js +6 -6
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/bittrex.js +2 -2
- package/js/src/pro/bitvavo.js +1 -1
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/cex.js +4 -4
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +1 -1
- package/js/src/pro/coinex.js +2 -2
- package/js/src/pro/cryptocom.js +3 -3
- package/js/src/pro/currencycom.js +2 -2
- package/js/src/pro/deribit.js +3 -3
- package/js/src/pro/exmo.js +3 -3
- package/js/src/pro/gate.js +2 -2
- package/js/src/pro/gemini.js +1 -1
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/hollaex.js +2 -2
- package/js/src/pro/huobi.js +2 -2
- package/js/src/pro/huobijp.js +1 -1
- package/js/src/pro/idex.js +1 -1
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/kraken.js +6 -6
- package/js/src/pro/krakenfutures.js +5 -5
- package/js/src/pro/kucoin.js +2 -2
- package/js/src/pro/kucoinfutures.js +3 -2
- package/js/src/pro/luno.js +1 -1
- package/js/src/pro/mexc.js +6 -6
- package/js/src/pro/ndax.js +1 -1
- package/js/src/pro/okcoin.js +2 -2
- package/js/src/pro/okx.js +11 -8
- package/js/src/pro/phemex.js +2 -2
- package/js/src/pro/poloniex.js +6 -6
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/pro/probit.js +6 -6
- package/js/src/pro/upbit.js +1 -1
- package/js/src/pro/wazirx.js +3 -3
- package/js/src/pro/whitebit.js +2 -2
- package/js/src/probit.js +2 -2
- package/js/src/tidex.js +2 -2
- package/js/src/timex.js +2 -2
- package/js/src/tokocrypto.js +2 -2
- package/js/src/upbit.js +2 -2
- package/js/src/wavesexchange.js +3 -3
- package/js/src/wazirx.js +2 -2
- package/js/src/whitebit.js +4 -3
- package/js/src/woo.js +2 -2
- package/js/src/yobit.js +2 -2
- package/js/src/zaif.js +2 -2
- package/js/src/zonda.js +2 -2
- package/package.json +1 -1
- package/skip-tests.json +2 -0
package/dist/cjs/src/whitebit.js
CHANGED
|
@@ -253,6 +253,7 @@ class whitebit extends whitebit$1 {
|
|
|
253
253
|
'422': errors.OrderNotFound, // {"response":null,"status":422,"errors":{"orderId":["Finished order id 1295772653 not found on your account"]},"notification":null,"warning":"Finished order id 1295772653 not found on your account","_token":null}
|
|
254
254
|
},
|
|
255
255
|
'broad': {
|
|
256
|
+
'This action is unauthorized': errors.PermissionDenied,
|
|
256
257
|
'Given amount is less than min amount': errors.InvalidOrder,
|
|
257
258
|
'Total is less than': errors.InvalidOrder,
|
|
258
259
|
'fee must be no less than': errors.InvalidOrder,
|
|
@@ -864,7 +865,7 @@ class whitebit extends whitebit$1 {
|
|
|
864
865
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
865
866
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
866
867
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
867
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
868
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
868
869
|
*/
|
|
869
870
|
await this.loadMarkets();
|
|
870
871
|
const market = this.market(symbol);
|
|
@@ -895,7 +896,7 @@ class whitebit extends whitebit$1 {
|
|
|
895
896
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
896
897
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
897
898
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
898
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
899
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
899
900
|
*/
|
|
900
901
|
await this.loadMarkets();
|
|
901
902
|
let market = undefined;
|
|
@@ -1278,7 +1279,7 @@ class whitebit extends whitebit$1 {
|
|
|
1278
1279
|
* @name whitebit#fetchBalance
|
|
1279
1280
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1280
1281
|
* @param {object} [params] extra parameters specific to the whitebit api endpoint
|
|
1281
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1282
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1282
1283
|
*/
|
|
1283
1284
|
await this.loadMarkets();
|
|
1284
1285
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
|
package/dist/cjs/src/woo.js
CHANGED
|
@@ -414,7 +414,7 @@ class woo extends woo$1 {
|
|
|
414
414
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
415
415
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
416
416
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
417
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
417
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
418
418
|
*/
|
|
419
419
|
if (symbol === undefined) {
|
|
420
420
|
throw new errors.ArgumentsRequired(this.id + ' fetchTrades() requires a symbol argument');
|
|
@@ -1601,7 +1601,7 @@ class woo extends woo$1 {
|
|
|
1601
1601
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1602
1602
|
* @see https://docs.woo.org/#get-current-holding-get-balance-new
|
|
1603
1603
|
* @param {object} [params] extra parameters specific to the woo api endpoint
|
|
1604
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1604
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1605
1605
|
*/
|
|
1606
1606
|
await this.loadMarkets();
|
|
1607
1607
|
const response = await this.v3PrivateGetBalances(params);
|
package/dist/cjs/src/yobit.js
CHANGED
|
@@ -306,7 +306,7 @@ class yobit extends yobit$1 {
|
|
|
306
306
|
* @see https://yobit.net/en/api
|
|
307
307
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
308
308
|
* @param {object} [params] extra parameters specific to the yobit api endpoint
|
|
309
|
-
* @returns {object} a [balance structure]{@link https://
|
|
309
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
310
310
|
*/
|
|
311
311
|
await this.loadMarkets();
|
|
312
312
|
const response = await this.privatePostGetInfo(params);
|
|
@@ -689,7 +689,7 @@ class yobit extends yobit$1 {
|
|
|
689
689
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
690
690
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
691
691
|
* @param {object} [params] extra parameters specific to the yobit api endpoint
|
|
692
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
692
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
693
693
|
*/
|
|
694
694
|
await this.loadMarkets();
|
|
695
695
|
const market = this.market(symbol);
|
package/dist/cjs/src/zaif.js
CHANGED
|
@@ -274,7 +274,7 @@ class zaif extends zaif$1 {
|
|
|
274
274
|
* @see https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id10
|
|
275
275
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
276
276
|
* @param {object} [params] extra parameters specific to the zaif api endpoint
|
|
277
|
-
* @returns {object} a [balance structure]{@link https://
|
|
277
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
278
278
|
*/
|
|
279
279
|
await this.loadMarkets();
|
|
280
280
|
const response = await this.privatePostGetInfo(params);
|
|
@@ -416,7 +416,7 @@ class zaif extends zaif$1 {
|
|
|
416
416
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
417
417
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
418
418
|
* @param {object} [params] extra parameters specific to the zaif api endpoint
|
|
419
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
419
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
420
420
|
*/
|
|
421
421
|
await this.loadMarkets();
|
|
422
422
|
const market = this.market(symbol);
|
package/dist/cjs/src/zonda.js
CHANGED
|
@@ -530,7 +530,7 @@ class zonda extends zonda$1 {
|
|
|
530
530
|
* @see https://docs.zonda.exchange/reference/list-of-wallets
|
|
531
531
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
532
532
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
533
|
-
* @returns {object} a [balance structure]{@link https://
|
|
533
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
534
534
|
*/
|
|
535
535
|
await this.loadMarkets();
|
|
536
536
|
const response = await this.v1_01PrivateGetBalancesBITBAYBalance(params);
|
|
@@ -1305,7 +1305,7 @@ class zonda extends zonda$1 {
|
|
|
1305
1305
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1306
1306
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1307
1307
|
* @param {object} [params] extra parameters specific to the zonda api endpoint
|
|
1308
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1308
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
1309
1309
|
*/
|
|
1310
1310
|
await this.loadMarkets();
|
|
1311
1311
|
const market = this.market(symbol);
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.0.
|
|
7
|
+
declare const version = "4.0.76";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.0.
|
|
41
|
+
const version = '4.0.77';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -9,9 +9,11 @@ interface Exchange {
|
|
|
9
9
|
spotV1PrivateGetTradeOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
10
10
|
spotV1PrivateGetTradeHistoryOrders(params?: {}): Promise<implicitReturnType>;
|
|
11
11
|
spotV1PrivateGetAccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
12
|
+
spotV1PrivateGetTicker24hr(params?: {}): Promise<implicitReturnType>;
|
|
12
13
|
spotV1PrivatePostTradeOrder(params?: {}): Promise<implicitReturnType>;
|
|
13
14
|
spotV1PrivatePostTradeCancel(params?: {}): Promise<implicitReturnType>;
|
|
14
15
|
spotV1PrivatePostTradeBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
16
|
+
spotV1PrivatePostTradeCancelOrders(params?: {}): Promise<implicitReturnType>;
|
|
15
17
|
spotV3PrivateGetGetAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
16
18
|
spotV3PrivateGetAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
17
19
|
spotV3PrivateGetCapitalDepositHisrec(params?: {}): Promise<implicitReturnType>;
|
|
@@ -42,6 +42,11 @@ interface Exchange {
|
|
|
42
42
|
privatePostOpenapiConvertV1GetSupportedTradingPairs(params?: {}): Promise<implicitReturnType>;
|
|
43
43
|
privatePostOpenapiConvertV1GetQuote(params?: {}): Promise<implicitReturnType>;
|
|
44
44
|
privatePostOpenapiConvertV1AccpetQuote(params?: {}): Promise<implicitReturnType>;
|
|
45
|
+
privatePostOpenapiFiatV1SupportChannel(params?: {}): Promise<implicitReturnType>;
|
|
46
|
+
privatePostOpenapiFiatV1CashOut(params?: {}): Promise<implicitReturnType>;
|
|
47
|
+
privatePostOpenapiFiatV1History(params?: {}): Promise<implicitReturnType>;
|
|
48
|
+
privatePostOpenapiMigrationV4Sellorder(params?: {}): Promise<implicitReturnType>;
|
|
49
|
+
privatePostOpenapiMigrationV4ValidateField(params?: {}): Promise<implicitReturnType>;
|
|
45
50
|
privatePostOpenapiTransferV3Transfers(params?: {}): Promise<implicitReturnType>;
|
|
46
51
|
privateDeleteOpenapiV1Order(params?: {}): Promise<implicitReturnType>;
|
|
47
52
|
privateDeleteOpenapiV1OpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -79,6 +79,19 @@ interface Exchange {
|
|
|
79
79
|
privateSubAccountsPostSubAccountsUserIdUnlock(params?: {}): Promise<implicitReturnType>;
|
|
80
80
|
privateSubAccountsPutSubAccountsUserIdKeysKey(params?: {}): Promise<implicitReturnType>;
|
|
81
81
|
privateSubAccountsDeleteSubAccountsUserIdKeysKey(params?: {}): Promise<implicitReturnType>;
|
|
82
|
+
privatePortfolioGetAccounts(params?: {}): Promise<implicitReturnType>;
|
|
83
|
+
privatePortfolioGetAccountMode(params?: {}): Promise<implicitReturnType>;
|
|
84
|
+
privatePortfolioGetBorrowable(params?: {}): Promise<implicitReturnType>;
|
|
85
|
+
privatePortfolioGetTransferable(params?: {}): Promise<implicitReturnType>;
|
|
86
|
+
privatePortfolioGetLoans(params?: {}): Promise<implicitReturnType>;
|
|
87
|
+
privatePortfolioGetLoanRecords(params?: {}): Promise<implicitReturnType>;
|
|
88
|
+
privatePortfolioGetInterestRecords(params?: {}): Promise<implicitReturnType>;
|
|
89
|
+
privatePortfolioGetSpotOrders(params?: {}): Promise<implicitReturnType>;
|
|
90
|
+
privatePortfolioGetSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
91
|
+
privatePortfolioPostLoans(params?: {}): Promise<implicitReturnType>;
|
|
92
|
+
privatePortfolioPostSpotOrders(params?: {}): Promise<implicitReturnType>;
|
|
93
|
+
privatePortfolioDeleteSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
94
|
+
privatePortfolioPatchSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
82
95
|
privateSpotGetFee(params?: {}): Promise<implicitReturnType>;
|
|
83
96
|
privateSpotGetBatchFee(params?: {}): Promise<implicitReturnType>;
|
|
84
97
|
privateSpotGetAccounts(params?: {}): Promise<implicitReturnType>;
|
|
@@ -212,11 +225,22 @@ interface Exchange {
|
|
|
212
225
|
privateEarnGetUniInterestRecords(params?: {}): Promise<implicitReturnType>;
|
|
213
226
|
privateEarnPostUniLends(params?: {}): Promise<implicitReturnType>;
|
|
214
227
|
privateEarnPatchUniLends(params?: {}): Promise<implicitReturnType>;
|
|
228
|
+
privateLoanGetCollateralOrders(params?: {}): Promise<implicitReturnType>;
|
|
229
|
+
privateLoanGetCollateralOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
230
|
+
privateLoanGetCollateralRepayRecords(params?: {}): Promise<implicitReturnType>;
|
|
231
|
+
privateLoanGetCollateralCollaterals(params?: {}): Promise<implicitReturnType>;
|
|
232
|
+
privateLoanGetCollateralTotalAmount(params?: {}): Promise<implicitReturnType>;
|
|
233
|
+
privateLoanGetCollateralLtv(params?: {}): Promise<implicitReturnType>;
|
|
234
|
+
privateLoanGetCollateralCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
235
|
+
privateLoanPostCollateralOrders(params?: {}): Promise<implicitReturnType>;
|
|
236
|
+
privateLoanPostCollateralRepay(params?: {}): Promise<implicitReturnType>;
|
|
237
|
+
privateLoanPostCollateralCollaterals(params?: {}): Promise<implicitReturnType>;
|
|
215
238
|
privateAccountGetDetail(params?: {}): Promise<implicitReturnType>;
|
|
216
239
|
privateAccountGetStpGroups(params?: {}): Promise<implicitReturnType>;
|
|
217
240
|
privateAccountGetStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
|
|
218
241
|
privateAccountPostStpGroups(params?: {}): Promise<implicitReturnType>;
|
|
219
242
|
privateAccountPostStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
|
|
243
|
+
privateAccountDeleteStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
|
|
220
244
|
privateRebateGetAgencyTransactionHistory(params?: {}): Promise<implicitReturnType>;
|
|
221
245
|
privateRebateGetAgencyCommissionHistory(params?: {}): Promise<implicitReturnType>;
|
|
222
246
|
}
|
|
@@ -79,6 +79,19 @@ interface gate {
|
|
|
79
79
|
privateSubAccountsPostSubAccountsUserIdUnlock(params?: {}): Promise<implicitReturnType>;
|
|
80
80
|
privateSubAccountsPutSubAccountsUserIdKeysKey(params?: {}): Promise<implicitReturnType>;
|
|
81
81
|
privateSubAccountsDeleteSubAccountsUserIdKeysKey(params?: {}): Promise<implicitReturnType>;
|
|
82
|
+
privatePortfolioGetAccounts(params?: {}): Promise<implicitReturnType>;
|
|
83
|
+
privatePortfolioGetAccountMode(params?: {}): Promise<implicitReturnType>;
|
|
84
|
+
privatePortfolioGetBorrowable(params?: {}): Promise<implicitReturnType>;
|
|
85
|
+
privatePortfolioGetTransferable(params?: {}): Promise<implicitReturnType>;
|
|
86
|
+
privatePortfolioGetLoans(params?: {}): Promise<implicitReturnType>;
|
|
87
|
+
privatePortfolioGetLoanRecords(params?: {}): Promise<implicitReturnType>;
|
|
88
|
+
privatePortfolioGetInterestRecords(params?: {}): Promise<implicitReturnType>;
|
|
89
|
+
privatePortfolioGetSpotOrders(params?: {}): Promise<implicitReturnType>;
|
|
90
|
+
privatePortfolioGetSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
91
|
+
privatePortfolioPostLoans(params?: {}): Promise<implicitReturnType>;
|
|
92
|
+
privatePortfolioPostSpotOrders(params?: {}): Promise<implicitReturnType>;
|
|
93
|
+
privatePortfolioDeleteSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
94
|
+
privatePortfolioPatchSpotOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
82
95
|
privateSpotGetFee(params?: {}): Promise<implicitReturnType>;
|
|
83
96
|
privateSpotGetBatchFee(params?: {}): Promise<implicitReturnType>;
|
|
84
97
|
privateSpotGetAccounts(params?: {}): Promise<implicitReturnType>;
|
|
@@ -212,11 +225,22 @@ interface gate {
|
|
|
212
225
|
privateEarnGetUniInterestRecords(params?: {}): Promise<implicitReturnType>;
|
|
213
226
|
privateEarnPostUniLends(params?: {}): Promise<implicitReturnType>;
|
|
214
227
|
privateEarnPatchUniLends(params?: {}): Promise<implicitReturnType>;
|
|
228
|
+
privateLoanGetCollateralOrders(params?: {}): Promise<implicitReturnType>;
|
|
229
|
+
privateLoanGetCollateralOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
230
|
+
privateLoanGetCollateralRepayRecords(params?: {}): Promise<implicitReturnType>;
|
|
231
|
+
privateLoanGetCollateralCollaterals(params?: {}): Promise<implicitReturnType>;
|
|
232
|
+
privateLoanGetCollateralTotalAmount(params?: {}): Promise<implicitReturnType>;
|
|
233
|
+
privateLoanGetCollateralLtv(params?: {}): Promise<implicitReturnType>;
|
|
234
|
+
privateLoanGetCollateralCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
235
|
+
privateLoanPostCollateralOrders(params?: {}): Promise<implicitReturnType>;
|
|
236
|
+
privateLoanPostCollateralRepay(params?: {}): Promise<implicitReturnType>;
|
|
237
|
+
privateLoanPostCollateralCollaterals(params?: {}): Promise<implicitReturnType>;
|
|
215
238
|
privateAccountGetDetail(params?: {}): Promise<implicitReturnType>;
|
|
216
239
|
privateAccountGetStpGroups(params?: {}): Promise<implicitReturnType>;
|
|
217
240
|
privateAccountGetStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
|
|
218
241
|
privateAccountPostStpGroups(params?: {}): Promise<implicitReturnType>;
|
|
219
242
|
privateAccountPostStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
|
|
243
|
+
privateAccountDeleteStpGroupsStpIdUsers(params?: {}): Promise<implicitReturnType>;
|
|
220
244
|
privateRebateGetAgencyTransactionHistory(params?: {}): Promise<implicitReturnType>;
|
|
221
245
|
privateRebateGetAgencyCommissionHistory(params?: {}): Promise<implicitReturnType>;
|
|
222
246
|
}
|
package/js/src/ace.js
CHANGED
|
@@ -896,7 +896,7 @@ export default class ace extends Exchange {
|
|
|
896
896
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
897
897
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
898
898
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
899
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
899
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
900
900
|
*/
|
|
901
901
|
await this.loadMarkets();
|
|
902
902
|
const market = this.safeMarket(symbol);
|
|
@@ -981,7 +981,7 @@ export default class ace extends Exchange {
|
|
|
981
981
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
982
982
|
* @see https://github.com/ace-exchange/ace-official-api-docs/blob/master/api_v2.md#open-api---account-balance
|
|
983
983
|
* @param {object} [params] extra parameters specific to the ace api endpoint
|
|
984
|
-
* @returns {object} a [balance structure]{@link https://
|
|
984
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
985
985
|
*/
|
|
986
986
|
await this.loadMarkets();
|
|
987
987
|
const response = await this.privatePostV2CoinCustomerAccount(params);
|
package/js/src/alpaca.js
CHANGED
|
@@ -323,7 +323,7 @@ export default class alpaca extends Exchange {
|
|
|
323
323
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
324
324
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
325
325
|
* @param {object} [params] extra parameters specific to the alpaca api endpoint
|
|
326
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
326
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
327
327
|
*/
|
|
328
328
|
await this.loadMarkets();
|
|
329
329
|
const market = this.market(symbol);
|
package/js/src/ascendex.js
CHANGED
|
@@ -802,7 +802,7 @@ export default class ascendex extends Exchange {
|
|
|
802
802
|
* @name ascendex#fetchBalance
|
|
803
803
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
804
804
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
805
|
-
* @returns {object} a [balance structure]{@link https://
|
|
805
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
806
806
|
*/
|
|
807
807
|
await this.loadMarkets();
|
|
808
808
|
await this.loadAccounts();
|
|
@@ -1192,7 +1192,7 @@ export default class ascendex extends Exchange {
|
|
|
1192
1192
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1193
1193
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1194
1194
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
1195
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1195
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
1196
1196
|
*/
|
|
1197
1197
|
await this.loadMarkets();
|
|
1198
1198
|
const market = this.market(symbol);
|
|
@@ -2970,7 +2970,7 @@ export default class ascendex extends Exchange {
|
|
|
2970
2970
|
* @see https://ascendex.github.io/ascendex-pro-api/#list-all-assets
|
|
2971
2971
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2972
2972
|
* @param {object} [params] extra parameters specific to the ascendex api endpoint
|
|
2973
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
2973
|
+
* @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
2974
2974
|
*/
|
|
2975
2975
|
await this.loadMarkets();
|
|
2976
2976
|
const response = await this.v2PublicGetAssets(params);
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -3217,7 +3217,7 @@ export default class Exchange {
|
|
|
3217
3217
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
3218
3218
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
3219
3219
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
3220
|
-
* @returns {object} a list of [transaction structures]{@link https://
|
|
3220
|
+
* @returns {object} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
3221
3221
|
*/
|
|
3222
3222
|
throw new NotSupported(this.id + ' fetchDepositsWithdrawals() is not supported yet');
|
|
3223
3223
|
}
|
|
@@ -3985,7 +3985,7 @@ export default class Exchange {
|
|
|
3985
3985
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
3986
3986
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
3987
3987
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
3988
|
-
* @returns {object} a list of [transaction structures]{@link https://
|
|
3988
|
+
* @returns {object} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
3989
3989
|
*/
|
|
3990
3990
|
if (this.has['fetchDepositsWithdrawals']) {
|
|
3991
3991
|
return await this.fetchDepositsWithdrawals(code, since, limit, params);
|
package/js/src/bigone.js
CHANGED
|
@@ -935,7 +935,7 @@ export default class bigone extends Exchange {
|
|
|
935
935
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
936
936
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
937
937
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
938
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
938
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
939
939
|
*/
|
|
940
940
|
await this.loadMarkets();
|
|
941
941
|
const market = this.market(symbol);
|
|
@@ -1066,7 +1066,7 @@ export default class bigone extends Exchange {
|
|
|
1066
1066
|
* @name bigone#fetchBalance
|
|
1067
1067
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1068
1068
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1069
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1069
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1070
1070
|
*/
|
|
1071
1071
|
await this.loadMarkets();
|
|
1072
1072
|
const type = this.safeString(params, 'type', '');
|
package/js/src/binance.js
CHANGED
|
@@ -2503,7 +2503,7 @@ export default class binance extends Exchange {
|
|
|
2503
2503
|
* @param {string} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
|
|
2504
2504
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
|
|
2505
2505
|
* @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
|
|
2506
|
-
* @returns {object} a [balance structure]{@link https://
|
|
2506
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
2507
2507
|
*/
|
|
2508
2508
|
await this.loadMarkets();
|
|
2509
2509
|
const defaultType = this.safeString2(this.options, 'fetchBalance', 'defaultType', 'spot');
|
|
@@ -3609,7 +3609,7 @@ export default class binance extends Exchange {
|
|
|
3609
3609
|
*
|
|
3610
3610
|
* EXCHANGE SPECIFIC PARAMETERS
|
|
3611
3611
|
* @param {int} [params.fromId] trade id to fetch from, default gets most recent trades, not used when fetchTradesMethod is 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', or 'eapiPublicGetTrades'
|
|
3612
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
3612
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
3613
3613
|
*/
|
|
3614
3614
|
await this.loadMarkets();
|
|
3615
3615
|
const market = this.market(symbol);
|
|
@@ -6519,10 +6519,10 @@ export default class binance extends Exchange {
|
|
|
6519
6519
|
* @description fetches historical funding rate prices
|
|
6520
6520
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
6521
6521
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
6522
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://
|
|
6522
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
6523
6523
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
6524
6524
|
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
6525
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://
|
|
6525
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
6526
6526
|
*/
|
|
6527
6527
|
await this.loadMarkets();
|
|
6528
6528
|
const request = {};
|
|
@@ -7223,7 +7223,7 @@ export default class binance extends Exchange {
|
|
|
7223
7223
|
* @description fetch data on an open position
|
|
7224
7224
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
7225
7225
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
7226
|
-
* @returns {object} a [position structure]{@link https://
|
|
7226
|
+
* @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
7227
7227
|
*/
|
|
7228
7228
|
await this.loadMarkets();
|
|
7229
7229
|
const market = this.market(symbol);
|
package/js/src/bingx.d.ts
CHANGED
|
@@ -205,6 +205,7 @@ export default class bingx extends Exchange {
|
|
|
205
205
|
};
|
|
206
206
|
fetchDepositWithdrawFees(codes?: string[], params?: {}): Promise<any>;
|
|
207
207
|
withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<void>;
|
|
208
|
+
parseParams(params: any): string;
|
|
208
209
|
sign(path: any, section?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
209
210
|
url: any;
|
|
210
211
|
method: string;
|
package/js/src/bingx.js
CHANGED
|
@@ -101,11 +101,13 @@ export default class bingx extends Exchange {
|
|
|
101
101
|
'trade/openOrders': 3,
|
|
102
102
|
'trade/historyOrders': 3,
|
|
103
103
|
'account/balance': 3,
|
|
104
|
+
'ticker/24hr': 1,
|
|
104
105
|
},
|
|
105
106
|
'post': {
|
|
106
107
|
'trade/order': 3,
|
|
107
108
|
'trade/cancel': 3,
|
|
108
109
|
'trade/batchOrders': 3,
|
|
110
|
+
'trade/cancelOrders': 3,
|
|
109
111
|
},
|
|
110
112
|
},
|
|
111
113
|
},
|
|
@@ -685,7 +687,7 @@ export default class bingx extends Exchange {
|
|
|
685
687
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
686
688
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
687
689
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
688
|
-
* @returns {[object]} a list of [trade structures]{@link https://
|
|
690
|
+
* @returns {[object]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
689
691
|
*/
|
|
690
692
|
await this.loadMarkets();
|
|
691
693
|
const market = this.market(symbol);
|
|
@@ -980,9 +982,9 @@ export default class bingx extends Exchange {
|
|
|
980
982
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Funding%20Rate%20History
|
|
981
983
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
982
984
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
983
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://
|
|
985
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
984
986
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
985
|
-
* @returns {[object]} a list of [funding rate structures]{@link https://
|
|
987
|
+
* @returns {[object]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
986
988
|
*/
|
|
987
989
|
this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
|
|
988
990
|
await this.loadMarkets();
|
|
@@ -1086,19 +1088,23 @@ export default class bingx extends Exchange {
|
|
|
1086
1088
|
* @name bingx#fetchTicker
|
|
1087
1089
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1088
1090
|
* @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Ticker
|
|
1091
|
+
* @see https://bingx-api.github.io/docs/#/spot/market-api.html#24%E5%B0%8F%E6%97%B6%E4%BB%B7%E6%A0%BC%E5%8F%98%E5%8A%A8%E6%83%85%E5%86%B5
|
|
1089
1092
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1090
1093
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
1091
1094
|
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1092
1095
|
*/
|
|
1093
1096
|
await this.loadMarkets();
|
|
1094
1097
|
const market = this.market(symbol);
|
|
1095
|
-
if (!market['swap']) {
|
|
1096
|
-
throw new BadRequest(this.id + ' fetchTicker is only supported for swap markets.');
|
|
1097
|
-
}
|
|
1098
1098
|
const request = {
|
|
1099
1099
|
'symbol': market['id'],
|
|
1100
1100
|
};
|
|
1101
|
-
|
|
1101
|
+
let response = undefined;
|
|
1102
|
+
if (market['spot']) {
|
|
1103
|
+
response = await this.spotV1PrivateGetTicker24hr(this.extend(request, params));
|
|
1104
|
+
}
|
|
1105
|
+
else {
|
|
1106
|
+
response = await this.swapV2PublicGetQuoteTicker(this.extend(request, params));
|
|
1107
|
+
}
|
|
1102
1108
|
//
|
|
1103
1109
|
// {
|
|
1104
1110
|
// "code": 0,
|
|
@@ -1120,7 +1126,8 @@ export default class bingx extends Exchange {
|
|
|
1120
1126
|
// }
|
|
1121
1127
|
//
|
|
1122
1128
|
const data = this.safeValue(response, 'data');
|
|
1123
|
-
|
|
1129
|
+
const ticker = this.safeValue(data, 0, data);
|
|
1130
|
+
return this.parseTicker(ticker, market);
|
|
1124
1131
|
}
|
|
1125
1132
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1126
1133
|
/**
|
|
@@ -1168,6 +1175,20 @@ export default class bingx extends Exchange {
|
|
|
1168
1175
|
return this.parseTickers(tickers, symbols);
|
|
1169
1176
|
}
|
|
1170
1177
|
parseTicker(ticker, market = undefined) {
|
|
1178
|
+
//
|
|
1179
|
+
// spot
|
|
1180
|
+
// {
|
|
1181
|
+
// symbol: 'BTC-USDT',
|
|
1182
|
+
// openPrice: '26032.08',
|
|
1183
|
+
// highPrice: '26178.86',
|
|
1184
|
+
// lowPrice: '25968.18',
|
|
1185
|
+
// lastPrice: '26113.60',
|
|
1186
|
+
// volume: '1161.79',
|
|
1187
|
+
// quoteVolume: '30288466.44',
|
|
1188
|
+
// openTime: '1693081020762',
|
|
1189
|
+
// closeTime: '1693167420762'
|
|
1190
|
+
// }
|
|
1191
|
+
// swap
|
|
1171
1192
|
//
|
|
1172
1193
|
// {
|
|
1173
1194
|
// "symbol": "BTC-USDT",
|
|
@@ -1185,20 +1206,22 @@ export default class bingx extends Exchange {
|
|
|
1185
1206
|
// }
|
|
1186
1207
|
//
|
|
1187
1208
|
const marketId = this.safeString(ticker, 'symbol');
|
|
1188
|
-
const
|
|
1189
|
-
const
|
|
1209
|
+
const change = this.safeString(ticker, 'priceChange');
|
|
1210
|
+
const type = (change === undefined) ? 'spot' : 'swap';
|
|
1211
|
+
const symbol = this.safeSymbol(marketId, market, undefined, type);
|
|
1190
1212
|
const open = this.safeString(ticker, 'openPrice');
|
|
1191
1213
|
const high = this.safeString(ticker, 'highPrice');
|
|
1192
1214
|
const low = this.safeString(ticker, 'lowPrice');
|
|
1193
1215
|
const close = this.safeString(ticker, 'lastPrice');
|
|
1194
1216
|
const quoteVolume = this.safeString(ticker, 'quoteVolume');
|
|
1195
1217
|
const baseVolume = this.safeString(ticker, 'volume');
|
|
1196
|
-
const change = this.safeString(ticker, 'chapriceChangenge');
|
|
1197
1218
|
const percentage = this.safeString(ticker, 'priceChangePercent');
|
|
1219
|
+
const ts = this.safeInteger(ticker, 'closeTime');
|
|
1220
|
+
const datetime = this.iso8601(ts);
|
|
1198
1221
|
return this.safeTicker({
|
|
1199
1222
|
'symbol': symbol,
|
|
1200
|
-
'timestamp':
|
|
1201
|
-
'datetime':
|
|
1223
|
+
'timestamp': ts,
|
|
1224
|
+
'datetime': datetime,
|
|
1202
1225
|
'high': high,
|
|
1203
1226
|
'low': low,
|
|
1204
1227
|
'bid': undefined,
|
|
@@ -1228,7 +1251,7 @@ export default class bingx extends Exchange {
|
|
|
1228
1251
|
* @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Query%20standard%20contract%20balance
|
|
1229
1252
|
* @param {object} [params] extra parameters specific to the cryptocom api endpoint
|
|
1230
1253
|
* @param {boolean} [params.standard] whether to fetch standard contract balances
|
|
1231
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1254
|
+
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
1232
1255
|
*/
|
|
1233
1256
|
await this.loadMarkets();
|
|
1234
1257
|
let response = undefined;
|
|
@@ -1878,6 +1901,7 @@ export default class bingx extends Exchange {
|
|
|
1878
1901
|
* @name bingx#cancelOrders
|
|
1879
1902
|
* @description cancel multiple orders
|
|
1880
1903
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20a%20Batch%20of%20Orders
|
|
1904
|
+
* @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Cancel%20a%20Batch%20of%20Orders
|
|
1881
1905
|
* @param {[string]} ids order ids
|
|
1882
1906
|
* @param {string} symbol unified market symbol, default is undefined
|
|
1883
1907
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
@@ -1886,14 +1910,24 @@ export default class bingx extends Exchange {
|
|
|
1886
1910
|
this.checkRequiredSymbol('cancelOrders', symbol);
|
|
1887
1911
|
await this.loadMarkets();
|
|
1888
1912
|
const market = this.market(symbol);
|
|
1889
|
-
if (market['type'] !== 'swap') {
|
|
1890
|
-
throw new BadRequest(this.id + ' cancelOrders is only supported for swap markets.');
|
|
1891
|
-
}
|
|
1892
1913
|
const request = {
|
|
1893
1914
|
'symbol': market['id'],
|
|
1894
|
-
'ids': ids,
|
|
1895
1915
|
};
|
|
1896
|
-
const
|
|
1916
|
+
const parsedIds = [];
|
|
1917
|
+
for (let i = 0; i < ids.length; i++) {
|
|
1918
|
+
const id = ids[i];
|
|
1919
|
+
const stringId = id.toString();
|
|
1920
|
+
parsedIds.push(stringId);
|
|
1921
|
+
}
|
|
1922
|
+
let response = undefined;
|
|
1923
|
+
if (market['spot']) {
|
|
1924
|
+
request['orderIds'] = parsedIds.join(',');
|
|
1925
|
+
response = await this.spotV1PrivatePostTradeCancelOrders(this.extend(request, params));
|
|
1926
|
+
}
|
|
1927
|
+
else {
|
|
1928
|
+
request['orderIdList'] = parsedIds;
|
|
1929
|
+
response = await this.swapV2PrivateDeleteTradeBatchOrders(this.extend(request, params));
|
|
1930
|
+
}
|
|
1897
1931
|
//
|
|
1898
1932
|
// {
|
|
1899
1933
|
// "code": 0,
|
|
@@ -2742,7 +2776,7 @@ export default class bingx extends Exchange {
|
|
|
2742
2776
|
* @see https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins'%20Information
|
|
2743
2777
|
* @param {[string]|undefined} codes list of unified currency codes
|
|
2744
2778
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
2745
|
-
* @returns {object} a list of [fee structures]{@link https://
|
|
2779
|
+
* @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
2746
2780
|
*/
|
|
2747
2781
|
await this.loadMarkets();
|
|
2748
2782
|
const response = await this.walletsV1PrivateGetCapitalConfigGetall(params);
|
|
@@ -2794,6 +2828,33 @@ export default class bingx extends Exchange {
|
|
|
2794
2828
|
// }
|
|
2795
2829
|
this.parseTransaction(data);
|
|
2796
2830
|
}
|
|
2831
|
+
parseParams(params) {
|
|
2832
|
+
let result = '';
|
|
2833
|
+
const sortedParams = this.keysort(params);
|
|
2834
|
+
const keys = Object.keys(sortedParams);
|
|
2835
|
+
for (let i = 0; i < keys.length; i++) {
|
|
2836
|
+
const key = keys[i];
|
|
2837
|
+
if (i > 0) {
|
|
2838
|
+
result += '&';
|
|
2839
|
+
}
|
|
2840
|
+
const value = sortedParams[key];
|
|
2841
|
+
if (Array.isArray(value)) {
|
|
2842
|
+
result += key + '=[';
|
|
2843
|
+
for (let j = 0; j < value.length; j++) {
|
|
2844
|
+
const arrayElement = value[j];
|
|
2845
|
+
if (j > 0) {
|
|
2846
|
+
result += ',';
|
|
2847
|
+
}
|
|
2848
|
+
result += arrayElement.toString();
|
|
2849
|
+
}
|
|
2850
|
+
result += ']';
|
|
2851
|
+
}
|
|
2852
|
+
else {
|
|
2853
|
+
result += key + '=' + value.toString();
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
return result;
|
|
2857
|
+
}
|
|
2797
2858
|
sign(path, section = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
2798
2859
|
const type = section[0];
|
|
2799
2860
|
const version = section[1];
|
|
@@ -2818,9 +2879,8 @@ export default class bingx extends Exchange {
|
|
|
2818
2879
|
else if (access === 'private') {
|
|
2819
2880
|
this.checkRequiredCredentials();
|
|
2820
2881
|
params['timestamp'] = this.nonce();
|
|
2821
|
-
let query = this.
|
|
2822
|
-
const
|
|
2823
|
-
const signature = this.hmac(this.encode(rawQuery), this.encode(this.secret), sha256);
|
|
2882
|
+
let query = this.parseParams(params);
|
|
2883
|
+
const signature = this.hmac(this.encode(query), this.encode(this.secret), sha256);
|
|
2824
2884
|
if (Object.keys(params).length) {
|
|
2825
2885
|
query = '?' + query + '&';
|
|
2826
2886
|
}
|