ccxt 4.3.5 → 4.3.7
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 +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +5 -0
- package/dist/cjs/src/alpaca.js +6 -0
- package/dist/cjs/src/base/Exchange.js +37 -0
- package/dist/cjs/src/binance.js +4 -0
- package/dist/cjs/src/bingx.js +47 -0
- package/dist/cjs/src/bitbank.js +3 -0
- package/dist/cjs/src/bitget.js +74 -1
- package/dist/cjs/src/bithumb.js +4 -0
- package/dist/cjs/src/bitmex.js +26 -0
- package/dist/cjs/src/bitopro.js +5 -0
- package/dist/cjs/src/bitso.js +3 -0
- package/dist/cjs/src/bitstamp.js +3 -0
- package/dist/cjs/src/bitteam.js +4 -0
- package/dist/cjs/src/bitvavo.js +3 -0
- package/dist/cjs/src/bl3p.js +3 -0
- package/dist/cjs/src/btcalpha.js +3 -0
- package/dist/cjs/src/btcbox.js +3 -0
- package/dist/cjs/src/btcmarkets.js +3 -0
- package/dist/cjs/src/btcturk.js +3 -0
- package/dist/cjs/src/bybit.js +209 -12
- package/dist/cjs/src/cex.js +6 -0
- package/dist/cjs/src/coinbase.js +100 -21
- package/dist/cjs/src/coinbaseinternational.js +2 -0
- package/dist/cjs/src/coinbasepro.js +6 -0
- package/dist/cjs/src/coincheck.js +3 -0
- package/dist/cjs/src/coinex.js +180 -75
- package/dist/cjs/src/coinlist.js +4 -0
- package/dist/cjs/src/coinmate.js +3 -0
- package/dist/cjs/src/coinone.js +3 -0
- package/dist/cjs/src/coinsph.js +4 -0
- package/dist/cjs/src/coinspot.js +3 -0
- package/dist/cjs/src/cryptocom.js +34 -0
- package/dist/cjs/src/exmo.js +5 -0
- package/dist/cjs/src/gate.js +124 -22
- package/dist/cjs/src/hitbtc.js +4 -3
- package/dist/cjs/src/htx.js +30 -0
- package/dist/cjs/src/hyperliquid.js +40 -0
- package/dist/cjs/src/idex.js +3 -0
- package/dist/cjs/src/independentreserve.js +3 -0
- package/dist/cjs/src/indodax.js +3 -0
- package/dist/cjs/src/kraken.js +30 -0
- package/dist/cjs/src/krakenfutures.js +28 -0
- package/dist/cjs/src/kucoin.js +2 -0
- package/dist/cjs/src/kucoinfutures.js +4 -2
- package/dist/cjs/src/latoken.js +6 -0
- package/dist/cjs/src/luno.js +3 -0
- package/dist/cjs/src/lykke.js +5 -0
- package/dist/cjs/src/mercado.js +3 -0
- package/dist/cjs/src/mexc.js +111 -0
- package/dist/cjs/src/ndax.js +4 -0
- package/dist/cjs/src/novadax.js +4 -0
- package/dist/cjs/src/okx.js +196 -0
- package/dist/cjs/src/onetrading.js +3 -0
- package/dist/cjs/src/p2b.js +3 -0
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/coinbase.js +30 -29
- package/dist/cjs/src/probit.js +3 -0
- package/dist/cjs/src/timex.js +3 -0
- package/dist/cjs/src/tradeogre.js +3 -0
- package/dist/cjs/src/wavesexchange.js +3 -0
- package/dist/cjs/src/wazirx.js +3 -0
- package/dist/cjs/src/whitebit.js +42 -0
- package/dist/cjs/src/woo.js +31 -0
- package/dist/cjs/src/yobit.js +3 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/bingx.d.ts +1 -0
- package/js/src/abstract/coinbase.d.ts +5 -0
- package/js/src/abstract/woo.d.ts +1 -0
- package/js/src/ace.js +5 -0
- package/js/src/alpaca.js +6 -0
- package/js/src/ascendex.d.ts +2 -2
- package/js/src/base/Exchange.d.ts +5 -0
- package/js/src/base/Exchange.js +37 -0
- package/js/src/bigone.d.ts +1 -1
- package/js/src/binance.d.ts +3 -3
- package/js/src/binance.js +4 -0
- package/js/src/bingx.d.ts +2 -1
- package/js/src/bingx.js +47 -0
- package/js/src/bitbank.d.ts +1 -1
- package/js/src/bitbank.js +3 -0
- package/js/src/bitfinex.d.ts +1 -1
- package/js/src/bitfinex2.d.ts +1 -1
- package/js/src/bitflyer.d.ts +1 -1
- package/js/src/bitget.d.ts +4 -3
- package/js/src/bitget.js +74 -1
- package/js/src/bithumb.d.ts +1 -1
- package/js/src/bithumb.js +4 -0
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmex.d.ts +2 -1
- package/js/src/bitmex.js +26 -0
- package/js/src/bitopro.d.ts +1 -1
- package/js/src/bitopro.js +5 -0
- package/js/src/bitrue.d.ts +1 -1
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitso.js +3 -0
- package/js/src/bitstamp.d.ts +1 -1
- package/js/src/bitstamp.js +3 -0
- package/js/src/bitteam.js +4 -0
- package/js/src/bitvavo.d.ts +1 -1
- package/js/src/bitvavo.js +3 -0
- package/js/src/bl3p.js +3 -0
- package/js/src/blockchaincom.d.ts +1 -1
- package/js/src/btcalpha.js +3 -0
- package/js/src/btcbox.js +3 -0
- package/js/src/btcmarkets.d.ts +1 -1
- package/js/src/btcmarkets.js +3 -0
- package/js/src/btcturk.js +3 -0
- package/js/src/bybit.d.ts +8 -6
- package/js/src/bybit.js +209 -12
- package/js/src/cex.js +6 -0
- package/js/src/coinbase.d.ts +1 -1
- package/js/src/coinbase.js +100 -21
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +2 -0
- package/js/src/coinbasepro.d.ts +1 -1
- package/js/src/coinbasepro.js +6 -0
- package/js/src/coincheck.js +3 -0
- package/js/src/coinex.d.ts +8 -7
- package/js/src/coinex.js +180 -75
- package/js/src/coinlist.d.ts +1 -1
- package/js/src/coinlist.js +4 -0
- package/js/src/coinmate.d.ts +1 -1
- package/js/src/coinmate.js +3 -0
- package/js/src/coinone.js +3 -0
- package/js/src/coinsph.d.ts +1 -1
- package/js/src/coinsph.js +4 -0
- package/js/src/coinspot.js +3 -0
- package/js/src/cryptocom.d.ts +3 -2
- package/js/src/cryptocom.js +34 -0
- package/js/src/delta.d.ts +2 -2
- package/js/src/deribit.d.ts +1 -1
- package/js/src/digifinex.d.ts +3 -3
- package/js/src/exmo.d.ts +3 -3
- package/js/src/exmo.js +5 -0
- package/js/src/gate.d.ts +8 -7
- package/js/src/gate.js +124 -22
- package/js/src/gemini.d.ts +1 -1
- package/js/src/hitbtc.d.ts +3 -3
- package/js/src/hitbtc.js +4 -3
- package/js/src/hollaex.d.ts +1 -1
- package/js/src/htx.d.ts +2 -1
- package/js/src/htx.js +30 -0
- package/js/src/huobijp.d.ts +1 -1
- package/js/src/hyperliquid.d.ts +3 -2
- package/js/src/hyperliquid.js +40 -0
- package/js/src/idex.d.ts +1 -1
- package/js/src/idex.js +3 -0
- package/js/src/independentreserve.js +3 -0
- package/js/src/indodax.d.ts +1 -1
- package/js/src/indodax.js +3 -0
- package/js/src/kraken.d.ts +2 -1
- package/js/src/kraken.js +30 -0
- package/js/src/krakenfutures.d.ts +1 -0
- package/js/src/krakenfutures.js +28 -0
- package/js/src/kucoin.d.ts +1 -1
- package/js/src/kucoin.js +2 -0
- package/js/src/kucoinfutures.d.ts +1 -1
- package/js/src/kucoinfutures.js +4 -2
- package/js/src/kuna.d.ts +1 -1
- package/js/src/latoken.js +6 -0
- package/js/src/lbank.d.ts +1 -1
- package/js/src/luno.js +3 -0
- package/js/src/lykke.d.ts +1 -1
- package/js/src/lykke.js +5 -0
- package/js/src/mercado.d.ts +1 -1
- package/js/src/mercado.js +3 -0
- package/js/src/mexc.d.ts +4 -3
- package/js/src/mexc.js +111 -0
- package/js/src/ndax.d.ts +1 -1
- package/js/src/ndax.js +4 -0
- package/js/src/novadax.d.ts +1 -1
- package/js/src/novadax.js +4 -0
- package/js/src/okcoin.d.ts +1 -1
- package/js/src/okx.d.ts +11 -8
- package/js/src/okx.js +196 -0
- package/js/src/onetrading.d.ts +1 -1
- package/js/src/onetrading.js +3 -0
- package/js/src/p2b.js +3 -0
- package/js/src/phemex.d.ts +1 -1
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/pro/bitget.d.ts +1 -1
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/coinbase.d.ts +2 -2
- package/js/src/pro/coinbase.js +30 -29
- package/js/src/probit.d.ts +1 -1
- package/js/src/probit.js +3 -0
- package/js/src/timex.js +3 -0
- package/js/src/tokocrypto.d.ts +1 -1
- package/js/src/tradeogre.js +3 -0
- package/js/src/upbit.d.ts +1 -1
- package/js/src/wavesexchange.d.ts +1 -1
- package/js/src/wavesexchange.js +3 -0
- package/js/src/wazirx.js +3 -0
- package/js/src/whitebit.d.ts +2 -1
- package/js/src/whitebit.js +42 -0
- package/js/src/woo.d.ts +3 -2
- package/js/src/woo.js +31 -0
- package/js/src/yobit.d.ts +1 -1
- package/js/src/yobit.js +3 -0
- package/js/src/zaif.d.ts +1 -1
- package/js/src/zonda.d.ts +1 -1
- package/package.json +1 -1
package/js/src/coinex.js
CHANGED
|
@@ -93,7 +93,9 @@ export default class coinex extends Exchange {
|
|
|
93
93
|
'fetchOrder': true,
|
|
94
94
|
'fetchOrderBook': true,
|
|
95
95
|
'fetchPosition': true,
|
|
96
|
+
'fetchPositionHistory': true,
|
|
96
97
|
'fetchPositions': true,
|
|
98
|
+
'fetchPositionsHistory': false,
|
|
97
99
|
'fetchPositionsRisk': false,
|
|
98
100
|
'fetchPremiumIndexOHLCV': false,
|
|
99
101
|
'fetchTicker': true,
|
|
@@ -1132,14 +1134,13 @@ export default class coinex extends Exchange {
|
|
|
1132
1134
|
//
|
|
1133
1135
|
// Spot and Swap fetchTrades (public)
|
|
1134
1136
|
//
|
|
1135
|
-
//
|
|
1136
|
-
//
|
|
1137
|
-
//
|
|
1138
|
-
//
|
|
1139
|
-
//
|
|
1140
|
-
//
|
|
1141
|
-
//
|
|
1142
|
-
// },
|
|
1137
|
+
// {
|
|
1138
|
+
// "amount": "0.00049432",
|
|
1139
|
+
// "created_at": 1713849825667,
|
|
1140
|
+
// "deal_id": 4137517302,
|
|
1141
|
+
// "price": "66251",
|
|
1142
|
+
// "side": "buy"
|
|
1143
|
+
// }
|
|
1143
1144
|
//
|
|
1144
1145
|
// Spot and Margin fetchMyTrades (private)
|
|
1145
1146
|
//
|
|
@@ -1193,9 +1194,9 @@ export default class coinex extends Exchange {
|
|
|
1193
1194
|
//
|
|
1194
1195
|
let timestamp = this.safeTimestamp2(trade, 'create_time', 'time');
|
|
1195
1196
|
if (timestamp === undefined) {
|
|
1196
|
-
timestamp = this.safeInteger(trade, '
|
|
1197
|
+
timestamp = this.safeInteger(trade, 'created_at');
|
|
1197
1198
|
}
|
|
1198
|
-
const tradeId = this.
|
|
1199
|
+
const tradeId = this.safeString2(trade, 'id', 'deal_id');
|
|
1199
1200
|
const orderId = this.safeString(trade, 'order_id');
|
|
1200
1201
|
const priceString = this.safeString(trade, 'price');
|
|
1201
1202
|
const amountString = this.safeString(trade, 'amount');
|
|
@@ -1232,11 +1233,11 @@ export default class coinex extends Exchange {
|
|
|
1232
1233
|
side = 'buy';
|
|
1233
1234
|
}
|
|
1234
1235
|
if (side === undefined) {
|
|
1235
|
-
side = this.
|
|
1236
|
+
side = this.safeString2(trade, 'type', 'side');
|
|
1236
1237
|
}
|
|
1237
1238
|
}
|
|
1238
1239
|
else {
|
|
1239
|
-
side = this.
|
|
1240
|
+
side = this.safeString2(trade, 'type', 'side');
|
|
1240
1241
|
}
|
|
1241
1242
|
return this.safeTrade({
|
|
1242
1243
|
'info': trade,
|
|
@@ -1258,9 +1259,9 @@ export default class coinex extends Exchange {
|
|
|
1258
1259
|
/**
|
|
1259
1260
|
* @method
|
|
1260
1261
|
* @name coinex#fetchTrades
|
|
1261
|
-
* @description get the list of most recent trades for a particular symbol
|
|
1262
|
-
* @see https://
|
|
1263
|
-
* @see https://
|
|
1262
|
+
* @description get the list of the most recent trades for a particular symbol
|
|
1263
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-deals
|
|
1264
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-deals
|
|
1264
1265
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1265
1266
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1266
1267
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -1278,28 +1279,27 @@ export default class coinex extends Exchange {
|
|
|
1278
1279
|
}
|
|
1279
1280
|
let response = undefined;
|
|
1280
1281
|
if (market['swap']) {
|
|
1281
|
-
response = await this.
|
|
1282
|
+
response = await this.v2PublicGetFuturesDeals(this.extend(request, params));
|
|
1282
1283
|
}
|
|
1283
1284
|
else {
|
|
1284
|
-
response = await this.
|
|
1285
|
+
response = await this.v2PublicGetSpotDeals(this.extend(request, params));
|
|
1285
1286
|
}
|
|
1286
1287
|
//
|
|
1287
1288
|
// Spot and Swap
|
|
1288
1289
|
//
|
|
1289
|
-
//
|
|
1290
|
-
//
|
|
1291
|
-
//
|
|
1292
|
-
//
|
|
1293
|
-
//
|
|
1294
|
-
//
|
|
1295
|
-
//
|
|
1296
|
-
//
|
|
1297
|
-
//
|
|
1298
|
-
//
|
|
1299
|
-
//
|
|
1300
|
-
//
|
|
1301
|
-
//
|
|
1302
|
-
// }
|
|
1290
|
+
// {
|
|
1291
|
+
// "code": 0,
|
|
1292
|
+
// "data": [
|
|
1293
|
+
// {
|
|
1294
|
+
// "amount": "0.00049432",
|
|
1295
|
+
// "created_at": 1713849825667,
|
|
1296
|
+
// "deal_id": 4137517302,
|
|
1297
|
+
// "price": "66251",
|
|
1298
|
+
// "side": "buy"
|
|
1299
|
+
// },
|
|
1300
|
+
// ],
|
|
1301
|
+
// "message": "OK"
|
|
1302
|
+
// }
|
|
1303
1303
|
//
|
|
1304
1304
|
return this.parseTrades(response['data'], market, since, limit);
|
|
1305
1305
|
}
|
|
@@ -1457,24 +1457,24 @@ export default class coinex extends Exchange {
|
|
|
1457
1457
|
}
|
|
1458
1458
|
parseOHLCV(ohlcv, market = undefined) {
|
|
1459
1459
|
//
|
|
1460
|
-
//
|
|
1461
|
-
//
|
|
1462
|
-
// "
|
|
1463
|
-
// "
|
|
1464
|
-
// "
|
|
1465
|
-
// "
|
|
1466
|
-
// "
|
|
1467
|
-
// "
|
|
1468
|
-
// "
|
|
1469
|
-
//
|
|
1460
|
+
// {
|
|
1461
|
+
// "close": "66999.95",
|
|
1462
|
+
// "created_at": 1713934620000,
|
|
1463
|
+
// "high": "66999.95",
|
|
1464
|
+
// "low": "66988.53",
|
|
1465
|
+
// "market": "BTCUSDT",
|
|
1466
|
+
// "open": "66988.53",
|
|
1467
|
+
// "value": "0.1572393", // base volume
|
|
1468
|
+
// "volume": "10533.2501364336" // quote volume
|
|
1469
|
+
// }
|
|
1470
1470
|
//
|
|
1471
1471
|
return [
|
|
1472
|
-
this.
|
|
1473
|
-
this.safeNumber(ohlcv,
|
|
1474
|
-
this.safeNumber(ohlcv,
|
|
1475
|
-
this.safeNumber(ohlcv,
|
|
1476
|
-
this.safeNumber(ohlcv,
|
|
1477
|
-
this.safeNumber(ohlcv,
|
|
1472
|
+
this.safeInteger(ohlcv, 'created_at'),
|
|
1473
|
+
this.safeNumber(ohlcv, 'open'),
|
|
1474
|
+
this.safeNumber(ohlcv, 'high'),
|
|
1475
|
+
this.safeNumber(ohlcv, 'low'),
|
|
1476
|
+
this.safeNumber(ohlcv, 'close'),
|
|
1477
|
+
this.safeNumber(ohlcv, 'value'),
|
|
1478
1478
|
];
|
|
1479
1479
|
}
|
|
1480
1480
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
@@ -1482,8 +1482,8 @@ export default class coinex extends Exchange {
|
|
|
1482
1482
|
* @method
|
|
1483
1483
|
* @name coinex#fetchOHLCV
|
|
1484
1484
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1485
|
-
* @see https://
|
|
1486
|
-
* @see https://
|
|
1485
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-kline
|
|
1486
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-kline
|
|
1487
1487
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1488
1488
|
* @param {string} timeframe the length of time each candle represents
|
|
1489
1489
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -1495,39 +1495,34 @@ export default class coinex extends Exchange {
|
|
|
1495
1495
|
const market = this.market(symbol);
|
|
1496
1496
|
const request = {
|
|
1497
1497
|
'market': market['id'],
|
|
1498
|
-
'
|
|
1498
|
+
'period': this.safeString(this.timeframes, timeframe, timeframe),
|
|
1499
1499
|
};
|
|
1500
1500
|
if (limit !== undefined) {
|
|
1501
1501
|
request['limit'] = limit;
|
|
1502
1502
|
}
|
|
1503
1503
|
let response = undefined;
|
|
1504
1504
|
if (market['swap']) {
|
|
1505
|
-
response = await this.
|
|
1505
|
+
response = await this.v2PublicGetFuturesKline(this.extend(request, params));
|
|
1506
1506
|
}
|
|
1507
1507
|
else {
|
|
1508
|
-
response = await this.
|
|
1508
|
+
response = await this.v2PublicGetSpotKline(this.extend(request, params));
|
|
1509
1509
|
}
|
|
1510
1510
|
//
|
|
1511
|
-
// Spot
|
|
1512
|
-
//
|
|
1513
|
-
// {
|
|
1514
|
-
// "code": 0,
|
|
1515
|
-
// "data": [
|
|
1516
|
-
// [1591484400, "0.02505349", "0.02506988", "0.02507000", "0.02505304", "343.19716223", "8.6021323866383196", "ETHBTC"],
|
|
1517
|
-
// [1591484700, "0.02506990", "0.02508109", "0.02508109", "0.02506979", "91.59841581", "2.2972047780447000", "ETHBTC"],
|
|
1518
|
-
// [1591485000, "0.02508106", "0.02507996", "0.02508106", "0.02507500", "65.15307697", "1.6340597822306000", "ETHBTC"],
|
|
1519
|
-
// ],
|
|
1520
|
-
// "message": "OK"
|
|
1521
|
-
// }
|
|
1522
|
-
//
|
|
1523
|
-
// Swap
|
|
1511
|
+
// Spot and Swap
|
|
1524
1512
|
//
|
|
1525
1513
|
// {
|
|
1526
1514
|
// "code": 0,
|
|
1527
1515
|
// "data": [
|
|
1528
|
-
//
|
|
1529
|
-
//
|
|
1530
|
-
//
|
|
1516
|
+
// {
|
|
1517
|
+
// "close": "66999.95",
|
|
1518
|
+
// "created_at": 1713934620000,
|
|
1519
|
+
// "high": "66999.95",
|
|
1520
|
+
// "low": "66988.53",
|
|
1521
|
+
// "market": "BTCUSDT",
|
|
1522
|
+
// "open": "66988.53",
|
|
1523
|
+
// "value": "0.1572393",
|
|
1524
|
+
// "volume": "10533.2501364336"
|
|
1525
|
+
// },
|
|
1531
1526
|
// ],
|
|
1532
1527
|
// "message": "OK"
|
|
1533
1528
|
// }
|
|
@@ -3768,7 +3763,7 @@ export default class coinex extends Exchange {
|
|
|
3768
3763
|
// "side": 2,
|
|
3769
3764
|
// "stop_loss_price": "0.00000000000000000000",
|
|
3770
3765
|
// "stop_loss_type": 0,
|
|
3771
|
-
// "
|
|
3766
|
+
// "sy s": 0,
|
|
3772
3767
|
// "take_profit_price": "0.00000000000000000000",
|
|
3773
3768
|
// "take_profit_type": 0,
|
|
3774
3769
|
// "taker_fee": "0.00000000000000000000",
|
|
@@ -3850,7 +3845,7 @@ export default class coinex extends Exchange {
|
|
|
3850
3845
|
// "side": 2,
|
|
3851
3846
|
// "stop_loss_price": "0.00000000000000000000",
|
|
3852
3847
|
// "stop_loss_type": 0,
|
|
3853
|
-
// "
|
|
3848
|
+
// "s ys": 0,
|
|
3854
3849
|
// "take_profit_price": "0.00000000000000000000",
|
|
3855
3850
|
// "take_profit_type": 0,
|
|
3856
3851
|
// "taker_fee": "0.00000000000000000000",
|
|
@@ -3867,6 +3862,8 @@ export default class coinex extends Exchange {
|
|
|
3867
3862
|
return this.parsePosition(data[0], market);
|
|
3868
3863
|
}
|
|
3869
3864
|
parsePosition(position, market = undefined) {
|
|
3865
|
+
//
|
|
3866
|
+
// fetchPosition
|
|
3870
3867
|
//
|
|
3871
3868
|
// {
|
|
3872
3869
|
// "adl_sort": 3396,
|
|
@@ -3910,7 +3907,7 @@ export default class coinex extends Exchange {
|
|
|
3910
3907
|
// "side": 2,
|
|
3911
3908
|
// "stop_loss_price": "0.00000000000000000000",
|
|
3912
3909
|
// "stop_loss_type": 0,
|
|
3913
|
-
// "
|
|
3910
|
+
// "s ys": 0,
|
|
3914
3911
|
// "take_profit_price": "0.00000000000000000000",
|
|
3915
3912
|
// "take_profit_type": 0,
|
|
3916
3913
|
// "taker_fee": "0.00000000000000000000",
|
|
@@ -3920,6 +3917,40 @@ export default class coinex extends Exchange {
|
|
|
3920
3917
|
// "user_id": 3620173
|
|
3921
3918
|
// }
|
|
3922
3919
|
//
|
|
3920
|
+
//
|
|
3921
|
+
// fetchPositionHistory
|
|
3922
|
+
//
|
|
3923
|
+
// {
|
|
3924
|
+
// amount_max: '10',
|
|
3925
|
+
// amount_max_margin: '2.03466666666666666666',
|
|
3926
|
+
// bkr_price: '0',
|
|
3927
|
+
// create_time: '1711150526.2581',
|
|
3928
|
+
// deal_all: '12.591',
|
|
3929
|
+
// deal_asset_fee: '0',
|
|
3930
|
+
// fee_asset: '',
|
|
3931
|
+
// finish_type: '5',
|
|
3932
|
+
// first_price: '0.6104',
|
|
3933
|
+
// latest_price: '0.6487',
|
|
3934
|
+
// leverage: '3',
|
|
3935
|
+
// liq_amount: '0',
|
|
3936
|
+
// liq_price: '0',
|
|
3937
|
+
// liq_profit: '0',
|
|
3938
|
+
// mainten_margin: '0.01',
|
|
3939
|
+
// market: 'XRPUSDT',
|
|
3940
|
+
// market_type: '1',
|
|
3941
|
+
// open_price: '0.6104',
|
|
3942
|
+
// open_val_max: '6.104',
|
|
3943
|
+
// position_id: '297371462',
|
|
3944
|
+
// profit_real: '0.35702107169',
|
|
3945
|
+
// settle_price: '0.6104',
|
|
3946
|
+
// settle_val: '0',
|
|
3947
|
+
// side: '2',
|
|
3948
|
+
// s ys: "0",
|
|
3949
|
+
// type: '2',
|
|
3950
|
+
// update_time: '1711391446.133233',
|
|
3951
|
+
// user_id: '3685860'
|
|
3952
|
+
// }
|
|
3953
|
+
//
|
|
3923
3954
|
const marketId = this.safeString(position, 'market');
|
|
3924
3955
|
market = this.safeMarket(marketId, market, undefined, 'swap');
|
|
3925
3956
|
const symbol = market['symbol'];
|
|
@@ -3935,7 +3966,7 @@ export default class coinex extends Exchange {
|
|
|
3935
3966
|
const timestamp = this.safeTimestamp(position, 'update_time');
|
|
3936
3967
|
const maintenanceMargin = this.safeString(position, 'mainten_margin_amount');
|
|
3937
3968
|
const maintenanceMarginPercentage = this.safeString(position, 'mainten_margin');
|
|
3938
|
-
const collateral = this.
|
|
3969
|
+
const collateral = this.safeString2(position, 'margin_amount', 'amount_max_margin');
|
|
3939
3970
|
const leverage = this.safeString(position, 'leverage');
|
|
3940
3971
|
const notional = this.safeString(position, 'open_val');
|
|
3941
3972
|
const initialMargin = Precise.stringDiv(notional, leverage);
|
|
@@ -4165,7 +4196,7 @@ export default class coinex extends Exchange {
|
|
|
4165
4196
|
// "side": 2,
|
|
4166
4197
|
// "stop_loss_price": "0.00000000000000000000",
|
|
4167
4198
|
// "stop_loss_type": 0,
|
|
4168
|
-
// "
|
|
4199
|
+
// "s ys": 0,
|
|
4169
4200
|
// "take_profit_price": "0.00000000000000000000",
|
|
4170
4201
|
// "take_profit_type": 0,
|
|
4171
4202
|
// "taker_fee": "0.00000000000000000000",
|
|
@@ -4230,7 +4261,7 @@ export default class coinex extends Exchange {
|
|
|
4230
4261
|
// "side": 2,
|
|
4231
4262
|
// "stop_loss_price": "0.00000000000000000000",
|
|
4232
4263
|
// "stop_loss_type": 0,
|
|
4233
|
-
// "
|
|
4264
|
+
// "sy s": 0,
|
|
4234
4265
|
// "take_profit_price": "0.00000000000000000000",
|
|
4235
4266
|
// "take_profit_type": 0,
|
|
4236
4267
|
// "taker_fee": "0.00000000000000000000",
|
|
@@ -4487,7 +4518,7 @@ export default class coinex extends Exchange {
|
|
|
4487
4518
|
}
|
|
4488
4519
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
4489
4520
|
/**
|
|
4490
|
-
*
|
|
4521
|
+
* @method
|
|
4491
4522
|
* @name coinex#fetchFundingRates
|
|
4492
4523
|
* @description fetch the current funding rates
|
|
4493
4524
|
* @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http009_market_ticker_all
|
|
@@ -5613,6 +5644,80 @@ export default class coinex extends Exchange {
|
|
|
5613
5644
|
'shortLeverage': leverageValue,
|
|
5614
5645
|
};
|
|
5615
5646
|
}
|
|
5647
|
+
async fetchPositionHistory(symbol, since = undefined, limit = undefined, params = {}) {
|
|
5648
|
+
/**
|
|
5649
|
+
* @method
|
|
5650
|
+
* @name coinex#fetchPositionHistory
|
|
5651
|
+
* @description fetches historical positions
|
|
5652
|
+
* @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http033-0_finished_position
|
|
5653
|
+
* @param {string} symbol unified contract symbol
|
|
5654
|
+
* @param {int} [since] not used by coinex fetchPositionHistory
|
|
5655
|
+
* @param {int} [limit] the maximum amount of records to fetch, default=1000
|
|
5656
|
+
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
5657
|
+
*
|
|
5658
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
5659
|
+
* @param {int} [params.side] 0: all 1: sell, 2: buy
|
|
5660
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
5661
|
+
*/
|
|
5662
|
+
await this.loadMarkets();
|
|
5663
|
+
const market = this.market(symbol);
|
|
5664
|
+
if (limit === undefined) {
|
|
5665
|
+
limit = 1000;
|
|
5666
|
+
}
|
|
5667
|
+
const request = {
|
|
5668
|
+
'market': market['id'],
|
|
5669
|
+
'side': 0,
|
|
5670
|
+
'limit': limit,
|
|
5671
|
+
};
|
|
5672
|
+
const response = await this.v1PerpetualPrivateGetPositionFinished(this.extend(request, params));
|
|
5673
|
+
//
|
|
5674
|
+
// {
|
|
5675
|
+
// code: '0',
|
|
5676
|
+
// data: {
|
|
5677
|
+
// limit: '1000',
|
|
5678
|
+
// offset: '0',
|
|
5679
|
+
// records: [
|
|
5680
|
+
// {
|
|
5681
|
+
// amount_max: '10',
|
|
5682
|
+
// amount_max_margin: '2.03466666666666666666',
|
|
5683
|
+
// bkr_price: '0',
|
|
5684
|
+
// create_time: '1711150526.2581',
|
|
5685
|
+
// deal_all: '12.591',
|
|
5686
|
+
// deal_asset_fee: '0',
|
|
5687
|
+
// fee_asset: '',
|
|
5688
|
+
// finish_type: '5',
|
|
5689
|
+
// first_price: '0.6104',
|
|
5690
|
+
// latest_price: '0.6487',
|
|
5691
|
+
// leverage: '3',
|
|
5692
|
+
// liq_amount: '0',
|
|
5693
|
+
// liq_price: '0',
|
|
5694
|
+
// liq_profit: '0',
|
|
5695
|
+
// mainten_margin: '0.01',
|
|
5696
|
+
// market: 'XRPUSDT',
|
|
5697
|
+
// market_type: '1',
|
|
5698
|
+
// open_price: '0.6104',
|
|
5699
|
+
// open_val_max: '6.104',
|
|
5700
|
+
// position_id: '297371462',
|
|
5701
|
+
// profit_real: '0.35702107169',
|
|
5702
|
+
// settle_price: '0.6104',
|
|
5703
|
+
// settle_val: '0',
|
|
5704
|
+
// side: '2',
|
|
5705
|
+
// sy s: '0',
|
|
5706
|
+
// type: '2',
|
|
5707
|
+
// update_time: '1711391446.133233',
|
|
5708
|
+
// user_id: '3685860'
|
|
5709
|
+
// },
|
|
5710
|
+
// ...
|
|
5711
|
+
// ]
|
|
5712
|
+
// },
|
|
5713
|
+
// message: 'OK'
|
|
5714
|
+
// }
|
|
5715
|
+
//
|
|
5716
|
+
const data = this.safeDict(response, 'data');
|
|
5717
|
+
const records = this.safeList(data, 'records');
|
|
5718
|
+
const positions = this.parsePositions(records);
|
|
5719
|
+
return this.filterBySymbolSinceLimit(positions, symbol, since, limit);
|
|
5720
|
+
}
|
|
5616
5721
|
handleMarginModeAndParams(methodName, params = {}, defaultValue = undefined) {
|
|
5617
5722
|
/**
|
|
5618
5723
|
* @ignore
|
package/js/src/coinlist.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export default class coinlist extends Exchange {
|
|
|
63
63
|
};
|
|
64
64
|
parseTransferStatus(status: any): string;
|
|
65
65
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
66
|
-
withdraw(code: string, amount: number, address:
|
|
66
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
67
67
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
68
68
|
parseTransactionType(type: any): string;
|
|
69
69
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
package/js/src/coinlist.js
CHANGED
|
@@ -90,7 +90,11 @@ export default class coinlist extends Exchange {
|
|
|
90
90
|
'fetchOrders': true,
|
|
91
91
|
'fetchOrderTrades': true,
|
|
92
92
|
'fetchPosition': false,
|
|
93
|
+
'fetchPositionHistory': false,
|
|
94
|
+
'fetchPositionMode': false,
|
|
93
95
|
'fetchPositions': false,
|
|
96
|
+
'fetchPositionsForSymbol': false,
|
|
97
|
+
'fetchPositionsHistory': false,
|
|
94
98
|
'fetchPositionsRisk': false,
|
|
95
99
|
'fetchPremiumIndexOHLCV': false,
|
|
96
100
|
'fetchStatus': false,
|
package/js/src/coinmate.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export default class coinmate extends Exchange {
|
|
|
16
16
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
17
17
|
parseTransactionStatus(status: any): string;
|
|
18
18
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
19
|
-
withdraw(code: string, amount: number, address:
|
|
19
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
20
20
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
21
21
|
parseTrade(trade: any, market?: Market): Trade;
|
|
22
22
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
package/js/src/coinmate.js
CHANGED
|
@@ -60,8 +60,11 @@ export default class coinmate extends Exchange {
|
|
|
60
60
|
'fetchOrderBook': true,
|
|
61
61
|
'fetchOrders': true,
|
|
62
62
|
'fetchPosition': false,
|
|
63
|
+
'fetchPositionHistory': false,
|
|
63
64
|
'fetchPositionMode': false,
|
|
64
65
|
'fetchPositions': false,
|
|
66
|
+
'fetchPositionsForSymbol': false,
|
|
67
|
+
'fetchPositionsHistory': false,
|
|
65
68
|
'fetchPositionsRisk': false,
|
|
66
69
|
'fetchPremiumIndexOHLCV': false,
|
|
67
70
|
'fetchTicker': true,
|
package/js/src/coinone.js
CHANGED
|
@@ -68,8 +68,11 @@ export default class coinone extends Exchange {
|
|
|
68
68
|
'fetchOrder': true,
|
|
69
69
|
'fetchOrderBook': true,
|
|
70
70
|
'fetchPosition': false,
|
|
71
|
+
'fetchPositionHistory': false,
|
|
71
72
|
'fetchPositionMode': false,
|
|
72
73
|
'fetchPositions': false,
|
|
74
|
+
'fetchPositionsForSymbol': false,
|
|
75
|
+
'fetchPositionsHistory': false,
|
|
73
76
|
'fetchPositionsRisk': false,
|
|
74
77
|
'fetchPremiumIndexOHLCV': false,
|
|
75
78
|
'fetchTicker': true,
|
package/js/src/coinsph.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export default class coinsph extends Exchange {
|
|
|
44
44
|
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
45
45
|
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
46
46
|
parseTradingFee(fee: any, market?: Market): TradingFeeInterface;
|
|
47
|
-
withdraw(code: string, amount: number, address:
|
|
47
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
48
48
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
49
49
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
50
50
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
package/js/src/coinsph.js
CHANGED
|
@@ -92,7 +92,11 @@ export default class coinsph extends Exchange {
|
|
|
92
92
|
'fetchOrders': false,
|
|
93
93
|
'fetchOrderTrades': true,
|
|
94
94
|
'fetchPosition': false,
|
|
95
|
+
'fetchPositionHistory': false,
|
|
96
|
+
'fetchPositionMode': false,
|
|
95
97
|
'fetchPositions': false,
|
|
98
|
+
'fetchPositionsForSymbol': false,
|
|
99
|
+
'fetchPositionsHistory': false,
|
|
96
100
|
'fetchPositionsRisk': false,
|
|
97
101
|
'fetchPremiumIndexOHLCV': false,
|
|
98
102
|
'fetchStatus': true,
|
package/js/src/coinspot.js
CHANGED
|
@@ -60,8 +60,11 @@ export default class coinspot extends Exchange {
|
|
|
60
60
|
'fetchOpenInterestHistory': false,
|
|
61
61
|
'fetchOrderBook': true,
|
|
62
62
|
'fetchPosition': false,
|
|
63
|
+
'fetchPositionHistory': false,
|
|
63
64
|
'fetchPositionMode': false,
|
|
64
65
|
'fetchPositions': false,
|
|
66
|
+
'fetchPositionsForSymbol': false,
|
|
67
|
+
'fetchPositionsHistory': false,
|
|
65
68
|
'fetchPositionsRisk': false,
|
|
66
69
|
'fetchPremiumIndexOHLCV': false,
|
|
67
70
|
'fetchTicker': true,
|
package/js/src/cryptocom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/cryptocom.js';
|
|
2
|
-
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, Str, Ticker, OrderRequest, Balances, Transaction, OrderBook, Tickers, Strings, Currency, Market, Num, Account } from './base/types.js';
|
|
2
|
+
import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, Str, Ticker, OrderRequest, Balances, Transaction, OrderBook, Tickers, Strings, Currency, Market, Num, Account, CancellationRequest } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class cryptocom
|
|
5
5
|
* @augments Exchange
|
|
@@ -23,10 +23,11 @@ export default class cryptocom extends Exchange {
|
|
|
23
23
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
|
|
24
24
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
25
25
|
cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
|
|
26
|
+
cancelOrdersForSymbols(orders: CancellationRequest[], params?: {}): Promise<Order[]>;
|
|
26
27
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
27
28
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
28
29
|
parseAddress(addressString: any): any[];
|
|
29
|
-
withdraw(code: string, amount: number, address:
|
|
30
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
30
31
|
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
|
|
31
32
|
fetchDepositAddress(code: string, params?: {}): Promise<any>;
|
|
32
33
|
safeNetwork(networkId: any): string;
|
package/js/src/cryptocom.js
CHANGED
|
@@ -35,6 +35,7 @@ export default class cryptocom extends Exchange {
|
|
|
35
35
|
'cancelAllOrders': true,
|
|
36
36
|
'cancelOrder': true,
|
|
37
37
|
'cancelOrders': true,
|
|
38
|
+
'cancelOrdersForSymbols': true,
|
|
38
39
|
'closeAllPositions': false,
|
|
39
40
|
'closePosition': true,
|
|
40
41
|
'createMarketBuyOrderWithCost': false,
|
|
@@ -82,8 +83,10 @@ export default class cryptocom extends Exchange {
|
|
|
82
83
|
'fetchOrderBook': true,
|
|
83
84
|
'fetchOrders': true,
|
|
84
85
|
'fetchPosition': true,
|
|
86
|
+
'fetchPositionHistory': false,
|
|
85
87
|
'fetchPositionMode': false,
|
|
86
88
|
'fetchPositions': true,
|
|
89
|
+
'fetchPositionsHistory': false,
|
|
87
90
|
'fetchPremiumIndexOHLCV': false,
|
|
88
91
|
'fetchSettlementHistory': true,
|
|
89
92
|
'fetchStatus': false,
|
|
@@ -1467,6 +1470,37 @@ export default class cryptocom extends Exchange {
|
|
|
1467
1470
|
const result = this.safeList(response, 'result', []);
|
|
1468
1471
|
return this.parseOrders(result, market, undefined, undefined, params);
|
|
1469
1472
|
}
|
|
1473
|
+
async cancelOrdersForSymbols(orders, params = {}) {
|
|
1474
|
+
/**
|
|
1475
|
+
* @method
|
|
1476
|
+
* @name cryptocom#cancelOrdersForSymbols
|
|
1477
|
+
* @description cancel multiple orders for multiple symbols
|
|
1478
|
+
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order-list-list
|
|
1479
|
+
* @param {CancellationRequest[]} orders each order should contain the parameters required by cancelOrder namely id and symbol
|
|
1480
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1481
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1482
|
+
*/
|
|
1483
|
+
await this.loadMarkets();
|
|
1484
|
+
const orderRequests = [];
|
|
1485
|
+
for (let i = 0; i < orders.length; i++) {
|
|
1486
|
+
const order = orders[i];
|
|
1487
|
+
const id = this.safeString(order, 'id');
|
|
1488
|
+
const symbol = this.safeString(order, 'symbol');
|
|
1489
|
+
const market = this.market(symbol);
|
|
1490
|
+
const orderItem = {
|
|
1491
|
+
'instrument_name': market['id'],
|
|
1492
|
+
'order_id': id.toString(),
|
|
1493
|
+
};
|
|
1494
|
+
orderRequests.push(orderItem);
|
|
1495
|
+
}
|
|
1496
|
+
const request = {
|
|
1497
|
+
'contingency_type': 'LIST',
|
|
1498
|
+
'order_list': orderRequests,
|
|
1499
|
+
};
|
|
1500
|
+
const response = await this.v1PrivatePostPrivateCancelOrderList(this.extend(request, params));
|
|
1501
|
+
const result = this.safeList(response, 'result', []);
|
|
1502
|
+
return this.parseOrders(result, undefined, undefined, undefined, params);
|
|
1503
|
+
}
|
|
1470
1504
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1471
1505
|
/**
|
|
1472
1506
|
* @method
|
package/js/src/delta.d.ts
CHANGED
|
@@ -115,8 +115,8 @@ export default class delta extends Exchange {
|
|
|
115
115
|
previousFundingTimestamp: any;
|
|
116
116
|
previousFundingDatetime: any;
|
|
117
117
|
};
|
|
118
|
-
addMargin(symbol: string, amount:
|
|
119
|
-
reduceMargin(symbol: string, amount:
|
|
118
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
119
|
+
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
120
120
|
modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
|
|
121
121
|
parseMarginModification(data: any, market?: Market): MarginModification;
|
|
122
122
|
fetchOpenInterest(symbol: string, params?: {}): Promise<import("./base/types.js").OpenInterest>;
|
package/js/src/deribit.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export default class deribit extends Exchange {
|
|
|
85
85
|
datetime: string;
|
|
86
86
|
};
|
|
87
87
|
parseTransferStatus(status: any): string;
|
|
88
|
-
withdraw(code: string, amount: number, address:
|
|
88
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
89
89
|
parseDepositWithdrawFee(fee: any, currency?: Currency): {
|
|
90
90
|
info: any;
|
|
91
91
|
withdraw: {
|
package/js/src/digifinex.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export default class digifinex extends Exchange {
|
|
|
85
85
|
status: string;
|
|
86
86
|
};
|
|
87
87
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
88
|
-
withdraw(code: string, amount: number, address:
|
|
88
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
89
89
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
90
90
|
parseBorrowInterest(info: any, market?: Market): {
|
|
91
91
|
account: string;
|
|
@@ -150,8 +150,8 @@ export default class digifinex extends Exchange {
|
|
|
150
150
|
handleMarginModeAndParams(methodName: any, params?: {}, defaultValue?: any): any[];
|
|
151
151
|
fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<{}>;
|
|
152
152
|
parseDepositWithdrawFees(response: any, codes?: any, currencyIdKey?: any): {};
|
|
153
|
-
addMargin(symbol: string, amount:
|
|
154
|
-
reduceMargin(symbol: string, amount:
|
|
153
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
154
|
+
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
155
155
|
modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
|
|
156
156
|
parseMarginModification(data: any, market?: Market): MarginModification;
|
|
157
157
|
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingHistory[]>;
|