ccxt 4.2.78 → 4.2.80
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 -5
- package/dist/ccxt.browser.js +517 -79
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +35 -3
- package/dist/cjs/src/binance.js +1 -1
- package/dist/cjs/src/bingx.js +39 -5
- package/dist/cjs/src/bitstamp.js +21 -26
- package/dist/cjs/src/bybit.js +101 -0
- package/dist/cjs/src/coinbaseinternational.js +2 -2
- package/dist/cjs/src/deribit.js +155 -0
- package/dist/cjs/src/gate.js +15 -4
- package/dist/cjs/src/hyperliquid.js +54 -10
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/binance.js +5 -5
- package/dist/cjs/src/pro/bitfinex2.js +1 -1
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +1 -1
- package/dist/cjs/src/pro/bitopro.js +2 -1
- package/dist/cjs/src/pro/blockchaincom.js +1 -1
- package/dist/cjs/src/pro/bybit.js +16 -1
- package/dist/cjs/src/pro/cex.js +9 -5
- package/dist/cjs/src/pro/cryptocom.js +1 -1
- package/dist/cjs/src/pro/gemini.js +3 -2
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/pro/htx.js +1 -1
- package/dist/cjs/src/pro/okcoin.js +1 -1
- package/dist/cjs/src/pro/onetrading.js +1 -1
- package/dist/cjs/src/pro/phemex.js +7 -2
- package/dist/cjs/src/pro/woo.js +38 -0
- package/dist/cjs/src/upbit.js +2 -0
- package/js/ccxt.d.ts +3 -3
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +1 -0
- package/js/src/abstract/gate.d.ts +1 -0
- package/js/src/abstract/gateio.d.ts +1 -0
- package/js/src/abstract/upbit.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +14 -5
- package/js/src/base/Exchange.js +35 -3
- package/js/src/base/types.d.ts +21 -0
- package/js/src/binance.d.ts +2 -2
- package/js/src/binance.js +1 -1
- package/js/src/bingx.js +39 -5
- package/js/src/bitstamp.js +21 -26
- package/js/src/bybit.d.ts +12 -1
- package/js/src/bybit.js +101 -0
- package/js/src/coinbaseinternational.js +2 -2
- package/js/src/deribit.d.ts +22 -1
- package/js/src/deribit.js +155 -0
- package/js/src/gate.js +15 -4
- package/js/src/hyperliquid.d.ts +1 -0
- package/js/src/hyperliquid.js +54 -10
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/binance.js +5 -5
- package/js/src/pro/bitfinex2.js +1 -1
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bitmart.js +1 -1
- package/js/src/pro/bitmex.js +1 -1
- package/js/src/pro/bitopro.js +2 -1
- package/js/src/pro/blockchaincom.js +1 -1
- package/js/src/pro/bybit.js +16 -1
- package/js/src/pro/cex.js +9 -5
- package/js/src/pro/cryptocom.js +1 -1
- package/js/src/pro/gemini.d.ts +2 -2
- package/js/src/pro/gemini.js +3 -2
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/htx.js +1 -1
- package/js/src/pro/okcoin.js +1 -1
- package/js/src/pro/onetrading.js +1 -1
- package/js/src/pro/phemex.js +7 -2
- package/js/src/pro/woo.js +38 -0
- package/js/src/upbit.js +2 -0
- package/package.json +1 -1
- package/skip-tests.json +7 -2
package/js/src/pro/onetrading.js
CHANGED
package/js/src/pro/phemex.js
CHANGED
|
@@ -23,7 +23,11 @@ export default class phemex extends phemexRest {
|
|
|
23
23
|
'watchOrders': true,
|
|
24
24
|
'watchOrderBook': true,
|
|
25
25
|
'watchOHLCV': true,
|
|
26
|
-
'watchPositions': undefined,
|
|
26
|
+
'watchPositions': undefined,
|
|
27
|
+
// mutli-endpoints are not supported: https://github.com/ccxt/ccxt/pull/21490
|
|
28
|
+
'watchOrderBookForSymbols': false,
|
|
29
|
+
'watchTradesForSymbols': false,
|
|
30
|
+
'watchOHLCVForSymbols': false,
|
|
27
31
|
},
|
|
28
32
|
'urls': {
|
|
29
33
|
'test': {
|
|
@@ -563,9 +567,10 @@ export default class phemex extends phemexRest {
|
|
|
563
567
|
/**
|
|
564
568
|
* @method
|
|
565
569
|
* @name phemex#watchOrderBook
|
|
570
|
+
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Spot-API-en.md#subscribe-orderbook
|
|
566
571
|
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#subscribe-orderbook-for-new-model
|
|
567
572
|
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Contract-API-en.md#subscribe-30-levels-orderbook
|
|
568
|
-
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-
|
|
573
|
+
* @see https://github.com/phemex/phemex-api-docs/blob/master/Public-Contract-API-en.md#subscribe-full-orderbook
|
|
569
574
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
570
575
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
571
576
|
* @param {int} [limit] the maximum amount of order book entries to return
|
package/js/src/pro/woo.js
CHANGED
|
@@ -85,6 +85,15 @@ export default class woo extends wooRest {
|
|
|
85
85
|
return await this.watch(url, messageHash, request, messageHash, subscribe);
|
|
86
86
|
}
|
|
87
87
|
async watchOrderBook(symbol, limit = undefined, params = {}) {
|
|
88
|
+
/**
|
|
89
|
+
* @method
|
|
90
|
+
* @name woo#watchOrderBook
|
|
91
|
+
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
92
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
93
|
+
* @param {int} [limit] the maximum amount of order book entries to return.
|
|
94
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
95
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
96
|
+
*/
|
|
88
97
|
await this.loadMarkets();
|
|
89
98
|
const name = 'orderbook';
|
|
90
99
|
const market = this.market(symbol);
|
|
@@ -134,9 +143,18 @@ export default class woo extends wooRest {
|
|
|
134
143
|
client.resolve(orderbook, topic);
|
|
135
144
|
}
|
|
136
145
|
async watchTicker(symbol, params = {}) {
|
|
146
|
+
/**
|
|
147
|
+
* @method
|
|
148
|
+
* @name woo#watchTicker
|
|
149
|
+
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
150
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
151
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
152
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
153
|
+
*/
|
|
137
154
|
await this.loadMarkets();
|
|
138
155
|
const name = 'ticker';
|
|
139
156
|
const market = this.market(symbol);
|
|
157
|
+
symbol = market['symbol'];
|
|
140
158
|
const topic = market['id'] + '@' + name;
|
|
141
159
|
const request = {
|
|
142
160
|
'event': 'subscribe',
|
|
@@ -211,7 +229,16 @@ export default class woo extends wooRest {
|
|
|
211
229
|
return message;
|
|
212
230
|
}
|
|
213
231
|
async watchTickers(symbols = undefined, params = {}) {
|
|
232
|
+
/**
|
|
233
|
+
* @method
|
|
234
|
+
* @name woo#watchTickers
|
|
235
|
+
* @description n watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
236
|
+
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
237
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
238
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
239
|
+
*/
|
|
214
240
|
await this.loadMarkets();
|
|
241
|
+
symbols = this.marketSymbols(symbols);
|
|
215
242
|
const name = 'tickers';
|
|
216
243
|
const topic = name;
|
|
217
244
|
const request = {
|
|
@@ -330,8 +357,19 @@ export default class woo extends wooRest {
|
|
|
330
357
|
client.resolve(stored, topic);
|
|
331
358
|
}
|
|
332
359
|
async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
360
|
+
/**
|
|
361
|
+
* @method
|
|
362
|
+
* @name woo#watchTrades
|
|
363
|
+
* @description watches information on multiple trades made in a market
|
|
364
|
+
* @param {string} symbol unified market symbol of the market trades were made in
|
|
365
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
366
|
+
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
367
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
368
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
|
|
369
|
+
*/
|
|
333
370
|
await this.loadMarkets();
|
|
334
371
|
const market = this.market(symbol);
|
|
372
|
+
symbol = market['symbol'];
|
|
335
373
|
const topic = market['id'] + '@trade';
|
|
336
374
|
const request = {
|
|
337
375
|
'event': 'subscribe',
|
package/js/src/upbit.js
CHANGED
|
@@ -81,6 +81,7 @@ export default class upbit extends Exchange {
|
|
|
81
81
|
'1m': 'minutes',
|
|
82
82
|
'3m': 'minutes',
|
|
83
83
|
'5m': 'minutes',
|
|
84
|
+
'10m': 'minutes',
|
|
84
85
|
'15m': 'minutes',
|
|
85
86
|
'30m': 'minutes',
|
|
86
87
|
'1h': 'minutes',
|
|
@@ -110,6 +111,7 @@ export default class upbit extends Exchange {
|
|
|
110
111
|
'candles/minutes/1',
|
|
111
112
|
'candles/minutes/3',
|
|
112
113
|
'candles/minutes/5',
|
|
114
|
+
'candles/minutes/10',
|
|
113
115
|
'candles/minutes/15',
|
|
114
116
|
'candles/minutes/30',
|
|
115
117
|
'candles/minutes/60',
|
package/package.json
CHANGED
package/skip-tests.json
CHANGED
|
@@ -265,6 +265,9 @@
|
|
|
265
265
|
"watchTrades":{
|
|
266
266
|
"side": "not set https://app.travis-ci.com/github/ccxt/ccxt/builds/267900037#L4312",
|
|
267
267
|
"timestamp": "messed order coming from exchange"
|
|
268
|
+
},
|
|
269
|
+
"ohlcv": {
|
|
270
|
+
"roundTimestamp": "are not rounded: https://app.travis-ci.com/github/ccxt/ccxt/builds/269583057#L4318"
|
|
268
271
|
}
|
|
269
272
|
}
|
|
270
273
|
},
|
|
@@ -625,7 +628,7 @@
|
|
|
625
628
|
}
|
|
626
629
|
},
|
|
627
630
|
"cex": {
|
|
628
|
-
"
|
|
631
|
+
"preferredSpotSymbol": "BTC/USD",
|
|
629
632
|
"skipMethods": {
|
|
630
633
|
"proxies": "probably they do not permit our proxy location",
|
|
631
634
|
"loadMarkets": {
|
|
@@ -639,6 +642,7 @@
|
|
|
639
642
|
"deposit": "not provided",
|
|
640
643
|
"networks": "missing"
|
|
641
644
|
},
|
|
645
|
+
"watchOHLCV": "does not work for 1min",
|
|
642
646
|
"fetchOHLCV": "unexpected issue"
|
|
643
647
|
}
|
|
644
648
|
},
|
|
@@ -1394,7 +1398,8 @@
|
|
|
1394
1398
|
"loadMarkets": {
|
|
1395
1399
|
"taker": "is undefined",
|
|
1396
1400
|
"maker": "is undefined",
|
|
1397
|
-
"currencyIdAndCode": "not all currencies are available"
|
|
1401
|
+
"currencyIdAndCode": "not all currencies are available",
|
|
1402
|
+
"contractSize": "returns zero for BTC/USDT:USDT https://app.travis-ci.com/github/ccxt/ccxt/builds/269614608#L3778"
|
|
1398
1403
|
},
|
|
1399
1404
|
"fetchTrades": {
|
|
1400
1405
|
"side": "undefined"
|