ccxt 4.3.53 → 4.3.55
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 +4 -4
- 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 +1 -1
- package/dist/cjs/src/ascendex.js +6 -4
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +6 -6
- package/dist/cjs/src/bingx.js +4 -4
- 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 +2 -2
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/bitmart.js +3 -3
- 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 +2 -2
- package/dist/cjs/src/bl3p.js +1 -1
- package/dist/cjs/src/blockchaincom.js +28 -28
- package/dist/cjs/src/blofin.js +1 -1
- package/dist/cjs/src/btcalpha.js +4 -12
- 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 +2 -2
- package/dist/cjs/src/cex.js +2 -2
- package/dist/cjs/src/coinbase.js +33 -33
- package/dist/cjs/src/coinbaseexchange.js +1 -1
- package/dist/cjs/src/coinbaseinternational.js +1 -1
- package/dist/cjs/src/coincheck.js +1 -1
- package/dist/cjs/src/coinex.js +2 -2
- package/dist/cjs/src/coinlist.js +2 -2
- package/dist/cjs/src/coinmate.js +1 -1
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinone.js +1 -1
- package/dist/cjs/src/coinsph.js +1 -1
- package/dist/cjs/src/coinspot.js +1 -1
- package/dist/cjs/src/cryptocom.js +1 -1
- package/dist/cjs/src/currencycom.js +1 -1
- package/dist/cjs/src/delta.js +2 -2
- package/dist/cjs/src/deribit.js +4 -4
- package/dist/cjs/src/digifinex.js +2 -2
- package/dist/cjs/src/exmo.js +2 -2
- package/dist/cjs/src/gate.js +2 -2
- package/dist/cjs/src/gemini.js +1 -1
- package/dist/cjs/src/hitbtc.js +1 -1
- package/dist/cjs/src/hollaex.js +1 -1
- package/dist/cjs/src/htx.js +3 -3
- package/dist/cjs/src/huobijp.js +1 -1
- package/dist/cjs/src/hyperliquid.js +2 -2
- package/dist/cjs/src/idex.js +1 -1
- package/dist/cjs/src/independentreserve.js +1 -1
- package/dist/cjs/src/indodax.js +1 -1
- package/dist/cjs/src/kraken.js +2 -2
- package/dist/cjs/src/kucoin.js +136 -47
- package/dist/cjs/src/kucoinfutures.js +1 -1
- package/dist/cjs/src/kuna.js +1 -1
- package/dist/cjs/src/latoken.js +1 -1
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/luno.js +1 -1
- package/dist/cjs/src/lykke.js +1 -1
- package/dist/cjs/src/mercado.js +1 -1
- package/dist/cjs/src/mexc.js +1 -1
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/novadax.js +1 -1
- package/dist/cjs/src/oceanex.js +1 -1
- package/dist/cjs/src/okcoin.js +1 -1
- package/dist/cjs/src/okx.js +3 -3
- package/dist/cjs/src/onetrading.js +1 -1
- package/dist/cjs/src/oxfun.js +2 -2
- package/dist/cjs/src/p2b.js +1 -1
- package/dist/cjs/src/paymium.js +1 -1
- package/dist/cjs/src/phemex.js +30 -3
- package/dist/cjs/src/poloniex.js +6 -4
- package/dist/cjs/src/poloniexfutures.js +1 -1
- package/dist/cjs/src/pro/binance.js +3 -3
- package/dist/cjs/src/pro/bitvavo.js +2 -2
- package/dist/cjs/src/pro/bybit.js +22 -14
- package/dist/cjs/src/pro/cex.js +3 -3
- package/dist/cjs/src/pro/coinbase.js +23 -1
- package/dist/cjs/src/pro/cryptocom.js +1 -1
- package/dist/cjs/src/pro/gate.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/pro/kraken.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +66 -28
- package/dist/cjs/src/pro/okx.js +2 -2
- package/dist/cjs/src/pro/oxfun.js +2 -2
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/vertex.js +2 -2
- package/dist/cjs/src/probit.js +1 -1
- package/dist/cjs/src/timex.js +1 -1
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/tradeogre.js +1 -1
- package/dist/cjs/src/upbit.js +1 -1
- package/dist/cjs/src/vertex.js +2 -2
- package/dist/cjs/src/wavesexchange.js +1 -1
- package/dist/cjs/src/wazirx.js +1 -1
- package/dist/cjs/src/whitebit.js +2 -2
- package/dist/cjs/src/woo.js +34 -26
- package/dist/cjs/src/woofipro.js +3 -3
- package/dist/cjs/src/yobit.js +1 -1
- package/dist/cjs/src/zaif.js +1 -1
- package/dist/cjs/src/zonda.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/kucoin.d.ts +3 -0
- package/js/src/abstract/kucoinfutures.d.ts +3 -0
- package/js/src/ace.js +1 -1
- package/js/src/alpaca.js +1 -1
- package/js/src/ascendex.d.ts +1 -1
- package/js/src/ascendex.js +6 -4
- package/js/src/base/types.d.ts +4 -0
- package/js/src/bigone.js +1 -1
- package/js/src/binance.js +6 -6
- package/js/src/bingx.js +4 -4
- 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 +2 -2
- package/js/src/bithumb.js +1 -1
- package/js/src/bitmart.js +3 -3
- 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 +2 -2
- package/js/src/bl3p.js +1 -1
- package/js/src/blockchaincom.js +28 -28
- package/js/src/blofin.js +1 -1
- package/js/src/btcalpha.js +5 -13
- 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 +2 -2
- package/js/src/cex.js +2 -2
- package/js/src/coinbase.js +33 -33
- package/js/src/coinbaseexchange.js +1 -1
- package/js/src/coinbaseinternational.js +1 -1
- package/js/src/coincheck.js +1 -1
- package/js/src/coinex.js +2 -2
- package/js/src/coinlist.js +2 -2
- package/js/src/coinmate.js +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinone.js +1 -1
- package/js/src/coinsph.js +1 -1
- package/js/src/coinspot.js +1 -1
- package/js/src/cryptocom.js +1 -1
- package/js/src/currencycom.js +1 -1
- package/js/src/delta.js +2 -2
- package/js/src/deribit.js +4 -4
- package/js/src/digifinex.js +2 -2
- package/js/src/exmo.js +2 -2
- package/js/src/gate.js +2 -2
- package/js/src/gemini.js +1 -1
- package/js/src/hitbtc.js +1 -1
- package/js/src/hollaex.js +1 -1
- package/js/src/htx.js +3 -3
- package/js/src/huobijp.js +1 -1
- package/js/src/hyperliquid.js +2 -2
- package/js/src/idex.js +1 -1
- package/js/src/independentreserve.js +1 -1
- package/js/src/indodax.js +1 -1
- package/js/src/kraken.js +2 -2
- package/js/src/kucoin.d.ts +1 -0
- package/js/src/kucoin.js +136 -47
- package/js/src/kucoinfutures.js +1 -1
- package/js/src/kuna.js +1 -1
- package/js/src/latoken.js +1 -1
- package/js/src/lbank.js +1 -1
- package/js/src/luno.js +1 -1
- package/js/src/lykke.js +1 -1
- package/js/src/mercado.js +1 -1
- package/js/src/mexc.js +1 -1
- package/js/src/ndax.js +1 -1
- package/js/src/novadax.js +1 -1
- package/js/src/oceanex.js +1 -1
- package/js/src/okcoin.js +1 -1
- package/js/src/okx.js +3 -3
- package/js/src/onetrading.js +1 -1
- package/js/src/oxfun.js +2 -2
- package/js/src/p2b.js +1 -1
- package/js/src/paymium.js +1 -1
- package/js/src/phemex.d.ts +1 -1
- package/js/src/phemex.js +30 -3
- package/js/src/poloniex.js +6 -4
- package/js/src/poloniexfutures.js +1 -1
- package/js/src/pro/binance.js +3 -3
- package/js/src/pro/bitvavo.js +2 -2
- package/js/src/pro/bybit.d.ts +1 -1
- package/js/src/pro/bybit.js +22 -14
- package/js/src/pro/cex.js +3 -3
- package/js/src/pro/coinbase.d.ts +1 -0
- package/js/src/pro/coinbase.js +23 -1
- package/js/src/pro/cryptocom.js +1 -1
- package/js/src/pro/gate.js +2 -2
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/kraken.js +2 -2
- package/js/src/pro/kucoin.js +66 -28
- package/js/src/pro/okx.js +2 -2
- package/js/src/pro/oxfun.js +2 -2
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/vertex.js +2 -2
- package/js/src/probit.js +1 -1
- package/js/src/timex.js +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/tradeogre.js +1 -1
- package/js/src/upbit.js +1 -1
- package/js/src/vertex.js +2 -2
- package/js/src/wavesexchange.js +1 -1
- package/js/src/wazirx.js +1 -1
- package/js/src/whitebit.js +2 -2
- package/js/src/woo.d.ts +1 -0
- package/js/src/woo.js +34 -26
- package/js/src/woofipro.js +3 -3
- package/js/src/yobit.js +1 -1
- package/js/src/zaif.js +1 -1
- package/js/src/zonda.js +1 -1
- package/package.json +54 -52
|
@@ -156,6 +156,7 @@ class kucoin extends kucoin$1 {
|
|
|
156
156
|
* @method
|
|
157
157
|
* @name kucoin#watchTicker
|
|
158
158
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
159
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/market-snapshot
|
|
159
160
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
160
161
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
161
162
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -388,6 +389,7 @@ class kucoin extends kucoin$1 {
|
|
|
388
389
|
* @method
|
|
389
390
|
* @name kucoin#watchOHLCV
|
|
390
391
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
392
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/klines
|
|
391
393
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
392
394
|
* @param {string} timeframe the length of time each candle represents
|
|
393
395
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -456,6 +458,7 @@ class kucoin extends kucoin$1 {
|
|
|
456
458
|
* @method
|
|
457
459
|
* @name kucoin#watchTrades
|
|
458
460
|
* @description get the list of most recent trades for a particular symbol
|
|
461
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
|
|
459
462
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
460
463
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
461
464
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -469,6 +472,7 @@ class kucoin extends kucoin$1 {
|
|
|
469
472
|
* @method
|
|
470
473
|
* @name kucoin#watchTrades
|
|
471
474
|
* @description get the list of most recent trades for a particular symbol
|
|
475
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
|
|
472
476
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
473
477
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
474
478
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -803,6 +807,8 @@ class kucoin extends kucoin$1 {
|
|
|
803
807
|
* @method
|
|
804
808
|
* @name kucoin#watchOrders
|
|
805
809
|
* @description watches information on multiple orders made by the user
|
|
810
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/private-order-change
|
|
811
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/stop-order-event
|
|
806
812
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
807
813
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
808
814
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -939,6 +945,10 @@ class kucoin extends kucoin$1 {
|
|
|
939
945
|
//
|
|
940
946
|
const messageHash = 'orders';
|
|
941
947
|
const data = this.safeValue(message, 'data');
|
|
948
|
+
const tradeId = this.safeString(data, 'tradeId');
|
|
949
|
+
if (tradeId !== undefined) {
|
|
950
|
+
this.handleMyTrade(client, message);
|
|
951
|
+
}
|
|
942
952
|
const parsed = this.parseWsOrder(data);
|
|
943
953
|
const symbol = this.safeString(parsed, 'symbol');
|
|
944
954
|
const orderId = this.safeString(parsed, 'id');
|
|
@@ -968,6 +978,7 @@ class kucoin extends kucoin$1 {
|
|
|
968
978
|
* @method
|
|
969
979
|
* @name kucoin#watchMyTrades
|
|
970
980
|
* @description watches information on multiple trades made by the user
|
|
981
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/private-order-change
|
|
971
982
|
* @param {string} symbol unified market symbol of the market trades were made in
|
|
972
983
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
973
984
|
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
@@ -976,7 +987,7 @@ class kucoin extends kucoin$1 {
|
|
|
976
987
|
*/
|
|
977
988
|
await this.loadMarkets();
|
|
978
989
|
const url = await this.negotiate(true);
|
|
979
|
-
const topic = '/
|
|
990
|
+
const topic = '/spotMarket/tradeOrders';
|
|
980
991
|
const request = {
|
|
981
992
|
'privateChannel': true,
|
|
982
993
|
};
|
|
@@ -993,6 +1004,34 @@ class kucoin extends kucoin$1 {
|
|
|
993
1004
|
return this.filterBySymbolSinceLimit(trades, symbol, since, limit, true);
|
|
994
1005
|
}
|
|
995
1006
|
handleMyTrade(client, message) {
|
|
1007
|
+
//
|
|
1008
|
+
// {
|
|
1009
|
+
// "type": "message",
|
|
1010
|
+
// "topic": "/spotMarket/tradeOrders",
|
|
1011
|
+
// "subject": "orderChange",
|
|
1012
|
+
// "channelType": "private",
|
|
1013
|
+
// "data": {
|
|
1014
|
+
// "symbol": "KCS-USDT",
|
|
1015
|
+
// "orderType": "limit",
|
|
1016
|
+
// "side": "sell",
|
|
1017
|
+
// "orderId": "5efab07953bdea00089965fa",
|
|
1018
|
+
// "liquidity": "taker",
|
|
1019
|
+
// "type": "match",
|
|
1020
|
+
// "feeType": "takerFee",
|
|
1021
|
+
// "orderTime": 1670329987026,
|
|
1022
|
+
// "size": "0.1",
|
|
1023
|
+
// "filledSize": "0.1",
|
|
1024
|
+
// "price": "0.938",
|
|
1025
|
+
// "matchPrice": "0.96738",
|
|
1026
|
+
// "matchSize": "0.1",
|
|
1027
|
+
// "tradeId": "5efab07a4ee4c7000a82d6d9",
|
|
1028
|
+
// "clientOid": "1593487481000313",
|
|
1029
|
+
// "remainSize": "0",
|
|
1030
|
+
// "status": "match",
|
|
1031
|
+
// "ts": 1670329987311000000
|
|
1032
|
+
// }
|
|
1033
|
+
// }
|
|
1034
|
+
//
|
|
996
1035
|
if (this.myTrades === undefined) {
|
|
997
1036
|
const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
|
|
998
1037
|
this.myTrades = new Cache.ArrayCacheBySymbolById(limit);
|
|
@@ -1007,19 +1046,26 @@ class kucoin extends kucoin$1 {
|
|
|
1007
1046
|
}
|
|
1008
1047
|
parseWsTrade(trade, market = undefined) {
|
|
1009
1048
|
//
|
|
1010
|
-
//
|
|
1011
|
-
//
|
|
1012
|
-
//
|
|
1013
|
-
//
|
|
1014
|
-
//
|
|
1015
|
-
//
|
|
1016
|
-
//
|
|
1017
|
-
//
|
|
1018
|
-
//
|
|
1019
|
-
//
|
|
1020
|
-
//
|
|
1021
|
-
//
|
|
1022
|
-
//
|
|
1049
|
+
// {
|
|
1050
|
+
// "symbol": "KCS-USDT",
|
|
1051
|
+
// "orderType": "limit",
|
|
1052
|
+
// "side": "sell",
|
|
1053
|
+
// "orderId": "5efab07953bdea00089965fa",
|
|
1054
|
+
// "liquidity": "taker",
|
|
1055
|
+
// "type": "match",
|
|
1056
|
+
// "feeType": "takerFee",
|
|
1057
|
+
// "orderTime": 1670329987026,
|
|
1058
|
+
// "size": "0.1",
|
|
1059
|
+
// "filledSize": "0.1",
|
|
1060
|
+
// "price": "0.938",
|
|
1061
|
+
// "matchPrice": "0.96738",
|
|
1062
|
+
// "matchSize": "0.1",
|
|
1063
|
+
// "tradeId": "5efab07a4ee4c7000a82d6d9",
|
|
1064
|
+
// "clientOid": "1593487481000313",
|
|
1065
|
+
// "remainSize": "0",
|
|
1066
|
+
// "status": "match",
|
|
1067
|
+
// "ts": 1670329987311000000
|
|
1068
|
+
// }
|
|
1023
1069
|
//
|
|
1024
1070
|
const marketId = this.safeString(trade, 'symbol');
|
|
1025
1071
|
market = this.safeMarket(marketId, market, '-');
|
|
@@ -1027,18 +1073,10 @@ class kucoin extends kucoin$1 {
|
|
|
1027
1073
|
const type = this.safeString(trade, 'orderType');
|
|
1028
1074
|
const side = this.safeString(trade, 'side');
|
|
1029
1075
|
const tradeId = this.safeString(trade, 'tradeId');
|
|
1030
|
-
const price = this.safeString(trade, '
|
|
1031
|
-
const amount = this.safeString(trade, '
|
|
1076
|
+
const price = this.safeString(trade, 'matchPrice');
|
|
1077
|
+
const amount = this.safeString(trade, 'matchSize');
|
|
1032
1078
|
const order = this.safeString(trade, 'orderId');
|
|
1033
|
-
const timestamp = this.safeIntegerProduct(trade, '
|
|
1034
|
-
const feeCurrency = market['quote'];
|
|
1035
|
-
const feeRate = this.safeString(trade, 'feeRate');
|
|
1036
|
-
const feeCost = this.safeString(trade, 'fee');
|
|
1037
|
-
const fee = {
|
|
1038
|
-
'cost': feeCost,
|
|
1039
|
-
'rate': feeRate,
|
|
1040
|
-
'currency': feeCurrency,
|
|
1041
|
-
};
|
|
1079
|
+
const timestamp = this.safeIntegerProduct(trade, 'ts', 0.000001);
|
|
1042
1080
|
return this.safeTrade({
|
|
1043
1081
|
'info': trade,
|
|
1044
1082
|
'timestamp': timestamp,
|
|
@@ -1047,12 +1085,12 @@ class kucoin extends kucoin$1 {
|
|
|
1047
1085
|
'id': tradeId,
|
|
1048
1086
|
'order': order,
|
|
1049
1087
|
'type': type,
|
|
1050
|
-
'takerOrMaker':
|
|
1088
|
+
'takerOrMaker': this.safeString(trade, 'liquidity'),
|
|
1051
1089
|
'side': side,
|
|
1052
1090
|
'price': price,
|
|
1053
1091
|
'amount': amount,
|
|
1054
1092
|
'cost': undefined,
|
|
1055
|
-
'fee':
|
|
1093
|
+
'fee': undefined,
|
|
1056
1094
|
}, market);
|
|
1057
1095
|
}
|
|
1058
1096
|
async watchBalance(params = {}) {
|
|
@@ -1060,6 +1098,7 @@ class kucoin extends kucoin$1 {
|
|
|
1060
1098
|
* @method
|
|
1061
1099
|
* @name kucoin#watchBalance
|
|
1062
1100
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1101
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/account-balance-change
|
|
1063
1102
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1064
1103
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1065
1104
|
*/
|
|
@@ -1158,7 +1197,6 @@ class kucoin extends kucoin$1 {
|
|
|
1158
1197
|
'trade.l3match': this.handleTrade,
|
|
1159
1198
|
'trade.candles.update': this.handleOHLCV,
|
|
1160
1199
|
'account.balance': this.handleBalance,
|
|
1161
|
-
'/spot/tradeFills': this.handleMyTrade,
|
|
1162
1200
|
'orderChange': this.handleOrder,
|
|
1163
1201
|
'stopOrder': this.handleOrder,
|
|
1164
1202
|
};
|
package/dist/cjs/src/pro/okx.js
CHANGED
|
@@ -1629,7 +1629,7 @@ class okx extends okx$1 {
|
|
|
1629
1629
|
* @param {string} type 'market' or 'limit'
|
|
1630
1630
|
* @param {string} side 'buy' or 'sell'
|
|
1631
1631
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1632
|
-
* @param {float|undefined} [price] the price at which the order is to be
|
|
1632
|
+
* @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1633
1633
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1634
1634
|
* @param {boolean} params.test test order, default false
|
|
1635
1635
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -1700,7 +1700,7 @@ class okx extends okx$1 {
|
|
|
1700
1700
|
* @param {string} type 'market' or 'limit'
|
|
1701
1701
|
* @param {string} side 'buy' or 'sell'
|
|
1702
1702
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
1703
|
-
* @param {float|undefined} [price] the price at which the order is to be
|
|
1703
|
+
* @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1704
1704
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1705
1705
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1706
1706
|
*/
|
|
@@ -766,7 +766,7 @@ class oxfun extends oxfun$1 {
|
|
|
766
766
|
* @param {string} type 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
|
|
767
767
|
* @param {string} side 'buy' or 'sell'
|
|
768
768
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
769
|
-
* @param {float} [price] the price at which the order is to be
|
|
769
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
770
770
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
771
771
|
* @param {int} [params.clientOrderId] a unique id for the order
|
|
772
772
|
* @param {int} [params.timestamp] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
|
|
@@ -808,7 +808,7 @@ class oxfun extends oxfun$1 {
|
|
|
808
808
|
* @param {string} type 'market' or 'limit'
|
|
809
809
|
* @param {string} side 'buy' or 'sell'
|
|
810
810
|
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
811
|
-
* @param {float|undefined} [price] the price at which the order is to be
|
|
811
|
+
* @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
812
812
|
* @param {int} [params.timestamp] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
|
|
813
813
|
* @param {int} [params.recvWindow] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected. If timestamp is provided without recvWindow, then a default recvWindow of 1000ms is used.
|
|
814
814
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -190,7 +190,7 @@ class poloniex extends poloniex$1 {
|
|
|
190
190
|
* @param {string} type 'market' or 'limit'
|
|
191
191
|
* @param {string} side 'buy' or 'sell'
|
|
192
192
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
193
|
-
* @param {float} [price] the price at which the order is to be
|
|
193
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
194
194
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
195
195
|
* @param {string} [params.timeInForce] GTC (default), IOC, FOK
|
|
196
196
|
* @param {string} [params.clientOrderId] Maximum 64-character length.*
|
|
@@ -257,7 +257,7 @@ class vertex extends vertex$1 {
|
|
|
257
257
|
const price = this.convertFromX18(this.safeString(trade, 'price'));
|
|
258
258
|
const amount = this.convertFromX18(this.safeString2(trade, 'taker_qty', 'filled_qty'));
|
|
259
259
|
const cost = Precise["default"].stringMul(price, amount);
|
|
260
|
-
const timestamp =
|
|
260
|
+
const timestamp = this.safeIntegerProduct(trade, 'timestamp', 0.000001);
|
|
261
261
|
let takerOrMaker = undefined;
|
|
262
262
|
const isTaker = this.safeBool(trade, 'is_taker');
|
|
263
263
|
if (isTaker !== undefined) {
|
|
@@ -322,7 +322,7 @@ class vertex extends vertex$1 {
|
|
|
322
322
|
// "ask_qty": "1000" // quantity at the lowest ask
|
|
323
323
|
// }
|
|
324
324
|
//
|
|
325
|
-
const timestamp =
|
|
325
|
+
const timestamp = this.safeIntegerProduct(ticker, 'timestamp', 0.000001);
|
|
326
326
|
return this.safeTicker({
|
|
327
327
|
'symbol': this.safeSymbol(undefined, market),
|
|
328
328
|
'timestamp': timestamp,
|
package/dist/cjs/src/probit.js
CHANGED
|
@@ -1184,7 +1184,7 @@ class probit extends probit$1 {
|
|
|
1184
1184
|
* @param {string} type 'market' or 'limit'
|
|
1185
1185
|
* @param {string} side 'buy' or 'sell'
|
|
1186
1186
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1187
|
-
* @param {float} [price] the price at which the order is to be
|
|
1187
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1188
1188
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1189
1189
|
* @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount for market buy orders
|
|
1190
1190
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/dist/cjs/src/timex.js
CHANGED
|
@@ -745,7 +745,7 @@ class timex extends timex$1 {
|
|
|
745
745
|
* @param {string} type 'market' or 'limit'
|
|
746
746
|
* @param {string} side 'buy' or 'sell'
|
|
747
747
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
748
|
-
* @param {float} [price] the price at which the order is to be
|
|
748
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
749
749
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
750
750
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
751
751
|
*/
|
|
@@ -1597,7 +1597,7 @@ class tokocrypto extends tokocrypto$1 {
|
|
|
1597
1597
|
* @param {string} type 'market' or 'limit'
|
|
1598
1598
|
* @param {string} side 'buy' or 'sell'
|
|
1599
1599
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1600
|
-
* @param {float} [price] the price at which the order is to be
|
|
1600
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1601
1601
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1602
1602
|
* @param {float} [params.triggerPrice] the price at which a trigger order would be triggered
|
|
1603
1603
|
* @param {float} [params.cost] for spot market buy orders, the quote quantity that can be used as an alternative for the amount
|
|
@@ -452,7 +452,7 @@ class tradeogre extends tradeogre$1 {
|
|
|
452
452
|
* @param {string} type must be 'limit'
|
|
453
453
|
* @param {string} side 'buy' or 'sell'
|
|
454
454
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
455
|
-
* @param {float} price the price at which the order is to be
|
|
455
|
+
* @param {float} price the price at which the order is to be fulfilled, in units of the quote currency
|
|
456
456
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
457
457
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
458
458
|
*/
|
package/dist/cjs/src/upbit.js
CHANGED
|
@@ -1034,7 +1034,7 @@ class upbit extends upbit$1 {
|
|
|
1034
1034
|
* @param {string} type 'market' or 'limit'
|
|
1035
1035
|
* @param {string} side 'buy' or 'sell'
|
|
1036
1036
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1037
|
-
* @param {float} [price] the price at which the order is to be
|
|
1037
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1038
1038
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1039
1039
|
* @param {float} [params.cost] for market buy orders, the quote quantity that can be used as an alternative for the amount
|
|
1040
1040
|
* @param {string} [params.timeInForce] 'IOC' or 'FOK'
|
package/dist/cjs/src/vertex.js
CHANGED
|
@@ -1622,7 +1622,7 @@ class vertex extends vertex$1 {
|
|
|
1622
1622
|
* @param {string} type 'market' or 'limit'
|
|
1623
1623
|
* @param {string} side 'buy' or 'sell'
|
|
1624
1624
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1625
|
-
* @param {float} [price] the price at which the order is to be
|
|
1625
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1626
1626
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1627
1627
|
* @param {string} [params.timeInForce] ioc, fok
|
|
1628
1628
|
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
@@ -1726,7 +1726,7 @@ class vertex extends vertex$1 {
|
|
|
1726
1726
|
* @param {string} type 'market' or 'limit'
|
|
1727
1727
|
* @param {string} side 'buy' or 'sell'
|
|
1728
1728
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1729
|
-
* @param {float} [price] the price at which the order is to be
|
|
1729
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1730
1730
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1731
1731
|
* @param {string} [params.timeInForce] ioc, fok
|
|
1732
1732
|
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
@@ -1280,7 +1280,7 @@ class wavesexchange extends wavesexchange$1 {
|
|
|
1280
1280
|
* @param {string} type 'market' or 'limit'
|
|
1281
1281
|
* @param {string} side 'buy' or 'sell'
|
|
1282
1282
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1283
|
-
* @param {float} [price] the price at which the order is to be
|
|
1283
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1284
1284
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1285
1285
|
* @param {float} [params.stopPrice] The price at which a stop order is triggered at
|
|
1286
1286
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
package/dist/cjs/src/wazirx.js
CHANGED
|
@@ -846,7 +846,7 @@ class wazirx extends wazirx$1 {
|
|
|
846
846
|
* @param {string} type 'market' or 'limit'
|
|
847
847
|
* @param {string} side 'buy' or 'sell'
|
|
848
848
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
849
|
-
* @param {float} [price] the price at which the order is to be
|
|
849
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
850
850
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
851
851
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
852
852
|
*/
|
package/dist/cjs/src/whitebit.js
CHANGED
|
@@ -1241,7 +1241,7 @@ class whitebit extends whitebit$1 {
|
|
|
1241
1241
|
* @param {string} type 'market' or 'limit'
|
|
1242
1242
|
* @param {string} side 'buy' or 'sell'
|
|
1243
1243
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1244
|
-
* @param {float} [price] the price at which the order is to be
|
|
1244
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1245
1245
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1246
1246
|
* @param {float} [params.cost] *market orders only* the cost of the order in units of the base currency
|
|
1247
1247
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -1346,7 +1346,7 @@ class whitebit extends whitebit$1 {
|
|
|
1346
1346
|
* @param {string} type 'market' or 'limit'
|
|
1347
1347
|
* @param {string} side 'buy' or 'sell'
|
|
1348
1348
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1349
|
-
* @param {float} price the price at which the order is to be
|
|
1349
|
+
* @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1350
1350
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1351
1351
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1352
1352
|
*/
|
package/dist/cjs/src/woo.js
CHANGED
|
@@ -42,7 +42,7 @@ class woo extends woo$1 {
|
|
|
42
42
|
'createMarketBuyOrderWithCost': true,
|
|
43
43
|
'createMarketOrder': false,
|
|
44
44
|
'createMarketOrderWithCost': false,
|
|
45
|
-
'createMarketSellOrderWithCost':
|
|
45
|
+
'createMarketSellOrderWithCost': true,
|
|
46
46
|
'createOrder': true,
|
|
47
47
|
'createOrderWithTakeProfitAndStopLoss': true,
|
|
48
48
|
'createReduceOnlyOrder': true,
|
|
@@ -850,8 +850,25 @@ class woo extends woo$1 {
|
|
|
850
850
|
if (!market['spot']) {
|
|
851
851
|
throw new errors.NotSupported(this.id + ' createMarketBuyOrderWithCost() supports spot orders only');
|
|
852
852
|
}
|
|
853
|
-
|
|
854
|
-
|
|
853
|
+
return await this.createOrder(symbol, 'market', 'buy', cost, 1, params);
|
|
854
|
+
}
|
|
855
|
+
async createMarketSellOrderWithCost(symbol, cost, params = {}) {
|
|
856
|
+
/**
|
|
857
|
+
* @method
|
|
858
|
+
* @name woo#createMarketSellOrderWithCost
|
|
859
|
+
* @description create a market sell order by providing the symbol and cost
|
|
860
|
+
* @see https://docs.woo.org/#send-order
|
|
861
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
862
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
863
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
864
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
865
|
+
*/
|
|
866
|
+
await this.loadMarkets();
|
|
867
|
+
const market = this.market(symbol);
|
|
868
|
+
if (!market['spot']) {
|
|
869
|
+
throw new errors.NotSupported(this.id + ' createMarketSellOrderWithCost() supports spot orders only');
|
|
870
|
+
}
|
|
871
|
+
return await this.createOrder(symbol, 'market', 'sell', cost, 1, params);
|
|
855
872
|
}
|
|
856
873
|
async createTrailingAmountOrder(symbol, type, side, amount, price = undefined, trailingAmount = undefined, trailingTriggerPrice = undefined, params = {}) {
|
|
857
874
|
/**
|
|
@@ -916,7 +933,7 @@ class woo extends woo$1 {
|
|
|
916
933
|
* @param {string} type 'market' or 'limit'
|
|
917
934
|
* @param {string} side 'buy' or 'sell'
|
|
918
935
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
919
|
-
* @param {float} [price] the price at which the order is to be
|
|
936
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
920
937
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
921
938
|
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
922
939
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
|
|
@@ -974,33 +991,24 @@ class woo extends woo$1 {
|
|
|
974
991
|
if (reduceOnly) {
|
|
975
992
|
request[reduceOnlyKey] = reduceOnly;
|
|
976
993
|
}
|
|
977
|
-
if (price !== undefined) {
|
|
994
|
+
if (!isMarket && price !== undefined) {
|
|
978
995
|
request[priceKey] = this.priceToPrecision(symbol, price);
|
|
979
996
|
}
|
|
980
997
|
if (isMarket && !isStop) {
|
|
981
998
|
// for market buy it requires the amount of quote currency to spend
|
|
982
|
-
|
|
999
|
+
const cost = this.safeString2(params, 'cost', 'order_amount');
|
|
1000
|
+
params = this.omit(params, ['cost', 'order_amount']);
|
|
1001
|
+
const isPriceProvided = price !== undefined;
|
|
1002
|
+
if (market['spot'] && (isPriceProvided || (cost !== undefined))) {
|
|
983
1003
|
let quoteAmount = undefined;
|
|
984
|
-
let createMarketBuyOrderRequiresPrice = true;
|
|
985
|
-
[createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
|
|
986
|
-
const cost = this.safeNumber2(params, 'cost', 'order_amount');
|
|
987
|
-
params = this.omit(params, ['cost', 'order_amount']);
|
|
988
1004
|
if (cost !== undefined) {
|
|
989
1005
|
quoteAmount = this.costToPrecision(symbol, cost);
|
|
990
1006
|
}
|
|
991
|
-
else if (createMarketBuyOrderRequiresPrice) {
|
|
992
|
-
if (price === undefined) {
|
|
993
|
-
throw new errors.InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend (quote quantity) in the amount argument');
|
|
994
|
-
}
|
|
995
|
-
else {
|
|
996
|
-
const amountString = this.numberToString(amount);
|
|
997
|
-
const priceString = this.numberToString(price);
|
|
998
|
-
const costRequest = Precise["default"].stringMul(amountString, priceString);
|
|
999
|
-
quoteAmount = this.costToPrecision(symbol, costRequest);
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
1007
|
else {
|
|
1003
|
-
|
|
1008
|
+
const amountString = this.numberToString(amount);
|
|
1009
|
+
const priceString = this.numberToString(price);
|
|
1010
|
+
const costRequest = Precise["default"].stringMul(amountString, priceString);
|
|
1011
|
+
quoteAmount = this.costToPrecision(symbol, costRequest);
|
|
1004
1012
|
}
|
|
1005
1013
|
request['order_amount'] = quoteAmount;
|
|
1006
1014
|
}
|
|
@@ -1124,7 +1132,7 @@ class woo extends woo$1 {
|
|
|
1124
1132
|
* @param {string} type 'market' or 'limit'
|
|
1125
1133
|
* @param {string} side 'buy' or 'sell'
|
|
1126
1134
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1127
|
-
* @param {float} [price] the price at which the order is to be
|
|
1135
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1128
1136
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1129
1137
|
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
1130
1138
|
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
|
@@ -1605,8 +1613,8 @@ class woo extends woo$1 {
|
|
|
1605
1613
|
const side = this.safeStringLower(order, 'side');
|
|
1606
1614
|
const filled = this.omitZero(this.safeValue2(order, 'executed', 'totalExecutedQuantity'));
|
|
1607
1615
|
const average = this.omitZero(this.safeString2(order, 'average_executed_price', 'averageExecutedPrice'));
|
|
1608
|
-
const remaining = Precise
|
|
1609
|
-
const fee = this.
|
|
1616
|
+
// const remaining = Precise.stringSub (cost, filled);
|
|
1617
|
+
const fee = this.safeNumber2(order, 'total_fee', 'totalFee');
|
|
1610
1618
|
const feeCurrency = this.safeString2(order, 'fee_asset', 'feeAsset');
|
|
1611
1619
|
const transactions = this.safeValue(order, 'Transactions');
|
|
1612
1620
|
const stopPrice = this.safeNumber(order, 'triggerPrice');
|
|
@@ -1647,7 +1655,7 @@ class woo extends woo$1 {
|
|
|
1647
1655
|
'average': average,
|
|
1648
1656
|
'amount': amount,
|
|
1649
1657
|
'filled': filled,
|
|
1650
|
-
'remaining':
|
|
1658
|
+
'remaining': undefined,
|
|
1651
1659
|
'cost': cost,
|
|
1652
1660
|
'trades': transactions,
|
|
1653
1661
|
'fee': {
|
package/dist/cjs/src/woofipro.js
CHANGED
|
@@ -1232,7 +1232,7 @@ class woofipro extends woofipro$1 {
|
|
|
1232
1232
|
* @param {string} type 'market' or 'limit'
|
|
1233
1233
|
* @param {string} side 'buy' or 'sell'
|
|
1234
1234
|
* @param {float} amount how much you want to trade in units of the base currency
|
|
1235
|
-
* @param {float} [price] the price that the order is to be
|
|
1235
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1236
1236
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1237
1237
|
* @returns {object} request to be sent to the exchange
|
|
1238
1238
|
*/
|
|
@@ -1334,7 +1334,7 @@ class woofipro extends woofipro$1 {
|
|
|
1334
1334
|
* @param {string} type 'market' or 'limit'
|
|
1335
1335
|
* @param {string} side 'buy' or 'sell'
|
|
1336
1336
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1337
|
-
* @param {float} [price] the price at which the order is to be
|
|
1337
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1338
1338
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1339
1339
|
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
1340
1340
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
|
|
@@ -1459,7 +1459,7 @@ class woofipro extends woofipro$1 {
|
|
|
1459
1459
|
* @param {string} type 'market' or 'limit'
|
|
1460
1460
|
* @param {string} side 'buy' or 'sell'
|
|
1461
1461
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1462
|
-
* @param {float} [price] the price at which the order is to be
|
|
1462
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1463
1463
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1464
1464
|
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
1465
1465
|
* @param {float} [params.stopLossPrice] price to trigger stop-loss orders
|
package/dist/cjs/src/yobit.js
CHANGED
|
@@ -790,7 +790,7 @@ class yobit extends yobit$1 {
|
|
|
790
790
|
* @param {string} type must be 'limit'
|
|
791
791
|
* @param {string} side 'buy' or 'sell'
|
|
792
792
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
793
|
-
* @param {float} [price] the price at which the order is to be
|
|
793
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
794
794
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
795
795
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
796
796
|
*/
|
package/dist/cjs/src/zaif.js
CHANGED
|
@@ -441,7 +441,7 @@ class zaif extends zaif$1 {
|
|
|
441
441
|
* @param {string} type must be 'limit'
|
|
442
442
|
* @param {string} side 'buy' or 'sell'
|
|
443
443
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
444
|
-
* @param {float} [price] the price at which the order is to be
|
|
444
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
445
445
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
446
446
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
447
447
|
*/
|
package/dist/cjs/src/zonda.js
CHANGED
|
@@ -1355,7 +1355,7 @@ class zonda extends zonda$1 {
|
|
|
1355
1355
|
* @param {string} type 'market' or 'limit'
|
|
1356
1356
|
* @param {string} side 'buy' or 'sell'
|
|
1357
1357
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1358
|
-
* @param {float} [price] the price at which the order is to be
|
|
1358
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1359
1359
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1360
1360
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1361
1361
|
*/
|
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, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.3.
|
|
7
|
+
declare const version = "4.3.54";
|
|
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, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.3.
|
|
41
|
+
const version = '4.3.55';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -48,6 +48,7 @@ interface Exchange {
|
|
|
48
48
|
privateGetMarketOrderbookLevel3(params?: {}): Promise<implicitReturnType>;
|
|
49
49
|
privateGetHfOrdersActive(params?: {}): Promise<implicitReturnType>;
|
|
50
50
|
privateGetHfOrdersActiveSymbols(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
privateGetHfMarginOrderActiveSymbols(params?: {}): Promise<implicitReturnType>;
|
|
51
52
|
privateGetHfOrdersDone(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
privateGetHfOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
53
54
|
privateGetHfOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
@@ -75,6 +76,7 @@ interface Exchange {
|
|
|
75
76
|
privateGetMarginCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
76
77
|
privateGetRiskLimitStrategy(params?: {}): Promise<implicitReturnType>;
|
|
77
78
|
privateGetIsolatedSymbols(params?: {}): Promise<implicitReturnType>;
|
|
79
|
+
privateGetMarginSymbols(params?: {}): Promise<implicitReturnType>;
|
|
78
80
|
privateGetIsolatedAccountSymbol(params?: {}): Promise<implicitReturnType>;
|
|
79
81
|
privateGetMarginBorrow(params?: {}): Promise<implicitReturnType>;
|
|
80
82
|
privateGetMarginRepay(params?: {}): Promise<implicitReturnType>;
|
|
@@ -116,6 +118,7 @@ interface Exchange {
|
|
|
116
118
|
privatePostRedeem(params?: {}): Promise<implicitReturnType>;
|
|
117
119
|
privatePostLendPurchaseUpdate(params?: {}): Promise<implicitReturnType>;
|
|
118
120
|
privatePostBulletPrivate(params?: {}): Promise<implicitReturnType>;
|
|
121
|
+
privatePostPositionUpdateUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
119
122
|
privateDeleteSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
120
123
|
privateDeleteWithdrawalsWithdrawalId(params?: {}): Promise<implicitReturnType>;
|
|
121
124
|
privateDeleteHfOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|