ccxt 4.1.94 → 4.1.95
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 +33 -25
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bitget.js +32 -24
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/bitget.js +32 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -208,13 +208,13 @@ console.log(version, Object.keys(exchanges));
|
|
|
208
208
|
|
|
209
209
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
|
210
210
|
|
|
211
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.
|
|
212
|
-
* unpkg: https://unpkg.com/ccxt@4.1.
|
|
211
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.95/dist/ccxt.browser.js
|
|
212
|
+
* unpkg: https://unpkg.com/ccxt@4.1.95/dist/ccxt.browser.js
|
|
213
213
|
|
|
214
214
|
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.
|
|
215
215
|
|
|
216
216
|
```HTML
|
|
217
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.
|
|
217
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.95/dist/ccxt.browser.js"></script>
|
|
218
218
|
```
|
|
219
219
|
|
|
220
220
|
Creates a global `ccxt` object:
|
package/dist/ccxt.browser.js
CHANGED
|
@@ -45276,26 +45276,35 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45276
45276
|
* @param {string} [params.isPlan] *swap only* 'plan' for stop orders and 'profit_loss' for tp/sl orders, default is 'plan'
|
|
45277
45277
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
45278
45278
|
*/
|
|
45279
|
-
if (symbol === undefined) {
|
|
45280
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
45281
|
-
}
|
|
45282
45279
|
await this.loadMarkets();
|
|
45283
45280
|
const sandboxMode = this.safeValue(this.options, 'sandboxMode', false);
|
|
45284
45281
|
let market = undefined;
|
|
45285
|
-
|
|
45286
|
-
|
|
45287
|
-
|
|
45282
|
+
let type = undefined;
|
|
45283
|
+
let request = {};
|
|
45284
|
+
let marginMode = undefined;
|
|
45285
|
+
[marginMode, params] = this.handleMarginModeAndParams('fetchOpenOrders', params);
|
|
45286
|
+
if (symbol !== undefined) {
|
|
45287
|
+
if (sandboxMode) {
|
|
45288
|
+
const sandboxSymbol = this.convertSymbolForSandbox(symbol);
|
|
45289
|
+
market = this.market(sandboxSymbol);
|
|
45290
|
+
}
|
|
45291
|
+
else {
|
|
45292
|
+
market = this.market(symbol);
|
|
45293
|
+
}
|
|
45294
|
+
request['symbol'] = market['id'];
|
|
45295
|
+
const defaultType = this.safeString2(this.options, 'fetchOpenOrders', 'defaultType', 'spot');
|
|
45296
|
+
const marketType = ('type' in market) ? market['type'] : defaultType;
|
|
45297
|
+
type = this.safeString(params, 'type', marketType);
|
|
45288
45298
|
}
|
|
45289
45299
|
else {
|
|
45290
|
-
|
|
45300
|
+
const defaultType = this.safeString2(this.options, 'fetchOpenOrders', 'defaultType', 'spot');
|
|
45301
|
+
type = this.safeString(params, 'type', defaultType);
|
|
45291
45302
|
}
|
|
45292
|
-
let marginMode = undefined;
|
|
45293
|
-
[marginMode, params] = this.handleMarginModeAndParams('fetchOpenOrders', params);
|
|
45294
45303
|
let paginate = false;
|
|
45295
45304
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
|
|
45296
45305
|
if (paginate) {
|
|
45297
45306
|
let cursorReceived = undefined;
|
|
45298
|
-
if (
|
|
45307
|
+
if (type === 'spot') {
|
|
45299
45308
|
if (marginMode !== undefined) {
|
|
45300
45309
|
cursorReceived = 'minId';
|
|
45301
45310
|
}
|
|
@@ -45305,9 +45314,6 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45305
45314
|
}
|
|
45306
45315
|
return await this.fetchPaginatedCallCursor('fetchOpenOrders', symbol, since, limit, params, cursorReceived, 'idLessThan');
|
|
45307
45316
|
}
|
|
45308
|
-
let request = {
|
|
45309
|
-
'symbol': market['id'],
|
|
45310
|
-
};
|
|
45311
45317
|
let response = undefined;
|
|
45312
45318
|
const stop = this.safeValue2(params, 'stop', 'trigger');
|
|
45313
45319
|
params = this.omit(params, ['stop', 'trigger']);
|
|
@@ -45318,46 +45324,48 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45318
45324
|
if (limit !== undefined) {
|
|
45319
45325
|
request['limit'] = limit;
|
|
45320
45326
|
}
|
|
45321
|
-
if ((
|
|
45327
|
+
if ((type === 'swap') || (type === 'future') || (marginMode !== undefined)) {
|
|
45322
45328
|
const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
|
|
45323
45329
|
params = this.omit(params, 'clientOrderId');
|
|
45324
45330
|
if (clientOrderId !== undefined) {
|
|
45325
45331
|
request['clientOid'] = clientOrderId;
|
|
45326
45332
|
}
|
|
45327
45333
|
}
|
|
45328
|
-
|
|
45334
|
+
let query = undefined;
|
|
45335
|
+
query = this.omit(params, ['type']);
|
|
45336
|
+
if (type === 'spot') {
|
|
45329
45337
|
if (marginMode !== undefined) {
|
|
45330
45338
|
if (since === undefined) {
|
|
45331
45339
|
since = this.milliseconds() - 7776000000;
|
|
45332
45340
|
request['startTime'] = since;
|
|
45333
45341
|
}
|
|
45334
45342
|
if (marginMode === 'isolated') {
|
|
45335
|
-
response = await this.privateMarginGetV2MarginIsolatedOpenOrders(this.extend(request,
|
|
45343
|
+
response = await this.privateMarginGetV2MarginIsolatedOpenOrders(this.extend(request, query));
|
|
45336
45344
|
}
|
|
45337
45345
|
else if (marginMode === 'cross') {
|
|
45338
|
-
response = await this.privateMarginGetV2MarginCrossedOpenOrders(this.extend(request,
|
|
45346
|
+
response = await this.privateMarginGetV2MarginCrossedOpenOrders(this.extend(request, query));
|
|
45339
45347
|
}
|
|
45340
45348
|
}
|
|
45341
45349
|
else {
|
|
45342
45350
|
if (stop) {
|
|
45343
|
-
response = await this.privateSpotGetV2SpotTradeCurrentPlanOrder(this.extend(request,
|
|
45351
|
+
response = await this.privateSpotGetV2SpotTradeCurrentPlanOrder(this.extend(request, query));
|
|
45344
45352
|
}
|
|
45345
45353
|
else {
|
|
45346
|
-
response = await this.privateSpotGetV2SpotTradeUnfilledOrders(this.extend(request,
|
|
45354
|
+
response = await this.privateSpotGetV2SpotTradeUnfilledOrders(this.extend(request, query));
|
|
45347
45355
|
}
|
|
45348
45356
|
}
|
|
45349
45357
|
}
|
|
45350
45358
|
else {
|
|
45351
45359
|
let productType = undefined;
|
|
45352
|
-
[productType,
|
|
45360
|
+
[productType, query] = this.handleProductTypeAndParams(market, query);
|
|
45353
45361
|
request['productType'] = productType;
|
|
45354
45362
|
if (stop) {
|
|
45355
|
-
const planType = this.safeString(
|
|
45363
|
+
const planType = this.safeString(query, 'planType', 'normal_plan');
|
|
45356
45364
|
request['planType'] = planType;
|
|
45357
|
-
response = await this.privateMixGetV2MixOrderOrdersPlanPending(this.extend(request,
|
|
45365
|
+
response = await this.privateMixGetV2MixOrderOrdersPlanPending(this.extend(request, query));
|
|
45358
45366
|
}
|
|
45359
45367
|
else {
|
|
45360
|
-
response = await this.privateMixGetV2MixOrderOrdersPending(this.extend(request,
|
|
45368
|
+
response = await this.privateMixGetV2MixOrderOrdersPending(this.extend(request, query));
|
|
45361
45369
|
}
|
|
45362
45370
|
}
|
|
45363
45371
|
//
|
|
@@ -45536,7 +45544,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45536
45544
|
// }
|
|
45537
45545
|
//
|
|
45538
45546
|
const data = this.safeValue(response, 'data');
|
|
45539
|
-
if (
|
|
45547
|
+
if (type === 'spot') {
|
|
45540
45548
|
if ((marginMode !== undefined) || stop) {
|
|
45541
45549
|
const resultList = this.safeValue(data, 'orderList', []);
|
|
45542
45550
|
return this.parseOrders(resultList, market, since, limit);
|
|
@@ -288427,7 +288435,7 @@ SOFTWARE.
|
|
|
288427
288435
|
|
|
288428
288436
|
//-----------------------------------------------------------------------------
|
|
288429
288437
|
// this is updated by vss.js when building
|
|
288430
|
-
const version = '4.1.
|
|
288438
|
+
const version = '4.1.95';
|
|
288431
288439
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
288432
288440
|
//-----------------------------------------------------------------------------
|
|
288433
288441
|
|