ccxt 4.1.56 → 4.1.57
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/.git-templates/hooks/pre-push +2 -2
- package/README.md +3 -3
- package/build.sh +30 -18
- package/dist/ccxt.browser.js +3872 -3202
- package/dist/ccxt.browser.min.js +10 -10
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +17 -13
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +35 -29
- package/dist/cjs/src/base/Exchange.js +39 -26
- package/dist/cjs/src/base/Precise.js +1 -3
- package/dist/cjs/src/bigone.js +24 -20
- package/dist/cjs/src/binance.js +97 -76
- package/dist/cjs/src/bingx.js +63 -44
- package/dist/cjs/src/bit2c.js +18 -15
- package/dist/cjs/src/bitbank.js +16 -15
- package/dist/cjs/src/bitbns.js +28 -18
- package/dist/cjs/src/bitfinex.js +23 -21
- package/dist/cjs/src/bitfinex2.js +32 -28
- package/dist/cjs/src/bitflyer.js +28 -20
- package/dist/cjs/src/bitforex.js +25 -18
- package/dist/cjs/src/bitget.js +184 -147
- package/dist/cjs/src/bithumb.js +23 -16
- package/dist/cjs/src/bitmart.js +106 -85
- package/dist/cjs/src/bitmex.js +104 -64
- package/dist/cjs/src/bitopro.js +38 -26
- package/dist/cjs/src/bitpanda.js +24 -23
- package/dist/cjs/src/bitrue.js +33 -24
- package/dist/cjs/src/bitso.js +24 -23
- package/dist/cjs/src/bitstamp.js +24 -23
- package/dist/cjs/src/bittrex.js +30 -29
- package/dist/cjs/src/bitvavo.js +38 -30
- package/dist/cjs/src/bl3p.js +11 -10
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +18 -17
- package/dist/cjs/src/btcbox.js +13 -12
- package/dist/cjs/src/btcmarkets.js +20 -19
- package/dist/cjs/src/btcturk.js +14 -13
- package/dist/cjs/src/bybit.js +84 -54
- package/dist/cjs/src/cex.js +16 -14
- package/dist/cjs/src/coinbase.js +29 -27
- package/dist/cjs/src/coinbasepro.js +27 -25
- package/dist/cjs/src/coincheck.js +15 -14
- package/dist/cjs/src/coinex.js +100 -77
- package/dist/cjs/src/coinlist.js +28 -27
- package/dist/cjs/src/coinmate.js +20 -17
- package/dist/cjs/src/coinone.js +21 -16
- package/dist/cjs/src/coinsph.js +37 -28
- package/dist/cjs/src/coinspot.js +12 -11
- package/dist/cjs/src/cryptocom.js +40 -202
- package/dist/cjs/src/currencycom.js +32 -25
- package/dist/cjs/src/delta.js +34 -28
- package/dist/cjs/src/deribit.js +39 -36
- package/dist/cjs/src/digifinex.js +64 -44
- package/dist/cjs/src/exmo.js +29 -27
- package/dist/cjs/src/gate.js +67 -53
- package/dist/cjs/src/gemini.js +23 -20
- package/dist/cjs/src/hitbtc.js +65 -56
- package/dist/cjs/src/hollaex.js +30 -27
- package/dist/cjs/src/htx.js +132 -143
- package/dist/cjs/src/huobijp.js +22 -20
- package/dist/cjs/src/idex.js +22 -21
- package/dist/cjs/src/independentreserve.js +15 -14
- package/dist/cjs/src/indodax.js +30 -26
- package/dist/cjs/src/kraken.js +29 -27
- package/dist/cjs/src/krakenfutures.js +29 -22
- package/dist/cjs/src/kucoin.js +48 -43
- package/dist/cjs/src/kucoinfutures.js +33 -28
- package/dist/cjs/src/kuna.js +25 -24
- package/dist/cjs/src/latoken.js +24 -22
- package/dist/cjs/src/lbank.js +45 -30
- package/dist/cjs/src/luno.js +22 -19
- package/dist/cjs/src/lykke.js +19 -17
- package/dist/cjs/src/mercado.js +30 -19
- package/dist/cjs/src/mexc.js +60 -49
- package/dist/cjs/src/ndax.js +23 -22
- package/dist/cjs/src/novadax.js +23 -22
- package/dist/cjs/src/oceanex.js +22 -19
- package/dist/cjs/src/okcoin.js +29 -23
- package/dist/cjs/src/okx.js +87 -82
- package/dist/cjs/src/p2b.js +79 -82
- package/dist/cjs/src/paymium.js +10 -10
- package/dist/cjs/src/phemex.js +63 -40
- package/dist/cjs/src/poloniex.js +22 -22
- package/dist/cjs/src/poloniexfutures.js +23 -19
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +4 -4
- package/dist/cjs/src/pro/binance.js +16 -16
- package/dist/cjs/src/pro/bingx.js +1 -1
- package/dist/cjs/src/pro/bitfinex.js +4 -4
- package/dist/cjs/src/pro/bitfinex2.js +6 -6
- package/dist/cjs/src/pro/bitget.js +7 -7
- package/dist/cjs/src/pro/bitmart.js +7 -5
- package/dist/cjs/src/pro/bitmex.js +6 -6
- package/dist/cjs/src/pro/bitopro.js +4 -4
- package/dist/cjs/src/pro/bitpanda.js +6 -6
- package/dist/cjs/src/pro/bitrue.js +2 -2
- package/dist/cjs/src/pro/bitstamp.js +6 -4
- package/dist/cjs/src/pro/bittrex.js +6 -6
- package/dist/cjs/src/pro/bitvavo.js +11 -7
- package/dist/cjs/src/pro/blockchaincom.js +8 -8
- package/dist/cjs/src/pro/bybit.js +7 -7
- package/dist/cjs/src/pro/cex.js +13 -9
- package/dist/cjs/src/pro/coinbase.js +5 -5
- package/dist/cjs/src/pro/coinbasepro.js +11 -10
- package/dist/cjs/src/pro/coinex.js +7 -9
- package/dist/cjs/src/pro/cryptocom.js +9 -9
- package/dist/cjs/src/pro/currencycom.js +4 -4
- package/dist/cjs/src/pro/deribit.js +6 -6
- package/dist/cjs/src/pro/exmo.js +12 -14
- package/dist/cjs/src/pro/gate.js +7 -7
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/hitbtc.js +263 -4
- package/dist/cjs/src/pro/hollaex.js +5 -5
- package/dist/cjs/src/pro/htx.js +6 -6
- package/dist/cjs/src/pro/huobijp.js +3 -3
- package/dist/cjs/src/pro/idex.js +4 -4
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +10 -10
- package/dist/cjs/src/pro/krakenfutures.js +41 -17
- package/dist/cjs/src/pro/kucoin.js +7 -7
- package/dist/cjs/src/pro/kucoinfutures.js +8 -6
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +6 -6
- package/dist/cjs/src/pro/ndax.js +3 -3
- package/dist/cjs/src/pro/okcoin.js +5 -5
- package/dist/cjs/src/pro/okx.js +12 -12
- package/dist/cjs/src/pro/phemex.js +6 -6
- package/dist/cjs/src/pro/poloniex.js +7 -7
- package/dist/cjs/src/pro/poloniexfutures.js +5 -5
- package/dist/cjs/src/pro/probit.js +6 -6
- package/dist/cjs/src/pro/upbit.js +3 -3
- package/dist/cjs/src/pro/wazirx.js +8 -8
- package/dist/cjs/src/pro/whitebit.js +12 -8
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/probit.js +28 -23
- package/dist/cjs/src/tidex.js +16 -15
- package/dist/cjs/src/timex.js +19 -18
- package/dist/cjs/src/tokocrypto.js +27 -22
- package/dist/cjs/src/upbit.js +19 -19
- package/dist/cjs/src/wavesexchange.js +22 -19
- package/dist/cjs/src/wazirx.js +24 -17
- package/dist/cjs/src/whitebit.js +33 -27
- package/dist/cjs/src/woo.js +44 -34
- package/dist/cjs/src/yobit.js +25 -20
- package/dist/cjs/src/zaif.js +9 -9
- package/dist/cjs/src/zonda.js +18 -17
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/cryptocom.d.ts +0 -20
- package/js/src/ace.js +18 -14
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +35 -29
- package/js/src/base/Exchange.d.ts +37 -34
- package/js/src/base/Exchange.js +39 -26
- package/js/src/base/Precise.d.ts +4 -4
- package/js/src/base/Precise.js +1 -3
- package/js/src/base/functions/type.d.ts +25 -25
- package/js/src/base/types.d.ts +21 -14
- package/js/src/bigone.js +25 -21
- package/js/src/binance.d.ts +2 -2
- package/js/src/binance.js +97 -76
- package/js/src/bingx.js +63 -44
- package/js/src/bit2c.js +19 -16
- package/js/src/bitbank.js +16 -15
- package/js/src/bitbns.js +28 -18
- package/js/src/bitfinex.js +23 -21
- package/js/src/bitfinex2.js +32 -28
- package/js/src/bitflyer.js +28 -20
- package/js/src/bitforex.js +26 -19
- package/js/src/bitget.d.ts +25 -3
- package/js/src/bitget.js +184 -147
- package/js/src/bithumb.js +23 -16
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +106 -85
- package/js/src/bitmex.d.ts +2 -2
- package/js/src/bitmex.js +104 -64
- package/js/src/bitopro.js +38 -26
- package/js/src/bitpanda.js +24 -23
- package/js/src/bitrue.js +33 -24
- package/js/src/bitso.js +24 -23
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitstamp.js +24 -23
- package/js/src/bittrex.js +30 -29
- package/js/src/bitvavo.js +38 -30
- package/js/src/bl3p.js +11 -10
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +18 -17
- package/js/src/btcbox.js +13 -12
- package/js/src/btcmarkets.js +20 -19
- package/js/src/btcturk.js +14 -13
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +84 -54
- package/js/src/cex.js +16 -14
- package/js/src/coinbase.js +29 -27
- package/js/src/coinbasepro.js +27 -25
- package/js/src/coincheck.js +15 -14
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +100 -77
- package/js/src/coinlist.js +28 -27
- package/js/src/coinmate.js +21 -18
- package/js/src/coinone.js +21 -16
- package/js/src/coinsph.js +37 -28
- package/js/src/coinspot.js +12 -11
- package/js/src/cryptocom.d.ts +0 -23
- package/js/src/cryptocom.js +40 -202
- package/js/src/currencycom.js +32 -25
- package/js/src/delta.js +35 -29
- package/js/src/deribit.js +39 -36
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/digifinex.js +65 -45
- package/js/src/exmo.js +29 -27
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +67 -53
- package/js/src/gemini.js +23 -20
- package/js/src/hitbtc.d.ts +1 -0
- package/js/src/hitbtc.js +65 -56
- package/js/src/hollaex.js +30 -27
- package/js/src/htx.d.ts +11 -3
- package/js/src/htx.js +132 -143
- package/js/src/huobijp.js +23 -21
- package/js/src/idex.js +22 -21
- package/js/src/independentreserve.js +15 -14
- package/js/src/indodax.js +30 -26
- package/js/src/kraken.js +29 -27
- package/js/src/krakenfutures.js +29 -22
- package/js/src/kucoin.d.ts +1 -1
- package/js/src/kucoin.js +48 -43
- package/js/src/kucoinfutures.js +33 -28
- package/js/src/kuna.js +25 -24
- package/js/src/latoken.js +25 -23
- package/js/src/lbank.js +46 -31
- package/js/src/luno.js +22 -19
- package/js/src/lykke.js +19 -17
- package/js/src/mercado.js +30 -19
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +60 -49
- package/js/src/ndax.js +23 -22
- package/js/src/novadax.js +23 -22
- package/js/src/oceanex.js +22 -19
- package/js/src/okcoin.js +29 -23
- package/js/src/okx.d.ts +2 -2
- package/js/src/okx.js +87 -82
- package/js/src/p2b.d.ts +8 -7
- package/js/src/p2b.js +79 -81
- package/js/src/paymium.js +10 -10
- package/js/src/phemex.js +63 -40
- package/js/src/poloniex.js +22 -22
- package/js/src/poloniexfutures.js +23 -19
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +4 -4
- package/js/src/pro/binance.js +16 -16
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/bitfinex.js +4 -4
- package/js/src/pro/bitfinex2.d.ts +1 -1
- package/js/src/pro/bitfinex2.js +6 -6
- package/js/src/pro/bitget.js +7 -7
- package/js/src/pro/bitmart.js +7 -5
- package/js/src/pro/bitmex.js +6 -6
- package/js/src/pro/bitopro.js +4 -4
- package/js/src/pro/bitpanda.js +6 -6
- package/js/src/pro/bitrue.js +2 -2
- package/js/src/pro/bitstamp.js +7 -5
- package/js/src/pro/bittrex.js +6 -6
- package/js/src/pro/bitvavo.js +12 -8
- package/js/src/pro/blockchaincom.js +8 -8
- package/js/src/pro/bybit.js +7 -7
- package/js/src/pro/cex.js +14 -10
- package/js/src/pro/coinbase.js +5 -5
- package/js/src/pro/coinbasepro.js +12 -11
- package/js/src/pro/coinex.js +7 -9
- package/js/src/pro/cryptocom.js +9 -9
- package/js/src/pro/currencycom.js +4 -4
- package/js/src/pro/deribit.js +6 -6
- package/js/src/pro/exmo.js +12 -14
- package/js/src/pro/gate.js +7 -7
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/hitbtc.d.ts +8 -1
- package/js/src/pro/hitbtc.js +264 -5
- package/js/src/pro/hollaex.js +5 -5
- package/js/src/pro/htx.js +6 -6
- package/js/src/pro/huobijp.js +3 -3
- package/js/src/pro/idex.js +4 -4
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.js +10 -10
- package/js/src/pro/krakenfutures.d.ts +1 -0
- package/js/src/pro/krakenfutures.js +42 -18
- package/js/src/pro/kucoin.js +7 -7
- package/js/src/pro/kucoinfutures.js +8 -6
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.js +6 -6
- package/js/src/pro/ndax.js +3 -3
- package/js/src/pro/okcoin.js +5 -5
- package/js/src/pro/okx.js +12 -12
- package/js/src/pro/phemex.js +6 -6
- package/js/src/pro/poloniex.js +7 -7
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/pro/probit.js +6 -6
- package/js/src/pro/upbit.js +3 -3
- package/js/src/pro/wazirx.js +8 -8
- package/js/src/pro/whitebit.js +13 -9
- package/js/src/pro/woo.js +1 -1
- package/js/src/probit.js +29 -24
- package/js/src/tidex.js +16 -15
- package/js/src/timex.js +19 -18
- package/js/src/tokocrypto.js +28 -23
- package/js/src/upbit.js +19 -19
- package/js/src/wavesexchange.js +23 -20
- package/js/src/wazirx.js +25 -18
- package/js/src/whitebit.js +33 -27
- package/js/src/woo.js +45 -35
- package/js/src/yobit.js +25 -20
- package/js/src/zaif.js +9 -9
- package/js/src/zonda.js +18 -17
- package/package.json +1 -1
package/js/src/base/Exchange.js
CHANGED
|
@@ -364,13 +364,12 @@ export default class Exchange {
|
|
|
364
364
|
'fetchBalance': true,
|
|
365
365
|
'fetchBidsAsks': undefined,
|
|
366
366
|
'fetchBorrowInterest': undefined,
|
|
367
|
-
'fetchBorrowRate': undefined,
|
|
368
367
|
'fetchBorrowRateHistory': undefined,
|
|
369
|
-
'fetchBorrowRatesPerSymbol': undefined,
|
|
370
|
-
'fetchBorrowRates': undefined,
|
|
371
368
|
'fetchCanceledOrders': undefined,
|
|
372
369
|
'fetchClosedOrder': undefined,
|
|
373
370
|
'fetchClosedOrders': undefined,
|
|
371
|
+
'fetchCrossBorrowRate': undefined,
|
|
372
|
+
'fetchCrossBorrowRates': undefined,
|
|
374
373
|
'fetchCurrencies': 'emulated',
|
|
375
374
|
'fetchDeposit': undefined,
|
|
376
375
|
'fetchDepositAddress': undefined,
|
|
@@ -385,6 +384,8 @@ export default class Exchange {
|
|
|
385
384
|
'fetchFundingRateHistory': undefined,
|
|
386
385
|
'fetchFundingRates': undefined,
|
|
387
386
|
'fetchIndexOHLCV': undefined,
|
|
387
|
+
'fetchIsolatedBorrowRate': undefined,
|
|
388
|
+
'fetchIsolatedBorrowRates': undefined,
|
|
388
389
|
'fetchL2OrderBook': true,
|
|
389
390
|
'fetchLastPrices': undefined,
|
|
390
391
|
'fetchLedger': undefined,
|
|
@@ -1406,8 +1407,11 @@ export default class Exchange {
|
|
|
1406
1407
|
parseOrder(order, market = undefined) {
|
|
1407
1408
|
throw new NotSupported(this.id + ' parseOrder() is not supported yet');
|
|
1408
1409
|
}
|
|
1409
|
-
async
|
|
1410
|
-
throw new NotSupported(this.id + '
|
|
1410
|
+
async fetchCrossBorrowRates(params = {}) {
|
|
1411
|
+
throw new NotSupported(this.id + ' fetchCrossBorrowRates() is not supported yet');
|
|
1412
|
+
}
|
|
1413
|
+
async fetchIsolatedBorrowRates(params = {}) {
|
|
1414
|
+
throw new NotSupported(this.id + ' fetchIsolatedBorrowRates() is not supported yet');
|
|
1411
1415
|
}
|
|
1412
1416
|
parseMarketLeverageTiers(info, market = undefined) {
|
|
1413
1417
|
throw new NotSupported(this.id + ' parseMarketLeverageTiers() is not supported yet');
|
|
@@ -1461,14 +1465,20 @@ export default class Exchange {
|
|
|
1461
1465
|
parseToNumeric(number) {
|
|
1462
1466
|
const stringVersion = this.numberToString(number); // this will convert 1.0 and 1 to "1" and 1.1 to "1.1"
|
|
1463
1467
|
// keep this in mind:
|
|
1464
|
-
// in JS: 1 == 1.0 is true
|
|
1468
|
+
// in JS: 1 == 1.0 is true; 1 === 1.0 is true
|
|
1465
1469
|
// in Python: 1 == 1.0 is true
|
|
1466
|
-
// in PHP 1 == 1.0 is false
|
|
1467
|
-
if (stringVersion.indexOf('.')
|
|
1470
|
+
// in PHP 1 == 1.0 is true, but 1 === 1.0 is false
|
|
1471
|
+
if (stringVersion.indexOf('.') >= 0) {
|
|
1468
1472
|
return parseFloat(stringVersion);
|
|
1469
1473
|
}
|
|
1470
1474
|
return parseInt(stringVersion);
|
|
1471
1475
|
}
|
|
1476
|
+
isRoundNumber(value) {
|
|
1477
|
+
// this method is similar to isInteger, but this is more loyal and does not check for types.
|
|
1478
|
+
// i.e. isRoundNumber(1.000) returns true, while isInteger(1.000) returns false
|
|
1479
|
+
const res = this.parseToNumeric((value % 1));
|
|
1480
|
+
return res === 0;
|
|
1481
|
+
}
|
|
1472
1482
|
afterConstruct() {
|
|
1473
1483
|
this.createNetworksByIdObject();
|
|
1474
1484
|
}
|
|
@@ -2994,7 +3004,7 @@ export default class Exchange {
|
|
|
2994
3004
|
* @description specifically fetches positions for specific symbol, unlike fetchPositions (which can work with multiple symbols, but because of that, it might be slower & more rate-limit consuming)
|
|
2995
3005
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
2996
3006
|
* @param {object} params extra parameters specific to the endpoint
|
|
2997
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
3007
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure} with maximum 3 items - one position for "one-way" mode, and two positions (long & short) for "two-way" (a.k.a. hedge) mode
|
|
2998
3008
|
*/
|
|
2999
3009
|
throw new NotSupported(this.id + ' fetchPositionsBySymbol() is not supported yet');
|
|
3000
3010
|
}
|
|
@@ -3171,15 +3181,27 @@ export default class Exchange {
|
|
|
3171
3181
|
throw new NotSupported(this.id + ' ' + key + ' does not have a value in mapping');
|
|
3172
3182
|
}
|
|
3173
3183
|
}
|
|
3174
|
-
async
|
|
3184
|
+
async fetchCrossBorrowRate(code, params = {}) {
|
|
3175
3185
|
await this.loadMarkets();
|
|
3176
3186
|
if (!this.has['fetchBorrowRates']) {
|
|
3177
|
-
throw new NotSupported(this.id + '
|
|
3187
|
+
throw new NotSupported(this.id + ' fetchCrossBorrowRate() is not supported yet');
|
|
3178
3188
|
}
|
|
3179
|
-
const borrowRates = await this.
|
|
3189
|
+
const borrowRates = await this.fetchCrossBorrowRates(params);
|
|
3180
3190
|
const rate = this.safeValue(borrowRates, code);
|
|
3181
3191
|
if (rate === undefined) {
|
|
3182
|
-
throw new ExchangeError(this.id + '
|
|
3192
|
+
throw new ExchangeError(this.id + ' fetchCrossBorrowRate() could not find the borrow rate for currency code ' + code);
|
|
3193
|
+
}
|
|
3194
|
+
return rate;
|
|
3195
|
+
}
|
|
3196
|
+
async fetchIsolatedBorrowRate(symbol, params = {}) {
|
|
3197
|
+
await this.loadMarkets();
|
|
3198
|
+
if (!this.has['fetchBorrowRates']) {
|
|
3199
|
+
throw new NotSupported(this.id + ' fetchIsolatedBorrowRate() is not supported yet');
|
|
3200
|
+
}
|
|
3201
|
+
const borrowRates = await this.fetchIsolatedBorrowRates(params);
|
|
3202
|
+
const rate = this.safeValue(borrowRates, symbol);
|
|
3203
|
+
if (rate === undefined) {
|
|
3204
|
+
throw new ExchangeError(this.id + ' fetchIsolatedBorrowRate() could not find the borrow rate for market symbol ' + symbol);
|
|
3183
3205
|
}
|
|
3184
3206
|
return rate;
|
|
3185
3207
|
}
|
|
@@ -3417,7 +3439,7 @@ export default class Exchange {
|
|
|
3417
3439
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
3418
3440
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
3419
3441
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
3420
|
-
* @returns {object} a list of [transaction structures]{@link https://
|
|
3442
|
+
* @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3421
3443
|
*/
|
|
3422
3444
|
throw new NotSupported(this.id + ' fetchDepositsWithdrawals() is not supported yet');
|
|
3423
3445
|
}
|
|
@@ -4071,15 +4093,6 @@ export default class Exchange {
|
|
|
4071
4093
|
throw new ArgumentsRequired(this.id + ' ' + methodName + '() cannot have a symbol argument for cross margin');
|
|
4072
4094
|
}
|
|
4073
4095
|
}
|
|
4074
|
-
checkRequiredSymbol(methodName, symbol) {
|
|
4075
|
-
/**
|
|
4076
|
-
* @ignore
|
|
4077
|
-
* @method
|
|
4078
|
-
* @param {string} symbol unified symbol of the market
|
|
4079
|
-
* @param {string} methodName name of the method that requires a symbol
|
|
4080
|
-
*/
|
|
4081
|
-
this.checkRequiredArgument(methodName, symbol, 'symbol');
|
|
4082
|
-
}
|
|
4083
4096
|
parseDepositWithdrawFees(response, codes = undefined, currencyIdKey = undefined) {
|
|
4084
4097
|
/**
|
|
4085
4098
|
* @ignore
|
|
@@ -4163,7 +4176,7 @@ export default class Exchange {
|
|
|
4163
4176
|
* @param {object} market ccxt market
|
|
4164
4177
|
* @param {int} [since] when defined, the response items are filtered to only include items after this timestamp
|
|
4165
4178
|
* @param {int} [limit] limits the number of items in the response
|
|
4166
|
-
* @returns {object[]} an array of [funding history structures]{@link https://
|
|
4179
|
+
* @returns {object[]} an array of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4167
4180
|
*/
|
|
4168
4181
|
const result = [];
|
|
4169
4182
|
for (let i = 0; i < incomes.length; i++) {
|
|
@@ -4199,7 +4212,7 @@ export default class Exchange {
|
|
|
4199
4212
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
4200
4213
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
4201
4214
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
4202
|
-
* @returns {object} a list of [transaction structures]{@link https://
|
|
4215
|
+
* @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4203
4216
|
*/
|
|
4204
4217
|
if (this.has['fetchDepositsWithdrawals']) {
|
|
4205
4218
|
return await this.fetchDepositsWithdrawals(code, since, limit, params);
|
|
@@ -4554,7 +4567,7 @@ export default class Exchange {
|
|
|
4554
4567
|
* @param {object} market ccxt market
|
|
4555
4568
|
* @param {int} [since] when defined, the response items are filtered to only include items after this timestamp
|
|
4556
4569
|
* @param {int} [limit] limits the number of items in the response
|
|
4557
|
-
* @returns {object[]} an array of [liquidation structures]{@link https://
|
|
4570
|
+
* @returns {object[]} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
4558
4571
|
*/
|
|
4559
4572
|
const result = [];
|
|
4560
4573
|
for (let i = 0; i < liquidations.length; i++) {
|
package/js/src/base/Precise.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Str } from
|
|
1
|
+
import { Str, Int } from './types';
|
|
2
2
|
declare class Precise {
|
|
3
|
-
decimals:
|
|
4
|
-
integer:
|
|
3
|
+
decimals: number;
|
|
4
|
+
integer: bigint;
|
|
5
5
|
base: any;
|
|
6
|
-
constructor(number: any, decimals?:
|
|
6
|
+
constructor(number: any, decimals?: Int);
|
|
7
7
|
mul(other: any): Precise;
|
|
8
8
|
div(other: any, precision?: number): Precise;
|
|
9
9
|
add(other: any): Precise;
|
package/js/src/base/Precise.js
CHANGED
|
@@ -9,8 +9,6 @@ const minusOne = BigInt(-1);
|
|
|
9
9
|
const base = BigInt(10);
|
|
10
10
|
class Precise {
|
|
11
11
|
constructor(number, decimals = undefined) {
|
|
12
|
-
this.decimals = undefined;
|
|
13
|
-
this.integer = undefined;
|
|
14
12
|
this.base = undefined;
|
|
15
13
|
if (decimals === undefined) {
|
|
16
14
|
let modifier = 0;
|
|
@@ -37,7 +35,7 @@ class Precise {
|
|
|
37
35
|
}
|
|
38
36
|
div(other, precision = 18) {
|
|
39
37
|
const distance = precision - this.decimals + other.decimals;
|
|
40
|
-
let numerator
|
|
38
|
+
let numerator;
|
|
41
39
|
if (distance === 0) {
|
|
42
40
|
numerator = this.integer;
|
|
43
41
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { implicitReturnType, Int, Str } from '../types.js';
|
|
1
|
+
import { implicitReturnType, Int, Str, IndexType } from '../types.js';
|
|
2
2
|
declare const isNumber: (number: unknown) => boolean;
|
|
3
3
|
declare const isInteger: (number: unknown) => boolean;
|
|
4
4
|
declare const isArray: (arg: any) => arg is any[];
|
|
@@ -10,28 +10,28 @@ declare const isStringCoercible: (x: any) => any;
|
|
|
10
10
|
declare const prop: (o: any, k: any) => any;
|
|
11
11
|
declare const asFloat: (x: any) => number;
|
|
12
12
|
declare const asInteger: (x: any) => number;
|
|
13
|
-
declare const safeFloat: (o: implicitReturnType, k:
|
|
14
|
-
declare const safeInteger: (o: implicitReturnType, k:
|
|
15
|
-
declare const safeIntegerProduct: (o: implicitReturnType, k:
|
|
16
|
-
declare const safeTimestamp: (o: implicitReturnType, k:
|
|
17
|
-
declare const safeValue: (o: implicitReturnType, k:
|
|
18
|
-
declare const safeString: (o: implicitReturnType, k:
|
|
19
|
-
declare const safeStringLower: (o: implicitReturnType, k:
|
|
20
|
-
declare const safeStringUpper: (o: implicitReturnType, k:
|
|
21
|
-
declare const safeFloat2: (o: implicitReturnType, k1:
|
|
22
|
-
declare const safeInteger2: (o: implicitReturnType, k1:
|
|
23
|
-
declare const safeIntegerProduct2: (o: implicitReturnType, k1:
|
|
24
|
-
declare const safeTimestamp2: (o: implicitReturnType, k1:
|
|
25
|
-
declare const safeValue2: (o: implicitReturnType, k1:
|
|
26
|
-
declare const safeString2: (o: implicitReturnType, k1:
|
|
27
|
-
declare const safeStringLower2: (o: implicitReturnType, k1:
|
|
28
|
-
declare const safeStringUpper2: (o: implicitReturnType, k1:
|
|
29
|
-
declare const safeFloatN: (o: implicitReturnType, k: (
|
|
30
|
-
declare const safeIntegerN: (o: implicitReturnType, k: (
|
|
31
|
-
declare const safeIntegerProductN: (o: implicitReturnType, k: (
|
|
32
|
-
declare const safeTimestampN: (o: implicitReturnType, k: (
|
|
33
|
-
declare const safeValueN: (o: implicitReturnType, k: (
|
|
34
|
-
declare const safeStringN: (o: implicitReturnType, k: (
|
|
35
|
-
declare const safeStringLowerN: (o: implicitReturnType, k: (
|
|
36
|
-
declare const safeStringUpperN: (o: implicitReturnType, k: (
|
|
13
|
+
declare const safeFloat: (o: implicitReturnType, k: IndexType, $default?: number) => number;
|
|
14
|
+
declare const safeInteger: (o: implicitReturnType, k: IndexType, $default?: number) => Int;
|
|
15
|
+
declare const safeIntegerProduct: (o: implicitReturnType, k: IndexType, $factor: number, $default?: number) => Int;
|
|
16
|
+
declare const safeTimestamp: (o: implicitReturnType, k: IndexType, $default?: number) => number;
|
|
17
|
+
declare const safeValue: (o: implicitReturnType, k: IndexType, $default?: any) => any;
|
|
18
|
+
declare const safeString: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
|
|
19
|
+
declare const safeStringLower: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
|
|
20
|
+
declare const safeStringUpper: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
|
|
21
|
+
declare const safeFloat2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: number) => number;
|
|
22
|
+
declare const safeInteger2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: number) => Int;
|
|
23
|
+
declare const safeIntegerProduct2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $factor: number, $default?: number) => Int;
|
|
24
|
+
declare const safeTimestamp2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: any) => Int;
|
|
25
|
+
declare const safeValue2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: any) => any;
|
|
26
|
+
declare const safeString2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
|
|
27
|
+
declare const safeStringLower2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
|
|
28
|
+
declare const safeStringUpper2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
|
|
29
|
+
declare const safeFloatN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => number;
|
|
30
|
+
declare const safeIntegerN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => Int;
|
|
31
|
+
declare const safeIntegerProductN: (o: implicitReturnType, k: (IndexType)[], $factor: number, $default?: number) => Int;
|
|
32
|
+
declare const safeTimestampN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => Int;
|
|
33
|
+
declare const safeValueN: (o: implicitReturnType, k: (IndexType)[], $default?: any) => any;
|
|
34
|
+
declare const safeStringN: (o: implicitReturnType, k: (IndexType)[], $default?: string) => Str;
|
|
35
|
+
declare const safeStringLowerN: (o: implicitReturnType, k: (IndexType)[], $default?: string) => Str;
|
|
36
|
+
declare const safeStringUpperN: (o: implicitReturnType, k: (IndexType)[], $default?: string) => Str;
|
|
37
37
|
export { isNumber, isInteger, isArray, isObject, isString, isStringCoercible, isDictionary, hasProps, prop, asFloat, asInteger, safeFloat, safeInteger, safeIntegerProduct, safeTimestamp, safeValue, safeString, safeStringLower, safeStringUpper, safeFloat2, safeInteger2, safeIntegerProduct2, safeTimestamp2, safeValue2, safeString2, safeStringLower2, safeStringUpper2, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, };
|
package/js/src/base/types.d.ts
CHANGED
|
@@ -3,8 +3,10 @@ export declare type Str = string | undefined;
|
|
|
3
3
|
export declare type Strings = string[] | undefined;
|
|
4
4
|
export declare type Num = number | undefined;
|
|
5
5
|
export declare type Bool = boolean | undefined;
|
|
6
|
-
export declare type
|
|
7
|
-
export declare type
|
|
6
|
+
export declare type IndexType = number | string;
|
|
7
|
+
export declare type OrderSide = 'buy' | 'sell' | string;
|
|
8
|
+
export declare type OrderType = 'limit' | 'market' | string;
|
|
9
|
+
export declare type MarketType = 'spot' | 'margin' | 'swap' | 'future' | 'option';
|
|
8
10
|
export interface Dictionary<T> {
|
|
9
11
|
[key: string]: T;
|
|
10
12
|
}
|
|
@@ -13,12 +15,12 @@ export interface MinMax {
|
|
|
13
15
|
min: Num;
|
|
14
16
|
max: Num;
|
|
15
17
|
}
|
|
16
|
-
export interface
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
rate?:
|
|
20
|
-
cost: number;
|
|
18
|
+
export interface FeeInterface {
|
|
19
|
+
currency: Str;
|
|
20
|
+
cost: Num;
|
|
21
|
+
rate?: Num;
|
|
21
22
|
}
|
|
23
|
+
export declare type Fee = FeeInterface | undefined;
|
|
22
24
|
export interface MarketInterface {
|
|
23
25
|
id: string;
|
|
24
26
|
uppercaseId?: string;
|
|
@@ -29,7 +31,7 @@ export interface MarketInterface {
|
|
|
29
31
|
baseId: string;
|
|
30
32
|
quoteId: string;
|
|
31
33
|
active: Bool;
|
|
32
|
-
type:
|
|
34
|
+
type: MarketType;
|
|
33
35
|
spot: boolean;
|
|
34
36
|
margin: boolean;
|
|
35
37
|
swap: boolean;
|
|
@@ -164,9 +166,15 @@ export interface CurrencyInterface {
|
|
|
164
166
|
precision: number;
|
|
165
167
|
}
|
|
166
168
|
export interface Balance {
|
|
167
|
-
free:
|
|
168
|
-
used:
|
|
169
|
-
total:
|
|
169
|
+
free: Num;
|
|
170
|
+
used: Num;
|
|
171
|
+
total: Num;
|
|
172
|
+
debt?: Num;
|
|
173
|
+
}
|
|
174
|
+
export interface Account {
|
|
175
|
+
free: Str;
|
|
176
|
+
used: Str;
|
|
177
|
+
total: Str;
|
|
170
178
|
}
|
|
171
179
|
export interface PartialBalances extends Dictionary<number> {
|
|
172
180
|
}
|
|
@@ -295,6 +303,5 @@ export declare type OHLCV = [Num, Num, Num, Num, Num, Num];
|
|
|
295
303
|
/** [ timestamp, open, high, low, close, volume, count ] */
|
|
296
304
|
export declare type OHLCVC = [Num, Num, Num, Num, Num, Num, Num];
|
|
297
305
|
export declare type implicitReturnType = any;
|
|
298
|
-
export declare type
|
|
299
|
-
export declare type
|
|
300
|
-
export declare type OrderType = 'limit' | 'market' | string;
|
|
306
|
+
export declare type Market = MarketInterface | undefined;
|
|
307
|
+
export declare type Currency = CurrencyInterface | undefined;
|
package/js/src/bigone.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import Exchange from './abstract/bigone.js';
|
|
9
|
-
import { ExchangeError, AuthenticationError, InsufficientFunds, PermissionDenied, BadRequest, BadSymbol, RateLimitExceeded, InvalidOrder } from './base/errors.js';
|
|
9
|
+
import { ExchangeError, AuthenticationError, InsufficientFunds, PermissionDenied, BadRequest, BadSymbol, RateLimitExceeded, InvalidOrder, ArgumentsRequired } from './base/errors.js';
|
|
10
10
|
import { TICK_SIZE } from './base/functions/number.js';
|
|
11
11
|
import { jwt } from './base/functions/rsa.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
@@ -622,7 +622,7 @@ export default class bigone extends Exchange {
|
|
|
622
622
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
623
623
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
624
624
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
625
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
625
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
626
626
|
*/
|
|
627
627
|
await this.loadMarkets();
|
|
628
628
|
const market = this.market(symbol);
|
|
@@ -656,7 +656,7 @@ export default class bigone extends Exchange {
|
|
|
656
656
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
657
657
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
658
658
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
659
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
659
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
660
660
|
*/
|
|
661
661
|
await this.loadMarkets();
|
|
662
662
|
const request = {};
|
|
@@ -732,7 +732,7 @@ export default class bigone extends Exchange {
|
|
|
732
732
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
733
733
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
734
734
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
735
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
735
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
736
736
|
*/
|
|
737
737
|
await this.loadMarkets();
|
|
738
738
|
const market = this.market(symbol);
|
|
@@ -914,7 +914,7 @@ export default class bigone extends Exchange {
|
|
|
914
914
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
915
915
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
916
916
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
917
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
917
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
918
918
|
*/
|
|
919
919
|
await this.loadMarkets();
|
|
920
920
|
const market = this.market(symbol);
|
|
@@ -1045,7 +1045,7 @@ export default class bigone extends Exchange {
|
|
|
1045
1045
|
* @name bigone#fetchBalance
|
|
1046
1046
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1047
1047
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1048
|
-
* @returns {object} a [balance structure]{@link https://
|
|
1048
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1049
1049
|
*/
|
|
1050
1050
|
await this.loadMarkets();
|
|
1051
1051
|
const type = this.safeString(params, 'type', '');
|
|
@@ -1174,7 +1174,7 @@ export default class bigone extends Exchange {
|
|
|
1174
1174
|
* EXCHANGE SPECIFIC PARAMETERS
|
|
1175
1175
|
* @param {string} operator *stop order only* GTE or LTE (default)
|
|
1176
1176
|
* @param {string} client_order_id must match ^[a-zA-Z0-9-_]{1,36}$ this regex. client_order_id is unique in 24 hours, If created 24 hours later and the order closed, it will be released and can be reused
|
|
1177
|
-
* @returns {object} an [order structure]{@link https://
|
|
1177
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1178
1178
|
*/
|
|
1179
1179
|
await this.loadMarkets();
|
|
1180
1180
|
const market = this.market(symbol);
|
|
@@ -1259,7 +1259,7 @@ export default class bigone extends Exchange {
|
|
|
1259
1259
|
* @param {string} id order id
|
|
1260
1260
|
* @param {string} symbol Not used by bigone cancelOrder ()
|
|
1261
1261
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1262
|
-
* @returns {object} An [order structure]{@link https://
|
|
1262
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1263
1263
|
*/
|
|
1264
1264
|
await this.loadMarkets();
|
|
1265
1265
|
const request = { 'id': id };
|
|
@@ -1286,7 +1286,7 @@ export default class bigone extends Exchange {
|
|
|
1286
1286
|
* @description cancel all open orders
|
|
1287
1287
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1288
1288
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1289
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1289
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1290
1290
|
*/
|
|
1291
1291
|
await this.loadMarkets();
|
|
1292
1292
|
const market = this.market(symbol);
|
|
@@ -1315,7 +1315,7 @@ export default class bigone extends Exchange {
|
|
|
1315
1315
|
* @description fetches information on an order made by the user
|
|
1316
1316
|
* @param {string} symbol not used by bigone fetchOrder
|
|
1317
1317
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1318
|
-
* @returns {object} An [order structure]{@link https://
|
|
1318
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1319
1319
|
*/
|
|
1320
1320
|
await this.loadMarkets();
|
|
1321
1321
|
const request = { 'id': id };
|
|
@@ -1332,9 +1332,11 @@ export default class bigone extends Exchange {
|
|
|
1332
1332
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1333
1333
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1334
1334
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1335
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1335
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1336
1336
|
*/
|
|
1337
|
-
|
|
1337
|
+
if (symbol === undefined) {
|
|
1338
|
+
throw new ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument');
|
|
1339
|
+
}
|
|
1338
1340
|
await this.loadMarkets();
|
|
1339
1341
|
const market = this.market(symbol);
|
|
1340
1342
|
const request = {
|
|
@@ -1380,9 +1382,11 @@ export default class bigone extends Exchange {
|
|
|
1380
1382
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1381
1383
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1382
1384
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1383
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
1385
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1384
1386
|
*/
|
|
1385
|
-
|
|
1387
|
+
if (symbol === undefined) {
|
|
1388
|
+
throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
1389
|
+
}
|
|
1386
1390
|
await this.loadMarkets();
|
|
1387
1391
|
const market = this.market(symbol);
|
|
1388
1392
|
const request = {
|
|
@@ -1447,7 +1451,7 @@ export default class bigone extends Exchange {
|
|
|
1447
1451
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1448
1452
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1449
1453
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1450
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1454
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1451
1455
|
*/
|
|
1452
1456
|
const request = {
|
|
1453
1457
|
'state': 'PENDING',
|
|
@@ -1463,7 +1467,7 @@ export default class bigone extends Exchange {
|
|
|
1463
1467
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1464
1468
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1465
1469
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1466
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1470
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1467
1471
|
*/
|
|
1468
1472
|
const request = {
|
|
1469
1473
|
'state': 'FILLED',
|
|
@@ -1515,7 +1519,7 @@ export default class bigone extends Exchange {
|
|
|
1515
1519
|
* @description fetch the deposit address for a currency associated with this account
|
|
1516
1520
|
* @param {string} code unified currency code
|
|
1517
1521
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1518
|
-
* @returns {object} an [address structure]{@link https://
|
|
1522
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1519
1523
|
*/
|
|
1520
1524
|
await this.loadMarkets();
|
|
1521
1525
|
const currency = this.currency(code);
|
|
@@ -1667,7 +1671,7 @@ export default class bigone extends Exchange {
|
|
|
1667
1671
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1668
1672
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1669
1673
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1670
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1674
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1671
1675
|
*/
|
|
1672
1676
|
await this.loadMarkets();
|
|
1673
1677
|
const request = {
|
|
@@ -1718,7 +1722,7 @@ export default class bigone extends Exchange {
|
|
|
1718
1722
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1719
1723
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1720
1724
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1721
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1725
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1722
1726
|
*/
|
|
1723
1727
|
await this.loadMarkets();
|
|
1724
1728
|
const request = {
|
|
@@ -1771,7 +1775,7 @@ export default class bigone extends Exchange {
|
|
|
1771
1775
|
* @param {string} fromAccount 'SPOT', 'FUND', or 'CONTRACT'
|
|
1772
1776
|
* @param {string} toAccount 'SPOT', 'FUND', or 'CONTRACT'
|
|
1773
1777
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1774
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
1778
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1775
1779
|
*/
|
|
1776
1780
|
await this.loadMarkets();
|
|
1777
1781
|
const currency = this.currency(code);
|
|
@@ -1842,7 +1846,7 @@ export default class bigone extends Exchange {
|
|
|
1842
1846
|
* @param {string} address the address to withdraw to
|
|
1843
1847
|
* @param {string} tag
|
|
1844
1848
|
* @param {object} [params] extra parameters specific to the bigone api endpoint
|
|
1845
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1849
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1846
1850
|
*/
|
|
1847
1851
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1848
1852
|
await this.loadMarkets();
|
package/js/src/binance.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export default class binance extends Exchange {
|
|
|
20
20
|
fetchCurrencies(params?: {}): Promise<{}>;
|
|
21
21
|
fetchMarkets(params?: {}): Promise<any[]>;
|
|
22
22
|
parseMarket(market: any): Market;
|
|
23
|
-
parseBalanceHelper(entry: any): import("./base/types.js").
|
|
23
|
+
parseBalanceHelper(entry: any): import("./base/types.js").Account;
|
|
24
24
|
parseBalance(response: any, type?: any, marginMode?: any): Balances;
|
|
25
25
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
26
26
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
@@ -318,7 +318,7 @@ export default class binance extends Exchange {
|
|
|
318
318
|
};
|
|
319
319
|
reduceMargin(symbol: string, amount: any, params?: {}): Promise<any>;
|
|
320
320
|
addMargin(symbol: string, amount: any, params?: {}): Promise<any>;
|
|
321
|
-
|
|
321
|
+
fetchCrossBorrowRate(code: string, params?: {}): Promise<{
|
|
322
322
|
currency: string;
|
|
323
323
|
rate: number;
|
|
324
324
|
period: number;
|