ccxt 4.2.50 → 4.2.51
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/build.sh +1 -1
- package/dist/ccxt.browser.js +16 -8
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +7 -0
- package/dist/cjs/src/mexc.js +2 -1
- package/dist/cjs/src/okx.js +1 -1
- package/dist/cjs/src/pro/bitcoincom.js +4 -5
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +5 -0
- package/js/src/abstract/binancecoinm.d.ts +5 -0
- package/js/src/abstract/binanceus.d.ts +5 -0
- package/js/src/abstract/binanceusdm.d.ts +5 -0
- package/js/src/binance.js +7 -0
- package/js/src/mexc.js +2 -1
- package/js/src/okx.js +1 -1
- package/js/src/pro/bitcoincom.js +4 -5
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/package.json +2 -2
- package/skip-tests.json +1 -0
package/dist/cjs/ccxt.js
CHANGED
|
@@ -177,7 +177,7 @@ var woo$1 = require('./src/pro/woo.js');
|
|
|
177
177
|
|
|
178
178
|
//-----------------------------------------------------------------------------
|
|
179
179
|
// this is updated by vss.js when building
|
|
180
|
-
const version = '4.2.
|
|
180
|
+
const version = '4.2.51';
|
|
181
181
|
Exchange["default"].ccxtVersion = version;
|
|
182
182
|
const exchanges = {
|
|
183
183
|
'ace': ace,
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -472,6 +472,10 @@ class binance extends binance$1 {
|
|
|
472
472
|
'simple-earn/flexible/history/rewardsRecord': 15,
|
|
473
473
|
'simple-earn/locked/history/rewardsRecord': 15,
|
|
474
474
|
'simple-earn/flexible/history/collateralRecord': 0.1,
|
|
475
|
+
// Convert
|
|
476
|
+
'dci/product/list': 0.1,
|
|
477
|
+
'dci/product/positions': 0.1,
|
|
478
|
+
'dci/product/accounts': 0.1,
|
|
475
479
|
},
|
|
476
480
|
'post': {
|
|
477
481
|
'asset/dust': 0.06667,
|
|
@@ -600,6 +604,9 @@ class binance extends binance$1 {
|
|
|
600
604
|
'simple-earn/locked/redeem': 0.1,
|
|
601
605
|
'simple-earn/flexible/setAutoSubscribe': 15,
|
|
602
606
|
'simple-earn/locked/setAutoSubscribe': 15,
|
|
607
|
+
// convert
|
|
608
|
+
'dci/product/subscribe': 0.1,
|
|
609
|
+
'dci/product/auto_compound/edit': 0.1,
|
|
603
610
|
},
|
|
604
611
|
'put': {
|
|
605
612
|
'userDataStream': 0.1,
|
package/dist/cjs/src/mexc.js
CHANGED
|
@@ -889,6 +889,7 @@ class mexc extends mexc$1 {
|
|
|
889
889
|
'700006': errors.BadRequest,
|
|
890
890
|
'700007': errors.AuthenticationError,
|
|
891
891
|
'700008': errors.BadRequest,
|
|
892
|
+
'700013': errors.AuthenticationError,
|
|
892
893
|
'730001': errors.BadRequest,
|
|
893
894
|
'730002': errors.BadRequest,
|
|
894
895
|
'730000': errors.ExchangeError,
|
|
@@ -5420,7 +5421,7 @@ class mexc extends mexc$1 {
|
|
|
5420
5421
|
'source': this.safeString(this.options, 'broker', 'CCXT'),
|
|
5421
5422
|
};
|
|
5422
5423
|
}
|
|
5423
|
-
if (method === 'POST') {
|
|
5424
|
+
if ((method === 'POST') || (method === 'PUT')) {
|
|
5424
5425
|
headers['Content-Type'] = 'application/json';
|
|
5425
5426
|
}
|
|
5426
5427
|
}
|
package/dist/cjs/src/okx.js
CHANGED
|
@@ -5468,7 +5468,7 @@ class okx extends okx$1 {
|
|
|
5468
5468
|
const liquidationPrice = this.safeNumber(position, 'liqPx');
|
|
5469
5469
|
const percentageString = this.safeString(position, 'uplRatio');
|
|
5470
5470
|
const percentage = this.parseNumber(Precise["default"].stringMul(percentageString, '100'));
|
|
5471
|
-
const timestamp = this.safeInteger(position, '
|
|
5471
|
+
const timestamp = this.safeInteger(position, 'cTime');
|
|
5472
5472
|
const marginRatio = this.parseNumber(Precise["default"].stringDiv(maintenanceMarginString, collateralString, 4));
|
|
5473
5473
|
return this.safePosition({
|
|
5474
5474
|
'info': position,
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var hitbtc = require('./hitbtc.js');
|
|
4
|
-
var
|
|
4
|
+
var hitbtc$1 = require('../hitbtc.js');
|
|
5
|
+
var bitcoincom$1 = require('../bitcoincom.js');
|
|
5
6
|
|
|
6
7
|
// ---------------------------------------------------------------------------
|
|
7
8
|
// ---------------------------------------------------------------------------
|
|
8
9
|
class bitcoincom extends hitbtc {
|
|
9
10
|
describe() {
|
|
10
11
|
// eslint-disable-next-line new-cap
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const extended = this.deepExtend(super.describe(), restDescribe);
|
|
14
|
-
return this.deepExtend(extended, {
|
|
12
|
+
const describeExtended = this.getDescribeForExtendedWsExchange(new bitcoincom$1(), new hitbtc$1(), super.describe());
|
|
13
|
+
return this.deepExtend(describeExtended, {
|
|
15
14
|
'id': 'bitcoincom',
|
|
16
15
|
'name': 'bitcoin.com',
|
|
17
16
|
'countries': ['KN'],
|
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 type { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks } 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.2.
|
|
7
|
+
declare const version = "4.2.50";
|
|
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.2.
|
|
41
|
+
const version = '4.2.51';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -243,6 +243,9 @@ interface Exchange {
|
|
|
243
243
|
sapiGetSimpleEarnFlexibleHistoryRewardsRecord(params?: {}): Promise<implicitReturnType>;
|
|
244
244
|
sapiGetSimpleEarnLockedHistoryRewardsRecord(params?: {}): Promise<implicitReturnType>;
|
|
245
245
|
sapiGetSimpleEarnFlexibleHistoryCollateralRecord(params?: {}): Promise<implicitReturnType>;
|
|
246
|
+
sapiGetDciProductList(params?: {}): Promise<implicitReturnType>;
|
|
247
|
+
sapiGetDciProductPositions(params?: {}): Promise<implicitReturnType>;
|
|
248
|
+
sapiGetDciProductAccounts(params?: {}): Promise<implicitReturnType>;
|
|
246
249
|
sapiPostAssetDust(params?: {}): Promise<implicitReturnType>;
|
|
247
250
|
sapiPostAssetDustBtc(params?: {}): Promise<implicitReturnType>;
|
|
248
251
|
sapiPostAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
@@ -357,6 +360,8 @@ interface Exchange {
|
|
|
357
360
|
sapiPostSimpleEarnLockedRedeem(params?: {}): Promise<implicitReturnType>;
|
|
358
361
|
sapiPostSimpleEarnFlexibleSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
359
362
|
sapiPostSimpleEarnLockedSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
363
|
+
sapiPostDciProductSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
364
|
+
sapiPostDciProductAutoCompoundEdit(params?: {}): Promise<implicitReturnType>;
|
|
360
365
|
sapiPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
361
366
|
sapiPutUserDataStreamIsolated(params?: {}): Promise<implicitReturnType>;
|
|
362
367
|
sapiDeleteMarginOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -243,6 +243,9 @@ interface binance {
|
|
|
243
243
|
sapiGetSimpleEarnFlexibleHistoryRewardsRecord(params?: {}): Promise<implicitReturnType>;
|
|
244
244
|
sapiGetSimpleEarnLockedHistoryRewardsRecord(params?: {}): Promise<implicitReturnType>;
|
|
245
245
|
sapiGetSimpleEarnFlexibleHistoryCollateralRecord(params?: {}): Promise<implicitReturnType>;
|
|
246
|
+
sapiGetDciProductList(params?: {}): Promise<implicitReturnType>;
|
|
247
|
+
sapiGetDciProductPositions(params?: {}): Promise<implicitReturnType>;
|
|
248
|
+
sapiGetDciProductAccounts(params?: {}): Promise<implicitReturnType>;
|
|
246
249
|
sapiPostAssetDust(params?: {}): Promise<implicitReturnType>;
|
|
247
250
|
sapiPostAssetDustBtc(params?: {}): Promise<implicitReturnType>;
|
|
248
251
|
sapiPostAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
@@ -357,6 +360,8 @@ interface binance {
|
|
|
357
360
|
sapiPostSimpleEarnLockedRedeem(params?: {}): Promise<implicitReturnType>;
|
|
358
361
|
sapiPostSimpleEarnFlexibleSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
359
362
|
sapiPostSimpleEarnLockedSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
363
|
+
sapiPostDciProductSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
364
|
+
sapiPostDciProductAutoCompoundEdit(params?: {}): Promise<implicitReturnType>;
|
|
360
365
|
sapiPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
361
366
|
sapiPutUserDataStreamIsolated(params?: {}): Promise<implicitReturnType>;
|
|
362
367
|
sapiDeleteMarginOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -243,6 +243,9 @@ interface binance {
|
|
|
243
243
|
sapiGetSimpleEarnFlexibleHistoryRewardsRecord(params?: {}): Promise<implicitReturnType>;
|
|
244
244
|
sapiGetSimpleEarnLockedHistoryRewardsRecord(params?: {}): Promise<implicitReturnType>;
|
|
245
245
|
sapiGetSimpleEarnFlexibleHistoryCollateralRecord(params?: {}): Promise<implicitReturnType>;
|
|
246
|
+
sapiGetDciProductList(params?: {}): Promise<implicitReturnType>;
|
|
247
|
+
sapiGetDciProductPositions(params?: {}): Promise<implicitReturnType>;
|
|
248
|
+
sapiGetDciProductAccounts(params?: {}): Promise<implicitReturnType>;
|
|
246
249
|
sapiGetAssetAssetDistributionHistory(params?: {}): Promise<implicitReturnType>;
|
|
247
250
|
sapiGetAssetQueryTradingFee(params?: {}): Promise<implicitReturnType>;
|
|
248
251
|
sapiGetAssetQueryTradingVolume(params?: {}): Promise<implicitReturnType>;
|
|
@@ -388,6 +391,8 @@ interface binance {
|
|
|
388
391
|
sapiPostSimpleEarnLockedRedeem(params?: {}): Promise<implicitReturnType>;
|
|
389
392
|
sapiPostSimpleEarnFlexibleSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
390
393
|
sapiPostSimpleEarnLockedSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
394
|
+
sapiPostDciProductSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
395
|
+
sapiPostDciProductAutoCompoundEdit(params?: {}): Promise<implicitReturnType>;
|
|
391
396
|
sapiPostOtcQuotes(params?: {}): Promise<implicitReturnType>;
|
|
392
397
|
sapiPostOtcOrders(params?: {}): Promise<implicitReturnType>;
|
|
393
398
|
sapiPostFiatpaymentWithdrawApply(params?: {}): Promise<implicitReturnType>;
|
|
@@ -243,6 +243,9 @@ interface binance {
|
|
|
243
243
|
sapiGetSimpleEarnFlexibleHistoryRewardsRecord(params?: {}): Promise<implicitReturnType>;
|
|
244
244
|
sapiGetSimpleEarnLockedHistoryRewardsRecord(params?: {}): Promise<implicitReturnType>;
|
|
245
245
|
sapiGetSimpleEarnFlexibleHistoryCollateralRecord(params?: {}): Promise<implicitReturnType>;
|
|
246
|
+
sapiGetDciProductList(params?: {}): Promise<implicitReturnType>;
|
|
247
|
+
sapiGetDciProductPositions(params?: {}): Promise<implicitReturnType>;
|
|
248
|
+
sapiGetDciProductAccounts(params?: {}): Promise<implicitReturnType>;
|
|
246
249
|
sapiPostAssetDust(params?: {}): Promise<implicitReturnType>;
|
|
247
250
|
sapiPostAssetDustBtc(params?: {}): Promise<implicitReturnType>;
|
|
248
251
|
sapiPostAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
@@ -357,6 +360,8 @@ interface binance {
|
|
|
357
360
|
sapiPostSimpleEarnLockedRedeem(params?: {}): Promise<implicitReturnType>;
|
|
358
361
|
sapiPostSimpleEarnFlexibleSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
359
362
|
sapiPostSimpleEarnLockedSetAutoSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
363
|
+
sapiPostDciProductSubscribe(params?: {}): Promise<implicitReturnType>;
|
|
364
|
+
sapiPostDciProductAutoCompoundEdit(params?: {}): Promise<implicitReturnType>;
|
|
360
365
|
sapiPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
361
366
|
sapiPutUserDataStreamIsolated(params?: {}): Promise<implicitReturnType>;
|
|
362
367
|
sapiDeleteMarginOpenOrders(params?: {}): Promise<implicitReturnType>;
|
package/js/src/binance.js
CHANGED
|
@@ -475,6 +475,10 @@ export default class binance extends Exchange {
|
|
|
475
475
|
'simple-earn/flexible/history/rewardsRecord': 15,
|
|
476
476
|
'simple-earn/locked/history/rewardsRecord': 15,
|
|
477
477
|
'simple-earn/flexible/history/collateralRecord': 0.1,
|
|
478
|
+
// Convert
|
|
479
|
+
'dci/product/list': 0.1,
|
|
480
|
+
'dci/product/positions': 0.1,
|
|
481
|
+
'dci/product/accounts': 0.1,
|
|
478
482
|
},
|
|
479
483
|
'post': {
|
|
480
484
|
'asset/dust': 0.06667,
|
|
@@ -603,6 +607,9 @@ export default class binance extends Exchange {
|
|
|
603
607
|
'simple-earn/locked/redeem': 0.1,
|
|
604
608
|
'simple-earn/flexible/setAutoSubscribe': 15,
|
|
605
609
|
'simple-earn/locked/setAutoSubscribe': 15,
|
|
610
|
+
// convert
|
|
611
|
+
'dci/product/subscribe': 0.1,
|
|
612
|
+
'dci/product/auto_compound/edit': 0.1,
|
|
606
613
|
},
|
|
607
614
|
'put': {
|
|
608
615
|
'userDataStream': 0.1,
|
package/js/src/mexc.js
CHANGED
|
@@ -892,6 +892,7 @@ export default class mexc extends Exchange {
|
|
|
892
892
|
'700006': BadRequest,
|
|
893
893
|
'700007': AuthenticationError,
|
|
894
894
|
'700008': BadRequest,
|
|
895
|
+
'700013': AuthenticationError,
|
|
895
896
|
'730001': BadRequest,
|
|
896
897
|
'730002': BadRequest,
|
|
897
898
|
'730000': ExchangeError,
|
|
@@ -5424,7 +5425,7 @@ export default class mexc extends Exchange {
|
|
|
5424
5425
|
'source': this.safeString(this.options, 'broker', 'CCXT'),
|
|
5425
5426
|
};
|
|
5426
5427
|
}
|
|
5427
|
-
if (method === 'POST') {
|
|
5428
|
+
if ((method === 'POST') || (method === 'PUT')) {
|
|
5428
5429
|
headers['Content-Type'] = 'application/json';
|
|
5429
5430
|
}
|
|
5430
5431
|
}
|
package/js/src/okx.js
CHANGED
|
@@ -5471,7 +5471,7 @@ export default class okx extends Exchange {
|
|
|
5471
5471
|
const liquidationPrice = this.safeNumber(position, 'liqPx');
|
|
5472
5472
|
const percentageString = this.safeString(position, 'uplRatio');
|
|
5473
5473
|
const percentage = this.parseNumber(Precise.stringMul(percentageString, '100'));
|
|
5474
|
-
const timestamp = this.safeInteger(position, '
|
|
5474
|
+
const timestamp = this.safeInteger(position, 'cTime');
|
|
5475
5475
|
const marginRatio = this.parseNumber(Precise.stringDiv(maintenanceMarginString, collateralString, 4));
|
|
5476
5476
|
return this.safePosition({
|
|
5477
5477
|
'info': position,
|
package/js/src/pro/bitcoincom.js
CHANGED
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import hitbtc from './hitbtc.js';
|
|
9
|
-
import
|
|
9
|
+
import hitbtcRest from '../hitbtc.js';
|
|
10
|
+
import bitcoincomRest from '../bitcoincom.js';
|
|
10
11
|
// ---------------------------------------------------------------------------
|
|
11
12
|
export default class bitcoincom extends hitbtc {
|
|
12
13
|
describe() {
|
|
13
14
|
// eslint-disable-next-line new-cap
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const extended = this.deepExtend(super.describe(), restDescribe);
|
|
17
|
-
return this.deepExtend(extended, {
|
|
15
|
+
const describeExtended = this.getDescribeForExtendedWsExchange(new bitcoincomRest(), new hitbtcRest(), super.describe());
|
|
16
|
+
return this.deepExtend(describeExtended, {
|
|
18
17
|
'id': 'bitcoincom',
|
|
19
18
|
'name': 'bitcoin.com',
|
|
20
19
|
'countries': ['KN'],
|
|
@@ -15,7 +15,7 @@ export declare class BigInteger {
|
|
|
15
15
|
protected intValue(): number;
|
|
16
16
|
protected byteValue(): number;
|
|
17
17
|
protected shortValue(): number;
|
|
18
|
-
protected signum():
|
|
18
|
+
protected signum(): 1 | 0 | -1;
|
|
19
19
|
toByteArray(): number[];
|
|
20
20
|
protected equals(a: BigInteger): boolean;
|
|
21
21
|
protected min(a: BigInteger): BigInteger;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccxt",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.51",
|
|
4
4
|
"description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
|
|
5
5
|
"unpkg": "dist/ccxt.browser.js",
|
|
6
6
|
"type": "module",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"as-table": "1.0.37",
|
|
147
147
|
"asciichart": "^1.5.25",
|
|
148
148
|
"assert": "^2.0.0",
|
|
149
|
-
"ast-transpiler": "^0.0.
|
|
149
|
+
"ast-transpiler": "^0.0.44",
|
|
150
150
|
"docsify": "^4.11.4",
|
|
151
151
|
"eslint": "8.22.0",
|
|
152
152
|
"eslint-config-airbnb-base": "15.0.0",
|
package/skip-tests.json
CHANGED
|
@@ -240,6 +240,7 @@
|
|
|
240
240
|
"fetchTickers": {
|
|
241
241
|
"bid":"broken bid-ask",
|
|
242
242
|
"ask":"broken bid-ask",
|
|
243
|
+
"open": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269099593#L3833",
|
|
243
244
|
"quoteVolume": "quoteVolume >= baseVolume * low is failing",
|
|
244
245
|
"baseVolume": "quoteVolume >= baseVolume * low is failing"
|
|
245
246
|
},
|