ccxt 4.4.18 → 4.4.19
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 +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +22 -3
- package/dist/cjs/src/bingx.js +2 -1
- package/dist/cjs/src/bitget.js +1 -1
- package/dist/cjs/src/htx.js +24 -0
- package/dist/cjs/src/hyperliquid.js +4 -0
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/kucoinfutures.js +63 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +4 -0
- package/js/src/abstract/binancecoinm.d.ts +4 -0
- package/js/src/abstract/binanceus.d.ts +4 -0
- package/js/src/abstract/binanceusdm.d.ts +4 -0
- package/js/src/abstract/kucoinfutures.d.ts +1 -0
- package/js/src/base/types.d.ts +1 -0
- package/js/src/binance.js +22 -3
- package/js/src/bingx.js +2 -1
- package/js/src/bitget.js +1 -1
- package/js/src/htx.js +24 -0
- package/js/src/hyperliquid.js +4 -0
- package/js/src/kucoin.js +1 -1
- package/js/src/kucoinfutures.d.ts +1 -0
- package/js/src/kucoinfutures.js +63 -0
- package/package.json +1 -1
package/dist/cjs/ccxt.js
CHANGED
|
@@ -194,7 +194,7 @@ var xt$1 = require('./src/pro/xt.js');
|
|
|
194
194
|
|
|
195
195
|
//-----------------------------------------------------------------------------
|
|
196
196
|
// this is updated by vss.js when building
|
|
197
|
-
const version = '4.4.
|
|
197
|
+
const version = '4.4.19';
|
|
198
198
|
Exchange["default"].ccxtVersion = version;
|
|
199
199
|
const exchanges = {
|
|
200
200
|
'ace': ace,
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -804,6 +804,7 @@ class binance extends binance$1 {
|
|
|
804
804
|
'constituents': 2,
|
|
805
805
|
'apiTradingStatus': { 'cost': 1, 'noSymbol': 10 },
|
|
806
806
|
'lvtKlines': 1,
|
|
807
|
+
'convert/exchangeInfo': 4,
|
|
807
808
|
},
|
|
808
809
|
},
|
|
809
810
|
'fapiData': {
|
|
@@ -857,6 +858,7 @@ class binance extends binance$1 {
|
|
|
857
858
|
'feeBurn': 1,
|
|
858
859
|
'symbolConfig': 5,
|
|
859
860
|
'accountConfig': 5,
|
|
861
|
+
'convert/orderStatus': 5,
|
|
860
862
|
},
|
|
861
863
|
'post': {
|
|
862
864
|
'batchOrders': 5,
|
|
@@ -872,6 +874,8 @@ class binance extends binance$1 {
|
|
|
872
874
|
'apiReferral/customization': 1,
|
|
873
875
|
'apiReferral/userCustomization': 1,
|
|
874
876
|
'feeBurn': 1,
|
|
877
|
+
'convert/getQuote': 200,
|
|
878
|
+
'convert/acceptQuote': 20,
|
|
875
879
|
},
|
|
876
880
|
'put': {
|
|
877
881
|
'listenKey': 1,
|
|
@@ -3199,8 +3203,8 @@ class binance extends binance$1 {
|
|
|
3199
3203
|
let fees = this.fees;
|
|
3200
3204
|
let linear = undefined;
|
|
3201
3205
|
let inverse = undefined;
|
|
3202
|
-
const strike = this.safeString(market, 'strikePrice');
|
|
3203
3206
|
let symbol = base + '/' + quote;
|
|
3207
|
+
let strike = undefined;
|
|
3204
3208
|
if (contract) {
|
|
3205
3209
|
if (swap) {
|
|
3206
3210
|
symbol = symbol + ':' + settle;
|
|
@@ -3209,6 +3213,7 @@ class binance extends binance$1 {
|
|
|
3209
3213
|
symbol = symbol + ':' + settle + '-' + this.yymmdd(expiry);
|
|
3210
3214
|
}
|
|
3211
3215
|
else if (option) {
|
|
3216
|
+
strike = this.numberToString(this.parseToNumeric(this.safeString(market, 'strikePrice')));
|
|
3212
3217
|
symbol = symbol + ':' + settle + '-' + this.yymmdd(expiry) + '-' + strike + '-' + this.safeString(optionParts, 3);
|
|
3213
3218
|
}
|
|
3214
3219
|
contractSize = this.safeNumber2(market, 'contractSize', 'unit', this.parseNumber('1'));
|
|
@@ -6282,14 +6287,28 @@ class binance extends binance$1 {
|
|
|
6282
6287
|
request['quantity'] = this.parseToNumeric(amount);
|
|
6283
6288
|
}
|
|
6284
6289
|
else {
|
|
6285
|
-
|
|
6290
|
+
const marketAmountPrecision = this.safeString(market['precision'], 'amount');
|
|
6291
|
+
const isPrecisionAvailable = (marketAmountPrecision !== undefined);
|
|
6292
|
+
if (isPrecisionAvailable) {
|
|
6293
|
+
request['quantity'] = this.amountToPrecision(symbol, amount);
|
|
6294
|
+
}
|
|
6295
|
+
else {
|
|
6296
|
+
request['quantity'] = this.parseToNumeric(amount); // some options don't have the precision available
|
|
6297
|
+
}
|
|
6286
6298
|
}
|
|
6287
6299
|
}
|
|
6288
6300
|
if (priceIsRequired && !isPriceMatch) {
|
|
6289
6301
|
if (price === undefined) {
|
|
6290
6302
|
throw new errors.InvalidOrder(this.id + ' createOrder() requires a price argument for a ' + type + ' order');
|
|
6291
6303
|
}
|
|
6292
|
-
|
|
6304
|
+
const pricePrecision = this.safeString(market['precision'], 'price');
|
|
6305
|
+
const isPricePrecisionAvailable = (pricePrecision !== undefined);
|
|
6306
|
+
if (isPricePrecisionAvailable) {
|
|
6307
|
+
request['price'] = this.priceToPrecision(symbol, price);
|
|
6308
|
+
}
|
|
6309
|
+
else {
|
|
6310
|
+
request['price'] = this.parseToNumeric(price); // some options don't have the precision available
|
|
6311
|
+
}
|
|
6293
6312
|
}
|
|
6294
6313
|
if (stopPriceIsRequired) {
|
|
6295
6314
|
if (market['contract']) {
|
package/dist/cjs/src/bingx.js
CHANGED
|
@@ -493,6 +493,7 @@ class bingx extends bingx$1 {
|
|
|
493
493
|
},
|
|
494
494
|
'networks': {
|
|
495
495
|
'ARB': 'ARBITRUM',
|
|
496
|
+
'MATIC': 'POLYGON',
|
|
496
497
|
},
|
|
497
498
|
},
|
|
498
499
|
});
|
|
@@ -772,7 +773,7 @@ class bingx extends bingx$1 {
|
|
|
772
773
|
if ((this.safeString(market, 'apiStateOpen') === 'true') && (this.safeString(market, 'apiStateClose') === 'true')) {
|
|
773
774
|
isActive = true; // swap active
|
|
774
775
|
}
|
|
775
|
-
else if (this.safeBool(market, 'apiStateSell') && this.safeBool(market, 'apiStateBuy') && (this.
|
|
776
|
+
else if (this.safeBool(market, 'apiStateSell') && this.safeBool(market, 'apiStateBuy') && (this.safeString(market, 'status') === '1')) {
|
|
776
777
|
isActive = true; // spot active
|
|
777
778
|
}
|
|
778
779
|
const isInverse = (spot) ? undefined : checkIsInverse;
|
package/dist/cjs/src/bitget.js
CHANGED
package/dist/cjs/src/htx.js
CHANGED
|
@@ -1235,6 +1235,18 @@ class htx extends htx$1 {
|
|
|
1235
1235
|
});
|
|
1236
1236
|
}
|
|
1237
1237
|
async fetchStatus(params = {}) {
|
|
1238
|
+
/**
|
|
1239
|
+
* @method
|
|
1240
|
+
* @name htx#fetchStatus
|
|
1241
|
+
* @description the latest known information on the availability of the exchange API
|
|
1242
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-system-status
|
|
1243
|
+
* @see https://huobiapi.github.io/docs/dm/v1/en/#get-system-status
|
|
1244
|
+
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-system-status
|
|
1245
|
+
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#get-system-status
|
|
1246
|
+
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#query-whether-the-system-is-available // contractPublicGetHeartbeat
|
|
1247
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1248
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
1249
|
+
*/
|
|
1238
1250
|
await this.loadMarkets();
|
|
1239
1251
|
let marketType = undefined;
|
|
1240
1252
|
[marketType, params] = this.handleMarketTypeAndParams('fetchStatus', undefined, params);
|
|
@@ -1461,6 +1473,8 @@ class htx extends htx$1 {
|
|
|
1461
1473
|
* @method
|
|
1462
1474
|
* @name htx#fetchTime
|
|
1463
1475
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1476
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-current-timestamp
|
|
1477
|
+
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-current-system-timestamp
|
|
1464
1478
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1465
1479
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1466
1480
|
*/
|
|
@@ -1511,6 +1525,7 @@ class htx extends htx$1 {
|
|
|
1511
1525
|
* @method
|
|
1512
1526
|
* @name htx#fetchTradingFee
|
|
1513
1527
|
* @description fetch the trading fees for a market
|
|
1528
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
|
|
1514
1529
|
* @param {string} symbol unified market symbol
|
|
1515
1530
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1516
1531
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -1556,6 +1571,15 @@ class htx extends htx$1 {
|
|
|
1556
1571
|
return result;
|
|
1557
1572
|
}
|
|
1558
1573
|
async fetchTradingLimitsById(id, params = {}) {
|
|
1574
|
+
/**
|
|
1575
|
+
* @ignore
|
|
1576
|
+
* @method
|
|
1577
|
+
* @name htx#fetchTradingLimitsById
|
|
1578
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
|
|
1579
|
+
* @param {string} id market id
|
|
1580
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1581
|
+
* @returns {object} the limits object of a market structure
|
|
1582
|
+
*/
|
|
1559
1583
|
const request = {
|
|
1560
1584
|
'symbol': id,
|
|
1561
1585
|
};
|
|
@@ -1983,6 +1983,10 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1983
1983
|
const statuses = {
|
|
1984
1984
|
'triggered': 'open',
|
|
1985
1985
|
'filled': 'closed',
|
|
1986
|
+
'open': 'open',
|
|
1987
|
+
'canceled': 'canceled',
|
|
1988
|
+
'rejected': 'rejected',
|
|
1989
|
+
'marginCanceled': 'canceled',
|
|
1986
1990
|
};
|
|
1987
1991
|
return this.safeString(statuses, status, status);
|
|
1988
1992
|
}
|
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -5037,7 +5037,7 @@ class kucoin extends kucoin$1 {
|
|
|
5037
5037
|
headers = (headers !== undefined) ? headers : {};
|
|
5038
5038
|
let url = this.urls['api'][api];
|
|
5039
5039
|
if (!this.isEmpty(query)) {
|
|
5040
|
-
if ((method === 'GET') || (method === 'DELETE')) {
|
|
5040
|
+
if (((method === 'GET') || (method === 'DELETE')) && (path !== 'orders/multi-cancel')) {
|
|
5041
5041
|
endpoint += '?' + this.rawencode(query);
|
|
5042
5042
|
}
|
|
5043
5043
|
else {
|
|
@@ -33,6 +33,7 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
33
33
|
'addMargin': true,
|
|
34
34
|
'cancelAllOrders': true,
|
|
35
35
|
'cancelOrder': true,
|
|
36
|
+
'cancelOrders': true,
|
|
36
37
|
'closeAllPositions': false,
|
|
37
38
|
'closePosition': true,
|
|
38
39
|
'closePositions': false,
|
|
@@ -204,6 +205,7 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
204
205
|
'stopOrders': 1,
|
|
205
206
|
'sub/api-key': 1,
|
|
206
207
|
'orders/client-order/{clientOid}': 1,
|
|
208
|
+
'orders/multi-cancel': 20,
|
|
207
209
|
},
|
|
208
210
|
},
|
|
209
211
|
'webExchange': {
|
|
@@ -1662,6 +1664,67 @@ class kucoinfutures extends kucoinfutures$1 {
|
|
|
1662
1664
|
//
|
|
1663
1665
|
return this.safeValue(response, 'data');
|
|
1664
1666
|
}
|
|
1667
|
+
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
1668
|
+
/**
|
|
1669
|
+
* @method
|
|
1670
|
+
* @name kucoinfutures#cancelOrders
|
|
1671
|
+
* @description cancel multiple orders
|
|
1672
|
+
* @see https://www.kucoin.com/docs/rest/futures-trading/orders/batch-cancel-orders
|
|
1673
|
+
* @param {string[]} ids order ids
|
|
1674
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1675
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1676
|
+
* @param {string[]} [params.clientOrderIds] client order ids
|
|
1677
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1678
|
+
*/
|
|
1679
|
+
await this.loadMarkets();
|
|
1680
|
+
let market = undefined;
|
|
1681
|
+
if (symbol !== undefined) {
|
|
1682
|
+
market = this.market(symbol);
|
|
1683
|
+
}
|
|
1684
|
+
const ordersRequests = [];
|
|
1685
|
+
const clientOrderIds = this.safeList2(params, 'clientOrderIds', 'clientOids', []);
|
|
1686
|
+
params = this.omit(params, ['clientOrderIds', 'clientOids']);
|
|
1687
|
+
let useClientorderId = false;
|
|
1688
|
+
for (let i = 0; i < clientOrderIds.length; i++) {
|
|
1689
|
+
useClientorderId = true;
|
|
1690
|
+
if (symbol === undefined) {
|
|
1691
|
+
throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument when cancelling by clientOrderIds');
|
|
1692
|
+
}
|
|
1693
|
+
ordersRequests.push({
|
|
1694
|
+
'symbol': market['id'],
|
|
1695
|
+
'clientOid': this.safeString(clientOrderIds, i),
|
|
1696
|
+
});
|
|
1697
|
+
}
|
|
1698
|
+
for (let i = 0; i < ids.length; i++) {
|
|
1699
|
+
ordersRequests.push(ids[i]);
|
|
1700
|
+
}
|
|
1701
|
+
const requestKey = useClientorderId ? 'clientOidsList' : 'orderIdsList';
|
|
1702
|
+
const request = {};
|
|
1703
|
+
request[requestKey] = ordersRequests;
|
|
1704
|
+
const response = await this.futuresPrivateDeleteOrdersMultiCancel(this.extend(request, params));
|
|
1705
|
+
//
|
|
1706
|
+
// {
|
|
1707
|
+
// "code": "200000",
|
|
1708
|
+
// "data":
|
|
1709
|
+
// [
|
|
1710
|
+
// {
|
|
1711
|
+
// "orderId": "80465574458560512",
|
|
1712
|
+
// "clientOid": null,
|
|
1713
|
+
// "code": "200",
|
|
1714
|
+
// "msg": "success"
|
|
1715
|
+
// },
|
|
1716
|
+
// {
|
|
1717
|
+
// "orderId": "80465575289094144",
|
|
1718
|
+
// "clientOid": null,
|
|
1719
|
+
// "code": "200",
|
|
1720
|
+
// "msg": "success"
|
|
1721
|
+
// }
|
|
1722
|
+
// ]
|
|
1723
|
+
// }
|
|
1724
|
+
//
|
|
1725
|
+
const orders = this.safeList(response, 'data', []);
|
|
1726
|
+
return this.parseOrders(orders, market);
|
|
1727
|
+
}
|
|
1665
1728
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
1666
1729
|
/**
|
|
1667
1730
|
* @method
|
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 } 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.18";
|
|
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.19';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -481,6 +481,7 @@ interface Exchange {
|
|
|
481
481
|
fapiPublicGetConstituents(params?: {}): Promise<implicitReturnType>;
|
|
482
482
|
fapiPublicGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
483
483
|
fapiPublicGetLvtKlines(params?: {}): Promise<implicitReturnType>;
|
|
484
|
+
fapiPublicGetConvertExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
484
485
|
fapiDataGetDeliveryPrice(params?: {}): Promise<implicitReturnType>;
|
|
485
486
|
fapiDataGetOpenInterestHist(params?: {}): Promise<implicitReturnType>;
|
|
486
487
|
fapiDataGetTopLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|
|
@@ -525,6 +526,7 @@ interface Exchange {
|
|
|
525
526
|
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
526
527
|
fapiPrivateGetSymbolConfig(params?: {}): Promise<implicitReturnType>;
|
|
527
528
|
fapiPrivateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
529
|
+
fapiPrivateGetConvertOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
528
530
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
529
531
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
530
532
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -537,6 +539,8 @@ interface Exchange {
|
|
|
537
539
|
fapiPrivatePostApiReferralCustomization(params?: {}): Promise<implicitReturnType>;
|
|
538
540
|
fapiPrivatePostApiReferralUserCustomization(params?: {}): Promise<implicitReturnType>;
|
|
539
541
|
fapiPrivatePostFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
542
|
+
fapiPrivatePostConvertGetQuote(params?: {}): Promise<implicitReturnType>;
|
|
543
|
+
fapiPrivatePostConvertAcceptQuote(params?: {}): Promise<implicitReturnType>;
|
|
540
544
|
fapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
541
545
|
fapiPrivatePutOrder(params?: {}): Promise<implicitReturnType>;
|
|
542
546
|
fapiPrivatePutBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -481,6 +481,7 @@ interface binance {
|
|
|
481
481
|
fapiPublicGetConstituents(params?: {}): Promise<implicitReturnType>;
|
|
482
482
|
fapiPublicGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
483
483
|
fapiPublicGetLvtKlines(params?: {}): Promise<implicitReturnType>;
|
|
484
|
+
fapiPublicGetConvertExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
484
485
|
fapiDataGetDeliveryPrice(params?: {}): Promise<implicitReturnType>;
|
|
485
486
|
fapiDataGetOpenInterestHist(params?: {}): Promise<implicitReturnType>;
|
|
486
487
|
fapiDataGetTopLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|
|
@@ -525,6 +526,7 @@ interface binance {
|
|
|
525
526
|
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
526
527
|
fapiPrivateGetSymbolConfig(params?: {}): Promise<implicitReturnType>;
|
|
527
528
|
fapiPrivateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
529
|
+
fapiPrivateGetConvertOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
528
530
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
529
531
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
530
532
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -537,6 +539,8 @@ interface binance {
|
|
|
537
539
|
fapiPrivatePostApiReferralCustomization(params?: {}): Promise<implicitReturnType>;
|
|
538
540
|
fapiPrivatePostApiReferralUserCustomization(params?: {}): Promise<implicitReturnType>;
|
|
539
541
|
fapiPrivatePostFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
542
|
+
fapiPrivatePostConvertGetQuote(params?: {}): Promise<implicitReturnType>;
|
|
543
|
+
fapiPrivatePostConvertAcceptQuote(params?: {}): Promise<implicitReturnType>;
|
|
540
544
|
fapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
541
545
|
fapiPrivatePutOrder(params?: {}): Promise<implicitReturnType>;
|
|
542
546
|
fapiPrivatePutBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -533,6 +533,7 @@ interface binance {
|
|
|
533
533
|
fapiPublicGetConstituents(params?: {}): Promise<implicitReturnType>;
|
|
534
534
|
fapiPublicGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
535
535
|
fapiPublicGetLvtKlines(params?: {}): Promise<implicitReturnType>;
|
|
536
|
+
fapiPublicGetConvertExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
536
537
|
fapiDataGetDeliveryPrice(params?: {}): Promise<implicitReturnType>;
|
|
537
538
|
fapiDataGetOpenInterestHist(params?: {}): Promise<implicitReturnType>;
|
|
538
539
|
fapiDataGetTopLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|
|
@@ -577,6 +578,7 @@ interface binance {
|
|
|
577
578
|
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
578
579
|
fapiPrivateGetSymbolConfig(params?: {}): Promise<implicitReturnType>;
|
|
579
580
|
fapiPrivateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
581
|
+
fapiPrivateGetConvertOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
580
582
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
581
583
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
582
584
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -589,6 +591,8 @@ interface binance {
|
|
|
589
591
|
fapiPrivatePostApiReferralCustomization(params?: {}): Promise<implicitReturnType>;
|
|
590
592
|
fapiPrivatePostApiReferralUserCustomization(params?: {}): Promise<implicitReturnType>;
|
|
591
593
|
fapiPrivatePostFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
594
|
+
fapiPrivatePostConvertGetQuote(params?: {}): Promise<implicitReturnType>;
|
|
595
|
+
fapiPrivatePostConvertAcceptQuote(params?: {}): Promise<implicitReturnType>;
|
|
592
596
|
fapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
593
597
|
fapiPrivatePutOrder(params?: {}): Promise<implicitReturnType>;
|
|
594
598
|
fapiPrivatePutBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -481,6 +481,7 @@ interface binance {
|
|
|
481
481
|
fapiPublicGetConstituents(params?: {}): Promise<implicitReturnType>;
|
|
482
482
|
fapiPublicGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
483
483
|
fapiPublicGetLvtKlines(params?: {}): Promise<implicitReturnType>;
|
|
484
|
+
fapiPublicGetConvertExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
484
485
|
fapiDataGetDeliveryPrice(params?: {}): Promise<implicitReturnType>;
|
|
485
486
|
fapiDataGetOpenInterestHist(params?: {}): Promise<implicitReturnType>;
|
|
486
487
|
fapiDataGetTopLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|
|
@@ -525,6 +526,7 @@ interface binance {
|
|
|
525
526
|
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
526
527
|
fapiPrivateGetSymbolConfig(params?: {}): Promise<implicitReturnType>;
|
|
527
528
|
fapiPrivateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
529
|
+
fapiPrivateGetConvertOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
528
530
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
529
531
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
530
532
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -537,6 +539,8 @@ interface binance {
|
|
|
537
539
|
fapiPrivatePostApiReferralCustomization(params?: {}): Promise<implicitReturnType>;
|
|
538
540
|
fapiPrivatePostApiReferralUserCustomization(params?: {}): Promise<implicitReturnType>;
|
|
539
541
|
fapiPrivatePostFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
542
|
+
fapiPrivatePostConvertGetQuote(params?: {}): Promise<implicitReturnType>;
|
|
543
|
+
fapiPrivatePostConvertAcceptQuote(params?: {}): Promise<implicitReturnType>;
|
|
540
544
|
fapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
541
545
|
fapiPrivatePutOrder(params?: {}): Promise<implicitReturnType>;
|
|
542
546
|
fapiPrivatePutBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -218,6 +218,7 @@ interface kucoin {
|
|
|
218
218
|
futuresPrivateDeleteWithdrawalsWithdrawalId(params?: {}): Promise<implicitReturnType>;
|
|
219
219
|
futuresPrivateDeleteCancelTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
220
220
|
futuresPrivateDeleteSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
221
|
+
futuresPrivateDeleteOrdersMultiCancel(params?: {}): Promise<implicitReturnType>;
|
|
221
222
|
webExchangeGetCurrencyCurrencyChainInfo(params?: {}): Promise<implicitReturnType>;
|
|
222
223
|
webExchangeGetContractSymbolFundingRates(params?: {}): Promise<implicitReturnType>;
|
|
223
224
|
brokerGetBrokerNdInfo(params?: {}): Promise<implicitReturnType>;
|
package/js/src/base/types.d.ts
CHANGED
package/js/src/binance.js
CHANGED
|
@@ -807,6 +807,7 @@ export default class binance extends Exchange {
|
|
|
807
807
|
'constituents': 2,
|
|
808
808
|
'apiTradingStatus': { 'cost': 1, 'noSymbol': 10 },
|
|
809
809
|
'lvtKlines': 1,
|
|
810
|
+
'convert/exchangeInfo': 4,
|
|
810
811
|
},
|
|
811
812
|
},
|
|
812
813
|
'fapiData': {
|
|
@@ -860,6 +861,7 @@ export default class binance extends Exchange {
|
|
|
860
861
|
'feeBurn': 1,
|
|
861
862
|
'symbolConfig': 5,
|
|
862
863
|
'accountConfig': 5,
|
|
864
|
+
'convert/orderStatus': 5,
|
|
863
865
|
},
|
|
864
866
|
'post': {
|
|
865
867
|
'batchOrders': 5,
|
|
@@ -875,6 +877,8 @@ export default class binance extends Exchange {
|
|
|
875
877
|
'apiReferral/customization': 1,
|
|
876
878
|
'apiReferral/userCustomization': 1,
|
|
877
879
|
'feeBurn': 1,
|
|
880
|
+
'convert/getQuote': 200,
|
|
881
|
+
'convert/acceptQuote': 20,
|
|
878
882
|
},
|
|
879
883
|
'put': {
|
|
880
884
|
'listenKey': 1,
|
|
@@ -3202,8 +3206,8 @@ export default class binance extends Exchange {
|
|
|
3202
3206
|
let fees = this.fees;
|
|
3203
3207
|
let linear = undefined;
|
|
3204
3208
|
let inverse = undefined;
|
|
3205
|
-
const strike = this.safeString(market, 'strikePrice');
|
|
3206
3209
|
let symbol = base + '/' + quote;
|
|
3210
|
+
let strike = undefined;
|
|
3207
3211
|
if (contract) {
|
|
3208
3212
|
if (swap) {
|
|
3209
3213
|
symbol = symbol + ':' + settle;
|
|
@@ -3212,6 +3216,7 @@ export default class binance extends Exchange {
|
|
|
3212
3216
|
symbol = symbol + ':' + settle + '-' + this.yymmdd(expiry);
|
|
3213
3217
|
}
|
|
3214
3218
|
else if (option) {
|
|
3219
|
+
strike = this.numberToString(this.parseToNumeric(this.safeString(market, 'strikePrice')));
|
|
3215
3220
|
symbol = symbol + ':' + settle + '-' + this.yymmdd(expiry) + '-' + strike + '-' + this.safeString(optionParts, 3);
|
|
3216
3221
|
}
|
|
3217
3222
|
contractSize = this.safeNumber2(market, 'contractSize', 'unit', this.parseNumber('1'));
|
|
@@ -6285,14 +6290,28 @@ export default class binance extends Exchange {
|
|
|
6285
6290
|
request['quantity'] = this.parseToNumeric(amount);
|
|
6286
6291
|
}
|
|
6287
6292
|
else {
|
|
6288
|
-
|
|
6293
|
+
const marketAmountPrecision = this.safeString(market['precision'], 'amount');
|
|
6294
|
+
const isPrecisionAvailable = (marketAmountPrecision !== undefined);
|
|
6295
|
+
if (isPrecisionAvailable) {
|
|
6296
|
+
request['quantity'] = this.amountToPrecision(symbol, amount);
|
|
6297
|
+
}
|
|
6298
|
+
else {
|
|
6299
|
+
request['quantity'] = this.parseToNumeric(amount); // some options don't have the precision available
|
|
6300
|
+
}
|
|
6289
6301
|
}
|
|
6290
6302
|
}
|
|
6291
6303
|
if (priceIsRequired && !isPriceMatch) {
|
|
6292
6304
|
if (price === undefined) {
|
|
6293
6305
|
throw new InvalidOrder(this.id + ' createOrder() requires a price argument for a ' + type + ' order');
|
|
6294
6306
|
}
|
|
6295
|
-
|
|
6307
|
+
const pricePrecision = this.safeString(market['precision'], 'price');
|
|
6308
|
+
const isPricePrecisionAvailable = (pricePrecision !== undefined);
|
|
6309
|
+
if (isPricePrecisionAvailable) {
|
|
6310
|
+
request['price'] = this.priceToPrecision(symbol, price);
|
|
6311
|
+
}
|
|
6312
|
+
else {
|
|
6313
|
+
request['price'] = this.parseToNumeric(price); // some options don't have the precision available
|
|
6314
|
+
}
|
|
6296
6315
|
}
|
|
6297
6316
|
if (stopPriceIsRequired) {
|
|
6298
6317
|
if (market['contract']) {
|
package/js/src/bingx.js
CHANGED
|
@@ -496,6 +496,7 @@ export default class bingx extends Exchange {
|
|
|
496
496
|
},
|
|
497
497
|
'networks': {
|
|
498
498
|
'ARB': 'ARBITRUM',
|
|
499
|
+
'MATIC': 'POLYGON',
|
|
499
500
|
},
|
|
500
501
|
},
|
|
501
502
|
});
|
|
@@ -775,7 +776,7 @@ export default class bingx extends Exchange {
|
|
|
775
776
|
if ((this.safeString(market, 'apiStateOpen') === 'true') && (this.safeString(market, 'apiStateClose') === 'true')) {
|
|
776
777
|
isActive = true; // swap active
|
|
777
778
|
}
|
|
778
|
-
else if (this.safeBool(market, 'apiStateSell') && this.safeBool(market, 'apiStateBuy') && (this.
|
|
779
|
+
else if (this.safeBool(market, 'apiStateSell') && this.safeBool(market, 'apiStateBuy') && (this.safeString(market, 'status') === '1')) {
|
|
779
780
|
isActive = true; // spot active
|
|
780
781
|
}
|
|
781
782
|
const isInverse = (spot) ? undefined : checkIsInverse;
|
package/js/src/bitget.js
CHANGED
|
@@ -1426,7 +1426,7 @@ export default class bitget extends Exchange {
|
|
|
1426
1426
|
'ARB': 'ArbitrumOne',
|
|
1427
1427
|
'ZKSYNC': 'zkSyncEra',
|
|
1428
1428
|
'STARKNET': 'Starknet',
|
|
1429
|
-
'APT': '
|
|
1429
|
+
'APT': 'Aptos',
|
|
1430
1430
|
'MATIC': 'Polygon',
|
|
1431
1431
|
'VIC': 'VICTION',
|
|
1432
1432
|
'AVAXC': 'C-Chain',
|
package/js/src/htx.js
CHANGED
|
@@ -1238,6 +1238,18 @@ export default class htx extends Exchange {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
}
|
|
1240
1240
|
async fetchStatus(params = {}) {
|
|
1241
|
+
/**
|
|
1242
|
+
* @method
|
|
1243
|
+
* @name htx#fetchStatus
|
|
1244
|
+
* @description the latest known information on the availability of the exchange API
|
|
1245
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-system-status
|
|
1246
|
+
* @see https://huobiapi.github.io/docs/dm/v1/en/#get-system-status
|
|
1247
|
+
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-system-status
|
|
1248
|
+
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#get-system-status
|
|
1249
|
+
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#query-whether-the-system-is-available // contractPublicGetHeartbeat
|
|
1250
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1251
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
1252
|
+
*/
|
|
1241
1253
|
await this.loadMarkets();
|
|
1242
1254
|
let marketType = undefined;
|
|
1243
1255
|
[marketType, params] = this.handleMarketTypeAndParams('fetchStatus', undefined, params);
|
|
@@ -1464,6 +1476,8 @@ export default class htx extends Exchange {
|
|
|
1464
1476
|
* @method
|
|
1465
1477
|
* @name htx#fetchTime
|
|
1466
1478
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1479
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-current-timestamp
|
|
1480
|
+
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-current-system-timestamp
|
|
1467
1481
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1468
1482
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1469
1483
|
*/
|
|
@@ -1514,6 +1528,7 @@ export default class htx extends Exchange {
|
|
|
1514
1528
|
* @method
|
|
1515
1529
|
* @name htx#fetchTradingFee
|
|
1516
1530
|
* @description fetch the trading fees for a market
|
|
1531
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
|
|
1517
1532
|
* @param {string} symbol unified market symbol
|
|
1518
1533
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1519
1534
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -1559,6 +1574,15 @@ export default class htx extends Exchange {
|
|
|
1559
1574
|
return result;
|
|
1560
1575
|
}
|
|
1561
1576
|
async fetchTradingLimitsById(id, params = {}) {
|
|
1577
|
+
/**
|
|
1578
|
+
* @ignore
|
|
1579
|
+
* @method
|
|
1580
|
+
* @name htx#fetchTradingLimitsById
|
|
1581
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-current-fee-rate-applied-to-the-user
|
|
1582
|
+
* @param {string} id market id
|
|
1583
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1584
|
+
* @returns {object} the limits object of a market structure
|
|
1585
|
+
*/
|
|
1562
1586
|
const request = {
|
|
1563
1587
|
'symbol': id,
|
|
1564
1588
|
};
|
package/js/src/hyperliquid.js
CHANGED
|
@@ -1986,6 +1986,10 @@ export default class hyperliquid extends Exchange {
|
|
|
1986
1986
|
const statuses = {
|
|
1987
1987
|
'triggered': 'open',
|
|
1988
1988
|
'filled': 'closed',
|
|
1989
|
+
'open': 'open',
|
|
1990
|
+
'canceled': 'canceled',
|
|
1991
|
+
'rejected': 'rejected',
|
|
1992
|
+
'marginCanceled': 'canceled',
|
|
1989
1993
|
};
|
|
1990
1994
|
return this.safeString(statuses, status, status);
|
|
1991
1995
|
}
|
package/js/src/kucoin.js
CHANGED
|
@@ -5040,7 +5040,7 @@ export default class kucoin extends Exchange {
|
|
|
5040
5040
|
headers = (headers !== undefined) ? headers : {};
|
|
5041
5041
|
let url = this.urls['api'][api];
|
|
5042
5042
|
if (!this.isEmpty(query)) {
|
|
5043
|
-
if ((method === 'GET') || (method === 'DELETE')) {
|
|
5043
|
+
if (((method === 'GET') || (method === 'DELETE')) && (path !== 'orders/multi-cancel')) {
|
|
5044
5044
|
endpoint += '?' + this.rawencode(query);
|
|
5045
5045
|
}
|
|
5046
5046
|
else {
|
|
@@ -33,6 +33,7 @@ export default class kucoinfutures extends kucoin {
|
|
|
33
33
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
34
34
|
createContractOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
|
|
35
35
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
|
|
36
|
+
cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
|
|
36
37
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
|
|
37
38
|
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
38
39
|
parseMarginModification(info: any, market?: Market): MarginModification;
|