ccxt 4.2.63 → 4.2.65
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 +2 -2
- package/dist/ccxt.browser.js +565 -178
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +12 -0
- package/dist/cjs/src/binance.js +33 -12
- package/dist/cjs/src/bingx.js +58 -49
- package/dist/cjs/src/bitget.js +69 -1
- package/dist/cjs/src/bitmex.js +3 -1
- package/dist/cjs/src/blofin.js +46 -11
- package/dist/cjs/src/btcmarkets.js +12 -0
- package/dist/cjs/src/bybit.js +100 -7
- package/dist/cjs/src/coinbase.js +12 -2
- package/dist/cjs/src/delta.js +95 -1
- package/dist/cjs/src/gemini.js +9 -4
- package/dist/cjs/src/hitbtc.js +1 -1
- package/dist/cjs/src/krakenfutures.js +1 -0
- package/dist/cjs/src/kucoin.js +87 -62
- package/dist/cjs/src/pro/bitget.js +5 -5
- package/dist/cjs/src/pro/coinex.js +4 -4
- package/dist/cjs/src/pro/currencycom.js +1 -1
- package/dist/cjs/src/pro/lbank.js +1 -1
- package/dist/cjs/src/yobit.js +15 -15
- 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/krakenfutures.d.ts +1 -0
- package/js/src/abstract/kucoin.d.ts +10 -0
- package/js/src/abstract/kucoinfutures.d.ts +10 -0
- package/js/src/base/Exchange.js +12 -0
- package/js/src/binance.d.ts +1 -1
- package/js/src/binance.js +33 -12
- package/js/src/bingx.js +58 -49
- package/js/src/bitget.d.ts +3 -1
- package/js/src/bitget.js +69 -1
- package/js/src/bitmex.js +3 -1
- package/js/src/blofin.d.ts +3 -1
- package/js/src/blofin.js +46 -11
- package/js/src/btcmarkets.js +12 -0
- package/js/src/bybit.d.ts +1 -0
- package/js/src/bybit.js +100 -7
- package/js/src/coinbase.js +12 -2
- package/js/src/delta.d.ts +3 -1
- package/js/src/delta.js +95 -1
- package/js/src/gate.d.ts +1 -1
- package/js/src/gemini.js +9 -4
- package/js/src/hitbtc.js +1 -1
- package/js/src/krakenfutures.js +1 -0
- package/js/src/kucoin.js +87 -62
- package/js/src/okx.d.ts +1 -1
- package/js/src/pro/bitget.js +5 -5
- package/js/src/pro/coinex.js +4 -4
- package/js/src/pro/currencycom.d.ts +1 -1
- package/js/src/pro/currencycom.js +1 -1
- package/js/src/pro/lbank.js +1 -1
- package/js/src/woo.d.ts +1 -1
- package/js/src/yobit.js +15 -15
- package/package.json +2 -2
- package/skip-tests.json +47 -22
package/js/src/yobit.js
CHANGED
|
@@ -284,15 +284,15 @@ export default class yobit extends Exchange {
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
parseBalance(response) {
|
|
287
|
-
const balances = this.
|
|
287
|
+
const balances = this.safeDict(response, 'return', {});
|
|
288
288
|
const timestamp = this.safeInteger(balances, 'server_time');
|
|
289
289
|
const result = {
|
|
290
290
|
'info': response,
|
|
291
291
|
'timestamp': timestamp,
|
|
292
292
|
'datetime': this.iso8601(timestamp),
|
|
293
293
|
};
|
|
294
|
-
const free = this.
|
|
295
|
-
const total = this.
|
|
294
|
+
const free = this.safeDict(balances, 'funds', {});
|
|
295
|
+
const total = this.safeDict(balances, 'funds_incl_orders', {});
|
|
296
296
|
const currencyIds = Object.keys(this.extend(free, total));
|
|
297
297
|
for (let i = 0; i < currencyIds.length; i++) {
|
|
298
298
|
const currencyId = currencyIds[i];
|
|
@@ -370,7 +370,7 @@ export default class yobit extends Exchange {
|
|
|
370
370
|
// },
|
|
371
371
|
// }
|
|
372
372
|
//
|
|
373
|
-
const markets = this.
|
|
373
|
+
const markets = this.safeDict(response, 'pairs', {});
|
|
374
374
|
const keys = Object.keys(markets);
|
|
375
375
|
const result = [];
|
|
376
376
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -658,7 +658,7 @@ export default class yobit extends Exchange {
|
|
|
658
658
|
'currency': feeCurrencyCode,
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
|
-
const isYourOrder = this.
|
|
661
|
+
const isYourOrder = this.safeString(trade, 'is_your_order');
|
|
662
662
|
if (isYourOrder !== undefined) {
|
|
663
663
|
if (fee === undefined) {
|
|
664
664
|
const feeInNumbers = this.calculateFee(symbol, type, side, amount, price, 'taker');
|
|
@@ -725,7 +725,7 @@ export default class yobit extends Exchange {
|
|
|
725
725
|
return [];
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
|
-
const result = this.
|
|
728
|
+
const result = this.safeList(response, market['id'], []);
|
|
729
729
|
return this.parseTrades(result, market, since, limit);
|
|
730
730
|
}
|
|
731
731
|
async fetchTradingFees(params = {}) {
|
|
@@ -758,12 +758,12 @@ export default class yobit extends Exchange {
|
|
|
758
758
|
// },
|
|
759
759
|
// }
|
|
760
760
|
//
|
|
761
|
-
const pairs = this.
|
|
761
|
+
const pairs = this.safeDict(response, 'pairs', {});
|
|
762
762
|
const marketIds = Object.keys(pairs);
|
|
763
763
|
const result = {};
|
|
764
764
|
for (let i = 0; i < marketIds.length; i++) {
|
|
765
765
|
const marketId = marketIds[i];
|
|
766
|
-
const pair = this.
|
|
766
|
+
const pair = this.safeDict(pairs, marketId, {});
|
|
767
767
|
const symbol = this.safeSymbol(marketId, undefined, '_');
|
|
768
768
|
const takerString = this.safeString(pair, 'fee_buyer');
|
|
769
769
|
const makerString = this.safeString(pair, 'fee_seller');
|
|
@@ -827,7 +827,7 @@ export default class yobit extends Exchange {
|
|
|
827
827
|
// }
|
|
828
828
|
// }
|
|
829
829
|
//
|
|
830
|
-
const result = this.
|
|
830
|
+
const result = this.safeDict(response, 'return');
|
|
831
831
|
return this.parseOrder(result, market);
|
|
832
832
|
}
|
|
833
833
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
@@ -865,7 +865,7 @@ export default class yobit extends Exchange {
|
|
|
865
865
|
// }
|
|
866
866
|
// }
|
|
867
867
|
//
|
|
868
|
-
const result = this.
|
|
868
|
+
const result = this.safeDict(response, 'return', {});
|
|
869
869
|
return this.parseOrder(result);
|
|
870
870
|
}
|
|
871
871
|
parseOrderStatus(status) {
|
|
@@ -996,7 +996,7 @@ export default class yobit extends Exchange {
|
|
|
996
996
|
};
|
|
997
997
|
const response = await this.privatePostOrderInfo(this.extend(request, params));
|
|
998
998
|
id = id.toString();
|
|
999
|
-
const orders = this.
|
|
999
|
+
const orders = this.safeDict(response, 'return', {});
|
|
1000
1000
|
//
|
|
1001
1001
|
// {
|
|
1002
1002
|
// "success":1,
|
|
@@ -1061,7 +1061,7 @@ export default class yobit extends Exchange {
|
|
|
1061
1061
|
// }
|
|
1062
1062
|
// }
|
|
1063
1063
|
//
|
|
1064
|
-
const result = this.
|
|
1064
|
+
const result = this.safeDict(response, 'return', {});
|
|
1065
1065
|
return this.parseOrders(result, market, since, limit);
|
|
1066
1066
|
}
|
|
1067
1067
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
@@ -1115,7 +1115,7 @@ export default class yobit extends Exchange {
|
|
|
1115
1115
|
// }
|
|
1116
1116
|
// }
|
|
1117
1117
|
//
|
|
1118
|
-
const trades = this.
|
|
1118
|
+
const trades = this.safeDict(response, 'return', {});
|
|
1119
1119
|
const ids = Object.keys(trades);
|
|
1120
1120
|
const result = [];
|
|
1121
1121
|
for (let i = 0; i < ids.length; i++) {
|
|
@@ -1163,7 +1163,7 @@ export default class yobit extends Exchange {
|
|
|
1163
1163
|
await this.loadMarkets();
|
|
1164
1164
|
const currency = this.currency(code);
|
|
1165
1165
|
let currencyId = currency['id'];
|
|
1166
|
-
const networks = this.
|
|
1166
|
+
const networks = this.safeDict(this.options, 'networks', {});
|
|
1167
1167
|
let network = this.safeStringUpper(params, 'network'); // this line allows the user to specify either ERC20 or ETH
|
|
1168
1168
|
network = this.safeString(networks, network, network); // handle ERC20>ETH alias
|
|
1169
1169
|
if (network !== undefined) {
|
|
@@ -1330,7 +1330,7 @@ export default class yobit extends Exchange {
|
|
|
1330
1330
|
//
|
|
1331
1331
|
// To cover points 1, 2, 3 and 4 combined this handler should work like this:
|
|
1332
1332
|
//
|
|
1333
|
-
let success = this.
|
|
1333
|
+
let success = this.safeValue(response, 'success'); // don't replace with safeBool here
|
|
1334
1334
|
if (typeof success === 'string') {
|
|
1335
1335
|
if ((success === 'true') || (success === '1')) {
|
|
1336
1336
|
success = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccxt",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.65",
|
|
4
4
|
"description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
|
|
5
5
|
"unpkg": "dist/ccxt.browser.js",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"build-docs": "node jsdoc2md.js && node examples2md.js",
|
|
37
37
|
"serve-docs": "docsify serve ./wiki",
|
|
38
38
|
"tsBuildFile": "tsc --skipLibCheck --strictNullChecks false --strict --noImplicitAny false --esModuleInterop --isolatedModules false --forceConsistentCasingInFileNames --removeComments false --target ES2020 --declaration --allowJs --checkJs false --moduleResolution Node --module ES2022 --outDir ./js/src --lib ES2020.BigInt --lib dom ",
|
|
39
|
-
"tsBuild": "tsc ||
|
|
39
|
+
"tsBuild": "tsc || echo \"\"",
|
|
40
40
|
"tsBuildExamples": "tsc -p ./examples/tsconfig.json",
|
|
41
41
|
"emitAPI": "node build/generateImplicitAPI.js",
|
|
42
42
|
"build": "npm run pre-transpile && npm run transpile && npm run post-transpile && npm run update-badges && npm run build-docs",
|
package/skip-tests.json
CHANGED
|
@@ -82,6 +82,18 @@
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
+
"binanceusdm ": {
|
|
86
|
+
"httpsProxy": "http://5.75.153.75:8002",
|
|
87
|
+
"wsProxy": "http://5.75.153.75:8002",
|
|
88
|
+
"skipMethods": {
|
|
89
|
+
"watchOrderBook": {
|
|
90
|
+
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269352042#L3463"
|
|
91
|
+
},
|
|
92
|
+
"watchOrderBookForSymbols": {
|
|
93
|
+
"spread": "same"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
85
97
|
"binanceus": {
|
|
86
98
|
"skipMethods": {
|
|
87
99
|
"loadMarkets": {
|
|
@@ -220,22 +232,20 @@
|
|
|
220
232
|
"deposit": "not provided"
|
|
221
233
|
},
|
|
222
234
|
"fetchTicker": {
|
|
223
|
-
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269273148#L3651"
|
|
235
|
+
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269273148#L3651",
|
|
236
|
+
"ask": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269327874#L3234",
|
|
237
|
+
"open": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269177570#L3624",
|
|
238
|
+
"bidVolume": "sometimes negative",
|
|
239
|
+
"askVolume": "sometimes negative"
|
|
224
240
|
},
|
|
225
241
|
"fetchTickers": {
|
|
226
|
-
"spread": "same
|
|
227
|
-
"open": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269177570#L3624",
|
|
228
|
-
"bidVolume": "same",
|
|
229
|
-
"askVolume": "same"
|
|
242
|
+
"spread": "same", "ask": "same", "open": "same", "bidVolume": "same", "askVolume": "same"
|
|
230
243
|
},
|
|
231
244
|
"watchTicker": {
|
|
232
|
-
"spread": "same
|
|
245
|
+
"spread": "same", "ask": "same", "open": "same", "bidVolume": "same", "askVolume": "same"
|
|
233
246
|
},
|
|
234
247
|
"watchTickers": {
|
|
235
|
-
"spread": "same
|
|
236
|
-
"open": "same",
|
|
237
|
-
"bidVolume": "same",
|
|
238
|
-
"askVolume": "same"
|
|
248
|
+
"spread": "same", "ask": "same", "open": "same", "bidVolume": "same", "askVolume": "same"
|
|
239
249
|
},
|
|
240
250
|
"fetchOrderBook": {
|
|
241
251
|
"bid": "multiple bids might have same value"
|
|
@@ -322,15 +332,17 @@
|
|
|
322
332
|
},
|
|
323
333
|
"fetchTickers": {
|
|
324
334
|
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269177564#L3615",
|
|
325
|
-
"quoteVolume": "quoteVolume >= baseVolume * low is failing"
|
|
335
|
+
"quoteVolume": "quoteVolume >= baseVolume * low is failing",
|
|
336
|
+
"ask": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269331129#L3609"
|
|
326
337
|
},
|
|
327
338
|
"fetchTicker": {
|
|
328
|
-
"spread": "same",
|
|
329
|
-
"quoteVolume": "same"
|
|
339
|
+
"spread": "same", "quoteVolume": "same", "ask": "same"
|
|
330
340
|
},
|
|
331
341
|
"watchTickers": {
|
|
332
|
-
"spread": "same",
|
|
333
|
-
|
|
342
|
+
"spread": "same", "quoteVolume": "same", "ask": "same"
|
|
343
|
+
},
|
|
344
|
+
"watchTicker": {
|
|
345
|
+
"spread": "same", "quoteVolume": "same", "ask": "same"
|
|
334
346
|
},
|
|
335
347
|
"fetchOrderBook": {
|
|
336
348
|
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269177564#L3946"
|
|
@@ -603,7 +615,13 @@
|
|
|
603
615
|
"fetchOpenInterestHistory": {
|
|
604
616
|
"openInterestAmount": "openInterestAmount is not provided"
|
|
605
617
|
},
|
|
606
|
-
"fetchBorrowRate": "does not work with unified account"
|
|
618
|
+
"fetchBorrowRate": "does not work with unified account",
|
|
619
|
+
"watchOrderBook": {
|
|
620
|
+
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269352042#L3669"
|
|
621
|
+
},
|
|
622
|
+
"watchOrderBookForSymbols": {
|
|
623
|
+
"spread": "same"
|
|
624
|
+
}
|
|
607
625
|
}
|
|
608
626
|
},
|
|
609
627
|
"bigone": {
|
|
@@ -1152,7 +1170,6 @@
|
|
|
1152
1170
|
}
|
|
1153
1171
|
},
|
|
1154
1172
|
"lbank": {
|
|
1155
|
-
"skipWs": true,
|
|
1156
1173
|
"skipMethods": {
|
|
1157
1174
|
"loadMarkets": "settle must be defined when contract is true",
|
|
1158
1175
|
"fetchTickers": {
|
|
@@ -1162,7 +1179,11 @@
|
|
|
1162
1179
|
"fetchTicker": {
|
|
1163
1180
|
"quoteVolume": "quoteVolume >= baseVolume * low is failing",
|
|
1164
1181
|
"baseVolume": "quoteVolume >= baseVolume * low is failing"
|
|
1165
|
-
}
|
|
1182
|
+
},
|
|
1183
|
+
"watchTrades": {
|
|
1184
|
+
"timestamp": "ts several hours ahead in in future :)"
|
|
1185
|
+
},
|
|
1186
|
+
"watchOHLCV": "some timestamp issues"
|
|
1166
1187
|
}
|
|
1167
1188
|
},
|
|
1168
1189
|
"lykke": {
|
|
@@ -1353,12 +1374,16 @@
|
|
|
1353
1374
|
"deposit":"not provided"
|
|
1354
1375
|
},
|
|
1355
1376
|
"fetchTickers": {
|
|
1356
|
-
"quoteVolume": "
|
|
1357
|
-
"baseVolume": "quoteVolume >= baseVolume * low is failing"
|
|
1377
|
+
"quoteVolume": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269352042#L3690"
|
|
1358
1378
|
},
|
|
1359
1379
|
"fetchTicker": {
|
|
1360
|
-
"quoteVolume": "
|
|
1361
|
-
|
|
1380
|
+
"quoteVolume": "same"
|
|
1381
|
+
},
|
|
1382
|
+
"watchTickers": {
|
|
1383
|
+
"quoteVolume": "same"
|
|
1384
|
+
},
|
|
1385
|
+
"watchTicker": {
|
|
1386
|
+
"quoteVolume": "same"
|
|
1362
1387
|
},
|
|
1363
1388
|
"watchOrderBook": {
|
|
1364
1389
|
"nonce": "missing https://app.travis-ci.com/github/ccxt/ccxt/builds/267900037#L4807"
|