ccxt 4.4.2 → 4.4.4
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 +4 -4
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/base/functions/misc.js +11 -0
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/base/ws/WsClient.js +2 -1
- package/dist/cjs/src/binance.js +49 -22
- package/dist/cjs/src/bingx.js +1 -0
- package/dist/cjs/src/bitfinex2.js +7 -6
- package/dist/cjs/src/bitget.js +10 -6
- package/dist/cjs/src/bitmart.js +3 -1
- package/dist/cjs/src/bitmex.js +11 -10
- package/dist/cjs/src/bitso.js +5 -4
- package/dist/cjs/src/bitstamp.js +33 -45
- package/dist/cjs/src/blofin.js +21 -23
- package/dist/cjs/src/bybit.js +22 -20
- package/dist/cjs/src/coinbase.js +28 -7
- package/dist/cjs/src/coinbaseexchange.js +11 -11
- package/dist/cjs/src/coinlist.js +6 -5
- package/dist/cjs/src/coinmetro.js +3 -3
- package/dist/cjs/src/cryptocom.js +9 -6
- package/dist/cjs/src/currencycom.js +6 -6
- package/dist/cjs/src/delta.js +5 -5
- package/dist/cjs/src/digifinex.js +8 -6
- package/dist/cjs/src/gate.js +6 -5
- package/dist/cjs/src/hashkey.js +9 -7
- package/dist/cjs/src/htx.js +13 -16
- package/dist/cjs/src/hyperliquid.js +67 -114
- package/dist/cjs/src/kraken.js +8 -6
- package/dist/cjs/src/kucoin.js +9 -8
- package/dist/cjs/src/luno.js +10 -9
- package/dist/cjs/src/mexc.js +54 -2
- package/dist/cjs/src/ndax.js +6 -5
- package/dist/cjs/src/okcoin.js +18 -27
- package/dist/cjs/src/okx.js +18 -26
- package/dist/cjs/src/p2b.js +2 -2
- package/dist/cjs/src/pro/bybit.js +56 -0
- package/dist/cjs/src/pro/cryptocom.js +191 -21
- package/dist/cjs/src/pro/mexc.js +165 -3
- package/dist/cjs/src/pro/okx.js +6 -3
- package/dist/cjs/src/pro/oxfun.js +75 -0
- package/dist/cjs/src/pro/phemex.js +45 -1
- package/dist/cjs/src/pro/woofipro.js +67 -0
- package/dist/cjs/src/woo.js +7 -6
- package/dist/cjs/src/woofipro.js +8 -6
- package/dist/cjs/src/xt.js +10 -4
- package/dist/cjs/src/zonda.js +6 -5
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +2 -2
- package/js/src/base/Exchange.js +2 -2
- package/js/src/base/functions/misc.d.ts +2 -1
- package/js/src/base/functions/misc.js +11 -1
- package/js/src/base/types.d.ts +1 -1
- package/js/src/base/ws/WsClient.js +2 -2
- package/js/src/binance.d.ts +4 -20
- package/js/src/binance.js +49 -22
- package/js/src/bingx.js +1 -0
- package/js/src/bitfinex2.d.ts +3 -19
- package/js/src/bitfinex2.js +7 -6
- package/js/src/bitget.d.ts +3 -19
- package/js/src/bitget.js +10 -6
- package/js/src/bitmart.js +3 -1
- package/js/src/bitmex.d.ts +3 -22
- package/js/src/bitmex.js +11 -10
- package/js/src/bitso.d.ts +3 -19
- package/js/src/bitso.js +5 -4
- package/js/src/bitstamp.d.ts +3 -35
- package/js/src/bitstamp.js +33 -45
- package/js/src/blofin.d.ts +3 -15
- package/js/src/blofin.js +21 -23
- package/js/src/bybit.d.ts +3 -19
- package/js/src/bybit.js +23 -21
- package/js/src/coinbase.d.ts +3 -19
- package/js/src/coinbase.js +28 -7
- package/js/src/coinbaseexchange.d.ts +3 -19
- package/js/src/coinbaseexchange.js +11 -11
- package/js/src/coinlist.d.ts +3 -19
- package/js/src/coinlist.js +6 -5
- package/js/src/coinmetro.d.ts +3 -19
- package/js/src/coinmetro.js +3 -3
- package/js/src/cryptocom.d.ts +3 -22
- package/js/src/cryptocom.js +9 -6
- package/js/src/currencycom.d.ts +3 -3
- package/js/src/currencycom.js +6 -6
- package/js/src/delta.d.ts +3 -19
- package/js/src/delta.js +5 -5
- package/js/src/digifinex.d.ts +3 -19
- package/js/src/digifinex.js +8 -6
- package/js/src/gate.d.ts +3 -19
- package/js/src/gate.js +6 -5
- package/js/src/hashkey.d.ts +3 -20
- package/js/src/hashkey.js +9 -7
- package/js/src/htx.d.ts +3 -19
- package/js/src/htx.js +13 -16
- package/js/src/hyperliquid.d.ts +3 -19
- package/js/src/hyperliquid.js +68 -115
- package/js/src/kraken.d.ts +5 -24
- package/js/src/kraken.js +8 -6
- package/js/src/kucoin.d.ts +3 -19
- package/js/src/kucoin.js +9 -8
- package/js/src/luno.d.ts +4 -20
- package/js/src/luno.js +10 -9
- package/js/src/mexc.js +54 -2
- package/js/src/ndax.d.ts +3 -19
- package/js/src/ndax.js +6 -5
- package/js/src/okcoin.d.ts +3 -19
- package/js/src/okcoin.js +18 -27
- package/js/src/okx.d.ts +3 -19
- package/js/src/okx.js +18 -26
- package/js/src/p2b.js +2 -2
- package/js/src/pro/bybit.d.ts +2 -0
- package/js/src/pro/bybit.js +56 -0
- package/js/src/pro/cryptocom.d.ts +7 -1
- package/js/src/pro/cryptocom.js +191 -21
- package/js/src/pro/mexc.d.ts +6 -1
- package/js/src/pro/mexc.js +166 -4
- package/js/src/pro/okx.js +6 -3
- package/js/src/pro/oxfun.d.ts +3 -0
- package/js/src/pro/oxfun.js +75 -0
- package/js/src/pro/phemex.d.ts +2 -1
- package/js/src/pro/phemex.js +45 -1
- package/js/src/pro/woofipro.d.ts +3 -0
- package/js/src/pro/woofipro.js +67 -0
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
- package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +1 -1
- package/js/src/woo.d.ts +3 -19
- package/js/src/woo.js +7 -6
- package/js/src/woofipro.d.ts +3 -19
- package/js/src/woofipro.js +8 -6
- package/js/src/xt.d.ts +3 -22
- package/js/src/xt.js +10 -4
- package/js/src/zonda.d.ts +3 -19
- package/js/src/zonda.js +6 -5
- package/package.json +1 -1
package/dist/cjs/src/blofin.js
CHANGED
|
@@ -1503,15 +1503,15 @@ class blofin extends blofin$1 {
|
|
|
1503
1503
|
/**
|
|
1504
1504
|
* @method
|
|
1505
1505
|
* @name blofin#fetchLedger
|
|
1506
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
1506
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1507
1507
|
* @see https://blofin.com/docs#get-funds-transfer-history
|
|
1508
|
-
* @param {string} code unified currency code, default is undefined
|
|
1508
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
1509
1509
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1510
|
-
* @param {int} [limit] max number of ledger
|
|
1510
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1511
1511
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1512
1512
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
1513
1513
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1514
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
1514
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1515
1515
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1516
1516
|
*/
|
|
1517
1517
|
await this.loadMarkets();
|
|
@@ -1647,29 +1647,27 @@ class blofin extends blofin$1 {
|
|
|
1647
1647
|
return this.safeString(types, type, type);
|
|
1648
1648
|
}
|
|
1649
1649
|
parseLedgerEntry(item, currency = undefined) {
|
|
1650
|
-
const
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1653
|
-
const toAccount = this.safeString(item, 'toAccount');
|
|
1654
|
-
const type = this.parseLedgerEntryType(this.safeString(item, 'type'));
|
|
1655
|
-
const code = this.safeCurrencyCode(this.safeString(item, 'currency'), currency);
|
|
1656
|
-
const amountString = this.safeString(item, 'amount');
|
|
1657
|
-
const amount = this.parseNumber(amountString);
|
|
1650
|
+
const currencyId = this.safeString(item, 'currency');
|
|
1651
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1652
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
1658
1653
|
const timestamp = this.safeInteger(item, 'ts');
|
|
1659
|
-
|
|
1660
|
-
return {
|
|
1661
|
-
'id': id,
|
|
1654
|
+
return this.safeLedgerEntry({
|
|
1662
1655
|
'info': item,
|
|
1656
|
+
'id': this.safeString(item, 'transferId'),
|
|
1657
|
+
'direction': undefined,
|
|
1658
|
+
'account': undefined,
|
|
1659
|
+
'referenceId': this.safeString(item, 'clientId'),
|
|
1660
|
+
'referenceAccount': undefined,
|
|
1661
|
+
'type': this.parseLedgerEntryType(this.safeString(item, 'type')),
|
|
1662
|
+
'currency': code,
|
|
1663
|
+
'amount': this.safeNumber(item, 'amount'),
|
|
1663
1664
|
'timestamp': timestamp,
|
|
1664
1665
|
'datetime': this.iso8601(timestamp),
|
|
1665
|
-
'
|
|
1666
|
-
'
|
|
1667
|
-
'
|
|
1668
|
-
'
|
|
1669
|
-
|
|
1670
|
-
'clientId': referenceId,
|
|
1671
|
-
'status': status,
|
|
1672
|
-
};
|
|
1666
|
+
'before': undefined,
|
|
1667
|
+
'after': undefined,
|
|
1668
|
+
'status': 'ok',
|
|
1669
|
+
'fee': undefined,
|
|
1670
|
+
}, currency);
|
|
1673
1671
|
}
|
|
1674
1672
|
parseIds(ids) {
|
|
1675
1673
|
/**
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -976,6 +976,7 @@ class bybit extends bybit$1 {
|
|
|
976
976
|
'3200300': errors.InsufficientFunds, // {"retCode":3200300,"retMsg":"Insufficient margin balance.","result":null,"retExtMap":{}}
|
|
977
977
|
},
|
|
978
978
|
'broad': {
|
|
979
|
+
'Not supported symbols': errors.BadSymbol,
|
|
979
980
|
'Request timeout': errors.RequestTimeout,
|
|
980
981
|
'unknown orderInfo': errors.OrderNotFound,
|
|
981
982
|
'invalid api_key': errors.AuthenticationError,
|
|
@@ -5922,13 +5923,13 @@ class bybit extends bybit$1 {
|
|
|
5922
5923
|
/**
|
|
5923
5924
|
* @method
|
|
5924
5925
|
* @name bybit#fetchLedger
|
|
5925
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
5926
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
5926
5927
|
* @see https://bybit-exchange.github.io/docs/v5/account/transaction-log
|
|
5927
5928
|
* @see https://bybit-exchange.github.io/docs/v5/account/contract-transaction-log
|
|
5928
|
-
* @param {string} code unified currency code, default is undefined
|
|
5929
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
5929
5930
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
5930
|
-
* @param {int} [limit] max number of ledger
|
|
5931
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
5931
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
5932
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
5932
5933
|
* @param {string} [params.subType] if inverse will use v5/account/contract-transaction-log
|
|
5933
5934
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5934
5935
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
@@ -6138,6 +6139,7 @@ class bybit extends bybit$1 {
|
|
|
6138
6139
|
//
|
|
6139
6140
|
const currencyId = this.safeString2(item, 'coin', 'currency');
|
|
6140
6141
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
6142
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
6141
6143
|
const amount = this.safeString2(item, 'amount', 'change');
|
|
6142
6144
|
const after = this.safeString2(item, 'wallet_balance', 'cashBalance');
|
|
6143
6145
|
const direction = Precise["default"].stringLt(amount, '0') ? 'out' : 'in';
|
|
@@ -6150,26 +6152,26 @@ class bybit extends bybit$1 {
|
|
|
6150
6152
|
if (timestamp === undefined) {
|
|
6151
6153
|
timestamp = this.safeInteger(item, 'transactionTime');
|
|
6152
6154
|
}
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
'id': id,
|
|
6158
|
-
'currency': code,
|
|
6155
|
+
return this.safeLedgerEntry({
|
|
6156
|
+
'info': item,
|
|
6157
|
+
'id': this.safeString(item, 'id'),
|
|
6158
|
+
'direction': direction,
|
|
6159
6159
|
'account': this.safeString(item, 'wallet_id'),
|
|
6160
|
+
'referenceId': this.safeString(item, 'tx_id'),
|
|
6160
6161
|
'referenceAccount': undefined,
|
|
6161
|
-
'
|
|
6162
|
-
'
|
|
6163
|
-
'amount': this.
|
|
6164
|
-
'before': this.parseNumber(before),
|
|
6165
|
-
'after': this.parseNumber(after),
|
|
6166
|
-
'fee': this.parseNumber(this.safeString(item, 'fee')),
|
|
6167
|
-
'direction': direction,
|
|
6162
|
+
'type': this.parseLedgerEntryType(this.safeString(item, 'type')),
|
|
6163
|
+
'currency': code,
|
|
6164
|
+
'amount': this.parseToNumeric(Precise["default"].stringAbs(amount)),
|
|
6168
6165
|
'timestamp': timestamp,
|
|
6169
6166
|
'datetime': this.iso8601(timestamp),
|
|
6170
|
-
'
|
|
6171
|
-
'
|
|
6172
|
-
|
|
6167
|
+
'before': this.parseToNumeric(before),
|
|
6168
|
+
'after': this.parseToNumeric(after),
|
|
6169
|
+
'status': 'ok',
|
|
6170
|
+
'fee': {
|
|
6171
|
+
'currency': code,
|
|
6172
|
+
'cost': this.parseToNumeric(this.safeString(item, 'fee')),
|
|
6173
|
+
},
|
|
6174
|
+
}, currency);
|
|
6173
6175
|
}
|
|
6174
6176
|
parseLedgerEntryType(type) {
|
|
6175
6177
|
const types = {
|
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -2257,13 +2257,13 @@ class coinbase extends coinbase$1 {
|
|
|
2257
2257
|
/**
|
|
2258
2258
|
* @method
|
|
2259
2259
|
* @name coinbase#fetchLedger
|
|
2260
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2260
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2261
2261
|
* @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#list-transactions
|
|
2262
|
-
* @param {string} code unified currency code, default is undefined
|
|
2262
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2263
2263
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2264
|
-
* @param {int} [limit] max number of ledger
|
|
2264
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2265
2265
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2266
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
2266
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2267
2267
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2268
2268
|
*/
|
|
2269
2269
|
await this.loadMarkets();
|
|
@@ -2292,8 +2292,28 @@ class coinbase extends coinbase$1 {
|
|
|
2292
2292
|
const pagination = this.safeDict(response, 'pagination', {});
|
|
2293
2293
|
const cursor = this.safeString(pagination, 'next_starting_after');
|
|
2294
2294
|
if ((cursor !== undefined) && (cursor !== '')) {
|
|
2295
|
+
const lastFee = this.safeDict(last, 'fee');
|
|
2295
2296
|
last['next_starting_after'] = cursor;
|
|
2296
|
-
ledger[lastIndex] =
|
|
2297
|
+
ledger[lastIndex] = {
|
|
2298
|
+
'info': this.safeDict(last, 'info'),
|
|
2299
|
+
'id': this.safeString(last, 'id'),
|
|
2300
|
+
'timestamp': this.safeInteger(last, 'timestamp'),
|
|
2301
|
+
'datetime': this.safeString(last, 'datetime'),
|
|
2302
|
+
'direction': this.safeString(last, 'direction'),
|
|
2303
|
+
'account': this.safeString(last, 'account'),
|
|
2304
|
+
'referenceId': undefined,
|
|
2305
|
+
'referenceAccount': undefined,
|
|
2306
|
+
'type': this.safeString(last, 'type'),
|
|
2307
|
+
'currency': this.safeString(last, 'currency'),
|
|
2308
|
+
'amount': this.safeNumber(last, 'amount'),
|
|
2309
|
+
'before': undefined,
|
|
2310
|
+
'after': undefined,
|
|
2311
|
+
'status': this.safeString(last, 'status'),
|
|
2312
|
+
'fee': {
|
|
2313
|
+
'cost': this.safeNumber(lastFee, 'cost'),
|
|
2314
|
+
'currency': this.safeString(lastFee, 'currency'),
|
|
2315
|
+
},
|
|
2316
|
+
};
|
|
2297
2317
|
}
|
|
2298
2318
|
return ledger;
|
|
2299
2319
|
}
|
|
@@ -2573,6 +2593,7 @@ class coinbase extends coinbase$1 {
|
|
|
2573
2593
|
}
|
|
2574
2594
|
const currencyId = this.safeString(amountInfo, 'currency');
|
|
2575
2595
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2596
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
2576
2597
|
//
|
|
2577
2598
|
// the address and txid do not belong to the unified ledger structure
|
|
2578
2599
|
//
|
|
@@ -2608,7 +2629,7 @@ class coinbase extends coinbase$1 {
|
|
|
2608
2629
|
accountId = parts[3];
|
|
2609
2630
|
}
|
|
2610
2631
|
}
|
|
2611
|
-
return {
|
|
2632
|
+
return this.safeLedgerEntry({
|
|
2612
2633
|
'info': item,
|
|
2613
2634
|
'id': id,
|
|
2614
2635
|
'timestamp': timestamp,
|
|
@@ -2624,7 +2645,7 @@ class coinbase extends coinbase$1 {
|
|
|
2624
2645
|
'after': undefined,
|
|
2625
2646
|
'status': status,
|
|
2626
2647
|
'fee': fee,
|
|
2627
|
-
};
|
|
2648
|
+
}, currency);
|
|
2628
2649
|
}
|
|
2629
2650
|
async findAccountId(code, params = {}) {
|
|
2630
2651
|
await this.loadMarkets();
|
|
@@ -1469,33 +1469,33 @@ class coinbaseexchange extends coinbaseexchange$1 {
|
|
|
1469
1469
|
referenceId = this.safeString(details, 'order_id');
|
|
1470
1470
|
}
|
|
1471
1471
|
const status = 'ok';
|
|
1472
|
-
return {
|
|
1472
|
+
return this.safeLedgerEntry({
|
|
1473
|
+
'info': item,
|
|
1473
1474
|
'id': id,
|
|
1474
|
-
'
|
|
1475
|
+
'timestamp': timestamp,
|
|
1476
|
+
'datetime': this.iso8601(timestamp),
|
|
1477
|
+
'direction': direction,
|
|
1475
1478
|
'account': account,
|
|
1476
1479
|
'referenceAccount': referenceAccount,
|
|
1477
1480
|
'referenceId': referenceId,
|
|
1478
|
-
'
|
|
1481
|
+
'type': type,
|
|
1482
|
+
'currency': code,
|
|
1479
1483
|
'amount': amount,
|
|
1480
1484
|
'before': before,
|
|
1481
1485
|
'after': after,
|
|
1486
|
+
'status': status,
|
|
1482
1487
|
'fee': undefined,
|
|
1483
|
-
|
|
1484
|
-
'timestamp': timestamp,
|
|
1485
|
-
'datetime': this.iso8601(timestamp),
|
|
1486
|
-
'type': type,
|
|
1487
|
-
'info': item,
|
|
1488
|
-
};
|
|
1488
|
+
}, currency);
|
|
1489
1489
|
}
|
|
1490
1490
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1491
1491
|
/**
|
|
1492
1492
|
* @method
|
|
1493
1493
|
* @name coinbaseexchange#fetchLedger
|
|
1494
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1494
1495
|
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger
|
|
1495
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
1496
1496
|
* @param {string} code unified currency code, default is undefined
|
|
1497
1497
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1498
|
-
* @param {int} [limit] max number of ledger
|
|
1498
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1499
1499
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1500
1500
|
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
1501
1501
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
package/dist/cjs/src/coinlist.js
CHANGED
|
@@ -2084,11 +2084,11 @@ class coinlist extends coinlist$1 {
|
|
|
2084
2084
|
/**
|
|
2085
2085
|
* @method
|
|
2086
2086
|
* @name coinlist#fetchLedger
|
|
2087
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2087
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2088
2088
|
* @see https://trade-docs.coinlist.co/?javascript--nodejs#get-account-history
|
|
2089
|
-
* @param {string} code unified currency code, default is undefined
|
|
2089
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2090
2090
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2091
|
-
* @param {int} [limit] max number of ledger
|
|
2091
|
+
* @param {int} [limit] max number of ledger entries to return (default 200, max 500)
|
|
2092
2092
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2093
2093
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2094
2094
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
@@ -2272,8 +2272,9 @@ class coinlist extends coinlist$1 {
|
|
|
2272
2272
|
}
|
|
2273
2273
|
const currencyId = this.safeString(item, 'asset');
|
|
2274
2274
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2275
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
2275
2276
|
const type = this.parseLedgerEntryType(this.safeString(item, 'type'));
|
|
2276
|
-
return {
|
|
2277
|
+
return this.safeLedgerEntry({
|
|
2277
2278
|
'info': item,
|
|
2278
2279
|
'id': id,
|
|
2279
2280
|
'timestamp': timestamp,
|
|
@@ -2289,7 +2290,7 @@ class coinlist extends coinlist$1 {
|
|
|
2289
2290
|
'after': undefined,
|
|
2290
2291
|
'status': 'ok',
|
|
2291
2292
|
'fee': undefined,
|
|
2292
|
-
};
|
|
2293
|
+
}, currency);
|
|
2293
2294
|
}
|
|
2294
2295
|
parseLedgerEntryType(type) {
|
|
2295
2296
|
const types = {
|
|
@@ -984,11 +984,11 @@ class coinmetro extends coinmetro$1 {
|
|
|
984
984
|
/**
|
|
985
985
|
* @method
|
|
986
986
|
* @name coinmetro#fetchLedger
|
|
987
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
987
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
988
988
|
* @see https://documenter.getpostman.com/view/3653795/SVfWN6KS#4e7831f7-a0e7-4c3e-9336-1d0e5dcb15cf
|
|
989
|
-
* @param {string} code unified currency code, default is undefined
|
|
989
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
990
990
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
991
|
-
* @param {int} [limit] max number of ledger
|
|
991
|
+
* @param {int} [limit] max number of ledger entries to return (default 200, max 500)
|
|
992
992
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
993
993
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
994
994
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
@@ -602,7 +602,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
602
602
|
* @method
|
|
603
603
|
* @name cryptocom#fetchTickers
|
|
604
604
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
605
|
-
* @see https://exchange-docs.crypto.com/
|
|
605
|
+
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-tickers
|
|
606
606
|
* @see https://exchange-docs.crypto.com/derivatives/index.html#public-get-tickers
|
|
607
607
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
608
608
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1796,6 +1796,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
1796
1796
|
* @method
|
|
1797
1797
|
* @name cryptocom#fetchDepositAddress
|
|
1798
1798
|
* @description fetch the deposit address for a currency associated with this account
|
|
1799
|
+
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
|
|
1799
1800
|
* @param {string} code unified currency code
|
|
1800
1801
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1801
1802
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
@@ -2392,7 +2393,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
2392
2393
|
* @name cryptocom#fetchLedger
|
|
2393
2394
|
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2394
2395
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-transactions
|
|
2395
|
-
* @param {string} code unified currency code
|
|
2396
|
+
* @param {string} [code] unified currency code
|
|
2396
2397
|
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
2397
2398
|
* @param {int} [limit] max number of ledger entries to return
|
|
2398
2399
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2473,6 +2474,8 @@ class cryptocom extends cryptocom$1 {
|
|
|
2473
2474
|
//
|
|
2474
2475
|
const timestamp = this.safeInteger(item, 'event_timestamp_ms');
|
|
2475
2476
|
const currencyId = this.safeString(item, 'instrument_name');
|
|
2477
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2478
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
2476
2479
|
let amount = this.safeString(item, 'transaction_qty');
|
|
2477
2480
|
let direction = undefined;
|
|
2478
2481
|
if (Precise["default"].stringLt(amount, '0')) {
|
|
@@ -2482,14 +2485,15 @@ class cryptocom extends cryptocom$1 {
|
|
|
2482
2485
|
else {
|
|
2483
2486
|
direction = 'in';
|
|
2484
2487
|
}
|
|
2485
|
-
return {
|
|
2488
|
+
return this.safeLedgerEntry({
|
|
2489
|
+
'info': item,
|
|
2486
2490
|
'id': this.safeString(item, 'order_id'),
|
|
2487
2491
|
'direction': direction,
|
|
2488
2492
|
'account': this.safeString(item, 'account_id'),
|
|
2489
2493
|
'referenceId': this.safeString(item, 'trade_id'),
|
|
2490
2494
|
'referenceAccount': this.safeString(item, 'trade_match_id'),
|
|
2491
2495
|
'type': this.parseLedgerEntryType(this.safeString(item, 'journal_type')),
|
|
2492
|
-
'currency':
|
|
2496
|
+
'currency': code,
|
|
2493
2497
|
'amount': this.parseNumber(amount),
|
|
2494
2498
|
'timestamp': timestamp,
|
|
2495
2499
|
'datetime': this.iso8601(timestamp),
|
|
@@ -2500,8 +2504,7 @@ class cryptocom extends cryptocom$1 {
|
|
|
2500
2504
|
'currency': undefined,
|
|
2501
2505
|
'cost': undefined,
|
|
2502
2506
|
},
|
|
2503
|
-
|
|
2504
|
-
};
|
|
2507
|
+
}, currency);
|
|
2505
2508
|
}
|
|
2506
2509
|
parseLedgerEntryType(type) {
|
|
2507
2510
|
const ledgerType = {
|
|
@@ -1692,11 +1692,11 @@ class currencycom extends currencycom$1 {
|
|
|
1692
1692
|
/**
|
|
1693
1693
|
* @method
|
|
1694
1694
|
* @name currencycom#fetchLedger
|
|
1695
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
1695
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1696
1696
|
* @see https://apitradedoc.currency.com/swagger-ui.html#/rest-api/getLedgerUsingGET
|
|
1697
|
-
* @param {string} code unified currency code, default is undefined
|
|
1697
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
1698
1698
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1699
|
-
* @param {int} [limit] max number of ledger
|
|
1699
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1700
1700
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1701
1701
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1702
1702
|
*/
|
|
@@ -1749,13 +1749,14 @@ class currencycom extends currencycom$1 {
|
|
|
1749
1749
|
const timestamp = this.safeInteger(item, 'timestamp');
|
|
1750
1750
|
const currencyId = this.safeString(item, 'currency');
|
|
1751
1751
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1752
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
1752
1753
|
const feeCost = this.safeString(item, 'commission');
|
|
1753
1754
|
let fee = undefined;
|
|
1754
1755
|
if (feeCost !== undefined) {
|
|
1755
1756
|
fee = { 'currency': code, 'cost': feeCost };
|
|
1756
1757
|
}
|
|
1757
1758
|
const direction = Precise["default"].stringLt(amountString, '0') ? 'out' : 'in';
|
|
1758
|
-
|
|
1759
|
+
return this.safeLedgerEntry({
|
|
1759
1760
|
'id': id,
|
|
1760
1761
|
'timestamp': timestamp,
|
|
1761
1762
|
'datetime': this.iso8601(timestamp),
|
|
@@ -1771,8 +1772,7 @@ class currencycom extends currencycom$1 {
|
|
|
1771
1772
|
'status': this.parseLedgerEntryStatus(this.safeString(item, 'status')),
|
|
1772
1773
|
'fee': fee,
|
|
1773
1774
|
'info': item,
|
|
1774
|
-
};
|
|
1775
|
-
return result;
|
|
1775
|
+
}, currency);
|
|
1776
1776
|
}
|
|
1777
1777
|
parseLedgerEntryStatus(status) {
|
|
1778
1778
|
const statuses = {
|
package/dist/cjs/src/delta.js
CHANGED
|
@@ -2188,11 +2188,11 @@ class delta extends delta$1 {
|
|
|
2188
2188
|
/**
|
|
2189
2189
|
* @method
|
|
2190
2190
|
* @name delta#fetchLedger
|
|
2191
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2191
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2192
2192
|
* @see https://docs.delta.exchange/#get-wallet-transactions
|
|
2193
|
-
* @param {string} code unified currency code, default is undefined
|
|
2193
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2194
2194
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2195
|
-
* @param {int} [limit] max number of ledger
|
|
2195
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2196
2196
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2197
2197
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2198
2198
|
*/
|
|
@@ -2291,7 +2291,7 @@ class delta extends delta$1 {
|
|
|
2291
2291
|
const after = this.safeString(item, 'balance');
|
|
2292
2292
|
const before = Precise["default"].stringMax('0', Precise["default"].stringSub(after, amount));
|
|
2293
2293
|
const status = 'ok';
|
|
2294
|
-
return {
|
|
2294
|
+
return this.safeLedgerEntry({
|
|
2295
2295
|
'info': item,
|
|
2296
2296
|
'id': id,
|
|
2297
2297
|
'direction': direction,
|
|
@@ -2307,7 +2307,7 @@ class delta extends delta$1 {
|
|
|
2307
2307
|
'timestamp': timestamp,
|
|
2308
2308
|
'datetime': this.iso8601(timestamp),
|
|
2309
2309
|
'fee': undefined,
|
|
2310
|
-
};
|
|
2310
|
+
}, currency);
|
|
2311
2311
|
}
|
|
2312
2312
|
async fetchDepositAddress(code, params = {}) {
|
|
2313
2313
|
/**
|
|
@@ -2599,14 +2599,16 @@ class digifinex extends digifinex$1 {
|
|
|
2599
2599
|
// }
|
|
2600
2600
|
//
|
|
2601
2601
|
const type = this.parseLedgerEntryType(this.safeString2(item, 'type', 'finance_type'));
|
|
2602
|
-
const
|
|
2602
|
+
const currencyId = this.safeString2(item, 'currency_mark', 'currency');
|
|
2603
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2604
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
2603
2605
|
const amount = this.safeNumber2(item, 'num', 'change');
|
|
2604
2606
|
const after = this.safeNumber(item, 'balance');
|
|
2605
2607
|
let timestamp = this.safeTimestamp(item, 'time');
|
|
2606
2608
|
if (timestamp === undefined) {
|
|
2607
2609
|
timestamp = this.safeInteger(item, 'timestamp');
|
|
2608
2610
|
}
|
|
2609
|
-
return {
|
|
2611
|
+
return this.safeLedgerEntry({
|
|
2610
2612
|
'info': item,
|
|
2611
2613
|
'id': undefined,
|
|
2612
2614
|
'direction': undefined,
|
|
@@ -2622,18 +2624,18 @@ class digifinex extends digifinex$1 {
|
|
|
2622
2624
|
'timestamp': timestamp,
|
|
2623
2625
|
'datetime': this.iso8601(timestamp),
|
|
2624
2626
|
'fee': undefined,
|
|
2625
|
-
};
|
|
2627
|
+
}, currency);
|
|
2626
2628
|
}
|
|
2627
2629
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2628
2630
|
/**
|
|
2629
2631
|
* @method
|
|
2630
2632
|
* @name digifinex#fetchLedger
|
|
2631
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2633
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2632
2634
|
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-margin-otc-financial-logs
|
|
2633
2635
|
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#bills
|
|
2634
|
-
* @param {string} code unified currency code, default is undefined
|
|
2636
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2635
2637
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2636
|
-
* @param {int} [limit] max number of ledger
|
|
2638
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2637
2639
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2638
2640
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2639
2641
|
*/
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -6627,12 +6627,12 @@ class gate extends gate$1 {
|
|
|
6627
6627
|
* @see https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
|
|
6628
6628
|
* @see https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
|
|
6629
6629
|
* @see https://www.gate.io/docs/developers/apiv4/en/#list-account-changing-history
|
|
6630
|
-
* @param {string} code unified currency code
|
|
6630
|
+
* @param {string} [code] unified currency code
|
|
6631
6631
|
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
6632
6632
|
* @param {int} [limit] max number of ledger entries to return
|
|
6633
6633
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6634
6634
|
* @param {int} [params.until] end time in ms
|
|
6635
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [
|
|
6635
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
6636
6636
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
6637
6637
|
*/
|
|
6638
6638
|
await this.loadMarkets();
|
|
@@ -6789,6 +6789,7 @@ class gate extends gate$1 {
|
|
|
6789
6789
|
direction = 'in';
|
|
6790
6790
|
}
|
|
6791
6791
|
const currencyId = this.safeString(item, 'currency');
|
|
6792
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
6792
6793
|
const type = this.safeString(item, 'type');
|
|
6793
6794
|
const rawTimestamp = this.safeString(item, 'time');
|
|
6794
6795
|
let timestamp = undefined;
|
|
@@ -6801,7 +6802,8 @@ class gate extends gate$1 {
|
|
|
6801
6802
|
const balanceString = this.safeString(item, 'balance');
|
|
6802
6803
|
const changeString = this.safeString(item, 'change');
|
|
6803
6804
|
const before = this.parseNumber(Precise["default"].stringSub(balanceString, changeString));
|
|
6804
|
-
return {
|
|
6805
|
+
return this.safeLedgerEntry({
|
|
6806
|
+
'info': item,
|
|
6805
6807
|
'id': this.safeString(item, 'id'),
|
|
6806
6808
|
'direction': direction,
|
|
6807
6809
|
'account': undefined,
|
|
@@ -6816,8 +6818,7 @@ class gate extends gate$1 {
|
|
|
6816
6818
|
'after': this.safeNumber(item, 'balance'),
|
|
6817
6819
|
'status': undefined,
|
|
6818
6820
|
'fee': undefined,
|
|
6819
|
-
|
|
6820
|
-
};
|
|
6821
|
+
}, currency);
|
|
6821
6822
|
}
|
|
6822
6823
|
parseLedgerEntryType(type) {
|
|
6823
6824
|
const ledgerType = {
|
package/dist/cjs/src/hashkey.js
CHANGED
|
@@ -2227,11 +2227,11 @@ class hashkey extends hashkey$1 {
|
|
|
2227
2227
|
/**
|
|
2228
2228
|
* @method
|
|
2229
2229
|
* @name hashkey#fetchLedger
|
|
2230
|
-
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
2230
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2231
2231
|
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-account-transaction-list
|
|
2232
|
-
* @param {string} code unified currency code, default is undefined (not used)
|
|
2232
|
+
* @param {string} [code] unified currency code, default is undefined (not used)
|
|
2233
2233
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2234
|
-
* @param {int} [limit] max number of ledger
|
|
2234
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2235
2235
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2236
2236
|
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2237
2237
|
* @param {int} [params.flowType] trade, fee, transfer, deposit, withdrawal
|
|
@@ -2316,7 +2316,9 @@ class hashkey extends hashkey$1 {
|
|
|
2316
2316
|
const account = this.safeString(item, 'accountId');
|
|
2317
2317
|
const timestamp = this.safeInteger(item, 'created');
|
|
2318
2318
|
const type = this.parseLedgerEntryType(this.safeString(item, 'flowTypeValue'));
|
|
2319
|
-
const
|
|
2319
|
+
const currencyId = this.safeString(item, 'coin');
|
|
2320
|
+
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2321
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
2320
2322
|
const amountString = this.safeString(item, 'change');
|
|
2321
2323
|
const amount = this.parseNumber(amountString);
|
|
2322
2324
|
let direction = 'in';
|
|
@@ -2326,9 +2328,9 @@ class hashkey extends hashkey$1 {
|
|
|
2326
2328
|
const afterString = this.safeString(item, 'total');
|
|
2327
2329
|
const after = this.parseNumber(afterString);
|
|
2328
2330
|
const status = 'ok';
|
|
2329
|
-
return {
|
|
2330
|
-
'id': id,
|
|
2331
|
+
return this.safeLedgerEntry({
|
|
2331
2332
|
'info': item,
|
|
2333
|
+
'id': id,
|
|
2332
2334
|
'timestamp': timestamp,
|
|
2333
2335
|
'datetime': this.iso8601(timestamp),
|
|
2334
2336
|
'account': account,
|
|
@@ -2343,7 +2345,7 @@ class hashkey extends hashkey$1 {
|
|
|
2343
2345
|
'after': after,
|
|
2344
2346
|
'status': status,
|
|
2345
2347
|
'fee': undefined,
|
|
2346
|
-
};
|
|
2348
|
+
}, currency);
|
|
2347
2349
|
}
|
|
2348
2350
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2349
2351
|
/**
|