ccxt 4.3.28 → 4.3.30
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 +30 -0
- package/dist/ccxt.browser.min.js.LICENSE.txt +12 -0
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +6 -0
- package/dist/cjs/src/base/ws/OrderBookSide.js +4 -4
- package/dist/cjs/src/bingx.js +98 -84
- package/dist/cjs/src/bitmart.js +72 -0
- package/dist/cjs/src/coinex.js +260 -311
- package/dist/cjs/src/kucoin.js +1 -0
- package/dist/cjs/src/pro/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +2 -2
- package/dist/cjs/src/pro/bitmex.js +3 -3
- package/dist/cjs/src/pro/blockchaincom.js +2 -2
- package/dist/cjs/src/pro/cryptocom.js +4 -4
- package/dist/cjs/src/pro/deribit.js +9 -9
- package/dist/cjs/src/pro/idex.js +1 -1
- package/dist/cjs/src/pro/luno.js +4 -5
- package/dist/cjs/src/pro/mexc.js +2 -2
- package/dist/cjs/src/whitebit.js +55 -5
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +7 -0
- package/js/src/abstract/bitmart.d.ts +1 -0
- package/js/src/base/Exchange.js +6 -0
- package/js/src/base/ws/Cache.d.ts +1 -1
- package/js/src/base/ws/OrderBookSide.d.ts +4 -5
- package/js/src/base/ws/OrderBookSide.js +4 -4
- package/js/src/bingx.js +98 -84
- package/js/src/bitmart.d.ts +2 -1
- package/js/src/bitmart.js +72 -0
- package/js/src/coinex.d.ts +5 -6
- package/js/src/coinex.js +260 -311
- package/js/src/kucoin.js +1 -0
- package/js/src/pro/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.js +2 -2
- package/js/src/pro/bitmex.js +3 -3
- package/js/src/pro/blockchaincom.js +2 -2
- package/js/src/pro/cryptocom.js +4 -4
- package/js/src/pro/deribit.js +9 -9
- package/js/src/pro/idex.js +1 -1
- package/js/src/pro/luno.js +4 -5
- package/js/src/pro/mexc.js +2 -2
- package/js/src/whitebit.d.ts +2 -0
- package/js/src/whitebit.js +55 -5
- package/package.json +4 -2
package/js/src/kucoin.js
CHANGED
|
@@ -430,6 +430,7 @@ export default class kucoin extends Exchange {
|
|
|
430
430
|
'The withdrawal amount is below the minimum requirement.': ExchangeError,
|
|
431
431
|
'Unsuccessful! Exceeded the max. funds out-transfer limit': InsufficientFunds,
|
|
432
432
|
'The amount increment is invalid.': BadRequest,
|
|
433
|
+
'The quantity is below the minimum requirement.': InvalidOrder,
|
|
433
434
|
'400': BadRequest,
|
|
434
435
|
'401': AuthenticationError,
|
|
435
436
|
'403': NotSupported,
|
package/js/src/pro/bitfinex.js
CHANGED
|
@@ -328,7 +328,7 @@ export default class bitfinex extends bitfinexRest {
|
|
|
328
328
|
const size = (delta2Value < 0) ? -delta2Value : delta2Value;
|
|
329
329
|
const side = (delta2Value < 0) ? 'asks' : 'bids';
|
|
330
330
|
const bookside = orderbook[side];
|
|
331
|
-
bookside.
|
|
331
|
+
bookside.storeArray([price, size, id]);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
else {
|
|
@@ -339,7 +339,7 @@ export default class bitfinex extends bitfinexRest {
|
|
|
339
339
|
const size = (delta2 < 0) ? -delta2 : delta2;
|
|
340
340
|
const side = (delta2 < 0) ? 'asks' : 'bids';
|
|
341
341
|
const countedBookSide = orderbook[side];
|
|
342
|
-
countedBookSide.
|
|
342
|
+
countedBookSide.storeArray([delta[0], size, delta[1]]);
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
client.resolve(orderbook, messageHash);
|
|
@@ -355,14 +355,14 @@ export default class bitfinex extends bitfinexRest {
|
|
|
355
355
|
const bookside = orderbook[side];
|
|
356
356
|
// price = 0 means that you have to remove the order from your book
|
|
357
357
|
const amount = Precise.stringGt(price, '0') ? size : '0';
|
|
358
|
-
bookside.
|
|
358
|
+
bookside.storeArray([this.parseNumber(price), this.parseNumber(amount), id]);
|
|
359
359
|
}
|
|
360
360
|
else {
|
|
361
361
|
const message3Value = message[3];
|
|
362
362
|
const size = (message3Value < 0) ? -message3Value : message3Value;
|
|
363
363
|
const side = (message3Value < 0) ? 'asks' : 'bids';
|
|
364
364
|
const countedBookSide = orderbook[side];
|
|
365
|
-
countedBookSide.
|
|
365
|
+
countedBookSide.storeArray([message[1], size, message[2]]);
|
|
366
366
|
}
|
|
367
367
|
client.resolve(orderbook, messageHash);
|
|
368
368
|
}
|
package/js/src/pro/bitfinex2.js
CHANGED
|
@@ -633,7 +633,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
633
633
|
// price = 0 means that you have to remove the order from your book
|
|
634
634
|
const amount = Precise.stringGt(price, '0') ? size : '0';
|
|
635
635
|
const idString = this.safeString(deltas, 0);
|
|
636
|
-
bookside.
|
|
636
|
+
bookside.storeArray([this.parseNumber(price), this.parseNumber(amount), idString]);
|
|
637
637
|
}
|
|
638
638
|
else {
|
|
639
639
|
const amount = this.safeString(deltas, 2);
|
|
@@ -642,7 +642,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
642
642
|
const size = Precise.stringLt(amount, '0') ? Precise.stringNeg(amount) : amount;
|
|
643
643
|
const side = Precise.stringLt(amount, '0') ? 'asks' : 'bids';
|
|
644
644
|
const bookside = orderbookItem[side];
|
|
645
|
-
bookside.
|
|
645
|
+
bookside.storeArray([this.parseNumber(price), this.parseNumber(size), this.parseNumber(counter)]);
|
|
646
646
|
}
|
|
647
647
|
client.resolve(orderbook, messageHash);
|
|
648
648
|
}
|
package/js/src/pro/bitmex.js
CHANGED
|
@@ -1435,7 +1435,7 @@ export default class bitmex extends bitmexRest {
|
|
|
1435
1435
|
const data = this.safeValue(message, 'data', []);
|
|
1436
1436
|
// if it's an initial snapshot
|
|
1437
1437
|
if (action === 'partial') {
|
|
1438
|
-
const filter = this.
|
|
1438
|
+
const filter = this.safeDict(message, 'filter', {});
|
|
1439
1439
|
const marketId = this.safeValue(filter, 'symbol');
|
|
1440
1440
|
const market = this.safeMarket(marketId);
|
|
1441
1441
|
const symbol = market['symbol'];
|
|
@@ -1457,7 +1457,7 @@ export default class bitmex extends bitmexRest {
|
|
|
1457
1457
|
let side = this.safeString(data[i], 'side');
|
|
1458
1458
|
side = (side === 'Buy') ? 'bids' : 'asks';
|
|
1459
1459
|
const bookside = orderbook[side];
|
|
1460
|
-
bookside.
|
|
1460
|
+
bookside.storeArray([price, size, id]);
|
|
1461
1461
|
const datetime = this.safeString(data[i], 'timestamp');
|
|
1462
1462
|
orderbook['timestamp'] = this.parse8601(datetime);
|
|
1463
1463
|
orderbook['datetime'] = datetime;
|
|
@@ -1482,7 +1482,7 @@ export default class bitmex extends bitmexRest {
|
|
|
1482
1482
|
let side = this.safeString(data[i], 'side');
|
|
1483
1483
|
side = (side === 'Buy') ? 'bids' : 'asks';
|
|
1484
1484
|
const bookside = orderbook[side];
|
|
1485
|
-
bookside.
|
|
1485
|
+
bookside.storeArray([price, size, id]);
|
|
1486
1486
|
const datetime = this.safeString(data[i], 'timestamp');
|
|
1487
1487
|
orderbook['timestamp'] = this.parse8601(datetime);
|
|
1488
1488
|
orderbook['datetime'] = datetime;
|
|
@@ -698,8 +698,8 @@ export default class blockchaincom extends blockchaincomRest {
|
|
|
698
698
|
orderbook.reset(snapshot);
|
|
699
699
|
}
|
|
700
700
|
else if (event === 'updated') {
|
|
701
|
-
const asks = this.
|
|
702
|
-
const bids = this.
|
|
701
|
+
const asks = this.safeList(message, 'asks', []);
|
|
702
|
+
const bids = this.safeList(message, 'bids', []);
|
|
703
703
|
this.handleDeltas(orderbook['asks'], asks);
|
|
704
704
|
this.handleDeltas(orderbook['bids'], bids);
|
|
705
705
|
orderbook['timestamp'] = timestamp;
|
package/js/src/pro/cryptocom.js
CHANGED
|
@@ -131,7 +131,7 @@ export default class cryptocom extends cryptocomRest {
|
|
|
131
131
|
const price = this.safeFloat(delta, 0);
|
|
132
132
|
const amount = this.safeFloat(delta, 1);
|
|
133
133
|
const count = this.safeInteger(delta, 2);
|
|
134
|
-
bookside.
|
|
134
|
+
bookside.storeArray([price, amount, count]);
|
|
135
135
|
}
|
|
136
136
|
handleDeltas(bookside, deltas) {
|
|
137
137
|
for (let i = 0; i < deltas.length; i++) {
|
|
@@ -200,11 +200,11 @@ export default class cryptocom extends cryptocomRest {
|
|
|
200
200
|
let data = this.safeValue(message, 'data');
|
|
201
201
|
data = this.safeValue(data, 0);
|
|
202
202
|
const timestamp = this.safeInteger(data, 't');
|
|
203
|
-
|
|
204
|
-
if (orderbook === undefined) {
|
|
203
|
+
if (!(symbol in this.orderbooks)) {
|
|
205
204
|
const limit = this.safeInteger(message, 'depth');
|
|
206
|
-
|
|
205
|
+
this.orderbooks[symbol] = this.countedOrderBook({}, limit);
|
|
207
206
|
}
|
|
207
|
+
const orderbook = this.orderbooks[symbol];
|
|
208
208
|
const channel = this.safeString(message, 'channel');
|
|
209
209
|
const nonce = this.safeInteger2(data, 'u', 's');
|
|
210
210
|
let books = data;
|
package/js/src/pro/deribit.js
CHANGED
|
@@ -510,12 +510,12 @@ export default class deribit extends deribitRest {
|
|
|
510
510
|
const marketId = this.safeString(data, 'instrument_name');
|
|
511
511
|
const symbol = this.safeSymbol(marketId);
|
|
512
512
|
const timestamp = this.safeInteger(data, 'timestamp');
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
storedOrderBook = this.countedOrderBook();
|
|
513
|
+
if (!(symbol in this.orderbooks)) {
|
|
514
|
+
this.orderbooks[symbol] = this.countedOrderBook();
|
|
516
515
|
}
|
|
517
|
-
const
|
|
518
|
-
const
|
|
516
|
+
const storedOrderBook = this.orderbooks[symbol];
|
|
517
|
+
const asks = this.safeList(data, 'asks', []);
|
|
518
|
+
const bids = this.safeList(data, 'bids', []);
|
|
519
519
|
this.handleDeltas(storedOrderBook['asks'], asks);
|
|
520
520
|
this.handleDeltas(storedOrderBook['bids'], bids);
|
|
521
521
|
storedOrderBook['nonce'] = timestamp;
|
|
@@ -527,8 +527,8 @@ export default class deribit extends deribitRest {
|
|
|
527
527
|
client.resolve(storedOrderBook, messageHash);
|
|
528
528
|
}
|
|
529
529
|
cleanOrderBook(data) {
|
|
530
|
-
const bids = this.
|
|
531
|
-
const asks = this.
|
|
530
|
+
const bids = this.safeList(data, 'bids', []);
|
|
531
|
+
const asks = this.safeList(data, 'asks', []);
|
|
532
532
|
const cleanedBids = [];
|
|
533
533
|
for (let i = 0; i < bids.length; i++) {
|
|
534
534
|
cleanedBids.push([bids[i][1], bids[i][2]]);
|
|
@@ -545,10 +545,10 @@ export default class deribit extends deribitRest {
|
|
|
545
545
|
const price = delta[1];
|
|
546
546
|
const amount = delta[2];
|
|
547
547
|
if (delta[0] === 'new' || delta[0] === 'change') {
|
|
548
|
-
bookside.
|
|
548
|
+
bookside.storeArray([price, amount, 1]);
|
|
549
549
|
}
|
|
550
550
|
else if (delta[0] === 'delete') {
|
|
551
|
-
bookside.
|
|
551
|
+
bookside.storeArray([price, amount, 0]);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
handleDeltas(bookside, deltas) {
|
package/js/src/pro/idex.js
CHANGED
|
@@ -484,7 +484,7 @@ export default class idex extends idexRest {
|
|
|
484
484
|
const price = this.safeFloat(delta, 0);
|
|
485
485
|
const amount = this.safeFloat(delta, 1);
|
|
486
486
|
const count = this.safeInteger(delta, 2);
|
|
487
|
-
bookside.
|
|
487
|
+
bookside.storeArray([price, amount, count]);
|
|
488
488
|
}
|
|
489
489
|
handleDeltas(bookside, deltas) {
|
|
490
490
|
for (let i = 0; i < deltas.length; i++) {
|
package/js/src/pro/luno.js
CHANGED
|
@@ -193,12 +193,11 @@ export default class luno extends lunoRest {
|
|
|
193
193
|
//
|
|
194
194
|
const symbol = subscription['symbol'];
|
|
195
195
|
const messageHash = 'orderbook:' + symbol;
|
|
196
|
-
const timestamp = this.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
orderbook = this.indexedOrderBook({});
|
|
200
|
-
this.orderbooks[symbol] = orderbook;
|
|
196
|
+
const timestamp = this.safeInteger(message, 'timestamp');
|
|
197
|
+
if (!(symbol in this.orderbooks)) {
|
|
198
|
+
this.orderbooks[symbol] = this.indexedOrderBook({});
|
|
201
199
|
}
|
|
200
|
+
const orderbook = this.orderbooks[symbol];
|
|
202
201
|
const asks = this.safeValue(message, 'asks');
|
|
203
202
|
if (asks !== undefined) {
|
|
204
203
|
const snapshot = this.customParseOrderBook(message, symbol, timestamp, 'bids', 'asks', 'price', 'volume', 'id');
|
package/js/src/pro/mexc.js
CHANGED
|
@@ -511,8 +511,8 @@ export default class mexc extends mexcRest {
|
|
|
511
511
|
return;
|
|
512
512
|
}
|
|
513
513
|
orderbook['nonce'] = deltaNonce;
|
|
514
|
-
const asks = this.
|
|
515
|
-
const bids = this.
|
|
514
|
+
const asks = this.safeList(delta, 'asks', []);
|
|
515
|
+
const bids = this.safeList(delta, 'bids', []);
|
|
516
516
|
const asksOrderSide = orderbook['asks'];
|
|
517
517
|
const bidsOrderSide = orderbook['bids'];
|
|
518
518
|
this.handleBooksideDelta(asksOrderSide, asks);
|
package/js/src/whitebit.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export default class whitebit extends Exchange {
|
|
|
34
34
|
info: any;
|
|
35
35
|
}>;
|
|
36
36
|
fetchTime(params?: {}): Promise<number>;
|
|
37
|
+
createMarketOrderWithCost(symbol: string, side: OrderSide, cost: number, params?: {}): Promise<Order>;
|
|
38
|
+
createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
37
39
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
38
40
|
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|
|
39
41
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
|
package/js/src/whitebit.js
CHANGED
|
@@ -35,6 +35,9 @@ export default class whitebit extends Exchange {
|
|
|
35
35
|
'cancelAllOrdersAfter': true,
|
|
36
36
|
'cancelOrder': true,
|
|
37
37
|
'cancelOrders': false,
|
|
38
|
+
'createMarketBuyOrderWithCost': true,
|
|
39
|
+
'createMarketOrderWithCost': false,
|
|
40
|
+
'createMarketSellOrderWithCost': false,
|
|
38
41
|
'createOrder': true,
|
|
39
42
|
'createStopLimitOrder': true,
|
|
40
43
|
'createStopMarketOrder': true,
|
|
@@ -1200,6 +1203,33 @@ export default class whitebit extends Exchange {
|
|
|
1200
1203
|
//
|
|
1201
1204
|
return this.safeInteger(response, 'time');
|
|
1202
1205
|
}
|
|
1206
|
+
async createMarketOrderWithCost(symbol, side, cost, params = {}) {
|
|
1207
|
+
/**
|
|
1208
|
+
* @method
|
|
1209
|
+
* @name createMarketOrderWithCost
|
|
1210
|
+
* @description create a market order by providing the symbol, side and cost
|
|
1211
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1212
|
+
* @param {string} side 'buy' or 'sell'
|
|
1213
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
1214
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1215
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1216
|
+
*/
|
|
1217
|
+
params['cost'] = cost;
|
|
1218
|
+
// only buy side is supported
|
|
1219
|
+
return await this.createOrder(symbol, 'market', side, 0, undefined, params);
|
|
1220
|
+
}
|
|
1221
|
+
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
1222
|
+
/**
|
|
1223
|
+
* @method
|
|
1224
|
+
* @name createMarketBuyOrderWithCost
|
|
1225
|
+
* @description create a market buy order by providing the symbol and cost
|
|
1226
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1227
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
1228
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1229
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1230
|
+
*/
|
|
1231
|
+
return await this.createMarketOrderWithCost(symbol, 'buy', cost, params);
|
|
1232
|
+
}
|
|
1203
1233
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1204
1234
|
/**
|
|
1205
1235
|
* @method
|
|
@@ -1216,6 +1246,7 @@ export default class whitebit extends Exchange {
|
|
|
1216
1246
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1217
1247
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1218
1248
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1249
|
+
* @param {float} [params.cost] *market orders only* the cost of the order in units of the base currency
|
|
1219
1250
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1220
1251
|
*/
|
|
1221
1252
|
await this.loadMarkets();
|
|
@@ -1223,8 +1254,18 @@ export default class whitebit extends Exchange {
|
|
|
1223
1254
|
const request = {
|
|
1224
1255
|
'market': market['id'],
|
|
1225
1256
|
'side': side,
|
|
1226
|
-
'amount': this.amountToPrecision(symbol, amount),
|
|
1227
1257
|
};
|
|
1258
|
+
let cost = undefined;
|
|
1259
|
+
[cost, params] = this.handleParamString(params, 'cost');
|
|
1260
|
+
if (cost !== undefined) {
|
|
1261
|
+
if ((side !== 'buy') || (type !== 'market')) {
|
|
1262
|
+
throw new InvalidOrder(this.id + ' createOrder() cost is only supported for market buy orders');
|
|
1263
|
+
}
|
|
1264
|
+
request['amount'] = this.costToPrecision(symbol, cost);
|
|
1265
|
+
}
|
|
1266
|
+
else {
|
|
1267
|
+
request['amount'] = this.amountToPrecision(symbol, amount);
|
|
1268
|
+
}
|
|
1228
1269
|
const clientOrderId = this.safeString2(params, 'clOrdId', 'clientOrderId');
|
|
1229
1270
|
if (clientOrderId === undefined) {
|
|
1230
1271
|
const brokerId = this.safeString(this.options, 'brokerId');
|
|
@@ -1286,7 +1327,12 @@ export default class whitebit extends Exchange {
|
|
|
1286
1327
|
response = await this.v4PrivatePostOrderCollateralMarket(this.extend(request, params));
|
|
1287
1328
|
}
|
|
1288
1329
|
else {
|
|
1289
|
-
|
|
1330
|
+
if (cost !== undefined) {
|
|
1331
|
+
response = await this.v4PrivatePostOrderMarket(this.extend(request, params));
|
|
1332
|
+
}
|
|
1333
|
+
else {
|
|
1334
|
+
response = await this.v4PrivatePostOrderStockMarket(this.extend(request, params));
|
|
1335
|
+
}
|
|
1290
1336
|
}
|
|
1291
1337
|
}
|
|
1292
1338
|
}
|
|
@@ -1473,7 +1519,7 @@ export default class whitebit extends Exchange {
|
|
|
1473
1519
|
const balance = response[id];
|
|
1474
1520
|
if (typeof balance === 'object' && balance !== undefined) {
|
|
1475
1521
|
const account = this.account();
|
|
1476
|
-
account['free'] = this.
|
|
1522
|
+
account['free'] = this.safeString2(balance, 'available', 'main_balance');
|
|
1477
1523
|
account['used'] = this.safeString(balance, 'freeze');
|
|
1478
1524
|
account['total'] = this.safeString(balance, 'main_balance');
|
|
1479
1525
|
result[code] = account;
|
|
@@ -1697,7 +1743,7 @@ export default class whitebit extends Exchange {
|
|
|
1697
1743
|
const symbol = market['symbol'];
|
|
1698
1744
|
const side = this.safeString(order, 'side');
|
|
1699
1745
|
const filled = this.safeString(order, 'dealStock');
|
|
1700
|
-
|
|
1746
|
+
let remaining = this.safeString(order, 'left');
|
|
1701
1747
|
let clientOrderId = this.safeString(order, 'clientOrderId');
|
|
1702
1748
|
if (clientOrderId === '') {
|
|
1703
1749
|
clientOrderId = undefined;
|
|
@@ -1706,6 +1752,10 @@ export default class whitebit extends Exchange {
|
|
|
1706
1752
|
const stopPrice = this.safeNumber(order, 'activation_price');
|
|
1707
1753
|
const orderId = this.safeString2(order, 'orderId', 'id');
|
|
1708
1754
|
const type = this.safeString(order, 'type');
|
|
1755
|
+
const orderType = this.parseOrderType(type);
|
|
1756
|
+
if (orderType === 'market') {
|
|
1757
|
+
remaining = undefined;
|
|
1758
|
+
}
|
|
1709
1759
|
let amount = this.safeString(order, 'amount');
|
|
1710
1760
|
const cost = this.safeString(order, 'dealMoney');
|
|
1711
1761
|
if ((side === 'buy') && ((type === 'market') || (type === 'stop market'))) {
|
|
@@ -1734,7 +1784,7 @@ export default class whitebit extends Exchange {
|
|
|
1734
1784
|
'status': undefined,
|
|
1735
1785
|
'side': side,
|
|
1736
1786
|
'price': price,
|
|
1737
|
-
'type':
|
|
1787
|
+
'type': orderType,
|
|
1738
1788
|
'stopPrice': stopPrice,
|
|
1739
1789
|
'triggerPrice': stopPrice,
|
|
1740
1790
|
'amount': amount,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccxt",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.30",
|
|
4
4
|
"description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
|
|
5
|
-
"unpkg": "dist/ccxt.browser.js",
|
|
5
|
+
"unpkg": "dist/ccxt.browser.min.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -96,6 +96,8 @@
|
|
|
96
96
|
"fast-force-transpileWs": "node build/transpileWS.js --multiprocess --force",
|
|
97
97
|
"test-js-cache": "node js/src/pro/test/base/test.Cache.js",
|
|
98
98
|
"test-js-orderbook": "node js/src/pro/test/base/test.OrderBook.js",
|
|
99
|
+
"test-python-future": "python python/ccxt/pro/test/base/test_future.py",
|
|
100
|
+
"test-python-close": "python python/ccxt/pro/test/base/test_close.py",
|
|
99
101
|
"test-python-cache": "python python/ccxt/pro/test/base/test_cache.py",
|
|
100
102
|
"test-python-orderbook": "python python/ccxt/pro/test/base/test_order_book.py",
|
|
101
103
|
"test-cs-cache": "dotnet run --project cs/tests/tests.csproj --cache",
|