ccxt 4.2.59 → 4.2.61
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 +103 -102
- package/build.sh +2 -2
- package/dist/ccxt.browser.js +11853 -3790
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +4 -1
- package/dist/cjs/src/abstract/hyperliquid.js +9 -0
- package/dist/cjs/src/ascendex.js +10 -12
- package/dist/cjs/src/base/Exchange.js +22 -1
- package/dist/cjs/src/base/functions/encode.js +5 -0
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/bingx.js +38 -0
- package/dist/cjs/src/bitfinex2.js +20 -3
- package/dist/cjs/src/bitget.js +9 -2
- package/dist/cjs/src/bitmart.js +41 -23
- package/dist/cjs/src/blofin.js +59 -1
- package/dist/cjs/src/coinbase.js +108 -103
- package/dist/cjs/src/coinex.js +61 -1
- package/dist/cjs/src/hitbtc.js +1 -1
- package/dist/cjs/src/htx.js +4 -1
- package/dist/cjs/src/hyperliquid.js +2035 -0
- package/dist/cjs/src/kraken.js +50 -41
- package/dist/cjs/src/krakenfutures.js +28 -0
- package/dist/cjs/src/kucoinfutures.js +3 -2
- package/dist/cjs/src/okx.js +1 -1
- package/dist/cjs/src/phemex.js +2 -2
- package/dist/cjs/src/pro/binance.js +16 -3
- package/dist/cjs/src/pro/bingx.js +1 -0
- package/dist/cjs/src/static_dependencies/ethers/abi-coder.js +158 -0
- package/dist/cjs/src/static_dependencies/ethers/address/address.js +144 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/abstract-coder.js +407 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/address.js +45 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/anonymous.js +28 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/array.js +176 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/boolean.js +27 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/bytes.js +52 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/fixed-bytes.js +45 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/null.js +30 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/number.js +60 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/string.js +27 -0
- package/dist/cjs/src/static_dependencies/ethers/coders/tuple.js +68 -0
- package/dist/cjs/src/static_dependencies/ethers/fragments.js +614 -0
- package/dist/cjs/src/static_dependencies/ethers/hash/typed-data.js +492 -0
- package/dist/cjs/src/static_dependencies/ethers/index.js +35 -0
- package/dist/cjs/src/static_dependencies/ethers/interface.js +44 -0
- package/dist/cjs/src/static_dependencies/ethers/typed.js +618 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/base58.js +20 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/data.js +134 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/errors.js +228 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/events.js +13 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/fixednumber.js +29 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/index.js +53 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/maths.js +231 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/properties.js +47 -0
- package/dist/cjs/src/static_dependencies/ethers/utils/utf8.js +218 -0
- package/dist/cjs/src/static_dependencies/messagepack/msgpack.js +292 -0
- package/dist/cjs/src/tokocrypto.js +22 -2
- package/dist/cjs/src/wazirx.js +314 -4
- package/dist/cjs/src/woo.js +157 -77
- package/js/ccxt.d.ts +5 -2
- package/js/ccxt.js +4 -2
- package/js/src/abstract/blofin.d.ts +1 -0
- package/js/src/abstract/coinbase.d.ts +3 -3
- package/js/src/abstract/hyperliquid.d.ts +9 -0
- package/js/src/abstract/hyperliquid.js +11 -0
- package/js/src/abstract/wazirx.d.ts +5 -0
- package/js/src/ascendex.d.ts +2 -2
- package/js/src/ascendex.js +10 -12
- package/js/src/base/Exchange.d.ts +4 -0
- package/js/src/base/Exchange.js +13 -1
- package/js/src/base/functions/encode.d.ts +2 -1
- package/js/src/base/functions/encode.js +5 -1
- package/js/src/bingx.d.ts +3 -1
- package/js/src/bingx.js +38 -0
- package/js/src/bitfinex2.js +20 -3
- package/js/src/bitget.js +9 -2
- package/js/src/bitmart.d.ts +9 -2
- package/js/src/bitmart.js +41 -23
- package/js/src/blofin.d.ts +2 -1
- package/js/src/blofin.js +59 -1
- package/js/src/coinbase.js +108 -103
- package/js/src/coinex.d.ts +3 -1
- package/js/src/coinex.js +61 -1
- package/js/src/hitbtc.js +1 -1
- package/js/src/htx.js +4 -1
- package/js/src/hyperliquid.d.ts +83 -0
- package/js/src/hyperliquid.js +2036 -0
- package/js/src/kraken.js +50 -41
- package/js/src/krakenfutures.d.ts +2 -1
- package/js/src/krakenfutures.js +28 -0
- package/js/src/kucoinfutures.js +3 -2
- package/js/src/okx.js +1 -1
- package/js/src/phemex.js +2 -2
- package/js/src/pro/binance.js +16 -3
- package/js/src/pro/bingx.js +1 -0
- package/js/src/pro/deribit.d.ts +1 -1
- package/js/src/static_dependencies/ethers/abi-coder.d.ts +50 -0
- package/js/src/static_dependencies/ethers/abi-coder.js +148 -0
- package/js/src/static_dependencies/ethers/address/address.d.ts +55 -0
- package/js/src/static_dependencies/ethers/address/address.js +162 -0
- package/js/src/static_dependencies/ethers/address/checks.d.ts +80 -0
- package/js/src/static_dependencies/ethers/address/checks.js +119 -0
- package/js/src/static_dependencies/ethers/address/contract-address.d.ts +47 -0
- package/js/src/static_dependencies/ethers/address/contract-address.js +73 -0
- package/js/src/static_dependencies/ethers/address/index.d.ts +48 -0
- package/js/src/static_dependencies/ethers/address/index.js +24 -0
- package/js/src/static_dependencies/ethers/bytes32.d.ts +14 -0
- package/js/src/static_dependencies/ethers/bytes32.js +45 -0
- package/js/src/static_dependencies/ethers/coders/abstract-coder.d.ts +120 -0
- package/js/src/static_dependencies/ethers/coders/abstract-coder.js +424 -0
- package/js/src/static_dependencies/ethers/coders/address.d.ts +12 -0
- package/js/src/static_dependencies/ethers/coders/address.js +34 -0
- package/js/src/static_dependencies/ethers/coders/anonymous.d.ts +14 -0
- package/js/src/static_dependencies/ethers/coders/anonymous.js +27 -0
- package/js/src/static_dependencies/ethers/coders/array.d.ts +24 -0
- package/js/src/static_dependencies/ethers/coders/array.js +162 -0
- package/js/src/static_dependencies/ethers/coders/boolean.d.ts +12 -0
- package/js/src/static_dependencies/ethers/coders/boolean.js +26 -0
- package/js/src/static_dependencies/ethers/coders/bytes.d.ts +18 -0
- package/js/src/static_dependencies/ethers/coders/bytes.js +39 -0
- package/js/src/static_dependencies/ethers/coders/fixed-bytes.d.ts +14 -0
- package/js/src/static_dependencies/ethers/coders/fixed-bytes.js +32 -0
- package/js/src/static_dependencies/ethers/coders/null.d.ts +11 -0
- package/js/src/static_dependencies/ethers/coders/null.js +29 -0
- package/js/src/static_dependencies/ethers/coders/number.d.ts +15 -0
- package/js/src/static_dependencies/ethers/coders/number.js +48 -0
- package/js/src/static_dependencies/ethers/coders/string.d.ts +12 -0
- package/js/src/static_dependencies/ethers/coders/string.js +26 -0
- package/js/src/static_dependencies/ethers/coders/tuple.d.ts +15 -0
- package/js/src/static_dependencies/ethers/coders/tuple.js +67 -0
- package/js/src/static_dependencies/ethers/fragments.d.ts +458 -0
- package/js/src/static_dependencies/ethers/fragments.js +1252 -0
- package/js/src/static_dependencies/ethers/hash/index.d.ts +10 -0
- package/js/src/static_dependencies/ethers/hash/index.js +15 -0
- package/js/src/static_dependencies/ethers/hash/solidity.d.ts +30 -0
- package/js/src/static_dependencies/ethers/hash/solidity.js +107 -0
- package/js/src/static_dependencies/ethers/hash/typed-data.d.ts +144 -0
- package/js/src/static_dependencies/ethers/hash/typed-data.js +490 -0
- package/js/src/static_dependencies/ethers/index.d.ts +19 -0
- package/js/src/static_dependencies/ethers/index.js +22 -0
- package/js/src/static_dependencies/ethers/interface.d.ts +380 -0
- package/js/src/static_dependencies/ethers/interface.js +990 -0
- package/js/src/static_dependencies/ethers/typed.d.ts +569 -0
- package/js/src/static_dependencies/ethers/typed.js +608 -0
- package/js/src/static_dependencies/ethers/utils/base58.d.ts +22 -0
- package/js/src/static_dependencies/ethers/utils/base58.js +68 -0
- package/js/src/static_dependencies/ethers/utils/base64-browser.d.ts +3 -0
- package/js/src/static_dependencies/ethers/utils/base64-browser.js +24 -0
- package/js/src/static_dependencies/ethers/utils/base64.d.ts +39 -0
- package/js/src/static_dependencies/ethers/utils/base64.js +58 -0
- package/js/src/static_dependencies/ethers/utils/data.d.ts +92 -0
- package/js/src/static_dependencies/ethers/utils/data.js +175 -0
- package/js/src/static_dependencies/ethers/utils/errors.d.ts +509 -0
- package/js/src/static_dependencies/ethers/utils/errors.js +227 -0
- package/js/src/static_dependencies/ethers/utils/events.d.ts +76 -0
- package/js/src/static_dependencies/ethers/utils/events.js +52 -0
- package/js/src/static_dependencies/ethers/utils/fixednumber.d.ts +251 -0
- package/js/src/static_dependencies/ethers/utils/fixednumber.js +529 -0
- package/js/src/static_dependencies/ethers/utils/index.d.ts +30 -0
- package/js/src/static_dependencies/ethers/utils/index.js +38 -0
- package/js/src/static_dependencies/ethers/utils/maths.d.ts +65 -0
- package/js/src/static_dependencies/ethers/utils/maths.js +220 -0
- package/js/src/static_dependencies/ethers/utils/properties.d.ts +22 -0
- package/js/src/static_dependencies/ethers/utils/properties.js +59 -0
- package/js/src/static_dependencies/ethers/utils/rlp-decode.d.ts +5 -0
- package/js/src/static_dependencies/ethers/utils/rlp-decode.js +84 -0
- package/js/src/static_dependencies/ethers/utils/rlp-encode.d.ts +5 -0
- package/js/src/static_dependencies/ethers/utils/rlp-encode.js +54 -0
- package/js/src/static_dependencies/ethers/utils/rlp.d.ts +16 -0
- package/js/src/static_dependencies/ethers/utils/rlp.js +14 -0
- package/js/src/static_dependencies/ethers/utils/units.d.ts +23 -0
- package/js/src/static_dependencies/ethers/utils/units.js +88 -0
- package/js/src/static_dependencies/ethers/utils/utf8.d.ts +95 -0
- package/js/src/static_dependencies/ethers/utils/utf8.js +225 -0
- package/js/src/static_dependencies/ethers/utils/uuid.d.ts +7 -0
- package/js/src/static_dependencies/ethers/utils/uuid.js +35 -0
- package/js/src/static_dependencies/messagepack/msgpack.d.ts +2 -0
- package/js/src/static_dependencies/messagepack/msgpack.js +572 -0
- package/js/src/tokocrypto.js +22 -2
- package/js/src/wazirx.d.ts +12 -1
- package/js/src/wazirx.js +314 -4
- package/js/src/woo.d.ts +8 -0
- package/js/src/woo.js +157 -77
- package/package.json +1 -1
- package/skip-tests.json +60 -16
package/dist/cjs/src/woo.js
CHANGED
|
@@ -84,10 +84,10 @@ class woo extends woo$1 {
|
|
|
84
84
|
'fetchPositionMode': false,
|
|
85
85
|
'fetchPositions': true,
|
|
86
86
|
'fetchPremiumIndexOHLCV': false,
|
|
87
|
-
'fetchStatus':
|
|
87
|
+
'fetchStatus': true,
|
|
88
88
|
'fetchTicker': false,
|
|
89
89
|
'fetchTickers': false,
|
|
90
|
-
'fetchTime':
|
|
90
|
+
'fetchTime': true,
|
|
91
91
|
'fetchTrades': true,
|
|
92
92
|
'fetchTradingFee': false,
|
|
93
93
|
'fetchTradingFees': true,
|
|
@@ -324,6 +324,67 @@ class woo extends woo$1 {
|
|
|
324
324
|
'precisionMode': number.TICK_SIZE,
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
|
+
async fetchStatus(params = {}) {
|
|
328
|
+
/**
|
|
329
|
+
* @method
|
|
330
|
+
* @name woo#fetchStatus
|
|
331
|
+
* @description the latest known information on the availability of the exchange API
|
|
332
|
+
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
333
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
334
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
335
|
+
*/
|
|
336
|
+
const response = await this.v1PublicGetSystemInfo(params);
|
|
337
|
+
//
|
|
338
|
+
// {
|
|
339
|
+
// "success": true,
|
|
340
|
+
// "data": {
|
|
341
|
+
// "status": "0",
|
|
342
|
+
// "msg": "System is functioning properly."
|
|
343
|
+
// },
|
|
344
|
+
// "timestamp": "1709274106602"
|
|
345
|
+
// }
|
|
346
|
+
//
|
|
347
|
+
const data = this.safeDict(response, 'data', {});
|
|
348
|
+
let status = this.safeString(data, 'status');
|
|
349
|
+
if (status === undefined) {
|
|
350
|
+
status = 'error';
|
|
351
|
+
}
|
|
352
|
+
else if (status === '0') {
|
|
353
|
+
status = 'ok';
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
status = 'maintenance';
|
|
357
|
+
}
|
|
358
|
+
return {
|
|
359
|
+
'status': status,
|
|
360
|
+
'updated': undefined,
|
|
361
|
+
'eta': undefined,
|
|
362
|
+
'url': undefined,
|
|
363
|
+
'info': response,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
async fetchTime(params = {}) {
|
|
367
|
+
/**
|
|
368
|
+
* @method
|
|
369
|
+
* @name woo#fetchTime
|
|
370
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
371
|
+
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
372
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
373
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
374
|
+
*/
|
|
375
|
+
const response = await this.v1PublicGetSystemInfo(params);
|
|
376
|
+
//
|
|
377
|
+
// {
|
|
378
|
+
// "success": true,
|
|
379
|
+
// "data": {
|
|
380
|
+
// "status": "0",
|
|
381
|
+
// "msg": "System is functioning properly."
|
|
382
|
+
// },
|
|
383
|
+
// "timestamp": "1709274106602"
|
|
384
|
+
// }
|
|
385
|
+
//
|
|
386
|
+
return this.safeInteger(response, 'timestamp');
|
|
387
|
+
}
|
|
327
388
|
async fetchMarkets(params = {}) {
|
|
328
389
|
/**
|
|
329
390
|
* @method
|
|
@@ -354,7 +415,7 @@ class woo extends woo$1 {
|
|
|
354
415
|
// "success": true
|
|
355
416
|
// }
|
|
356
417
|
//
|
|
357
|
-
const data = this.
|
|
418
|
+
const data = this.safeList(response, 'rows', []);
|
|
358
419
|
return this.parseMarkets(data);
|
|
359
420
|
}
|
|
360
421
|
parseMarket(market) {
|
|
@@ -606,7 +667,7 @@ class woo extends woo$1 {
|
|
|
606
667
|
// "timestamp": 1673323685109
|
|
607
668
|
// }
|
|
608
669
|
//
|
|
609
|
-
const data = this.
|
|
670
|
+
const data = this.safeDict(response, 'data', {});
|
|
610
671
|
const maker = this.safeString(data, 'makerFeeRate');
|
|
611
672
|
const taker = this.safeString(data, 'takerFeeRate');
|
|
612
673
|
const result = {};
|
|
@@ -693,7 +754,7 @@ class woo extends woo$1 {
|
|
|
693
754
|
// "success": true
|
|
694
755
|
// }
|
|
695
756
|
//
|
|
696
|
-
const tokenRows = this.
|
|
757
|
+
const tokenRows = this.safeList(tokenResponse, 'rows', []);
|
|
697
758
|
const networksByCurrencyId = this.groupBy(tokenRows, 'balance_token');
|
|
698
759
|
const currencyIds = Object.keys(networksByCurrencyId);
|
|
699
760
|
for (let i = 0; i < currencyIds.length; i++) {
|
|
@@ -853,7 +914,7 @@ class woo extends woo$1 {
|
|
|
853
914
|
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
854
915
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
855
916
|
*/
|
|
856
|
-
const reduceOnly = this.
|
|
917
|
+
const reduceOnly = this.safeBool2(params, 'reduceOnly', 'reduce_only');
|
|
857
918
|
params = this.omit(params, ['reduceOnly', 'reduce_only']);
|
|
858
919
|
const orderType = type.toUpperCase();
|
|
859
920
|
await this.loadMarkets();
|
|
@@ -1024,9 +1085,9 @@ class woo extends woo$1 {
|
|
|
1024
1085
|
// },
|
|
1025
1086
|
// "timestamp": "1686149372216"
|
|
1026
1087
|
// }
|
|
1027
|
-
const data = this.
|
|
1088
|
+
const data = this.safeDict(response, 'data');
|
|
1028
1089
|
if (data !== undefined) {
|
|
1029
|
-
const rows = this.
|
|
1090
|
+
const rows = this.safeList(data, 'rows', []);
|
|
1030
1091
|
return this.parseOrder(rows[0], market);
|
|
1031
1092
|
}
|
|
1032
1093
|
const order = this.parseOrder(response, market);
|
|
@@ -1127,7 +1188,7 @@ class woo extends woo$1 {
|
|
|
1127
1188
|
// "timestamp": 0
|
|
1128
1189
|
// }
|
|
1129
1190
|
//
|
|
1130
|
-
const data = this.
|
|
1191
|
+
const data = this.safeDict(response, 'data', {});
|
|
1131
1192
|
return this.parseOrder(data, market);
|
|
1132
1193
|
}
|
|
1133
1194
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
@@ -1201,8 +1262,8 @@ class woo extends woo$1 {
|
|
|
1201
1262
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1202
1263
|
*/
|
|
1203
1264
|
await this.loadMarkets();
|
|
1204
|
-
const stop = this.
|
|
1205
|
-
params = this.omit(params, 'stop');
|
|
1265
|
+
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
1266
|
+
params = this.omit(params, ['stop', 'trigger']);
|
|
1206
1267
|
if (stop) {
|
|
1207
1268
|
return await this.v3PrivateDeleteAlgoOrdersPending(params);
|
|
1208
1269
|
}
|
|
@@ -1236,8 +1297,8 @@ class woo extends woo$1 {
|
|
|
1236
1297
|
*/
|
|
1237
1298
|
await this.loadMarkets();
|
|
1238
1299
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
1239
|
-
const stop = this.
|
|
1240
|
-
params = this.omit(params, 'stop');
|
|
1300
|
+
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
1301
|
+
params = this.omit(params, ['stop', 'trigger']);
|
|
1241
1302
|
const request = {};
|
|
1242
1303
|
const clientOrderId = this.safeString2(params, 'clOrdID', 'clientOrderId');
|
|
1243
1304
|
let response = undefined;
|
|
@@ -1311,9 +1372,9 @@ class woo extends woo$1 {
|
|
|
1311
1372
|
await this.loadMarkets();
|
|
1312
1373
|
const request = {};
|
|
1313
1374
|
let market = undefined;
|
|
1314
|
-
const stop = this.
|
|
1375
|
+
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
1315
1376
|
const trailing = this.safeBool(params, 'trailing', false);
|
|
1316
|
-
params = this.omit(params, ['stop', 'trailing']);
|
|
1377
|
+
params = this.omit(params, ['stop', 'trailing', 'trigger']);
|
|
1317
1378
|
if (symbol !== undefined) {
|
|
1318
1379
|
market = this.market(symbol);
|
|
1319
1380
|
request['symbol'] = market['id'];
|
|
@@ -1371,7 +1432,7 @@ class woo extends woo$1 {
|
|
|
1371
1432
|
// }
|
|
1372
1433
|
//
|
|
1373
1434
|
const data = this.safeValue(response, 'data', response);
|
|
1374
|
-
const orders = this.
|
|
1435
|
+
const orders = this.safeList(data, 'rows');
|
|
1375
1436
|
return this.parseOrders(orders, market, since, limit, params);
|
|
1376
1437
|
}
|
|
1377
1438
|
parseTimeInForce(timeInForce) {
|
|
@@ -1473,7 +1534,7 @@ class woo extends woo$1 {
|
|
|
1473
1534
|
'type': orderType,
|
|
1474
1535
|
'timeInForce': this.parseTimeInForce(orderType),
|
|
1475
1536
|
'postOnly': undefined,
|
|
1476
|
-
'reduceOnly': this.
|
|
1537
|
+
'reduceOnly': this.safeBool(order, 'reduce_only'),
|
|
1477
1538
|
'side': side,
|
|
1478
1539
|
'price': price,
|
|
1479
1540
|
'stopPrice': stopPrice,
|
|
@@ -1631,7 +1692,7 @@ class woo extends woo$1 {
|
|
|
1631
1692
|
// }
|
|
1632
1693
|
//
|
|
1633
1694
|
}
|
|
1634
|
-
const rows = this.
|
|
1695
|
+
const rows = this.safeList(response, 'rows', []);
|
|
1635
1696
|
return this.parseOHLCVs(rows, market, timeframe, since, limit);
|
|
1636
1697
|
}
|
|
1637
1698
|
parseOHLCV(ohlcv, market = undefined) {
|
|
@@ -1684,7 +1745,7 @@ class woo extends woo$1 {
|
|
|
1684
1745
|
// }
|
|
1685
1746
|
// ]
|
|
1686
1747
|
// }
|
|
1687
|
-
const trades = this.
|
|
1748
|
+
const trades = this.safeList(response, 'rows', []);
|
|
1688
1749
|
return this.parseTrades(trades, market, since, limit, params);
|
|
1689
1750
|
}
|
|
1690
1751
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -1732,7 +1793,7 @@ class woo extends woo$1 {
|
|
|
1732
1793
|
// ...
|
|
1733
1794
|
// ]
|
|
1734
1795
|
// }
|
|
1735
|
-
const trades = this.
|
|
1796
|
+
const trades = this.safeList(response, 'rows', []);
|
|
1736
1797
|
return this.parseTrades(trades, market, since, limit, params);
|
|
1737
1798
|
}
|
|
1738
1799
|
async fetchAccounts(params = {}) {
|
|
@@ -1760,7 +1821,7 @@ class woo extends woo$1 {
|
|
|
1760
1821
|
// "success": true
|
|
1761
1822
|
// }
|
|
1762
1823
|
//
|
|
1763
|
-
const rows = this.
|
|
1824
|
+
const rows = this.safeList(response, 'rows', []);
|
|
1764
1825
|
return this.parseAccounts(rows, params);
|
|
1765
1826
|
}
|
|
1766
1827
|
parseAccount(account) {
|
|
@@ -1814,14 +1875,14 @@ class woo extends woo$1 {
|
|
|
1814
1875
|
// "timestamp": 1673323746259
|
|
1815
1876
|
// }
|
|
1816
1877
|
//
|
|
1817
|
-
const data = this.
|
|
1878
|
+
const data = this.safeDict(response, 'data');
|
|
1818
1879
|
return this.parseBalance(data);
|
|
1819
1880
|
}
|
|
1820
1881
|
parseBalance(response) {
|
|
1821
1882
|
const result = {
|
|
1822
1883
|
'info': response,
|
|
1823
1884
|
};
|
|
1824
|
-
const balances = this.
|
|
1885
|
+
const balances = this.safeList(response, 'holding', []);
|
|
1825
1886
|
for (let i = 0; i < balances.length; i++) {
|
|
1826
1887
|
const balance = balances[i];
|
|
1827
1888
|
const code = this.safeCurrencyCode(this.safeString(balance, 'token'));
|
|
@@ -2098,6 +2159,7 @@ class woo extends woo$1 {
|
|
|
2098
2159
|
/**
|
|
2099
2160
|
* @method
|
|
2100
2161
|
* @name woo#transfer
|
|
2162
|
+
* @see https://docs.woo.org/#get-transfer-history
|
|
2101
2163
|
* @description transfer currency internally between wallets on the same account
|
|
2102
2164
|
* @param {string} code unified currency code
|
|
2103
2165
|
* @param {float} amount amount to transfer
|
|
@@ -2110,7 +2172,7 @@ class woo extends woo$1 {
|
|
|
2110
2172
|
const currency = this.currency(code);
|
|
2111
2173
|
const request = {
|
|
2112
2174
|
'token': currency['id'],
|
|
2113
|
-
'amount': this.
|
|
2175
|
+
'amount': this.parseToNumeric(amount),
|
|
2114
2176
|
'from_application_id': fromAccount,
|
|
2115
2177
|
'to_application_id': toAccount,
|
|
2116
2178
|
};
|
|
@@ -2122,7 +2184,7 @@ class woo extends woo$1 {
|
|
|
2122
2184
|
// }
|
|
2123
2185
|
//
|
|
2124
2186
|
const transfer = this.parseTransfer(response, currency);
|
|
2125
|
-
const transferOptions = this.
|
|
2187
|
+
const transferOptions = this.safeDict(this.options, 'transfer', {});
|
|
2126
2188
|
const fillResponseFromRequest = this.safeBool(transferOptions, 'fillResponseFromRequest', true);
|
|
2127
2189
|
if (fillResponseFromRequest) {
|
|
2128
2190
|
transfer['amount'] = amount;
|
|
@@ -2136,41 +2198,71 @@ class woo extends woo$1 {
|
|
|
2136
2198
|
* @method
|
|
2137
2199
|
* @name woo#fetchTransfers
|
|
2138
2200
|
* @description fetch a history of internal transfers made on an account
|
|
2201
|
+
* @see https://docs.woo.org/#get-transfer-history
|
|
2139
2202
|
* @param {string} code unified currency code of the currency transferred
|
|
2140
2203
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2141
2204
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2142
2205
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2206
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2143
2207
|
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2144
2208
|
*/
|
|
2145
|
-
const request = {
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2209
|
+
const request = {};
|
|
2210
|
+
if (limit !== undefined) {
|
|
2211
|
+
request['size'] = limit;
|
|
2212
|
+
}
|
|
2213
|
+
if (since !== undefined) {
|
|
2214
|
+
request['start_t'] = since;
|
|
2215
|
+
}
|
|
2216
|
+
const until = this.safeInteger2(params, 'until', 'till'); // unified in milliseconds
|
|
2217
|
+
params = this.omit(params, ['until', 'till']);
|
|
2218
|
+
if (until !== undefined) {
|
|
2219
|
+
request['end_t'] = until;
|
|
2220
|
+
}
|
|
2221
|
+
const response = await this.v1PrivateGetAssetMainSubTransferHistory(this.extend(request, params));
|
|
2222
|
+
//
|
|
2223
|
+
// {
|
|
2224
|
+
// "rows": [
|
|
2225
|
+
// {
|
|
2226
|
+
// "id": 46704,
|
|
2227
|
+
// "token": "USDT",
|
|
2228
|
+
// "amount": 30000.00000000,
|
|
2229
|
+
// "status": "COMPLETED",
|
|
2230
|
+
// "from_application_id": "0f1bd3cd-dba2-4563-b8bb-0adb1bfb83a3",
|
|
2231
|
+
// "to_application_id": "c01e6940-a735-4022-9b6c-9d3971cdfdfa",
|
|
2232
|
+
// "from_user": "LeverageLow",
|
|
2233
|
+
// "to_user": "dev",
|
|
2234
|
+
// "created_time": "1709022325.427",
|
|
2235
|
+
// "updated_time": "1709022325.542"
|
|
2236
|
+
// }
|
|
2237
|
+
// ],
|
|
2238
|
+
// "meta": {
|
|
2239
|
+
// "total": 50,
|
|
2240
|
+
// "records_per_page": 25,
|
|
2241
|
+
// "current_page": 1
|
|
2242
|
+
// },
|
|
2243
|
+
// "success": true
|
|
2244
|
+
// }
|
|
2245
|
+
//
|
|
2246
|
+
const data = this.safeList(response, 'rows', []);
|
|
2247
|
+
return this.parseTransfers(data, undefined, since, limit, params);
|
|
2150
2248
|
}
|
|
2151
2249
|
parseTransfer(transfer, currency = undefined) {
|
|
2152
2250
|
//
|
|
2153
|
-
//
|
|
2154
|
-
//
|
|
2155
|
-
//
|
|
2156
|
-
//
|
|
2157
|
-
//
|
|
2158
|
-
//
|
|
2159
|
-
//
|
|
2160
|
-
//
|
|
2161
|
-
//
|
|
2162
|
-
//
|
|
2163
|
-
//
|
|
2164
|
-
//
|
|
2165
|
-
//
|
|
2166
|
-
// "amount": 1000,
|
|
2167
|
-
// "tx_id": "0x8a74c517bc104c8ebad0c3c3f64b1f302ed5f8bca598ae4459c63419038106b6",
|
|
2168
|
-
// "fee_token": null,
|
|
2169
|
-
// "fee_amount": null,
|
|
2170
|
-
// "status": "CONFIRMING"
|
|
2171
|
-
// }
|
|
2251
|
+
// fetchTransfers
|
|
2252
|
+
// {
|
|
2253
|
+
// "id": 46704,
|
|
2254
|
+
// "token": "USDT",
|
|
2255
|
+
// "amount": 30000.00000000,
|
|
2256
|
+
// "status": "COMPLETED",
|
|
2257
|
+
// "from_application_id": "0f1bd3cd-dba2-4563-b8bb-0adb1bfb83a3",
|
|
2258
|
+
// "to_application_id": "c01e6940-a735-4022-9b6c-9d3971cdfdfa",
|
|
2259
|
+
// "from_user": "LeverageLow",
|
|
2260
|
+
// "to_user": "dev",
|
|
2261
|
+
// "created_time": "1709022325.427",
|
|
2262
|
+
// "updated_time": "1709022325.542"
|
|
2263
|
+
// }
|
|
2172
2264
|
//
|
|
2173
|
-
//
|
|
2265
|
+
// transfer
|
|
2174
2266
|
// {
|
|
2175
2267
|
// "success": true,
|
|
2176
2268
|
// "id": 200
|
|
@@ -2179,22 +2271,8 @@ class woo extends woo$1 {
|
|
|
2179
2271
|
const networkizedCode = this.safeString(transfer, 'token');
|
|
2180
2272
|
const currencyDefined = this.getCurrencyFromChaincode(networkizedCode, currency);
|
|
2181
2273
|
const code = currencyDefined['code'];
|
|
2182
|
-
let movementDirection = this.safeStringLower(transfer, 'token_side');
|
|
2183
|
-
if (movementDirection === 'withdraw') {
|
|
2184
|
-
movementDirection = 'withdrawal';
|
|
2185
|
-
}
|
|
2186
|
-
let fromAccount = undefined;
|
|
2187
|
-
let toAccount = undefined;
|
|
2188
|
-
if (movementDirection === 'withdraw') {
|
|
2189
|
-
fromAccount = undefined;
|
|
2190
|
-
toAccount = 'spot';
|
|
2191
|
-
}
|
|
2192
|
-
else if (movementDirection === 'deposit') {
|
|
2193
|
-
fromAccount = 'spot';
|
|
2194
|
-
toAccount = undefined;
|
|
2195
|
-
}
|
|
2196
2274
|
const timestamp = this.safeTimestamp(transfer, 'created_time');
|
|
2197
|
-
const success = this.
|
|
2275
|
+
const success = this.safeBool(transfer, 'success');
|
|
2198
2276
|
let status = undefined;
|
|
2199
2277
|
if (success !== undefined) {
|
|
2200
2278
|
status = success ? 'ok' : 'failed';
|
|
@@ -2205,8 +2283,8 @@ class woo extends woo$1 {
|
|
|
2205
2283
|
'datetime': this.iso8601(timestamp),
|
|
2206
2284
|
'currency': code,
|
|
2207
2285
|
'amount': this.safeNumber(transfer, 'amount'),
|
|
2208
|
-
'fromAccount':
|
|
2209
|
-
'toAccount':
|
|
2286
|
+
'fromAccount': this.safeString(transfer, 'from_application_id'),
|
|
2287
|
+
'toAccount': this.safeString(transfer, 'to_application_id'),
|
|
2210
2288
|
'status': this.parseTransferStatus(this.safeString(transfer, 'status', status)),
|
|
2211
2289
|
'info': transfer,
|
|
2212
2290
|
};
|
|
@@ -2244,11 +2322,11 @@ class woo extends woo$1 {
|
|
|
2244
2322
|
if (tag !== undefined) {
|
|
2245
2323
|
request['extra'] = tag;
|
|
2246
2324
|
}
|
|
2247
|
-
const networks = this.
|
|
2248
|
-
const currencyNetworks = this.
|
|
2325
|
+
const networks = this.safeDict(this.options, 'networks', {});
|
|
2326
|
+
const currencyNetworks = this.safeDict(currency, 'networks', {});
|
|
2249
2327
|
const network = this.safeStringUpper(params, 'network');
|
|
2250
2328
|
const networkId = this.safeString(networks, network, network);
|
|
2251
|
-
const coinNetwork = this.
|
|
2329
|
+
const coinNetwork = this.safeDict(currencyNetworks, networkId, {});
|
|
2252
2330
|
const coinNetworkId = this.safeString(coinNetwork, 'id');
|
|
2253
2331
|
if (coinNetworkId === undefined) {
|
|
2254
2332
|
throw new errors.BadRequest(this.id + ' withdraw() require network parameter');
|
|
@@ -2376,7 +2454,9 @@ class woo extends woo$1 {
|
|
|
2376
2454
|
body = auth;
|
|
2377
2455
|
}
|
|
2378
2456
|
else {
|
|
2379
|
-
|
|
2457
|
+
if (Object.keys(params).length) {
|
|
2458
|
+
url += '?' + auth;
|
|
2459
|
+
}
|
|
2380
2460
|
}
|
|
2381
2461
|
auth += '|' + ts;
|
|
2382
2462
|
headers['content-type'] = 'application/x-www-form-urlencoded';
|
|
@@ -2393,7 +2473,7 @@ class woo extends woo$1 {
|
|
|
2393
2473
|
// 400 Bad Request {"success":false,"code":-1012,"message":"Amount is required for buy market orders when margin disabled."}
|
|
2394
2474
|
// {"code":"-1011","message":"The system is under maintenance.","success":false}
|
|
2395
2475
|
//
|
|
2396
|
-
const success = this.
|
|
2476
|
+
const success = this.safeBool(response, 'success');
|
|
2397
2477
|
const errorCode = this.safeString(response, 'code');
|
|
2398
2478
|
if (!success) {
|
|
2399
2479
|
const feedback = this.id + ' ' + this.json(response);
|
|
@@ -2469,7 +2549,7 @@ class woo extends woo$1 {
|
|
|
2469
2549
|
// "success":true
|
|
2470
2550
|
// }
|
|
2471
2551
|
//
|
|
2472
|
-
const result = this.
|
|
2552
|
+
const result = this.safeList(response, 'rows', []);
|
|
2473
2553
|
return this.parseIncomes(result, market, since, limit);
|
|
2474
2554
|
}
|
|
2475
2555
|
parseFundingRate(fundingRate, market = undefined) {
|
|
@@ -2550,7 +2630,7 @@ class woo extends woo$1 {
|
|
|
2550
2630
|
// "timestamp":1653633985646
|
|
2551
2631
|
// }
|
|
2552
2632
|
//
|
|
2553
|
-
const rows = this.
|
|
2633
|
+
const rows = this.safeList(response, 'rows', []);
|
|
2554
2634
|
const result = this.parseFundingRates(rows);
|
|
2555
2635
|
return this.filterByArray(result, 'symbol', symbols);
|
|
2556
2636
|
}
|
|
@@ -2604,7 +2684,7 @@ class woo extends woo$1 {
|
|
|
2604
2684
|
// "timestamp":1653640814885
|
|
2605
2685
|
// }
|
|
2606
2686
|
//
|
|
2607
|
-
const result = this.
|
|
2687
|
+
const result = this.safeList(response, 'rows');
|
|
2608
2688
|
const rates = [];
|
|
2609
2689
|
for (let i = 0; i < result.length; i++) {
|
|
2610
2690
|
const entry = result[i];
|
|
@@ -2766,8 +2846,8 @@ class woo extends woo$1 {
|
|
|
2766
2846
|
// "timestamp": 1673323880342
|
|
2767
2847
|
// }
|
|
2768
2848
|
//
|
|
2769
|
-
const result = this.
|
|
2770
|
-
const positions = this.
|
|
2849
|
+
const result = this.safeDict(response, 'data', {});
|
|
2850
|
+
const positions = this.safeList(result, 'positions', []);
|
|
2771
2851
|
return this.parsePositions(positions, symbols);
|
|
2772
2852
|
}
|
|
2773
2853
|
parsePosition(position, market = undefined) {
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.2.
|
|
7
|
+
declare const version = "4.2.60";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -69,6 +69,7 @@ import hollaex from './src/hollaex.js';
|
|
|
69
69
|
import htx from './src/htx.js';
|
|
70
70
|
import huobi from './src/huobi.js';
|
|
71
71
|
import huobijp from './src/huobijp.js';
|
|
72
|
+
import hyperliquid from './src/hyperliquid.js';
|
|
72
73
|
import idex from './src/idex.js';
|
|
73
74
|
import independentreserve from './src/independentreserve.js';
|
|
74
75
|
import indodax from './src/indodax.js';
|
|
@@ -231,6 +232,7 @@ declare const exchanges: {
|
|
|
231
232
|
htx: typeof htx;
|
|
232
233
|
huobi: typeof huobi;
|
|
233
234
|
huobijp: typeof huobijp;
|
|
235
|
+
hyperliquid: typeof hyperliquid;
|
|
234
236
|
idex: typeof idex;
|
|
235
237
|
independentreserve: typeof independentreserve;
|
|
236
238
|
indodax: typeof indodax;
|
|
@@ -464,6 +466,7 @@ declare const ccxt: {
|
|
|
464
466
|
htx: typeof htx;
|
|
465
467
|
huobi: typeof huobi;
|
|
466
468
|
huobijp: typeof huobijp;
|
|
469
|
+
hyperliquid: typeof hyperliquid;
|
|
467
470
|
idex: typeof idex;
|
|
468
471
|
independentreserve: typeof independentreserve;
|
|
469
472
|
indodax: typeof indodax;
|
|
@@ -501,5 +504,5 @@ declare const ccxt: {
|
|
|
501
504
|
zaif: typeof zaif;
|
|
502
505
|
zonda: typeof zonda;
|
|
503
506
|
} & typeof functions & typeof errors;
|
|
504
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange, Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbasepro, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, upbit, wavesexchange, wazirx, whitebit, woo, yobit, zaif, zonda, };
|
|
507
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange, Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbasepro, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, upbit, wavesexchange, wazirx, whitebit, woo, yobit, zaif, zonda, };
|
|
505
508
|
export default ccxt;
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.2.
|
|
41
|
+
const version = '4.2.61';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -105,6 +105,7 @@ import hollaex from './src/hollaex.js';
|
|
|
105
105
|
import htx from './src/htx.js';
|
|
106
106
|
import huobi from './src/huobi.js';
|
|
107
107
|
import huobijp from './src/huobijp.js';
|
|
108
|
+
import hyperliquid from './src/hyperliquid.js';
|
|
108
109
|
import idex from './src/idex.js';
|
|
109
110
|
import independentreserve from './src/independentreserve.js';
|
|
110
111
|
import indodax from './src/indodax.js';
|
|
@@ -268,6 +269,7 @@ const exchanges = {
|
|
|
268
269
|
'htx': htx,
|
|
269
270
|
'huobi': huobi,
|
|
270
271
|
'huobijp': huobijp,
|
|
272
|
+
'hyperliquid': hyperliquid,
|
|
271
273
|
'idex': idex,
|
|
272
274
|
'independentreserve': independentreserve,
|
|
273
275
|
'indodax': indodax,
|
|
@@ -380,6 +382,6 @@ pro.exchanges = Object.keys(pro);
|
|
|
380
382
|
pro['Exchange'] = Exchange; // now the same for rest and ts
|
|
381
383
|
//-----------------------------------------------------------------------------
|
|
382
384
|
const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
|
|
383
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbasepro, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, upbit, wavesexchange, wazirx, whitebit, woo, yobit, zaif, zonda, };
|
|
385
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbasepro, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, upbit, wavesexchange, wazirx, whitebit, woo, yobit, zaif, zonda, };
|
|
384
386
|
export default ccxt;
|
|
385
387
|
//-----------------------------------------------------------------------------
|
|
@@ -18,6 +18,7 @@ interface Exchange {
|
|
|
18
18
|
privateGetAccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
19
19
|
privateGetAccountPositions(params?: {}): Promise<implicitReturnType>;
|
|
20
20
|
privateGetAccountLeverageInfo(params?: {}): Promise<implicitReturnType>;
|
|
21
|
+
privateGetAccountBatchLeverageInfo(params?: {}): Promise<implicitReturnType>;
|
|
21
22
|
privateGetTradeOrdersTpslPending(params?: {}): Promise<implicitReturnType>;
|
|
22
23
|
privateGetTradeOrdersHistory(params?: {}): Promise<implicitReturnType>;
|
|
23
24
|
privateGetTradeOrdersTpslHistory(params?: {}): Promise<implicitReturnType>;
|
|
@@ -56,11 +56,11 @@ interface Exchange {
|
|
|
56
56
|
v3PrivateGetBrokerageProductsProductId(params?: {}): Promise<implicitReturnType>;
|
|
57
57
|
v3PrivateGetBrokerageProductsProductIdCandles(params?: {}): Promise<implicitReturnType>;
|
|
58
58
|
v3PrivateGetBrokerageProductsProductIdTicker(params?: {}): Promise<implicitReturnType>;
|
|
59
|
+
v3PrivateGetBrokerageBestBidAsk(params?: {}): Promise<implicitReturnType>;
|
|
60
|
+
v3PrivateGetBrokerageProductBook(params?: {}): Promise<implicitReturnType>;
|
|
61
|
+
v3PrivateGetBrokerageTransactionSummary(params?: {}): Promise<implicitReturnType>;
|
|
59
62
|
v3PrivateGetBrokeragePortfolios(params?: {}): Promise<implicitReturnType>;
|
|
60
63
|
v3PrivateGetBrokeragePortfoliosPortfolioUuid(params?: {}): Promise<implicitReturnType>;
|
|
61
|
-
v3PrivateGetBrokerageTransactionSummary(params?: {}): Promise<implicitReturnType>;
|
|
62
|
-
v3PrivateGetBrokerageProductBook(params?: {}): Promise<implicitReturnType>;
|
|
63
|
-
v3PrivateGetBrokerageBestBidAsk(params?: {}): Promise<implicitReturnType>;
|
|
64
64
|
v3PrivateGetBrokerageConvertTradeTradeId(params?: {}): Promise<implicitReturnType>;
|
|
65
65
|
v3PrivateGetBrokerageCfmBalanceSummary(params?: {}): Promise<implicitReturnType>;
|
|
66
66
|
v3PrivateGetBrokerageCfmPositions(params?: {}): Promise<implicitReturnType>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { implicitReturnType } from '../base/types.js';
|
|
2
|
+
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
3
|
+
interface Exchange {
|
|
4
|
+
publicPostInfo(params?: {}): Promise<implicitReturnType>;
|
|
5
|
+
privatePostExchange(params?: {}): Promise<implicitReturnType>;
|
|
6
|
+
}
|
|
7
|
+
declare abstract class Exchange extends _Exchange {
|
|
8
|
+
}
|
|
9
|
+
export default Exchange;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
7
|
+
// -------------------------------------------------------------------------------
|
|
8
|
+
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
9
|
+
class Exchange extends _Exchange {
|
|
10
|
+
}
|
|
11
|
+
export default Exchange;
|
|
@@ -17,6 +17,11 @@ interface Exchange {
|
|
|
17
17
|
privateGetOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
18
18
|
privateGetOrder(params?: {}): Promise<implicitReturnType>;
|
|
19
19
|
privateGetMyTrades(params?: {}): Promise<implicitReturnType>;
|
|
20
|
+
privateGetCoins(params?: {}): Promise<implicitReturnType>;
|
|
21
|
+
privateGetCryptoWithdraws(params?: {}): Promise<implicitReturnType>;
|
|
22
|
+
privateGetCryptoDepositsAddress(params?: {}): Promise<implicitReturnType>;
|
|
23
|
+
privateGetSubAccountFundTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
24
|
+
privateGetSubAccountAccounts(params?: {}): Promise<implicitReturnType>;
|
|
20
25
|
privatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
21
26
|
privatePostOrderTest(params?: {}): Promise<implicitReturnType>;
|
|
22
27
|
privatePostCreateAuthToken(params?: {}): Promise<implicitReturnType>;
|
package/js/src/ascendex.d.ts
CHANGED
|
@@ -107,8 +107,8 @@ export default class ascendex extends Exchange {
|
|
|
107
107
|
parseTransfer(transfer: any, currency?: Currency): {
|
|
108
108
|
info: any;
|
|
109
109
|
id: any;
|
|
110
|
-
timestamp:
|
|
111
|
-
datetime:
|
|
110
|
+
timestamp: any;
|
|
111
|
+
datetime: any;
|
|
112
112
|
currency: string;
|
|
113
113
|
amount: any;
|
|
114
114
|
fromAccount: any;
|