ccxt 4.5.36 → 4.5.38
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.min.js +18 -20
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +3 -0
- package/dist/cjs/src/bitmex.js +19 -3
- package/dist/cjs/src/bitstamp.js +9 -0
- package/dist/cjs/src/bybit.js +2 -1
- package/dist/cjs/src/gate.js +4 -2
- package/dist/cjs/src/htx.js +67 -12
- package/dist/cjs/src/hyperliquid.js +250 -2
- package/dist/cjs/src/krakenfutures.js +74 -6
- package/dist/cjs/src/kucoin.js +43 -4
- package/dist/cjs/src/mexc.js +2 -2
- package/dist/cjs/src/pro/aster.js +11 -2
- package/dist/cjs/src/pro/binance.js +4 -2
- package/dist/cjs/src/pro/bitmex.js +2 -1
- package/dist/cjs/src/pro/bybit.js +4 -2
- package/dist/cjs/src/pro/gate.js +2 -1
- package/dist/cjs/src/pro/okx.js +4 -2
- package/dist/cjs/src/whitebit.js +14 -4
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitstamp.d.ts +8 -0
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/kucoin.d.ts +33 -1
- package/js/src/abstract/kucoinfutures.d.ts +33 -1
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +3 -0
- package/js/src/bitmex.js +19 -3
- package/js/src/bitstamp.js +9 -0
- package/js/src/bybit.js +2 -1
- package/js/src/gate.js +4 -2
- package/js/src/htx.d.ts +5 -2
- package/js/src/htx.js +67 -12
- package/js/src/hyperliquid.d.ts +64 -0
- package/js/src/hyperliquid.js +251 -3
- package/js/src/krakenfutures.js +74 -6
- package/js/src/kucoin.js +43 -4
- package/js/src/mexc.js +2 -2
- package/js/src/pro/aster.js +11 -2
- package/js/src/pro/binance.js +4 -2
- package/js/src/pro/bitmex.js +2 -1
- package/js/src/pro/bybit.js +4 -2
- package/js/src/pro/gate.js +2 -1
- package/js/src/pro/okx.js +4 -2
- package/js/src/whitebit.d.ts +1 -0
- package/js/src/whitebit.js +14 -4
- package/package.json +1 -1
package/js/src/pro/okx.js
CHANGED
|
@@ -759,7 +759,8 @@ export default class okx extends okxRest {
|
|
|
759
759
|
const liquidation = this.parseWsLiquidation(rawLiquidation);
|
|
760
760
|
const symbol = this.safeString(liquidation, 'symbol');
|
|
761
761
|
if (this.liquidations === undefined) {
|
|
762
|
-
this.
|
|
762
|
+
const limit = this.safeInteger(this.options, 'liquidationsLimit', 1000);
|
|
763
|
+
this.liquidations = new ArrayCache(limit);
|
|
763
764
|
}
|
|
764
765
|
const cache = this.liquidations;
|
|
765
766
|
cache.append(liquidation);
|
|
@@ -856,7 +857,8 @@ export default class okx extends okxRest {
|
|
|
856
857
|
const liquidation = this.parseWsMyLiquidation(rawLiquidation);
|
|
857
858
|
const symbol = this.safeString(liquidation, 'symbol');
|
|
858
859
|
if (this.liquidations === undefined) {
|
|
859
|
-
this.
|
|
860
|
+
const limit = this.safeInteger(this.options, 'liquidationsLimit', 1000);
|
|
861
|
+
this.liquidations = new ArrayCache(limit);
|
|
860
862
|
}
|
|
861
863
|
const cache = this.liquidations;
|
|
862
864
|
cache.append(liquidation);
|
package/js/src/whitebit.d.ts
CHANGED
|
@@ -335,6 +335,7 @@ export default class whitebit extends Exchange {
|
|
|
335
335
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
336
336
|
parseOrderType(type: Str): string;
|
|
337
337
|
parseOrder(order: Dict, market?: Market): Order;
|
|
338
|
+
parseOrderStatus(status: Str): string;
|
|
338
339
|
/**
|
|
339
340
|
* @method
|
|
340
341
|
* @name whitebit#fetchOrderTrades
|
package/js/src/whitebit.js
CHANGED
|
@@ -515,6 +515,7 @@ export default class whitebit extends Exchange {
|
|
|
515
515
|
const taker = Precise.stringDiv(takerFeeRate, '100');
|
|
516
516
|
const makerFeeRate = this.safeString(market, 'makerFee');
|
|
517
517
|
const maker = Precise.stringDiv(makerFeeRate, '100');
|
|
518
|
+
const isSpot = !swap;
|
|
518
519
|
return {
|
|
519
520
|
'id': id,
|
|
520
521
|
'symbol': symbol,
|
|
@@ -525,7 +526,7 @@ export default class whitebit extends Exchange {
|
|
|
525
526
|
'quoteId': quoteId,
|
|
526
527
|
'settleId': settleId,
|
|
527
528
|
'type': type,
|
|
528
|
-
'spot':
|
|
529
|
+
'spot': isSpot,
|
|
529
530
|
'margin': margin,
|
|
530
531
|
'swap': swap,
|
|
531
532
|
'future': false,
|
|
@@ -536,7 +537,7 @@ export default class whitebit extends Exchange {
|
|
|
536
537
|
'inverse': inverse,
|
|
537
538
|
'taker': this.parseNumber(taker),
|
|
538
539
|
'maker': this.parseNumber(maker),
|
|
539
|
-
'contractSize': contractSize,
|
|
540
|
+
'contractSize': isSpot ? undefined : contractSize,
|
|
540
541
|
'expiry': undefined,
|
|
541
542
|
'expiryDatetime': undefined,
|
|
542
543
|
'strike': undefined,
|
|
@@ -1800,7 +1801,7 @@ export default class whitebit extends Exchange {
|
|
|
1800
1801
|
// "time":1737380046
|
|
1801
1802
|
// }
|
|
1802
1803
|
//
|
|
1803
|
-
return this.
|
|
1804
|
+
return this.safeIntegerProduct(response, 'time', 1000);
|
|
1804
1805
|
}
|
|
1805
1806
|
/**
|
|
1806
1807
|
* @method
|
|
@@ -2437,7 +2438,7 @@ export default class whitebit extends Exchange {
|
|
|
2437
2438
|
'lastTradeTimestamp': lastTradeTimestamp,
|
|
2438
2439
|
'timeInForce': undefined,
|
|
2439
2440
|
'postOnly': undefined,
|
|
2440
|
-
'status':
|
|
2441
|
+
'status': this.parseOrderStatus(this.safeString(order, 'status')),
|
|
2441
2442
|
'side': side,
|
|
2442
2443
|
'price': price,
|
|
2443
2444
|
'type': orderType,
|
|
@@ -2451,6 +2452,15 @@ export default class whitebit extends Exchange {
|
|
|
2451
2452
|
'trades': undefined,
|
|
2452
2453
|
}, market);
|
|
2453
2454
|
}
|
|
2455
|
+
parseOrderStatus(status) {
|
|
2456
|
+
const statuses = {
|
|
2457
|
+
'CANCELED': 'canceled',
|
|
2458
|
+
'OPEN': 'open',
|
|
2459
|
+
'PARTIALLY_FILLED': 'open',
|
|
2460
|
+
'FILLED': 'closed',
|
|
2461
|
+
};
|
|
2462
|
+
return this.safeStringLower(statuses, status, status);
|
|
2463
|
+
}
|
|
2454
2464
|
/**
|
|
2455
2465
|
* @method
|
|
2456
2466
|
* @name whitebit#fetchOrderTrades
|
package/package.json
CHANGED