ccxt 4.3.44 → 4.3.46
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 +130 -130
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +6 -1
- package/dist/cjs/src/abstract/oxfun.js +9 -0
- package/dist/cjs/src/base/Exchange.js +1 -0
- package/dist/cjs/src/binance.js +2 -0
- package/dist/cjs/src/bingx.js +25 -17
- package/dist/cjs/src/bitmart.js +5 -0
- package/dist/cjs/src/bitstamp.js +18 -2
- package/dist/cjs/src/bitteam.js +5 -7
- package/dist/cjs/src/coinmetro.js +8 -17
- package/dist/cjs/src/hyperliquid.js +29 -21
- package/dist/cjs/src/idex.js +1 -0
- package/dist/cjs/src/kucoin.js +28 -1
- package/dist/cjs/src/luno.js +9 -1
- package/dist/cjs/src/mexc.js +8 -6
- package/dist/cjs/src/okx.js +1 -0
- package/dist/cjs/src/oxfun.js +2900 -0
- package/dist/cjs/src/pro/binanceus.js +0 -8
- package/dist/cjs/src/pro/oxfun.js +1034 -0
- package/dist/cjs/src/tokocrypto.js +8 -10
- package/dist/cjs/src/wavesexchange.js +122 -110
- package/dist/cjs/src/woofipro.js +1 -0
- package/dist/cjs/src/xt.js +1 -1
- package/js/ccxt.d.ts +8 -2
- package/js/ccxt.js +6 -2
- package/js/src/abstract/binance.d.ts +2 -0
- package/js/src/abstract/binancecoinm.d.ts +2 -0
- package/js/src/abstract/binanceus.d.ts +2 -0
- package/js/src/abstract/binanceusdm.d.ts +2 -0
- package/js/src/abstract/bitstamp.d.ts +16 -0
- package/js/src/abstract/kucoin.d.ts +14 -0
- package/js/src/abstract/kucoinfutures.d.ts +14 -0
- package/js/src/abstract/mexc.d.ts +2 -0
- package/js/src/abstract/oxfun.d.ts +37 -0
- package/js/src/abstract/oxfun.js +11 -0
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +1 -0
- package/js/src/binance.js +2 -0
- package/js/src/bingx.js +26 -18
- package/js/src/bitmart.js +5 -0
- package/js/src/bitstamp.js +18 -2
- package/js/src/bitteam.js +6 -8
- package/js/src/coinmetro.js +9 -18
- package/js/src/hyperliquid.d.ts +3 -3
- package/js/src/hyperliquid.js +29 -21
- package/js/src/idex.js +1 -0
- package/js/src/kucoin.js +28 -1
- package/js/src/luno.d.ts +1 -1
- package/js/src/luno.js +9 -1
- package/js/src/mexc.js +8 -6
- package/js/src/okx.js +1 -0
- package/js/src/oxfun.d.ts +129 -0
- package/js/src/oxfun.js +2901 -0
- package/js/src/pro/binanceus.js +0 -8
- package/js/src/pro/oxfun.d.ts +38 -0
- package/js/src/pro/oxfun.js +1035 -0
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/tokocrypto.js +9 -11
- package/js/src/wavesexchange.d.ts +7 -7
- package/js/src/wavesexchange.js +123 -111
- package/js/src/woofipro.js +1 -0
- package/js/src/xt.js +1 -1
- package/package.json +1 -1
|
@@ -210,7 +210,7 @@ class tokocrypto extends tokocrypto$1 {
|
|
|
210
210
|
'maker': this.parseNumber('0.0075'), // 0.1% trading fee, zero fees for all trading pairs before November 1
|
|
211
211
|
},
|
|
212
212
|
},
|
|
213
|
-
'precisionMode': number.
|
|
213
|
+
'precisionMode': number.TICK_SIZE,
|
|
214
214
|
'options': {
|
|
215
215
|
// 'fetchTradesMethod': 'binanceGetTrades', // binanceGetTrades, binanceGetAggTrades
|
|
216
216
|
'createMarketBuyOrderRequiresPrice': true,
|
|
@@ -717,10 +717,10 @@ class tokocrypto extends tokocrypto$1 {
|
|
|
717
717
|
'strike': undefined,
|
|
718
718
|
'optionType': undefined,
|
|
719
719
|
'precision': {
|
|
720
|
-
'amount': this.
|
|
721
|
-
'price': this.
|
|
722
|
-
'base': this.
|
|
723
|
-
'quote': this.
|
|
720
|
+
'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'quantityPrecision'))),
|
|
721
|
+
'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'pricePrecision'))),
|
|
722
|
+
'base': this.parseNumber(this.parsePrecision(this.safeString(market, 'baseAssetPrecision'))),
|
|
723
|
+
'quote': this.parseNumber(this.parsePrecision(this.safeString(market, 'quotePrecision'))),
|
|
724
724
|
},
|
|
725
725
|
'limits': {
|
|
726
726
|
'leverage': {
|
|
@@ -745,8 +745,7 @@ class tokocrypto extends tokocrypto$1 {
|
|
|
745
745
|
};
|
|
746
746
|
if ('PRICE_FILTER' in filtersByType) {
|
|
747
747
|
const filter = this.safeValue(filtersByType, 'PRICE_FILTER', {});
|
|
748
|
-
|
|
749
|
-
entry['precision']['price'] = this.precisionFromString(tickSize);
|
|
748
|
+
entry['precision']['price'] = this.safeNumber(filter, 'tickSize');
|
|
750
749
|
// PRICE_FILTER reports zero values for maxPrice
|
|
751
750
|
// since they updated filter types in November 2018
|
|
752
751
|
// https://github.com/ccxt/ccxt/issues/4286
|
|
@@ -755,12 +754,11 @@ class tokocrypto extends tokocrypto$1 {
|
|
|
755
754
|
'min': this.safeNumber(filter, 'minPrice'),
|
|
756
755
|
'max': this.safeNumber(filter, 'maxPrice'),
|
|
757
756
|
};
|
|
758
|
-
entry['precision']['price'] =
|
|
757
|
+
entry['precision']['price'] = filter['tickSize'];
|
|
759
758
|
}
|
|
760
759
|
if ('LOT_SIZE' in filtersByType) {
|
|
761
760
|
const filter = this.safeValue(filtersByType, 'LOT_SIZE', {});
|
|
762
|
-
|
|
763
|
-
entry['precision']['amount'] = this.precisionFromString(stepSize);
|
|
761
|
+
entry['precision']['amount'] = this.safeNumber(filter, 'stepSize');
|
|
764
762
|
entry['limits']['amount'] = {
|
|
765
763
|
'min': this.safeNumber(filter, 'minQty'),
|
|
766
764
|
'max': this.safeNumber(filter, 'maxQty'),
|
|
@@ -20,6 +20,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
20
20
|
'countries': ['CH'],
|
|
21
21
|
'certified': false,
|
|
22
22
|
'pro': false,
|
|
23
|
+
'dex': true,
|
|
23
24
|
'has': {
|
|
24
25
|
'CORS': undefined,
|
|
25
26
|
'spot': true,
|
|
@@ -315,9 +316,9 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
315
316
|
},
|
|
316
317
|
},
|
|
317
318
|
'currencies': {
|
|
318
|
-
'WX': this.safeCurrencyStructure({ 'id': 'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc', 'numericId': undefined, 'code': 'WX', 'precision': this.
|
|
319
|
+
'WX': this.safeCurrencyStructure({ 'id': 'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc', 'numericId': undefined, 'code': 'WX', 'precision': this.parseNumber('1e-8') }),
|
|
319
320
|
},
|
|
320
|
-
'precisionMode': number.
|
|
321
|
+
'precisionMode': number.TICK_SIZE,
|
|
321
322
|
'options': {
|
|
322
323
|
'allowedCandles': 1440,
|
|
323
324
|
'accessToken': undefined,
|
|
@@ -328,7 +329,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
328
329
|
'wavesAddress': undefined,
|
|
329
330
|
'withdrawFeeUSDN': 7420,
|
|
330
331
|
'withdrawFeeWAVES': 100000,
|
|
331
|
-
'wavesPrecision': 8,
|
|
332
|
+
'wavesPrecision': 1e-8,
|
|
332
333
|
'messagePrefix': 'W',
|
|
333
334
|
'networks': {
|
|
334
335
|
'ERC20': 'ETH',
|
|
@@ -376,8 +377,8 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
376
377
|
async getFeesForAsset(symbol, side, amount, price, params = {}) {
|
|
377
378
|
await this.loadMarkets();
|
|
378
379
|
const market = this.market(symbol);
|
|
379
|
-
amount = this.
|
|
380
|
-
price = this.
|
|
380
|
+
amount = this.toRealSymbolAmount(symbol, amount);
|
|
381
|
+
price = this.toRealSymbolPrice(symbol, price);
|
|
381
382
|
const request = this.extend({
|
|
382
383
|
'baseId': market['baseId'],
|
|
383
384
|
'quoteId': market['quoteId'],
|
|
@@ -410,7 +411,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
410
411
|
const matcherFee = this.safeString(mode, 'matcherFee');
|
|
411
412
|
const feeAssetId = this.safeString(mode, 'feeAssetId');
|
|
412
413
|
const feeAsset = this.safeCurrencyCode(feeAssetId);
|
|
413
|
-
const adjustedMatcherFee = this.
|
|
414
|
+
const adjustedMatcherFee = this.fromRealCurrencyAmount(feeAsset, matcherFee);
|
|
414
415
|
const amountAsString = this.numberToString(amount);
|
|
415
416
|
const priceAsString = this.numberToString(price);
|
|
416
417
|
const feeCost = this.feeToPrecision(symbol, this.parseNumber(adjustedMatcherFee));
|
|
@@ -563,8 +564,8 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
563
564
|
'strike': undefined,
|
|
564
565
|
'optionType': undefined,
|
|
565
566
|
'precision': {
|
|
566
|
-
'amount': this.
|
|
567
|
-
'price': this.
|
|
567
|
+
'amount': this.parseNumber(this.parsePrecision(this.safeString(entry, 'amountAssetDecimals'))),
|
|
568
|
+
'price': this.parseNumber(this.parsePrecision(this.safeString(entry, 'priceAssetDecimals'))),
|
|
568
569
|
},
|
|
569
570
|
'limits': {
|
|
570
571
|
'leverage': {
|
|
@@ -621,12 +622,11 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
621
622
|
}
|
|
622
623
|
parseOrderBookSide(bookSide, market = undefined, limit = undefined) {
|
|
623
624
|
const precision = market['precision'];
|
|
624
|
-
const wavesPrecision = this.safeString(this.options, 'wavesPrecision', '8');
|
|
625
|
-
const
|
|
626
|
-
const
|
|
627
|
-
const
|
|
628
|
-
const
|
|
629
|
-
const pricePrecision = '1e' + Precise["default"].stringSub(wavesPrecision, difference);
|
|
625
|
+
const wavesPrecision = this.safeString(this.options, 'wavesPrecision', '1e-8');
|
|
626
|
+
const amountPrecisionString = this.safeString(precision, 'amount');
|
|
627
|
+
const pricePrecisionString = this.safeString(precision, 'price');
|
|
628
|
+
const difference = Precise["default"].stringDiv(amountPrecisionString, pricePrecisionString);
|
|
629
|
+
const pricePrecision = Precise["default"].stringDiv(wavesPrecision, difference);
|
|
630
630
|
const result = [];
|
|
631
631
|
for (let i = 0; i < bookSide.length; i++) {
|
|
632
632
|
const entry = bookSide[i];
|
|
@@ -635,10 +635,10 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
635
635
|
let price = undefined;
|
|
636
636
|
let amount = undefined;
|
|
637
637
|
if ((pricePrecision !== undefined) && (entryPrice !== undefined)) {
|
|
638
|
-
price = Precise["default"].
|
|
638
|
+
price = Precise["default"].stringMul(entryPrice, pricePrecision);
|
|
639
639
|
}
|
|
640
|
-
if ((
|
|
641
|
-
amount = Precise["default"].
|
|
640
|
+
if ((amountPrecisionString !== undefined) && (entryAmount !== undefined)) {
|
|
641
|
+
amount = Precise["default"].stringMul(entryAmount, amountPrecisionString);
|
|
642
642
|
}
|
|
643
643
|
if ((limit !== undefined) && (i > limit)) {
|
|
644
644
|
break;
|
|
@@ -1224,51 +1224,36 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
return currencyId;
|
|
1226
1226
|
}
|
|
1227
|
-
|
|
1228
|
-
const
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1231
|
-
const precisionPrice = this.numberToString(market['precision']['price']);
|
|
1232
|
-
const difference = Precise["default"].stringSub(amount, precisionPrice);
|
|
1233
|
-
const precision = Precise["default"].stringSub(wavesPrecision, difference);
|
|
1234
|
-
const pricePrecision = this.toPrecision(price, precision).toString();
|
|
1235
|
-
return this.parseToInt(parseFloat(pricePrecision));
|
|
1236
|
-
}
|
|
1237
|
-
customAmountToPrecision(symbol, amount) {
|
|
1238
|
-
const amountPrecision = this.numberToString(this.toPrecision(amount, this.numberToString(this.markets[symbol]['precision']['amount'])));
|
|
1239
|
-
return this.parseToInt(parseFloat(amountPrecision));
|
|
1227
|
+
toRealCurrencyAmount(code, amount, networkCode = undefined) {
|
|
1228
|
+
const currency = this.currency(code);
|
|
1229
|
+
const stringValue = Precise["default"].stringDiv(this.numberToString(amount), this.safeString(currency, 'precision'));
|
|
1230
|
+
return parseInt(stringValue);
|
|
1240
1231
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1232
|
+
fromRealCurrencyAmount(code, amountString) {
|
|
1233
|
+
if (!(code in this.currencies)) {
|
|
1234
|
+
return amountString;
|
|
1235
|
+
}
|
|
1236
|
+
const currency = this.currency(code);
|
|
1237
|
+
const precisionAmount = this.safeString(currency, 'precision');
|
|
1238
|
+
return Precise["default"].stringMul(amountString, precisionAmount);
|
|
1244
1239
|
}
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
const precise = new Precise["default"](amount);
|
|
1250
|
-
precise.decimals = this.sum(precise.decimals, scale);
|
|
1251
|
-
precise.reduce();
|
|
1252
|
-
return precise.toString();
|
|
1240
|
+
toRealSymbolPrice(symbol, price) {
|
|
1241
|
+
const market = this.market(symbol);
|
|
1242
|
+
const stringValue = Precise["default"].stringDiv(this.numberToString(price), this.safeString(market['precision'], 'price'));
|
|
1243
|
+
return parseInt(stringValue);
|
|
1253
1244
|
}
|
|
1254
|
-
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1257
|
-
// precise.decimals should be integer
|
|
1258
|
-
precise.decimals = this.parseToInt(Precise["default"].stringSub(this.numberToString(precise.decimals), this.numberToString(scale)));
|
|
1259
|
-
precise.reduce();
|
|
1260
|
-
const stringValue = precise.toString();
|
|
1261
|
-
return stringValue;
|
|
1245
|
+
fromRealSymbolPrice(symbol, priceString) {
|
|
1246
|
+
const market = this.markets[symbol];
|
|
1247
|
+
return Precise["default"].stringMul(priceString, this.safeString(market['precision'], 'price'));
|
|
1262
1248
|
}
|
|
1263
|
-
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1249
|
+
toRealSymbolAmount(symbol, amount) {
|
|
1250
|
+
const market = this.market(symbol);
|
|
1251
|
+
const stringValue = Precise["default"].stringDiv(this.numberToString(amount), this.safeString(market['precision'], 'amount'));
|
|
1252
|
+
return parseInt(stringValue);
|
|
1266
1253
|
}
|
|
1267
|
-
|
|
1254
|
+
fromRealSymbolAmount(symbol, amountString) {
|
|
1268
1255
|
const market = this.markets[symbol];
|
|
1269
|
-
|
|
1270
|
-
const scale = this.sum(wavesPrecision, market['precision']['price']) - market['precision']['amount'];
|
|
1271
|
-
return this.fromPrecision(price, scale);
|
|
1256
|
+
return Precise["default"].stringMul(amountString, market['precision']['amount']);
|
|
1272
1257
|
}
|
|
1273
1258
|
safeGetDynamic(settings) {
|
|
1274
1259
|
const orderFee = this.safeValue(settings, 'orderFee');
|
|
@@ -1350,7 +1335,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1350
1335
|
}
|
|
1351
1336
|
const matcherFeeAsset = this.safeCurrencyCode(matcherFeeAssetId);
|
|
1352
1337
|
const rawMatcherFee = (matcherFeeAssetId === baseFeeAssetId) ? baseMatcherFee : discountMatcherFee;
|
|
1353
|
-
const floatMatcherFee = parseFloat(this.
|
|
1338
|
+
const floatMatcherFee = parseFloat(this.fromRealCurrencyAmount(matcherFeeAsset, rawMatcherFee));
|
|
1354
1339
|
if ((matcherFeeAsset in balances) && (balances[matcherFeeAsset]['free'] >= floatMatcherFee)) {
|
|
1355
1340
|
matcherFee = parseInt(rawMatcherFee);
|
|
1356
1341
|
}
|
|
@@ -1358,26 +1343,26 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1358
1343
|
throw new errors.InsufficientFunds(this.id + ' not enough funds of the selected asset fee');
|
|
1359
1344
|
}
|
|
1360
1345
|
}
|
|
1346
|
+
const floatBaseMatcherFee = this.fromRealCurrencyAmount(baseFeeAsset, baseMatcherFee);
|
|
1347
|
+
const floatDiscountMatcherFee = this.fromRealCurrencyAmount(discountFeeAsset, discountMatcherFee);
|
|
1361
1348
|
if (matcherFeeAssetId === undefined) {
|
|
1362
1349
|
// try to the pay the fee using the base first then discount asset
|
|
1363
|
-
|
|
1364
|
-
if ((baseFeeAsset in balances) && (balances[baseFeeAsset]['free'] >= floatBaseMatcherFee)) {
|
|
1350
|
+
if ((baseFeeAsset in balances) && (balances[baseFeeAsset]['free'] >= parseFloat(floatBaseMatcherFee))) {
|
|
1365
1351
|
matcherFeeAssetId = baseFeeAssetId;
|
|
1366
1352
|
matcherFee = parseInt(baseMatcherFee);
|
|
1367
1353
|
}
|
|
1368
1354
|
else {
|
|
1369
|
-
|
|
1370
|
-
if ((discountFeeAsset in balances) && (balances[discountFeeAsset]['free'] >= floatDiscountMatcherFee)) {
|
|
1355
|
+
if ((discountFeeAsset in balances) && (balances[discountFeeAsset]['free'] >= parseFloat(floatDiscountMatcherFee))) {
|
|
1371
1356
|
matcherFeeAssetId = discountFeeAssetId;
|
|
1372
1357
|
matcherFee = parseInt(discountMatcherFee);
|
|
1373
1358
|
}
|
|
1374
1359
|
}
|
|
1375
1360
|
}
|
|
1376
1361
|
if (matcherFeeAssetId === undefined) {
|
|
1377
|
-
throw new errors.InsufficientFunds(this.id + ' not enough funds on none of the eligible asset fees');
|
|
1362
|
+
throw new errors.InsufficientFunds(this.id + ' not enough funds on none of the eligible asset fees: ' + baseFeeAsset + ' ' + floatBaseMatcherFee + ' or ' + discountFeeAsset + ' ' + floatDiscountMatcherFee);
|
|
1378
1363
|
}
|
|
1379
|
-
amount = this.
|
|
1380
|
-
price = this.
|
|
1364
|
+
amount = this.toRealSymbolAmount(symbol, amount);
|
|
1365
|
+
price = this.toRealSymbolPrice(symbol, price);
|
|
1381
1366
|
const assetPair = {
|
|
1382
1367
|
'amountAsset': amountAsset,
|
|
1383
1368
|
'priceAsset': priceAsset,
|
|
@@ -1415,7 +1400,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1415
1400
|
'c': {
|
|
1416
1401
|
't': 'sp',
|
|
1417
1402
|
'v': {
|
|
1418
|
-
'p': this.
|
|
1403
|
+
'p': this.toRealSymbolPrice(symbol, stopPrice),
|
|
1419
1404
|
},
|
|
1420
1405
|
},
|
|
1421
1406
|
};
|
|
@@ -1763,24 +1748,24 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1763
1748
|
symbol = market['symbol'];
|
|
1764
1749
|
}
|
|
1765
1750
|
const amountCurrency = this.safeCurrencyCode(this.safeString(assetPair, 'amountAsset', 'WAVES'));
|
|
1766
|
-
const price = this.
|
|
1767
|
-
const amount = this.
|
|
1768
|
-
const filled = this.
|
|
1769
|
-
const average = this.
|
|
1751
|
+
const price = this.fromRealSymbolPrice(symbol, priceString);
|
|
1752
|
+
const amount = this.fromRealCurrencyAmount(amountCurrency, amountString);
|
|
1753
|
+
const filled = this.fromRealCurrencyAmount(amountCurrency, filledString);
|
|
1754
|
+
const average = this.fromRealSymbolPrice(symbol, this.safeString(order, 'avgWeighedPrice'));
|
|
1770
1755
|
const status = this.parseOrderStatus(this.safeString(order, 'status'));
|
|
1771
1756
|
let fee = undefined;
|
|
1772
1757
|
if ('type' in order) {
|
|
1773
|
-
const
|
|
1758
|
+
const code = this.safeCurrencyCode(this.safeString(order, 'feeAsset'));
|
|
1774
1759
|
fee = {
|
|
1775
|
-
'currency':
|
|
1776
|
-
'fee': this.parseNumber(this.
|
|
1760
|
+
'currency': code,
|
|
1761
|
+
'fee': this.parseNumber(this.fromRealCurrencyAmount(code, this.safeString(order, 'filledFee'))),
|
|
1777
1762
|
};
|
|
1778
1763
|
}
|
|
1779
1764
|
else {
|
|
1780
|
-
const
|
|
1765
|
+
const code = this.safeCurrencyCode(this.safeString(order, 'matcherFeeAssetId', 'WAVES'));
|
|
1781
1766
|
fee = {
|
|
1782
|
-
'currency':
|
|
1783
|
-
'fee': this.parseNumber(this.
|
|
1767
|
+
'currency': code,
|
|
1768
|
+
'fee': this.parseNumber(this.fromRealCurrencyAmount(code, this.safeString(order, 'matcherFee'))),
|
|
1784
1769
|
};
|
|
1785
1770
|
}
|
|
1786
1771
|
let triggerPrice = undefined;
|
|
@@ -1893,7 +1878,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1893
1878
|
// ]
|
|
1894
1879
|
// }
|
|
1895
1880
|
const balances = this.safeValue(totalBalance, 'balances', []);
|
|
1896
|
-
|
|
1881
|
+
let result = {};
|
|
1897
1882
|
let timestamp = undefined;
|
|
1898
1883
|
const assetIds = [];
|
|
1899
1884
|
const nonStandardBalances = [];
|
|
@@ -1904,17 +1889,15 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1904
1889
|
const issueTransaction = this.safeValue(entry, 'issueTransaction');
|
|
1905
1890
|
const currencyId = this.safeString(entry, 'assetId');
|
|
1906
1891
|
const balance = this.safeString(entry, 'balance');
|
|
1907
|
-
|
|
1892
|
+
const currencyExists = (currencyId in this.currencies_by_id);
|
|
1893
|
+
if (currencyExists) {
|
|
1894
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1895
|
+
result[code] = this.account();
|
|
1896
|
+
result[code]['total'] = this.fromRealCurrencyAmount(code, balance);
|
|
1897
|
+
}
|
|
1898
|
+
else if (issueTransaction === undefined) {
|
|
1908
1899
|
assetIds.push(currencyId);
|
|
1909
1900
|
nonStandardBalances.push(balance);
|
|
1910
|
-
continue;
|
|
1911
|
-
}
|
|
1912
|
-
const decimals = this.safeInteger(issueTransaction, 'decimals');
|
|
1913
|
-
let code = undefined;
|
|
1914
|
-
if (currencyId in this.currencies_by_id) {
|
|
1915
|
-
code = this.safeCurrencyCode(currencyId);
|
|
1916
|
-
result[code] = this.account();
|
|
1917
|
-
result[code]['total'] = this.fromPrecision(balance, decimals);
|
|
1918
1901
|
}
|
|
1919
1902
|
}
|
|
1920
1903
|
const nonStandardAssets = assetIds.length;
|
|
@@ -1928,11 +1911,11 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1928
1911
|
const entry = data[i];
|
|
1929
1912
|
const balance = nonStandardBalances[i];
|
|
1930
1913
|
const inner = this.safeValue(entry, 'data');
|
|
1931
|
-
const
|
|
1914
|
+
const precision = this.parsePrecision(this.safeString(inner, 'precision'));
|
|
1932
1915
|
const ticker = this.safeString(inner, 'ticker');
|
|
1933
1916
|
const code = this.safeCurrencyCode(ticker);
|
|
1934
1917
|
result[code] = this.account();
|
|
1935
|
-
result[code]['total'] =
|
|
1918
|
+
result[code]['total'] = Precise["default"].stringMul(balance, precision);
|
|
1936
1919
|
}
|
|
1937
1920
|
}
|
|
1938
1921
|
const currentTimestamp = this.milliseconds();
|
|
@@ -1958,12 +1941,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1958
1941
|
result[code] = this.account();
|
|
1959
1942
|
}
|
|
1960
1943
|
const amount = this.safeString(reservedBalance, currencyId);
|
|
1961
|
-
|
|
1962
|
-
result[code]['used'] = this.currencyFromPrecision(code, amount);
|
|
1963
|
-
}
|
|
1964
|
-
else {
|
|
1965
|
-
result[code]['used'] = amount;
|
|
1966
|
-
}
|
|
1944
|
+
result[code]['used'] = this.fromRealCurrencyAmount(code, amount);
|
|
1967
1945
|
}
|
|
1968
1946
|
const wavesRequest = {
|
|
1969
1947
|
'address': wavesAddress,
|
|
@@ -1974,18 +1952,22 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1974
1952
|
// "confirmations": 0,
|
|
1975
1953
|
// "balance": 909085978
|
|
1976
1954
|
// }
|
|
1977
|
-
result['WAVES'] = this.safeValue(result, 'WAVES',
|
|
1978
|
-
result['WAVES']['total'] = this.
|
|
1979
|
-
|
|
1955
|
+
result['WAVES'] = this.safeValue(result, 'WAVES', this.account());
|
|
1956
|
+
result['WAVES']['total'] = this.fromRealCurrencyAmount('WAVES', this.safeString(wavesTotal, 'balance'));
|
|
1957
|
+
result = this.setUndefinedBalancesToZero(result);
|
|
1958
|
+
result['timestamp'] = timestamp;
|
|
1959
|
+
result['datetime'] = this.iso8601(timestamp);
|
|
1960
|
+
return this.safeBalance(result);
|
|
1961
|
+
}
|
|
1962
|
+
setUndefinedBalancesToZero(balances, key = 'used') {
|
|
1963
|
+
const codes = Object.keys(balances);
|
|
1980
1964
|
for (let i = 0; i < codes.length; i++) {
|
|
1981
1965
|
const code = codes[i];
|
|
1982
|
-
if (this.safeValue(
|
|
1983
|
-
|
|
1966
|
+
if (this.safeValue(balances[code], 'used') === undefined) {
|
|
1967
|
+
balances[code][key] = '0';
|
|
1984
1968
|
}
|
|
1985
1969
|
}
|
|
1986
|
-
|
|
1987
|
-
result['datetime'] = this.iso8601(timestamp);
|
|
1988
|
-
return this.safeBalance(result);
|
|
1970
|
+
return balances;
|
|
1989
1971
|
}
|
|
1990
1972
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1991
1973
|
/**
|
|
@@ -2523,7 +2505,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
2523
2505
|
const feeAssetId = 'WAVES';
|
|
2524
2506
|
const type = 4; // transfer
|
|
2525
2507
|
const version = 2;
|
|
2526
|
-
const amountInteger = this.
|
|
2508
|
+
const amountInteger = this.toRealCurrencyAmount(code, amount);
|
|
2527
2509
|
const currency = this.currency(code);
|
|
2528
2510
|
const timestamp = this.milliseconds();
|
|
2529
2511
|
const byteArray = [
|
|
@@ -2583,18 +2565,45 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
2583
2565
|
// "amount": 0
|
|
2584
2566
|
// }
|
|
2585
2567
|
//
|
|
2568
|
+
// withdraw new:
|
|
2569
|
+
// {
|
|
2570
|
+
// type: "4",
|
|
2571
|
+
// id: "2xnWTqG9ar7jEDrLxfbVyyspPZ6XZNrrw9ai9sQ81Eya",
|
|
2572
|
+
// fee: "100000",
|
|
2573
|
+
// feeAssetId: null,
|
|
2574
|
+
// timestamp: "1715786263807",
|
|
2575
|
+
// version: "2",
|
|
2576
|
+
// sender: "3P81LLX1kk2CSJC9L8C2enxdHB7XvnSGAEE",
|
|
2577
|
+
// senderPublicKey: "DdmzmXf9mty1FBE8AdVGnrncVLEAzP4gR4nWoTFAJoXz",
|
|
2578
|
+
// proofs: [ "RyoKwdSYv3EqotJCYftfFM9JE2j1ZpDRxKwYfiRhLAFeyNp6VfJUXNDS884XfeCeHeNypNmTCZt5NYR1ekyjCX3", ],
|
|
2579
|
+
// recipient: "3P9tXxu38a8tgewNEKFzourVxeqHd11ppOc",
|
|
2580
|
+
// assetId: null,
|
|
2581
|
+
// feeAsset: null,
|
|
2582
|
+
// amount: "2000000",
|
|
2583
|
+
// attachment: "",
|
|
2584
|
+
// }
|
|
2585
|
+
//
|
|
2586
2586
|
currency = this.safeCurrency(undefined, currency);
|
|
2587
|
+
const code = currency['code'];
|
|
2588
|
+
const typeRaw = this.safeString(transaction, 'type');
|
|
2589
|
+
const type = (typeRaw === '4') ? 'withdraw' : 'deposit';
|
|
2590
|
+
const amount = this.parseNumber(this.fromRealCurrencyAmount(code, this.safeString(transaction, 'amount')));
|
|
2591
|
+
const feeString = this.safeString(transaction, 'fee');
|
|
2592
|
+
const feeAssetId = this.safeString(transaction, 'feeAssetId', 'WAVES');
|
|
2593
|
+
const feeCode = this.safeCurrencyCode(feeAssetId);
|
|
2594
|
+
const feeAmount = this.parseNumber(this.fromRealCurrencyAmount(feeCode, feeString));
|
|
2595
|
+
const timestamp = this.safeInteger(transaction, 'timestamp');
|
|
2587
2596
|
return {
|
|
2588
|
-
'id':
|
|
2597
|
+
'id': this.safeString(transaction, 'id'),
|
|
2589
2598
|
'txid': undefined,
|
|
2590
|
-
'timestamp':
|
|
2591
|
-
'datetime':
|
|
2599
|
+
'timestamp': timestamp,
|
|
2600
|
+
'datetime': this.iso8601(timestamp),
|
|
2592
2601
|
'network': undefined,
|
|
2593
|
-
'addressFrom':
|
|
2602
|
+
'addressFrom': this.safeString(transaction, 'sender'),
|
|
2594
2603
|
'address': undefined,
|
|
2595
|
-
'addressTo':
|
|
2596
|
-
'amount':
|
|
2597
|
-
'type':
|
|
2604
|
+
'addressTo': this.safeString(transaction, 'recipient'),
|
|
2605
|
+
'amount': amount,
|
|
2606
|
+
'type': type,
|
|
2598
2607
|
'currency': currency['code'],
|
|
2599
2608
|
'status': undefined,
|
|
2600
2609
|
'updated': undefined,
|
|
@@ -2603,7 +2612,10 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
2603
2612
|
'tagTo': undefined,
|
|
2604
2613
|
'comment': undefined,
|
|
2605
2614
|
'internal': undefined,
|
|
2606
|
-
'fee':
|
|
2615
|
+
'fee': {
|
|
2616
|
+
'currency': feeCode,
|
|
2617
|
+
'cost': feeAmount,
|
|
2618
|
+
},
|
|
2607
2619
|
'info': transaction,
|
|
2608
2620
|
};
|
|
2609
2621
|
}
|
package/dist/cjs/src/woofipro.js
CHANGED
package/dist/cjs/src/xt.js
CHANGED
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 { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.3.
|
|
7
|
+
declare const version = "4.3.45";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -92,6 +92,7 @@ import oceanex from './src/oceanex.js';
|
|
|
92
92
|
import okcoin from './src/okcoin.js';
|
|
93
93
|
import okx from './src/okx.js';
|
|
94
94
|
import onetrading from './src/onetrading.js';
|
|
95
|
+
import oxfun from './src/oxfun.js';
|
|
95
96
|
import p2b from './src/p2b.js';
|
|
96
97
|
import paymium from './src/paymium.js';
|
|
97
98
|
import phemex from './src/phemex.js';
|
|
@@ -166,6 +167,7 @@ import ndaxPro from './src/pro/ndax.js';
|
|
|
166
167
|
import okcoinPro from './src/pro/okcoin.js';
|
|
167
168
|
import okxPro from './src/pro/okx.js';
|
|
168
169
|
import onetradingPro from './src/pro/onetrading.js';
|
|
170
|
+
import oxfunPro from './src/pro/oxfun.js';
|
|
169
171
|
import p2bPro from './src/pro/p2b.js';
|
|
170
172
|
import phemexPro from './src/pro/phemex.js';
|
|
171
173
|
import poloniexPro from './src/pro/poloniex.js';
|
|
@@ -264,6 +266,7 @@ declare const exchanges: {
|
|
|
264
266
|
okcoin: typeof okcoin;
|
|
265
267
|
okx: typeof okx;
|
|
266
268
|
onetrading: typeof onetrading;
|
|
269
|
+
oxfun: typeof oxfun;
|
|
267
270
|
p2b: typeof p2b;
|
|
268
271
|
paymium: typeof paymium;
|
|
269
272
|
phemex: typeof phemex;
|
|
@@ -340,6 +343,7 @@ declare const pro: {
|
|
|
340
343
|
okcoin: typeof okcoinPro;
|
|
341
344
|
okx: typeof okxPro;
|
|
342
345
|
onetrading: typeof onetradingPro;
|
|
346
|
+
oxfun: typeof oxfunPro;
|
|
343
347
|
p2b: typeof p2bPro;
|
|
344
348
|
phemex: typeof phemexPro;
|
|
345
349
|
poloniex: typeof poloniexPro;
|
|
@@ -412,6 +416,7 @@ declare const ccxt: {
|
|
|
412
416
|
okcoin: typeof okcoinPro;
|
|
413
417
|
okx: typeof okxPro;
|
|
414
418
|
onetrading: typeof onetradingPro;
|
|
419
|
+
oxfun: typeof oxfunPro;
|
|
415
420
|
p2b: typeof p2bPro;
|
|
416
421
|
phemex: typeof phemexPro;
|
|
417
422
|
poloniex: typeof poloniexPro;
|
|
@@ -511,6 +516,7 @@ declare const ccxt: {
|
|
|
511
516
|
okcoin: typeof okcoin;
|
|
512
517
|
okx: typeof okx;
|
|
513
518
|
onetrading: typeof onetrading;
|
|
519
|
+
oxfun: typeof oxfun;
|
|
514
520
|
p2b: typeof p2b;
|
|
515
521
|
paymium: typeof paymium;
|
|
516
522
|
phemex: typeof phemex;
|
|
@@ -531,5 +537,5 @@ declare const ccxt: {
|
|
|
531
537
|
zaif: typeof zaif;
|
|
532
538
|
zonda: typeof zonda;
|
|
533
539
|
} & typeof functions & typeof errors;
|
|
534
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers, 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, coinbaseadvanced, coinbaseexchange, coinbaseinternational, 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, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
540
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers, 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, coinbaseadvanced, coinbaseexchange, coinbaseinternational, 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, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
535
541
|
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, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.3.
|
|
41
|
+
const version = '4.3.46';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -128,6 +128,7 @@ import oceanex from './src/oceanex.js';
|
|
|
128
128
|
import okcoin from './src/okcoin.js';
|
|
129
129
|
import okx from './src/okx.js';
|
|
130
130
|
import onetrading from './src/onetrading.js';
|
|
131
|
+
import oxfun from './src/oxfun.js';
|
|
131
132
|
import p2b from './src/p2b.js';
|
|
132
133
|
import paymium from './src/paymium.js';
|
|
133
134
|
import phemex from './src/phemex.js';
|
|
@@ -203,6 +204,7 @@ import ndaxPro from './src/pro/ndax.js';
|
|
|
203
204
|
import okcoinPro from './src/pro/okcoin.js';
|
|
204
205
|
import okxPro from './src/pro/okx.js';
|
|
205
206
|
import onetradingPro from './src/pro/onetrading.js';
|
|
207
|
+
import oxfunPro from './src/pro/oxfun.js';
|
|
206
208
|
import p2bPro from './src/pro/p2b.js';
|
|
207
209
|
import phemexPro from './src/pro/phemex.js';
|
|
208
210
|
import poloniexPro from './src/pro/poloniex.js';
|
|
@@ -301,6 +303,7 @@ const exchanges = {
|
|
|
301
303
|
'okcoin': okcoin,
|
|
302
304
|
'okx': okx,
|
|
303
305
|
'onetrading': onetrading,
|
|
306
|
+
'oxfun': oxfun,
|
|
304
307
|
'p2b': p2b,
|
|
305
308
|
'paymium': paymium,
|
|
306
309
|
'phemex': phemex,
|
|
@@ -377,6 +380,7 @@ const pro = {
|
|
|
377
380
|
'okcoin': okcoinPro,
|
|
378
381
|
'okx': okxPro,
|
|
379
382
|
'onetrading': onetradingPro,
|
|
383
|
+
'oxfun': oxfunPro,
|
|
380
384
|
'p2b': p2bPro,
|
|
381
385
|
'phemex': phemexPro,
|
|
382
386
|
'poloniex': poloniexPro,
|
|
@@ -400,6 +404,6 @@ pro.exchanges = Object.keys(pro);
|
|
|
400
404
|
pro['Exchange'] = Exchange; // now the same for rest and ts
|
|
401
405
|
//-----------------------------------------------------------------------------
|
|
402
406
|
const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
|
|
403
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, 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, coinbaseadvanced, coinbaseexchange, coinbaseinternational, 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, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
407
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, 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, coinbaseadvanced, coinbaseexchange, coinbaseinternational, 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, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
404
408
|
export default ccxt;
|
|
405
409
|
//-----------------------------------------------------------------------------
|
|
@@ -615,6 +615,8 @@ interface Exchange {
|
|
|
615
615
|
privateGetAccountCommission(params?: {}): Promise<implicitReturnType>;
|
|
616
616
|
privatePostOrderOco(params?: {}): Promise<implicitReturnType>;
|
|
617
617
|
privatePostOrderListOco(params?: {}): Promise<implicitReturnType>;
|
|
618
|
+
privatePostOrderListOto(params?: {}): Promise<implicitReturnType>;
|
|
619
|
+
privatePostOrderListOtoco(params?: {}): Promise<implicitReturnType>;
|
|
618
620
|
privatePostSorOrder(params?: {}): Promise<implicitReturnType>;
|
|
619
621
|
privatePostSorOrderTest(params?: {}): Promise<implicitReturnType>;
|
|
620
622
|
privatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
@@ -615,6 +615,8 @@ interface binance {
|
|
|
615
615
|
privateGetAccountCommission(params?: {}): Promise<implicitReturnType>;
|
|
616
616
|
privatePostOrderOco(params?: {}): Promise<implicitReturnType>;
|
|
617
617
|
privatePostOrderListOco(params?: {}): Promise<implicitReturnType>;
|
|
618
|
+
privatePostOrderListOto(params?: {}): Promise<implicitReturnType>;
|
|
619
|
+
privatePostOrderListOtoco(params?: {}): Promise<implicitReturnType>;
|
|
618
620
|
privatePostSorOrder(params?: {}): Promise<implicitReturnType>;
|
|
619
621
|
privatePostSorOrderTest(params?: {}): Promise<implicitReturnType>;
|
|
620
622
|
privatePostOrder(params?: {}): Promise<implicitReturnType>;
|