ccxt 4.0.93 → 4.0.94
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 +50 -45
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bigone.js +5 -3
- package/dist/cjs/src/bitopro.js +34 -34
- package/dist/cjs/src/hollaex.js +3 -0
- package/dist/cjs/src/huobi.js +2 -2
- package/dist/cjs/src/okx.js +2 -2
- package/dist/cjs/src/pro/binance.js +3 -3
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/bigone.js +5 -3
- package/js/src/bitopro.js +34 -34
- package/js/src/hollaex.js +3 -0
- package/js/src/huobi.js +2 -2
- package/js/src/okx.js +2 -2
- package/js/src/pro/binance.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -215,13 +215,13 @@ console.log(version, Object.keys(exchanges));
|
|
|
215
215
|
|
|
216
216
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
|
217
217
|
|
|
218
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.
|
|
219
|
-
* unpkg: https://unpkg.com/ccxt@4.0.
|
|
218
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.94/dist/ccxt.browser.js
|
|
219
|
+
* unpkg: https://unpkg.com/ccxt@4.0.94/dist/ccxt.browser.js
|
|
220
220
|
|
|
221
221
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
|
222
222
|
|
|
223
223
|
```HTML
|
|
224
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.
|
|
224
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.94/dist/ccxt.browser.js"></script>
|
|
225
225
|
```
|
|
226
226
|
|
|
227
227
|
Creates a global `ccxt` object:
|
package/dist/ccxt.browser.js
CHANGED
|
@@ -13861,6 +13861,7 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
13861
13861
|
'options': {
|
|
13862
13862
|
'accountsByType': {
|
|
13863
13863
|
'spot': 'SPOT',
|
|
13864
|
+
'fund': 'FUND',
|
|
13864
13865
|
'funding': 'FUND',
|
|
13865
13866
|
'future': 'CONTRACT',
|
|
13866
13867
|
'swap': 'CONTRACT',
|
|
@@ -15320,7 +15321,7 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
15320
15321
|
const txid = this.safeString(transaction, 'txid');
|
|
15321
15322
|
const address = this.safeString(transaction, 'target_address');
|
|
15322
15323
|
const tag = this.safeString(transaction, 'memo');
|
|
15323
|
-
const type = ('customer_id' in transaction) ? '
|
|
15324
|
+
const type = ('customer_id' in transaction) ? 'withdrawal' : 'deposit';
|
|
15324
15325
|
return {
|
|
15325
15326
|
'info': transaction,
|
|
15326
15327
|
'id': id,
|
|
@@ -15449,10 +15450,11 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
15449
15450
|
* @method
|
|
15450
15451
|
* @name bigone#transfer
|
|
15451
15452
|
* @description transfer currency internally between wallets on the same account
|
|
15453
|
+
* @see https://open.big.one/docs/spot_transfer.html#transfer-of-user
|
|
15452
15454
|
* @param {string} code unified currency code
|
|
15453
15455
|
* @param {float} amount amount to transfer
|
|
15454
|
-
* @param {string} fromAccount
|
|
15455
|
-
* @param {string} toAccount
|
|
15456
|
+
* @param {string} fromAccount 'SPOT', 'FUND', or 'CONTRACT'
|
|
15457
|
+
* @param {string} toAccount 'SPOT', 'FUND', or 'CONTRACT'
|
|
15456
15458
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
15457
15459
|
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
15458
15460
|
*/
|
|
@@ -49394,42 +49396,42 @@ class bitopro extends _abstract_bitopro_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
49394
49396
|
},
|
|
49395
49397
|
'api': {
|
|
49396
49398
|
'public': {
|
|
49397
|
-
'get':
|
|
49398
|
-
'order-book/{pair}',
|
|
49399
|
-
'tickers',
|
|
49400
|
-
'tickers/{pair}',
|
|
49401
|
-
'trades/{pair}',
|
|
49402
|
-
'provisioning/currencies',
|
|
49403
|
-
'provisioning/trading-pairs',
|
|
49404
|
-
'provisioning/limitations-and-fees',
|
|
49405
|
-
'trading-history/{pair}',
|
|
49406
|
-
|
|
49399
|
+
'get': {
|
|
49400
|
+
'order-book/{pair}': 1,
|
|
49401
|
+
'tickers': 1,
|
|
49402
|
+
'tickers/{pair}': 1,
|
|
49403
|
+
'trades/{pair}': 1,
|
|
49404
|
+
'provisioning/currencies': 1,
|
|
49405
|
+
'provisioning/trading-pairs': 1,
|
|
49406
|
+
'provisioning/limitations-and-fees': 1,
|
|
49407
|
+
'trading-history/{pair}': 1,
|
|
49408
|
+
},
|
|
49407
49409
|
},
|
|
49408
49410
|
'private': {
|
|
49409
|
-
'get':
|
|
49410
|
-
'accounts/balance',
|
|
49411
|
-
'orders/history',
|
|
49412
|
-
'orders/all/{pair}',
|
|
49413
|
-
'orders/trades/{pair}',
|
|
49414
|
-
'orders/{pair}/{orderId}',
|
|
49415
|
-
'wallet/withdraw/{currency}/{serial}',
|
|
49416
|
-
'wallet/withdraw/{currency}/id/{id}',
|
|
49417
|
-
'wallet/depositHistory/{currency}',
|
|
49418
|
-
'wallet/withdrawHistory/{currency}',
|
|
49419
|
-
|
|
49420
|
-
'post':
|
|
49421
|
-
'orders/{pair}',
|
|
49422
|
-
'orders/batch',
|
|
49423
|
-
'wallet/withdraw/{currency}',
|
|
49424
|
-
|
|
49425
|
-
'put':
|
|
49426
|
-
'orders',
|
|
49427
|
-
|
|
49428
|
-
'delete':
|
|
49429
|
-
'orders/{pair}/{id}',
|
|
49430
|
-
'orders/all',
|
|
49431
|
-
'orders/{pair}',
|
|
49432
|
-
|
|
49411
|
+
'get': {
|
|
49412
|
+
'accounts/balance': 1,
|
|
49413
|
+
'orders/history': 1,
|
|
49414
|
+
'orders/all/{pair}': 1,
|
|
49415
|
+
'orders/trades/{pair}': 1,
|
|
49416
|
+
'orders/{pair}/{orderId}': 1,
|
|
49417
|
+
'wallet/withdraw/{currency}/{serial}': 1,
|
|
49418
|
+
'wallet/withdraw/{currency}/id/{id}': 1,
|
|
49419
|
+
'wallet/depositHistory/{currency}': 1,
|
|
49420
|
+
'wallet/withdrawHistory/{currency}': 1,
|
|
49421
|
+
},
|
|
49422
|
+
'post': {
|
|
49423
|
+
'orders/{pair}': 1 / 2,
|
|
49424
|
+
'orders/batch': 20 / 3,
|
|
49425
|
+
'wallet/withdraw/{currency}': 10, // 60/m => 1/s => 10/1 = 10
|
|
49426
|
+
},
|
|
49427
|
+
'put': {
|
|
49428
|
+
'orders': 5, // 2/s => 10/2 = 5
|
|
49429
|
+
},
|
|
49430
|
+
'delete': {
|
|
49431
|
+
'orders/{pair}/{id}': 2 / 3,
|
|
49432
|
+
'orders/all': 5,
|
|
49433
|
+
'orders/{pair}': 5, // 2/s => 10/2 = 5
|
|
49434
|
+
},
|
|
49433
49435
|
},
|
|
49434
49436
|
},
|
|
49435
49437
|
'fees': {
|
|
@@ -126898,6 +126900,7 @@ class hollaex extends _abstract_hollaex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
126898
126900
|
'createMarketBuyOrder': true,
|
|
126899
126901
|
'createMarketSellOrder': true,
|
|
126900
126902
|
'createOrder': true,
|
|
126903
|
+
'createPostOnlyOrder': true,
|
|
126901
126904
|
'createReduceOnlyOrder': false,
|
|
126902
126905
|
'createStopLimitOrder': true,
|
|
126903
126906
|
'createStopMarketOrder': true,
|
|
@@ -127986,6 +127989,8 @@ class hollaex extends _abstract_hollaex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
127986
127989
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
127987
127990
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
127988
127991
|
* @param {object} [params] extra parameters specific to the hollaex api endpoint
|
|
127992
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
127993
|
+
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
127989
127994
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
127990
127995
|
*/
|
|
127991
127996
|
await this.loadMarkets();
|
|
@@ -133551,10 +133556,10 @@ class huobi extends _abstract_huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
133551
133556
|
}
|
|
133552
133557
|
}
|
|
133553
133558
|
else {
|
|
133554
|
-
const clientOrderId = this.
|
|
133559
|
+
const clientOrderId = this.safeInteger2(params, 'client_order_id', 'clientOrderId');
|
|
133555
133560
|
if (clientOrderId !== undefined) {
|
|
133556
133561
|
request['client_order_id'] = clientOrderId;
|
|
133557
|
-
params = this.omit(params, ['
|
|
133562
|
+
params = this.omit(params, ['clientOrderId']);
|
|
133558
133563
|
}
|
|
133559
133564
|
if (type === 'limit' || type === 'ioc' || type === 'fok' || type === 'post_only') {
|
|
133560
133565
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
@@ -180077,7 +180082,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
180077
180082
|
else {
|
|
180078
180083
|
request['slOrdPx'] = '-1'; // market sl order
|
|
180079
180084
|
}
|
|
180080
|
-
const stopLossTriggerPriceType = this.safeString2(stopLoss, 'triggerPriceType', 'slTriggerPxType');
|
|
180085
|
+
const stopLossTriggerPriceType = this.safeString2(stopLoss, 'triggerPriceType', 'slTriggerPxType', 'last');
|
|
180081
180086
|
if (stopLossTriggerPriceType !== undefined) {
|
|
180082
180087
|
if ((stopLossTriggerPriceType !== 'last') && (stopLossTriggerPriceType !== 'index') && (stopLossTriggerPriceType !== 'mark')) {
|
|
180083
180088
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' createOrder() stop loss trigger price type must be one of "last", "index" or "mark"');
|
|
@@ -180117,7 +180122,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
180117
180122
|
else {
|
|
180118
180123
|
request['tpOrdPx'] = '-1'; // market tp order
|
|
180119
180124
|
}
|
|
180120
|
-
const takeProfitTriggerPriceType = this.safeString2(
|
|
180125
|
+
const takeProfitTriggerPriceType = this.safeString2(takeProfit, 'triggerPriceType', 'tpTriggerPxType', 'last');
|
|
180121
180126
|
if (takeProfitTriggerPriceType !== undefined) {
|
|
180122
180127
|
if ((takeProfitTriggerPriceType !== 'last') && (takeProfitTriggerPriceType !== 'index') && (takeProfitTriggerPriceType !== 'mark')) {
|
|
180123
180128
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' createOrder() take profit trigger price type must be one of "last", "index" or "mark"');
|
|
@@ -195372,8 +195377,8 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
195372
195377
|
for (let i = 0; i < symbols.length; i++) {
|
|
195373
195378
|
const symbol = symbols[i];
|
|
195374
195379
|
const market = this.market(symbol);
|
|
195375
|
-
const
|
|
195376
|
-
subParams.push(
|
|
195380
|
+
const symbolHash = market['lowercaseId'] + '@' + name + '@' + watchOrderBookRate + 'ms';
|
|
195381
|
+
subParams.push(symbolHash);
|
|
195377
195382
|
}
|
|
195378
195383
|
const request = {
|
|
195379
195384
|
'method': 'SUBSCRIBE',
|
|
@@ -195587,7 +195592,7 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
195587
195592
|
delete this.orderbooks[symbol];
|
|
195588
195593
|
}
|
|
195589
195594
|
this.orderbooks[symbol] = this.orderBook({}, limit);
|
|
195590
|
-
subscription
|
|
195595
|
+
subscription = this.extend(subscription, { 'symbol': symbol });
|
|
195591
195596
|
// fetch the snapshot in a separate async call
|
|
195592
195597
|
this.spawn(this.fetchOrderBookSnapshot, client, message, subscription);
|
|
195593
195598
|
}
|
|
@@ -275531,7 +275536,7 @@ SOFTWARE.
|
|
|
275531
275536
|
|
|
275532
275537
|
//-----------------------------------------------------------------------------
|
|
275533
275538
|
// this is updated by vss.js when building
|
|
275534
|
-
const version = '4.0.
|
|
275539
|
+
const version = '4.0.94';
|
|
275535
275540
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
275536
275541
|
//-----------------------------------------------------------------------------
|
|
275537
275542
|
|