ccxt 4.0.104 → 4.0.105
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 +25 -9
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bitmart.js +18 -7
- package/dist/cjs/src/bybit.js +1 -1
- package/dist/cjs/src/kucoin.js +5 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/bitmart.js +18 -7
- package/js/src/bybit.js +1 -1
- package/js/src/kucoin.js +5 -0
- package/package.json +1 -1
- package/skip-tests.json +2 -1
package/dist/cjs/ccxt.js
CHANGED
|
@@ -179,7 +179,7 @@ var woo$1 = require('./src/pro/woo.js');
|
|
|
179
179
|
|
|
180
180
|
//-----------------------------------------------------------------------------
|
|
181
181
|
// this is updated by vss.js when building
|
|
182
|
-
const version = '4.0.
|
|
182
|
+
const version = '4.0.105';
|
|
183
183
|
Exchange["default"].ccxtVersion = version;
|
|
184
184
|
const exchanges = {
|
|
185
185
|
'ace': ace,
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -2199,8 +2199,10 @@ class bitmart extends bitmart$1 {
|
|
|
2199
2199
|
* @name bitmart#cancelAllOrders
|
|
2200
2200
|
* @description cancel all open orders in a market
|
|
2201
2201
|
* @see https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
|
|
2202
|
+
* @see https://developer-pro.bitmart.com/en/futures/#cancel-all-orders-signed
|
|
2202
2203
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
2203
2204
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2205
|
+
* @param {string} [params.side] *spot only* 'buy' or 'sell'
|
|
2204
2206
|
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2205
2207
|
*/
|
|
2206
2208
|
await this.loadMarkets();
|
|
@@ -2210,17 +2212,18 @@ class bitmart extends bitmart$1 {
|
|
|
2210
2212
|
market = this.market(symbol);
|
|
2211
2213
|
request['symbol'] = market['id'];
|
|
2212
2214
|
}
|
|
2215
|
+
let response = undefined;
|
|
2213
2216
|
let type = undefined;
|
|
2214
2217
|
[type, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
|
|
2215
|
-
if (type
|
|
2216
|
-
|
|
2218
|
+
if (type === 'spot') {
|
|
2219
|
+
response = await this.privatePostSpotV1CancelOrders(this.extend(request, params));
|
|
2217
2220
|
}
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
params = this.omit(params, 'side');
|
|
2221
|
+
else if (type === 'swap') {
|
|
2222
|
+
this.checkRequiredSymbol('cancelAllOrders', symbol);
|
|
2223
|
+
response = await this.privatePostContractPrivateCancelOrders(this.extend(request, params));
|
|
2222
2224
|
}
|
|
2223
|
-
|
|
2225
|
+
//
|
|
2226
|
+
// spot
|
|
2224
2227
|
//
|
|
2225
2228
|
// {
|
|
2226
2229
|
// "code": 1000,
|
|
@@ -2229,6 +2232,14 @@ class bitmart extends bitmart$1 {
|
|
|
2229
2232
|
// "data": {}
|
|
2230
2233
|
// }
|
|
2231
2234
|
//
|
|
2235
|
+
// swap
|
|
2236
|
+
//
|
|
2237
|
+
// {
|
|
2238
|
+
// "code": 1000,
|
|
2239
|
+
// "message": "Ok",
|
|
2240
|
+
// "trace": "7f9c94e10f9d4513bc08a7bfc2a5559a.70.16954131323145323"
|
|
2241
|
+
// }
|
|
2242
|
+
//
|
|
2232
2243
|
return response;
|
|
2233
2244
|
}
|
|
2234
2245
|
async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -3603,7 +3603,6 @@ class bybit extends bybit$1 {
|
|
|
3603
3603
|
* @param {boolean} [params.isLeverage] *unified spot only* false then spot trading true then margin trading
|
|
3604
3604
|
* @param {string} [params.tpslMode] *contract only* 'full' or 'partial'
|
|
3605
3605
|
* @param {string} [params.mmp] *option only* market maker protection
|
|
3606
|
-
* @param {int} [params.triggerDirection] *contract only* conditional orders, 1: triggered when market price rises to triggerPrice, 2: triggered when market price falls to triggerPrice
|
|
3607
3606
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3608
3607
|
*/
|
|
3609
3608
|
await this.loadMarkets();
|
|
@@ -3711,6 +3710,7 @@ class bybit extends bybit$1 {
|
|
|
3711
3710
|
const isBuy = side === 'buy';
|
|
3712
3711
|
const ascending = stopLossTriggerPrice ? !isBuy : isBuy;
|
|
3713
3712
|
if (triggerPrice !== undefined) {
|
|
3713
|
+
request['triggerDirection'] = ascending ? 2 : 1;
|
|
3714
3714
|
request['triggerPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
3715
3715
|
}
|
|
3716
3716
|
else if (isStopLossTriggerOrder || isTakeProfitTriggerOrder) {
|
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -1082,6 +1082,11 @@ class kucoin extends kucoin$1 {
|
|
|
1082
1082
|
const rawPrecision = this.safeString(entry, 'precision');
|
|
1083
1083
|
const precision = this.parseNumber(this.parsePrecision(rawPrecision));
|
|
1084
1084
|
const chainsLength = chains.length;
|
|
1085
|
+
if (!chainsLength) {
|
|
1086
|
+
// https://t.me/KuCoin_API/173118
|
|
1087
|
+
isWithdrawEnabled = false;
|
|
1088
|
+
isDepositEnabled = false;
|
|
1089
|
+
}
|
|
1085
1090
|
for (let j = 0; j < chainsLength; j++) {
|
|
1086
1091
|
const chain = chains[j];
|
|
1087
1092
|
const chainId = this.safeString(chain, 'chain');
|
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, Position } 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, NoChange } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.0.
|
|
7
|
+
declare const version = "4.0.104";
|
|
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, NoChange } 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.105';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
package/js/src/bitmart.js
CHANGED
|
@@ -2202,8 +2202,10 @@ export default class bitmart extends Exchange {
|
|
|
2202
2202
|
* @name bitmart#cancelAllOrders
|
|
2203
2203
|
* @description cancel all open orders in a market
|
|
2204
2204
|
* @see https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
|
|
2205
|
+
* @see https://developer-pro.bitmart.com/en/futures/#cancel-all-orders-signed
|
|
2205
2206
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
2206
2207
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
2208
|
+
* @param {string} [params.side] *spot only* 'buy' or 'sell'
|
|
2207
2209
|
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
2208
2210
|
*/
|
|
2209
2211
|
await this.loadMarkets();
|
|
@@ -2213,17 +2215,18 @@ export default class bitmart extends Exchange {
|
|
|
2213
2215
|
market = this.market(symbol);
|
|
2214
2216
|
request['symbol'] = market['id'];
|
|
2215
2217
|
}
|
|
2218
|
+
let response = undefined;
|
|
2216
2219
|
let type = undefined;
|
|
2217
2220
|
[type, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
|
|
2218
|
-
if (type
|
|
2219
|
-
|
|
2221
|
+
if (type === 'spot') {
|
|
2222
|
+
response = await this.privatePostSpotV1CancelOrders(this.extend(request, params));
|
|
2220
2223
|
}
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
params = this.omit(params, 'side');
|
|
2224
|
+
else if (type === 'swap') {
|
|
2225
|
+
this.checkRequiredSymbol('cancelAllOrders', symbol);
|
|
2226
|
+
response = await this.privatePostContractPrivateCancelOrders(this.extend(request, params));
|
|
2225
2227
|
}
|
|
2226
|
-
|
|
2228
|
+
//
|
|
2229
|
+
// spot
|
|
2227
2230
|
//
|
|
2228
2231
|
// {
|
|
2229
2232
|
// "code": 1000,
|
|
@@ -2232,6 +2235,14 @@ export default class bitmart extends Exchange {
|
|
|
2232
2235
|
// "data": {}
|
|
2233
2236
|
// }
|
|
2234
2237
|
//
|
|
2238
|
+
// swap
|
|
2239
|
+
//
|
|
2240
|
+
// {
|
|
2241
|
+
// "code": 1000,
|
|
2242
|
+
// "message": "Ok",
|
|
2243
|
+
// "trace": "7f9c94e10f9d4513bc08a7bfc2a5559a.70.16954131323145323"
|
|
2244
|
+
// }
|
|
2245
|
+
//
|
|
2235
2246
|
return response;
|
|
2236
2247
|
}
|
|
2237
2248
|
async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
package/js/src/bybit.js
CHANGED
|
@@ -3606,7 +3606,6 @@ export default class bybit extends Exchange {
|
|
|
3606
3606
|
* @param {boolean} [params.isLeverage] *unified spot only* false then spot trading true then margin trading
|
|
3607
3607
|
* @param {string} [params.tpslMode] *contract only* 'full' or 'partial'
|
|
3608
3608
|
* @param {string} [params.mmp] *option only* market maker protection
|
|
3609
|
-
* @param {int} [params.triggerDirection] *contract only* conditional orders, 1: triggered when market price rises to triggerPrice, 2: triggered when market price falls to triggerPrice
|
|
3610
3609
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3611
3610
|
*/
|
|
3612
3611
|
await this.loadMarkets();
|
|
@@ -3714,6 +3713,7 @@ export default class bybit extends Exchange {
|
|
|
3714
3713
|
const isBuy = side === 'buy';
|
|
3715
3714
|
const ascending = stopLossTriggerPrice ? !isBuy : isBuy;
|
|
3716
3715
|
if (triggerPrice !== undefined) {
|
|
3716
|
+
request['triggerDirection'] = ascending ? 2 : 1;
|
|
3717
3717
|
request['triggerPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
3718
3718
|
}
|
|
3719
3719
|
else if (isStopLossTriggerOrder || isTakeProfitTriggerOrder) {
|
package/js/src/kucoin.js
CHANGED
|
@@ -1085,6 +1085,11 @@ export default class kucoin extends Exchange {
|
|
|
1085
1085
|
const rawPrecision = this.safeString(entry, 'precision');
|
|
1086
1086
|
const precision = this.parseNumber(this.parsePrecision(rawPrecision));
|
|
1087
1087
|
const chainsLength = chains.length;
|
|
1088
|
+
if (!chainsLength) {
|
|
1089
|
+
// https://t.me/KuCoin_API/173118
|
|
1090
|
+
isWithdrawEnabled = false;
|
|
1091
|
+
isDepositEnabled = false;
|
|
1092
|
+
}
|
|
1088
1093
|
for (let j = 0; j < chainsLength; j++) {
|
|
1089
1094
|
const chain = chains[j];
|
|
1090
1095
|
const chainId = this.safeString(chain, 'chain');
|
package/package.json
CHANGED
package/skip-tests.json
CHANGED
|
@@ -366,7 +366,8 @@
|
|
|
366
366
|
},
|
|
367
367
|
"fetchTickers": {
|
|
368
368
|
"bid":"broken bid-ask",
|
|
369
|
-
"ask":"broken bid-ask"
|
|
369
|
+
"ask":"broken bid-ask",
|
|
370
|
+
"quoteVolume": "quoteVolume >= baseVolume * low is failing https://app.travis-ci.com/github/ccxt/ccxt/builds/266144312#L2220"
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
373
|
},
|