ccxt 4.3.35 → 4.3.36
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 +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bingx.js +2 -2
- package/dist/cjs/src/bit2c.js +2 -1
- package/dist/cjs/src/bitget.js +11 -4
- package/dist/cjs/src/paymium.js +4 -1
- package/dist/cjs/src/pro/binance.js +4 -4
- package/dist/cjs/src/pro/bingx.js +10 -4
- package/dist/cjs/src/pro/bitfinex2.js +5 -5
- package/dist/cjs/src/pro/bitmart.js +9 -5
- package/dist/cjs/src/pro/bybit.js +6 -6
- package/dist/cjs/src/pro/htx.js +5 -6
- package/dist/cjs/src/pro/okx.js +3 -4
- package/dist/cjs/src/pro/woo.js +4 -4
- package/dist/cjs/src/whitebit.js +24 -3
- package/dist/cjs/src/zaif.js +30 -2
- package/dist/cjs/src/zonda.js +6 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitbay.d.ts +6 -0
- package/js/src/abstract/zonda.d.ts +6 -0
- package/js/src/bingx.js +2 -2
- package/js/src/bit2c.d.ts +1 -1
- package/js/src/bit2c.js +2 -1
- package/js/src/bitget.js +11 -4
- package/js/src/paymium.d.ts +1 -1
- package/js/src/paymium.js +4 -1
- package/js/src/pro/binance.js +4 -4
- package/js/src/pro/bingx.js +10 -4
- package/js/src/pro/bitfinex2.js +5 -5
- package/js/src/pro/bitmart.js +10 -6
- package/js/src/pro/bybit.js +6 -6
- package/js/src/pro/htx.js +5 -6
- package/js/src/pro/okx.js +3 -4
- package/js/src/pro/woo.js +4 -4
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/whitebit.d.ts +2 -2
- package/js/src/whitebit.js +24 -3
- package/js/src/zaif.d.ts +1 -1
- package/js/src/zaif.js +30 -2
- package/js/src/zonda.js +6 -0
- package/package.json +1 -1
package/js/src/pro/binance.js
CHANGED
|
@@ -726,11 +726,11 @@ export default class binance extends binanceRest {
|
|
|
726
726
|
// todo: this is a synch blocking call - make it async
|
|
727
727
|
// default 100, max 1000, valid limits 5, 10, 20, 50, 100, 500, 1000
|
|
728
728
|
const snapshot = await this.fetchRestOrderBookSafe(symbol, limit, params);
|
|
729
|
-
|
|
730
|
-
if (orderbook === undefined) {
|
|
729
|
+
if (this.safeValue(this.orderbooks, symbol) === undefined) {
|
|
731
730
|
// if the orderbook is dropped before the snapshot is received
|
|
732
731
|
return;
|
|
733
732
|
}
|
|
733
|
+
const orderbook = this.orderbooks[symbol];
|
|
734
734
|
orderbook.reset(snapshot);
|
|
735
735
|
// unroll the accumulated deltas
|
|
736
736
|
const messages = orderbook.cache;
|
|
@@ -816,8 +816,7 @@ export default class binance extends binanceRest {
|
|
|
816
816
|
const symbol = market['symbol'];
|
|
817
817
|
const name = 'depth';
|
|
818
818
|
const messageHash = market['lowercaseId'] + '@' + name;
|
|
819
|
-
|
|
820
|
-
if (orderbook === undefined) {
|
|
819
|
+
if (!(symbol in this.orderbooks)) {
|
|
821
820
|
//
|
|
822
821
|
// https://github.com/ccxt/ccxt/issues/6672
|
|
823
822
|
//
|
|
@@ -828,6 +827,7 @@ export default class binance extends binanceRest {
|
|
|
828
827
|
//
|
|
829
828
|
return;
|
|
830
829
|
}
|
|
830
|
+
const orderbook = this.orderbooks[symbol];
|
|
831
831
|
const nonce = this.safeInteger(orderbook, 'nonce');
|
|
832
832
|
if (nonce === undefined) {
|
|
833
833
|
// 2. Buffer the events you receive from the stream.
|
package/js/src/pro/bingx.js
CHANGED
|
@@ -991,14 +991,17 @@ export default class bingx extends bingxRest {
|
|
|
991
991
|
// }
|
|
992
992
|
//
|
|
993
993
|
const isSpot = ('dataType' in message);
|
|
994
|
-
const result = this.
|
|
994
|
+
const result = this.safeDict2(message, 'data', 'o', {});
|
|
995
995
|
let cachedTrades = this.myTrades;
|
|
996
996
|
if (cachedTrades === undefined) {
|
|
997
997
|
const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
|
|
998
998
|
cachedTrades = new ArrayCacheBySymbolById(limit);
|
|
999
999
|
this.myTrades = cachedTrades;
|
|
1000
1000
|
}
|
|
1001
|
-
const
|
|
1001
|
+
const type = isSpot ? 'spot' : 'swap';
|
|
1002
|
+
const marketId = this.safeString(result, 's');
|
|
1003
|
+
const market = this.safeMarket(marketId, undefined, '-', type);
|
|
1004
|
+
const parsed = this.parseTrade(result, market);
|
|
1002
1005
|
const symbol = parsed['symbol'];
|
|
1003
1006
|
const spotHash = 'spot:mytrades';
|
|
1004
1007
|
const swapHash = 'swap:mytrades';
|
|
@@ -1044,10 +1047,13 @@ export default class bingx extends bingxRest {
|
|
|
1044
1047
|
// }
|
|
1045
1048
|
// }
|
|
1046
1049
|
//
|
|
1047
|
-
const a = this.
|
|
1048
|
-
const data = this.
|
|
1050
|
+
const a = this.safeDict(message, 'a', {});
|
|
1051
|
+
const data = this.safeList(a, 'B', []);
|
|
1049
1052
|
const timestamp = this.safeInteger2(message, 'T', 'E');
|
|
1050
1053
|
const type = ('P' in a) ? 'swap' : 'spot';
|
|
1054
|
+
if (!(type in this.balance)) {
|
|
1055
|
+
this.balance[type] = {};
|
|
1056
|
+
}
|
|
1051
1057
|
this.balance[type]['info'] = data;
|
|
1052
1058
|
this.balance[type]['timestamp'] = timestamp;
|
|
1053
1059
|
this.balance[type]['datetime'] = this.iso8601(timestamp);
|
package/js/src/pro/bitfinex2.js
CHANGED
|
@@ -580,8 +580,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
580
580
|
const prec = this.safeString(subscription, 'prec', 'P0');
|
|
581
581
|
const isRaw = (prec === 'R0');
|
|
582
582
|
// if it is an initial snapshot
|
|
583
|
-
|
|
584
|
-
if (orderbook === undefined) {
|
|
583
|
+
if (!(symbol in this.orderbooks)) {
|
|
585
584
|
const limit = this.safeInteger(subscription, 'len');
|
|
586
585
|
if (isRaw) {
|
|
587
586
|
// raw order books
|
|
@@ -591,7 +590,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
591
590
|
// P0, P1, P2, P3, P4
|
|
592
591
|
this.orderbooks[symbol] = this.countedOrderBook({}, limit);
|
|
593
592
|
}
|
|
594
|
-
orderbook = this.orderbooks[symbol];
|
|
593
|
+
const orderbook = this.orderbooks[symbol];
|
|
595
594
|
if (isRaw) {
|
|
596
595
|
const deltas = message[1];
|
|
597
596
|
for (let i = 0; i < deltas.length; i++) {
|
|
@@ -602,7 +601,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
602
601
|
const bookside = orderbook[side];
|
|
603
602
|
const idString = this.safeString(delta, 0);
|
|
604
603
|
const price = this.safeFloat(delta, 1);
|
|
605
|
-
bookside.
|
|
604
|
+
bookside.storeArray([price, size, idString]);
|
|
606
605
|
}
|
|
607
606
|
}
|
|
608
607
|
else {
|
|
@@ -615,13 +614,14 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
615
614
|
const size = (amount < 0) ? -amount : amount;
|
|
616
615
|
const side = (amount < 0) ? 'asks' : 'bids';
|
|
617
616
|
const bookside = orderbook[side];
|
|
618
|
-
bookside.
|
|
617
|
+
bookside.storeArray([price, size, counter]);
|
|
619
618
|
}
|
|
620
619
|
}
|
|
621
620
|
orderbook['symbol'] = symbol;
|
|
622
621
|
client.resolve(orderbook, messageHash);
|
|
623
622
|
}
|
|
624
623
|
else {
|
|
624
|
+
const orderbook = this.orderbooks[symbol];
|
|
625
625
|
const deltas = message[1];
|
|
626
626
|
const orderbookItem = this.orderbooks[symbol];
|
|
627
627
|
if (isRaw) {
|
package/js/src/pro/bitmart.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import bitmartRest from '../bitmart.js';
|
|
9
|
-
import {
|
|
9
|
+
import { AuthenticationError, ExchangeError, NotSupported } from '../base/errors.js';
|
|
10
10
|
import { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide } from '../base/ws/Cache.js';
|
|
11
11
|
import { sha256 } from '../static_dependencies/noble-hashes/sha256.js';
|
|
12
12
|
import { Asks, Bids } from '../base/ws/OrderBookSide.js';
|
|
@@ -358,9 +358,9 @@ export default class bitmart extends bitmartRest {
|
|
|
358
358
|
/**
|
|
359
359
|
* @method
|
|
360
360
|
* @name bitmart#watchOrders
|
|
361
|
-
* @see https://developer-pro.bitmart.com/en/spot/#private-order-channel
|
|
362
|
-
* @see https://developer-pro.bitmart.com/en/futures/#private-order-channel
|
|
363
361
|
* @description watches information on multiple orders made by the user
|
|
362
|
+
* @see https://developer-pro.bitmart.com/en/spot/#private-order-progress
|
|
363
|
+
* @see https://developer-pro.bitmart.com/en/futures/#private-order-channel
|
|
364
364
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
365
365
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
366
366
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -380,12 +380,16 @@ export default class bitmart extends bitmartRest {
|
|
|
380
380
|
await this.authenticate(type, params);
|
|
381
381
|
let request = undefined;
|
|
382
382
|
if (type === 'spot') {
|
|
383
|
-
|
|
384
|
-
|
|
383
|
+
let argsRequest = 'spot/user/order:';
|
|
384
|
+
if (symbol !== undefined) {
|
|
385
|
+
argsRequest += market['id'];
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
argsRequest = 'spot/user/orders:ALL_SYMBOLS';
|
|
385
389
|
}
|
|
386
390
|
request = {
|
|
387
391
|
'op': 'subscribe',
|
|
388
|
-
'args': [
|
|
392
|
+
'args': [argsRequest],
|
|
389
393
|
};
|
|
390
394
|
}
|
|
391
395
|
else {
|
package/js/src/pro/bybit.js
CHANGED
|
@@ -710,23 +710,23 @@ export default class bybit extends bybitRest {
|
|
|
710
710
|
const isSpot = client.url.indexOf('spot') >= 0;
|
|
711
711
|
const type = this.safeString(message, 'type');
|
|
712
712
|
const isSnapshot = (type === 'snapshot');
|
|
713
|
-
const data = this.
|
|
713
|
+
const data = this.safeDict(message, 'data', {});
|
|
714
714
|
const marketId = this.safeString(data, 's');
|
|
715
715
|
const marketType = isSpot ? 'spot' : 'contract';
|
|
716
716
|
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
717
717
|
const symbol = market['symbol'];
|
|
718
718
|
const timestamp = this.safeInteger(message, 'ts');
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
orderbook = this.orderBook();
|
|
719
|
+
if (!(symbol in this.orderbooks)) {
|
|
720
|
+
this.orderbooks[symbol] = this.orderBook();
|
|
722
721
|
}
|
|
722
|
+
const orderbook = this.orderbooks[symbol];
|
|
723
723
|
if (isSnapshot) {
|
|
724
724
|
const snapshot = this.parseOrderBook(data, symbol, timestamp, 'b', 'a');
|
|
725
725
|
orderbook.reset(snapshot);
|
|
726
726
|
}
|
|
727
727
|
else {
|
|
728
|
-
const asks = this.
|
|
729
|
-
const bids = this.
|
|
728
|
+
const asks = this.safeList(data, 'a', []);
|
|
729
|
+
const bids = this.safeList(data, 'b', []);
|
|
730
730
|
this.handleDeltas(orderbook['asks'], asks);
|
|
731
731
|
this.handleDeltas(orderbook['bids'], bids);
|
|
732
732
|
orderbook['timestamp'] = timestamp;
|
package/js/src/pro/htx.js
CHANGED
|
@@ -632,20 +632,19 @@ export default class htx extends htxRest {
|
|
|
632
632
|
// }
|
|
633
633
|
//
|
|
634
634
|
const messageHash = this.safeString(message, 'ch');
|
|
635
|
-
const tick = this.
|
|
635
|
+
const tick = this.safeDict(message, 'tick');
|
|
636
636
|
const event = this.safeString(tick, 'event');
|
|
637
|
-
const ch = this.
|
|
637
|
+
const ch = this.safeString(message, 'ch');
|
|
638
638
|
const parts = ch.split('.');
|
|
639
639
|
const marketId = this.safeString(parts, 1);
|
|
640
640
|
const symbol = this.safeSymbol(marketId);
|
|
641
|
-
|
|
642
|
-
if (orderbook === undefined) {
|
|
641
|
+
if (!(symbol in this.orderbooks)) {
|
|
643
642
|
const size = this.safeString(parts, 3);
|
|
644
643
|
const sizeParts = size.split('_');
|
|
645
644
|
const limit = this.safeInteger(sizeParts, 1);
|
|
646
|
-
|
|
647
|
-
this.orderbooks[symbol] = orderbook;
|
|
645
|
+
this.orderbooks[symbol] = this.orderBook({}, limit);
|
|
648
646
|
}
|
|
647
|
+
const orderbook = this.orderbooks[symbol];
|
|
649
648
|
if ((event === undefined) && (orderbook['nonce'] === undefined)) {
|
|
650
649
|
orderbook.cache.push(message);
|
|
651
650
|
}
|
package/js/src/pro/okx.js
CHANGED
|
@@ -1075,11 +1075,10 @@ export default class okx extends okxRest {
|
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
1077
|
else if ((channel === 'books5') || (channel === 'bbo-tbt')) {
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
orderbook = this.orderBook({}, limit);
|
|
1078
|
+
if (!(symbol in this.orderbooks)) {
|
|
1079
|
+
this.orderbooks[symbol] = this.orderBook({}, limit);
|
|
1081
1080
|
}
|
|
1082
|
-
this.orderbooks[symbol]
|
|
1081
|
+
const orderbook = this.orderbooks[symbol];
|
|
1083
1082
|
for (let i = 0; i < data.length; i++) {
|
|
1084
1083
|
const update = data[i];
|
|
1085
1084
|
const timestamp = this.safeInteger(update, 'ts');
|
package/js/src/pro/woo.js
CHANGED
|
@@ -128,15 +128,15 @@ export default class woo extends wooRest {
|
|
|
128
128
|
// }
|
|
129
129
|
// }
|
|
130
130
|
//
|
|
131
|
-
const data = this.
|
|
131
|
+
const data = this.safeDict(message, 'data');
|
|
132
132
|
const marketId = this.safeString(data, 'symbol');
|
|
133
133
|
const market = this.safeMarket(marketId);
|
|
134
134
|
const symbol = market['symbol'];
|
|
135
135
|
const topic = this.safeString(message, 'topic');
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
orderbook = this.orderBook({});
|
|
136
|
+
if (!(symbol in this.orderbooks)) {
|
|
137
|
+
this.orderbooks[symbol] = this.orderBook({});
|
|
139
138
|
}
|
|
139
|
+
const orderbook = this.orderbooks[symbol];
|
|
140
140
|
const timestamp = this.safeInteger(message, 'ts');
|
|
141
141
|
const snapshot = this.parseOrderBook(data, symbol, timestamp, 'bids', 'asks');
|
|
142
142
|
orderbook.reset(snapshot);
|
|
@@ -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/js/src/whitebit.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ export default class whitebit extends Exchange {
|
|
|
38
38
|
createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
39
39
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
40
40
|
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|
|
41
|
-
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<
|
|
42
|
-
cancelAllOrders(symbol?: Str, params?: {}): Promise<
|
|
41
|
+
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
42
|
+
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
43
43
|
cancelAllOrdersAfter(timeout: Int, params?: {}): Promise<any>;
|
|
44
44
|
parseBalance(response: any): Balances;
|
|
45
45
|
fetchBalance(params?: {}): Promise<Balances>;
|
package/js/src/whitebit.js
CHANGED
|
@@ -1422,7 +1422,27 @@ export default class whitebit extends Exchange {
|
|
|
1422
1422
|
'market': market['id'],
|
|
1423
1423
|
'orderId': parseInt(id),
|
|
1424
1424
|
};
|
|
1425
|
-
|
|
1425
|
+
const response = await this.v4PrivatePostOrderCancel(this.extend(request, params));
|
|
1426
|
+
//
|
|
1427
|
+
// {
|
|
1428
|
+
// "orderId": 4180284841, // order id
|
|
1429
|
+
// "clientOrderId": "customId11", // custom order identifier; "clientOrderId": "" - if not specified.
|
|
1430
|
+
// "market": "BTC_USDT", // deal market
|
|
1431
|
+
// "side": "buy", // order side
|
|
1432
|
+
// "type": "stop market", // order type
|
|
1433
|
+
// "timestamp": 1595792396.165973, // current timestamp
|
|
1434
|
+
// "dealMoney": "0", // if order finished - amount in money currency that is finished
|
|
1435
|
+
// "dealStock": "0", // if order finished - amount in stock currency that is finished
|
|
1436
|
+
// "amount": "0.001", // amount
|
|
1437
|
+
// "takerFee": "0.001", // maker fee ratio. If the number less than 0.0001 - it will be rounded to zero
|
|
1438
|
+
// "makerFee": "0.001", // maker fee ratio. If the number less than 0.0001 - it will be rounded to zero
|
|
1439
|
+
// "left": "0.001", // if order not finished - rest of the amount that must be finished
|
|
1440
|
+
// "dealFee": "0", // fee in money that you pay if order is finished
|
|
1441
|
+
// "price": "40000", // price if price isset
|
|
1442
|
+
// "activation_price": "40000" // activation price if activation price is set
|
|
1443
|
+
// }
|
|
1444
|
+
//
|
|
1445
|
+
return this.parseOrder(response);
|
|
1426
1446
|
}
|
|
1427
1447
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1428
1448
|
/**
|
|
@@ -1467,7 +1487,7 @@ export default class whitebit extends Exchange {
|
|
|
1467
1487
|
//
|
|
1468
1488
|
// []
|
|
1469
1489
|
//
|
|
1470
|
-
return response;
|
|
1490
|
+
return this.parseOrders(response, market);
|
|
1471
1491
|
}
|
|
1472
1492
|
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
1473
1493
|
/**
|
|
@@ -1701,7 +1721,7 @@ export default class whitebit extends Exchange {
|
|
|
1701
1721
|
}
|
|
1702
1722
|
parseOrder(order, market = undefined) {
|
|
1703
1723
|
//
|
|
1704
|
-
// createOrder, fetchOpenOrders
|
|
1724
|
+
// createOrder, fetchOpenOrders, cancelOrder
|
|
1705
1725
|
//
|
|
1706
1726
|
// {
|
|
1707
1727
|
// "orderId":105687928629,
|
|
@@ -1716,6 +1736,7 @@ export default class whitebit extends Exchange {
|
|
|
1716
1736
|
// "takerFee":"0.001",
|
|
1717
1737
|
// "makerFee":"0",
|
|
1718
1738
|
// "left":"100",
|
|
1739
|
+
// "price": "40000", // price if price isset
|
|
1719
1740
|
// "dealFee":"0",
|
|
1720
1741
|
// "activation_price":"0.065" // stop price (if stop limit or stop market)
|
|
1721
1742
|
// }
|
package/js/src/zaif.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export default class zaif extends Exchange {
|
|
|
16
16
|
parseTrade(trade: Dict, market?: Market): Trade;
|
|
17
17
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
18
18
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
19
|
-
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<
|
|
19
|
+
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
20
20
|
parseOrder(order: Dict, market?: Market): Order;
|
|
21
21
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
22
22
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
package/js/src/zaif.js
CHANGED
|
@@ -479,7 +479,23 @@ export default class zaif extends Exchange {
|
|
|
479
479
|
const request = {
|
|
480
480
|
'order_id': id,
|
|
481
481
|
};
|
|
482
|
-
|
|
482
|
+
const response = await this.privatePostCancelOrder(this.extend(request, params));
|
|
483
|
+
//
|
|
484
|
+
// {
|
|
485
|
+
// "success": 1,
|
|
486
|
+
// "return": {
|
|
487
|
+
// "order_id": 184,
|
|
488
|
+
// "funds": {
|
|
489
|
+
// "jpy": 15320,
|
|
490
|
+
// "btc": 1.392,
|
|
491
|
+
// "mona": 2600,
|
|
492
|
+
// "kaori": 0.1
|
|
493
|
+
// }
|
|
494
|
+
// }
|
|
495
|
+
// }
|
|
496
|
+
//
|
|
497
|
+
const data = this.safeDict(response, 'return');
|
|
498
|
+
return this.parseOrder(data);
|
|
483
499
|
}
|
|
484
500
|
parseOrder(order, market = undefined) {
|
|
485
501
|
//
|
|
@@ -492,6 +508,18 @@ export default class zaif extends Exchange {
|
|
|
492
508
|
// "comment" : "demo"
|
|
493
509
|
// }
|
|
494
510
|
//
|
|
511
|
+
// cancelOrder
|
|
512
|
+
//
|
|
513
|
+
// {
|
|
514
|
+
// "order_id": 184,
|
|
515
|
+
// "funds": {
|
|
516
|
+
// "jpy": 15320,
|
|
517
|
+
// "btc": 1.392,
|
|
518
|
+
// "mona": 2600,
|
|
519
|
+
// "kaori": 0.1
|
|
520
|
+
// }
|
|
521
|
+
// }
|
|
522
|
+
//
|
|
495
523
|
let side = this.safeString(order, 'action');
|
|
496
524
|
side = (side === 'bid') ? 'buy' : 'sell';
|
|
497
525
|
const timestamp = this.safeTimestamp(order, 'timestamp');
|
|
@@ -499,7 +527,7 @@ export default class zaif extends Exchange {
|
|
|
499
527
|
const symbol = this.safeSymbol(marketId, market, '_');
|
|
500
528
|
const price = this.safeString(order, 'price');
|
|
501
529
|
const amount = this.safeString(order, 'amount');
|
|
502
|
-
const id = this.
|
|
530
|
+
const id = this.safeString2(order, 'id', 'order_id');
|
|
503
531
|
return this.safeOrder({
|
|
504
532
|
'id': id,
|
|
505
533
|
'clientOrderId': undefined,
|
package/js/src/zonda.js
CHANGED
|
@@ -172,6 +172,10 @@ export default class zonda extends Exchange {
|
|
|
172
172
|
'balances/BITBAY/balance',
|
|
173
173
|
'fiat_cantor/rate/{baseId}/{quoteId}',
|
|
174
174
|
'fiat_cantor/history',
|
|
175
|
+
'client_payments/v2/customer/crypto/{currency}/channels/deposit',
|
|
176
|
+
'client_payments/v2/customer/crypto/{currency}/channels/withdrawal',
|
|
177
|
+
'client_payments/v2/customer/crypto/deposit/fee',
|
|
178
|
+
'client_payments/v2/customer/crypto/withdrawal/fee',
|
|
175
179
|
],
|
|
176
180
|
'post': [
|
|
177
181
|
'trading/offer/{symbol}',
|
|
@@ -182,6 +186,8 @@ export default class zonda extends Exchange {
|
|
|
182
186
|
'fiat_cantor/exchange',
|
|
183
187
|
'api_payments/withdrawals/crypto',
|
|
184
188
|
'api_payments/withdrawals/fiat',
|
|
189
|
+
'client_payments/v2/customer/crypto/deposit',
|
|
190
|
+
'client_payments/v2/customer/crypto/withdrawal',
|
|
185
191
|
],
|
|
186
192
|
'delete': [
|
|
187
193
|
'trading/offer/{symbol}/{id}/{side}/{price}',
|
package/package.json
CHANGED