ccxt 4.4.82 → 4.4.85
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 +5 -7
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +1 -9
- package/dist/cjs/src/apex.js +2 -1
- package/dist/cjs/src/base/Exchange.js +15 -2
- package/dist/cjs/src/bitget.js +1 -3
- package/dist/cjs/src/bitrue.js +14 -35
- package/dist/cjs/src/bitso.js +33 -0
- package/dist/cjs/src/bitstamp.js +33 -0
- package/dist/cjs/src/blofin.js +154 -13
- package/dist/cjs/src/btcbox.js +25 -5
- package/dist/cjs/src/bybit.js +16 -40
- package/dist/cjs/src/cex.js +2 -4
- package/dist/cjs/src/coinbase.js +56 -40
- package/dist/cjs/src/coinbaseexchange.js +142 -32
- package/dist/cjs/src/coincatch.js +14 -67
- package/dist/cjs/src/coinex.js +29 -32
- package/dist/cjs/src/coinlist.js +16 -15
- package/dist/cjs/src/coinmetro.js +22 -11
- package/dist/cjs/src/coinone.js +8 -10
- package/dist/cjs/src/coinsph.js +126 -1
- package/dist/cjs/src/cryptocom.js +111 -1
- package/dist/cjs/src/cryptomus.js +43 -89
- package/dist/cjs/src/delta.js +76 -36
- package/dist/cjs/src/derive.js +46 -10
- package/dist/cjs/src/ellipx.js +175 -79
- package/dist/cjs/src/gate.js +1 -1
- package/dist/cjs/src/gemini.js +3 -5
- package/dist/cjs/src/hitbtc.js +56 -69
- package/dist/cjs/src/hyperliquid.js +2 -2
- package/dist/cjs/src/kraken.js +29 -24
- package/dist/cjs/src/kucoinfutures.js +6 -0
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/paradex.js +119 -3
- package/dist/cjs/src/pro/binance.js +31 -33
- package/dist/cjs/src/pro/bithumb.js +5 -3
- package/dist/cjs/src/pro/kraken.js +289 -79
- package/dist/cjs/src/pro/mexc.js +302 -8
- package/dist/cjs/src/pro/poloniex.js +6 -2
- package/examples/js/cli.js +127 -13
- package/js/ccxt.d.ts +2 -11
- package/js/ccxt.js +2 -8
- package/js/src/abstract/blofin.d.ts +8 -0
- package/js/src/abstract/btcbox.d.ts +1 -0
- package/js/src/apex.js +2 -1
- package/js/src/base/Exchange.d.ts +15 -1
- package/js/src/base/Exchange.js +15 -2
- package/js/src/base/types.d.ts +3 -0
- package/js/src/bitget.js +1 -3
- package/js/src/bitrue.js +14 -35
- package/js/src/bitso.js +33 -0
- package/js/src/bitstamp.js +33 -0
- package/js/src/blofin.d.ts +42 -2
- package/js/src/blofin.js +154 -13
- package/js/src/btcbox.js +25 -5
- package/js/src/bybit.js +16 -40
- package/js/src/cex.js +2 -4
- package/js/src/coinbase.js +56 -40
- package/js/src/coinbaseexchange.js +142 -32
- package/js/src/coincatch.js +14 -67
- package/js/src/coinex.js +28 -29
- package/js/src/coinlist.js +16 -15
- package/js/src/coinmetro.js +22 -11
- package/js/src/coinone.js +8 -10
- package/js/src/coinsph.d.ts +10 -1
- package/js/src/coinsph.js +126 -1
- package/js/src/cryptocom.d.ts +10 -1
- package/js/src/cryptocom.js +111 -1
- package/js/src/cryptomus.js +43 -89
- package/js/src/delta.js +76 -36
- package/js/src/derive.js +46 -10
- package/js/src/ellipx.d.ts +2 -3
- package/js/src/ellipx.js +175 -80
- package/js/src/gate.js +1 -1
- package/js/src/gemini.js +3 -5
- package/js/src/hitbtc.js +56 -69
- package/js/src/hyperliquid.js +2 -2
- package/js/src/kraken.js +29 -24
- package/js/src/kucoinfutures.d.ts +1 -0
- package/js/src/kucoinfutures.js +6 -0
- package/js/src/lbank.js +1 -1
- package/js/src/paradex.d.ts +12 -1
- package/js/src/paradex.js +119 -3
- package/js/src/pro/binance.d.ts +26 -26
- package/js/src/pro/binance.js +31 -33
- package/js/src/pro/bithumb.js +5 -3
- package/js/src/pro/kraken.d.ts +7 -6
- package/js/src/pro/kraken.js +290 -80
- package/js/src/pro/mexc.d.ts +58 -0
- package/js/src/pro/mexc.js +302 -8
- package/js/src/pro/poloniex.d.ts +1 -1
- package/js/src/pro/poloniex.js +6 -2
- package/package.json +1 -1
- package/js/src/abstract/bl3p.d.ts +0 -22
- package/js/src/abstract/bl3p.js +0 -11
- package/js/src/abstract/idex.d.ts +0 -29
- package/js/src/abstract/idex.js +0 -11
- package/js/src/bl3p.d.ts +0 -116
- package/js/src/bl3p.js +0 -552
- package/js/src/idex.d.ts +0 -312
- package/js/src/idex.js +0 -1961
- package/js/src/pro/idex.d.ts +0 -81
- package/js/src/pro/idex.js +0 -720
package/js/src/pro/binance.js
CHANGED
|
@@ -740,7 +740,7 @@ export default class binance extends binanceRest {
|
|
|
740
740
|
* @method
|
|
741
741
|
* @name binance#fetchOrderBookWs
|
|
742
742
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
743
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
743
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#order-book
|
|
744
744
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book
|
|
745
745
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
746
746
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -903,10 +903,8 @@ export default class binance extends binanceRest {
|
|
|
903
903
|
// ]
|
|
904
904
|
// }
|
|
905
905
|
//
|
|
906
|
-
const
|
|
907
|
-
const
|
|
908
|
-
const isSpot = isTestnetSpot || isSpotMainNet;
|
|
909
|
-
const marketType = isSpot ? 'spot' : 'contract';
|
|
906
|
+
const isSpot = (client.url.indexOf('/stream') > -1);
|
|
907
|
+
const marketType = (isSpot) ? 'spot' : 'contract';
|
|
910
908
|
const marketId = this.safeString(message, 's');
|
|
911
909
|
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
912
910
|
const symbol = market['symbol'];
|
|
@@ -1043,8 +1041,8 @@ export default class binance extends binanceRest {
|
|
|
1043
1041
|
* @method
|
|
1044
1042
|
* @name binance#watchTradesForSymbols
|
|
1045
1043
|
* @description get the list of most recent trades for a list of symbols
|
|
1046
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1047
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1044
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades
|
|
1045
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
|
1048
1046
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
|
1049
1047
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
|
1050
1048
|
* @param {string[]} symbols unified symbol of the market to fetch trades for
|
|
@@ -1106,8 +1104,8 @@ export default class binance extends binanceRest {
|
|
|
1106
1104
|
* @method
|
|
1107
1105
|
* @name binance#unWatchTradesForSymbols
|
|
1108
1106
|
* @description unsubscribes from the trades channel
|
|
1109
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1110
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1107
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades
|
|
1108
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
|
1111
1109
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
|
1112
1110
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
|
1113
1111
|
* @param {string[]} symbols unified symbol of the market to fetch trades for
|
|
@@ -1168,8 +1166,8 @@ export default class binance extends binanceRest {
|
|
|
1168
1166
|
* @method
|
|
1169
1167
|
* @name binance#unWatchTrades
|
|
1170
1168
|
* @description unsubscribes from the trades channel
|
|
1171
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1172
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1169
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades
|
|
1170
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
|
1173
1171
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
|
1174
1172
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
|
1175
1173
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
@@ -1185,8 +1183,8 @@ export default class binance extends binanceRest {
|
|
|
1185
1183
|
* @method
|
|
1186
1184
|
* @name binance#watchTrades
|
|
1187
1185
|
* @description get the list of most recent trades for a particular symbol
|
|
1188
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1189
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1186
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#aggregate-trades
|
|
1187
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
|
1190
1188
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
|
1191
1189
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Aggregate-Trade-Streams
|
|
1192
1190
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
@@ -1365,7 +1363,7 @@ export default class binance extends binanceRest {
|
|
|
1365
1363
|
handleTrade(client, message) {
|
|
1366
1364
|
// the trade streams push raw trade information in real-time
|
|
1367
1365
|
// each trade has a unique buyer and seller
|
|
1368
|
-
const isSpot = (
|
|
1366
|
+
const isSpot = (client.url.indexOf('/stream') > -1);
|
|
1369
1367
|
const marketType = (isSpot) ? 'spot' : 'contract';
|
|
1370
1368
|
const marketId = this.safeString(message, 's');
|
|
1371
1369
|
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
@@ -1385,7 +1383,7 @@ export default class binance extends binanceRest {
|
|
|
1385
1383
|
* @method
|
|
1386
1384
|
* @name binance#watchOHLCV
|
|
1387
1385
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1388
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1386
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
|
1389
1387
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
|
1390
1388
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
|
1391
1389
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
@@ -1408,7 +1406,7 @@ export default class binance extends binanceRest {
|
|
|
1408
1406
|
* @method
|
|
1409
1407
|
* @name binance#watchOHLCVForSymbols
|
|
1410
1408
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1411
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1409
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
|
1412
1410
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
|
1413
1411
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
|
1414
1412
|
* @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
|
|
@@ -1474,7 +1472,7 @@ export default class binance extends binanceRest {
|
|
|
1474
1472
|
* @method
|
|
1475
1473
|
* @name binance#unWatchOHLCVForSymbols
|
|
1476
1474
|
* @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1477
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1475
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
|
1478
1476
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
|
1479
1477
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
|
1480
1478
|
* @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
|
|
@@ -1541,7 +1539,7 @@ export default class binance extends binanceRest {
|
|
|
1541
1539
|
* @method
|
|
1542
1540
|
* @name binance#unWatchOHLCV
|
|
1543
1541
|
* @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1544
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1542
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
|
1545
1543
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
|
1546
1544
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Kline-Candlestick-Streams
|
|
1547
1545
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
@@ -1607,7 +1605,7 @@ export default class binance extends binanceRest {
|
|
|
1607
1605
|
this.safeFloat(kline, 'c'),
|
|
1608
1606
|
this.safeFloat(kline, 'v'),
|
|
1609
1607
|
];
|
|
1610
|
-
const isSpot = (
|
|
1608
|
+
const isSpot = (client.url.indexOf('/stream') > -1);
|
|
1611
1609
|
const marketType = (isSpot) ? 'spot' : 'contract';
|
|
1612
1610
|
const symbol = this.safeSymbol(marketId, undefined, undefined, marketType);
|
|
1613
1611
|
const messageHash = 'ohlcv::' + symbol + '::' + unifiedTimeframe;
|
|
@@ -1666,7 +1664,7 @@ export default class binance extends binanceRest {
|
|
|
1666
1664
|
* @method
|
|
1667
1665
|
* @name binance#fetchOHLCVWs
|
|
1668
1666
|
* @description query historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1669
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1667
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#klines
|
|
1670
1668
|
* @param {string} symbol unified symbol of the market to query OHLCV data for
|
|
1671
1669
|
* @param {string} timeframe the length of time each candle represents
|
|
1672
1670
|
* @param {int} since timestamp in ms of the earliest candle to fetch
|
|
@@ -1952,7 +1950,7 @@ export default class binance extends binanceRest {
|
|
|
1952
1950
|
* @method
|
|
1953
1951
|
* @name binance#watchBidsAsks
|
|
1954
1952
|
* @description watches best bid & ask for symbols
|
|
1955
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
1953
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#symbol-order-book-ticker
|
|
1956
1954
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
|
|
1957
1955
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
|
|
1958
1956
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
@@ -2252,7 +2250,7 @@ export default class binance extends binanceRest {
|
|
|
2252
2250
|
this.handleTickersAndBidsAsks(client, message, 'tickers');
|
|
2253
2251
|
}
|
|
2254
2252
|
handleTickersAndBidsAsks(client, message, methodType) {
|
|
2255
|
-
const isSpot = (
|
|
2253
|
+
const isSpot = (client.url.indexOf('/stream') > -1);
|
|
2256
2254
|
const marketType = (isSpot) ? 'spot' : 'contract';
|
|
2257
2255
|
const isBidAsk = (methodType === 'bidasks');
|
|
2258
2256
|
let channelName = undefined;
|
|
@@ -2511,7 +2509,7 @@ export default class binance extends binanceRest {
|
|
|
2511
2509
|
* @name binance#fetchBalanceWs
|
|
2512
2510
|
* @description fetch balance and get the amount of funds available for trading or funds locked in orders
|
|
2513
2511
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance
|
|
2514
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
2512
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-information-user_data
|
|
2515
2513
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/account/websocket-api
|
|
2516
2514
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2517
2515
|
* @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
|
|
@@ -2881,7 +2879,7 @@ export default class binance extends binanceRest {
|
|
|
2881
2879
|
* @method
|
|
2882
2880
|
* @name binance#createOrderWs
|
|
2883
2881
|
* @description create a trade order
|
|
2884
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
2882
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#place-new-order-trade
|
|
2885
2883
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order
|
|
2886
2884
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api
|
|
2887
2885
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
@@ -3030,7 +3028,7 @@ export default class binance extends binanceRest {
|
|
|
3030
3028
|
* @method
|
|
3031
3029
|
* @name binance#editOrderWs
|
|
3032
3030
|
* @description edit a trade order
|
|
3033
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
3031
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-and-replace-order-trade
|
|
3034
3032
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order
|
|
3035
3033
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Modify-Order
|
|
3036
3034
|
* @param {string} id order id
|
|
@@ -3188,7 +3186,7 @@ export default class binance extends binanceRest {
|
|
|
3188
3186
|
* @method
|
|
3189
3187
|
* @name binance#cancelOrderWs
|
|
3190
3188
|
* @description cancel multiple orders
|
|
3191
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
3189
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-order-trade
|
|
3192
3190
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order
|
|
3193
3191
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Cancel-Order
|
|
3194
3192
|
* @param {string} id order id
|
|
@@ -3235,7 +3233,7 @@ export default class binance extends binanceRest {
|
|
|
3235
3233
|
* @method
|
|
3236
3234
|
* @name binance#cancelAllOrdersWs
|
|
3237
3235
|
* @description cancel all open orders in a market
|
|
3238
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
3236
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#cancel-open-orders-trade
|
|
3239
3237
|
* @param {string} [symbol] unified market symbol of the market to cancel orders in
|
|
3240
3238
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3241
3239
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -3270,7 +3268,7 @@ export default class binance extends binanceRest {
|
|
|
3270
3268
|
* @method
|
|
3271
3269
|
* @name binance#fetchOrderWs
|
|
3272
3270
|
* @description fetches information on an order made by the user
|
|
3273
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
3271
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#query-order-user_data
|
|
3274
3272
|
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order
|
|
3275
3273
|
* @see https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/websocket-api/Query-Order
|
|
3276
3274
|
* @param {string} id order id
|
|
@@ -3318,7 +3316,7 @@ export default class binance extends binanceRest {
|
|
|
3318
3316
|
* @method
|
|
3319
3317
|
* @name binance#fetchOrdersWs
|
|
3320
3318
|
* @description fetches information on multiple orders made by the user
|
|
3321
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
3319
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#order-lists
|
|
3322
3320
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3323
3321
|
* @param {int|undefined} [since] the earliest time in ms to fetch orders for
|
|
3324
3322
|
* @param {int|undefined} [limit] the maximum number of order structures to retrieve
|
|
@@ -3363,7 +3361,7 @@ export default class binance extends binanceRest {
|
|
|
3363
3361
|
* @method
|
|
3364
3362
|
* @name binance#fetchClosedOrdersWs
|
|
3365
3363
|
* @description fetch closed orders
|
|
3366
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
3364
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#order-lists
|
|
3367
3365
|
* @param {string} symbol unified market symbol
|
|
3368
3366
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
3369
3367
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -3385,7 +3383,7 @@ export default class binance extends binanceRest {
|
|
|
3385
3383
|
* @method
|
|
3386
3384
|
* @name binance#fetchOpenOrdersWs
|
|
3387
3385
|
* @description fetch all unfilled currently open orders
|
|
3388
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
3386
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/trading-requests#current-open-orders-user_data
|
|
3389
3387
|
* @param {string} symbol unified market symbol
|
|
3390
3388
|
* @param {int|undefined} [since] the earliest time in ms to fetch open orders for
|
|
3391
3389
|
* @param {int|undefined} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -3948,7 +3946,7 @@ export default class binance extends binanceRest {
|
|
|
3948
3946
|
* @method
|
|
3949
3947
|
* @name binance#fetchMyTradesWs
|
|
3950
3948
|
* @description fetch all trades made by the user
|
|
3951
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
3949
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/account-requests#account-trade-history-user_data
|
|
3952
3950
|
* @param {string} symbol unified market symbol
|
|
3953
3951
|
* @param {int|undefined} [since] the earliest time in ms to fetch trades for
|
|
3954
3952
|
* @param {int|undefined} [limit] the maximum number of trades structures to retrieve
|
|
@@ -4001,7 +3999,7 @@ export default class binance extends binanceRest {
|
|
|
4001
3999
|
* @method
|
|
4002
4000
|
* @name binance#fetchTradesWs
|
|
4003
4001
|
* @description fetch all trades made by the user
|
|
4004
|
-
* @see https://developers.binance.com/docs/binance-spot-api-docs/
|
|
4002
|
+
* @see https://developers.binance.com/docs/binance-spot-api-docs/websocket-api/market-data-requests#recent-trades
|
|
4005
4003
|
* @param {string} symbol unified market symbol
|
|
4006
4004
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
4007
4005
|
* @param {int} [limit] the maximum number of trades structures to retrieve, default=500, max=1000
|
package/js/src/pro/bithumb.js
CHANGED
|
@@ -327,18 +327,20 @@ export default class bithumb extends bithumbRest {
|
|
|
327
327
|
// "contPrice" : "10579000",
|
|
328
328
|
// "contQty" : "0.01",
|
|
329
329
|
// "contAmt" : "105790.00",
|
|
330
|
-
// "contDtm" : "2020-01-29 12:24:18.
|
|
330
|
+
// "contDtm" : "2020-01-29 12:24:18.830038",
|
|
331
331
|
// "updn" : "dn"
|
|
332
332
|
// }
|
|
333
333
|
//
|
|
334
334
|
const marketId = this.safeString(trade, 'symbol');
|
|
335
335
|
const datetime = this.safeString(trade, 'contDtm');
|
|
336
|
+
// that date is not UTC iso8601, but exchange's local time, -9hr difference
|
|
337
|
+
const timestamp = this.parse8601(datetime) - 32400000;
|
|
336
338
|
const sideId = this.safeString(trade, 'buySellGb');
|
|
337
339
|
return this.safeTrade({
|
|
338
340
|
'id': undefined,
|
|
339
341
|
'info': trade,
|
|
340
|
-
'timestamp':
|
|
341
|
-
'datetime':
|
|
342
|
+
'timestamp': timestamp,
|
|
343
|
+
'datetime': this.iso8601(timestamp),
|
|
342
344
|
'symbol': this.safeSymbol(marketId, market, '_'),
|
|
343
345
|
'order': undefined,
|
|
344
346
|
'type': undefined,
|
package/js/src/pro/kraken.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import krakenRest from '../kraken.js';
|
|
2
|
-
import type { Int, Strings, OrderSide, OrderType, Str, OrderBook, Order, Trade, Ticker, Tickers, OHLCV, Num, Balances } from '../base/types.js';
|
|
2
|
+
import type { Int, Strings, OrderSide, OrderType, Str, OrderBook, Order, Trade, Ticker, Tickers, OHLCV, Num, Dict, Balances } from '../base/types.js';
|
|
3
3
|
import Client from '../base/ws/Client.js';
|
|
4
4
|
export default class kraken extends krakenRest {
|
|
5
5
|
describe(): any;
|
|
6
|
+
orderRequestWs(method: string, symbol: string, type: string, request: Dict, amount: Num, price?: Num, params?: {}): Dict[];
|
|
6
7
|
/**
|
|
7
8
|
* @method
|
|
8
9
|
* @name kraken#createOrderWs
|
|
9
|
-
* @see https://docs.kraken.com/api/docs/websocket-v1/addorder
|
|
10
10
|
* @description create a trade order
|
|
11
|
+
* @see https://docs.kraken.com/api/docs/websocket-v2/add_order
|
|
11
12
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
12
13
|
* @param {string} type 'market' or 'limit'
|
|
13
14
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -22,7 +23,7 @@ export default class kraken extends krakenRest {
|
|
|
22
23
|
* @method
|
|
23
24
|
* @name kraken#editOrderWs
|
|
24
25
|
* @description edit a trade order
|
|
25
|
-
* @see https://docs.kraken.com/api/docs/websocket-
|
|
26
|
+
* @see https://docs.kraken.com/api/docs/websocket-v2/amend_order
|
|
26
27
|
* @param {string} id order id
|
|
27
28
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
28
29
|
* @param {string} type 'market' or 'limit'
|
|
@@ -39,7 +40,7 @@ export default class kraken extends krakenRest {
|
|
|
39
40
|
* @see https://docs.kraken.com/api/docs/websocket-v1/cancelorder
|
|
40
41
|
* @description cancel multiple orders
|
|
41
42
|
* @param {string[]} ids order ids
|
|
42
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
43
|
+
* @param {string} [symbol] unified market symbol, default is undefined
|
|
43
44
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
44
45
|
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
45
46
|
*/
|
|
@@ -50,7 +51,7 @@ export default class kraken extends krakenRest {
|
|
|
50
51
|
* @see https://docs.kraken.com/api/docs/websocket-v1/cancelorder
|
|
51
52
|
* @description cancels an open order
|
|
52
53
|
* @param {string} id order id
|
|
53
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
54
|
+
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
54
55
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
55
56
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
56
57
|
*/
|
|
@@ -61,7 +62,7 @@ export default class kraken extends krakenRest {
|
|
|
61
62
|
* @name kraken#cancelAllOrdersWs
|
|
62
63
|
* @see https://docs.kraken.com/api/docs/websocket-v1/cancelall
|
|
63
64
|
* @description cancel all open orders
|
|
64
|
-
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
65
|
+
* @param {string} [symbol] unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
65
66
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
66
67
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
67
68
|
*/
|