ccxt 4.3.54 → 4.3.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/alpaca.js +1 -1
- package/dist/cjs/src/ascendex.js +6 -4
- package/dist/cjs/src/base/Exchange.js +26 -2
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +13 -13
- package/dist/cjs/src/bingx.js +38 -4
- package/dist/cjs/src/bit2c.js +1 -1
- package/dist/cjs/src/bitbank.js +1 -1
- package/dist/cjs/src/bitbns.js +1 -1
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +1 -1
- package/dist/cjs/src/bitflyer.js +8 -2
- package/dist/cjs/src/bitget.js +2 -2
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/bitmart.js +3 -3
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/bitopro.js +21 -4
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitstamp.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bitvavo.js +2 -2
- package/dist/cjs/src/bl3p.js +1 -1
- package/dist/cjs/src/blockchaincom.js +28 -28
- package/dist/cjs/src/blofin.js +1 -1
- package/dist/cjs/src/btcalpha.js +4 -12
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/btcmarkets.js +27 -28
- package/dist/cjs/src/btcturk.js +1 -1
- package/dist/cjs/src/bybit.js +11 -7
- package/dist/cjs/src/cex.js +2 -2
- package/dist/cjs/src/coinbase.js +33 -33
- package/dist/cjs/src/coinbaseexchange.js +1 -1
- package/dist/cjs/src/coinbaseinternational.js +1 -1
- package/dist/cjs/src/coincheck.js +1 -1
- package/dist/cjs/src/coinex.js +2 -2
- package/dist/cjs/src/coinlist.js +2 -2
- package/dist/cjs/src/coinmate.js +1 -1
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinone.js +1 -1
- package/dist/cjs/src/coinsph.js +1 -1
- package/dist/cjs/src/coinspot.js +1 -1
- package/dist/cjs/src/cryptocom.js +1 -1
- package/dist/cjs/src/currencycom.js +1 -1
- package/dist/cjs/src/delta.js +7 -3
- package/dist/cjs/src/deribit.js +4 -4
- package/dist/cjs/src/digifinex.js +2 -2
- package/dist/cjs/src/exmo.js +2 -2
- package/dist/cjs/src/gate.js +3 -2
- package/dist/cjs/src/gemini.js +1 -1
- package/dist/cjs/src/hitbtc.js +1 -1
- package/dist/cjs/src/hollaex.js +1 -1
- package/dist/cjs/src/htx.js +3 -3
- package/dist/cjs/src/huobijp.js +1 -1
- package/dist/cjs/src/hyperliquid.js +3 -3
- package/dist/cjs/src/idex.js +1 -1
- package/dist/cjs/src/independentreserve.js +1 -1
- package/dist/cjs/src/indodax.js +1 -1
- package/dist/cjs/src/kraken.js +2 -2
- package/dist/cjs/src/kucoin.js +136 -47
- package/dist/cjs/src/kucoinfutures.js +1 -1
- package/dist/cjs/src/kuna.js +1 -1
- package/dist/cjs/src/latoken.js +1 -1
- package/dist/cjs/src/lbank.js +28 -7
- package/dist/cjs/src/luno.js +1 -1
- package/dist/cjs/src/lykke.js +1 -1
- package/dist/cjs/src/mercado.js +1 -1
- package/dist/cjs/src/mexc.js +1 -1
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/novadax.js +1 -1
- package/dist/cjs/src/oceanex.js +1 -1
- package/dist/cjs/src/okcoin.js +1 -1
- package/dist/cjs/src/okx.js +3 -3
- package/dist/cjs/src/onetrading.js +1 -1
- package/dist/cjs/src/oxfun.js +2 -2
- package/dist/cjs/src/p2b.js +1 -1
- package/dist/cjs/src/paymium.js +1 -1
- package/dist/cjs/src/phemex.js +2 -2
- package/dist/cjs/src/poloniex.js +4 -3
- package/dist/cjs/src/poloniexfutures.js +1 -1
- package/dist/cjs/src/pro/binance.js +2 -2
- package/dist/cjs/src/pro/bitvavo.js +2 -2
- package/dist/cjs/src/pro/bybit.js +2 -2
- package/dist/cjs/src/pro/cex.js +3 -3
- package/dist/cjs/src/pro/coinbase.js +23 -1
- package/dist/cjs/src/pro/cryptocom.js +1 -1
- package/dist/cjs/src/pro/gate.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/pro/kraken.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +2 -2
- package/dist/cjs/src/pro/okx.js +2 -2
- package/dist/cjs/src/pro/oxfun.js +2 -2
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/vertex.js +1 -1
- package/dist/cjs/src/probit.js +1 -1
- package/dist/cjs/src/timex.js +1 -1
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/tradeogre.js +1 -1
- package/dist/cjs/src/upbit.js +1 -1
- package/dist/cjs/src/vertex.js +2 -2
- package/dist/cjs/src/wavesexchange.js +1 -1
- package/dist/cjs/src/wazirx.js +1 -1
- package/dist/cjs/src/whitebit.js +2 -2
- package/dist/cjs/src/woo.js +5 -5
- package/dist/cjs/src/woofipro.js +3 -3
- package/dist/cjs/src/yobit.js +1 -1
- package/dist/cjs/src/zaif.js +1 -1
- package/dist/cjs/src/zonda.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +16 -0
- package/js/src/abstract/kucoin.d.ts +3 -0
- package/js/src/abstract/kucoinfutures.d.ts +3 -0
- package/js/src/ace.js +1 -1
- package/js/src/alpaca.js +1 -1
- package/js/src/ascendex.d.ts +1 -1
- package/js/src/ascendex.js +6 -4
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +26 -2
- package/js/src/base/types.d.ts +4 -0
- package/js/src/bigone.js +1 -1
- package/js/src/binance.js +13 -13
- package/js/src/bingx.js +38 -4
- package/js/src/bit2c.js +1 -1
- package/js/src/bitbank.js +1 -1
- package/js/src/bitbns.js +1 -1
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.js +1 -1
- package/js/src/bitflyer.d.ts +1 -1
- package/js/src/bitflyer.js +8 -2
- package/js/src/bitget.js +2 -2
- package/js/src/bithumb.js +1 -1
- package/js/src/bitmart.js +3 -3
- package/js/src/bitmex.js +1 -1
- package/js/src/bitopro.d.ts +3 -2
- package/js/src/bitopro.js +21 -4
- package/js/src/bitrue.js +1 -1
- package/js/src/bitso.js +1 -1
- package/js/src/bitstamp.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/bitvavo.js +2 -2
- package/js/src/bl3p.js +1 -1
- package/js/src/blockchaincom.js +28 -28
- package/js/src/blofin.js +1 -1
- package/js/src/btcalpha.js +5 -13
- package/js/src/btcbox.js +1 -1
- package/js/src/btcmarkets.js +28 -29
- package/js/src/btcturk.js +1 -1
- package/js/src/bybit.js +11 -7
- package/js/src/cex.js +2 -2
- package/js/src/coinbase.js +33 -33
- package/js/src/coinbaseexchange.js +1 -1
- package/js/src/coinbaseinternational.js +1 -1
- package/js/src/coincheck.js +1 -1
- package/js/src/coinex.js +2 -2
- package/js/src/coinlist.js +2 -2
- package/js/src/coinmate.js +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinone.js +1 -1
- package/js/src/coinsph.js +1 -1
- package/js/src/coinspot.js +1 -1
- package/js/src/cryptocom.js +1 -1
- package/js/src/currencycom.js +1 -1
- package/js/src/delta.d.ts +1 -1
- package/js/src/delta.js +7 -3
- package/js/src/deribit.js +4 -4
- package/js/src/digifinex.js +2 -2
- package/js/src/exmo.js +2 -2
- package/js/src/gate.js +3 -2
- package/js/src/gemini.js +1 -1
- package/js/src/hitbtc.js +1 -1
- package/js/src/hollaex.js +1 -1
- package/js/src/htx.js +3 -3
- package/js/src/huobijp.js +1 -1
- package/js/src/hyperliquid.js +3 -3
- package/js/src/idex.js +1 -1
- package/js/src/independentreserve.js +1 -1
- package/js/src/indodax.js +1 -1
- package/js/src/kraken.js +2 -2
- package/js/src/kucoin.d.ts +1 -0
- package/js/src/kucoin.js +136 -47
- package/js/src/kucoinfutures.js +1 -1
- package/js/src/kuna.js +1 -1
- package/js/src/latoken.js +1 -1
- package/js/src/lbank.d.ts +2 -2
- package/js/src/lbank.js +28 -7
- package/js/src/luno.js +1 -1
- package/js/src/lykke.js +1 -1
- package/js/src/mercado.js +1 -1
- package/js/src/mexc.js +1 -1
- package/js/src/ndax.js +1 -1
- package/js/src/novadax.js +1 -1
- package/js/src/oceanex.js +1 -1
- package/js/src/okcoin.js +1 -1
- package/js/src/okx.js +3 -3
- package/js/src/onetrading.js +1 -1
- package/js/src/oxfun.js +2 -2
- package/js/src/p2b.js +1 -1
- package/js/src/paymium.js +1 -1
- package/js/src/phemex.js +2 -2
- package/js/src/poloniex.js +4 -3
- package/js/src/poloniexfutures.js +1 -1
- package/js/src/pro/binance.js +2 -2
- package/js/src/pro/bitvavo.js +2 -2
- package/js/src/pro/bybit.js +2 -2
- package/js/src/pro/cex.js +3 -3
- package/js/src/pro/coinbase.d.ts +1 -0
- package/js/src/pro/coinbase.js +23 -1
- package/js/src/pro/cryptocom.js +1 -1
- package/js/src/pro/gate.js +2 -2
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/kraken.js +2 -2
- package/js/src/pro/kucoin.js +2 -2
- package/js/src/pro/okx.js +2 -2
- package/js/src/pro/oxfun.js +2 -2
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/vertex.js +1 -1
- package/js/src/probit.js +1 -1
- package/js/src/timex.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/tradeogre.js +1 -1
- package/js/src/upbit.js +1 -1
- package/js/src/vertex.js +2 -2
- package/js/src/wavesexchange.js +1 -1
- package/js/src/wazirx.js +1 -1
- package/js/src/whitebit.js +2 -2
- package/js/src/woo.js +5 -5
- package/js/src/woofipro.js +3 -3
- package/js/src/yobit.js +1 -1
- package/js/src/zaif.js +1 -1
- package/js/src/zonda.js +1 -1
- package/package.json +58 -52
package/dist/cjs/ccxt.js
CHANGED
|
@@ -190,7 +190,7 @@ var woofipro$1 = require('./src/pro/woofipro.js');
|
|
|
190
190
|
|
|
191
191
|
//-----------------------------------------------------------------------------
|
|
192
192
|
// this is updated by vss.js when building
|
|
193
|
-
const version = '4.3.
|
|
193
|
+
const version = '4.3.56';
|
|
194
194
|
Exchange["default"].ccxtVersion = version;
|
|
195
195
|
const exchanges = {
|
|
196
196
|
'ace': ace,
|
package/dist/cjs/src/ace.js
CHANGED
|
@@ -598,7 +598,7 @@ class ace extends ace$1 {
|
|
|
598
598
|
* @param {string} type 'market' or 'limit'
|
|
599
599
|
* @param {string} side 'buy' or 'sell'
|
|
600
600
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
601
|
-
* @param {float} [price] the price at which the order is to be
|
|
601
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
602
602
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
603
603
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
604
604
|
*/
|
package/dist/cjs/src/alpaca.js
CHANGED
|
@@ -691,7 +691,7 @@ class alpaca extends alpaca$1 {
|
|
|
691
691
|
* @param {string} type 'market', 'limit' or 'stop_limit'
|
|
692
692
|
* @param {string} side 'buy' or 'sell'
|
|
693
693
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
694
|
-
* @param {float} [price] the price at which the order is to be
|
|
694
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
695
695
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
696
696
|
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
697
697
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/dist/cjs/src/ascendex.js
CHANGED
|
@@ -1500,7 +1500,7 @@ class ascendex extends ascendex$1 {
|
|
|
1500
1500
|
* @param {string} type 'market' or 'limit'
|
|
1501
1501
|
* @param {string} side 'buy' or 'sell'
|
|
1502
1502
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1503
|
-
* @param {float} [price] the price at which the order is to be
|
|
1503
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1504
1504
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1505
1505
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1506
1506
|
* @param {bool} [params.postOnly] true or false
|
|
@@ -1589,7 +1589,7 @@ class ascendex extends ascendex$1 {
|
|
|
1589
1589
|
* @param {string} type "limit" or "market"
|
|
1590
1590
|
* @param {string} side "buy" or "sell"
|
|
1591
1591
|
* @param {float} amount the amount of currency to trade
|
|
1592
|
-
* @param {float} [price]
|
|
1592
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1593
1593
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1594
1594
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1595
1595
|
* @param {bool} [params.postOnly] true or false
|
|
@@ -2305,7 +2305,7 @@ class ascendex extends ascendex$1 {
|
|
|
2305
2305
|
* @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-all-open-orders
|
|
2306
2306
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2307
2307
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2308
|
-
* @returns {object[]} a list
|
|
2308
|
+
* @returns {object[]} a list with a single [order structure]{@link https://docs.ccxt.com/#/?id=order-structure} with the response assigned to the info property
|
|
2309
2309
|
*/
|
|
2310
2310
|
await this.loadMarkets();
|
|
2311
2311
|
await this.loadAccounts();
|
|
@@ -2371,7 +2371,9 @@ class ascendex extends ascendex$1 {
|
|
|
2371
2371
|
// }
|
|
2372
2372
|
// }
|
|
2373
2373
|
//
|
|
2374
|
-
return
|
|
2374
|
+
return this.safeOrder({
|
|
2375
|
+
'info': response,
|
|
2376
|
+
});
|
|
2375
2377
|
}
|
|
2376
2378
|
parseDepositAddress(depositAddress, currency = undefined) {
|
|
2377
2379
|
//
|
|
@@ -44,7 +44,7 @@ function _interopNamespace(e) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// ----------------------------------------------------------------------------
|
|
47
|
-
const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
|
|
47
|
+
const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS, sleep } = functions;
|
|
48
48
|
// ----------------------------------------------------------------------------
|
|
49
49
|
/**
|
|
50
50
|
* @class Exchange
|
|
@@ -52,6 +52,7 @@ const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sor
|
|
|
52
52
|
class Exchange {
|
|
53
53
|
constructor(userConfig = {}) {
|
|
54
54
|
this.throttleProp = undefined;
|
|
55
|
+
this.sleep = sleep;
|
|
55
56
|
this.api = undefined;
|
|
56
57
|
this.userAgent = undefined;
|
|
57
58
|
this.user_agent = undefined;
|
|
@@ -3805,7 +3806,30 @@ class Exchange {
|
|
|
3805
3806
|
this.last_request_headers = request['headers'];
|
|
3806
3807
|
this.last_request_body = request['body'];
|
|
3807
3808
|
this.last_request_url = request['url'];
|
|
3808
|
-
|
|
3809
|
+
let retries = undefined;
|
|
3810
|
+
[retries, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailure', 0);
|
|
3811
|
+
let retryDelay = undefined;
|
|
3812
|
+
[retryDelay, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailureDelay', 0);
|
|
3813
|
+
for (let i = 0; i < retries + 1; i++) {
|
|
3814
|
+
try {
|
|
3815
|
+
return await this.fetch(request['url'], request['method'], request['headers'], request['body']);
|
|
3816
|
+
}
|
|
3817
|
+
catch (e) {
|
|
3818
|
+
if (e instanceof errors.NetworkError) {
|
|
3819
|
+
if (i < retries) {
|
|
3820
|
+
if (this.verbose) {
|
|
3821
|
+
this.log('Request failed with the error: ' + e.toString() + ', retrying ' + (i + 1).toString() + ' of ' + retries.toString() + '...');
|
|
3822
|
+
}
|
|
3823
|
+
if ((retryDelay !== undefined) && (retryDelay !== 0)) {
|
|
3824
|
+
await this.sleep(retryDelay);
|
|
3825
|
+
}
|
|
3826
|
+
continue;
|
|
3827
|
+
}
|
|
3828
|
+
}
|
|
3829
|
+
throw e;
|
|
3830
|
+
}
|
|
3831
|
+
}
|
|
3832
|
+
return undefined; // this line is never reached, but exists for c# value return requirement
|
|
3809
3833
|
}
|
|
3810
3834
|
async request(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined, config = {}) {
|
|
3811
3835
|
return await this.fetch2(path, api, method, params, headers, body, config);
|
package/dist/cjs/src/bigone.js
CHANGED
|
@@ -1460,7 +1460,7 @@ class bigone extends bigone$1 {
|
|
|
1460
1460
|
* @param {string} type 'market' or 'limit'
|
|
1461
1461
|
* @param {string} side 'buy' or 'sell'
|
|
1462
1462
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1463
|
-
* @param {float} [price] the price at which the order is to be
|
|
1463
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1464
1464
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1465
1465
|
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1466
1466
|
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -1543,7 +1543,7 @@ class binance extends binance$1 {
|
|
|
1543
1543
|
'-3042': errors.BadRequest,
|
|
1544
1544
|
'-3043': errors.PermissionDenied,
|
|
1545
1545
|
'-3044': errors.OperationFailed,
|
|
1546
|
-
'-3045': errors.
|
|
1546
|
+
'-3045': errors.OperationRejected,
|
|
1547
1547
|
'-3999': errors.PermissionDenied,
|
|
1548
1548
|
//
|
|
1549
1549
|
// 4xxx (different from contract markets)
|
|
@@ -1562,7 +1562,7 @@ class binance extends binance$1 {
|
|
|
1562
1562
|
'-4011': errors.BadRequest,
|
|
1563
1563
|
'-4012': errors.PermissionDenied,
|
|
1564
1564
|
'-4013': errors.AuthenticationError,
|
|
1565
|
-
'-4014': errors.
|
|
1565
|
+
'-4014': errors.OperationRejected,
|
|
1566
1566
|
'-4015': errors.PermissionDenied,
|
|
1567
1567
|
'-4016': errors.PermissionDenied,
|
|
1568
1568
|
'-4017': errors.PermissionDenied,
|
|
@@ -1571,7 +1571,7 @@ class binance extends binance$1 {
|
|
|
1571
1571
|
'-4020': errors.ExchangeError,
|
|
1572
1572
|
'-4021': errors.BadRequest,
|
|
1573
1573
|
'-4022': errors.BadRequest,
|
|
1574
|
-
'-4023': errors.
|
|
1574
|
+
'-4023': errors.OperationRejected,
|
|
1575
1575
|
'-4024': errors.InsufficientFunds,
|
|
1576
1576
|
'-4025': errors.InsufficientFunds,
|
|
1577
1577
|
'-4026': errors.InsufficientFunds,
|
|
@@ -1580,7 +1580,7 @@ class binance extends binance$1 {
|
|
|
1580
1580
|
'-4029': errors.BadRequest,
|
|
1581
1581
|
'-4030': errors.BadResponse,
|
|
1582
1582
|
'-4031': errors.OperationFailed,
|
|
1583
|
-
'-4032': errors.
|
|
1583
|
+
'-4032': errors.OperationRejected,
|
|
1584
1584
|
'-4033': errors.BadRequest,
|
|
1585
1585
|
'-4034': errors.OperationRejected,
|
|
1586
1586
|
'-4035': errors.PermissionDenied,
|
|
@@ -1703,7 +1703,7 @@ class binance extends binance$1 {
|
|
|
1703
1703
|
'-5003': errors.InsufficientFunds,
|
|
1704
1704
|
'-5004': errors.OperationRejected,
|
|
1705
1705
|
'-5005': errors.OperationRejected,
|
|
1706
|
-
'-5006': errors.
|
|
1706
|
+
'-5006': errors.OperationRejected,
|
|
1707
1707
|
'-5007': errors.BadRequest,
|
|
1708
1708
|
'-5008': errors.OperationRejected,
|
|
1709
1709
|
'-5009': errors.BadSymbol,
|
|
@@ -1721,8 +1721,8 @@ class binance extends binance$1 {
|
|
|
1721
1721
|
'-6004': errors.BadRequest,
|
|
1722
1722
|
'-6005': errors.BadRequest,
|
|
1723
1723
|
'-6006': errors.BadRequest,
|
|
1724
|
-
'-6007': errors.
|
|
1725
|
-
'-6008': errors.
|
|
1724
|
+
'-6007': errors.OperationRejected,
|
|
1725
|
+
'-6008': errors.OperationRejected,
|
|
1726
1726
|
'-6009': errors.RateLimitExceeded,
|
|
1727
1727
|
'-6011': errors.OperationRejected,
|
|
1728
1728
|
'-6012': errors.InsufficientFunds,
|
|
@@ -4746,7 +4746,7 @@ class binance extends binance$1 {
|
|
|
4746
4746
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
4747
4747
|
* @param {string} side 'buy' or 'sell'
|
|
4748
4748
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4749
|
-
* @param {float} [price] the price at which the order is to be
|
|
4749
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4750
4750
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4751
4751
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4752
4752
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -4811,7 +4811,7 @@ class binance extends binance$1 {
|
|
|
4811
4811
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
4812
4812
|
* @param {string} side 'buy' or 'sell'
|
|
4813
4813
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4814
|
-
* @param {float} [price] the price at which the order is to be
|
|
4814
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4815
4815
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
4816
4816
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
4817
4817
|
* @returns {object} request to be sent to the exchange
|
|
@@ -4970,7 +4970,7 @@ class binance extends binance$1 {
|
|
|
4970
4970
|
* @param {string} type 'market' or 'limit'
|
|
4971
4971
|
* @param {string} side 'buy' or 'sell'
|
|
4972
4972
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4973
|
-
* @param {float} [price] the price at which the order is to be
|
|
4973
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4974
4974
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4975
4975
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4976
4976
|
*/
|
|
@@ -5026,7 +5026,7 @@ class binance extends binance$1 {
|
|
|
5026
5026
|
* @param {string} type 'market' or 'limit'
|
|
5027
5027
|
* @param {string} side 'buy' or 'sell'
|
|
5028
5028
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
5029
|
-
* @param {float} [price] the price at which the order is to be
|
|
5029
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
5030
5030
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5031
5031
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5032
5032
|
*/
|
|
@@ -5724,7 +5724,7 @@ class binance extends binance$1 {
|
|
|
5724
5724
|
* @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
|
|
5725
5725
|
* @param {string} side 'buy' or 'sell'
|
|
5726
5726
|
* @param {float} amount how much of you want to trade in units of the base currency
|
|
5727
|
-
* @param {float} [price] the price that the order is to be
|
|
5727
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
5728
5728
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5729
5729
|
* @param {string} [params.reduceOnly] for swap and future reduceOnly is a string 'true' or 'false' that cant be sent with close position set to true or in hedge mode. For spot margin and option reduceOnly is a boolean.
|
|
5730
5730
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
@@ -5827,7 +5827,7 @@ class binance extends binance$1 {
|
|
|
5827
5827
|
* @param {string} type 'market' or 'limit'
|
|
5828
5828
|
* @param {string} side 'buy' or 'sell'
|
|
5829
5829
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
5830
|
-
* @param {float} [price] the price that the order is to be
|
|
5830
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
5831
5831
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5832
5832
|
* @returns {object} request to be sent to the exchange
|
|
5833
5833
|
*/
|
package/dist/cjs/src/bingx.js
CHANGED
|
@@ -101,6 +101,7 @@ class bingx extends bingx$1 {
|
|
|
101
101
|
'subAccount': 'https://open-api.{hostname}/openApi',
|
|
102
102
|
'account': 'https://open-api.{hostname}/openApi',
|
|
103
103
|
'copyTrading': 'https://open-api.{hostname}/openApi',
|
|
104
|
+
'cswap': 'https://open-api.{hostname}/openApi',
|
|
104
105
|
},
|
|
105
106
|
'test': {
|
|
106
107
|
'swap': 'https://open-api-vst.{hostname}/openApi', // only swap is really "test" but since the API keys are the same, we want to keep all the functionalities when the user enables the sandboxmode
|
|
@@ -263,6 +264,36 @@ class bingx extends bingx$1 {
|
|
|
263
264
|
},
|
|
264
265
|
},
|
|
265
266
|
},
|
|
267
|
+
'cswap': {
|
|
268
|
+
'v1': {
|
|
269
|
+
'public': {
|
|
270
|
+
'get': {
|
|
271
|
+
'market/contracts': 1,
|
|
272
|
+
'market/premiumIndex': 1,
|
|
273
|
+
'market/openInterest': 1,
|
|
274
|
+
'market/klines': 1,
|
|
275
|
+
'market/depth': 1,
|
|
276
|
+
'market/ticker': 1,
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
'private': {
|
|
280
|
+
'get': {
|
|
281
|
+
'trade/leverage': 2,
|
|
282
|
+
'trade/forceOrders': 2,
|
|
283
|
+
'trade/allFillOrders': 2,
|
|
284
|
+
'user/commissionRate': 2,
|
|
285
|
+
'user/positions': 2,
|
|
286
|
+
'user/balance': 2,
|
|
287
|
+
},
|
|
288
|
+
'post': {
|
|
289
|
+
'trade/order': 2,
|
|
290
|
+
'trade/leverage': 2,
|
|
291
|
+
'trade/allOpenOrders': 2,
|
|
292
|
+
'trade/closeAllPositions': 2,
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
},
|
|
266
297
|
'contract': {
|
|
267
298
|
'v1': {
|
|
268
299
|
'private': {
|
|
@@ -1523,7 +1554,10 @@ class bingx extends bingx$1 {
|
|
|
1523
1554
|
percentage = percentage.replace('%', '');
|
|
1524
1555
|
}
|
|
1525
1556
|
const change = this.safeString(ticker, 'priceChange');
|
|
1526
|
-
|
|
1557
|
+
let ts = this.safeInteger(ticker, 'closeTime');
|
|
1558
|
+
if (ts === 0) {
|
|
1559
|
+
ts = undefined;
|
|
1560
|
+
}
|
|
1527
1561
|
const datetime = this.iso8601(ts);
|
|
1528
1562
|
const bid = this.safeString(ticker, 'bidPrice');
|
|
1529
1563
|
const bidVolume = this.safeString(ticker, 'bidQty');
|
|
@@ -1843,7 +1877,7 @@ class bingx extends bingx$1 {
|
|
|
1843
1877
|
* @param {string} type 'market' or 'limit'
|
|
1844
1878
|
* @param {string} side 'buy' or 'sell'
|
|
1845
1879
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1846
|
-
* @param {float} [price] the price at which the order is to be
|
|
1880
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1847
1881
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1848
1882
|
* @returns {object} request to be sent to the exchange
|
|
1849
1883
|
*/
|
|
@@ -2043,7 +2077,7 @@ class bingx extends bingx$1 {
|
|
|
2043
2077
|
* @param {string} type 'market' or 'limit'
|
|
2044
2078
|
* @param {string} side 'buy' or 'sell'
|
|
2045
2079
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
2046
|
-
* @param {float} [price] the price at which the order is to be
|
|
2080
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2047
2081
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2048
2082
|
* @param {string} [params.clientOrderId] a unique id for the order
|
|
2049
2083
|
* @param {bool} [params.postOnly] true to place a post only order
|
|
@@ -4384,7 +4418,7 @@ class bingx extends bingx$1 {
|
|
|
4384
4418
|
* @param {string} type 'market' or 'limit'
|
|
4385
4419
|
* @param {string} side 'buy' or 'sell'
|
|
4386
4420
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
4387
|
-
* @param {float} [price] the price at which the order is to be
|
|
4421
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4388
4422
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4389
4423
|
* @param {string} [params.stopPrice] Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
|
|
4390
4424
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
package/dist/cjs/src/bit2c.js
CHANGED
|
@@ -426,7 +426,7 @@ class bit2c extends bit2c$1 {
|
|
|
426
426
|
* @param {string} type 'market' or 'limit'
|
|
427
427
|
* @param {string} side 'buy' or 'sell'
|
|
428
428
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
429
|
-
* @param {float} [price] the price at which the order is to be
|
|
429
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
430
430
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
431
431
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
432
432
|
*/
|
package/dist/cjs/src/bitbank.js
CHANGED
|
@@ -648,7 +648,7 @@ class bitbank extends bitbank$1 {
|
|
|
648
648
|
* @param {string} type 'market' or 'limit'
|
|
649
649
|
* @param {string} side 'buy' or 'sell'
|
|
650
650
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
651
|
-
* @param {float} [price] the price at which the order is to be
|
|
651
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
652
652
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
653
653
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
654
654
|
*/
|
package/dist/cjs/src/bitbns.js
CHANGED
|
@@ -587,7 +587,7 @@ class bitbns extends bitbns$1 {
|
|
|
587
587
|
* @param {string} type 'market' or 'limit'
|
|
588
588
|
* @param {string} side 'buy' or 'sell'
|
|
589
589
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
590
|
-
* @param {float} [price] the price at which the order is to be
|
|
590
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
591
591
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
592
592
|
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
593
593
|
*
|
package/dist/cjs/src/bitfinex.js
CHANGED
|
@@ -1082,7 +1082,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
1082
1082
|
* @param {string} type 'market' or 'limit'
|
|
1083
1083
|
* @param {string} side 'buy' or 'sell'
|
|
1084
1084
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1085
|
-
* @param {float} [price] the price at which the order is to be
|
|
1085
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1086
1086
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1087
1087
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1088
1088
|
*/
|
|
@@ -3656,7 +3656,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
3656
3656
|
* @param {string} type 'market' or 'limit'
|
|
3657
3657
|
* @param {string} side 'buy' or 'sell'
|
|
3658
3658
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
3659
|
-
* @param {float} [price] the price
|
|
3659
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
3660
3660
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3661
3661
|
* @param {float} [params.stopPrice] the price that triggers a trigger order
|
|
3662
3662
|
* @param {boolean} [params.postOnly] set to true if you want to make a post only order
|
package/dist/cjs/src/bitflyer.js
CHANGED
|
@@ -554,7 +554,7 @@ class bitflyer extends bitflyer$1 {
|
|
|
554
554
|
* @param {string} type 'market' or 'limit'
|
|
555
555
|
* @param {string} side 'buy' or 'sell'
|
|
556
556
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
557
|
-
* @param {float} [price] the price at which the order is to be
|
|
557
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
558
558
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
559
559
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
560
560
|
*/
|
|
@@ -593,7 +593,13 @@ class bitflyer extends bitflyer$1 {
|
|
|
593
593
|
'product_code': this.marketId(symbol),
|
|
594
594
|
'child_order_acceptance_id': id,
|
|
595
595
|
};
|
|
596
|
-
|
|
596
|
+
const response = await this.privatePostCancelchildorder(this.extend(request, params));
|
|
597
|
+
//
|
|
598
|
+
// 200 OK.
|
|
599
|
+
//
|
|
600
|
+
return this.safeOrder({
|
|
601
|
+
'info': response,
|
|
602
|
+
});
|
|
597
603
|
}
|
|
598
604
|
parseOrderStatus(status) {
|
|
599
605
|
const statuses = {
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -4129,7 +4129,7 @@ class bitget extends bitget$1 {
|
|
|
4129
4129
|
* @param {string} type 'market' or 'limit'
|
|
4130
4130
|
* @param {string} side 'buy' or 'sell'
|
|
4131
4131
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
4132
|
-
* @param {float} [price] the price at which the order is to be
|
|
4132
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4133
4133
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4134
4134
|
* @param {float} [params.cost] *spot only* how much you want to trade in units of the quote currency, for market buy orders only
|
|
4135
4135
|
* @param {float} [params.triggerPrice] *swap only* The price at which a trigger order is triggered at
|
|
@@ -4564,7 +4564,7 @@ class bitget extends bitget$1 {
|
|
|
4564
4564
|
* @param {string} type 'market' or 'limit'
|
|
4565
4565
|
* @param {string} side 'buy' or 'sell'
|
|
4566
4566
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
4567
|
-
* @param {float} [price] the price at which the order is to be
|
|
4567
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
4568
4568
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4569
4569
|
* @param {float} [params.triggerPrice] the price that a trigger order is triggered at
|
|
4570
4570
|
* @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
|
package/dist/cjs/src/bithumb.js
CHANGED
|
@@ -698,7 +698,7 @@ class bithumb extends bithumb$1 {
|
|
|
698
698
|
* @param {string} type 'market' or 'limit'
|
|
699
699
|
* @param {string} side 'buy' or 'sell'
|
|
700
700
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
701
|
-
* @param {float} [price] the price at which the order is to be
|
|
701
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
702
702
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
703
703
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
704
704
|
*/
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -2419,7 +2419,7 @@ class bitmart extends bitmart$1 {
|
|
|
2419
2419
|
* @param {string} type 'market', 'limit' or 'trailing' for swap markets only
|
|
2420
2420
|
* @param {string} side 'buy' or 'sell'
|
|
2421
2421
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2422
|
-
* @param {float} [price] the price at which the order is to be
|
|
2422
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2423
2423
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2424
2424
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2425
2425
|
* @param {string} [params.leverage] *swap only* leverage level
|
|
@@ -2564,7 +2564,7 @@ class bitmart extends bitmart$1 {
|
|
|
2564
2564
|
* @param {string} type 'market', 'limit' or 'trailing'
|
|
2565
2565
|
* @param {string} side 'buy' or 'sell'
|
|
2566
2566
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2567
|
-
* @param {float} [price] the price at which the order is to be
|
|
2567
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2568
2568
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2569
2569
|
* @param {int} [params.leverage] leverage level
|
|
2570
2570
|
* @param {boolean} [params.reduceOnly] *swap only* reduce only
|
|
@@ -2680,7 +2680,7 @@ class bitmart extends bitmart$1 {
|
|
|
2680
2680
|
* @param {string} type 'market' or 'limit'
|
|
2681
2681
|
* @param {string} side 'buy' or 'sell'
|
|
2682
2682
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2683
|
-
* @param {float} [price] the price at which the order is to be
|
|
2683
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2684
2684
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2685
2685
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2686
2686
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/dist/cjs/src/bitmex.js
CHANGED
|
@@ -1862,7 +1862,7 @@ class bitmex extends bitmex$1 {
|
|
|
1862
1862
|
* @param {string} type 'market' or 'limit'
|
|
1863
1863
|
* @param {string} side 'buy' or 'sell'
|
|
1864
1864
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1865
|
-
* @param {float} [price] the price at which the order is to be
|
|
1865
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1866
1866
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1867
1867
|
* @param {object} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1868
1868
|
* @param {object} [params.triggerDirection] the direction whenever the trigger happens with relation to price - 'above' or 'below'
|
package/dist/cjs/src/bitopro.js
CHANGED
|
@@ -1001,7 +1001,7 @@ class bitopro extends bitopro$1 {
|
|
|
1001
1001
|
* @param {string} type 'market' or 'limit'
|
|
1002
1002
|
* @param {string} side 'buy' or 'sell'
|
|
1003
1003
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1004
|
-
* @param {float} [price] the price at which the order is to be
|
|
1004
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1005
1005
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1006
1006
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1007
1007
|
*/
|
|
@@ -1085,6 +1085,22 @@ class bitopro extends bitopro$1 {
|
|
|
1085
1085
|
//
|
|
1086
1086
|
return this.parseOrder(response, market);
|
|
1087
1087
|
}
|
|
1088
|
+
parseCancelOrders(data) {
|
|
1089
|
+
const dataKeys = Object.keys(data);
|
|
1090
|
+
const orders = [];
|
|
1091
|
+
for (let i = 0; i < dataKeys.length; i++) {
|
|
1092
|
+
const marketId = dataKeys[i];
|
|
1093
|
+
const orderIds = data[marketId];
|
|
1094
|
+
for (let j = 0; j < orderIds.length; j++) {
|
|
1095
|
+
orders.push(this.safeOrder({
|
|
1096
|
+
'info': orderIds[j],
|
|
1097
|
+
'id': orderIds[j],
|
|
1098
|
+
'symbol': this.safeSymbol(marketId),
|
|
1099
|
+
}));
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
return orders;
|
|
1103
|
+
}
|
|
1088
1104
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
1089
1105
|
/**
|
|
1090
1106
|
* @method
|
|
@@ -1115,7 +1131,8 @@ class bitopro extends bitopro$1 {
|
|
|
1115
1131
|
// }
|
|
1116
1132
|
// }
|
|
1117
1133
|
//
|
|
1118
|
-
|
|
1134
|
+
const data = this.safeDict(response, 'data');
|
|
1135
|
+
return this.parseCancelOrders(data);
|
|
1119
1136
|
}
|
|
1120
1137
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1121
1138
|
/**
|
|
@@ -1140,7 +1157,7 @@ class bitopro extends bitopro$1 {
|
|
|
1140
1157
|
else {
|
|
1141
1158
|
response = await this.privateDeleteOrdersAll(this.extend(request, params));
|
|
1142
1159
|
}
|
|
1143
|
-
const
|
|
1160
|
+
const data = this.safeValue(response, 'data', {});
|
|
1144
1161
|
//
|
|
1145
1162
|
// {
|
|
1146
1163
|
// "data":{
|
|
@@ -1151,7 +1168,7 @@ class bitopro extends bitopro$1 {
|
|
|
1151
1168
|
// }
|
|
1152
1169
|
// }
|
|
1153
1170
|
//
|
|
1154
|
-
return
|
|
1171
|
+
return this.parseCancelOrders(data);
|
|
1155
1172
|
}
|
|
1156
1173
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1157
1174
|
/**
|
package/dist/cjs/src/bitrue.js
CHANGED
|
@@ -1907,7 +1907,7 @@ class bitrue extends bitrue$1 {
|
|
|
1907
1907
|
* @param {string} type 'market' or 'limit'
|
|
1908
1908
|
* @param {string} side 'buy' or 'sell'
|
|
1909
1909
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1910
|
-
* @param {float} [price] the price at which the order is to be
|
|
1910
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1911
1911
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1912
1912
|
* @param {float} [params.triggerPrice] *spot only* the price at which a trigger order is triggered at
|
|
1913
1913
|
* @param {string} [params.clientOrderId] a unique id for the order, automatically generated if not sent
|
package/dist/cjs/src/bitso.js
CHANGED
|
@@ -965,7 +965,7 @@ class bitso extends bitso$1 {
|
|
|
965
965
|
* @param {string} type 'market' or 'limit'
|
|
966
966
|
* @param {string} side 'buy' or 'sell'
|
|
967
967
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
968
|
-
* @param {float} [price] the price at which the order is to be
|
|
968
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
969
969
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
970
970
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
971
971
|
*/
|
package/dist/cjs/src/bitstamp.js
CHANGED
|
@@ -1398,7 +1398,7 @@ class bitstamp extends bitstamp$1 {
|
|
|
1398
1398
|
* @param {string} type 'market' or 'limit'
|
|
1399
1399
|
* @param {string} side 'buy' or 'sell'
|
|
1400
1400
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1401
|
-
* @param {float} [price] the price at which the order is to be
|
|
1401
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1402
1402
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1403
1403
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1404
1404
|
*/
|
package/dist/cjs/src/bitteam.js
CHANGED
|
@@ -981,7 +981,7 @@ class bitteam extends bitteam$1 {
|
|
|
981
981
|
* @param {string} type 'market' or 'limit'
|
|
982
982
|
* @param {string} side 'buy' or 'sell'
|
|
983
983
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
984
|
-
* @param {float} [price] the price at which the order is to be
|
|
984
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
985
985
|
* @param {object} [params] extra parameters specific to the bitteam api endpoint
|
|
986
986
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
987
987
|
*/
|
package/dist/cjs/src/bitvavo.js
CHANGED
|
@@ -1126,7 +1126,7 @@ class bitvavo extends bitvavo$1 {
|
|
|
1126
1126
|
* @param {string} type 'market' or 'limit'
|
|
1127
1127
|
* @param {string} side 'buy' or 'sell'
|
|
1128
1128
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1129
|
-
* @param {float} price the price at which the order is to be
|
|
1129
|
+
* @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1130
1130
|
* @param {object} [params] extra parameters specific to the bitvavo api endpoint
|
|
1131
1131
|
* @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
|
|
1132
1132
|
* @param {float} [params.stopPrice] The price at which a trigger order is triggered at
|
|
@@ -1227,7 +1227,7 @@ class bitvavo extends bitvavo$1 {
|
|
|
1227
1227
|
* @param {string} type 'market' or 'limit'
|
|
1228
1228
|
* @param {string} side 'buy' or 'sell'
|
|
1229
1229
|
* @param {float} [amount] how much of currency you want to trade in units of base currency
|
|
1230
|
-
* @param {float} [price] the price at which the order is to be
|
|
1230
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1231
1231
|
* @param {object} [params] extra parameters specific to the bitvavo api endpoint
|
|
1232
1232
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1233
1233
|
*/
|
package/dist/cjs/src/bl3p.js
CHANGED
|
@@ -387,7 +387,7 @@ class bl3p extends bl3p$1 {
|
|
|
387
387
|
* @param {string} type 'market' or 'limit'
|
|
388
388
|
* @param {string} side 'buy' or 'sell'
|
|
389
389
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
390
|
-
* @param {float} [price] the price at which the order is to be
|
|
390
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
391
391
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
392
392
|
*
|
|
393
393
|
* EXCHANGE SPECIFIC PARAMETERS
|