ccxt 4.4.25 → 4.4.27
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 +133 -132
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/alpaca.js +451 -16
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/base/Exchange.js +32 -1
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +3 -4
- package/dist/cjs/src/binancecoinm.js +1 -1
- package/dist/cjs/src/binanceus.js +1 -1
- package/dist/cjs/src/binanceusdm.js +1 -1
- package/dist/cjs/src/bingx.js +32 -37
- package/dist/cjs/src/bit2c.js +1 -1
- package/dist/cjs/src/bitbank.js +1 -1
- package/dist/cjs/src/bitbns.js +1 -1
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +1 -1
- package/dist/cjs/src/bitflyer.js +1 -1
- package/dist/cjs/src/bitget.js +3 -3
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/bitmart.js +4 -4
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/bitopro.js +1 -1
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitstamp.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bitvavo.js +1 -1
- package/dist/cjs/src/bl3p.js +1 -1
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/blofin.js +1 -1
- package/dist/cjs/src/btcalpha.js +1 -1
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/btcmarkets.js +1 -1
- package/dist/cjs/src/btcturk.js +1 -1
- package/dist/cjs/src/bybit.js +8 -15
- package/dist/cjs/src/cex.js +40 -0
- package/dist/cjs/src/coinbase.js +97 -11
- package/dist/cjs/src/coinex.js +3 -5
- package/dist/cjs/src/digifinex.js +2 -2
- package/dist/cjs/src/exmo.js +1 -0
- package/dist/cjs/src/gate.js +25 -19
- package/dist/cjs/src/htx.js +2 -3
- package/dist/cjs/src/hyperliquid.js +35 -5
- package/dist/cjs/src/kucoin.js +2 -2
- package/dist/cjs/src/lbank.js +100 -1
- package/dist/cjs/src/okx.js +3 -2
- package/dist/cjs/src/phemex.js +4 -2
- package/dist/cjs/src/pro/binance.js +1 -1
- package/dist/cjs/src/pro/exmo.js +216 -3
- package/dist/cjs/src/pro/lbank.js +9 -4
- package/dist/cjs/src/wavesexchange.js +13 -2
- package/dist/cjs/src/whitebit.js +2 -2
- package/dist/cjs/src/xt.js +39 -27
- package/examples/js/cli.js +23 -3
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/alpaca.d.ts +3 -0
- package/js/src/abstract/bingx.d.ts +1 -0
- package/js/src/abstract/okx.d.ts +1 -0
- package/js/src/abstract/phemex.d.ts +1 -0
- package/js/src/ace.js +1 -1
- package/js/src/alpaca.d.ts +14 -1
- package/js/src/alpaca.js +452 -17
- package/js/src/ascendex.js +1 -1
- package/js/src/base/Exchange.d.ts +13 -6
- package/js/src/base/Exchange.js +32 -1
- package/js/src/base/types.d.ts +3 -3
- package/js/src/bequant.js +1 -1
- package/js/src/bigone.js +1 -1
- package/js/src/binance.d.ts +3 -14
- package/js/src/binance.js +3 -4
- package/js/src/binancecoinm.js +1 -1
- package/js/src/binanceus.js +1 -1
- package/js/src/binanceusdm.js +1 -1
- package/js/src/bingx.js +32 -37
- package/js/src/bit2c.js +1 -1
- package/js/src/bitbank.js +1 -1
- package/js/src/bitbns.js +1 -1
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.js +1 -1
- package/js/src/bitflyer.js +1 -1
- package/js/src/bitget.d.ts +3 -13
- package/js/src/bitget.js +3 -3
- package/js/src/bithumb.js +1 -1
- package/js/src/bitmart.d.ts +3 -13
- package/js/src/bitmart.js +4 -4
- package/js/src/bitmex.js +1 -1
- package/js/src/bitopro.js +1 -1
- package/js/src/bitrue.js +1 -1
- package/js/src/bitso.js +1 -1
- package/js/src/bitstamp.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/bitvavo.js +1 -1
- package/js/src/bl3p.js +1 -1
- package/js/src/blockchaincom.js +1 -1
- package/js/src/blofin.js +1 -1
- package/js/src/btcalpha.js +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/btcmarkets.js +1 -1
- package/js/src/btcturk.js +1 -1
- package/js/src/bybit.d.ts +3 -14
- package/js/src/bybit.js +8 -15
- package/js/src/cex.d.ts +2 -0
- package/js/src/cex.js +40 -0
- package/js/src/coinbase.d.ts +1 -0
- package/js/src/coinbase.js +97 -11
- package/js/src/coinex.d.ts +3 -15
- package/js/src/coinex.js +3 -5
- package/js/src/digifinex.d.ts +3 -13
- package/js/src/digifinex.js +2 -2
- package/js/src/exmo.js +1 -0
- package/js/src/gate.d.ts +3 -13
- package/js/src/gate.js +25 -19
- package/js/src/htx.d.ts +3 -14
- package/js/src/htx.js +2 -3
- package/js/src/hyperliquid.d.ts +1 -0
- package/js/src/hyperliquid.js +35 -5
- package/js/src/kucoin.d.ts +3 -13
- package/js/src/kucoin.js +2 -2
- package/js/src/lbank.d.ts +4 -1
- package/js/src/lbank.js +100 -1
- package/js/src/okx.d.ts +3 -13
- package/js/src/okx.js +3 -2
- package/js/src/phemex.js +4 -2
- package/js/src/pro/binance.js +1 -1
- package/js/src/pro/exmo.d.ts +5 -1
- package/js/src/pro/exmo.js +216 -3
- package/js/src/pro/lbank.js +9 -4
- package/js/src/wavesexchange.js +13 -2
- package/js/src/whitebit.d.ts +3 -13
- package/js/src/whitebit.js +2 -2
- package/js/src/woo.d.ts +1 -1
- package/js/src/xt.js +39 -27
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ const { isNode, selfIsDefined, deepExtend, extend, clone, flatten, unique, index
|
|
|
57
57
|
*/
|
|
58
58
|
class Exchange {
|
|
59
59
|
constructor(userConfig = {}) {
|
|
60
|
+
this.isSandboxModeEnabled = false;
|
|
60
61
|
this.throttleProp = undefined;
|
|
61
62
|
this.sleep = sleep;
|
|
62
63
|
this.api = undefined;
|
|
@@ -811,7 +812,15 @@ class Exchange {
|
|
|
811
812
|
}
|
|
812
813
|
else {
|
|
813
814
|
try {
|
|
814
|
-
|
|
815
|
+
// we should handle scientific notation here
|
|
816
|
+
// so if the exchanges returns 1e-8
|
|
817
|
+
// this function will return 0.00000001
|
|
818
|
+
// check https://github.com/ccxt/ccxt/issues/24135
|
|
819
|
+
const numberNormalized = this.numberToString(value);
|
|
820
|
+
if (numberNormalized.indexOf('e-') > -1) {
|
|
821
|
+
return this.number(numberToString(parseFloat(numberNormalized)));
|
|
822
|
+
}
|
|
823
|
+
return this.number(numberNormalized);
|
|
815
824
|
}
|
|
816
825
|
catch (e) {
|
|
817
826
|
return d;
|
|
@@ -1978,6 +1987,8 @@ class Exchange {
|
|
|
1978
1987
|
else {
|
|
1979
1988
|
throw new errors.NotSupported(this.id + ' does not have a sandbox URL');
|
|
1980
1989
|
}
|
|
1990
|
+
// set flag
|
|
1991
|
+
this.isSandboxModeEnabled = true;
|
|
1981
1992
|
}
|
|
1982
1993
|
else if ('apiBackup' in this.urls) {
|
|
1983
1994
|
if (typeof this.urls['api'] === 'string') {
|
|
@@ -1988,6 +1999,8 @@ class Exchange {
|
|
|
1988
1999
|
}
|
|
1989
2000
|
const newUrls = this.omit(this.urls, 'apiBackup');
|
|
1990
2001
|
this.urls = newUrls;
|
|
2002
|
+
// set flag
|
|
2003
|
+
this.isSandboxModeEnabled = false;
|
|
1991
2004
|
}
|
|
1992
2005
|
}
|
|
1993
2006
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
@@ -2023,9 +2036,15 @@ class Exchange {
|
|
|
2023
2036
|
async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
2024
2037
|
throw new errors.NotSupported(this.id + ' watchTrades() is not supported yet');
|
|
2025
2038
|
}
|
|
2039
|
+
async unWatchTrades(symbol, params = {}) {
|
|
2040
|
+
throw new errors.NotSupported(this.id + ' unWatchTrades() is not supported yet');
|
|
2041
|
+
}
|
|
2026
2042
|
async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
|
|
2027
2043
|
throw new errors.NotSupported(this.id + ' watchTradesForSymbols() is not supported yet');
|
|
2028
2044
|
}
|
|
2045
|
+
async unWatchTradesForSymbols(symbols, params = {}) {
|
|
2046
|
+
throw new errors.NotSupported(this.id + ' unWatchTradesForSymbols() is not supported yet');
|
|
2047
|
+
}
|
|
2029
2048
|
async watchMyTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
|
|
2030
2049
|
throw new errors.NotSupported(this.id + ' watchMyTradesForSymbols() is not supported yet');
|
|
2031
2050
|
}
|
|
@@ -2035,9 +2054,15 @@ class Exchange {
|
|
|
2035
2054
|
async watchOHLCVForSymbols(symbolsAndTimeframes, since = undefined, limit = undefined, params = {}) {
|
|
2036
2055
|
throw new errors.NotSupported(this.id + ' watchOHLCVForSymbols() is not supported yet');
|
|
2037
2056
|
}
|
|
2057
|
+
async unWatchOHLCVForSymbols(symbolsAndTimeframes, params = {}) {
|
|
2058
|
+
throw new errors.NotSupported(this.id + ' unWatchOHLCVForSymbols() is not supported yet');
|
|
2059
|
+
}
|
|
2038
2060
|
async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
|
|
2039
2061
|
throw new errors.NotSupported(this.id + ' watchOrderBookForSymbols() is not supported yet');
|
|
2040
2062
|
}
|
|
2063
|
+
async unWatchOrderBookForSymbols(symbols, params = {}) {
|
|
2064
|
+
throw new errors.NotSupported(this.id + ' unWatchOrderBookForSymbols() is not supported yet');
|
|
2065
|
+
}
|
|
2041
2066
|
async fetchDepositAddresses(codes = undefined, params = {}) {
|
|
2042
2067
|
throw new errors.NotSupported(this.id + ' fetchDepositAddresses() is not supported yet');
|
|
2043
2068
|
}
|
|
@@ -2074,6 +2099,9 @@ class Exchange {
|
|
|
2074
2099
|
async watchOrderBook(symbol, limit = undefined, params = {}) {
|
|
2075
2100
|
throw new errors.NotSupported(this.id + ' watchOrderBook() is not supported yet');
|
|
2076
2101
|
}
|
|
2102
|
+
async unWatchOrderBook(symbol, params = {}) {
|
|
2103
|
+
throw new errors.NotSupported(this.id + ' unWatchOrderBook() is not supported yet');
|
|
2104
|
+
}
|
|
2077
2105
|
async fetchTime(params = {}) {
|
|
2078
2106
|
throw new errors.NotSupported(this.id + ' fetchTime() is not supported yet');
|
|
2079
2107
|
}
|
|
@@ -4502,6 +4530,9 @@ class Exchange {
|
|
|
4502
4530
|
async watchTickers(symbols = undefined, params = {}) {
|
|
4503
4531
|
throw new errors.NotSupported(this.id + ' watchTickers() is not supported yet');
|
|
4504
4532
|
}
|
|
4533
|
+
async unWatchTickers(symbols = undefined, params = {}) {
|
|
4534
|
+
throw new errors.NotSupported(this.id + ' unWatchTickers() is not supported yet');
|
|
4535
|
+
}
|
|
4505
4536
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
4506
4537
|
throw new errors.NotSupported(this.id + ' fetchOrder() is not supported yet');
|
|
4507
4538
|
}
|
package/dist/cjs/src/bequant.js
CHANGED
|
@@ -12,7 +12,7 @@ class bequant extends hitbtc {
|
|
|
12
12
|
'countries': ['MT'],
|
|
13
13
|
'pro': true,
|
|
14
14
|
'urls': {
|
|
15
|
-
'logo': 'https://
|
|
15
|
+
'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
|
|
16
16
|
'api': {
|
|
17
17
|
'public': 'https://api.bequant.io/api/3',
|
|
18
18
|
'private': 'https://api.bequant.io/api/3',
|
package/dist/cjs/src/bigone.js
CHANGED
|
@@ -83,7 +83,7 @@ class bigone extends bigone$1 {
|
|
|
83
83
|
},
|
|
84
84
|
'hostname': 'big.one',
|
|
85
85
|
'urls': {
|
|
86
|
-
'logo': 'https://
|
|
86
|
+
'logo': 'https://github.com/user-attachments/assets/4e5cfd53-98cc-4b90-92cd-0d7b512653d1',
|
|
87
87
|
'api': {
|
|
88
88
|
'public': 'https://{hostname}/api/v3',
|
|
89
89
|
'private': 'https://{hostname}/api/v3/viewer',
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -188,7 +188,7 @@ class binance extends binance$1 {
|
|
|
188
188
|
'1M': '1M',
|
|
189
189
|
},
|
|
190
190
|
'urls': {
|
|
191
|
-
'logo': 'https://
|
|
191
|
+
'logo': 'https://github.com/user-attachments/assets/e9419b93-ccb0-46aa-9bff-c883f096274b',
|
|
192
192
|
'test': {
|
|
193
193
|
'dapiPublic': 'https://testnet.binancefuture.com/dapi/v1',
|
|
194
194
|
'dapiPrivate': 'https://testnet.binancefuture.com/dapi/v1',
|
|
@@ -12375,16 +12375,15 @@ class binance extends binance$1 {
|
|
|
12375
12375
|
const timestamp = this.safeInteger(info, 'interestAccuredTime');
|
|
12376
12376
|
const marginMode = (symbol === undefined) ? 'cross' : 'isolated';
|
|
12377
12377
|
return {
|
|
12378
|
-
'
|
|
12378
|
+
'info': info,
|
|
12379
12379
|
'symbol': symbol,
|
|
12380
|
-
'marginMode': marginMode,
|
|
12381
12380
|
'currency': this.safeCurrencyCode(this.safeString(info, 'asset')),
|
|
12382
12381
|
'interest': this.safeNumber(info, 'interest'),
|
|
12383
12382
|
'interestRate': this.safeNumber(info, 'interestRate'),
|
|
12384
12383
|
'amountBorrowed': this.safeNumber(info, 'principal'),
|
|
12384
|
+
'marginMode': marginMode,
|
|
12385
12385
|
'timestamp': timestamp,
|
|
12386
12386
|
'datetime': this.iso8601(timestamp),
|
|
12387
|
-
'info': info,
|
|
12388
12387
|
};
|
|
12389
12388
|
}
|
|
12390
12389
|
async repayCrossMargin(code, amount, params = {}) {
|
|
@@ -10,7 +10,7 @@ class binancecoinm extends binance {
|
|
|
10
10
|
'id': 'binancecoinm',
|
|
11
11
|
'name': 'Binance COIN-M',
|
|
12
12
|
'urls': {
|
|
13
|
-
'logo': 'https://
|
|
13
|
+
'logo': 'https://github.com/user-attachments/assets/387cfc4e-5f33-48cd-8f5c-cd4854dabf0c',
|
|
14
14
|
'doc': [
|
|
15
15
|
'https://binance-docs.github.io/apidocs/delivery/en/',
|
|
16
16
|
'https://binance-docs.github.io/apidocs/spot/en',
|
|
@@ -15,7 +15,7 @@ class binanceus extends binance {
|
|
|
15
15
|
'certified': false,
|
|
16
16
|
'pro': true,
|
|
17
17
|
'urls': {
|
|
18
|
-
'logo': 'https://
|
|
18
|
+
'logo': 'https://github.com/user-attachments/assets/a9667919-b632-4d52-a832-df89f8a35e8c',
|
|
19
19
|
'api': {
|
|
20
20
|
'web': 'https://www.binance.us',
|
|
21
21
|
'public': 'https://api.binance.us/api/v3',
|
|
@@ -11,7 +11,7 @@ class binanceusdm extends binance {
|
|
|
11
11
|
'id': 'binanceusdm',
|
|
12
12
|
'name': 'Binance USDⓈ-M',
|
|
13
13
|
'urls': {
|
|
14
|
-
'logo': 'https://
|
|
14
|
+
'logo': 'https://github.com/user-attachments/assets/871cbea7-eebb-4b28-b260-c1c91df0487a',
|
|
15
15
|
'doc': [
|
|
16
16
|
'https://binance-docs.github.io/apidocs/futures/en/',
|
|
17
17
|
'https://binance-docs.github.io/apidocs/spot/en',
|
package/dist/cjs/src/bingx.js
CHANGED
|
@@ -204,6 +204,7 @@ class bingx extends bingx$1 {
|
|
|
204
204
|
'market/markPriceKlines': 1,
|
|
205
205
|
'trade/batchCancelReplace': 5,
|
|
206
206
|
'trade/fullOrder': 2,
|
|
207
|
+
'positionMargin/history': 2,
|
|
207
208
|
},
|
|
208
209
|
'post': {
|
|
209
210
|
'trade/cancelReplace': 2,
|
|
@@ -2854,23 +2855,17 @@ class bingx extends bingx$1 {
|
|
|
2854
2855
|
* @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Bulk%20order
|
|
2855
2856
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2856
2857
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2858
|
+
* @param {boolean} [params.sync] *spot only* if true, multiple orders are ordered serially and all orders do not require the same symbol/side/type
|
|
2857
2859
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2858
2860
|
*/
|
|
2859
2861
|
await this.loadMarkets();
|
|
2860
2862
|
const ordersRequests = [];
|
|
2861
|
-
|
|
2863
|
+
const marketIds = [];
|
|
2862
2864
|
for (let i = 0; i < orders.length; i++) {
|
|
2863
2865
|
const rawOrder = orders[i];
|
|
2864
2866
|
const marketId = this.safeString(rawOrder, 'symbol');
|
|
2865
|
-
if (symbol === undefined) {
|
|
2866
|
-
symbol = marketId;
|
|
2867
|
-
}
|
|
2868
|
-
else {
|
|
2869
|
-
if (symbol !== marketId) {
|
|
2870
|
-
throw new errors.BadRequest(this.id + ' createOrders() requires all orders to have the same symbol');
|
|
2871
|
-
}
|
|
2872
|
-
}
|
|
2873
2867
|
const type = this.safeString(rawOrder, 'type');
|
|
2868
|
+
marketIds.push(marketId);
|
|
2874
2869
|
const side = this.safeString(rawOrder, 'side');
|
|
2875
2870
|
const amount = this.safeNumber(rawOrder, 'amount');
|
|
2876
2871
|
const price = this.safeNumber(rawOrder, 'price');
|
|
@@ -2878,14 +2873,23 @@ class bingx extends bingx$1 {
|
|
|
2878
2873
|
const orderRequest = this.createOrderRequest(marketId, type, side, amount, price, orderParams);
|
|
2879
2874
|
ordersRequests.push(orderRequest);
|
|
2880
2875
|
}
|
|
2881
|
-
const
|
|
2876
|
+
const symbols = this.marketSymbols(marketIds, undefined, false, true, true);
|
|
2877
|
+
const symbolsLength = symbols.length;
|
|
2878
|
+
const market = this.market(symbols[0]);
|
|
2882
2879
|
const request = {};
|
|
2883
2880
|
let response = undefined;
|
|
2884
2881
|
if (market['swap']) {
|
|
2882
|
+
if (symbolsLength > 5) {
|
|
2883
|
+
throw new errors.InvalidOrder(this.id + ' createOrders() can not create more than 5 orders at once for swap markets');
|
|
2884
|
+
}
|
|
2885
2885
|
request['batchOrders'] = this.json(ordersRequests);
|
|
2886
2886
|
response = await this.swapV2PrivatePostTradeBatchOrders(request);
|
|
2887
2887
|
}
|
|
2888
2888
|
else {
|
|
2889
|
+
const sync = this.safeBool(params, 'sync', false);
|
|
2890
|
+
if (sync) {
|
|
2891
|
+
request['sync'] = true;
|
|
2892
|
+
}
|
|
2889
2893
|
request['data'] = this.json(ordersRequests);
|
|
2890
2894
|
response = await this.spotV1PrivatePostTradeBatchOrders(request);
|
|
2891
2895
|
}
|
|
@@ -2934,6 +2938,13 @@ class bingx extends bingx$1 {
|
|
|
2934
2938
|
// }
|
|
2935
2939
|
// }
|
|
2936
2940
|
//
|
|
2941
|
+
if (typeof response === 'string') {
|
|
2942
|
+
// broken api engine : order-ids are too long numbers (i.e. 1742930526912864656)
|
|
2943
|
+
// and JSON.parse can not handle them in JS, so we have to use .parseJson
|
|
2944
|
+
// however, when order has an attached SL/TP, their value types need extra parsing
|
|
2945
|
+
response = this.fixStringifiedJsonMembers(response);
|
|
2946
|
+
response = this.parseJson(response);
|
|
2947
|
+
}
|
|
2937
2948
|
const data = this.safeDict(response, 'data', {});
|
|
2938
2949
|
const result = this.safeList(data, 'orders', []);
|
|
2939
2950
|
return this.parseOrders(result, market);
|
|
@@ -3339,7 +3350,7 @@ class bingx extends bingx$1 {
|
|
|
3339
3350
|
'cost': Precise["default"].stringAbs(feeCost),
|
|
3340
3351
|
},
|
|
3341
3352
|
'trades': undefined,
|
|
3342
|
-
'reduceOnly': this.
|
|
3353
|
+
'reduceOnly': this.safeBool2(order, 'reduceOnly', 'ro'),
|
|
3343
3354
|
}, market);
|
|
3344
3355
|
}
|
|
3345
3356
|
parseOrderStatus(status) {
|
|
@@ -4574,37 +4585,21 @@ class bingx extends bingx$1 {
|
|
|
4574
4585
|
}
|
|
4575
4586
|
parseDepositAddress(depositAddress, currency = undefined) {
|
|
4576
4587
|
//
|
|
4577
|
-
//
|
|
4578
|
-
//
|
|
4579
|
-
//
|
|
4580
|
-
//
|
|
4581
|
-
//
|
|
4582
|
-
//
|
|
4583
|
-
//
|
|
4588
|
+
// {
|
|
4589
|
+
// "coinId":"4",
|
|
4590
|
+
// "coin":"USDT",
|
|
4591
|
+
// "network":"OMNI",
|
|
4592
|
+
// "address":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN",
|
|
4593
|
+
// "addressWithPrefix":"1HXyx8HVQRY7Nhqz63nwnRB7SpS9xQPzLN"
|
|
4594
|
+
// }
|
|
4584
4595
|
//
|
|
4585
|
-
let address = this.safeString(depositAddress, 'address');
|
|
4586
4596
|
const tag = this.safeString(depositAddress, 'tag');
|
|
4587
4597
|
const currencyId = this.safeString(depositAddress, 'coin');
|
|
4588
4598
|
currency = this.safeCurrency(currencyId, currency);
|
|
4589
4599
|
const code = currency['code'];
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
// that is only if the underlying contract address has the 0x prefix as well
|
|
4594
|
-
const networkCode = this.safeString(depositAddress, 'network');
|
|
4595
|
-
if (networkCode !== undefined) {
|
|
4596
|
-
if (networkCode in currency['networks']) {
|
|
4597
|
-
const network = currency['networks'][networkCode];
|
|
4598
|
-
const contractAddress = this.safeString(network['info'], 'contractAddress');
|
|
4599
|
-
if (contractAddress !== undefined) {
|
|
4600
|
-
if (contractAddress[0] === '0' && contractAddress[1] === 'x') {
|
|
4601
|
-
if (address[0] !== '0' || address[1] !== 'x') {
|
|
4602
|
-
address = '0x' + address;
|
|
4603
|
-
}
|
|
4604
|
-
}
|
|
4605
|
-
}
|
|
4606
|
-
}
|
|
4607
|
-
}
|
|
4600
|
+
const address = this.safeString(depositAddress, 'addressWithPrefix');
|
|
4601
|
+
const networkdId = this.safeString(depositAddress, 'network');
|
|
4602
|
+
const networkCode = this.networkIdToCode(networkdId, code);
|
|
4608
4603
|
this.checkAddress(address);
|
|
4609
4604
|
return {
|
|
4610
4605
|
'info': depositAddress,
|
package/dist/cjs/src/bit2c.js
CHANGED
|
@@ -77,7 +77,7 @@ class bit2c extends bit2c$1 {
|
|
|
77
77
|
'ws': false,
|
|
78
78
|
},
|
|
79
79
|
'urls': {
|
|
80
|
-
'logo': 'https://
|
|
80
|
+
'logo': 'https://github.com/user-attachments/assets/db0bce50-6842-4c09-a1d5-0c87d22118aa',
|
|
81
81
|
'api': {
|
|
82
82
|
'rest': 'https://bit2c.co.il',
|
|
83
83
|
},
|
package/dist/cjs/src/bitbank.js
CHANGED
|
@@ -92,7 +92,7 @@ class bitbank extends bitbank$1 {
|
|
|
92
92
|
},
|
|
93
93
|
'hostname': 'bitbank.cc',
|
|
94
94
|
'urls': {
|
|
95
|
-
'logo': 'https://
|
|
95
|
+
'logo': 'https://github.com/user-attachments/assets/9d616de0-8a88-4468-8e38-d269acab0348',
|
|
96
96
|
'api': {
|
|
97
97
|
'public': 'https://public.{hostname}',
|
|
98
98
|
'private': 'https://api.{hostname}',
|
package/dist/cjs/src/bitbns.js
CHANGED
|
@@ -67,7 +67,7 @@ class bitbns extends bitbns$1 {
|
|
|
67
67
|
},
|
|
68
68
|
'hostname': 'bitbns.com',
|
|
69
69
|
'urls': {
|
|
70
|
-
'logo': 'https://
|
|
70
|
+
'logo': 'https://github.com/user-attachments/assets/a5b9a562-cdd8-4bea-9fa7-fd24c1dad3d9',
|
|
71
71
|
'api': {
|
|
72
72
|
'www': 'https://{hostname}',
|
|
73
73
|
'v1': 'https://api.{hostname}/api/trade/v1',
|
package/dist/cjs/src/bitfinex.js
CHANGED
|
@@ -88,7 +88,7 @@ class bitfinex extends bitfinex$1 {
|
|
|
88
88
|
'1M': '1M',
|
|
89
89
|
},
|
|
90
90
|
'urls': {
|
|
91
|
-
'logo': 'https://
|
|
91
|
+
'logo': 'https://github.com/user-attachments/assets/9147c6c5-7197-481e-827b-7483672bb0e9',
|
|
92
92
|
'api': {
|
|
93
93
|
'v2': 'https://api-pub.bitfinex.com',
|
|
94
94
|
'public': 'https://api.bitfinex.com',
|
|
@@ -128,7 +128,7 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
128
128
|
// cheapest endpoint is 240 requests per minute => ~ 4 requests per second => ( 1000ms / 4 ) = 250ms between requests on average
|
|
129
129
|
'rateLimit': 250,
|
|
130
130
|
'urls': {
|
|
131
|
-
'logo': 'https://
|
|
131
|
+
'logo': 'https://github.com/user-attachments/assets/4a8e947f-ab46-481a-a8ae-8b20e9b03178',
|
|
132
132
|
'api': {
|
|
133
133
|
'v1': 'https://api.bitfinex.com',
|
|
134
134
|
'public': 'https://api-pub.bitfinex.com',
|
package/dist/cjs/src/bitflyer.js
CHANGED
|
@@ -57,7 +57,7 @@ class bitflyer extends bitflyer$1 {
|
|
|
57
57
|
'withdraw': true,
|
|
58
58
|
},
|
|
59
59
|
'urls': {
|
|
60
|
-
'logo': 'https://
|
|
60
|
+
'logo': 'https://github.com/user-attachments/assets/d0217747-e54d-4533-8416-0d553dca74bb',
|
|
61
61
|
'api': {
|
|
62
62
|
'rest': 'https://api.{hostname}',
|
|
63
63
|
},
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -160,7 +160,7 @@ class bitget extends bitget$1 {
|
|
|
160
160
|
},
|
|
161
161
|
'hostname': 'bitget.com',
|
|
162
162
|
'urls': {
|
|
163
|
-
'logo': 'https://
|
|
163
|
+
'logo': 'https://github.com/user-attachments/assets/fbaa10cc-a277-441d-a5b7-997dd9a87658',
|
|
164
164
|
'api': {
|
|
165
165
|
'spot': 'https://api.{hostname}',
|
|
166
166
|
'mix': 'https://api.{hostname}',
|
|
@@ -8349,15 +8349,15 @@ class bitget extends bitget$1 {
|
|
|
8349
8349
|
const marginMode = (marketId !== undefined) ? 'isolated' : 'cross';
|
|
8350
8350
|
const timestamp = this.safeInteger(info, 'cTime');
|
|
8351
8351
|
return {
|
|
8352
|
+
'info': info,
|
|
8352
8353
|
'symbol': this.safeString(market, 'symbol'),
|
|
8353
|
-
'marginMode': marginMode,
|
|
8354
8354
|
'currency': this.safeCurrencyCode(this.safeString(info, 'interestCoin')),
|
|
8355
8355
|
'interest': this.safeNumber(info, 'interestAmount'),
|
|
8356
8356
|
'interestRate': this.safeNumber(info, 'dailyInterestRate'),
|
|
8357
8357
|
'amountBorrowed': undefined,
|
|
8358
|
+
'marginMode': marginMode,
|
|
8358
8359
|
'timestamp': timestamp,
|
|
8359
8360
|
'datetime': this.iso8601(timestamp),
|
|
8360
|
-
'info': info,
|
|
8361
8361
|
};
|
|
8362
8362
|
}
|
|
8363
8363
|
async closePosition(symbol, side = undefined, params = {}) {
|
package/dist/cjs/src/bithumb.js
CHANGED
|
@@ -76,7 +76,7 @@ class bithumb extends bithumb$1 {
|
|
|
76
76
|
},
|
|
77
77
|
'hostname': 'bithumb.com',
|
|
78
78
|
'urls': {
|
|
79
|
-
'logo': 'https://
|
|
79
|
+
'logo': 'https://github.com/user-attachments/assets/c9e0eefb-4777-46b9-8f09-9d7f7c4af82d',
|
|
80
80
|
'api': {
|
|
81
81
|
'public': 'https://api.{hostname}/public',
|
|
82
82
|
'private': 'https://api.{hostname}',
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -108,7 +108,7 @@ class bitmart extends bitmart$1 {
|
|
|
108
108
|
},
|
|
109
109
|
'hostname': 'bitmart.com',
|
|
110
110
|
'urls': {
|
|
111
|
-
'logo': 'https://
|
|
111
|
+
'logo': 'https://github.com/user-attachments/assets/0623e9c4-f50e-48c9-82bd-65c3908c3a14',
|
|
112
112
|
'api': {
|
|
113
113
|
'spot': 'https://api-cloud.{hostname}',
|
|
114
114
|
'swap': 'https://api-cloud-v2.{hostname}', // bitmart.info for Hong Kong users
|
|
@@ -1855,7 +1855,7 @@ class bitmart extends bitmart$1 {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
1857
|
else {
|
|
1858
|
-
const maxLimit =
|
|
1858
|
+
const maxLimit = 500;
|
|
1859
1859
|
if (limit === undefined) {
|
|
1860
1860
|
limit = maxLimit;
|
|
1861
1861
|
}
|
|
@@ -4336,15 +4336,15 @@ class bitmart extends bitmart$1 {
|
|
|
4336
4336
|
market = this.safeMarket(marketId, market);
|
|
4337
4337
|
const timestamp = this.safeInteger(info, 'create_time');
|
|
4338
4338
|
return {
|
|
4339
|
+
'info': info,
|
|
4339
4340
|
'symbol': this.safeString(market, 'symbol'),
|
|
4340
|
-
'marginMode': 'isolated',
|
|
4341
4341
|
'currency': this.safeCurrencyCode(this.safeString(info, 'currency')),
|
|
4342
4342
|
'interest': this.safeNumber(info, 'interest_amount'),
|
|
4343
4343
|
'interestRate': this.safeNumber(info, 'hourly_interest'),
|
|
4344
4344
|
'amountBorrowed': this.safeNumber(info, 'borrow_amount'),
|
|
4345
|
+
'marginMode': 'isolated',
|
|
4345
4346
|
'timestamp': timestamp,
|
|
4346
4347
|
'datetime': this.iso8601(timestamp),
|
|
4347
|
-
'info': info,
|
|
4348
4348
|
};
|
|
4349
4349
|
}
|
|
4350
4350
|
async fetchOpenInterest(symbol, params = {}) {
|
package/dist/cjs/src/bitmex.js
CHANGED
|
@@ -108,7 +108,7 @@ class bitmex extends bitmex$1 {
|
|
|
108
108
|
'public': 'https://testnet.bitmex.com',
|
|
109
109
|
'private': 'https://testnet.bitmex.com',
|
|
110
110
|
},
|
|
111
|
-
'logo': 'https://github.com/
|
|
111
|
+
'logo': 'https://github.com/user-attachments/assets/c78425ab-78d5-49d6-bd14-db7734798f04',
|
|
112
112
|
'api': {
|
|
113
113
|
'public': 'https://www.bitmex.com',
|
|
114
114
|
'private': 'https://www.bitmex.com',
|
package/dist/cjs/src/bitopro.js
CHANGED
|
@@ -104,7 +104,7 @@ class bitopro extends bitopro$1 {
|
|
|
104
104
|
'1M': '1M',
|
|
105
105
|
},
|
|
106
106
|
'urls': {
|
|
107
|
-
'logo': 'https://
|
|
107
|
+
'logo': 'https://github.com/user-attachments/assets/affc6337-b95a-44bf-aacd-04f9722364f6',
|
|
108
108
|
'api': {
|
|
109
109
|
'rest': 'https://api.bitopro.com/v3',
|
|
110
110
|
},
|
package/dist/cjs/src/bitrue.js
CHANGED
|
@@ -95,7 +95,7 @@ class bitrue extends bitrue$1 {
|
|
|
95
95
|
'1w': '1W',
|
|
96
96
|
},
|
|
97
97
|
'urls': {
|
|
98
|
-
'logo': 'https://
|
|
98
|
+
'logo': 'https://github.com/user-attachments/assets/67abe346-1273-461a-bd7c-42fa32907c8e',
|
|
99
99
|
'api': {
|
|
100
100
|
'spot': 'https://www.bitrue.com/api',
|
|
101
101
|
'fapi': 'https://fapi.bitrue.com/fapi',
|
package/dist/cjs/src/bitso.js
CHANGED
|
@@ -96,7 +96,7 @@ class bitso extends bitso$1 {
|
|
|
96
96
|
'withdraw': true,
|
|
97
97
|
},
|
|
98
98
|
'urls': {
|
|
99
|
-
'logo': 'https://
|
|
99
|
+
'logo': 'https://github.com/user-attachments/assets/178c8e56-9054-4107-b192-5e5053d4f975',
|
|
100
100
|
'api': {
|
|
101
101
|
'rest': 'https://bitso.com/api',
|
|
102
102
|
},
|
package/dist/cjs/src/bitstamp.js
CHANGED
|
@@ -94,7 +94,7 @@ class bitstamp extends bitstamp$1 {
|
|
|
94
94
|
'withdraw': true,
|
|
95
95
|
},
|
|
96
96
|
'urls': {
|
|
97
|
-
'logo': 'https://
|
|
97
|
+
'logo': 'https://github.com/user-attachments/assets/d5480572-1fee-43cb-b900-d38c522d0024',
|
|
98
98
|
'api': {
|
|
99
99
|
'public': 'https://www.bitstamp.net/api',
|
|
100
100
|
'private': 'https://www.bitstamp.net/api',
|
package/dist/cjs/src/bitteam.js
CHANGED
|
@@ -128,7 +128,7 @@ class bitteam extends bitteam$1 {
|
|
|
128
128
|
'1d': '1D',
|
|
129
129
|
},
|
|
130
130
|
'urls': {
|
|
131
|
-
'logo': 'https://github.com/
|
|
131
|
+
'logo': 'https://github.com/user-attachments/assets/b41b5e0d-98e5-4bd3-8a6e-aeb230a4a135',
|
|
132
132
|
'api': {
|
|
133
133
|
'history': 'https://history.bit.team',
|
|
134
134
|
'public': 'https://bit.team',
|
package/dist/cjs/src/bitvavo.js
CHANGED
|
@@ -109,7 +109,7 @@ class bitvavo extends bitvavo$1 {
|
|
|
109
109
|
'1d': '1d',
|
|
110
110
|
},
|
|
111
111
|
'urls': {
|
|
112
|
-
'logo': 'https://
|
|
112
|
+
'logo': 'https://github.com/user-attachments/assets/d213155c-8c71-4701-9bd5-45351febc2a8',
|
|
113
113
|
'api': {
|
|
114
114
|
'public': 'https://api.bitvavo.com',
|
|
115
115
|
'private': 'https://api.bitvavo.com',
|
package/dist/cjs/src/bl3p.js
CHANGED
|
@@ -80,7 +80,7 @@ class bl3p extends bl3p$1 {
|
|
|
80
80
|
'ws': false,
|
|
81
81
|
},
|
|
82
82
|
'urls': {
|
|
83
|
-
'logo': 'https://
|
|
83
|
+
'logo': 'https://github.com/user-attachments/assets/75aeb14e-cd48-43c8-8492-dff002dea0be',
|
|
84
84
|
'api': {
|
|
85
85
|
'rest': 'https://api.bl3p.eu',
|
|
86
86
|
},
|
|
@@ -76,7 +76,7 @@ class blockchaincom extends blockchaincom$1 {
|
|
|
76
76
|
},
|
|
77
77
|
'timeframes': undefined,
|
|
78
78
|
'urls': {
|
|
79
|
-
'logo': 'https://
|
|
79
|
+
'logo': 'https://github.com/user-attachments/assets/975e3054-3399-4363-bcee-ec3c6d63d4e8',
|
|
80
80
|
'test': {
|
|
81
81
|
'public': 'https://testnet-api.delta.exchange',
|
|
82
82
|
'private': 'https://testnet-api.delta.exchange',
|
package/dist/cjs/src/blofin.js
CHANGED
|
@@ -153,7 +153,7 @@ class blofin extends blofin$1 {
|
|
|
153
153
|
},
|
|
154
154
|
'hostname': 'www.blofin.com',
|
|
155
155
|
'urls': {
|
|
156
|
-
'logo': 'https://github.com/
|
|
156
|
+
'logo': 'https://github.com/user-attachments/assets/518cdf80-f05d-4821-a3e3-d48ceb41d73b',
|
|
157
157
|
'api': {
|
|
158
158
|
'rest': 'https://openapi.blofin.com',
|
|
159
159
|
},
|
package/dist/cjs/src/btcalpha.js
CHANGED
|
@@ -99,7 +99,7 @@ class btcalpha extends btcalpha$1 {
|
|
|
99
99
|
'1d': 'D',
|
|
100
100
|
},
|
|
101
101
|
'urls': {
|
|
102
|
-
'logo': 'https://
|
|
102
|
+
'logo': 'https://github.com/user-attachments/assets/dce49f3a-61e5-4ba0-a2fe-41d192fd0e5d',
|
|
103
103
|
'api': {
|
|
104
104
|
'rest': 'https://btc-alpha.com/api',
|
|
105
105
|
},
|
package/dist/cjs/src/btcbox.js
CHANGED
|
@@ -79,7 +79,7 @@ class btcbox extends btcbox$1 {
|
|
|
79
79
|
'ws': false,
|
|
80
80
|
},
|
|
81
81
|
'urls': {
|
|
82
|
-
'logo': 'https://
|
|
82
|
+
'logo': 'https://github.com/user-attachments/assets/1e2cb499-8d0f-4f8f-9464-3c015cfbc76b',
|
|
83
83
|
'api': {
|
|
84
84
|
'rest': 'https://www.btcbox.co.jp/api',
|
|
85
85
|
},
|
|
@@ -84,7 +84,7 @@ class btcmarkets extends btcmarkets$1 {
|
|
|
84
84
|
'withdraw': true,
|
|
85
85
|
},
|
|
86
86
|
'urls': {
|
|
87
|
-
'logo': 'https://
|
|
87
|
+
'logo': 'https://github.com/user-attachments/assets/8c8d6907-3873-4cc4-ad20-e22fba28247e',
|
|
88
88
|
'api': {
|
|
89
89
|
'public': 'https://api.btcmarkets.net',
|
|
90
90
|
'private': 'https://api.btcmarkets.net',
|
package/dist/cjs/src/btcturk.js
CHANGED
|
@@ -87,7 +87,7 @@ class btcturk extends btcturk$1 {
|
|
|
87
87
|
'1y': '1 y',
|
|
88
88
|
},
|
|
89
89
|
'urls': {
|
|
90
|
-
'logo': 'https://
|
|
90
|
+
'logo': 'https://github.com/user-attachments/assets/10e0a238-9f60-4b06-9dda-edfc7602f1d6',
|
|
91
91
|
'api': {
|
|
92
92
|
'public': 'https://api.btcturk.com/api/v2',
|
|
93
93
|
'private': 'https://api.btcturk.com/api/v1',
|