ccxt 4.4.85 → 4.4.86
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 +6 -7
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +6 -9
- package/dist/cjs/src/abstract/bittrade.js +9 -0
- package/dist/cjs/src/ascendex.js +189 -155
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/bitget.js +5 -4
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bittrade.js +2049 -0
- package/dist/cjs/src/coinbase.js +2 -6
- package/dist/cjs/src/deribit.js +4 -5
- package/dist/cjs/src/hollaex.js +107 -49
- package/dist/cjs/src/htx.js +20 -44
- package/dist/cjs/src/hyperliquid.js +4 -4
- package/dist/cjs/src/mexc.js +2 -2
- package/dist/cjs/src/ndax.js +25 -24
- package/dist/cjs/src/okcoin.js +12 -31
- package/dist/cjs/src/okx.js +9 -0
- package/dist/cjs/src/onetrading.js +9 -6
- package/dist/cjs/src/oxfun.js +42 -114
- package/dist/cjs/src/paradex.js +5 -1
- package/dist/cjs/src/pro/binance.js +1 -0
- package/dist/cjs/src/pro/bittrade.js +605 -0
- package/dist/cjs/src/pro/luno.js +6 -5
- package/dist/cjs/src/pro/mexc.js +3 -0
- package/js/ccxt.d.ts +8 -11
- package/js/ccxt.js +6 -8
- package/js/src/abstract/myokx.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +2 -0
- package/js/src/ascendex.d.ts +2 -0
- package/js/src/ascendex.js +189 -155
- package/js/src/bequant.js +1 -1
- package/js/src/bitget.js +5 -4
- package/js/src/bitmart.js +1 -1
- package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
- package/js/src/{huobijp.js → bittrade.js} +35 -35
- package/js/src/coinbase.js +2 -6
- package/js/src/deribit.js +4 -5
- package/js/src/hollaex.js +107 -49
- package/js/src/htx.js +20 -44
- package/js/src/hyperliquid.js +4 -4
- package/js/src/mexc.js +2 -2
- package/js/src/ndax.js +25 -24
- package/js/src/okcoin.js +12 -31
- package/js/src/okx.js +9 -0
- package/js/src/onetrading.js +9 -6
- package/js/src/oxfun.js +42 -114
- package/js/src/paradex.js +5 -1
- package/js/src/pro/binance.js +1 -0
- package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
- package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
- package/js/src/pro/luno.js +6 -5
- package/js/src/pro/mexc.js +3 -0
- package/package.json +1 -1
- package/js/src/abstract/kuna.d.ts +0 -185
- package/js/src/abstract/kuna.js +0 -11
- package/js/src/kuna.d.ts +0 -335
- package/js/src/kuna.js +0 -2006
- /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
- /package/js/src/abstract/{huobijp.js → bittrade.js} +0 -0
package/js/src/ascendex.js
CHANGED
|
@@ -469,6 +469,7 @@ export default class ascendex extends Exchange {
|
|
|
469
469
|
'broad': {},
|
|
470
470
|
},
|
|
471
471
|
'commonCurrencies': {
|
|
472
|
+
'XBT': 'XBT',
|
|
472
473
|
'BOND': 'BONDED',
|
|
473
474
|
'BTCBEAR': 'BEAR',
|
|
474
475
|
'BTCBULL': 'BULL',
|
|
@@ -491,116 +492,83 @@ export default class ascendex extends Exchange {
|
|
|
491
492
|
* @returns {object} an associative dictionary of currencies
|
|
492
493
|
*/
|
|
493
494
|
async fetchCurrencies(params = {}) {
|
|
494
|
-
const
|
|
495
|
-
//
|
|
496
|
-
// {
|
|
497
|
-
// "code":0,
|
|
498
|
-
// "data":[
|
|
499
|
-
// {
|
|
500
|
-
// "assetCode" : "LTCBULL",
|
|
501
|
-
// "assetName" : "3X Long LTC Token",
|
|
502
|
-
// "precisionScale" : 9,
|
|
503
|
-
// "nativeScale" : 4,
|
|
504
|
-
// "withdrawalFee" : "0.2",
|
|
505
|
-
// "minWithdrawalAmt" : "1.0",
|
|
506
|
-
// "status" : "Normal"
|
|
507
|
-
// },
|
|
508
|
-
// ]
|
|
509
|
-
// }
|
|
510
|
-
//
|
|
511
|
-
const marginPromise = this.v1PublicGetMarginAssets(params);
|
|
512
|
-
//
|
|
513
|
-
// {
|
|
514
|
-
// "code":0,
|
|
515
|
-
// "data":[
|
|
516
|
-
// {
|
|
517
|
-
// "assetCode":"BTT",
|
|
518
|
-
// "displayName": "BTT",
|
|
519
|
-
// "borrowAssetCode":"BTT-B",
|
|
520
|
-
// "interestAssetCode":"BTT-I",
|
|
521
|
-
// "nativeScale":0,
|
|
522
|
-
// "numConfirmations":1,
|
|
523
|
-
// "withdrawFee":"100.0",
|
|
524
|
-
// "minWithdrawalAmt":"1000.0",
|
|
525
|
-
// "statusCode":"Normal",
|
|
526
|
-
// "statusMessage":"",
|
|
527
|
-
// "interestRate":"0.001"
|
|
528
|
-
// }
|
|
529
|
-
// ]
|
|
530
|
-
// }
|
|
531
|
-
//
|
|
532
|
-
const cashPromise = this.v1PublicGetCashAssets(params);
|
|
495
|
+
const response = await this.v2PublicGetAssets(params);
|
|
533
496
|
//
|
|
534
|
-
//
|
|
535
|
-
//
|
|
536
|
-
//
|
|
537
|
-
//
|
|
538
|
-
//
|
|
539
|
-
//
|
|
540
|
-
//
|
|
541
|
-
//
|
|
542
|
-
//
|
|
543
|
-
//
|
|
544
|
-
//
|
|
545
|
-
//
|
|
546
|
-
//
|
|
497
|
+
// {
|
|
498
|
+
// "code": "0",
|
|
499
|
+
// "data": [
|
|
500
|
+
// {
|
|
501
|
+
// "assetCode": "USDT",
|
|
502
|
+
// "assetName": "Tether",
|
|
503
|
+
// "precisionScale": 9,
|
|
504
|
+
// "nativeScale": 4,
|
|
505
|
+
// "blockChain": [
|
|
506
|
+
// {
|
|
507
|
+
// "chainName": "Solana",
|
|
508
|
+
// "withdrawFee": "2.0",
|
|
509
|
+
// "allowDeposit": true,
|
|
510
|
+
// "allowWithdraw": true,
|
|
511
|
+
// "minDepositAmt": "0.01",
|
|
512
|
+
// "minWithdrawal": "4.0",
|
|
513
|
+
// "numConfirmations": 1
|
|
514
|
+
// },
|
|
515
|
+
// ...
|
|
516
|
+
// ]
|
|
517
|
+
// },
|
|
547
518
|
// ]
|
|
548
|
-
//
|
|
519
|
+
// }
|
|
549
520
|
//
|
|
550
|
-
const
|
|
551
|
-
const assetsData = this.safeList(assets, 'data', []);
|
|
552
|
-
const marginData = this.safeList(margin, 'data', []);
|
|
553
|
-
const cashData = this.safeList(cash, 'data', []);
|
|
554
|
-
const assetsById = this.indexBy(assetsData, 'assetCode');
|
|
555
|
-
const marginById = this.indexBy(marginData, 'assetCode');
|
|
556
|
-
const cashById = this.indexBy(cashData, 'assetCode');
|
|
557
|
-
const dataById = this.deepExtend(assetsById, marginById, cashById);
|
|
558
|
-
const ids = Object.keys(dataById);
|
|
521
|
+
const data = this.safeList(response, 'data', []);
|
|
559
522
|
const result = {};
|
|
560
|
-
for (let i = 0; i <
|
|
561
|
-
const
|
|
562
|
-
const
|
|
523
|
+
for (let i = 0; i < data.length; i++) {
|
|
524
|
+
const currency = data[i];
|
|
525
|
+
const id = this.safeString(currency, 'assetCode');
|
|
563
526
|
const code = this.safeCurrencyCode(id);
|
|
564
|
-
const
|
|
565
|
-
const precision = this.parseNumber(this.parsePrecision(
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
527
|
+
const chains = this.safeList(currency, 'blockChain', []);
|
|
528
|
+
const precision = this.parseNumber(this.parsePrecision(this.safeString(currency, 'nativeScale')));
|
|
529
|
+
const networks = {};
|
|
530
|
+
for (let j = 0; j < chains.length; j++) {
|
|
531
|
+
const networkEtnry = chains[j];
|
|
532
|
+
const networkId = this.safeString(networkEtnry, 'chainName');
|
|
533
|
+
const networkCode = this.networkCodeToId(networkId);
|
|
534
|
+
networks[networkCode] = {
|
|
535
|
+
'fee': this.safeNumber(networkEtnry, 'withdrawFee'),
|
|
536
|
+
'active': undefined,
|
|
537
|
+
'withdraw': this.safeBool(networkEtnry, 'allowWithdraw'),
|
|
538
|
+
'deposit': this.safeBool(networkEtnry, 'allowDeposit'),
|
|
539
|
+
'precision': precision,
|
|
540
|
+
'limits': {
|
|
541
|
+
'amount': {
|
|
542
|
+
'min': undefined,
|
|
543
|
+
'max': undefined,
|
|
544
|
+
},
|
|
545
|
+
'withdraw': {
|
|
546
|
+
'min': this.safeNumber(networkEtnry, 'minWithdrawal'),
|
|
547
|
+
'max': undefined,
|
|
548
|
+
},
|
|
549
|
+
'deposit': {
|
|
550
|
+
'min': this.safeNumber(networkEtnry, 'minDepositAmt'),
|
|
551
|
+
'max': undefined,
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
};
|
|
587
555
|
}
|
|
588
|
-
|
|
589
|
-
result[code] = {
|
|
556
|
+
// todo type: if (chainsLength === 0 && (assetName.endsWith (' Staking') || assetName.indexOf (' Reward ') >= 0 || assetName.indexOf ('Slot Auction') >= 0 || assetName.indexOf (' Freeze Asset') >= 0))
|
|
557
|
+
result[code] = this.safeCurrencyStructure({
|
|
590
558
|
'id': id,
|
|
591
559
|
'code': code,
|
|
592
560
|
'info': currency,
|
|
593
561
|
'type': undefined,
|
|
594
|
-
'margin':
|
|
562
|
+
'margin': undefined,
|
|
595
563
|
'name': this.safeString(currency, 'assetName'),
|
|
596
|
-
'active':
|
|
597
|
-
'deposit':
|
|
598
|
-
'withdraw':
|
|
599
|
-
'fee':
|
|
564
|
+
'active': undefined,
|
|
565
|
+
'deposit': undefined,
|
|
566
|
+
'withdraw': undefined,
|
|
567
|
+
'fee': undefined,
|
|
600
568
|
'precision': precision,
|
|
601
569
|
'limits': {
|
|
602
570
|
'amount': {
|
|
603
|
-
'min':
|
|
571
|
+
'min': undefined,
|
|
604
572
|
'max': undefined,
|
|
605
573
|
},
|
|
606
574
|
'withdraw': {
|
|
@@ -608,8 +576,8 @@ export default class ascendex extends Exchange {
|
|
|
608
576
|
'max': undefined,
|
|
609
577
|
},
|
|
610
578
|
},
|
|
611
|
-
'networks':
|
|
612
|
-
};
|
|
579
|
+
'networks': networks,
|
|
580
|
+
});
|
|
613
581
|
}
|
|
614
582
|
return result;
|
|
615
583
|
}
|
|
@@ -621,6 +589,12 @@ export default class ascendex extends Exchange {
|
|
|
621
589
|
* @returns {object[]} an array of objects representing market data
|
|
622
590
|
*/
|
|
623
591
|
async fetchMarkets(params = {}) {
|
|
592
|
+
const spotPromise = this.fetchSpotMarkets(params);
|
|
593
|
+
const contractPromise = this.fetchContractMarkets(params);
|
|
594
|
+
const [spotMarkets, contractMarkets] = await Promise.all([spotPromise, contractPromise]);
|
|
595
|
+
return this.arrayConcat(spotMarkets, contractMarkets);
|
|
596
|
+
}
|
|
597
|
+
async fetchSpotMarkets(params = {}) {
|
|
624
598
|
const productsPromise = this.v1PublicGetProducts(params);
|
|
625
599
|
//
|
|
626
600
|
// {
|
|
@@ -672,7 +646,94 @@ export default class ascendex extends Exchange {
|
|
|
672
646
|
// ]
|
|
673
647
|
// }
|
|
674
648
|
//
|
|
675
|
-
const
|
|
649
|
+
const [products, cash] = await Promise.all([productsPromise, cashPromise]);
|
|
650
|
+
const productsData = this.safeList(products, 'data', []);
|
|
651
|
+
const productsById = this.indexBy(productsData, 'symbol');
|
|
652
|
+
const cashData = this.safeList(cash, 'data', []);
|
|
653
|
+
const cashAndPerpetualsById = this.indexBy(cashData, 'symbol');
|
|
654
|
+
const dataById = this.deepExtend(productsById, cashAndPerpetualsById);
|
|
655
|
+
const ids = Object.keys(dataById);
|
|
656
|
+
const result = [];
|
|
657
|
+
for (let i = 0; i < ids.length; i++) {
|
|
658
|
+
const id = ids[i];
|
|
659
|
+
if (id.indexOf('-PERP') >= 0) {
|
|
660
|
+
continue; // skip perpetuals, as separate endpoint returns them
|
|
661
|
+
}
|
|
662
|
+
const market = dataById[id];
|
|
663
|
+
const status = this.safeString(market, 'status');
|
|
664
|
+
const domain = this.safeString(market, 'domain');
|
|
665
|
+
let active = false;
|
|
666
|
+
if (((status === 'Normal') || (status === 'InternalTrading')) && (domain !== 'LeveragedETF')) {
|
|
667
|
+
active = true;
|
|
668
|
+
}
|
|
669
|
+
const minQty = this.safeNumber(market, 'minQty');
|
|
670
|
+
const maxQty = this.safeNumber(market, 'maxQty');
|
|
671
|
+
const minPrice = this.safeNumber(market, 'tickSize');
|
|
672
|
+
const maxPrice = undefined;
|
|
673
|
+
const underlying = this.safeString2(market, 'underlying', 'symbol');
|
|
674
|
+
const parts = underlying.split('/');
|
|
675
|
+
const baseId = this.safeString(parts, 0);
|
|
676
|
+
const quoteId = this.safeString(parts, 1);
|
|
677
|
+
const base = this.safeCurrencyCode(baseId);
|
|
678
|
+
const quote = this.safeCurrencyCode(quoteId);
|
|
679
|
+
const fee = this.safeNumber(market, 'commissionReserveRate');
|
|
680
|
+
const marginTradable = this.safeBool(market, 'marginTradable', false);
|
|
681
|
+
result.push({
|
|
682
|
+
'id': id,
|
|
683
|
+
'symbol': base + '/' + quote,
|
|
684
|
+
'base': base,
|
|
685
|
+
'baseId': baseId,
|
|
686
|
+
'quote': quote,
|
|
687
|
+
'quoteId': quoteId,
|
|
688
|
+
'settle': undefined,
|
|
689
|
+
'settleId': undefined,
|
|
690
|
+
'type': 'spot',
|
|
691
|
+
'spot': true,
|
|
692
|
+
'margin': marginTradable,
|
|
693
|
+
'swap': false,
|
|
694
|
+
'future': false,
|
|
695
|
+
'option': false,
|
|
696
|
+
'active': active,
|
|
697
|
+
'contract': false,
|
|
698
|
+
'linear': undefined,
|
|
699
|
+
'inverse': undefined,
|
|
700
|
+
'taker': fee,
|
|
701
|
+
'maker': fee,
|
|
702
|
+
'contractSize': undefined,
|
|
703
|
+
'expiry': undefined,
|
|
704
|
+
'expiryDatetime': undefined,
|
|
705
|
+
'strike': undefined,
|
|
706
|
+
'optionType': undefined,
|
|
707
|
+
'precision': {
|
|
708
|
+
'amount': this.safeNumber(market, 'lotSize'),
|
|
709
|
+
'price': this.safeNumber(market, 'tickSize'),
|
|
710
|
+
},
|
|
711
|
+
'limits': {
|
|
712
|
+
'leverage': {
|
|
713
|
+
'min': undefined,
|
|
714
|
+
'max': undefined,
|
|
715
|
+
},
|
|
716
|
+
'amount': {
|
|
717
|
+
'min': minQty,
|
|
718
|
+
'max': maxQty,
|
|
719
|
+
},
|
|
720
|
+
'price': {
|
|
721
|
+
'min': minPrice,
|
|
722
|
+
'max': maxPrice,
|
|
723
|
+
},
|
|
724
|
+
'cost': {
|
|
725
|
+
'min': this.safeNumber(market, 'minNotional'),
|
|
726
|
+
'max': this.safeNumber(market, 'maxNotional'),
|
|
727
|
+
},
|
|
728
|
+
},
|
|
729
|
+
'created': this.safeInteger(market, 'tradingStartTime'),
|
|
730
|
+
'info': market,
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
return result;
|
|
734
|
+
}
|
|
735
|
+
async fetchContractMarkets(params = {}) {
|
|
736
|
+
const contracts = await this.v2PublicGetFuturesContract(params);
|
|
676
737
|
//
|
|
677
738
|
// {
|
|
678
739
|
// "code": 0,
|
|
@@ -685,9 +746,9 @@ export default class ascendex extends Exchange {
|
|
|
685
746
|
// "underlying": "BTC/USDT",
|
|
686
747
|
// "tradingStartTime": 1579701600000,
|
|
687
748
|
// "priceFilter": {
|
|
688
|
-
// "minPrice": "1",
|
|
749
|
+
// "minPrice": "0.1",
|
|
689
750
|
// "maxPrice": "1000000",
|
|
690
|
-
// "tickSize": "1"
|
|
751
|
+
// "tickSize": "0.1"
|
|
691
752
|
// },
|
|
692
753
|
// "lotSizeFilter": {
|
|
693
754
|
// "minQty": "0.0001",
|
|
@@ -710,52 +771,25 @@ export default class ascendex extends Exchange {
|
|
|
710
771
|
// ]
|
|
711
772
|
// }
|
|
712
773
|
//
|
|
713
|
-
const
|
|
714
|
-
const productsData = this.safeList(products, 'data', []);
|
|
715
|
-
const productsById = this.indexBy(productsData, 'symbol');
|
|
716
|
-
const cashData = this.safeList(cash, 'data', []);
|
|
717
|
-
const perpetualsData = this.safeList(perpetuals, 'data', []);
|
|
718
|
-
const cashAndPerpetualsData = this.arrayConcat(cashData, perpetualsData);
|
|
719
|
-
const cashAndPerpetualsById = this.indexBy(cashAndPerpetualsData, 'symbol');
|
|
720
|
-
const dataById = this.deepExtend(productsById, cashAndPerpetualsById);
|
|
721
|
-
const ids = Object.keys(dataById);
|
|
774
|
+
const data = this.safeList(contracts, 'data', []);
|
|
722
775
|
const result = [];
|
|
723
|
-
for (let i = 0; i <
|
|
724
|
-
const
|
|
725
|
-
const
|
|
726
|
-
const
|
|
727
|
-
const settle = this.safeCurrencyCode(settleId);
|
|
728
|
-
const status = this.safeString(market, 'status');
|
|
729
|
-
const domain = this.safeString(market, 'domain');
|
|
730
|
-
let active = false;
|
|
731
|
-
if (((status === 'Normal') || (status === 'InternalTrading')) && (domain !== 'LeveragedETF')) {
|
|
732
|
-
active = true;
|
|
733
|
-
}
|
|
734
|
-
const spot = settle === undefined;
|
|
735
|
-
const swap = !spot;
|
|
736
|
-
const linear = swap ? true : undefined;
|
|
737
|
-
let minQty = this.safeNumber(market, 'minQty');
|
|
738
|
-
let maxQty = this.safeNumber(market, 'maxQty');
|
|
739
|
-
let minPrice = this.safeNumber(market, 'tickSize');
|
|
740
|
-
let maxPrice = undefined;
|
|
741
|
-
const underlying = this.safeString2(market, 'underlying', 'symbol');
|
|
776
|
+
for (let i = 0; i < data.length; i++) {
|
|
777
|
+
const market = data[i];
|
|
778
|
+
const id = this.safeString(market, 'symbol');
|
|
779
|
+
const underlying = this.safeString(market, 'underlying');
|
|
742
780
|
const parts = underlying.split('/');
|
|
743
781
|
const baseId = this.safeString(parts, 0);
|
|
744
|
-
const quoteId = this.safeString(parts, 1);
|
|
745
782
|
const base = this.safeCurrencyCode(baseId);
|
|
783
|
+
const quoteId = this.safeString(parts, 1);
|
|
746
784
|
const quote = this.safeCurrencyCode(quoteId);
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
maxPrice = this.safeNumber(priceFilter, 'maxPrice');
|
|
755
|
-
symbol = base + '/' + quote + ':' + settle;
|
|
756
|
-
}
|
|
785
|
+
const settleId = this.safeString(market, 'settlementAsset');
|
|
786
|
+
const settle = this.safeCurrencyCode(settleId);
|
|
787
|
+
const linear = settle === quote;
|
|
788
|
+
const inverse = settle === base;
|
|
789
|
+
const symbol = base + '/' + quote + ':' + settle;
|
|
790
|
+
const priceFilter = this.safeDict(market, 'priceFilter');
|
|
791
|
+
const lotSizeFilter = this.safeDict(market, 'lotSizeFilter');
|
|
757
792
|
const fee = this.safeNumber(market, 'commissionReserveRate');
|
|
758
|
-
const marginTradable = this.safeBool(market, 'marginTradable', false);
|
|
759
793
|
result.push({
|
|
760
794
|
'id': id,
|
|
761
795
|
'symbol': symbol,
|
|
@@ -765,26 +799,26 @@ export default class ascendex extends Exchange {
|
|
|
765
799
|
'baseId': baseId,
|
|
766
800
|
'quoteId': quoteId,
|
|
767
801
|
'settleId': settleId,
|
|
768
|
-
'type':
|
|
769
|
-
'spot':
|
|
770
|
-
'margin':
|
|
771
|
-
'swap':
|
|
802
|
+
'type': 'swap',
|
|
803
|
+
'spot': false,
|
|
804
|
+
'margin': undefined,
|
|
805
|
+
'swap': true,
|
|
772
806
|
'future': false,
|
|
773
807
|
'option': false,
|
|
774
|
-
'active':
|
|
775
|
-
'contract':
|
|
808
|
+
'active': this.safeString(market, 'status') === 'Normal',
|
|
809
|
+
'contract': true,
|
|
776
810
|
'linear': linear,
|
|
777
|
-
'inverse':
|
|
811
|
+
'inverse': inverse,
|
|
778
812
|
'taker': fee,
|
|
779
813
|
'maker': fee,
|
|
780
|
-
'contractSize':
|
|
814
|
+
'contractSize': this.parseNumber('1'),
|
|
781
815
|
'expiry': undefined,
|
|
782
816
|
'expiryDatetime': undefined,
|
|
783
817
|
'strike': undefined,
|
|
784
818
|
'optionType': undefined,
|
|
785
819
|
'precision': {
|
|
786
|
-
'amount': this.safeNumber(
|
|
787
|
-
'price': this.safeNumber(
|
|
820
|
+
'amount': this.safeNumber(lotSizeFilter, 'lotSize'),
|
|
821
|
+
'price': this.safeNumber(priceFilter, 'tickSize'),
|
|
788
822
|
},
|
|
789
823
|
'limits': {
|
|
790
824
|
'leverage': {
|
|
@@ -792,12 +826,12 @@ export default class ascendex extends Exchange {
|
|
|
792
826
|
'max': undefined,
|
|
793
827
|
},
|
|
794
828
|
'amount': {
|
|
795
|
-
'min': minQty,
|
|
796
|
-
'max': maxQty,
|
|
829
|
+
'min': this.safeNumber(lotSizeFilter, 'minQty'),
|
|
830
|
+
'max': this.safeNumber(lotSizeFilter, 'maxQty'),
|
|
797
831
|
},
|
|
798
832
|
'price': {
|
|
799
|
-
'min': minPrice,
|
|
800
|
-
'max': maxPrice,
|
|
833
|
+
'min': this.safeNumber(priceFilter, 'minPrice'),
|
|
834
|
+
'max': this.safeNumber(priceFilter, 'maxPrice'),
|
|
801
835
|
},
|
|
802
836
|
'cost': {
|
|
803
837
|
'min': this.safeNumber(market, 'minNotional'),
|
package/js/src/bequant.js
CHANGED
|
@@ -12,8 +12,8 @@ export default class bequant extends hitbtc {
|
|
|
12
12
|
return this.deepExtend(super.describe(), {
|
|
13
13
|
'id': 'bequant',
|
|
14
14
|
'name': 'Bequant',
|
|
15
|
-
'countries': ['MT'],
|
|
16
15
|
'pro': true,
|
|
16
|
+
'countries': ['MT'],
|
|
17
17
|
'urls': {
|
|
18
18
|
'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
|
|
19
19
|
'api': {
|
package/js/src/bitget.js
CHANGED
|
@@ -2393,7 +2393,7 @@ export default class bitget extends Exchange {
|
|
|
2393
2393
|
'coin': currency['id'],
|
|
2394
2394
|
'address': address,
|
|
2395
2395
|
'chain': networkId,
|
|
2396
|
-
'size': amount,
|
|
2396
|
+
'size': this.currencyToPrecision(code, amount, networkCode),
|
|
2397
2397
|
'transferType': 'on_chain',
|
|
2398
2398
|
};
|
|
2399
2399
|
if (tag !== undefined) {
|
|
@@ -2418,8 +2418,6 @@ export default class bitget extends Exchange {
|
|
|
2418
2418
|
const fillResponseFromRequest = this.safeBool(withdrawOptions, 'fillResponseFromRequest', true);
|
|
2419
2419
|
if (fillResponseFromRequest) {
|
|
2420
2420
|
result['currency'] = code;
|
|
2421
|
-
result['timestamp'] = this.milliseconds();
|
|
2422
|
-
result['datetime'] = this.iso8601(this.milliseconds());
|
|
2423
2421
|
result['amount'] = amount;
|
|
2424
2422
|
result['tag'] = tag;
|
|
2425
2423
|
result['address'] = address;
|
|
@@ -2543,7 +2541,10 @@ export default class bitget extends Exchange {
|
|
|
2543
2541
|
const status = this.safeString(transaction, 'status');
|
|
2544
2542
|
const tag = this.safeString(transaction, 'tag');
|
|
2545
2543
|
const feeCostString = this.safeString(transaction, 'fee');
|
|
2546
|
-
|
|
2544
|
+
let feeCostAbsString = undefined;
|
|
2545
|
+
if (feeCostString !== undefined) {
|
|
2546
|
+
feeCostAbsString = Precise.stringAbs(feeCostString);
|
|
2547
|
+
}
|
|
2547
2548
|
let fee = undefined;
|
|
2548
2549
|
let amountString = this.safeString(transaction, 'size');
|
|
2549
2550
|
if (feeCostAbsString !== undefined) {
|
package/js/src/bitmart.js
CHANGED
|
@@ -2374,7 +2374,7 @@ export default class bitmart extends Exchange {
|
|
|
2374
2374
|
const code = this.safeCurrencyCode(currencyId);
|
|
2375
2375
|
const account = this.account();
|
|
2376
2376
|
account['free'] = this.safeString2(balance, 'available', 'available_balance');
|
|
2377
|
-
account['used'] = this.
|
|
2377
|
+
account['used'] = this.safeStringN(balance, ['unAvailable', 'frozen', 'frozen_balance']);
|
|
2378
2378
|
result[code] = account;
|
|
2379
2379
|
}
|
|
2380
2380
|
return this.safeBalance(result);
|