ccxt 4.4.49 → 4.4.53
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 +6 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/alpaca.js +65 -2
- package/dist/cjs/src/base/Exchange.js +112 -3
- package/dist/cjs/src/binance.js +42 -19
- package/dist/cjs/src/bitfinex1.js +22 -22
- package/dist/cjs/src/blofin.js +6 -2
- package/dist/cjs/src/bybit.js +2 -2
- package/dist/cjs/src/coinex.js +5 -5
- package/dist/cjs/src/coinmetro.js +21 -4
- package/dist/cjs/src/defx.js +1 -1
- package/dist/cjs/src/deribit.js +23 -4
- package/dist/cjs/src/ellipx.js +1 -0
- package/dist/cjs/src/gate.js +2 -2
- package/dist/cjs/src/hollaex.js +15 -20
- package/dist/cjs/src/htx.js +6 -4
- package/dist/cjs/src/hyperliquid.js +4 -4
- package/dist/cjs/src/krakenfutures.js +1 -1
- package/dist/cjs/src/kucoin.js +52 -74
- package/dist/cjs/src/kuna.js +1 -1
- package/dist/cjs/src/mexc.js +29 -8
- package/dist/cjs/src/okcoin.js +13 -5
- package/dist/cjs/src/okx.js +1 -1
- package/dist/cjs/src/onetrading.js +1 -1
- package/dist/cjs/src/paradex.js +2 -2
- package/dist/cjs/src/paymium.js +42 -0
- package/dist/cjs/src/pro/binance.js +2 -0
- package/dist/cjs/src/pro/bitfinex1.js +4 -4
- package/dist/cjs/src/pro/bitvavo.js +1 -1
- package/dist/cjs/src/pro/blofin.js +9 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/coincatch.js +2 -2
- package/dist/cjs/src/pro/coinex.js +4 -1
- package/dist/cjs/src/pro/cryptocom.js +2 -2
- package/dist/cjs/src/pro/defx.js +1 -1
- package/dist/cjs/src/pro/exmo.js +1 -1
- package/dist/cjs/src/pro/gemini.js +1 -1
- package/dist/cjs/src/pro/hashkey.js +2 -2
- package/dist/cjs/src/pro/htx.js +8 -8
- package/dist/cjs/src/pro/hyperliquid.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +1 -1
- package/dist/cjs/src/pro/okx.js +1 -1
- package/dist/cjs/src/pro/oxfun.js +1 -1
- package/dist/cjs/src/probit.js +77 -9
- package/dist/cjs/src/timex.js +67 -0
- package/dist/cjs/src/tokocrypto.js +82 -5
- package/dist/cjs/src/tradeogre.js +55 -2
- package/dist/cjs/src/vertex.js +65 -2
- package/dist/cjs/src/wavesexchange.js +73 -0
- package/dist/cjs/src/wazirx.js +59 -3
- package/dist/cjs/src/whitebit.js +80 -4
- package/dist/cjs/src/xt.js +112 -0
- package/dist/cjs/src/yobit.js +56 -0
- package/dist/cjs/src/zaif.js +55 -0
- package/dist/cjs/src/zonda.js +56 -0
- package/examples/README.md +6 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/alpaca.d.ts +35 -0
- package/js/src/alpaca.js +65 -2
- package/js/src/base/Exchange.d.ts +2 -0
- package/js/src/base/Exchange.js +112 -3
- package/js/src/binance.d.ts +4 -1
- package/js/src/binance.js +42 -19
- package/js/src/bitfinex1.d.ts +22 -22
- package/js/src/bitfinex1.js +22 -22
- package/js/src/blofin.d.ts +1 -1
- package/js/src/blofin.js +6 -2
- package/js/src/bybit.d.ts +2 -2
- package/js/src/bybit.js +2 -2
- package/js/src/coinex.js +5 -5
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +21 -4
- package/js/src/defx.d.ts +1 -1
- package/js/src/defx.js +1 -1
- package/js/src/deribit.d.ts +1 -1
- package/js/src/deribit.js +23 -4
- package/js/src/ellipx.d.ts +1 -0
- package/js/src/ellipx.js +1 -0
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +2 -2
- package/js/src/hollaex.d.ts +2 -1
- package/js/src/hollaex.js +15 -20
- package/js/src/htx.d.ts +1 -1
- package/js/src/htx.js +6 -4
- package/js/src/hyperliquid.d.ts +3 -3
- package/js/src/hyperliquid.js +4 -4
- package/js/src/krakenfutures.d.ts +1 -1
- package/js/src/krakenfutures.js +1 -1
- package/js/src/kucoin.js +52 -74
- package/js/src/kuna.d.ts +1 -1
- package/js/src/kuna.js +1 -1
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +29 -8
- package/js/src/okcoin.js +13 -5
- package/js/src/okx.d.ts +1 -1
- package/js/src/okx.js +1 -1
- package/js/src/onetrading.d.ts +1 -1
- package/js/src/onetrading.js +1 -1
- package/js/src/paradex.d.ts +1 -1
- package/js/src/paradex.js +2 -2
- package/js/src/paymium.js +42 -0
- package/js/src/pro/binance.js +2 -0
- package/js/src/pro/bitfinex1.d.ts +4 -4
- package/js/src/pro/bitfinex1.js +4 -4
- package/js/src/pro/bitvavo.d.ts +1 -1
- package/js/src/pro/bitvavo.js +1 -1
- package/js/src/pro/blofin.d.ts +1 -1
- package/js/src/pro/blofin.js +9 -1
- package/js/src/pro/bybit.d.ts +1 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/coincatch.d.ts +2 -2
- package/js/src/pro/coincatch.js +2 -2
- package/js/src/pro/coinex.js +4 -1
- package/js/src/pro/cryptocom.d.ts +2 -2
- package/js/src/pro/cryptocom.js +2 -2
- package/js/src/pro/defx.d.ts +1 -1
- package/js/src/pro/defx.js +1 -1
- package/js/src/pro/exmo.d.ts +1 -1
- package/js/src/pro/exmo.js +1 -1
- package/js/src/pro/gemini.d.ts +1 -1
- package/js/src/pro/gemini.js +1 -1
- package/js/src/pro/hashkey.d.ts +2 -2
- package/js/src/pro/hashkey.js +2 -2
- package/js/src/pro/htx.d.ts +8 -8
- package/js/src/pro/htx.js +8 -8
- package/js/src/pro/hyperliquid.d.ts +2 -2
- package/js/src/pro/hyperliquid.js +2 -2
- package/js/src/pro/kucoin.d.ts +1 -1
- package/js/src/pro/kucoin.js +1 -1
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +1 -1
- package/js/src/pro/oxfun.d.ts +1 -1
- package/js/src/pro/oxfun.js +1 -1
- package/js/src/probit.d.ts +1 -0
- package/js/src/probit.js +77 -9
- package/js/src/timex.js +67 -0
- package/js/src/tokocrypto.d.ts +2 -3
- package/js/src/tokocrypto.js +82 -5
- package/js/src/tradeogre.d.ts +4 -2
- package/js/src/tradeogre.js +55 -2
- package/js/src/vertex.js +65 -2
- package/js/src/wavesexchange.js +73 -0
- package/js/src/wazirx.js +59 -3
- package/js/src/whitebit.js +80 -4
- package/js/src/xt.js +112 -0
- package/js/src/yobit.js +56 -0
- package/js/src/zaif.js +55 -0
- package/js/src/zonda.d.ts +1 -0
- package/js/src/zonda.js +56 -0
- package/package.json +2 -2
- package/js/src/hitbtc3.d.ts +0 -8
- package/js/src/hitbtc3.js +0 -20
package/js/src/pro/bitvavo.js
CHANGED
|
@@ -173,7 +173,7 @@ export default class bitvavo extends bitvavoRest {
|
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* @method
|
|
176
|
-
* @name
|
|
176
|
+
* @name bitvavo#watchBidsAsks
|
|
177
177
|
* @description watches best bid & ask for symbols
|
|
178
178
|
* @see https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
|
|
179
179
|
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
package/js/src/pro/blofin.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export default class blofin extends blofinRest {
|
|
|
127
127
|
parseWsBalance(message: any): Balances;
|
|
128
128
|
/**
|
|
129
129
|
* @method
|
|
130
|
-
* @name
|
|
130
|
+
* @name biofin#watchOrders
|
|
131
131
|
* @description watches information on multiple orders made by the user
|
|
132
132
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
133
133
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
package/js/src/pro/blofin.js
CHANGED
|
@@ -37,6 +37,14 @@ export default class blofin extends blofinRest {
|
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
|
+
'test': {
|
|
41
|
+
'ws': {
|
|
42
|
+
'swap': {
|
|
43
|
+
'public': 'wss://demo-trading-openapi.blofin.com/ws/public',
|
|
44
|
+
'private': 'wss://demo-trading-openapi.blofin.com/ws/private',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
40
48
|
},
|
|
41
49
|
'options': {
|
|
42
50
|
'defaultType': 'swap',
|
|
@@ -475,7 +483,7 @@ export default class blofin extends blofinRest {
|
|
|
475
483
|
}
|
|
476
484
|
/**
|
|
477
485
|
* @method
|
|
478
|
-
* @name
|
|
486
|
+
* @name biofin#watchOrders
|
|
479
487
|
* @description watches information on multiple orders made by the user
|
|
480
488
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
481
489
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
package/js/src/pro/bybit.d.ts
CHANGED
|
@@ -199,7 +199,7 @@ export default class bybit extends bybitRest {
|
|
|
199
199
|
watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
200
200
|
/**
|
|
201
201
|
* @method
|
|
202
|
-
* @name bybit#
|
|
202
|
+
* @name bybit#watchOrderBookForSymbols
|
|
203
203
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
204
204
|
* @see https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
|
|
205
205
|
* @param {string[]} symbols unified array of symbols
|
package/js/src/pro/bybit.js
CHANGED
|
@@ -830,7 +830,7 @@ export default class bybit extends bybitRest {
|
|
|
830
830
|
}
|
|
831
831
|
/**
|
|
832
832
|
* @method
|
|
833
|
-
* @name bybit#
|
|
833
|
+
* @name bybit#watchOrderBookForSymbols
|
|
834
834
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
835
835
|
* @see https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
|
|
836
836
|
* @param {string[]} symbols unified array of symbols
|
|
@@ -98,7 +98,7 @@ export default class coincatch extends coincatchRest {
|
|
|
98
98
|
unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
|
|
99
99
|
/**
|
|
100
100
|
* @method
|
|
101
|
-
* @name coincatch#
|
|
101
|
+
* @name coincatch#watchOrderBookForSymbols
|
|
102
102
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
103
103
|
* @see https://coincatch.github.io/github.io/en/spot/#depth-channel
|
|
104
104
|
* @param symbols
|
|
@@ -125,7 +125,7 @@ export default class coincatch extends coincatchRest {
|
|
|
125
125
|
watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
126
126
|
/**
|
|
127
127
|
* @method
|
|
128
|
-
* @name coincatch#
|
|
128
|
+
* @name coincatch#watchTradesForSymbols
|
|
129
129
|
* @description watches information on multiple trades made in a market
|
|
130
130
|
* @see https://coincatch.github.io/github.io/en/spot/#trades-channel
|
|
131
131
|
* @param symbols
|
package/js/src/pro/coincatch.js
CHANGED
|
@@ -561,7 +561,7 @@ export default class coincatch extends coincatchRest {
|
|
|
561
561
|
}
|
|
562
562
|
/**
|
|
563
563
|
* @method
|
|
564
|
-
* @name coincatch#
|
|
564
|
+
* @name coincatch#watchOrderBookForSymbols
|
|
565
565
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
566
566
|
* @see https://coincatch.github.io/github.io/en/spot/#depth-channel
|
|
567
567
|
* @param symbols
|
|
@@ -699,7 +699,7 @@ export default class coincatch extends coincatchRest {
|
|
|
699
699
|
}
|
|
700
700
|
/**
|
|
701
701
|
* @method
|
|
702
|
-
* @name coincatch#
|
|
702
|
+
* @name coincatch#watchTradesForSymbols
|
|
703
703
|
* @description watches information on multiple trades made in a market
|
|
704
704
|
* @see https://coincatch.github.io/github.io/en/spot/#trades-channel
|
|
705
705
|
* @param symbols
|
package/js/src/pro/coinex.js
CHANGED
|
@@ -256,7 +256,10 @@ export default class coinex extends coinexRest {
|
|
|
256
256
|
[type, params] = this.handleMarketTypeAndParams('watchBalance', undefined, params, 'spot');
|
|
257
257
|
await this.authenticate(type);
|
|
258
258
|
const url = this.urls['api']['ws'][type];
|
|
259
|
-
|
|
259
|
+
// coinex throws a closes the websocket when subscribing over 1422 currencies, therefore we filter out inactive currencies
|
|
260
|
+
const activeCurrencies = this.filterBy(this.currencies_by_id, 'active', true);
|
|
261
|
+
const activeCurrenciesById = this.indexBy(activeCurrencies, 'id');
|
|
262
|
+
let currencies = Object.keys(activeCurrenciesById);
|
|
260
263
|
if (currencies === undefined) {
|
|
261
264
|
currencies = [];
|
|
262
265
|
}
|
|
@@ -31,7 +31,7 @@ export default class cryptocom extends cryptocomRest {
|
|
|
31
31
|
unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
|
|
32
32
|
/**
|
|
33
33
|
* @method
|
|
34
|
-
* @name cryptocom#
|
|
34
|
+
* @name cryptocom#watchOrderBookForSymbols
|
|
35
35
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
36
36
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
|
|
37
37
|
* @param {string[]} symbols unified array of symbols
|
|
@@ -249,7 +249,7 @@ export default class cryptocom extends cryptocomRest {
|
|
|
249
249
|
handleOrder(client: Client, message: any): void;
|
|
250
250
|
/**
|
|
251
251
|
* @method
|
|
252
|
-
* @name cryptocom#
|
|
252
|
+
* @name cryptocom#cancelOrderWs
|
|
253
253
|
* @description cancels an open order
|
|
254
254
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order
|
|
255
255
|
* @param {string} id the order id of the order to cancel
|
package/js/src/pro/cryptocom.js
CHANGED
|
@@ -100,7 +100,7 @@ export default class cryptocom extends cryptocomRest {
|
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* @method
|
|
103
|
-
* @name cryptocom#
|
|
103
|
+
* @name cryptocom#watchOrderBookForSymbols
|
|
104
104
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
105
105
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
|
|
106
106
|
* @param {string[]} symbols unified array of symbols
|
|
@@ -1081,7 +1081,7 @@ export default class cryptocom extends cryptocomRest {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
/**
|
|
1083
1083
|
* @method
|
|
1084
|
-
* @name cryptocom#
|
|
1084
|
+
* @name cryptocom#cancelOrderWs
|
|
1085
1085
|
* @description cancels an open order
|
|
1086
1086
|
* @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order
|
|
1087
1087
|
* @param {string} id the order id of the order to cancel
|
package/js/src/pro/defx.d.ts
CHANGED
|
@@ -120,7 +120,7 @@ export default class defx extends defxRest {
|
|
|
120
120
|
watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
121
121
|
/**
|
|
122
122
|
* @method
|
|
123
|
-
* @name defx#
|
|
123
|
+
* @name defx#unWatchTrades
|
|
124
124
|
* @description unWatches from the stream channel
|
|
125
125
|
* @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
|
|
126
126
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
package/js/src/pro/defx.js
CHANGED
|
@@ -399,7 +399,7 @@ export default class defx extends defxRest {
|
|
|
399
399
|
}
|
|
400
400
|
/**
|
|
401
401
|
* @method
|
|
402
|
-
* @name defx#
|
|
402
|
+
* @name defx#unWatchTrades
|
|
403
403
|
* @description unWatches from the stream channel
|
|
404
404
|
* @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
|
|
405
405
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
package/js/src/pro/exmo.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export default class exmo extends exmoRest {
|
|
|
50
50
|
handleTrades(client: Client, message: any): void;
|
|
51
51
|
/**
|
|
52
52
|
* @method
|
|
53
|
-
* @name exmo#
|
|
53
|
+
* @name exmo#watchMyTrades
|
|
54
54
|
* @description get the list of trades associated with the user
|
|
55
55
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
56
56
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
package/js/src/pro/exmo.js
CHANGED
|
@@ -349,7 +349,7 @@ export default class exmo extends exmoRest {
|
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
351
|
* @method
|
|
352
|
-
* @name exmo#
|
|
352
|
+
* @name exmo#watchMyTrades
|
|
353
353
|
* @description get the list of trades associated with the user
|
|
354
354
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
355
355
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
package/js/src/pro/gemini.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export default class gemini extends geminiRest {
|
|
|
33
33
|
handleTradesForMultidata(client: Client, trades: any, timestamp: Int): void;
|
|
34
34
|
/**
|
|
35
35
|
* @method
|
|
36
|
-
* @name gemini#
|
|
36
|
+
* @name gemini#watchOHLCV
|
|
37
37
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
38
38
|
* @see https://docs.gemini.com/websocket-api/#candles-data-feed
|
|
39
39
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
package/js/src/pro/gemini.js
CHANGED
|
@@ -262,7 +262,7 @@ export default class gemini extends geminiRest {
|
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
264
264
|
* @method
|
|
265
|
-
* @name gemini#
|
|
265
|
+
* @name gemini#watchOHLCV
|
|
266
266
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
267
267
|
* @see https://docs.gemini.com/websocket-api/#candles-data-feed
|
|
268
268
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
package/js/src/pro/hashkey.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export default class hashkey extends hashkeyRest {
|
|
|
50
50
|
handleTrades(client: Client, message: any): void;
|
|
51
51
|
/**
|
|
52
52
|
* @method
|
|
53
|
-
* @name
|
|
53
|
+
* @name hashkey#watchOrderBook
|
|
54
54
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
55
55
|
* @see https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#public-stream
|
|
56
56
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
@@ -104,7 +104,7 @@ export default class hashkey extends hashkeyRest {
|
|
|
104
104
|
parseWsPosition(position: any, market?: Market): Position;
|
|
105
105
|
/**
|
|
106
106
|
* @method
|
|
107
|
-
* @name
|
|
107
|
+
* @name hashkey#watchBalance
|
|
108
108
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
109
109
|
* @see https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#private-stream
|
|
110
110
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
package/js/src/pro/hashkey.js
CHANGED
|
@@ -290,7 +290,7 @@ export default class hashkey extends hashkeyRest {
|
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
292
292
|
* @method
|
|
293
|
-
* @name
|
|
293
|
+
* @name hashkey#watchOrderBook
|
|
294
294
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
295
295
|
* @see https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#public-stream
|
|
296
296
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
@@ -686,7 +686,7 @@ export default class hashkey extends hashkeyRest {
|
|
|
686
686
|
}
|
|
687
687
|
/**
|
|
688
688
|
* @method
|
|
689
|
-
* @name
|
|
689
|
+
* @name hashkey#watchBalance
|
|
690
690
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
691
691
|
* @see https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#private-stream
|
|
692
692
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
package/js/src/pro/htx.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export default class htx extends htxRest {
|
|
|
6
6
|
requestId(): any;
|
|
7
7
|
/**
|
|
8
8
|
* @method
|
|
9
|
-
* @name
|
|
9
|
+
* @name htx#watchTicker
|
|
10
10
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
11
11
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53561-7773-11ed-9966-0242ac110003
|
|
12
12
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=28c33ab2-77ae-11ed-9966-0242ac110003
|
|
@@ -18,7 +18,7 @@ export default class htx extends htxRest {
|
|
|
18
18
|
handleTicker(client: Client, message: any): any;
|
|
19
19
|
/**
|
|
20
20
|
* @method
|
|
21
|
-
* @name
|
|
21
|
+
* @name htx#watchTrades
|
|
22
22
|
* @description get the list of most recent trades for a particular symbol
|
|
23
23
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53b69-7773-11ed-9966-0242ac110003
|
|
24
24
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=28c33c21-77ae-11ed-9966-0242ac110003
|
|
@@ -33,7 +33,7 @@ export default class htx extends htxRest {
|
|
|
33
33
|
handleTrades(client: Client, message: any): any;
|
|
34
34
|
/**
|
|
35
35
|
* @method
|
|
36
|
-
* @name
|
|
36
|
+
* @name htx#watchOHLCV
|
|
37
37
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
38
38
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53241-7773-11ed-9966-0242ac110003
|
|
39
39
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=28c3346a-77ae-11ed-9966-0242ac110003
|
|
@@ -49,7 +49,7 @@ export default class htx extends htxRest {
|
|
|
49
49
|
handleOHLCV(client: Client, message: any): void;
|
|
50
50
|
/**
|
|
51
51
|
* @method
|
|
52
|
-
* @name
|
|
52
|
+
* @name htx#watchOrderBook
|
|
53
53
|
* @see https://huobiapi.github.io/docs/dm/v1/en/#subscribe-market-depth-data
|
|
54
54
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#subscribe-incremental-market-depth-data
|
|
55
55
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-subscribe-incremental-market-depth-data
|
|
@@ -69,7 +69,7 @@ export default class htx extends htxRest {
|
|
|
69
69
|
handleOrderBookSubscription(client: Client, message: any, subscription: any): void;
|
|
70
70
|
/**
|
|
71
71
|
* @method
|
|
72
|
-
* @name
|
|
72
|
+
* @name htx#watchMyTrades
|
|
73
73
|
* @description watches information on multiple trades made by the user
|
|
74
74
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53dd5-7773-11ed-9966-0242ac110003
|
|
75
75
|
* @param {string} symbol unified market symbol of the market trades were made in
|
|
@@ -82,7 +82,7 @@ export default class htx extends htxRest {
|
|
|
82
82
|
getOrderChannelAndMessageHash(type: any, subType: any, market?: any, params?: {}): any[];
|
|
83
83
|
/**
|
|
84
84
|
* @method
|
|
85
|
-
* @name
|
|
85
|
+
* @name htx#watchOrders
|
|
86
86
|
* @description watches information on multiple orders made by the user
|
|
87
87
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53c8f-7773-11ed-9966-0242ac110003
|
|
88
88
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
@@ -97,7 +97,7 @@ export default class htx extends htxRest {
|
|
|
97
97
|
parseOrderTrade(trade: any, market?: any): Trade;
|
|
98
98
|
/**
|
|
99
99
|
* @method
|
|
100
|
-
* @name
|
|
100
|
+
* @name htx#watchPositions
|
|
101
101
|
* @see https://www.huobi.com/en-in/opend/newApiPages/?id=8cb7de1c-77b5-11ed-9966-0242ac110003
|
|
102
102
|
* @see https://www.huobi.com/en-in/opend/newApiPages/?id=8cb7df0f-77b5-11ed-9966-0242ac110003
|
|
103
103
|
* @see https://www.huobi.com/en-in/opend/newApiPages/?id=28c34a7d-77ae-11ed-9966-0242ac110003
|
|
@@ -113,7 +113,7 @@ export default class htx extends htxRest {
|
|
|
113
113
|
handlePositions(client: any, message: any): void;
|
|
114
114
|
/**
|
|
115
115
|
* @method
|
|
116
|
-
* @name
|
|
116
|
+
* @name htx#watchBalance
|
|
117
117
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
118
118
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec52e28-7773-11ed-9966-0242ac110003
|
|
119
119
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=10000084-77b7-11ed-9966-0242ac110003
|
package/js/src/pro/htx.js
CHANGED
|
@@ -132,7 +132,7 @@ export default class htx extends htxRest {
|
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
134
|
* @method
|
|
135
|
-
* @name
|
|
135
|
+
* @name htx#watchTicker
|
|
136
136
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
137
137
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53561-7773-11ed-9966-0242ac110003
|
|
138
138
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=28c33ab2-77ae-11ed-9966-0242ac110003
|
|
@@ -202,7 +202,7 @@ export default class htx extends htxRest {
|
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
204
|
* @method
|
|
205
|
-
* @name
|
|
205
|
+
* @name htx#watchTrades
|
|
206
206
|
* @description get the list of most recent trades for a particular symbol
|
|
207
207
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53b69-7773-11ed-9966-0242ac110003
|
|
208
208
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=28c33c21-77ae-11ed-9966-0242ac110003
|
|
@@ -268,7 +268,7 @@ export default class htx extends htxRest {
|
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* @method
|
|
271
|
-
* @name
|
|
271
|
+
* @name htx#watchOHLCV
|
|
272
272
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
273
273
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53241-7773-11ed-9966-0242ac110003
|
|
274
274
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=28c3346a-77ae-11ed-9966-0242ac110003
|
|
@@ -331,7 +331,7 @@ export default class htx extends htxRest {
|
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
333
|
* @method
|
|
334
|
-
* @name
|
|
334
|
+
* @name htx#watchOrderBook
|
|
335
335
|
* @see https://huobiapi.github.io/docs/dm/v1/en/#subscribe-market-depth-data
|
|
336
336
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#subscribe-incremental-market-depth-data
|
|
337
337
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-subscribe-incremental-market-depth-data
|
|
@@ -677,7 +677,7 @@ export default class htx extends htxRest {
|
|
|
677
677
|
}
|
|
678
678
|
/**
|
|
679
679
|
* @method
|
|
680
|
-
* @name
|
|
680
|
+
* @name htx#watchMyTrades
|
|
681
681
|
* @description watches information on multiple trades made by the user
|
|
682
682
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53dd5-7773-11ed-9966-0242ac110003
|
|
683
683
|
* @param {string} symbol unified market symbol of the market trades were made in
|
|
@@ -781,7 +781,7 @@ export default class htx extends htxRest {
|
|
|
781
781
|
}
|
|
782
782
|
/**
|
|
783
783
|
* @method
|
|
784
|
-
* @name
|
|
784
|
+
* @name htx#watchOrders
|
|
785
785
|
* @description watches information on multiple orders made by the user
|
|
786
786
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53c8f-7773-11ed-9966-0242ac110003
|
|
787
787
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
@@ -1235,7 +1235,7 @@ export default class htx extends htxRest {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
/**
|
|
1237
1237
|
* @method
|
|
1238
|
-
* @name
|
|
1238
|
+
* @name htx#watchPositions
|
|
1239
1239
|
* @see https://www.huobi.com/en-in/opend/newApiPages/?id=8cb7de1c-77b5-11ed-9966-0242ac110003
|
|
1240
1240
|
* @see https://www.huobi.com/en-in/opend/newApiPages/?id=8cb7df0f-77b5-11ed-9966-0242ac110003
|
|
1241
1241
|
* @see https://www.huobi.com/en-in/opend/newApiPages/?id=28c34a7d-77ae-11ed-9966-0242ac110003
|
|
@@ -1358,7 +1358,7 @@ export default class htx extends htxRest {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
/**
|
|
1360
1360
|
* @method
|
|
1361
|
-
* @name
|
|
1361
|
+
* @name htx#watchBalance
|
|
1362
1362
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
1363
1363
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec52e28-7773-11ed-9966-0242ac110003
|
|
1364
1364
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=10000084-77b7-11ed-9966-0242ac110003
|
|
@@ -15,7 +15,7 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
15
15
|
createOrdersWs(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
16
16
|
/**
|
|
17
17
|
* @method
|
|
18
|
-
* @name hyperliquid#
|
|
18
|
+
* @name hyperliquid#createOrderWs
|
|
19
19
|
* @description create a trade order using WebSocket post request
|
|
20
20
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
|
|
21
21
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
@@ -36,7 +36,7 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
36
36
|
createOrderWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
37
37
|
/**
|
|
38
38
|
* @method
|
|
39
|
-
* @name hyperliquid#
|
|
39
|
+
* @name hyperliquid#editOrderWs
|
|
40
40
|
* @description edit a trade order
|
|
41
41
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
|
|
42
42
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
|
|
@@ -76,7 +76,7 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* @method
|
|
79
|
-
* @name hyperliquid#
|
|
79
|
+
* @name hyperliquid#createOrderWs
|
|
80
80
|
* @description create a trade order using WebSocket post request
|
|
81
81
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
|
|
82
82
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
@@ -102,7 +102,7 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
104
|
* @method
|
|
105
|
-
* @name hyperliquid#
|
|
105
|
+
* @name hyperliquid#editOrderWs
|
|
106
106
|
* @description edit a trade order
|
|
107
107
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
|
|
108
108
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
|
package/js/src/pro/kucoin.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export default class kucoin extends kucoinRest {
|
|
|
72
72
|
watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
73
73
|
/**
|
|
74
74
|
* @method
|
|
75
|
-
* @name kucoin#
|
|
75
|
+
* @name kucoin#watchTradesForSymbols
|
|
76
76
|
* @description get the list of most recent trades for a particular symbol
|
|
77
77
|
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
|
|
78
78
|
* @param {string[]} symbols
|
package/js/src/pro/kucoin.js
CHANGED
|
@@ -496,7 +496,7 @@ export default class kucoin extends kucoinRest {
|
|
|
496
496
|
}
|
|
497
497
|
/**
|
|
498
498
|
* @method
|
|
499
|
-
* @name kucoin#
|
|
499
|
+
* @name kucoin#watchTradesForSymbols
|
|
500
500
|
* @description get the list of most recent trades for a particular symbol
|
|
501
501
|
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
|
|
502
502
|
* @param {string[]} symbols
|
package/js/src/pro/okx.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export default class okx extends okxRest {
|
|
|
39
39
|
unWatchTradesForSymbols(symbols: string[], params?: {}): Promise<any>;
|
|
40
40
|
/**
|
|
41
41
|
* @method
|
|
42
|
-
* @name okx#
|
|
42
|
+
* @name okx#unWatchTrades
|
|
43
43
|
* @description unWatches from the stream channel
|
|
44
44
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
45
45
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
package/js/src/pro/okx.js
CHANGED
|
@@ -256,7 +256,7 @@ export default class okx extends okxRest {
|
|
|
256
256
|
}
|
|
257
257
|
/**
|
|
258
258
|
* @method
|
|
259
|
-
* @name okx#
|
|
259
|
+
* @name okx#unWatchTrades
|
|
260
260
|
* @description unWatches from the stream channel
|
|
261
261
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
262
262
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
package/js/src/pro/oxfun.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ export default class oxfun extends oxfunRest {
|
|
|
217
217
|
cancelOrderWs(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
218
218
|
/**
|
|
219
219
|
* @method
|
|
220
|
-
* @name
|
|
220
|
+
* @name oxfun#cancelOrdersWs
|
|
221
221
|
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-ws-mass-cancel-order
|
|
222
222
|
* @description cancel multiple orders
|
|
223
223
|
* @param {string[]} ids order ids
|
package/js/src/pro/oxfun.js
CHANGED
|
@@ -983,7 +983,7 @@ export default class oxfun extends oxfunRest {
|
|
|
983
983
|
}
|
|
984
984
|
/**
|
|
985
985
|
* @method
|
|
986
|
-
* @name
|
|
986
|
+
* @name oxfun#cancelOrdersWs
|
|
987
987
|
* @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-ws-mass-cancel-order
|
|
988
988
|
* @description cancel multiple orders
|
|
989
989
|
* @param {string[]} ids order ids
|
package/js/src/probit.d.ts
CHANGED
|
@@ -112,6 +112,7 @@ export default class probit extends Exchange {
|
|
|
112
112
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
113
113
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
114
114
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
115
|
+
* @param {string} [params.until] timestamp in ms of the earliest candle to fetch
|
|
115
116
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
116
117
|
*/
|
|
117
118
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
package/js/src/probit.js
CHANGED
|
@@ -90,7 +90,7 @@ export default class probit extends Exchange {
|
|
|
90
90
|
'fetchWithdrawal': false,
|
|
91
91
|
'fetchWithdrawals': true,
|
|
92
92
|
'reduceMargin': false,
|
|
93
|
-
'sandbox':
|
|
93
|
+
'sandbox': false,
|
|
94
94
|
'setLeverage': false,
|
|
95
95
|
'setMarginMode': false,
|
|
96
96
|
'setPositionMode': false,
|
|
@@ -172,6 +172,73 @@ export default class probit extends Exchange {
|
|
|
172
172
|
'taker': this.parseNumber('0.002'),
|
|
173
173
|
},
|
|
174
174
|
},
|
|
175
|
+
'features': {
|
|
176
|
+
'spot': {
|
|
177
|
+
'sandbox': false,
|
|
178
|
+
'createOrder': {
|
|
179
|
+
'marginMode': false,
|
|
180
|
+
'triggerPrice': false,
|
|
181
|
+
'triggerDirection': false,
|
|
182
|
+
'triggerPriceType': undefined,
|
|
183
|
+
'stopLossPrice': false,
|
|
184
|
+
'takeProfitPrice': false,
|
|
185
|
+
'attachedStopLossTakeProfit': undefined,
|
|
186
|
+
// todo
|
|
187
|
+
'timeInForce': {
|
|
188
|
+
'IOC': true,
|
|
189
|
+
'FOK': true,
|
|
190
|
+
'PO': false,
|
|
191
|
+
'GTD': false,
|
|
192
|
+
},
|
|
193
|
+
'hedged': false,
|
|
194
|
+
'trailing': false,
|
|
195
|
+
'leverage': false,
|
|
196
|
+
'marketBuyByCost': true,
|
|
197
|
+
'marketBuyRequiresPrice': false,
|
|
198
|
+
'selfTradePrevention': false,
|
|
199
|
+
'iceberg': false,
|
|
200
|
+
},
|
|
201
|
+
'createOrders': undefined,
|
|
202
|
+
'fetchMyTrades': {
|
|
203
|
+
'marginMode': false,
|
|
204
|
+
'limit': 1000,
|
|
205
|
+
'daysBack': 100000,
|
|
206
|
+
'untilDays': 100000, // todo
|
|
207
|
+
},
|
|
208
|
+
'fetchOrder': {
|
|
209
|
+
'marginMode': false,
|
|
210
|
+
'trigger': false,
|
|
211
|
+
'trailing': false,
|
|
212
|
+
},
|
|
213
|
+
'fetchOpenOrders': {
|
|
214
|
+
'marginMode': false,
|
|
215
|
+
'limit': undefined,
|
|
216
|
+
'trigger': false,
|
|
217
|
+
'trailing': false,
|
|
218
|
+
},
|
|
219
|
+
'fetchOrders': undefined,
|
|
220
|
+
'fetchClosedOrders': {
|
|
221
|
+
'marginMode': false,
|
|
222
|
+
'limit': 1000,
|
|
223
|
+
'daysBack': 100000,
|
|
224
|
+
'daysBackCanceled': 1,
|
|
225
|
+
'untilDays': 90,
|
|
226
|
+
'trigger': false,
|
|
227
|
+
'trailing': false,
|
|
228
|
+
},
|
|
229
|
+
'fetchOHLCV': {
|
|
230
|
+
'limit': 4000,
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
'swap': {
|
|
234
|
+
'linear': undefined,
|
|
235
|
+
'inverse': undefined,
|
|
236
|
+
},
|
|
237
|
+
'future': {
|
|
238
|
+
'linear': undefined,
|
|
239
|
+
'inverse': undefined,
|
|
240
|
+
},
|
|
241
|
+
},
|
|
175
242
|
'exceptions': {
|
|
176
243
|
'exact': {
|
|
177
244
|
'UNAUTHORIZED': AuthenticationError,
|
|
@@ -935,6 +1002,7 @@ export default class probit extends Exchange {
|
|
|
935
1002
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
936
1003
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
937
1004
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1005
|
+
* @param {string} [params.until] timestamp in ms of the earliest candle to fetch
|
|
938
1006
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
939
1007
|
*/
|
|
940
1008
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
@@ -951,21 +1019,21 @@ export default class probit extends Exchange {
|
|
|
951
1019
|
'limit': requestLimit, // max 1000
|
|
952
1020
|
};
|
|
953
1021
|
const now = this.milliseconds();
|
|
954
|
-
const
|
|
1022
|
+
const until = this.safeInteger(params, 'until');
|
|
1023
|
+
const durationMilliseconds = this.parseTimeframe(timeframe) * 1000;
|
|
955
1024
|
let startTime = since;
|
|
956
|
-
let endTime = now;
|
|
1025
|
+
let endTime = (until !== undefined) ? until - durationMilliseconds : now;
|
|
957
1026
|
if (since === undefined) {
|
|
958
1027
|
if (limit === undefined) {
|
|
959
1028
|
limit = requestLimit;
|
|
960
1029
|
}
|
|
961
|
-
|
|
1030
|
+
const startLimit = limit - 1;
|
|
1031
|
+
startTime = endTime - startLimit * durationMilliseconds;
|
|
962
1032
|
}
|
|
963
1033
|
else {
|
|
964
|
-
if (limit
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
else {
|
|
968
|
-
endTime = this.sum(since, this.sum(limit, 1) * duration * 1000);
|
|
1034
|
+
if (limit !== undefined) {
|
|
1035
|
+
const endByLimit = this.sum(since, limit * durationMilliseconds);
|
|
1036
|
+
endTime = Math.min(endTime, endByLimit);
|
|
969
1037
|
}
|
|
970
1038
|
}
|
|
971
1039
|
const startTimeNormalized = this.normalizeOHLCVTimestamp(startTime, timeframe);
|