ccxt 4.2.53 → 4.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.js +225 -50
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +86 -5
- package/dist/cjs/src/bybit.js +19 -0
- package/dist/cjs/src/gate.js +6 -2
- package/dist/cjs/src/okx.js +17 -1
- package/dist/cjs/src/pro/binance.js +92 -38
- package/dist/cjs/src/whitebit.js +4 -3
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +9 -3
- package/js/src/abstract/binancecoinm.d.ts +9 -3
- package/js/src/abstract/binanceus.d.ts +9 -3
- package/js/src/abstract/binanceusdm.d.ts +9 -3
- package/js/src/abstract/gate.d.ts +13 -9
- package/js/src/abstract/gateio.d.ts +13 -9
- package/js/src/binance.d.ts +2 -0
- package/js/src/binance.js +86 -5
- package/js/src/bybit.d.ts +5 -0
- package/js/src/bybit.js +19 -0
- package/js/src/gate.js +6 -2
- package/js/src/okx.js +17 -1
- package/js/src/pro/binance.d.ts +4 -4
- package/js/src/pro/binance.js +92 -38
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/whitebit.js +4 -3
- package/jsdoc2md.js +3 -2
- package/package.json +1 -1
- package/skip-tests.json +28 -8
package/js/src/pro/binance.js
CHANGED
|
@@ -66,6 +66,7 @@ export default class binance extends binanceRest {
|
|
|
66
66
|
'future': 'wss://fstream.binance.com/ws',
|
|
67
67
|
'delivery': 'wss://dstream.binance.com/ws',
|
|
68
68
|
'ws': 'wss://ws-api.binance.com:443/ws-api/v3',
|
|
69
|
+
'papi': 'wss://fstream.binance.com/pm/ws',
|
|
69
70
|
},
|
|
70
71
|
},
|
|
71
72
|
},
|
|
@@ -1241,11 +1242,12 @@ export default class binance extends binanceRest {
|
|
|
1241
1242
|
}
|
|
1242
1243
|
async authenticate(params = {}) {
|
|
1243
1244
|
const time = this.milliseconds();
|
|
1244
|
-
let query = undefined;
|
|
1245
1245
|
let type = undefined;
|
|
1246
|
-
[type,
|
|
1246
|
+
[type, params] = this.handleMarketTypeAndParams('authenticate', undefined, params);
|
|
1247
1247
|
let subType = undefined;
|
|
1248
|
-
[subType,
|
|
1248
|
+
[subType, params] = this.handleSubTypeAndParams('authenticate', undefined, params);
|
|
1249
|
+
let isPortfolioMargin = undefined;
|
|
1250
|
+
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'authenticate', 'papi', 'portfolioMargin', false);
|
|
1249
1251
|
if (this.isLinear(type, subType)) {
|
|
1250
1252
|
type = 'future';
|
|
1251
1253
|
}
|
|
@@ -1253,36 +1255,39 @@ export default class binance extends binanceRest {
|
|
|
1253
1255
|
type = 'delivery';
|
|
1254
1256
|
}
|
|
1255
1257
|
let marginMode = undefined;
|
|
1256
|
-
[marginMode,
|
|
1258
|
+
[marginMode, params] = this.handleMarginModeAndParams('authenticate', params);
|
|
1257
1259
|
const isIsolatedMargin = (marginMode === 'isolated');
|
|
1258
1260
|
const isCrossMargin = (marginMode === 'cross') || (marginMode === undefined);
|
|
1259
|
-
const symbol = this.safeString(
|
|
1260
|
-
|
|
1261
|
+
const symbol = this.safeString(params, 'symbol');
|
|
1262
|
+
params = this.omit(params, 'symbol');
|
|
1261
1263
|
const options = this.safeValue(this.options, type, {});
|
|
1262
1264
|
const lastAuthenticatedTime = this.safeInteger(options, 'lastAuthenticatedTime', 0);
|
|
1263
1265
|
const listenKeyRefreshRate = this.safeInteger(this.options, 'listenKeyRefreshRate', 1200000);
|
|
1264
1266
|
const delay = this.sum(listenKeyRefreshRate, 10000);
|
|
1265
1267
|
if (time - lastAuthenticatedTime > delay) {
|
|
1266
1268
|
let response = undefined;
|
|
1267
|
-
if (
|
|
1268
|
-
response = await this.
|
|
1269
|
+
if (isPortfolioMargin) {
|
|
1270
|
+
response = await this.papiPostListenKey(params);
|
|
1271
|
+
}
|
|
1272
|
+
else if (type === 'future') {
|
|
1273
|
+
response = await this.fapiPrivatePostListenKey(params);
|
|
1269
1274
|
}
|
|
1270
1275
|
else if (type === 'delivery') {
|
|
1271
|
-
response = await this.dapiPrivatePostListenKey(
|
|
1276
|
+
response = await this.dapiPrivatePostListenKey(params);
|
|
1272
1277
|
}
|
|
1273
1278
|
else if (type === 'margin' && isCrossMargin) {
|
|
1274
|
-
response = await this.sapiPostUserDataStream(
|
|
1279
|
+
response = await this.sapiPostUserDataStream(params);
|
|
1275
1280
|
}
|
|
1276
1281
|
else if (isIsolatedMargin) {
|
|
1277
1282
|
if (symbol === undefined) {
|
|
1278
1283
|
throw new ArgumentsRequired(this.id + ' authenticate() requires a symbol argument for isolated margin mode');
|
|
1279
1284
|
}
|
|
1280
1285
|
const marketId = this.marketId(symbol);
|
|
1281
|
-
|
|
1282
|
-
response = await this.sapiPostUserDataStreamIsolated(
|
|
1286
|
+
params = this.extend(params, { 'symbol': marketId });
|
|
1287
|
+
response = await this.sapiPostUserDataStreamIsolated(params);
|
|
1283
1288
|
}
|
|
1284
1289
|
else {
|
|
1285
|
-
response = await this.publicPostUserDataStream(
|
|
1290
|
+
response = await this.publicPostUserDataStream(params);
|
|
1286
1291
|
}
|
|
1287
1292
|
this.options[type] = this.extend(options, {
|
|
1288
1293
|
'listenKey': this.safeString(response, 'listenKey'),
|
|
@@ -1295,6 +1300,8 @@ export default class binance extends binanceRest {
|
|
|
1295
1300
|
// https://binance-docs.github.io/apidocs/spot/en/#listen-key-spot
|
|
1296
1301
|
let type = this.safeString2(this.options, 'defaultType', 'authenticate', 'spot');
|
|
1297
1302
|
type = this.safeString(params, 'type', type);
|
|
1303
|
+
let isPortfolioMargin = undefined;
|
|
1304
|
+
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'keepAliveListenKey', 'papi', 'portfolioMargin', false);
|
|
1298
1305
|
const subTypeInfo = this.handleSubTypeAndParams('keepAliveListenKey', undefined, params);
|
|
1299
1306
|
const subType = subTypeInfo[0];
|
|
1300
1307
|
if (this.isLinear(type, subType)) {
|
|
@@ -1311,28 +1318,35 @@ export default class binance extends binanceRest {
|
|
|
1311
1318
|
}
|
|
1312
1319
|
const request = {};
|
|
1313
1320
|
const symbol = this.safeString(params, 'symbol');
|
|
1314
|
-
|
|
1321
|
+
params = this.omit(params, ['type', 'symbol']);
|
|
1315
1322
|
const time = this.milliseconds();
|
|
1316
1323
|
try {
|
|
1317
|
-
if (
|
|
1318
|
-
await this.
|
|
1324
|
+
if (isPortfolioMargin) {
|
|
1325
|
+
await this.papiPutListenKey(this.extend(request, params));
|
|
1326
|
+
}
|
|
1327
|
+
else if (type === 'future') {
|
|
1328
|
+
await this.fapiPrivatePutListenKey(this.extend(request, params));
|
|
1319
1329
|
}
|
|
1320
1330
|
else if (type === 'delivery') {
|
|
1321
|
-
await this.dapiPrivatePutListenKey(this.extend(request,
|
|
1331
|
+
await this.dapiPrivatePutListenKey(this.extend(request, params));
|
|
1322
1332
|
}
|
|
1323
1333
|
else {
|
|
1324
1334
|
request['listenKey'] = listenKey;
|
|
1325
1335
|
if (type === 'margin') {
|
|
1326
1336
|
request['symbol'] = symbol;
|
|
1327
|
-
await this.sapiPutUserDataStream(this.extend(request,
|
|
1337
|
+
await this.sapiPutUserDataStream(this.extend(request, params));
|
|
1328
1338
|
}
|
|
1329
1339
|
else {
|
|
1330
|
-
await this.publicPutUserDataStream(this.extend(request,
|
|
1340
|
+
await this.publicPutUserDataStream(this.extend(request, params));
|
|
1331
1341
|
}
|
|
1332
1342
|
}
|
|
1333
1343
|
}
|
|
1334
1344
|
catch (error) {
|
|
1335
|
-
|
|
1345
|
+
let urlType = type;
|
|
1346
|
+
if (isPortfolioMargin) {
|
|
1347
|
+
urlType = 'papi';
|
|
1348
|
+
}
|
|
1349
|
+
const url = this.urls['api']['ws'][urlType] + '/' + this.options[type]['listenKey'];
|
|
1336
1350
|
const client = this.client(url);
|
|
1337
1351
|
const messageHashes = Object.keys(client.futures);
|
|
1338
1352
|
for (let i = 0; i < messageHashes.length; i++) {
|
|
@@ -1364,7 +1378,7 @@ export default class binance extends binanceRest {
|
|
|
1364
1378
|
}
|
|
1365
1379
|
}
|
|
1366
1380
|
}
|
|
1367
|
-
setBalanceCache(client, type) {
|
|
1381
|
+
setBalanceCache(client, type, isPortfolioMargin = false) {
|
|
1368
1382
|
if (type in client.subscriptions) {
|
|
1369
1383
|
return;
|
|
1370
1384
|
}
|
|
@@ -1374,15 +1388,21 @@ export default class binance extends binanceRest {
|
|
|
1374
1388
|
const messageHash = type + ':fetchBalanceSnapshot';
|
|
1375
1389
|
if (!(messageHash in client.futures)) {
|
|
1376
1390
|
client.future(messageHash);
|
|
1377
|
-
this.spawn(this.loadBalanceSnapshot, client, messageHash, type);
|
|
1391
|
+
this.spawn(this.loadBalanceSnapshot, client, messageHash, type, isPortfolioMargin);
|
|
1378
1392
|
}
|
|
1379
1393
|
}
|
|
1380
1394
|
else {
|
|
1381
1395
|
this.balance[type] = {};
|
|
1382
1396
|
}
|
|
1383
1397
|
}
|
|
1384
|
-
async loadBalanceSnapshot(client, messageHash, type) {
|
|
1385
|
-
const
|
|
1398
|
+
async loadBalanceSnapshot(client, messageHash, type, isPortfolioMargin) {
|
|
1399
|
+
const params = {
|
|
1400
|
+
'type': type,
|
|
1401
|
+
};
|
|
1402
|
+
if (isPortfolioMargin) {
|
|
1403
|
+
params['portfolioMargin'] = true;
|
|
1404
|
+
}
|
|
1405
|
+
const response = await this.fetchBalance(params);
|
|
1386
1406
|
this.balance[type] = this.extend(response, this.safeValue(this.balance, type, {}));
|
|
1387
1407
|
// don't remove the future from the .futures cache
|
|
1388
1408
|
const future = client.futures[messageHash];
|
|
@@ -1476,6 +1496,7 @@ export default class binance extends binanceRest {
|
|
|
1476
1496
|
* @name binance#watchBalance
|
|
1477
1497
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1478
1498
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1499
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to watch the balance of a portfolio margin account
|
|
1479
1500
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1480
1501
|
*/
|
|
1481
1502
|
await this.loadMarkets();
|
|
@@ -1484,16 +1505,22 @@ export default class binance extends binanceRest {
|
|
|
1484
1505
|
let type = this.safeString(params, 'type', defaultType);
|
|
1485
1506
|
let subType = undefined;
|
|
1486
1507
|
[subType, params] = this.handleSubTypeAndParams('watchBalance', undefined, params);
|
|
1508
|
+
let isPortfolioMargin = undefined;
|
|
1509
|
+
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'watchBalance', 'papi', 'portfolioMargin', false);
|
|
1510
|
+
let urlType = type;
|
|
1511
|
+
if (isPortfolioMargin) {
|
|
1512
|
+
urlType = 'papi';
|
|
1513
|
+
}
|
|
1487
1514
|
if (this.isLinear(type, subType)) {
|
|
1488
1515
|
type = 'future';
|
|
1489
1516
|
}
|
|
1490
1517
|
else if (this.isInverse(type, subType)) {
|
|
1491
1518
|
type = 'delivery';
|
|
1492
1519
|
}
|
|
1493
|
-
const url = this.urls['api']['ws'][
|
|
1520
|
+
const url = this.urls['api']['ws'][urlType] + '/' + this.options[type]['listenKey'];
|
|
1494
1521
|
const client = this.client(url);
|
|
1495
|
-
this.setBalanceCache(client, type);
|
|
1496
|
-
this.setPositionsCache(client, type);
|
|
1522
|
+
this.setBalanceCache(client, type, isPortfolioMargin);
|
|
1523
|
+
this.setPositionsCache(client, type, undefined, isPortfolioMargin);
|
|
1497
1524
|
const options = this.safeValue(this.options, 'watchBalance');
|
|
1498
1525
|
const fetchBalanceSnapshot = this.safeBool(options, 'fetchBalanceSnapshot', false);
|
|
1499
1526
|
const awaitBalanceSnapshot = this.safeBool(options, 'awaitBalanceSnapshot', true);
|
|
@@ -2100,11 +2127,14 @@ export default class binance extends binanceRest {
|
|
|
2100
2127
|
* @name binance#watchOrders
|
|
2101
2128
|
* @description watches information on multiple orders made by the user
|
|
2102
2129
|
* @see https://binance-docs.github.io/apidocs/spot/en/#payload-order-update
|
|
2130
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#event-futures-order-update
|
|
2131
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#event-margin-order-update
|
|
2103
2132
|
* @param {string} symbol unified market symbol of the market the orders were made in
|
|
2104
2133
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2105
2134
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2106
2135
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2107
2136
|
* @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for spot margin
|
|
2137
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to watch portfolio margin account orders
|
|
2108
2138
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2109
2139
|
*/
|
|
2110
2140
|
await this.loadMarkets();
|
|
@@ -2133,10 +2163,15 @@ export default class binance extends binanceRest {
|
|
|
2133
2163
|
if ((type === 'margin') || ((type === 'spot') && (marginMode !== undefined))) {
|
|
2134
2164
|
urlType = 'spot'; // spot-margin shares the same stream as regular spot
|
|
2135
2165
|
}
|
|
2166
|
+
let isPortfolioMargin = undefined;
|
|
2167
|
+
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'watchOrders', 'papi', 'portfolioMargin', false);
|
|
2168
|
+
if (isPortfolioMargin) {
|
|
2169
|
+
urlType = 'papi';
|
|
2170
|
+
}
|
|
2136
2171
|
const url = this.urls['api']['ws'][urlType] + '/' + this.options[type]['listenKey'];
|
|
2137
2172
|
const client = this.client(url);
|
|
2138
|
-
this.setBalanceCache(client, type);
|
|
2139
|
-
this.setPositionsCache(client, type);
|
|
2173
|
+
this.setBalanceCache(client, type, isPortfolioMargin);
|
|
2174
|
+
this.setPositionsCache(client, type, undefined, isPortfolioMargin);
|
|
2140
2175
|
const message = undefined;
|
|
2141
2176
|
const orders = await this.watch(url, messageHash, message, type);
|
|
2142
2177
|
if (this.newUpdates) {
|
|
@@ -2391,6 +2426,7 @@ export default class binance extends binanceRest {
|
|
|
2391
2426
|
* @description watch all open positions
|
|
2392
2427
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2393
2428
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
2429
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to watch positions in a portfolio margin account
|
|
2394
2430
|
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
|
|
2395
2431
|
*/
|
|
2396
2432
|
await this.loadMarkets();
|
|
@@ -2421,10 +2457,16 @@ export default class binance extends binanceRest {
|
|
|
2421
2457
|
type = 'delivery';
|
|
2422
2458
|
}
|
|
2423
2459
|
messageHash = type + ':positions' + messageHash;
|
|
2424
|
-
|
|
2460
|
+
let isPortfolioMargin = undefined;
|
|
2461
|
+
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'watchPositions', 'papi', 'portfolioMargin', false);
|
|
2462
|
+
let urlType = type;
|
|
2463
|
+
if (isPortfolioMargin) {
|
|
2464
|
+
urlType = 'papi';
|
|
2465
|
+
}
|
|
2466
|
+
const url = this.urls['api']['ws'][urlType] + '/' + this.options[type]['listenKey'];
|
|
2425
2467
|
const client = this.client(url);
|
|
2426
|
-
this.setBalanceCache(client, type);
|
|
2427
|
-
this.setPositionsCache(client, type, symbols);
|
|
2468
|
+
this.setBalanceCache(client, type, isPortfolioMargin);
|
|
2469
|
+
this.setPositionsCache(client, type, symbols, isPortfolioMargin);
|
|
2428
2470
|
const fetchPositionsSnapshot = this.handleOption('watchPositions', 'fetchPositionsSnapshot', true);
|
|
2429
2471
|
const awaitPositionsSnapshot = this.safeValue('watchPositions', 'awaitPositionsSnapshot', true);
|
|
2430
2472
|
const cache = this.safeValue(this.positions, type);
|
|
@@ -2438,7 +2480,7 @@ export default class binance extends binanceRest {
|
|
|
2438
2480
|
}
|
|
2439
2481
|
return this.filterBySymbolsSinceLimit(cache, symbols, since, limit, true);
|
|
2440
2482
|
}
|
|
2441
|
-
setPositionsCache(client, type, symbols = undefined) {
|
|
2483
|
+
setPositionsCache(client, type, symbols = undefined, isPortfolioMargin = false) {
|
|
2442
2484
|
if (type === 'spot') {
|
|
2443
2485
|
return;
|
|
2444
2486
|
}
|
|
@@ -2453,15 +2495,21 @@ export default class binance extends binanceRest {
|
|
|
2453
2495
|
const messageHash = type + ':fetchPositionsSnapshot';
|
|
2454
2496
|
if (!(messageHash in client.futures)) {
|
|
2455
2497
|
client.future(messageHash);
|
|
2456
|
-
this.spawn(this.loadPositionsSnapshot, client, messageHash, type);
|
|
2498
|
+
this.spawn(this.loadPositionsSnapshot, client, messageHash, type, isPortfolioMargin);
|
|
2457
2499
|
}
|
|
2458
2500
|
}
|
|
2459
2501
|
else {
|
|
2460
2502
|
this.positions[type] = new ArrayCacheBySymbolBySide();
|
|
2461
2503
|
}
|
|
2462
2504
|
}
|
|
2463
|
-
async loadPositionsSnapshot(client, messageHash, type) {
|
|
2464
|
-
const
|
|
2505
|
+
async loadPositionsSnapshot(client, messageHash, type, isPortfolioMargin) {
|
|
2506
|
+
const params = {
|
|
2507
|
+
'type': type,
|
|
2508
|
+
};
|
|
2509
|
+
if (isPortfolioMargin) {
|
|
2510
|
+
params['portfolioMargin'] = true;
|
|
2511
|
+
}
|
|
2512
|
+
const positions = await this.fetchPositions(undefined, params);
|
|
2465
2513
|
this.positions[type] = new ArrayCacheBySymbolBySide();
|
|
2466
2514
|
const cache = this.positions[type];
|
|
2467
2515
|
for (let i = 0; i < positions.length; i++) {
|
|
@@ -2734,6 +2782,7 @@ export default class binance extends binanceRest {
|
|
|
2734
2782
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2735
2783
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2736
2784
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2785
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to watch trades in a portfolio margin account
|
|
2737
2786
|
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
2738
2787
|
*/
|
|
2739
2788
|
await this.loadMarkets();
|
|
@@ -2763,10 +2812,15 @@ export default class binance extends binanceRest {
|
|
|
2763
2812
|
if (type === 'margin') {
|
|
2764
2813
|
urlType = 'spot'; // spot-margin shares the same stream as regular spot
|
|
2765
2814
|
}
|
|
2815
|
+
let isPortfolioMargin = undefined;
|
|
2816
|
+
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'watchMyTrades', 'papi', 'portfolioMargin', false);
|
|
2817
|
+
if (isPortfolioMargin) {
|
|
2818
|
+
urlType = 'papi';
|
|
2819
|
+
}
|
|
2766
2820
|
const url = this.urls['api']['ws'][urlType] + '/' + this.options[type]['listenKey'];
|
|
2767
2821
|
const client = this.client(url);
|
|
2768
|
-
this.setBalanceCache(client, type);
|
|
2769
|
-
this.setPositionsCache(client, type);
|
|
2822
|
+
this.setBalanceCache(client, type, isPortfolioMargin);
|
|
2823
|
+
this.setPositionsCache(client, type, undefined, isPortfolioMargin);
|
|
2770
2824
|
const message = undefined;
|
|
2771
2825
|
const trades = await this.watch(url, messageHash, message, type);
|
|
2772
2826
|
if (this.newUpdates) {
|
|
@@ -15,7 +15,7 @@ export declare class BigInteger {
|
|
|
15
15
|
protected intValue(): number;
|
|
16
16
|
protected byteValue(): number;
|
|
17
17
|
protected shortValue(): number;
|
|
18
|
-
protected signum():
|
|
18
|
+
protected signum(): 0 | 1 | -1;
|
|
19
19
|
toByteArray(): number[];
|
|
20
20
|
protected equals(a: BigInteger): boolean;
|
|
21
21
|
protected min(a: BigInteger): BigInteger;
|
package/js/src/whitebit.js
CHANGED
|
@@ -230,6 +230,7 @@ export default class whitebit extends Exchange {
|
|
|
230
230
|
'account': 'spot',
|
|
231
231
|
},
|
|
232
232
|
'accountsByType': {
|
|
233
|
+
'funding': 'main',
|
|
233
234
|
'main': 'main',
|
|
234
235
|
'spot': 'spot',
|
|
235
236
|
'margin': 'collateral',
|
|
@@ -1323,9 +1324,9 @@ export default class whitebit extends Exchange {
|
|
|
1323
1324
|
else {
|
|
1324
1325
|
const options = this.safeValue(this.options, 'fetchBalance', {});
|
|
1325
1326
|
const defaultAccount = this.safeString(options, 'account');
|
|
1326
|
-
const account = this.
|
|
1327
|
-
params = this.omit(params, 'account');
|
|
1328
|
-
if (account === 'main') {
|
|
1327
|
+
const account = this.safeString2(params, 'account', 'type', defaultAccount);
|
|
1328
|
+
params = this.omit(params, ['account', 'type']);
|
|
1329
|
+
if (account === 'main' || account === 'funding') {
|
|
1329
1330
|
response = await this.v4PrivatePostMainAccountBalance(params);
|
|
1330
1331
|
}
|
|
1331
1332
|
else {
|
package/jsdoc2md.js
CHANGED
|
@@ -108,10 +108,11 @@ const sidebar =
|
|
|
108
108
|
- [Supported Exchanges](Exchange-Markets.md)
|
|
109
109
|
- [Exchanges By Country](Exchange-Markets-By-Country.md)
|
|
110
110
|
- [API Spec By Method](baseSpec.md)
|
|
111
|
-
-
|
|
112
|
-
${exchangeLinks.join('\n')}
|
|
111
|
+
- [FAQ](FAQ.md)
|
|
113
112
|
- [Changelog](CHANGELOG.md)
|
|
114
113
|
- [Awesome](Awesome.md)
|
|
114
|
+
- API Spec by Exchange
|
|
115
|
+
${exchangeLinks.join('\n')}
|
|
115
116
|
`
|
|
116
117
|
fs.writeFileSync('./wiki/_sidebar.md', sidebar);
|
|
117
118
|
|
package/package.json
CHANGED
package/skip-tests.json
CHANGED
|
@@ -219,6 +219,12 @@
|
|
|
219
219
|
"withdraw": "not provided",
|
|
220
220
|
"deposit": "not provided"
|
|
221
221
|
},
|
|
222
|
+
"fetchTickers": {
|
|
223
|
+
"open": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269177570#L3624"
|
|
224
|
+
},
|
|
225
|
+
"watchTickers": {
|
|
226
|
+
"open": "same"
|
|
227
|
+
},
|
|
222
228
|
"fetchOrderBook": {
|
|
223
229
|
"bid": "multiple bids might have same value"
|
|
224
230
|
},
|
|
@@ -297,18 +303,30 @@
|
|
|
297
303
|
"networks": "missing"
|
|
298
304
|
},
|
|
299
305
|
"fetchTickers": {
|
|
300
|
-
"
|
|
301
|
-
"
|
|
306
|
+
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269177564#L3615",
|
|
307
|
+
"quoteVolume": "quoteVolume >= baseVolume * low is failing"
|
|
302
308
|
},
|
|
303
309
|
"fetchTicker": {
|
|
304
|
-
"
|
|
305
|
-
"
|
|
310
|
+
"spread": "same",
|
|
311
|
+
"quoteVolume": "same"
|
|
312
|
+
},
|
|
313
|
+
"watchTickers": {
|
|
314
|
+
"spread": "same",
|
|
315
|
+
"quoteVolume": "same"
|
|
316
|
+
},
|
|
317
|
+
"fetchOrderBook": {
|
|
318
|
+
"spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269177564#L3946"
|
|
319
|
+
},
|
|
320
|
+
"fetchL2OrderBook": {
|
|
321
|
+
"spread": "same"
|
|
306
322
|
},
|
|
307
|
-
"fetchL2OrderBook": "bid==ask , https://app.travis-ci.com/github/ccxt/ccxt/builds/263304041#L2170",
|
|
308
|
-
"fetchLOrderBook": "same",
|
|
309
323
|
"watchOrderBook": {
|
|
310
324
|
"nonce":"missing https://app.travis-ci.com/github/ccxt/ccxt/builds/267900037#L4256",
|
|
311
|
-
"
|
|
325
|
+
"spread": "same"
|
|
326
|
+
},
|
|
327
|
+
"watchOrderBookForSymbols": {
|
|
328
|
+
"nonce":"same",
|
|
329
|
+
"spread": "same"
|
|
312
330
|
},
|
|
313
331
|
"watchTrades":{
|
|
314
332
|
"side": "not set https://app.travis-ci.com/github/ccxt/ccxt/builds/267900037#L4312"
|
|
@@ -379,7 +397,7 @@
|
|
|
379
397
|
},
|
|
380
398
|
"onetrading": {
|
|
381
399
|
"skip": true,
|
|
382
|
-
"until": "2024-
|
|
400
|
+
"until": "2024-03-28",
|
|
383
401
|
"skipWs": true,
|
|
384
402
|
"skipMethods": {
|
|
385
403
|
"fetchOrderBook": "some bid might be lower than next bid",
|
|
@@ -849,6 +867,7 @@
|
|
|
849
867
|
}
|
|
850
868
|
},
|
|
851
869
|
"delta": {
|
|
870
|
+
"httpsProxy": "http://5.75.153.75:8002",
|
|
852
871
|
"skipMethods": {
|
|
853
872
|
"loadMarkets": "expiryDatetime must be equal to expiry in iso8601 format",
|
|
854
873
|
"fetchOrderBook": "ask crossing bids test failing",
|
|
@@ -1223,6 +1242,7 @@
|
|
|
1223
1242
|
"currencyIdAndCode": "messed"
|
|
1224
1243
|
},
|
|
1225
1244
|
"fetchCurrencies": {
|
|
1245
|
+
"currencyIdAndCode": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269188556#L4337",
|
|
1226
1246
|
"withdraw":"not provided",
|
|
1227
1247
|
"deposit":"not provided"
|
|
1228
1248
|
},
|