ccxt 4.4.26 → 4.4.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -132
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/alpaca.js +198 -5
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/base/Exchange.js +18 -0
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +8 -1
- package/dist/cjs/src/binancecoinm.js +1 -1
- package/dist/cjs/src/binanceus.js +1 -1
- package/dist/cjs/src/binanceusdm.js +1 -1
- package/dist/cjs/src/bingx.js +25 -36
- package/dist/cjs/src/bit2c.js +1 -1
- package/dist/cjs/src/bitbank.js +1 -1
- package/dist/cjs/src/bitbns.js +1 -1
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +1 -1
- package/dist/cjs/src/bitflyer.js +1 -1
- package/dist/cjs/src/bitget.js +1 -1
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/bitopro.js +1 -1
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitstamp.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/bitvavo.js +1 -1
- package/dist/cjs/src/bl3p.js +1 -1
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/blofin.js +1 -1
- package/dist/cjs/src/btcalpha.js +1 -1
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/btcmarkets.js +1 -1
- package/dist/cjs/src/btcturk.js +1 -1
- package/dist/cjs/src/bybit.js +5 -1
- package/dist/cjs/src/coinbase.js +97 -11
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/gate.js +22 -16
- package/dist/cjs/src/hyperliquid.js +21 -1
- package/dist/cjs/src/kraken.js +48 -35
- package/dist/cjs/src/lbank.js +100 -1
- package/dist/cjs/src/pro/binance.js +5 -7
- package/dist/cjs/src/pro/lbank.js +9 -4
- package/dist/cjs/src/wavesexchange.js +14 -2
- package/examples/js/cli.js +23 -3
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/alpaca.d.ts +2 -0
- package/js/src/abstract/binance.d.ts +7 -0
- package/js/src/abstract/binancecoinm.d.ts +7 -0
- package/js/src/abstract/binanceus.d.ts +7 -0
- package/js/src/abstract/binanceusdm.d.ts +7 -0
- package/js/src/ace.js +1 -1
- package/js/src/alpaca.d.ts +9 -1
- package/js/src/alpaca.js +198 -5
- package/js/src/ascendex.js +1 -1
- package/js/src/base/Exchange.d.ts +6 -0
- package/js/src/base/Exchange.js +18 -0
- package/js/src/bequant.js +1 -1
- package/js/src/bigone.js +1 -1
- package/js/src/binance.js +8 -1
- package/js/src/binancecoinm.js +1 -1
- package/js/src/binanceus.js +1 -1
- package/js/src/binanceusdm.js +1 -1
- package/js/src/bingx.js +25 -36
- package/js/src/bit2c.js +1 -1
- package/js/src/bitbank.js +1 -1
- package/js/src/bitbns.js +1 -1
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.js +1 -1
- package/js/src/bitflyer.js +1 -1
- package/js/src/bitget.js +1 -1
- package/js/src/bithumb.js +1 -1
- package/js/src/bitmart.js +1 -1
- package/js/src/bitmex.js +1 -1
- package/js/src/bitopro.js +1 -1
- package/js/src/bitrue.js +1 -1
- package/js/src/bitso.js +1 -1
- package/js/src/bitstamp.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/bitvavo.js +1 -1
- package/js/src/bl3p.js +1 -1
- package/js/src/blockchaincom.js +1 -1
- package/js/src/blofin.js +1 -1
- package/js/src/btcalpha.js +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/btcmarkets.js +1 -1
- package/js/src/btcturk.js +1 -1
- package/js/src/bybit.js +5 -1
- package/js/src/coinbase.d.ts +1 -0
- package/js/src/coinbase.js +97 -11
- package/js/src/coinex.js +1 -1
- package/js/src/gate.js +22 -16
- package/js/src/hyperliquid.d.ts +1 -0
- package/js/src/hyperliquid.js +21 -1
- package/js/src/kraken.js +48 -35
- package/js/src/lbank.d.ts +4 -1
- package/js/src/lbank.js +100 -1
- package/js/src/pro/binance.js +5 -7
- package/js/src/pro/lbank.js +9 -4
- package/js/src/wavesexchange.js +14 -2
- package/package.json +1 -1
package/dist/cjs/src/lbank.js
CHANGED
|
@@ -57,7 +57,7 @@ class lbank extends lbank$1 {
|
|
|
57
57
|
'fetchFundingHistory': false,
|
|
58
58
|
'fetchFundingRate': false,
|
|
59
59
|
'fetchFundingRateHistory': false,
|
|
60
|
-
'fetchFundingRates':
|
|
60
|
+
'fetchFundingRates': true,
|
|
61
61
|
'fetchIndexOHLCV': false,
|
|
62
62
|
'fetchIsolatedBorrowRate': false,
|
|
63
63
|
'fetchIsolatedBorrowRates': false,
|
|
@@ -1171,6 +1171,105 @@ class lbank extends lbank$1 {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
return undefined;
|
|
1173
1173
|
}
|
|
1174
|
+
parseFundingRate(ticker, market = undefined) {
|
|
1175
|
+
// {
|
|
1176
|
+
// "symbol": "BTCUSDT",
|
|
1177
|
+
// "highestPrice": "69495.5",
|
|
1178
|
+
// "underlyingPrice": "68455.904",
|
|
1179
|
+
// "lowestPrice": "68182.1",
|
|
1180
|
+
// "openPrice": "68762.4",
|
|
1181
|
+
// "positionFeeRate": "0.0001",
|
|
1182
|
+
// "volume": "33534.2858",
|
|
1183
|
+
// "markedPrice": "68434.1",
|
|
1184
|
+
// "turnover": "1200636218.210558",
|
|
1185
|
+
// "positionFeeTime": "28800",
|
|
1186
|
+
// "lastPrice": "68427.3",
|
|
1187
|
+
// "nextFeeTime": "1730736000000",
|
|
1188
|
+
// "fundingRate": "0.0001",
|
|
1189
|
+
// }
|
|
1190
|
+
const marketId = this.safeString(ticker, 'symbol');
|
|
1191
|
+
const symbol = this.safeSymbol(marketId, market);
|
|
1192
|
+
const markPrice = this.safeNumber(ticker, 'markedPrice');
|
|
1193
|
+
const indexPrice = this.safeNumber(ticker, 'underlyingPrice');
|
|
1194
|
+
const fundingRate = this.safeNumber(ticker, 'fundingRate');
|
|
1195
|
+
const fundingTime = this.safeInteger(ticker, 'nextFeeTime');
|
|
1196
|
+
return {
|
|
1197
|
+
'info': ticker,
|
|
1198
|
+
'symbol': symbol,
|
|
1199
|
+
'markPrice': markPrice,
|
|
1200
|
+
'indexPrice': indexPrice,
|
|
1201
|
+
'fundingRate': fundingRate,
|
|
1202
|
+
'fundingTimestamp': fundingTime,
|
|
1203
|
+
'fundingDatetime': this.iso8601(fundingTime),
|
|
1204
|
+
'timestamp': undefined,
|
|
1205
|
+
'datetime': undefined,
|
|
1206
|
+
'nextFundingRate': undefined,
|
|
1207
|
+
'nextFundingTimestamp': undefined,
|
|
1208
|
+
'nextFundingDatetime': undefined,
|
|
1209
|
+
'previousFundingRate': undefined,
|
|
1210
|
+
'previousFundingTimestamp': undefined,
|
|
1211
|
+
'previousFundingDatetime': undefined,
|
|
1212
|
+
'interval': undefined,
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
async fetchFundingRate(symbol, params = {}) {
|
|
1216
|
+
/**
|
|
1217
|
+
* @method
|
|
1218
|
+
* @name lbank#fetchFundingRate
|
|
1219
|
+
* @description fetch the current funding rate
|
|
1220
|
+
* @see https://www.lbank.com/en-US/docs/contract.html#query-contract-market-list
|
|
1221
|
+
* @param {string} symbol unified market symbol
|
|
1222
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1223
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
1224
|
+
*/
|
|
1225
|
+
await this.loadMarkets();
|
|
1226
|
+
const market = this.market(symbol);
|
|
1227
|
+
const responseForSwap = await this.fetchFundingRates([market['symbol']], params);
|
|
1228
|
+
return this.safeValue(responseForSwap, market['symbol']);
|
|
1229
|
+
}
|
|
1230
|
+
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
1231
|
+
/**
|
|
1232
|
+
* @method
|
|
1233
|
+
* @name lbank#fetchFundingRates
|
|
1234
|
+
* @description fetch the funding rate for multiple markets
|
|
1235
|
+
* @see https://www.lbank.com/en-US/docs/contract.html#query-contract-market-list
|
|
1236
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
1237
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1238
|
+
* @returns {object} a dictionary of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
1239
|
+
*/
|
|
1240
|
+
await this.loadMarkets();
|
|
1241
|
+
symbols = this.marketSymbols(symbols);
|
|
1242
|
+
const request = {
|
|
1243
|
+
'productGroup': 'SwapU',
|
|
1244
|
+
};
|
|
1245
|
+
const response = await this.contractPublicGetCfdOpenApiV1PubMarketData(this.extend(request, params));
|
|
1246
|
+
// {
|
|
1247
|
+
// "data": [
|
|
1248
|
+
// {
|
|
1249
|
+
// "symbol": "BTCUSDT",
|
|
1250
|
+
// "highestPrice": "69495.5",
|
|
1251
|
+
// "underlyingPrice": "68455.904",
|
|
1252
|
+
// "lowestPrice": "68182.1",
|
|
1253
|
+
// "openPrice": "68762.4",
|
|
1254
|
+
// "positionFeeRate": "0.0001",
|
|
1255
|
+
// "volume": "33534.2858",
|
|
1256
|
+
// "markedPrice": "68434.1",
|
|
1257
|
+
// "turnover": "1200636218.210558",
|
|
1258
|
+
// "positionFeeTime": "28800",
|
|
1259
|
+
// "lastPrice": "68427.3",
|
|
1260
|
+
// "nextFeeTime": "1730736000000",
|
|
1261
|
+
// "fundingRate": "0.0001",
|
|
1262
|
+
// }
|
|
1263
|
+
// ],
|
|
1264
|
+
// "error_code": "0",
|
|
1265
|
+
// "msg": "Success",
|
|
1266
|
+
// "result": "true",
|
|
1267
|
+
// "success": True,
|
|
1268
|
+
// }
|
|
1269
|
+
const data = this.safeList(response, 'data', []);
|
|
1270
|
+
const result = this.parseFundingRates(data);
|
|
1271
|
+
return this.filterByArray(result, 'symbol', symbols);
|
|
1272
|
+
}
|
|
1174
1273
|
async fetchBalance(params = {}) {
|
|
1175
1274
|
/**
|
|
1176
1275
|
* @method
|
|
@@ -1972,7 +1972,7 @@ class binance extends binance$1 {
|
|
|
1972
1972
|
if (symbolsDefined) {
|
|
1973
1973
|
firstMarket = this.market(symbols[0]);
|
|
1974
1974
|
}
|
|
1975
|
-
const defaultMarket = (isMarkPrice) ? 'swap' :
|
|
1975
|
+
const defaultMarket = (isMarkPrice) ? 'swap' : undefined;
|
|
1976
1976
|
[marketType, params] = this.handleMarketTypeAndParams(methodName, firstMarket, params, defaultMarket);
|
|
1977
1977
|
let subType = undefined;
|
|
1978
1978
|
[subType, params] = this.handleSubTypeAndParams(methodName, firstMarket, params);
|
|
@@ -3714,12 +3714,6 @@ class binance extends binance$1 {
|
|
|
3714
3714
|
market = this.getMarketFromSymbols(symbols);
|
|
3715
3715
|
messageHash = '::' + symbols.join(',');
|
|
3716
3716
|
}
|
|
3717
|
-
const marketTypeObject = {};
|
|
3718
|
-
if (market !== undefined) {
|
|
3719
|
-
marketTypeObject['type'] = market['type'];
|
|
3720
|
-
marketTypeObject['subType'] = market['subType'];
|
|
3721
|
-
}
|
|
3722
|
-
await this.authenticate(this.extend(marketTypeObject, params));
|
|
3723
3717
|
let type = undefined;
|
|
3724
3718
|
[type, params] = this.handleMarketTypeAndParams('watchPositions', market, params);
|
|
3725
3719
|
if (type === 'spot' || type === 'margin') {
|
|
@@ -3733,6 +3727,10 @@ class binance extends binance$1 {
|
|
|
3733
3727
|
else if (this.isInverse(type, subType)) {
|
|
3734
3728
|
type = 'delivery';
|
|
3735
3729
|
}
|
|
3730
|
+
const marketTypeObject = {};
|
|
3731
|
+
marketTypeObject['type'] = type;
|
|
3732
|
+
marketTypeObject['subType'] = subType;
|
|
3733
|
+
await this.authenticate(this.extend(marketTypeObject, params));
|
|
3736
3734
|
messageHash = type + ':positions' + messageHash;
|
|
3737
3735
|
let isPortfolioMargin = undefined;
|
|
3738
3736
|
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'watchPositions', 'papi', 'portfolioMargin', false);
|
|
@@ -808,10 +808,15 @@ class lbank extends lbank$1 {
|
|
|
808
808
|
// { ping: 'a13a939c-5f25-4e06-9981-93cb3b890707', action: 'ping' }
|
|
809
809
|
//
|
|
810
810
|
const pingId = this.safeString(message, 'ping');
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
811
|
+
try {
|
|
812
|
+
await client.send({
|
|
813
|
+
'action': 'pong',
|
|
814
|
+
'pong': pingId,
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
catch (e) {
|
|
818
|
+
this.onError(client, e);
|
|
819
|
+
}
|
|
815
820
|
}
|
|
816
821
|
handleMessage(client, message) {
|
|
817
822
|
const status = this.safeString(message, 'status');
|
|
@@ -124,7 +124,13 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
124
124
|
'forward': 'https://wx.network/api/v1/forward/matcher',
|
|
125
125
|
'market': 'https://wx.network/api/v1/forward/marketdata/api/v1',
|
|
126
126
|
},
|
|
127
|
-
'doc':
|
|
127
|
+
'doc': [
|
|
128
|
+
'https://docs.wx.network',
|
|
129
|
+
'https://docs.waves.tech',
|
|
130
|
+
'https://api.wavesplatform.com/v0/docs/',
|
|
131
|
+
'https://nodes.wavesnodes.com/api-docs/index.html',
|
|
132
|
+
'https://matcher.waves.exchange/api-docs/index.html',
|
|
133
|
+
],
|
|
128
134
|
'www': 'https://wx.network',
|
|
129
135
|
},
|
|
130
136
|
'api': {
|
|
@@ -598,6 +604,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
598
604
|
* @method
|
|
599
605
|
* @name wavesexchange#fetchOrderBook
|
|
600
606
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
607
|
+
* @see https://matcher.waves.exchange/api-docs/index.html#/markets/getOrderBook
|
|
601
608
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
602
609
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
603
610
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -745,6 +752,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
745
752
|
* @method
|
|
746
753
|
* @name wavesexchange#signIn
|
|
747
754
|
* @description sign in, must be called prior to using other authenticated methods
|
|
755
|
+
* @see https://docs.wx.network/en/api/auth/oauth2-token
|
|
748
756
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
749
757
|
* @returns response from exchange
|
|
750
758
|
*/
|
|
@@ -858,6 +866,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
858
866
|
* @method
|
|
859
867
|
* @name wavesexchange#fetchTicker
|
|
860
868
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
869
|
+
* @see https://api.wavesplatform.com/v0/docs/#/pairs/getPairsListAll
|
|
861
870
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
862
871
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
863
872
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -901,7 +910,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
901
910
|
* @method
|
|
902
911
|
* @name wavesexchange#fetchTickers
|
|
903
912
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
904
|
-
* @param {string[]
|
|
913
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
905
914
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
906
915
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
907
916
|
*/
|
|
@@ -942,6 +951,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
942
951
|
* @method
|
|
943
952
|
* @name wavesexchange#fetchOHLCV
|
|
944
953
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
954
|
+
* @see https://api.wavesplatform.com/v0/docs/#/candles/getCandles
|
|
945
955
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
946
956
|
* @param {string} timeframe the length of time each candle represents
|
|
947
957
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -1276,6 +1286,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1276
1286
|
* @method
|
|
1277
1287
|
* @name wavesexchange#createOrder
|
|
1278
1288
|
* @description create a trade order
|
|
1289
|
+
* @see https://matcher.waves.exchange/api-docs/index.html#/serialize/serializeOrder
|
|
1279
1290
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1280
1291
|
* @param {string} type 'market' or 'limit'
|
|
1281
1292
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -1511,6 +1522,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1511
1522
|
* @method
|
|
1512
1523
|
* @name wavesexchange#fetchOrder
|
|
1513
1524
|
* @description fetches information on an order made by the user
|
|
1525
|
+
* @see https://matcher.waves.exchange/api-docs/index.html#/status/getOrderStatusByPKAndIdWithSig
|
|
1514
1526
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1515
1527
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1516
1528
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/examples/js/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import asTable from 'as-table'
|
|
|
6
6
|
import ololog from 'ololog'
|
|
7
7
|
import ccxt from '../../js/ccxt.js'
|
|
8
8
|
import { Agent } from 'https'
|
|
9
|
-
|
|
9
|
+
import add_static_result from '../../utils/update-static-request-response.js'
|
|
10
10
|
const fsPromises = fs.promises;
|
|
11
11
|
ansi.nice
|
|
12
12
|
const log = ololog.configure ({ locate: false }).unlimited
|
|
@@ -38,12 +38,19 @@ let [processPath, , exchangeId, methodName, ... params] = process.argv.filter (x
|
|
|
38
38
|
, isSwap = process.argv.includes ('--swap')
|
|
39
39
|
, isFuture = process.argv.includes ('--future')
|
|
40
40
|
, isOption = process.argv.includes ('--option')
|
|
41
|
-
, shouldCreateRequestReport = process.argv.includes ('--report')
|
|
41
|
+
, shouldCreateRequestReport = process.argv.includes ('--report') || process.argv.includes ('--request')
|
|
42
42
|
, shouldCreateResponseReport = process.argv.includes ('--response')
|
|
43
43
|
, shouldCreateBoth = process.argv.includes ('--static')
|
|
44
44
|
, raw = process.argv.includes ('--raw')
|
|
45
45
|
, noKeys = process.argv.includes ('--no-keys')
|
|
46
46
|
|
|
47
|
+
let foundDescription = undefined;
|
|
48
|
+
for (let i = 0; i < process.argv.length; i++) {
|
|
49
|
+
if (process.argv[i] === '--name') {
|
|
50
|
+
foundDescription = process.argv[i + 1];
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
47
54
|
//-----------------------------------------------------------------------------
|
|
48
55
|
if (!raw) {
|
|
49
56
|
log ((new Date ()).toISOString())
|
|
@@ -154,6 +161,12 @@ function createRequestTemplate(exchange, methodName, args, result) {
|
|
|
154
161
|
log.green('-------------------------------------------')
|
|
155
162
|
log (JSON.stringify (final, null, 2))
|
|
156
163
|
log.green('-------------------------------------------')
|
|
164
|
+
|
|
165
|
+
if (foundDescription !== undefined) {
|
|
166
|
+
final.description = foundDescription;
|
|
167
|
+
log.green('auto-saving static result');
|
|
168
|
+
add_static_result('request', exchange.id, methodName, final);
|
|
169
|
+
}
|
|
157
170
|
}
|
|
158
171
|
|
|
159
172
|
//-----------------------------------------------------------------------------
|
|
@@ -170,6 +183,12 @@ function createResponseTemplate(exchange, methodName, args, result) {
|
|
|
170
183
|
log.green('-------------------------------------------')
|
|
171
184
|
log (jsonStringify (final, 2))
|
|
172
185
|
log.green('-------------------------------------------')
|
|
186
|
+
|
|
187
|
+
if (foundDescription !== undefined) {
|
|
188
|
+
final.description = foundDescription;
|
|
189
|
+
log.green('auto-saving static result');
|
|
190
|
+
add_static_result('response', exchange.id, methodName, final);
|
|
191
|
+
}
|
|
173
192
|
}
|
|
174
193
|
|
|
175
194
|
//-----------------------------------------------------------------------------
|
|
@@ -237,7 +256,8 @@ const printHumanReadable = (exchange, result) => {
|
|
|
237
256
|
return String (x)
|
|
238
257
|
}
|
|
239
258
|
})
|
|
240
|
-
log (result.length > 0 ? configuredAsTable (result.map (
|
|
259
|
+
log (result.length > 0 ? configuredAsTable (result.map (rawElement => {
|
|
260
|
+
const element = Object.assign ({}, rawElement)
|
|
241
261
|
let keys = Object.keys (element)
|
|
242
262
|
delete element['info']
|
|
243
263
|
keys.forEach (key => {
|
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 } 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.27";
|
|
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.28';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -20,10 +20,12 @@ interface Exchange {
|
|
|
20
20
|
traderPrivateGetV2CorporateActionsAnnouncementsId(params?: {}): Promise<implicitReturnType>;
|
|
21
21
|
traderPrivateGetV2CorporateActionsAnnouncements(params?: {}): Promise<implicitReturnType>;
|
|
22
22
|
traderPrivateGetV2Wallets(params?: {}): Promise<implicitReturnType>;
|
|
23
|
+
traderPrivateGetV2WalletsTransfers(params?: {}): Promise<implicitReturnType>;
|
|
23
24
|
traderPrivatePostV2Orders(params?: {}): Promise<implicitReturnType>;
|
|
24
25
|
traderPrivatePostV2Watchlists(params?: {}): Promise<implicitReturnType>;
|
|
25
26
|
traderPrivatePostV2WatchlistsWatchlistId(params?: {}): Promise<implicitReturnType>;
|
|
26
27
|
traderPrivatePostV2WatchlistsByName(params?: {}): Promise<implicitReturnType>;
|
|
28
|
+
traderPrivatePostV2WalletsTransfers(params?: {}): Promise<implicitReturnType>;
|
|
27
29
|
traderPrivatePutV2WatchlistsWatchlistId(params?: {}): Promise<implicitReturnType>;
|
|
28
30
|
traderPrivatePutV2WatchlistsByName(params?: {}): Promise<implicitReturnType>;
|
|
29
31
|
traderPrivatePatchV2OrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
@@ -586,6 +586,9 @@ interface Exchange {
|
|
|
586
586
|
eapiPrivateGetMmp(params?: {}): Promise<implicitReturnType>;
|
|
587
587
|
eapiPrivateGetCountdownCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
588
588
|
eapiPrivateGetOrder(params?: {}): Promise<implicitReturnType>;
|
|
589
|
+
eapiPrivateGetBlockOrderOrders(params?: {}): Promise<implicitReturnType>;
|
|
590
|
+
eapiPrivateGetBlockOrderExecute(params?: {}): Promise<implicitReturnType>;
|
|
591
|
+
eapiPrivateGetBlockUserTrades(params?: {}): Promise<implicitReturnType>;
|
|
589
592
|
eapiPrivatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
590
593
|
eapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
591
594
|
eapiPrivatePostListenKey(params?: {}): Promise<implicitReturnType>;
|
|
@@ -593,12 +596,16 @@ interface Exchange {
|
|
|
593
596
|
eapiPrivatePostMmpReset(params?: {}): Promise<implicitReturnType>;
|
|
594
597
|
eapiPrivatePostCountdownCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
595
598
|
eapiPrivatePostCountdownCancelAllHeartBeat(params?: {}): Promise<implicitReturnType>;
|
|
599
|
+
eapiPrivatePostBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
600
|
+
eapiPrivatePostBlockOrderExecute(params?: {}): Promise<implicitReturnType>;
|
|
596
601
|
eapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
602
|
+
eapiPrivatePutBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
597
603
|
eapiPrivateDeleteOrder(params?: {}): Promise<implicitReturnType>;
|
|
598
604
|
eapiPrivateDeleteBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
599
605
|
eapiPrivateDeleteAllOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
600
606
|
eapiPrivateDeleteAllOpenOrdersByUnderlying(params?: {}): Promise<implicitReturnType>;
|
|
601
607
|
eapiPrivateDeleteListenKey(params?: {}): Promise<implicitReturnType>;
|
|
608
|
+
eapiPrivateDeleteBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
602
609
|
publicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
603
610
|
publicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
604
611
|
publicGetDepth(params?: {}): Promise<implicitReturnType>;
|
|
@@ -586,6 +586,9 @@ interface binance {
|
|
|
586
586
|
eapiPrivateGetMmp(params?: {}): Promise<implicitReturnType>;
|
|
587
587
|
eapiPrivateGetCountdownCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
588
588
|
eapiPrivateGetOrder(params?: {}): Promise<implicitReturnType>;
|
|
589
|
+
eapiPrivateGetBlockOrderOrders(params?: {}): Promise<implicitReturnType>;
|
|
590
|
+
eapiPrivateGetBlockOrderExecute(params?: {}): Promise<implicitReturnType>;
|
|
591
|
+
eapiPrivateGetBlockUserTrades(params?: {}): Promise<implicitReturnType>;
|
|
589
592
|
eapiPrivatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
590
593
|
eapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
591
594
|
eapiPrivatePostListenKey(params?: {}): Promise<implicitReturnType>;
|
|
@@ -593,12 +596,16 @@ interface binance {
|
|
|
593
596
|
eapiPrivatePostMmpReset(params?: {}): Promise<implicitReturnType>;
|
|
594
597
|
eapiPrivatePostCountdownCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
595
598
|
eapiPrivatePostCountdownCancelAllHeartBeat(params?: {}): Promise<implicitReturnType>;
|
|
599
|
+
eapiPrivatePostBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
600
|
+
eapiPrivatePostBlockOrderExecute(params?: {}): Promise<implicitReturnType>;
|
|
596
601
|
eapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
602
|
+
eapiPrivatePutBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
597
603
|
eapiPrivateDeleteOrder(params?: {}): Promise<implicitReturnType>;
|
|
598
604
|
eapiPrivateDeleteBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
599
605
|
eapiPrivateDeleteAllOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
600
606
|
eapiPrivateDeleteAllOpenOrdersByUnderlying(params?: {}): Promise<implicitReturnType>;
|
|
601
607
|
eapiPrivateDeleteListenKey(params?: {}): Promise<implicitReturnType>;
|
|
608
|
+
eapiPrivateDeleteBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
602
609
|
publicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
603
610
|
publicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
604
611
|
publicGetDepth(params?: {}): Promise<implicitReturnType>;
|
|
@@ -638,6 +638,9 @@ interface binance {
|
|
|
638
638
|
eapiPrivateGetMmp(params?: {}): Promise<implicitReturnType>;
|
|
639
639
|
eapiPrivateGetCountdownCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
640
640
|
eapiPrivateGetOrder(params?: {}): Promise<implicitReturnType>;
|
|
641
|
+
eapiPrivateGetBlockOrderOrders(params?: {}): Promise<implicitReturnType>;
|
|
642
|
+
eapiPrivateGetBlockOrderExecute(params?: {}): Promise<implicitReturnType>;
|
|
643
|
+
eapiPrivateGetBlockUserTrades(params?: {}): Promise<implicitReturnType>;
|
|
641
644
|
eapiPrivatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
642
645
|
eapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
643
646
|
eapiPrivatePostListenKey(params?: {}): Promise<implicitReturnType>;
|
|
@@ -645,12 +648,16 @@ interface binance {
|
|
|
645
648
|
eapiPrivatePostMmpReset(params?: {}): Promise<implicitReturnType>;
|
|
646
649
|
eapiPrivatePostCountdownCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
647
650
|
eapiPrivatePostCountdownCancelAllHeartBeat(params?: {}): Promise<implicitReturnType>;
|
|
651
|
+
eapiPrivatePostBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
652
|
+
eapiPrivatePostBlockOrderExecute(params?: {}): Promise<implicitReturnType>;
|
|
648
653
|
eapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
654
|
+
eapiPrivatePutBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
649
655
|
eapiPrivateDeleteOrder(params?: {}): Promise<implicitReturnType>;
|
|
650
656
|
eapiPrivateDeleteBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
651
657
|
eapiPrivateDeleteAllOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
652
658
|
eapiPrivateDeleteAllOpenOrdersByUnderlying(params?: {}): Promise<implicitReturnType>;
|
|
653
659
|
eapiPrivateDeleteListenKey(params?: {}): Promise<implicitReturnType>;
|
|
660
|
+
eapiPrivateDeleteBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
654
661
|
publicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
655
662
|
publicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
656
663
|
publicGetDepth(params?: {}): Promise<implicitReturnType>;
|
|
@@ -586,6 +586,9 @@ interface binance {
|
|
|
586
586
|
eapiPrivateGetMmp(params?: {}): Promise<implicitReturnType>;
|
|
587
587
|
eapiPrivateGetCountdownCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
588
588
|
eapiPrivateGetOrder(params?: {}): Promise<implicitReturnType>;
|
|
589
|
+
eapiPrivateGetBlockOrderOrders(params?: {}): Promise<implicitReturnType>;
|
|
590
|
+
eapiPrivateGetBlockOrderExecute(params?: {}): Promise<implicitReturnType>;
|
|
591
|
+
eapiPrivateGetBlockUserTrades(params?: {}): Promise<implicitReturnType>;
|
|
589
592
|
eapiPrivatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
590
593
|
eapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
591
594
|
eapiPrivatePostListenKey(params?: {}): Promise<implicitReturnType>;
|
|
@@ -593,12 +596,16 @@ interface binance {
|
|
|
593
596
|
eapiPrivatePostMmpReset(params?: {}): Promise<implicitReturnType>;
|
|
594
597
|
eapiPrivatePostCountdownCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
595
598
|
eapiPrivatePostCountdownCancelAllHeartBeat(params?: {}): Promise<implicitReturnType>;
|
|
599
|
+
eapiPrivatePostBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
600
|
+
eapiPrivatePostBlockOrderExecute(params?: {}): Promise<implicitReturnType>;
|
|
596
601
|
eapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
602
|
+
eapiPrivatePutBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
597
603
|
eapiPrivateDeleteOrder(params?: {}): Promise<implicitReturnType>;
|
|
598
604
|
eapiPrivateDeleteBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
599
605
|
eapiPrivateDeleteAllOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
600
606
|
eapiPrivateDeleteAllOpenOrdersByUnderlying(params?: {}): Promise<implicitReturnType>;
|
|
601
607
|
eapiPrivateDeleteListenKey(params?: {}): Promise<implicitReturnType>;
|
|
608
|
+
eapiPrivateDeleteBlockOrderCreate(params?: {}): Promise<implicitReturnType>;
|
|
602
609
|
publicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
603
610
|
publicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
604
611
|
publicGetDepth(params?: {}): Promise<implicitReturnType>;
|
package/js/src/ace.js
CHANGED
|
@@ -106,7 +106,7 @@ export default class ace extends Exchange {
|
|
|
106
106
|
'1M': 31,
|
|
107
107
|
},
|
|
108
108
|
'urls': {
|
|
109
|
-
'logo': 'https://
|
|
109
|
+
'logo': 'https://github.com/user-attachments/assets/115f1e4a-0fd0-4b76-85d5-a49ebf64d1c8',
|
|
110
110
|
'api': {
|
|
111
111
|
'public': 'https://ace.io/polarisex',
|
|
112
112
|
'private': 'https://ace.io/polarisex/open',
|
package/js/src/alpaca.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/alpaca.js';
|
|
2
|
-
import type { Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Trade, int, Strings, Ticker, Tickers, Currency, DepositAddress } from './base/types.js';
|
|
2
|
+
import type { Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Trade, int, Strings, Ticker, Tickers, Currency, DepositAddress, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class alpaca
|
|
5
5
|
* @augments Exchange
|
|
@@ -29,6 +29,14 @@ export default class alpaca extends Exchange {
|
|
|
29
29
|
parseTrade(trade: Dict, market?: Market): Trade;
|
|
30
30
|
fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
|
|
31
31
|
parseDepositAddress(depositAddress: any, currency?: Currency): DepositAddress;
|
|
32
|
+
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
33
|
+
fetchTransactionsHelper(type: any, code: any, since: any, limit: any, params: any): Promise<Transaction[]>;
|
|
34
|
+
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
35
|
+
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
36
|
+
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
37
|
+
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
38
|
+
parseTransactionStatus(status: Str): string;
|
|
39
|
+
parseTransactionType(type: any): string;
|
|
32
40
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
33
41
|
url: string;
|
|
34
42
|
method: string;
|