ccxt 4.4.44 → 4.4.46
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/ccxt.browser.min.js +15 -15
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +20 -1
- package/dist/cjs/src/binance.js +161 -39
- package/dist/cjs/src/bingx.js +15 -9
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitget.js +105 -42
- package/dist/cjs/src/bitmart.js +3 -3
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/blofin.js +22 -0
- package/dist/cjs/src/bybit.js +85 -41
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/cryptocom.js +1 -1
- package/dist/cjs/src/delta.js +10 -4
- package/dist/cjs/src/exmo.js +18 -8
- package/dist/cjs/src/gate.js +1 -2
- package/dist/cjs/src/hashkey.js +7 -1
- package/dist/cjs/src/htx.js +2 -2
- package/dist/cjs/src/hyperliquid.js +3 -4
- package/dist/cjs/src/kraken.js +1 -1
- package/dist/cjs/src/krakenfutures.js +1 -1
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/kucoinfutures.js +2 -3
- package/dist/cjs/src/lykke.js +1 -1
- package/dist/cjs/src/mexc.js +3 -2
- package/dist/cjs/src/myokx.js +8 -0
- package/dist/cjs/src/okx.js +4 -4
- package/dist/cjs/src/onetrading.js +24 -5
- package/dist/cjs/src/pro/binance.js +2 -1
- package/dist/cjs/src/pro/coinex.js +1 -1
- package/dist/cjs/src/pro/myokx.js +5 -0
- package/dist/cjs/src/whitebit.js +34 -8
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/woofipro.js +2 -2
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/blofin.d.ts +22 -0
- package/js/src/ascendex.d.ts +1 -0
- package/js/src/ascendex.js +20 -1
- package/js/src/binance.d.ts +4 -0
- package/js/src/binance.js +161 -39
- package/js/src/bingx.js +15 -9
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitget.js +105 -42
- package/js/src/bitmart.js +3 -3
- package/js/src/bitmex.js +1 -1
- package/js/src/blofin.js +22 -0
- package/js/src/bybit.js +85 -41
- package/js/src/coinbase.js +1 -1
- package/js/src/coinex.js +1 -1
- package/js/src/cryptocom.js +1 -1
- package/js/src/delta.d.ts +2 -1
- package/js/src/delta.js +10 -4
- package/js/src/exmo.d.ts +1 -0
- package/js/src/exmo.js +18 -8
- package/js/src/gate.js +1 -2
- package/js/src/hashkey.js +7 -1
- package/js/src/htx.js +2 -2
- package/js/src/hyperliquid.js +3 -4
- package/js/src/kraken.js +1 -1
- package/js/src/krakenfutures.js +1 -1
- package/js/src/kucoin.js +1 -1
- package/js/src/kucoinfutures.js +2 -3
- package/js/src/lykke.js +1 -1
- package/js/src/mexc.js +3 -2
- package/js/src/myokx.js +8 -0
- package/js/src/okx.js +4 -4
- package/js/src/onetrading.d.ts +2 -1
- package/js/src/onetrading.js +24 -5
- package/js/src/pro/binance.js +2 -1
- package/js/src/pro/coinex.js +1 -1
- package/js/src/pro/myokx.js +5 -0
- package/js/src/whitebit.d.ts +2 -1
- package/js/src/whitebit.js +34 -8
- package/js/src/woo.js +1 -1
- package/js/src/woofipro.js +2 -2
- package/package.json +1 -1
package/dist/cjs/src/htx.js
CHANGED
|
@@ -1292,7 +1292,7 @@ class htx extends htx$1 {
|
|
|
1292
1292
|
'trailing': false,
|
|
1293
1293
|
'untilDays': 2,
|
|
1294
1294
|
'limit': 500,
|
|
1295
|
-
'
|
|
1295
|
+
'daysBack': 180,
|
|
1296
1296
|
'daysBackCanceled': 1 / 12,
|
|
1297
1297
|
},
|
|
1298
1298
|
'fetchOHLCV': {
|
|
@@ -1333,7 +1333,7 @@ class htx extends htx$1 {
|
|
|
1333
1333
|
'trailing': false,
|
|
1334
1334
|
'untilDays': 2,
|
|
1335
1335
|
'limit': 50,
|
|
1336
|
-
'
|
|
1336
|
+
'daysBack': 90,
|
|
1337
1337
|
'daysBackCanceled': 1 / 12,
|
|
1338
1338
|
},
|
|
1339
1339
|
'fetchOHLCV': {
|
|
@@ -227,7 +227,6 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
227
227
|
'takeProfitPrice': false,
|
|
228
228
|
'attachedStopLossTakeProfit': undefined,
|
|
229
229
|
'timeInForce': {
|
|
230
|
-
'GTC': true,
|
|
231
230
|
'IOC': true,
|
|
232
231
|
'FOK': false,
|
|
233
232
|
'PO': true,
|
|
@@ -272,7 +271,7 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
272
271
|
'fetchClosedOrders': {
|
|
273
272
|
'marginMode': false,
|
|
274
273
|
'limit': 2000,
|
|
275
|
-
'
|
|
274
|
+
'daysBack': undefined,
|
|
276
275
|
'daysBackCanceled': undefined,
|
|
277
276
|
'untilDays': undefined,
|
|
278
277
|
'trigger': false,
|
|
@@ -2255,7 +2254,7 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2255
2254
|
market = this.safeMarket(marketId, market);
|
|
2256
2255
|
}
|
|
2257
2256
|
const symbol = market['symbol'];
|
|
2258
|
-
const timestamp = this.
|
|
2257
|
+
const timestamp = this.safeInteger(entry, 'timestamp');
|
|
2259
2258
|
const status = this.safeString2(order, 'status', 'ccxtStatus');
|
|
2260
2259
|
order = this.omit(order, ['ccxtStatus']);
|
|
2261
2260
|
let side = this.safeString(entry, 'side');
|
|
@@ -2271,7 +2270,7 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2271
2270
|
'timestamp': timestamp,
|
|
2272
2271
|
'datetime': this.iso8601(timestamp),
|
|
2273
2272
|
'lastTradeTimestamp': undefined,
|
|
2274
|
-
'lastUpdateTimestamp':
|
|
2273
|
+
'lastUpdateTimestamp': this.safeInteger(order, 'statusTimestamp'),
|
|
2275
2274
|
'symbol': symbol,
|
|
2276
2275
|
'type': this.parseOrderType(this.safeStringLower(entry, 'orderType')),
|
|
2277
2276
|
'timeInForce': this.safeStringUpper(entry, 'tif'),
|
package/dist/cjs/src/kraken.js
CHANGED
|
@@ -310,7 +310,7 @@ class krakenfutures extends krakenfutures$1 {
|
|
|
310
310
|
'fetchClosedOrders': {
|
|
311
311
|
'marginMode': false,
|
|
312
312
|
'limit': undefined,
|
|
313
|
-
'
|
|
313
|
+
'daysBack': undefined,
|
|
314
314
|
'daysBackCanceled': undefined,
|
|
315
315
|
'untilDays': undefined,
|
|
316
316
|
'trigger': false,
|
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -1036,7 +1036,7 @@ class kucoin extends kucoin$1 {
|
|
|
1036
1036
|
'fetchClosedOrders': {
|
|
1037
1037
|
'marginMode': true,
|
|
1038
1038
|
'limit': 500,
|
|
1039
|
-
'
|
|
1039
|
+
'daysBack': undefined,
|
|
1040
1040
|
'daysBackCanceled': undefined,
|
|
1041
1041
|
'untilDays': 7,
|
|
1042
1042
|
'trigger': true,
|
|
@@ -373,9 +373,8 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
373
373
|
'stopLossPrice': true,
|
|
374
374
|
'takeProfitPrice': true,
|
|
375
375
|
'attachedStopLossTakeProfit': {
|
|
376
|
-
'triggerPrice': undefined,
|
|
377
376
|
'triggerPriceType': undefined,
|
|
378
|
-
'
|
|
377
|
+
'price': true,
|
|
379
378
|
},
|
|
380
379
|
'timeInForce': {
|
|
381
380
|
'IOC': true,
|
|
@@ -415,7 +414,7 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
415
414
|
'fetchClosedOrders': {
|
|
416
415
|
'marginMode': false,
|
|
417
416
|
'limit': 1000,
|
|
418
|
-
'
|
|
417
|
+
'daysBack': undefined,
|
|
419
418
|
'daysBackCanceled': undefined,
|
|
420
419
|
'untilDays': undefined,
|
|
421
420
|
'trigger': true,
|
package/dist/cjs/src/lykke.js
CHANGED
|
@@ -201,7 +201,7 @@ class lykke extends lykke$1 {
|
|
|
201
201
|
// {
|
|
202
202
|
// "payload":[
|
|
203
203
|
// {
|
|
204
|
-
// "assetId":"115a60c2-0da1-40f9-a7f2-
|
|
204
|
+
// "assetId":"115a60c2-0da1-40f9-a7f2-41da723b9075",
|
|
205
205
|
// "name":"Monaco Token",
|
|
206
206
|
// "symbol":"MCO",
|
|
207
207
|
// "accuracy":6,
|
package/dist/cjs/src/mexc.js
CHANGED
|
@@ -443,6 +443,7 @@ class mexc extends mexc$1 {
|
|
|
443
443
|
'1h': '60m',
|
|
444
444
|
'4h': '4h',
|
|
445
445
|
'1d': '1d',
|
|
446
|
+
'1w': '1W',
|
|
446
447
|
'1M': '1M',
|
|
447
448
|
},
|
|
448
449
|
'swap': {
|
|
@@ -734,7 +735,7 @@ class mexc extends mexc$1 {
|
|
|
734
735
|
'fetchClosedOrders': {
|
|
735
736
|
'marginMode': true,
|
|
736
737
|
'limit': 1000,
|
|
737
|
-
'
|
|
738
|
+
'daysBack': 7,
|
|
738
739
|
'daysBackCanceled': 7,
|
|
739
740
|
'untilDays': 7,
|
|
740
741
|
'trigger': false,
|
|
@@ -790,7 +791,7 @@ class mexc extends mexc$1 {
|
|
|
790
791
|
'fetchClosedOrders': {
|
|
791
792
|
'marginMode': false,
|
|
792
793
|
'limit': 100,
|
|
793
|
-
'
|
|
794
|
+
'daysBack': 90,
|
|
794
795
|
'daysBackCanceled': undefined,
|
|
795
796
|
'untilDays': 90,
|
|
796
797
|
'trigger': true,
|
package/dist/cjs/src/myokx.js
CHANGED
package/dist/cjs/src/okx.js
CHANGED
|
@@ -1199,7 +1199,7 @@ class okx extends okx$1 {
|
|
|
1199
1199
|
'mark': true,
|
|
1200
1200
|
'index': true,
|
|
1201
1201
|
},
|
|
1202
|
-
'
|
|
1202
|
+
'price': true,
|
|
1203
1203
|
},
|
|
1204
1204
|
'timeInForce': {
|
|
1205
1205
|
'IOC': true,
|
|
@@ -1239,7 +1239,7 @@ class okx extends okx$1 {
|
|
|
1239
1239
|
'fetchClosedOrders': {
|
|
1240
1240
|
'marginMode': false,
|
|
1241
1241
|
'limit': 100,
|
|
1242
|
-
'
|
|
1242
|
+
'daysBack': 90,
|
|
1243
1243
|
'daysBackCanceled': 1 / 12,
|
|
1244
1244
|
'untilDays': undefined,
|
|
1245
1245
|
'trigger': true,
|
|
@@ -1626,7 +1626,7 @@ class okx extends okx$1 {
|
|
|
1626
1626
|
'contractSize': contract ? this.safeNumber(market, 'ctVal') : undefined,
|
|
1627
1627
|
'expiry': expiry,
|
|
1628
1628
|
'expiryDatetime': this.iso8601(expiry),
|
|
1629
|
-
'strike': strikePrice,
|
|
1629
|
+
'strike': this.parseNumber(strikePrice),
|
|
1630
1630
|
'optionType': optionType,
|
|
1631
1631
|
'created': this.safeInteger(market, 'listTime'),
|
|
1632
1632
|
'precision': {
|
|
@@ -1833,7 +1833,7 @@ class okx extends okx$1 {
|
|
|
1833
1833
|
}
|
|
1834
1834
|
const firstChain = this.safeDict(chains, 0, {});
|
|
1835
1835
|
result[code] = {
|
|
1836
|
-
'info':
|
|
1836
|
+
'info': chains,
|
|
1837
1837
|
'code': code,
|
|
1838
1838
|
'id': currencyId,
|
|
1839
1839
|
'name': this.safeString(firstChain, 'name'),
|
|
@@ -275,7 +275,9 @@ class onetrading extends onetrading$1 {
|
|
|
275
275
|
'CF_RATELIMIT': errors.DDoSProtection,
|
|
276
276
|
'INTERNAL_SERVER_ERROR': errors.ExchangeError,
|
|
277
277
|
},
|
|
278
|
-
'broad': {
|
|
278
|
+
'broad': {
|
|
279
|
+
'Order not found.': errors.OrderNotFound,
|
|
280
|
+
},
|
|
279
281
|
},
|
|
280
282
|
'commonCurrencies': {
|
|
281
283
|
'MIOTA': 'IOTA', // https://github.com/ccxt/ccxt/issues/7487
|
|
@@ -864,7 +866,8 @@ class onetrading extends onetrading$1 {
|
|
|
864
866
|
// {"instrument_code":"BTC_EUR","granularity":{"unit":"HOURS","period":1},"high":"9135.7","low":"9002.59","open":"9055.45","close":"9133.98","total_amount":"26.21919","volume":"238278.8724959","time":"2020-05-09T00:59:59.999Z","last_sequence":461521},
|
|
865
867
|
// ]
|
|
866
868
|
//
|
|
867
|
-
|
|
869
|
+
const ohlcv = this.safeList(response, 'candlesticks');
|
|
870
|
+
return this.parseOHLCVs(ohlcv, market, timeframe, since, limit);
|
|
868
871
|
}
|
|
869
872
|
parseTrade(trade, market = undefined) {
|
|
870
873
|
//
|
|
@@ -1001,6 +1004,7 @@ class onetrading extends onetrading$1 {
|
|
|
1001
1004
|
'CLOSED': 'canceled',
|
|
1002
1005
|
'FAILED': 'failed',
|
|
1003
1006
|
'STOP_TRIGGERED': 'triggered',
|
|
1007
|
+
'DONE': 'closed',
|
|
1004
1008
|
};
|
|
1005
1009
|
return this.safeString(statuses, status, status);
|
|
1006
1010
|
}
|
|
@@ -1095,7 +1099,7 @@ class onetrading extends onetrading$1 {
|
|
|
1095
1099
|
'datetime': this.iso8601(timestamp),
|
|
1096
1100
|
'lastTradeTimestamp': undefined,
|
|
1097
1101
|
'symbol': symbol,
|
|
1098
|
-
'type': type,
|
|
1102
|
+
'type': this.parseOrderType(type),
|
|
1099
1103
|
'timeInForce': timeInForce,
|
|
1100
1104
|
'postOnly': postOnly,
|
|
1101
1105
|
'side': side,
|
|
@@ -1111,6 +1115,12 @@ class onetrading extends onetrading$1 {
|
|
|
1111
1115
|
'trades': rawTrades,
|
|
1112
1116
|
}, market);
|
|
1113
1117
|
}
|
|
1118
|
+
parseOrderType(type) {
|
|
1119
|
+
const types = {
|
|
1120
|
+
'booked': 'limit',
|
|
1121
|
+
};
|
|
1122
|
+
return this.safeString(types, type, type);
|
|
1123
|
+
}
|
|
1114
1124
|
parseTimeInForce(timeInForce) {
|
|
1115
1125
|
const timeInForces = {
|
|
1116
1126
|
'GOOD_TILL_CANCELLED': 'GTC',
|
|
@@ -1174,6 +1184,9 @@ class onetrading extends onetrading$1 {
|
|
|
1174
1184
|
request['client_id'] = clientOrderId;
|
|
1175
1185
|
params = this.omit(params, ['clientOrderId', 'client_id']);
|
|
1176
1186
|
}
|
|
1187
|
+
const timeInForce = this.safeString2(params, 'timeInForce', 'time_in_force', 'GOOD_TILL_CANCELLED');
|
|
1188
|
+
params = this.omit(params, 'timeInForce');
|
|
1189
|
+
request['time_in_force'] = timeInForce;
|
|
1177
1190
|
const response = await this.privatePostAccountOrders(this.extend(request, params));
|
|
1178
1191
|
//
|
|
1179
1192
|
// {
|
|
@@ -1215,11 +1228,17 @@ class onetrading extends onetrading$1 {
|
|
|
1215
1228
|
else {
|
|
1216
1229
|
request['order_id'] = id;
|
|
1217
1230
|
}
|
|
1218
|
-
|
|
1231
|
+
let response = undefined;
|
|
1232
|
+
if (method === 'privateDeleteAccountOrdersOrderId') {
|
|
1233
|
+
response = await this.privateDeleteAccountOrdersOrderId(this.extend(request, params));
|
|
1234
|
+
}
|
|
1235
|
+
else {
|
|
1236
|
+
response = await this.privateDeleteAccountOrdersClientClientId(this.extend(request, params));
|
|
1237
|
+
}
|
|
1219
1238
|
//
|
|
1220
1239
|
// responds with an empty body
|
|
1221
1240
|
//
|
|
1222
|
-
return response;
|
|
1241
|
+
return this.parseOrder(response);
|
|
1223
1242
|
}
|
|
1224
1243
|
/**
|
|
1225
1244
|
* @method
|
|
@@ -4271,7 +4271,8 @@ class binance extends binance$1 {
|
|
|
4271
4271
|
client.reject(message, id);
|
|
4272
4272
|
}
|
|
4273
4273
|
// reset connection if 5xx error
|
|
4274
|
-
|
|
4274
|
+
const codeString = this.safeString(error, 'code');
|
|
4275
|
+
if ((codeString !== undefined) && (codeString[0] === '5')) {
|
|
4275
4276
|
client.reset(message);
|
|
4276
4277
|
}
|
|
4277
4278
|
}
|
|
@@ -1286,7 +1286,7 @@ class coinex extends coinex$1 {
|
|
|
1286
1286
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
1287
1287
|
const marketId = this.safeString(ticker, 'market');
|
|
1288
1288
|
market = this.safeMarket(marketId, market, undefined, defaultType);
|
|
1289
|
-
const timestamp = this.
|
|
1289
|
+
const timestamp = this.safeInteger(ticker, 'updated_at');
|
|
1290
1290
|
return this.safeTicker({
|
|
1291
1291
|
'symbol': this.safeSymbol(marketId, market, undefined, defaultType),
|
|
1292
1292
|
'timestamp': timestamp,
|
package/dist/cjs/src/whitebit.js
CHANGED
|
@@ -818,9 +818,22 @@ class whitebit extends whitebit$1 {
|
|
|
818
818
|
// "last": "55913.88",
|
|
819
819
|
// "period": 86400
|
|
820
820
|
// }
|
|
821
|
-
|
|
821
|
+
// v2
|
|
822
|
+
// {
|
|
823
|
+
// lastUpdateTimestamp: '2025-01-02T09:16:36.000Z',
|
|
824
|
+
// tradingPairs: 'ARB_USDC',
|
|
825
|
+
// lastPrice: '0.7727',
|
|
826
|
+
// lowestAsk: '0.7735',
|
|
827
|
+
// highestBid: '0.7732',
|
|
828
|
+
// baseVolume24h: '1555793.74',
|
|
829
|
+
// quoteVolume24h: '1157602.622406',
|
|
830
|
+
// tradesEnabled: true
|
|
831
|
+
// }
|
|
832
|
+
//
|
|
833
|
+
const marketId = this.safeString(ticker, 'tradingPairs');
|
|
834
|
+
market = this.safeMarket(marketId, market);
|
|
822
835
|
// last price is provided as "last" or "last_price"
|
|
823
|
-
const last = this.
|
|
836
|
+
const last = this.safeStringN(ticker, ['last', 'last_price', 'lastPrice']);
|
|
824
837
|
// if "close" is provided, use it, otherwise use <last>
|
|
825
838
|
const close = this.safeString(ticker, 'close', last);
|
|
826
839
|
return this.safeTicker({
|
|
@@ -829,9 +842,9 @@ class whitebit extends whitebit$1 {
|
|
|
829
842
|
'datetime': undefined,
|
|
830
843
|
'high': this.safeString(ticker, 'high'),
|
|
831
844
|
'low': this.safeString(ticker, 'low'),
|
|
832
|
-
'bid': this.
|
|
845
|
+
'bid': this.safeString2(ticker, 'bid', 'highestBid'),
|
|
833
846
|
'bidVolume': undefined,
|
|
834
|
-
'ask': this.
|
|
847
|
+
'ask': this.safeString2(ticker, 'ask', 'lowestAsk'),
|
|
835
848
|
'askVolume': undefined,
|
|
836
849
|
'vwap': undefined,
|
|
837
850
|
'open': this.safeString(ticker, 'open'),
|
|
@@ -841,8 +854,8 @@ class whitebit extends whitebit$1 {
|
|
|
841
854
|
'change': undefined,
|
|
842
855
|
'percentage': this.safeString(ticker, 'change'),
|
|
843
856
|
'average': undefined,
|
|
844
|
-
'baseVolume': this.
|
|
845
|
-
'quoteVolume': this.
|
|
857
|
+
'baseVolume': this.safeStringN(ticker, ['base_volume', 'volume', 'baseVolume24h']),
|
|
858
|
+
'quoteVolume': this.safeStringN(ticker, ['quote_volume', 'deal', 'quoteVolume24h']),
|
|
846
859
|
'info': ticker,
|
|
847
860
|
}, market);
|
|
848
861
|
}
|
|
@@ -851,14 +864,23 @@ class whitebit extends whitebit$1 {
|
|
|
851
864
|
* @name whitebit#fetchTickers
|
|
852
865
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
853
866
|
* @see https://docs.whitebit.com/public/http-v4/#market-activity
|
|
854
|
-
* @param {string[]
|
|
867
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
855
868
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
869
|
+
* @param {string} [params.method] either v2PublicGetTicker or v4PublicGetTicker default is v4PublicGetTicker
|
|
856
870
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
857
871
|
*/
|
|
858
872
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
859
873
|
await this.loadMarkets();
|
|
860
874
|
symbols = this.marketSymbols(symbols);
|
|
861
|
-
|
|
875
|
+
let method = 'v4PublicGetTicker';
|
|
876
|
+
[method, params] = this.handleOptionAndParams(params, 'fetchTickers', 'method', method);
|
|
877
|
+
let response = undefined;
|
|
878
|
+
if (method === 'v4PublicGetTicker') {
|
|
879
|
+
response = await this.v4PublicGetTicker(params);
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
response = await this.v2PublicGetTicker(params);
|
|
883
|
+
}
|
|
862
884
|
//
|
|
863
885
|
// "BCH_RUB": {
|
|
864
886
|
// "base_id":1831,
|
|
@@ -870,6 +892,10 @@ class whitebit extends whitebit$1 {
|
|
|
870
892
|
// "change":"2.12"
|
|
871
893
|
// },
|
|
872
894
|
//
|
|
895
|
+
const resultList = this.safeList(response, 'result');
|
|
896
|
+
if (resultList !== undefined) {
|
|
897
|
+
return this.parseTickers(resultList, symbols);
|
|
898
|
+
}
|
|
873
899
|
const marketIds = Object.keys(response);
|
|
874
900
|
const result = {};
|
|
875
901
|
for (let i = 0; i < marketIds.length; i++) {
|
package/dist/cjs/src/woo.js
CHANGED
package/dist/cjs/src/woofipro.js
CHANGED
|
@@ -350,7 +350,7 @@ class woofipro extends woofipro$1 {
|
|
|
350
350
|
'fetchClosedOrders': {
|
|
351
351
|
'marginMode': false,
|
|
352
352
|
'limit': 500,
|
|
353
|
-
'
|
|
353
|
+
'daysBack': undefined,
|
|
354
354
|
'daysBackCanceled': undefined,
|
|
355
355
|
'untilDays': 100000,
|
|
356
356
|
'trigger': true,
|
|
@@ -371,7 +371,7 @@ class woofipro extends woofipro$1 {
|
|
|
371
371
|
'attachedStopLossTakeProfit': {
|
|
372
372
|
// todo: implementation needs unification
|
|
373
373
|
'triggerPriceType': undefined,
|
|
374
|
-
'
|
|
374
|
+
'price': false,
|
|
375
375
|
},
|
|
376
376
|
},
|
|
377
377
|
},
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OpenInterests } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.4.
|
|
7
|
+
declare const version = "4.4.45";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.4.
|
|
41
|
+
const version = '4.4.46';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -25,6 +25,18 @@ interface Exchange {
|
|
|
25
25
|
privateGetTradeOrdersTpslHistory(params?: {}): Promise<implicitReturnType>;
|
|
26
26
|
privateGetUserQueryApikey(params?: {}): Promise<implicitReturnType>;
|
|
27
27
|
privateGetAffiliateBasic(params?: {}): Promise<implicitReturnType>;
|
|
28
|
+
privateGetCopytradingInstruments(params?: {}): Promise<implicitReturnType>;
|
|
29
|
+
privateGetCopytradingAccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
30
|
+
privateGetCopytradingAccountPositionsByOrder(params?: {}): Promise<implicitReturnType>;
|
|
31
|
+
privateGetCopytradingAccountPositionsDetailsByOrder(params?: {}): Promise<implicitReturnType>;
|
|
32
|
+
privateGetCopytradingAccountPositionsByContract(params?: {}): Promise<implicitReturnType>;
|
|
33
|
+
privateGetCopytradingAccountPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
34
|
+
privateGetCopytradingAccountLeverageInfo(params?: {}): Promise<implicitReturnType>;
|
|
35
|
+
privateGetCopytradingTradeOrdersPending(params?: {}): Promise<implicitReturnType>;
|
|
36
|
+
privateGetCopytradingTradePendingTpslByContract(params?: {}): Promise<implicitReturnType>;
|
|
37
|
+
privateGetCopytradingTradePositionHistoryByOrder(params?: {}): Promise<implicitReturnType>;
|
|
38
|
+
privateGetCopytradingTradeOrdersHistory(params?: {}): Promise<implicitReturnType>;
|
|
39
|
+
privateGetCopytradingTradePendingTpslByOrder(params?: {}): Promise<implicitReturnType>;
|
|
28
40
|
privatePostTradeOrder(params?: {}): Promise<implicitReturnType>;
|
|
29
41
|
privatePostTradeCancelOrder(params?: {}): Promise<implicitReturnType>;
|
|
30
42
|
privatePostAccountSetLeverage(params?: {}): Promise<implicitReturnType>;
|
|
@@ -34,6 +46,16 @@ interface Exchange {
|
|
|
34
46
|
privatePostTradeCancelTpsl(params?: {}): Promise<implicitReturnType>;
|
|
35
47
|
privatePostTradeClosePosition(params?: {}): Promise<implicitReturnType>;
|
|
36
48
|
privatePostAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
49
|
+
privatePostCopytradingAccountSetPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
50
|
+
privatePostCopytradingAccountSetLeverage(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
privatePostCopytradingTradePlaceOrder(params?: {}): Promise<implicitReturnType>;
|
|
52
|
+
privatePostCopytradingTradeCancelOrder(params?: {}): Promise<implicitReturnType>;
|
|
53
|
+
privatePostCopytradingTradePlaceTpslByContract(params?: {}): Promise<implicitReturnType>;
|
|
54
|
+
privatePostCopytradingTradeCancelTpslByContract(params?: {}): Promise<implicitReturnType>;
|
|
55
|
+
privatePostCopytradingTradePlaceTpslByOrder(params?: {}): Promise<implicitReturnType>;
|
|
56
|
+
privatePostCopytradingTradeCancelTpslByOrder(params?: {}): Promise<implicitReturnType>;
|
|
57
|
+
privatePostCopytradingTradeClosePositionByOrder(params?: {}): Promise<implicitReturnType>;
|
|
58
|
+
privatePostCopytradingTradeClosePositionByContract(params?: {}): Promise<implicitReturnType>;
|
|
37
59
|
}
|
|
38
60
|
declare abstract class Exchange extends _Exchange {
|
|
39
61
|
}
|
package/js/src/ascendex.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export default class ascendex extends Exchange {
|
|
|
96
96
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
97
97
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
98
98
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
99
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
99
100
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
100
101
|
*/
|
|
101
102
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
package/js/src/ascendex.js
CHANGED
|
@@ -1117,6 +1117,7 @@ export default class ascendex extends Exchange {
|
|
|
1117
1117
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1118
1118
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1119
1119
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1120
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
1120
1121
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1121
1122
|
*/
|
|
1122
1123
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
@@ -1131,6 +1132,7 @@ export default class ascendex extends Exchange {
|
|
|
1131
1132
|
const duration = this.parseTimeframe(timeframe);
|
|
1132
1133
|
const options = this.safeDict(this.options, 'fetchOHLCV', {});
|
|
1133
1134
|
const defaultLimit = this.safeInteger(options, 'limit', 500);
|
|
1135
|
+
const until = this.safeInteger(params, 'until');
|
|
1134
1136
|
if (since !== undefined) {
|
|
1135
1137
|
request['from'] = since;
|
|
1136
1138
|
if (limit === undefined) {
|
|
@@ -1139,11 +1141,28 @@ export default class ascendex extends Exchange {
|
|
|
1139
1141
|
else {
|
|
1140
1142
|
limit = Math.min(limit, defaultLimit);
|
|
1141
1143
|
}
|
|
1142
|
-
|
|
1144
|
+
const toWithLimit = this.sum(since, limit * duration * 1000, 1);
|
|
1145
|
+
if (until !== undefined) {
|
|
1146
|
+
request['to'] = Math.min(toWithLimit, until + 1);
|
|
1147
|
+
}
|
|
1148
|
+
else {
|
|
1149
|
+
request['to'] = toWithLimit;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
else if (until !== undefined) {
|
|
1153
|
+
request['to'] = until + 1;
|
|
1154
|
+
if (limit === undefined) {
|
|
1155
|
+
limit = defaultLimit;
|
|
1156
|
+
}
|
|
1157
|
+
else {
|
|
1158
|
+
limit = Math.min(limit, defaultLimit);
|
|
1159
|
+
}
|
|
1160
|
+
request['from'] = until - (limit * duration * 1000);
|
|
1143
1161
|
}
|
|
1144
1162
|
else if (limit !== undefined) {
|
|
1145
1163
|
request['n'] = limit; // max 500
|
|
1146
1164
|
}
|
|
1165
|
+
params = this.omit(params, 'until');
|
|
1147
1166
|
const response = await this.v1PublicGetBarhist(this.extend(request, params));
|
|
1148
1167
|
//
|
|
1149
1168
|
// {
|
package/js/src/binance.d.ts
CHANGED
|
@@ -275,6 +275,8 @@ export default class binance extends Exchange {
|
|
|
275
275
|
* @description edit a trade order
|
|
276
276
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
|
277
277
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/Modify-Order
|
|
278
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Modify-UM-Order
|
|
279
|
+
* @see https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Modify-CM-Order
|
|
278
280
|
* @param {string} id cancel order id
|
|
279
281
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
280
282
|
* @param {string} type 'market' or 'limit'
|
|
@@ -282,6 +284,7 @@ export default class binance extends Exchange {
|
|
|
282
284
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
283
285
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
284
286
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
287
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to edit an order in a portfolio margin account
|
|
285
288
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
286
289
|
*/
|
|
287
290
|
editContractOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
@@ -299,6 +302,7 @@ export default class binance extends Exchange {
|
|
|
299
302
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
300
303
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
301
304
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
305
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to edit an order in a portfolio margin account
|
|
302
306
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
303
307
|
*/
|
|
304
308
|
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|