ccxt 4.2.59 → 4.2.60
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/build.sh +1 -1
- package/dist/ccxt.browser.js +406 -165
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +10 -12
- package/dist/cjs/src/bingx.js +38 -0
- package/dist/cjs/src/bitfinex2.js +21 -4
- 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/hitbtc.js +1 -1
- package/dist/cjs/src/htx.js +4 -1
- package/dist/cjs/src/kraken.js +42 -39
- package/dist/cjs/src/kucoinfutures.js +1 -0
- package/dist/cjs/src/pro/binance.js +16 -3
- package/dist/cjs/src/wazirx.js +6 -1
- package/dist/cjs/src/woo.js +157 -77
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/blofin.d.ts +1 -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/bingx.d.ts +3 -1
- package/js/src/bingx.js +38 -0
- package/js/src/bitfinex2.js +21 -4
- 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/hitbtc.js +1 -1
- package/js/src/htx.js +4 -1
- package/js/src/kraken.js +42 -39
- package/js/src/kucoinfutures.js +1 -0
- package/js/src/pro/binance.js +16 -3
- package/js/src/pro/deribit.d.ts +1 -1
- package/js/src/wazirx.js +6 -1
- package/js/src/woo.d.ts +8 -0
- package/js/src/woo.js +157 -77
- package/package.json +1 -1
- package/skip-tests.json +42 -16
package/js/src/woo.js
CHANGED
|
@@ -87,10 +87,10 @@ export default class woo extends Exchange {
|
|
|
87
87
|
'fetchPositionMode': false,
|
|
88
88
|
'fetchPositions': true,
|
|
89
89
|
'fetchPremiumIndexOHLCV': false,
|
|
90
|
-
'fetchStatus':
|
|
90
|
+
'fetchStatus': true,
|
|
91
91
|
'fetchTicker': false,
|
|
92
92
|
'fetchTickers': false,
|
|
93
|
-
'fetchTime':
|
|
93
|
+
'fetchTime': true,
|
|
94
94
|
'fetchTrades': true,
|
|
95
95
|
'fetchTradingFee': false,
|
|
96
96
|
'fetchTradingFees': true,
|
|
@@ -327,6 +327,67 @@ export default class woo extends Exchange {
|
|
|
327
327
|
'precisionMode': TICK_SIZE,
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
+
async fetchStatus(params = {}) {
|
|
331
|
+
/**
|
|
332
|
+
* @method
|
|
333
|
+
* @name woo#fetchStatus
|
|
334
|
+
* @description the latest known information on the availability of the exchange API
|
|
335
|
+
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
336
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
337
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
338
|
+
*/
|
|
339
|
+
const response = await this.v1PublicGetSystemInfo(params);
|
|
340
|
+
//
|
|
341
|
+
// {
|
|
342
|
+
// "success": true,
|
|
343
|
+
// "data": {
|
|
344
|
+
// "status": "0",
|
|
345
|
+
// "msg": "System is functioning properly."
|
|
346
|
+
// },
|
|
347
|
+
// "timestamp": "1709274106602"
|
|
348
|
+
// }
|
|
349
|
+
//
|
|
350
|
+
const data = this.safeDict(response, 'data', {});
|
|
351
|
+
let status = this.safeString(data, 'status');
|
|
352
|
+
if (status === undefined) {
|
|
353
|
+
status = 'error';
|
|
354
|
+
}
|
|
355
|
+
else if (status === '0') {
|
|
356
|
+
status = 'ok';
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
status = 'maintenance';
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
'status': status,
|
|
363
|
+
'updated': undefined,
|
|
364
|
+
'eta': undefined,
|
|
365
|
+
'url': undefined,
|
|
366
|
+
'info': response,
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
async fetchTime(params = {}) {
|
|
370
|
+
/**
|
|
371
|
+
* @method
|
|
372
|
+
* @name woo#fetchTime
|
|
373
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
374
|
+
* @see https://docs.woo.org/#get-system-maintenance-status-public
|
|
375
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
376
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
377
|
+
*/
|
|
378
|
+
const response = await this.v1PublicGetSystemInfo(params);
|
|
379
|
+
//
|
|
380
|
+
// {
|
|
381
|
+
// "success": true,
|
|
382
|
+
// "data": {
|
|
383
|
+
// "status": "0",
|
|
384
|
+
// "msg": "System is functioning properly."
|
|
385
|
+
// },
|
|
386
|
+
// "timestamp": "1709274106602"
|
|
387
|
+
// }
|
|
388
|
+
//
|
|
389
|
+
return this.safeInteger(response, 'timestamp');
|
|
390
|
+
}
|
|
330
391
|
async fetchMarkets(params = {}) {
|
|
331
392
|
/**
|
|
332
393
|
* @method
|
|
@@ -357,7 +418,7 @@ export default class woo extends Exchange {
|
|
|
357
418
|
// "success": true
|
|
358
419
|
// }
|
|
359
420
|
//
|
|
360
|
-
const data = this.
|
|
421
|
+
const data = this.safeList(response, 'rows', []);
|
|
361
422
|
return this.parseMarkets(data);
|
|
362
423
|
}
|
|
363
424
|
parseMarket(market) {
|
|
@@ -609,7 +670,7 @@ export default class woo extends Exchange {
|
|
|
609
670
|
// "timestamp": 1673323685109
|
|
610
671
|
// }
|
|
611
672
|
//
|
|
612
|
-
const data = this.
|
|
673
|
+
const data = this.safeDict(response, 'data', {});
|
|
613
674
|
const maker = this.safeString(data, 'makerFeeRate');
|
|
614
675
|
const taker = this.safeString(data, 'takerFeeRate');
|
|
615
676
|
const result = {};
|
|
@@ -696,7 +757,7 @@ export default class woo extends Exchange {
|
|
|
696
757
|
// "success": true
|
|
697
758
|
// }
|
|
698
759
|
//
|
|
699
|
-
const tokenRows = this.
|
|
760
|
+
const tokenRows = this.safeList(tokenResponse, 'rows', []);
|
|
700
761
|
const networksByCurrencyId = this.groupBy(tokenRows, 'balance_token');
|
|
701
762
|
const currencyIds = Object.keys(networksByCurrencyId);
|
|
702
763
|
for (let i = 0; i < currencyIds.length; i++) {
|
|
@@ -856,7 +917,7 @@ export default class woo extends Exchange {
|
|
|
856
917
|
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
857
918
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
858
919
|
*/
|
|
859
|
-
const reduceOnly = this.
|
|
920
|
+
const reduceOnly = this.safeBool2(params, 'reduceOnly', 'reduce_only');
|
|
860
921
|
params = this.omit(params, ['reduceOnly', 'reduce_only']);
|
|
861
922
|
const orderType = type.toUpperCase();
|
|
862
923
|
await this.loadMarkets();
|
|
@@ -1027,9 +1088,9 @@ export default class woo extends Exchange {
|
|
|
1027
1088
|
// },
|
|
1028
1089
|
// "timestamp": "1686149372216"
|
|
1029
1090
|
// }
|
|
1030
|
-
const data = this.
|
|
1091
|
+
const data = this.safeDict(response, 'data');
|
|
1031
1092
|
if (data !== undefined) {
|
|
1032
|
-
const rows = this.
|
|
1093
|
+
const rows = this.safeList(data, 'rows', []);
|
|
1033
1094
|
return this.parseOrder(rows[0], market);
|
|
1034
1095
|
}
|
|
1035
1096
|
const order = this.parseOrder(response, market);
|
|
@@ -1130,7 +1191,7 @@ export default class woo extends Exchange {
|
|
|
1130
1191
|
// "timestamp": 0
|
|
1131
1192
|
// }
|
|
1132
1193
|
//
|
|
1133
|
-
const data = this.
|
|
1194
|
+
const data = this.safeDict(response, 'data', {});
|
|
1134
1195
|
return this.parseOrder(data, market);
|
|
1135
1196
|
}
|
|
1136
1197
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
@@ -1204,8 +1265,8 @@ export default class woo extends Exchange {
|
|
|
1204
1265
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1205
1266
|
*/
|
|
1206
1267
|
await this.loadMarkets();
|
|
1207
|
-
const stop = this.
|
|
1208
|
-
params = this.omit(params, 'stop');
|
|
1268
|
+
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
1269
|
+
params = this.omit(params, ['stop', 'trigger']);
|
|
1209
1270
|
if (stop) {
|
|
1210
1271
|
return await this.v3PrivateDeleteAlgoOrdersPending(params);
|
|
1211
1272
|
}
|
|
@@ -1239,8 +1300,8 @@ export default class woo extends Exchange {
|
|
|
1239
1300
|
*/
|
|
1240
1301
|
await this.loadMarkets();
|
|
1241
1302
|
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
1242
|
-
const stop = this.
|
|
1243
|
-
params = this.omit(params, 'stop');
|
|
1303
|
+
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
1304
|
+
params = this.omit(params, ['stop', 'trigger']);
|
|
1244
1305
|
const request = {};
|
|
1245
1306
|
const clientOrderId = this.safeString2(params, 'clOrdID', 'clientOrderId');
|
|
1246
1307
|
let response = undefined;
|
|
@@ -1314,9 +1375,9 @@ export default class woo extends Exchange {
|
|
|
1314
1375
|
await this.loadMarkets();
|
|
1315
1376
|
const request = {};
|
|
1316
1377
|
let market = undefined;
|
|
1317
|
-
const stop = this.
|
|
1378
|
+
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
1318
1379
|
const trailing = this.safeBool(params, 'trailing', false);
|
|
1319
|
-
params = this.omit(params, ['stop', 'trailing']);
|
|
1380
|
+
params = this.omit(params, ['stop', 'trailing', 'trigger']);
|
|
1320
1381
|
if (symbol !== undefined) {
|
|
1321
1382
|
market = this.market(symbol);
|
|
1322
1383
|
request['symbol'] = market['id'];
|
|
@@ -1374,7 +1435,7 @@ export default class woo extends Exchange {
|
|
|
1374
1435
|
// }
|
|
1375
1436
|
//
|
|
1376
1437
|
const data = this.safeValue(response, 'data', response);
|
|
1377
|
-
const orders = this.
|
|
1438
|
+
const orders = this.safeList(data, 'rows');
|
|
1378
1439
|
return this.parseOrders(orders, market, since, limit, params);
|
|
1379
1440
|
}
|
|
1380
1441
|
parseTimeInForce(timeInForce) {
|
|
@@ -1476,7 +1537,7 @@ export default class woo extends Exchange {
|
|
|
1476
1537
|
'type': orderType,
|
|
1477
1538
|
'timeInForce': this.parseTimeInForce(orderType),
|
|
1478
1539
|
'postOnly': undefined,
|
|
1479
|
-
'reduceOnly': this.
|
|
1540
|
+
'reduceOnly': this.safeBool(order, 'reduce_only'),
|
|
1480
1541
|
'side': side,
|
|
1481
1542
|
'price': price,
|
|
1482
1543
|
'stopPrice': stopPrice,
|
|
@@ -1634,7 +1695,7 @@ export default class woo extends Exchange {
|
|
|
1634
1695
|
// }
|
|
1635
1696
|
//
|
|
1636
1697
|
}
|
|
1637
|
-
const rows = this.
|
|
1698
|
+
const rows = this.safeList(response, 'rows', []);
|
|
1638
1699
|
return this.parseOHLCVs(rows, market, timeframe, since, limit);
|
|
1639
1700
|
}
|
|
1640
1701
|
parseOHLCV(ohlcv, market = undefined) {
|
|
@@ -1687,7 +1748,7 @@ export default class woo extends Exchange {
|
|
|
1687
1748
|
// }
|
|
1688
1749
|
// ]
|
|
1689
1750
|
// }
|
|
1690
|
-
const trades = this.
|
|
1751
|
+
const trades = this.safeList(response, 'rows', []);
|
|
1691
1752
|
return this.parseTrades(trades, market, since, limit, params);
|
|
1692
1753
|
}
|
|
1693
1754
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -1735,7 +1796,7 @@ export default class woo extends Exchange {
|
|
|
1735
1796
|
// ...
|
|
1736
1797
|
// ]
|
|
1737
1798
|
// }
|
|
1738
|
-
const trades = this.
|
|
1799
|
+
const trades = this.safeList(response, 'rows', []);
|
|
1739
1800
|
return this.parseTrades(trades, market, since, limit, params);
|
|
1740
1801
|
}
|
|
1741
1802
|
async fetchAccounts(params = {}) {
|
|
@@ -1763,7 +1824,7 @@ export default class woo extends Exchange {
|
|
|
1763
1824
|
// "success": true
|
|
1764
1825
|
// }
|
|
1765
1826
|
//
|
|
1766
|
-
const rows = this.
|
|
1827
|
+
const rows = this.safeList(response, 'rows', []);
|
|
1767
1828
|
return this.parseAccounts(rows, params);
|
|
1768
1829
|
}
|
|
1769
1830
|
parseAccount(account) {
|
|
@@ -1817,14 +1878,14 @@ export default class woo extends Exchange {
|
|
|
1817
1878
|
// "timestamp": 1673323746259
|
|
1818
1879
|
// }
|
|
1819
1880
|
//
|
|
1820
|
-
const data = this.
|
|
1881
|
+
const data = this.safeDict(response, 'data');
|
|
1821
1882
|
return this.parseBalance(data);
|
|
1822
1883
|
}
|
|
1823
1884
|
parseBalance(response) {
|
|
1824
1885
|
const result = {
|
|
1825
1886
|
'info': response,
|
|
1826
1887
|
};
|
|
1827
|
-
const balances = this.
|
|
1888
|
+
const balances = this.safeList(response, 'holding', []);
|
|
1828
1889
|
for (let i = 0; i < balances.length; i++) {
|
|
1829
1890
|
const balance = balances[i];
|
|
1830
1891
|
const code = this.safeCurrencyCode(this.safeString(balance, 'token'));
|
|
@@ -2101,6 +2162,7 @@ export default class woo extends Exchange {
|
|
|
2101
2162
|
/**
|
|
2102
2163
|
* @method
|
|
2103
2164
|
* @name woo#transfer
|
|
2165
|
+
* @see https://docs.woo.org/#get-transfer-history
|
|
2104
2166
|
* @description transfer currency internally between wallets on the same account
|
|
2105
2167
|
* @param {string} code unified currency code
|
|
2106
2168
|
* @param {float} amount amount to transfer
|
|
@@ -2113,7 +2175,7 @@ export default class woo extends Exchange {
|
|
|
2113
2175
|
const currency = this.currency(code);
|
|
2114
2176
|
const request = {
|
|
2115
2177
|
'token': currency['id'],
|
|
2116
|
-
'amount': this.
|
|
2178
|
+
'amount': this.parseToNumeric(amount),
|
|
2117
2179
|
'from_application_id': fromAccount,
|
|
2118
2180
|
'to_application_id': toAccount,
|
|
2119
2181
|
};
|
|
@@ -2125,7 +2187,7 @@ export default class woo extends Exchange {
|
|
|
2125
2187
|
// }
|
|
2126
2188
|
//
|
|
2127
2189
|
const transfer = this.parseTransfer(response, currency);
|
|
2128
|
-
const transferOptions = this.
|
|
2190
|
+
const transferOptions = this.safeDict(this.options, 'transfer', {});
|
|
2129
2191
|
const fillResponseFromRequest = this.safeBool(transferOptions, 'fillResponseFromRequest', true);
|
|
2130
2192
|
if (fillResponseFromRequest) {
|
|
2131
2193
|
transfer['amount'] = amount;
|
|
@@ -2139,41 +2201,71 @@ export default class woo extends Exchange {
|
|
|
2139
2201
|
* @method
|
|
2140
2202
|
* @name woo#fetchTransfers
|
|
2141
2203
|
* @description fetch a history of internal transfers made on an account
|
|
2204
|
+
* @see https://docs.woo.org/#get-transfer-history
|
|
2142
2205
|
* @param {string} code unified currency code of the currency transferred
|
|
2143
2206
|
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
2144
2207
|
* @param {int} [limit] the maximum number of transfers structures to retrieve
|
|
2145
2208
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2209
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2146
2210
|
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2147
2211
|
*/
|
|
2148
|
-
const request = {
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2212
|
+
const request = {};
|
|
2213
|
+
if (limit !== undefined) {
|
|
2214
|
+
request['size'] = limit;
|
|
2215
|
+
}
|
|
2216
|
+
if (since !== undefined) {
|
|
2217
|
+
request['start_t'] = since;
|
|
2218
|
+
}
|
|
2219
|
+
const until = this.safeInteger2(params, 'until', 'till'); // unified in milliseconds
|
|
2220
|
+
params = this.omit(params, ['until', 'till']);
|
|
2221
|
+
if (until !== undefined) {
|
|
2222
|
+
request['end_t'] = until;
|
|
2223
|
+
}
|
|
2224
|
+
const response = await this.v1PrivateGetAssetMainSubTransferHistory(this.extend(request, params));
|
|
2225
|
+
//
|
|
2226
|
+
// {
|
|
2227
|
+
// "rows": [
|
|
2228
|
+
// {
|
|
2229
|
+
// "id": 46704,
|
|
2230
|
+
// "token": "USDT",
|
|
2231
|
+
// "amount": 30000.00000000,
|
|
2232
|
+
// "status": "COMPLETED",
|
|
2233
|
+
// "from_application_id": "0f1bd3cd-dba2-4563-b8bb-0adb1bfb83a3",
|
|
2234
|
+
// "to_application_id": "c01e6940-a735-4022-9b6c-9d3971cdfdfa",
|
|
2235
|
+
// "from_user": "LeverageLow",
|
|
2236
|
+
// "to_user": "dev",
|
|
2237
|
+
// "created_time": "1709022325.427",
|
|
2238
|
+
// "updated_time": "1709022325.542"
|
|
2239
|
+
// }
|
|
2240
|
+
// ],
|
|
2241
|
+
// "meta": {
|
|
2242
|
+
// "total": 50,
|
|
2243
|
+
// "records_per_page": 25,
|
|
2244
|
+
// "current_page": 1
|
|
2245
|
+
// },
|
|
2246
|
+
// "success": true
|
|
2247
|
+
// }
|
|
2248
|
+
//
|
|
2249
|
+
const data = this.safeList(response, 'rows', []);
|
|
2250
|
+
return this.parseTransfers(data, undefined, since, limit, params);
|
|
2153
2251
|
}
|
|
2154
2252
|
parseTransfer(transfer, currency = undefined) {
|
|
2155
2253
|
//
|
|
2156
|
-
//
|
|
2157
|
-
//
|
|
2158
|
-
//
|
|
2159
|
-
//
|
|
2160
|
-
//
|
|
2161
|
-
//
|
|
2162
|
-
//
|
|
2163
|
-
//
|
|
2164
|
-
//
|
|
2165
|
-
//
|
|
2166
|
-
//
|
|
2167
|
-
//
|
|
2168
|
-
//
|
|
2169
|
-
// "amount": 1000,
|
|
2170
|
-
// "tx_id": "0x8a74c517bc104c8ebad0c3c3f64b1f302ed5f8bca598ae4459c63419038106b6",
|
|
2171
|
-
// "fee_token": null,
|
|
2172
|
-
// "fee_amount": null,
|
|
2173
|
-
// "status": "CONFIRMING"
|
|
2174
|
-
// }
|
|
2254
|
+
// fetchTransfers
|
|
2255
|
+
// {
|
|
2256
|
+
// "id": 46704,
|
|
2257
|
+
// "token": "USDT",
|
|
2258
|
+
// "amount": 30000.00000000,
|
|
2259
|
+
// "status": "COMPLETED",
|
|
2260
|
+
// "from_application_id": "0f1bd3cd-dba2-4563-b8bb-0adb1bfb83a3",
|
|
2261
|
+
// "to_application_id": "c01e6940-a735-4022-9b6c-9d3971cdfdfa",
|
|
2262
|
+
// "from_user": "LeverageLow",
|
|
2263
|
+
// "to_user": "dev",
|
|
2264
|
+
// "created_time": "1709022325.427",
|
|
2265
|
+
// "updated_time": "1709022325.542"
|
|
2266
|
+
// }
|
|
2175
2267
|
//
|
|
2176
|
-
//
|
|
2268
|
+
// transfer
|
|
2177
2269
|
// {
|
|
2178
2270
|
// "success": true,
|
|
2179
2271
|
// "id": 200
|
|
@@ -2182,22 +2274,8 @@ export default class woo extends Exchange {
|
|
|
2182
2274
|
const networkizedCode = this.safeString(transfer, 'token');
|
|
2183
2275
|
const currencyDefined = this.getCurrencyFromChaincode(networkizedCode, currency);
|
|
2184
2276
|
const code = currencyDefined['code'];
|
|
2185
|
-
let movementDirection = this.safeStringLower(transfer, 'token_side');
|
|
2186
|
-
if (movementDirection === 'withdraw') {
|
|
2187
|
-
movementDirection = 'withdrawal';
|
|
2188
|
-
}
|
|
2189
|
-
let fromAccount = undefined;
|
|
2190
|
-
let toAccount = undefined;
|
|
2191
|
-
if (movementDirection === 'withdraw') {
|
|
2192
|
-
fromAccount = undefined;
|
|
2193
|
-
toAccount = 'spot';
|
|
2194
|
-
}
|
|
2195
|
-
else if (movementDirection === 'deposit') {
|
|
2196
|
-
fromAccount = 'spot';
|
|
2197
|
-
toAccount = undefined;
|
|
2198
|
-
}
|
|
2199
2277
|
const timestamp = this.safeTimestamp(transfer, 'created_time');
|
|
2200
|
-
const success = this.
|
|
2278
|
+
const success = this.safeBool(transfer, 'success');
|
|
2201
2279
|
let status = undefined;
|
|
2202
2280
|
if (success !== undefined) {
|
|
2203
2281
|
status = success ? 'ok' : 'failed';
|
|
@@ -2208,8 +2286,8 @@ export default class woo extends Exchange {
|
|
|
2208
2286
|
'datetime': this.iso8601(timestamp),
|
|
2209
2287
|
'currency': code,
|
|
2210
2288
|
'amount': this.safeNumber(transfer, 'amount'),
|
|
2211
|
-
'fromAccount':
|
|
2212
|
-
'toAccount':
|
|
2289
|
+
'fromAccount': this.safeString(transfer, 'from_application_id'),
|
|
2290
|
+
'toAccount': this.safeString(transfer, 'to_application_id'),
|
|
2213
2291
|
'status': this.parseTransferStatus(this.safeString(transfer, 'status', status)),
|
|
2214
2292
|
'info': transfer,
|
|
2215
2293
|
};
|
|
@@ -2247,11 +2325,11 @@ export default class woo extends Exchange {
|
|
|
2247
2325
|
if (tag !== undefined) {
|
|
2248
2326
|
request['extra'] = tag;
|
|
2249
2327
|
}
|
|
2250
|
-
const networks = this.
|
|
2251
|
-
const currencyNetworks = this.
|
|
2328
|
+
const networks = this.safeDict(this.options, 'networks', {});
|
|
2329
|
+
const currencyNetworks = this.safeDict(currency, 'networks', {});
|
|
2252
2330
|
const network = this.safeStringUpper(params, 'network');
|
|
2253
2331
|
const networkId = this.safeString(networks, network, network);
|
|
2254
|
-
const coinNetwork = this.
|
|
2332
|
+
const coinNetwork = this.safeDict(currencyNetworks, networkId, {});
|
|
2255
2333
|
const coinNetworkId = this.safeString(coinNetwork, 'id');
|
|
2256
2334
|
if (coinNetworkId === undefined) {
|
|
2257
2335
|
throw new BadRequest(this.id + ' withdraw() require network parameter');
|
|
@@ -2379,7 +2457,9 @@ export default class woo extends Exchange {
|
|
|
2379
2457
|
body = auth;
|
|
2380
2458
|
}
|
|
2381
2459
|
else {
|
|
2382
|
-
|
|
2460
|
+
if (Object.keys(params).length) {
|
|
2461
|
+
url += '?' + auth;
|
|
2462
|
+
}
|
|
2383
2463
|
}
|
|
2384
2464
|
auth += '|' + ts;
|
|
2385
2465
|
headers['content-type'] = 'application/x-www-form-urlencoded';
|
|
@@ -2396,7 +2476,7 @@ export default class woo extends Exchange {
|
|
|
2396
2476
|
// 400 Bad Request {"success":false,"code":-1012,"message":"Amount is required for buy market orders when margin disabled."}
|
|
2397
2477
|
// {"code":"-1011","message":"The system is under maintenance.","success":false}
|
|
2398
2478
|
//
|
|
2399
|
-
const success = this.
|
|
2479
|
+
const success = this.safeBool(response, 'success');
|
|
2400
2480
|
const errorCode = this.safeString(response, 'code');
|
|
2401
2481
|
if (!success) {
|
|
2402
2482
|
const feedback = this.id + ' ' + this.json(response);
|
|
@@ -2472,7 +2552,7 @@ export default class woo extends Exchange {
|
|
|
2472
2552
|
// "success":true
|
|
2473
2553
|
// }
|
|
2474
2554
|
//
|
|
2475
|
-
const result = this.
|
|
2555
|
+
const result = this.safeList(response, 'rows', []);
|
|
2476
2556
|
return this.parseIncomes(result, market, since, limit);
|
|
2477
2557
|
}
|
|
2478
2558
|
parseFundingRate(fundingRate, market = undefined) {
|
|
@@ -2553,7 +2633,7 @@ export default class woo extends Exchange {
|
|
|
2553
2633
|
// "timestamp":1653633985646
|
|
2554
2634
|
// }
|
|
2555
2635
|
//
|
|
2556
|
-
const rows = this.
|
|
2636
|
+
const rows = this.safeList(response, 'rows', []);
|
|
2557
2637
|
const result = this.parseFundingRates(rows);
|
|
2558
2638
|
return this.filterByArray(result, 'symbol', symbols);
|
|
2559
2639
|
}
|
|
@@ -2607,7 +2687,7 @@ export default class woo extends Exchange {
|
|
|
2607
2687
|
// "timestamp":1653640814885
|
|
2608
2688
|
// }
|
|
2609
2689
|
//
|
|
2610
|
-
const result = this.
|
|
2690
|
+
const result = this.safeList(response, 'rows');
|
|
2611
2691
|
const rates = [];
|
|
2612
2692
|
for (let i = 0; i < result.length; i++) {
|
|
2613
2693
|
const entry = result[i];
|
|
@@ -2769,8 +2849,8 @@ export default class woo extends Exchange {
|
|
|
2769
2849
|
// "timestamp": 1673323880342
|
|
2770
2850
|
// }
|
|
2771
2851
|
//
|
|
2772
|
-
const result = this.
|
|
2773
|
-
const positions = this.
|
|
2852
|
+
const result = this.safeDict(response, 'data', {});
|
|
2853
|
+
const positions = this.safeList(result, 'positions', []);
|
|
2774
2854
|
return this.parsePositions(positions, symbols);
|
|
2775
2855
|
}
|
|
2776
2856
|
parsePosition(position, market = undefined) {
|
package/package.json
CHANGED
package/skip-tests.json
CHANGED
|
@@ -219,17 +219,21 @@
|
|
|
219
219
|
"withdraw": "not provided",
|
|
220
220
|
"deposit": "not provided"
|
|
221
221
|
},
|
|
222
|
+
"fetchTicker": {
|
|
223
|
+
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269273148#L3651"
|
|
224
|
+
},
|
|
222
225
|
"fetchTickers": {
|
|
226
|
+
"spread": "same as above",
|
|
223
227
|
"open": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269177570#L3624",
|
|
224
|
-
"bid": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269219719#L3210",
|
|
225
|
-
"ask": "same",
|
|
226
228
|
"bidVolume": "same",
|
|
227
229
|
"askVolume": "same"
|
|
228
230
|
},
|
|
231
|
+
"watchTicker": {
|
|
232
|
+
"spread": "same as above"
|
|
233
|
+
},
|
|
229
234
|
"watchTickers": {
|
|
235
|
+
"spread": "same as above",
|
|
230
236
|
"open": "same",
|
|
231
|
-
"bid": "same",
|
|
232
|
-
"ask": "same",
|
|
233
237
|
"bidVolume": "same",
|
|
234
238
|
"askVolume": "same"
|
|
235
239
|
},
|
|
@@ -239,9 +243,7 @@
|
|
|
239
243
|
"fetchL2OrderBook": {
|
|
240
244
|
"bid": "same"
|
|
241
245
|
},
|
|
242
|
-
"watchOrderBook":
|
|
243
|
-
"bid": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269129438#L3999"
|
|
244
|
-
},
|
|
246
|
+
"watchOrderBook": "complete skip because of frequent checksum mismatches: https://app.travis-ci.com/github/ccxt/ccxt/builds/269273148#L3553 and also for this https://app.travis-ci.com/github/ccxt/ccxt/builds/269129438#L3999",
|
|
245
247
|
"watchOrderBookForSymbols": {
|
|
246
248
|
"bid": "same"
|
|
247
249
|
}
|
|
@@ -283,8 +285,6 @@
|
|
|
283
285
|
}
|
|
284
286
|
},
|
|
285
287
|
"bithumb": {
|
|
286
|
-
"skip": "fetchMarkets returning undefined",
|
|
287
|
-
"until": "2023-09-05",
|
|
288
288
|
"skipMethods": {
|
|
289
289
|
"fetchTickers": {
|
|
290
290
|
"quoteVolume": "quoteVolume >= baseVolume * low is failing",
|
|
@@ -293,6 +293,18 @@
|
|
|
293
293
|
"fetchTicker": {
|
|
294
294
|
"quoteVolume": "quoteVolume >= baseVolume * low is failing",
|
|
295
295
|
"baseVolume": "quoteVolume >= baseVolume * low is failing"
|
|
296
|
+
},
|
|
297
|
+
"fetchOrderBook": {
|
|
298
|
+
"ask": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269273148#L4074"
|
|
299
|
+
},
|
|
300
|
+
"fetchL2OrderBook": {
|
|
301
|
+
"ask": "same as above"
|
|
302
|
+
},
|
|
303
|
+
"watchOrderBook": {
|
|
304
|
+
"ask": "same as above"
|
|
305
|
+
},
|
|
306
|
+
"watchOrderBookForSymbols": {
|
|
307
|
+
"ask": "same as above"
|
|
296
308
|
}
|
|
297
309
|
}
|
|
298
310
|
},
|
|
@@ -795,8 +807,8 @@
|
|
|
795
807
|
}
|
|
796
808
|
},
|
|
797
809
|
"delta": {
|
|
798
|
-
"skip": "frequent timeouts https://app.travis-ci.com/github/ccxt/ccxt/builds/
|
|
799
|
-
"until": "2024-03-
|
|
810
|
+
"skip": "frequent timeouts https://app.travis-ci.com/github/ccxt/ccxt/builds/269273148#L4301",
|
|
811
|
+
"until": "2024-03-15",
|
|
800
812
|
"skipMethods": {
|
|
801
813
|
"loadMarkets": "expiryDatetime must be equal to expiry in iso8601 format",
|
|
802
814
|
"fetchOrderBook": "ask crossing bids test failing",
|
|
@@ -1217,21 +1229,35 @@
|
|
|
1217
1229
|
"fetchTickers": {
|
|
1218
1230
|
"quoteVolume": "quoteVolume >= baseVolume * low is failing",
|
|
1219
1231
|
"baseVolume": "quoteVolume >= baseVolume * low is failing",
|
|
1220
|
-
"
|
|
1221
|
-
"ask":"messed bid-ask"
|
|
1232
|
+
"spread":"https://app.travis-ci.com/github/ccxt/ccxt/builds/269273148#L3916"
|
|
1222
1233
|
},
|
|
1223
1234
|
"fetchTicker": {
|
|
1224
1235
|
"quoteVolume": "quoteVolume >= baseVolume * low is failing",
|
|
1225
1236
|
"baseVolume": "quoteVolume >= baseVolume * low is failing",
|
|
1226
|
-
"
|
|
1227
|
-
"ask":"messed bid-ask"
|
|
1237
|
+
"spread": "same as above"
|
|
1228
1238
|
},
|
|
1229
1239
|
"fetchAccounts": {
|
|
1230
1240
|
"type": "type is not provided"
|
|
1231
1241
|
},
|
|
1232
1242
|
"fetchLeverageTiers": "swap only supported",
|
|
1233
1243
|
"watchTicker": {
|
|
1234
|
-
"quoteVolume": "https://app.travis-ci.com/github/ccxt/ccxt/builds/267900037#L6610"
|
|
1244
|
+
"quoteVolume": "https://app.travis-ci.com/github/ccxt/ccxt/builds/267900037#L6610",
|
|
1245
|
+
"spread": "same as above"
|
|
1246
|
+
},
|
|
1247
|
+
"watchTickers": {
|
|
1248
|
+
"spread": "same as above"
|
|
1249
|
+
},
|
|
1250
|
+
"fetchOrderBook": {
|
|
1251
|
+
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269273148#L3916"
|
|
1252
|
+
},
|
|
1253
|
+
"fetchL2OrderBook": {
|
|
1254
|
+
"spread": "same as above"
|
|
1255
|
+
},
|
|
1256
|
+
"watchOrderBook": {
|
|
1257
|
+
"spread": "same as above"
|
|
1258
|
+
},
|
|
1259
|
+
"watchOrderBookForSymbols": {
|
|
1260
|
+
"spread": "same as above"
|
|
1235
1261
|
}
|
|
1236
1262
|
}
|
|
1237
1263
|
},
|