ccxt 4.3.85 → 4.3.87
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 +8 -5
- package/dist/ccxt.browser.min.js +15 -15
- package/dist/cjs/ccxt.js +7 -1
- package/dist/cjs/src/abstract/hashkey.js +9 -0
- package/dist/cjs/src/base/Exchange.js +1 -1
- package/dist/cjs/src/base/errors.js +8 -1
- package/dist/cjs/src/binance.js +4 -2
- package/dist/cjs/src/bingx.js +7 -1
- package/dist/cjs/src/bitfinex.js +2 -2
- package/dist/cjs/src/hashkey.js +4327 -0
- package/dist/cjs/src/hyperliquid.js +85 -65
- package/dist/cjs/src/indodax.js +37 -9
- package/dist/cjs/src/kraken.js +37 -6
- package/dist/cjs/src/krakenfutures.js +12 -10
- package/dist/cjs/src/pro/ascendex.js +45 -5
- package/dist/cjs/src/pro/bingx.js +13 -12
- package/dist/cjs/src/pro/bitget.js +164 -19
- package/dist/cjs/src/pro/hashkey.js +839 -0
- package/dist/cjs/src/pro/hyperliquid.js +123 -0
- package/dist/cjs/src/pro/mexc.js +13 -7
- package/dist/cjs/src/pro/p2b.js +34 -7
- package/dist/cjs/src/pro/poloniex.js +36 -3
- package/dist/cjs/src/pro/poloniexfutures.js +1 -0
- package/dist/cjs/src/pro/probit.js +2 -0
- package/dist/cjs/src/pro/upbit.js +48 -3
- package/dist/cjs/src/pro/vertex.js +1 -0
- package/dist/cjs/src/pro/wazirx.js +3 -0
- package/dist/cjs/src/pro/whitebit.js +9 -0
- package/dist/cjs/src/pro/woo.js +1 -0
- package/dist/cjs/src/pro/woofipro.js +1 -0
- package/dist/cjs/src/pro/xt.js +1 -0
- package/dist/cjs/src/upbit.js +1 -1
- package/js/ccxt.d.ts +9 -3
- package/js/ccxt.js +7 -3
- package/js/src/abstract/hashkey.d.ts +70 -0
- package/js/src/abstract/hashkey.js +11 -0
- package/js/src/base/Exchange.js +1 -1
- package/js/src/base/errorHierarchy.d.ts +1 -0
- package/js/src/base/errorHierarchy.js +1 -0
- package/js/src/base/errors.d.ts +5 -1
- package/js/src/base/errors.js +8 -2
- package/js/src/binance.js +4 -2
- package/js/src/bingx.js +7 -1
- package/js/src/bitfinex.js +2 -2
- package/js/src/hashkey.d.ts +178 -0
- package/js/src/hashkey.js +4328 -0
- package/js/src/hyperliquid.d.ts +3 -0
- package/js/src/hyperliquid.js +85 -65
- package/js/src/indodax.js +37 -9
- package/js/src/kraken.js +37 -6
- package/js/src/krakenfutures.js +12 -10
- package/js/src/pro/ascendex.d.ts +2 -0
- package/js/src/pro/ascendex.js +45 -5
- package/js/src/pro/bingx.js +13 -12
- package/js/src/pro/bitget.d.ts +8 -0
- package/js/src/pro/bitget.js +165 -20
- package/js/src/pro/hashkey.d.ts +34 -0
- package/js/src/pro/hashkey.js +840 -0
- package/js/src/pro/hyperliquid.d.ts +7 -1
- package/js/src/pro/hyperliquid.js +123 -0
- package/js/src/pro/mexc.js +13 -7
- package/js/src/pro/p2b.d.ts +1 -0
- package/js/src/pro/p2b.js +34 -7
- package/js/src/pro/poloniex.d.ts +1 -0
- package/js/src/pro/poloniex.js +36 -3
- package/js/src/pro/poloniexfutures.js +1 -0
- package/js/src/pro/probit.js +2 -0
- package/js/src/pro/upbit.d.ts +1 -0
- package/js/src/pro/upbit.js +48 -3
- package/js/src/pro/vertex.js +1 -0
- package/js/src/pro/wazirx.js +3 -0
- package/js/src/pro/whitebit.js +9 -0
- package/js/src/pro/woo.js +1 -0
- package/js/src/pro/woofipro.js +1 -0
- package/js/src/pro/xt.js +1 -0
- package/js/src/upbit.js +1 -1
- package/package.json +1 -1
package/js/src/hyperliquid.d.ts
CHANGED
|
@@ -55,10 +55,12 @@ export default class hyperliquid extends Exchange {
|
|
|
55
55
|
};
|
|
56
56
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
57
57
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
58
|
+
createOrdersRequest(orders: any, params?: {}): Dict;
|
|
58
59
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
|
|
59
60
|
cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<any[]>;
|
|
60
61
|
cancelOrdersForSymbols(orders: CancellationRequest[], params?: {}): Promise<any>;
|
|
61
62
|
cancelAllOrdersAfter(timeout: Int, params?: {}): Promise<any>;
|
|
63
|
+
editOrderRequest(id: string, symbol: string, type: string, side: string, amount?: Num, price?: Num, params?: {}): Dict;
|
|
62
64
|
editOrder(id: string, symbol: string, type: string, side: string, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|
|
63
65
|
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
|
|
64
66
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
@@ -93,4 +95,5 @@ export default class hyperliquid extends Exchange {
|
|
|
93
95
|
body: any;
|
|
94
96
|
headers: any;
|
|
95
97
|
};
|
|
98
|
+
parseCreateOrderArgs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): {}[];
|
|
96
99
|
}
|
package/js/src/hyperliquid.js
CHANGED
|
@@ -1092,25 +1092,9 @@ export default class hyperliquid extends Exchange {
|
|
|
1092
1092
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1093
1093
|
*/
|
|
1094
1094
|
await this.loadMarkets();
|
|
1095
|
-
const
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1098
|
-
symbol = market['symbol'];
|
|
1099
|
-
const order = {
|
|
1100
|
-
'symbol': symbol,
|
|
1101
|
-
'type': type,
|
|
1102
|
-
'side': side,
|
|
1103
|
-
'amount': amount,
|
|
1104
|
-
'price': price,
|
|
1105
|
-
'params': params,
|
|
1106
|
-
};
|
|
1107
|
-
const globalParams = {};
|
|
1108
|
-
if (vaultAddress !== undefined) {
|
|
1109
|
-
globalParams['vaultAddress'] = vaultAddress;
|
|
1110
|
-
}
|
|
1111
|
-
const response = await this.createOrders([order], globalParams);
|
|
1112
|
-
const first = this.safeDict(response, 0);
|
|
1113
|
-
return first;
|
|
1095
|
+
const [order, globalParams] = this.parseCreateOrderArgs(symbol, type, side, amount, price, params);
|
|
1096
|
+
const orders = await this.createOrders([order], globalParams);
|
|
1097
|
+
return orders[0];
|
|
1114
1098
|
}
|
|
1115
1099
|
async createOrders(orders, params = {}) {
|
|
1116
1100
|
/**
|
|
@@ -1121,8 +1105,41 @@ export default class hyperliquid extends Exchange {
|
|
|
1121
1105
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
1122
1106
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1123
1107
|
*/
|
|
1124
|
-
this.checkRequiredCredentials();
|
|
1125
1108
|
await this.loadMarkets();
|
|
1109
|
+
const request = this.createOrdersRequest(orders, params);
|
|
1110
|
+
const response = await this.privatePostExchange(request);
|
|
1111
|
+
//
|
|
1112
|
+
// {
|
|
1113
|
+
// "status": "ok",
|
|
1114
|
+
// "response": {
|
|
1115
|
+
// "type": "order",
|
|
1116
|
+
// "data": {
|
|
1117
|
+
// "statuses": [
|
|
1118
|
+
// {
|
|
1119
|
+
// "resting": {
|
|
1120
|
+
// "oid": 5063830287
|
|
1121
|
+
// }
|
|
1122
|
+
// }
|
|
1123
|
+
// ]
|
|
1124
|
+
// }
|
|
1125
|
+
// }
|
|
1126
|
+
// }
|
|
1127
|
+
//
|
|
1128
|
+
const responseObj = this.safeDict(response, 'response', {});
|
|
1129
|
+
const data = this.safeDict(responseObj, 'data', {});
|
|
1130
|
+
const statuses = this.safeList(data, 'statuses', []);
|
|
1131
|
+
return this.parseOrders(statuses, undefined);
|
|
1132
|
+
}
|
|
1133
|
+
createOrdersRequest(orders, params = {}) {
|
|
1134
|
+
/**
|
|
1135
|
+
* @method
|
|
1136
|
+
* @name hyperliquid#createOrders
|
|
1137
|
+
* @description create a list of trade orders
|
|
1138
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
|
|
1139
|
+
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
1140
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1141
|
+
*/
|
|
1142
|
+
this.checkRequiredCredentials();
|
|
1126
1143
|
let defaultSlippage = this.safeString(this.options, 'defaultSlippage');
|
|
1127
1144
|
defaultSlippage = this.safeString(params, 'slippage', defaultSlippage);
|
|
1128
1145
|
let hasClientOrderId = false;
|
|
@@ -1242,28 +1259,7 @@ export default class hyperliquid extends Exchange {
|
|
|
1242
1259
|
params = this.omit(params, 'vaultAddress');
|
|
1243
1260
|
request['vaultAddress'] = vaultAddress;
|
|
1244
1261
|
}
|
|
1245
|
-
|
|
1246
|
-
//
|
|
1247
|
-
// {
|
|
1248
|
-
// "status": "ok",
|
|
1249
|
-
// "response": {
|
|
1250
|
-
// "type": "order",
|
|
1251
|
-
// "data": {
|
|
1252
|
-
// "statuses": [
|
|
1253
|
-
// {
|
|
1254
|
-
// "resting": {
|
|
1255
|
-
// "oid": 5063830287
|
|
1256
|
-
// }
|
|
1257
|
-
// }
|
|
1258
|
-
// ]
|
|
1259
|
-
// }
|
|
1260
|
-
// }
|
|
1261
|
-
// }
|
|
1262
|
-
//
|
|
1263
|
-
const responseObj = this.safeDict(response, 'response', {});
|
|
1264
|
-
const data = this.safeDict(responseObj, 'data', {});
|
|
1265
|
-
const statuses = this.safeList(data, 'statuses', []);
|
|
1266
|
-
return this.parseOrders(statuses, undefined);
|
|
1262
|
+
return request;
|
|
1267
1263
|
}
|
|
1268
1264
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1269
1265
|
/**
|
|
@@ -1484,33 +1480,11 @@ export default class hyperliquid extends Exchange {
|
|
|
1484
1480
|
//
|
|
1485
1481
|
return response;
|
|
1486
1482
|
}
|
|
1487
|
-
|
|
1488
|
-
/**
|
|
1489
|
-
* @method
|
|
1490
|
-
* @name hyperliquid#editOrder
|
|
1491
|
-
* @description edit a trade order
|
|
1492
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
|
|
1493
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
|
|
1494
|
-
* @param {string} id cancel order id
|
|
1495
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1496
|
-
* @param {string} type 'market' or 'limit'
|
|
1497
|
-
* @param {string} side 'buy' or 'sell'
|
|
1498
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1499
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1500
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1501
|
-
* @param {string} [params.timeInForce] 'Gtc', 'Ioc', 'Alo'
|
|
1502
|
-
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
1503
|
-
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
1504
|
-
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1505
|
-
* @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1506
|
-
* @param {string} [params.vaultAddress] the vault address for order
|
|
1507
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1508
|
-
*/
|
|
1483
|
+
editOrderRequest(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1509
1484
|
this.checkRequiredCredentials();
|
|
1510
1485
|
if (id === undefined) {
|
|
1511
1486
|
throw new ArgumentsRequired(this.id + ' editOrder() requires an id argument');
|
|
1512
1487
|
}
|
|
1513
|
-
await this.loadMarkets();
|
|
1514
1488
|
const market = this.market(symbol);
|
|
1515
1489
|
type = type.toUpperCase();
|
|
1516
1490
|
const isMarket = (type === 'MARKET');
|
|
@@ -1597,6 +1571,33 @@ export default class hyperliquid extends Exchange {
|
|
|
1597
1571
|
params = this.omit(params, 'vaultAddress');
|
|
1598
1572
|
request['vaultAddress'] = vaultAddress;
|
|
1599
1573
|
}
|
|
1574
|
+
return request;
|
|
1575
|
+
}
|
|
1576
|
+
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1577
|
+
/**
|
|
1578
|
+
* @method
|
|
1579
|
+
* @name hyperliquid#editOrder
|
|
1580
|
+
* @description edit a trade order
|
|
1581
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
|
|
1582
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
|
|
1583
|
+
* @param {string} id cancel order id
|
|
1584
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1585
|
+
* @param {string} type 'market' or 'limit'
|
|
1586
|
+
* @param {string} side 'buy' or 'sell'
|
|
1587
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1588
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1589
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1590
|
+
* @param {string} [params.timeInForce] 'Gtc', 'Ioc', 'Alo'
|
|
1591
|
+
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
1592
|
+
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
1593
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1594
|
+
* @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1595
|
+
* @param {string} [params.vaultAddress] the vault address for order
|
|
1596
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1597
|
+
*/
|
|
1598
|
+
await this.loadMarkets();
|
|
1599
|
+
const market = this.market(symbol);
|
|
1600
|
+
const request = this.editOrderRequest(id, symbol, type, side, amount, price, params);
|
|
1600
1601
|
const response = await this.privatePostExchange(request);
|
|
1601
1602
|
//
|
|
1602
1603
|
// {
|
|
@@ -2758,4 +2759,23 @@ export default class hyperliquid extends Exchange {
|
|
|
2758
2759
|
}
|
|
2759
2760
|
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
2760
2761
|
}
|
|
2762
|
+
parseCreateOrderArgs(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2763
|
+
const market = this.market(symbol);
|
|
2764
|
+
const vaultAddress = this.safeString(params, 'vaultAddress');
|
|
2765
|
+
params = this.omit(params, 'vaultAddress');
|
|
2766
|
+
symbol = market['symbol'];
|
|
2767
|
+
const order = {
|
|
2768
|
+
'symbol': symbol,
|
|
2769
|
+
'type': type,
|
|
2770
|
+
'side': side,
|
|
2771
|
+
'amount': amount,
|
|
2772
|
+
'price': price,
|
|
2773
|
+
'params': params,
|
|
2774
|
+
};
|
|
2775
|
+
const globalParams = {};
|
|
2776
|
+
if (vaultAddress !== undefined) {
|
|
2777
|
+
globalParams['vaultAddress'] = vaultAddress;
|
|
2778
|
+
}
|
|
2779
|
+
return [order, globalParams];
|
|
2780
|
+
}
|
|
2761
2781
|
}
|
package/js/src/indodax.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import Exchange from './abstract/indodax.js';
|
|
9
9
|
import { ExchangeError, ArgumentsRequired, InsufficientFunds, InvalidOrder, OrderNotFound, AuthenticationError, BadSymbol } from './base/errors.js';
|
|
10
10
|
import { TICK_SIZE } from './base/functions/number.js';
|
|
11
|
+
import { Precise } from './base/Precise.js';
|
|
11
12
|
import { sha512 } from './static_dependencies/noble-hashes/sha512.js';
|
|
12
13
|
// ---------------------------------------------------------------------------
|
|
13
14
|
/**
|
|
@@ -835,9 +836,6 @@ export default class indodax extends Exchange {
|
|
|
835
836
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
836
837
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
837
838
|
*/
|
|
838
|
-
if (type !== 'limit') {
|
|
839
|
-
throw new ExchangeError(this.id + ' createOrder() allows limit orders only');
|
|
840
|
-
}
|
|
841
839
|
await this.loadMarkets();
|
|
842
840
|
const market = this.market(symbol);
|
|
843
841
|
const request = {
|
|
@@ -845,14 +843,44 @@ export default class indodax extends Exchange {
|
|
|
845
843
|
'type': side,
|
|
846
844
|
'price': price,
|
|
847
845
|
};
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
846
|
+
let priceIsRequired = false;
|
|
847
|
+
let quantityIsRequired = false;
|
|
848
|
+
if (type === 'market') {
|
|
849
|
+
if (side === 'buy') {
|
|
850
|
+
let quoteAmount = undefined;
|
|
851
|
+
const cost = this.safeNumber(params, 'cost');
|
|
852
|
+
params = this.omit(params, 'cost');
|
|
853
|
+
if (cost !== undefined) {
|
|
854
|
+
quoteAmount = this.costToPrecision(symbol, cost);
|
|
855
|
+
}
|
|
856
|
+
else {
|
|
857
|
+
if (price === undefined) {
|
|
858
|
+
throw new InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price).');
|
|
859
|
+
}
|
|
860
|
+
const amountString = this.numberToString(amount);
|
|
861
|
+
const priceString = this.numberToString(price);
|
|
862
|
+
const costRequest = Precise.stringMul(amountString, priceString);
|
|
863
|
+
quoteAmount = this.costToPrecision(symbol, costRequest);
|
|
864
|
+
}
|
|
865
|
+
request[market['quoteId']] = quoteAmount;
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
quantityIsRequired = true;
|
|
869
|
+
}
|
|
851
870
|
}
|
|
852
|
-
else {
|
|
853
|
-
|
|
871
|
+
else if (type === 'limit') {
|
|
872
|
+
priceIsRequired = true;
|
|
873
|
+
quantityIsRequired = true;
|
|
874
|
+
}
|
|
875
|
+
if (priceIsRequired) {
|
|
876
|
+
if (price === undefined) {
|
|
877
|
+
throw new InvalidOrder(this.id + ' createOrder() requires a price argument for a ' + type + ' order');
|
|
878
|
+
}
|
|
879
|
+
request['price'] = price;
|
|
880
|
+
}
|
|
881
|
+
if (quantityIsRequired) {
|
|
882
|
+
request[market['baseId']] = this.amountToPrecision(symbol, amount);
|
|
854
883
|
}
|
|
855
|
-
request[currency] = amount;
|
|
856
884
|
const result = await this.privatePostTrade(this.extend(request, params));
|
|
857
885
|
const data = this.safeValue(result, 'return', {});
|
|
858
886
|
const id = this.safeString(data, 'order_id');
|
package/js/src/kraken.js
CHANGED
|
@@ -1112,11 +1112,12 @@ export default class kraken extends Exchange {
|
|
|
1112
1112
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
1113
1113
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1114
1114
|
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
1115
|
+
* @param {int} [params.end] timestamp in seconds of the latest ledger entry
|
|
1115
1116
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1116
1117
|
*/
|
|
1117
1118
|
// https://www.kraken.com/features/api#get-ledgers-info
|
|
1118
1119
|
await this.loadMarkets();
|
|
1119
|
-
|
|
1120
|
+
const request = {};
|
|
1120
1121
|
let currency = undefined;
|
|
1121
1122
|
if (code !== undefined) {
|
|
1122
1123
|
currency = this.currency(code);
|
|
@@ -1125,7 +1126,12 @@ export default class kraken extends Exchange {
|
|
|
1125
1126
|
if (since !== undefined) {
|
|
1126
1127
|
request['start'] = this.parseToInt(since / 1000);
|
|
1127
1128
|
}
|
|
1128
|
-
|
|
1129
|
+
const until = this.safeStringN(params, ['until', 'till']);
|
|
1130
|
+
if (until !== undefined) {
|
|
1131
|
+
params = this.omit(params, ['until', 'till']);
|
|
1132
|
+
const untilDivided = Precise.stringDiv(until, '1000');
|
|
1133
|
+
request['end'] = this.parseToInt(Precise.stringAdd(untilDivided, '1'));
|
|
1134
|
+
}
|
|
1129
1135
|
const response = await this.privatePostLedgers(this.extend(request, params));
|
|
1130
1136
|
// { error: [],
|
|
1131
1137
|
// "result": { ledger: { 'LPUAIB-TS774-UKHP7X': { refid: "A2B4HBV-L4MDIE-JU4N3N",
|
|
@@ -2125,6 +2131,8 @@ export default class kraken extends Exchange {
|
|
|
2125
2131
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2126
2132
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2127
2133
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2134
|
+
* @param {int} [params.until] timestamp in ms of the latest trade entry
|
|
2135
|
+
* @param {int} [params.end] timestamp in seconds of the latest trade entry
|
|
2128
2136
|
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2129
2137
|
*/
|
|
2130
2138
|
await this.loadMarkets();
|
|
@@ -2138,6 +2146,12 @@ export default class kraken extends Exchange {
|
|
|
2138
2146
|
if (since !== undefined) {
|
|
2139
2147
|
request['start'] = this.parseToInt(since / 1000);
|
|
2140
2148
|
}
|
|
2149
|
+
const until = this.safeStringN(params, ['until', 'till']);
|
|
2150
|
+
if (until !== undefined) {
|
|
2151
|
+
params = this.omit(params, ['until', 'till']);
|
|
2152
|
+
const untilDivided = Precise.stringDiv(until, '1000');
|
|
2153
|
+
request['end'] = this.parseToInt(Precise.stringAdd(untilDivided, '1'));
|
|
2154
|
+
}
|
|
2141
2155
|
const response = await this.privatePostTradesHistory(this.extend(request, params));
|
|
2142
2156
|
//
|
|
2143
2157
|
// {
|
|
@@ -2553,6 +2567,8 @@ export default class kraken extends Exchange {
|
|
|
2553
2567
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2554
2568
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2555
2569
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2570
|
+
* @param {int} [params.until] timestamp in ms of the latest transaction entry
|
|
2571
|
+
* @param {int} [params.end] timestamp in seconds of the latest transaction entry
|
|
2556
2572
|
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2557
2573
|
*/
|
|
2558
2574
|
// https://www.kraken.com/en-us/help/api#deposit-status
|
|
@@ -2563,7 +2579,14 @@ export default class kraken extends Exchange {
|
|
|
2563
2579
|
request['asset'] = currency['id'];
|
|
2564
2580
|
}
|
|
2565
2581
|
if (since !== undefined) {
|
|
2566
|
-
|
|
2582
|
+
const sinceString = this.numberToString(since);
|
|
2583
|
+
request['start'] = Precise.stringDiv(sinceString, '1000');
|
|
2584
|
+
}
|
|
2585
|
+
const until = this.safeStringN(params, ['until', 'till']);
|
|
2586
|
+
if (until !== undefined) {
|
|
2587
|
+
params = this.omit(params, ['until', 'till']);
|
|
2588
|
+
const untilDivided = Precise.stringDiv(until, '1000');
|
|
2589
|
+
request['end'] = Precise.stringAdd(untilDivided, '1');
|
|
2567
2590
|
}
|
|
2568
2591
|
const response = await this.privatePostDepositStatus(this.extend(request, params));
|
|
2569
2592
|
//
|
|
@@ -2614,8 +2637,9 @@ export default class kraken extends Exchange {
|
|
|
2614
2637
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2615
2638
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2616
2639
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2617
|
-
* @param {
|
|
2618
|
-
* @param {
|
|
2640
|
+
* @param {int} [params.until] timestamp in ms of the latest transaction entry
|
|
2641
|
+
* @param {int} [params.end] timestamp in seconds of the latest transaction entry
|
|
2642
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times
|
|
2619
2643
|
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2620
2644
|
*/
|
|
2621
2645
|
await this.loadMarkets();
|
|
@@ -2631,7 +2655,14 @@ export default class kraken extends Exchange {
|
|
|
2631
2655
|
request['asset'] = currency['id'];
|
|
2632
2656
|
}
|
|
2633
2657
|
if (since !== undefined) {
|
|
2634
|
-
|
|
2658
|
+
const sinceString = this.numberToString(since);
|
|
2659
|
+
request['start'] = Precise.stringDiv(sinceString, '1000');
|
|
2660
|
+
}
|
|
2661
|
+
const until = this.safeStringN(params, ['until', 'till']);
|
|
2662
|
+
if (until !== undefined) {
|
|
2663
|
+
params = this.omit(params, ['until', 'till']);
|
|
2664
|
+
const untilDivided = Precise.stringDiv(until, '1000');
|
|
2665
|
+
request['end'] = Precise.stringAdd(untilDivided, '1');
|
|
2635
2666
|
}
|
|
2636
2667
|
const response = await this.privatePostWithdrawStatus(this.extend(request, params));
|
|
2637
2668
|
//
|
package/js/src/krakenfutures.js
CHANGED
|
@@ -1770,17 +1770,19 @@ export default class krakenfutures extends Exchange {
|
|
|
1770
1770
|
}
|
|
1771
1771
|
// Final order (after placement / editing / execution / canceling)
|
|
1772
1772
|
const orderTrigger = this.safeValue(item, 'orderTrigger');
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
isPrior = false;
|
|
1776
|
-
fixed = true;
|
|
1777
|
-
}
|
|
1778
|
-
else if (!fixed) {
|
|
1779
|
-
const orderPriorExecution = this.safeValue(item, 'orderPriorExecution');
|
|
1780
|
-
details = this.safeValue2(item, 'orderPriorExecution', 'orderPriorEdit');
|
|
1781
|
-
price = this.safeString(orderPriorExecution, 'limitPrice');
|
|
1773
|
+
if (details === undefined) {
|
|
1774
|
+
details = this.safeValue2(item, 'new', 'order', orderTrigger);
|
|
1782
1775
|
if (details !== undefined) {
|
|
1783
|
-
isPrior =
|
|
1776
|
+
isPrior = false;
|
|
1777
|
+
fixed = true;
|
|
1778
|
+
}
|
|
1779
|
+
else if (!fixed) {
|
|
1780
|
+
const orderPriorExecution = this.safeValue(item, 'orderPriorExecution');
|
|
1781
|
+
details = this.safeValue2(item, 'orderPriorExecution', 'orderPriorEdit');
|
|
1782
|
+
price = this.safeString(orderPriorExecution, 'limitPrice');
|
|
1783
|
+
if (details !== undefined) {
|
|
1784
|
+
isPrior = true;
|
|
1785
|
+
}
|
|
1784
1786
|
}
|
|
1785
1787
|
}
|
|
1786
1788
|
}
|
package/js/src/pro/ascendex.d.ts
CHANGED
|
@@ -4,10 +4,12 @@ import Client from '../base/ws/Client.js';
|
|
|
4
4
|
export default class ascendex extends ascendexRest {
|
|
5
5
|
describe(): any;
|
|
6
6
|
watchPublic(messageHash: any, params?: {}): Promise<any>;
|
|
7
|
+
watchPublicMultiple(messageHashes: any, params?: {}): Promise<any>;
|
|
7
8
|
watchPrivate(channel: any, messageHash: any, params?: {}): Promise<any>;
|
|
8
9
|
watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
9
10
|
handleOHLCV(client: Client, message: any): any;
|
|
10
11
|
watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
12
|
+
watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
11
13
|
handleTrades(client: Client, message: any): void;
|
|
12
14
|
watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
13
15
|
watchOrderBookSnapshot(symbol: string, limit?: Int, params?: {}): Promise<any>;
|
package/js/src/pro/ascendex.js
CHANGED
|
@@ -21,6 +21,7 @@ export default class ascendex extends ascendexRest {
|
|
|
21
21
|
'watchOrders': true,
|
|
22
22
|
'watchTicker': false,
|
|
23
23
|
'watchTrades': true,
|
|
24
|
+
'watchTradesForSymbols': true,
|
|
24
25
|
},
|
|
25
26
|
'urls': {
|
|
26
27
|
'api': {
|
|
@@ -58,6 +59,16 @@ export default class ascendex extends ascendexRest {
|
|
|
58
59
|
const message = this.extend(request, params);
|
|
59
60
|
return await this.watch(url, messageHash, message, messageHash);
|
|
60
61
|
}
|
|
62
|
+
async watchPublicMultiple(messageHashes, params = {}) {
|
|
63
|
+
const url = this.urls['api']['ws']['public'];
|
|
64
|
+
const id = this.nonce();
|
|
65
|
+
const request = {
|
|
66
|
+
'id': id.toString(),
|
|
67
|
+
'op': 'sub',
|
|
68
|
+
};
|
|
69
|
+
const message = this.extend(request, params);
|
|
70
|
+
return await this.watchMultiple(url, messageHashes, message, messageHashes);
|
|
71
|
+
}
|
|
61
72
|
async watchPrivate(channel, messageHash, params = {}) {
|
|
62
73
|
await this.loadAccounts();
|
|
63
74
|
const accountGroup = this.safeString(this.options, 'account-group');
|
|
@@ -78,6 +89,7 @@ export default class ascendex extends ascendexRest {
|
|
|
78
89
|
* @method
|
|
79
90
|
* @name ascendex#watchOHLCV
|
|
80
91
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
92
|
+
* @see https://ascendex.github.io/ascendex-pro-api/#channel-bar-data
|
|
81
93
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
82
94
|
* @param {string} timeframe the length of time each candle represents
|
|
83
95
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -143,22 +155,48 @@ export default class ascendex extends ascendexRest {
|
|
|
143
155
|
* @method
|
|
144
156
|
* @name ascendex#watchTrades
|
|
145
157
|
* @description get the list of most recent trades for a particular symbol
|
|
158
|
+
* @see https://ascendex.github.io/ascendex-pro-api/#channel-market-trades
|
|
146
159
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
147
160
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
148
161
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
149
162
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
150
163
|
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
151
164
|
*/
|
|
165
|
+
return await this.watchTradesForSymbols([symbol], since, limit, params);
|
|
166
|
+
}
|
|
167
|
+
async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
|
|
168
|
+
/**
|
|
169
|
+
* @method
|
|
170
|
+
* @name ascendex#watchTradesForSymbols
|
|
171
|
+
* @description get the list of most recent trades for a list of symbols
|
|
172
|
+
* @see https://ascendex.github.io/ascendex-pro-api/#channel-market-trades
|
|
173
|
+
* @param {string[]} symbols unified symbol of the market to fetch trades for
|
|
174
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
175
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
176
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
177
|
+
* @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
|
|
178
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
179
|
+
*/
|
|
152
180
|
await this.loadMarkets();
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const
|
|
181
|
+
symbols = this.marketSymbols(symbols, undefined, false, true, true);
|
|
182
|
+
const marketIds = [];
|
|
183
|
+
const messageHashes = [];
|
|
184
|
+
if (symbols !== undefined) {
|
|
185
|
+
for (let i = 0; i < symbols.length; i++) {
|
|
186
|
+
const market = this.market(symbols[i]);
|
|
187
|
+
marketIds.push(market['id']);
|
|
188
|
+
messageHashes.push('trades:' + market['id']);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const channel = 'trades:' + marketIds.join(',');
|
|
156
192
|
params = this.extend(params, {
|
|
157
193
|
'ch': channel,
|
|
158
194
|
});
|
|
159
|
-
const trades = await this.
|
|
195
|
+
const trades = await this.watchPublicMultiple(messageHashes, params);
|
|
160
196
|
if (this.newUpdates) {
|
|
161
|
-
|
|
197
|
+
const first = this.safeValue(trades, 0);
|
|
198
|
+
const tradeSymbol = this.safeString(first, 'symbol');
|
|
199
|
+
limit = trades.getLimit(tradeSymbol, limit);
|
|
162
200
|
}
|
|
163
201
|
return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
|
|
164
202
|
}
|
|
@@ -204,6 +242,7 @@ export default class ascendex extends ascendexRest {
|
|
|
204
242
|
* @method
|
|
205
243
|
* @name ascendex#watchOrderBook
|
|
206
244
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
245
|
+
* @see https://ascendex.github.io/ascendex-pro-api/#channel-level-2-order-book-updates
|
|
207
246
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
208
247
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
209
248
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -360,6 +399,7 @@ export default class ascendex extends ascendexRest {
|
|
|
360
399
|
* @method
|
|
361
400
|
* @name ascendex#watchBalance
|
|
362
401
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
402
|
+
* @see https://ascendex.github.io/ascendex-pro-api/#channel-order-and-balance
|
|
363
403
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
364
404
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
365
405
|
*/
|
package/js/src/pro/bingx.js
CHANGED
|
@@ -16,6 +16,7 @@ export default class bingx extends bingxRest {
|
|
|
16
16
|
'has': {
|
|
17
17
|
'ws': true,
|
|
18
18
|
'watchTrades': true,
|
|
19
|
+
'watchTradesForSymbols': false,
|
|
19
20
|
'watchOrderBook': true,
|
|
20
21
|
'watchOrderBookForSymbols': true,
|
|
21
22
|
'watchOHLCV': true,
|
|
@@ -438,8 +439,8 @@ export default class bingx extends bingxRest {
|
|
|
438
439
|
* @method
|
|
439
440
|
* @name bingx#watchTrades
|
|
440
441
|
* @description watches information on multiple trades made in a market
|
|
441
|
-
* @see https://bingx-api.github.io/docs/#/spot/socket/market.html#
|
|
442
|
-
* @see https://bingx-api.github.io/docs/#/swapV2/socket/market.html#Subscribe%20the%20Latest%20Trade%20Detail
|
|
442
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/market.html#Subscription%20transaction%20by%20transaction
|
|
443
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20the%20Latest%20Trade%20Detail
|
|
443
444
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
444
445
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
445
446
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -561,8 +562,8 @@ export default class bingx extends bingxRest {
|
|
|
561
562
|
* @method
|
|
562
563
|
* @name bingx#watchOrderBook
|
|
563
564
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
564
|
-
* @see https://bingx-api.github.io/docs/#/spot/socket/market.html#Subscribe%20Market%20Depth%20Data
|
|
565
|
-
* @see https://bingx-api.github.io/docs/#/swapV2/socket/market.html#Subscribe%20Market%20Depth%20Data
|
|
565
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/market.html#Subscribe%20Market%20Depth%20Data
|
|
566
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20Market%20Depth%20Data
|
|
566
567
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
567
568
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
568
569
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -793,8 +794,8 @@ export default class bingx extends bingxRest {
|
|
|
793
794
|
* @method
|
|
794
795
|
* @name bingx#watchOHLCV
|
|
795
796
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
796
|
-
* @see https://bingx-api.github.io/docs/#/spot/socket/market.html#K%
|
|
797
|
-
* @see https://bingx-api.github.io/docs/#/swapV2/socket/market.html#Subscribe%20K-Line%20Data
|
|
797
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/market.html#K-line%20Streams
|
|
798
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20K-Line%20Data
|
|
798
799
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
799
800
|
* @param {string} timeframe the length of time each candle represents
|
|
800
801
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -837,8 +838,8 @@ export default class bingx extends bingxRest {
|
|
|
837
838
|
/**
|
|
838
839
|
* @method
|
|
839
840
|
* @name bingx#watchOrders
|
|
840
|
-
* @see https://bingx-api.github.io/docs/#/spot/socket/account.html#Subscription%20order%20update%20data
|
|
841
|
-
* @see https://bingx-api.github.io/docs/#/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
841
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/account.html#Subscription%20order%20update%20data
|
|
842
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
842
843
|
* @description watches information on multiple orders made by the user
|
|
843
844
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
844
845
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -884,8 +885,8 @@ export default class bingx extends bingxRest {
|
|
|
884
885
|
/**
|
|
885
886
|
* @method
|
|
886
887
|
* @name bingx#watchMyTrades
|
|
887
|
-
* @see https://bingx-api.github.io/docs/#/spot/socket/account.html#Subscription%20order%20update%20data
|
|
888
|
-
* @see https://bingx-api.github.io/docs/#/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
888
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/account.html#Subscription%20order%20update%20data
|
|
889
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
889
890
|
* @description watches information on multiple trades made by the user
|
|
890
891
|
* @param {string} symbol unified market symbol of the market trades were made in
|
|
891
892
|
* @param {int} [since] the earliest time in ms to trades orders for
|
|
@@ -931,8 +932,8 @@ export default class bingx extends bingxRest {
|
|
|
931
932
|
/**
|
|
932
933
|
* @method
|
|
933
934
|
* @name bingx#watchBalance
|
|
934
|
-
* @see https://bingx-api.github.io/docs/#/spot/socket/account.html#Subscription%
|
|
935
|
-
* @see https://bingx-api.github.io/docs/#/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
935
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/account.html#Subscription%20account%20balance%20push
|
|
936
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
|
|
936
937
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
937
938
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
938
939
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
package/js/src/pro/bitget.d.ts
CHANGED
|
@@ -10,14 +10,17 @@ export default class bitget extends bitgetRest {
|
|
|
10
10
|
describe(): any;
|
|
11
11
|
getInstType(market: any, params?: {}): any[];
|
|
12
12
|
watchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
13
|
+
unWatchTicker(symbol: string, params?: {}): Promise<any>;
|
|
13
14
|
watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
14
15
|
handleTicker(client: Client, message: any): void;
|
|
15
16
|
parseWsTicker(message: any, market?: any): Ticker;
|
|
16
17
|
watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
18
|
+
unWatchOHLCV(symbol: string, timeframe?: string, params?: {}): Promise<any>;
|
|
17
19
|
handleOHLCV(client: Client, message: any): void;
|
|
18
20
|
parseWsOHLCV(ohlcv: any, market?: any): OHLCV;
|
|
19
21
|
watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
20
22
|
unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
|
|
23
|
+
unWatchChannel(symbol: string, channel: string, messageHashTopic: string, params?: {}): Promise<any>;
|
|
21
24
|
watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
|
|
22
25
|
handleOrderBook(client: Client, message: any): void;
|
|
23
26
|
handleCheckSumError(client: Client, symbol: string, messageHash: string): Promise<void>;
|
|
@@ -25,6 +28,7 @@ export default class bitget extends bitgetRest {
|
|
|
25
28
|
handleDeltas(bookside: any, deltas: any): void;
|
|
26
29
|
watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
27
30
|
watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
31
|
+
unWatchTrades(symbol: string, params?: {}): Promise<any>;
|
|
28
32
|
handleTrades(client: Client, message: any): void;
|
|
29
33
|
parseWsTrade(trade: any, market?: any): Trade;
|
|
30
34
|
watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
@@ -49,5 +53,9 @@ export default class bitget extends bitgetRest {
|
|
|
49
53
|
ping(client: Client): string;
|
|
50
54
|
handlePong(client: Client, message: any): any;
|
|
51
55
|
handleSubscriptionStatus(client: Client, message: any): any;
|
|
56
|
+
handleOrderBookUnSubscription(client: Client, message: any): void;
|
|
57
|
+
handleTradesUnSubscription(client: Client, message: any): void;
|
|
58
|
+
handleTickerUnSubscription(client: Client, message: any): void;
|
|
59
|
+
handleOHLCVUnSubscription(client: Client, message: any): void;
|
|
52
60
|
handleUnSubscriptionStatus(client: Client, message: any): any;
|
|
53
61
|
}
|