ccxt 4.0.112 → 4.1.1
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 +3 -3
- package/dist/ccxt.browser.js +35 -5
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/kucoin.js +31 -1
- package/dist/cjs/src/latoken.js +1 -1
- package/dist/cjs/src/pro/okx.js +2 -2
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/kucoin.js +31 -1
- package/js/src/latoken.js +1 -1
- package/js/src/pro/okx.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -214,13 +214,13 @@ console.log(version, Object.keys(exchanges));
|
|
|
214
214
|
|
|
215
215
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
|
216
216
|
|
|
217
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.
|
|
218
|
-
* unpkg: https://unpkg.com/ccxt@4.
|
|
217
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.1/dist/ccxt.browser.js
|
|
218
|
+
* unpkg: https://unpkg.com/ccxt@4.1.1/dist/ccxt.browser.js
|
|
219
219
|
|
|
220
220
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
|
221
221
|
|
|
222
222
|
```HTML
|
|
223
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.
|
|
223
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.1/dist/ccxt.browser.js"></script>
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
Creates a global `ccxt` object:
|
package/dist/ccxt.browser.js
CHANGED
|
@@ -145799,6 +145799,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
145799
145799
|
* @method
|
|
145800
145800
|
* @name kucoin#fetchTime
|
|
145801
145801
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
145802
|
+
* @see https://docs.kucoin.com/#server-time
|
|
145802
145803
|
* @param {object} [params] extra parameters specific to the kucoin api endpoint
|
|
145803
145804
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
145804
145805
|
*/
|
|
@@ -145817,6 +145818,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
145817
145818
|
* @method
|
|
145818
145819
|
* @name kucoin#fetchStatus
|
|
145819
145820
|
* @description the latest known information on the availability of the exchange API
|
|
145821
|
+
* @see https://docs.kucoin.com/#service-status
|
|
145820
145822
|
* @param {object} [params] extra parameters specific to the kucoin api endpoint
|
|
145821
145823
|
* @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
|
|
145822
145824
|
*/
|
|
@@ -145845,6 +145847,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
145845
145847
|
* @method
|
|
145846
145848
|
* @name kucoin#fetchMarkets
|
|
145847
145849
|
* @description retrieves data on all markets for kucoin
|
|
145850
|
+
* @see https://docs.kucoin.com/#get-symbols-list-deprecated
|
|
145851
|
+
* @see https://docs.kucoin.com/#get-all-tickers
|
|
145848
145852
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
145849
145853
|
* @returns {object[]} an array of objects representing market data
|
|
145850
145854
|
*/
|
|
@@ -145983,6 +145987,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
145983
145987
|
* @method
|
|
145984
145988
|
* @name kucoin#fetchCurrencies
|
|
145985
145989
|
* @description fetches all available currencies on an exchange
|
|
145990
|
+
* @see https://docs.kucoin.com/#get-currencies
|
|
145986
145991
|
* @param {object} params extra parameters specific to the kucoin api endpoint
|
|
145987
145992
|
* @returns {object} an associative dictionary of currencies
|
|
145988
145993
|
*/
|
|
@@ -146080,7 +146085,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
146080
146085
|
}
|
|
146081
146086
|
for (let j = 0; j < chainsLength; j++) {
|
|
146082
146087
|
const chain = chains[j];
|
|
146083
|
-
const chainId = this.safeString(chain, '
|
|
146088
|
+
const chainId = this.safeString(chain, 'chainId');
|
|
146084
146089
|
const networkCode = this.networkIdToCode(chainId);
|
|
146085
146090
|
const chainWithdrawEnabled = this.safeValue(chain, 'isWithdrawEnabled', false);
|
|
146086
146091
|
if (isWithdrawEnabled === undefined) {
|
|
@@ -146143,6 +146148,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
146143
146148
|
* @method
|
|
146144
146149
|
* @name kucoin#fetchAccounts
|
|
146145
146150
|
* @description fetch all the accounts associated with a profile
|
|
146151
|
+
* @see https://docs.kucoin.com/#list-accounts
|
|
146146
146152
|
* @param {object} [params] extra parameters specific to the kucoin api endpoint
|
|
146147
146153
|
* @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
|
|
146148
146154
|
*/
|
|
@@ -146420,6 +146426,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
146420
146426
|
* @method
|
|
146421
146427
|
* @name kucoin#fetchTickers
|
|
146422
146428
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
146429
|
+
* @see https://docs.kucoin.com/#get-all-tickers
|
|
146423
146430
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
146424
146431
|
* @param {object} [params] extra parameters specific to the kucoin api endpoint
|
|
146425
146432
|
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
@@ -146474,6 +146481,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
146474
146481
|
* @method
|
|
146475
146482
|
* @name kucoin#fetchTicker
|
|
146476
146483
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
146484
|
+
* @see https://docs.kucoin.com/#get-24hr-stats
|
|
146477
146485
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
146478
146486
|
* @param {object} [params] extra parameters specific to the kucoin api endpoint
|
|
146479
146487
|
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
@@ -146535,6 +146543,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
146535
146543
|
* @method
|
|
146536
146544
|
* @name kucoin#fetchOHLCV
|
|
146537
146545
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
146546
|
+
* @see https://docs.kucoin.com/#get-klines
|
|
146538
146547
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
146539
146548
|
* @param {string} timeframe the length of time each candle represents
|
|
146540
146549
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -146614,6 +146623,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
146614
146623
|
* @method
|
|
146615
146624
|
* @name kucoin#fetchDepositAddress
|
|
146616
146625
|
* @description fetch the deposit address for a currency associated with this account
|
|
146626
|
+
* @see https://docs.kucoin.com/#get-deposit-addresses-v2
|
|
146617
146627
|
* @param {string} code unified currency code
|
|
146618
146628
|
* @param {object} [params] extra parameters specific to the kucoin api endpoint
|
|
146619
146629
|
* @param {string} [params.network] the blockchain network name
|
|
@@ -146711,6 +146721,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
146711
146721
|
* @method
|
|
146712
146722
|
* @name kucoin#fetchOrderBook
|
|
146713
146723
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
146724
|
+
* @see https://docs.kucoin.com/#get-part-order-book-aggregated
|
|
146725
|
+
* @see https://docs.kucoin.com/#get-full-order-book-aggregated
|
|
146714
146726
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
146715
146727
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
146716
146728
|
* @param {object} [params] extra parameters specific to the kucoin api endpoint
|
|
@@ -147181,6 +147193,10 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147181
147193
|
* @method
|
|
147182
147194
|
* @name kucoin#fetchClosedOrders
|
|
147183
147195
|
* @description fetches information on multiple closed orders made by the user
|
|
147196
|
+
* @see https://docs.kucoin.com/spot#list-orders
|
|
147197
|
+
* @see https://docs.kucoin.com/spot#list-stop-orders
|
|
147198
|
+
* @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
|
|
147199
|
+
* @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
|
|
147184
147200
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
147185
147201
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
147186
147202
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
@@ -147200,6 +147216,10 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147200
147216
|
* @method
|
|
147201
147217
|
* @name kucoin#fetchOpenOrders
|
|
147202
147218
|
* @description fetch all unfilled currently open orders
|
|
147219
|
+
* @see https://docs.kucoin.com/spot#list-orders
|
|
147220
|
+
* @see https://docs.kucoin.com/spot#list-stop-orders
|
|
147221
|
+
* @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
|
|
147222
|
+
* @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
|
|
147203
147223
|
* @param {string} symbol unified market symbol
|
|
147204
147224
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
147205
147225
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -147476,6 +147496,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147476
147496
|
* @method
|
|
147477
147497
|
* @name kucoin#fetchOrderTrades
|
|
147478
147498
|
* @description fetch all the trades made from a single order
|
|
147499
|
+
* @see https://docs.kucoin.com/#list-fills
|
|
147500
|
+
* @see https://docs.kucoin.com/spot-hf/#transaction-details
|
|
147479
147501
|
* @param {string} id order id
|
|
147480
147502
|
* @param {string} symbol unified market symbol
|
|
147481
147503
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -147601,6 +147623,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147601
147623
|
* @method
|
|
147602
147624
|
* @name kucoin#fetchTrades
|
|
147603
147625
|
* @description get the list of most recent trades for a particular symbol
|
|
147626
|
+
* @see https://docs.kucoin.com/#get-trade-histories
|
|
147604
147627
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
147605
147628
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
147606
147629
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -147773,6 +147796,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147773
147796
|
* @method
|
|
147774
147797
|
* @name kucoin#fetchTradingFee
|
|
147775
147798
|
* @description fetch the trading fees for a market
|
|
147799
|
+
* @see https://docs.kucoin.com/#actual-fee-rate-of-the-trading-pair
|
|
147776
147800
|
* @param {string} symbol unified market symbol
|
|
147777
147801
|
* @param {object} [params] extra parameters specific to the kucoin api endpoint
|
|
147778
147802
|
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
@@ -147812,6 +147836,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147812
147836
|
* @method
|
|
147813
147837
|
* @name kucoin#withdraw
|
|
147814
147838
|
* @description make a withdrawal
|
|
147839
|
+
* @see https://docs.kucoin.com/#apply-withdraw-2
|
|
147815
147840
|
* @param {string} code unified currency code
|
|
147816
147841
|
* @param {float} amount the amount to withdraw
|
|
147817
147842
|
* @param {string} address the address to withdraw to
|
|
@@ -147984,6 +148009,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
147984
148009
|
* @method
|
|
147985
148010
|
* @name kucoin#fetchDeposits
|
|
147986
148011
|
* @description fetch all deposits made to an account
|
|
148012
|
+
* @see https://docs.kucoin.com/#get-deposit-list
|
|
148013
|
+
* @see https://docs.kucoin.com/#get-v1-historical-deposits-list
|
|
147987
148014
|
* @param {string} code unified currency code
|
|
147988
148015
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
147989
148016
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -148058,6 +148085,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
148058
148085
|
* @method
|
|
148059
148086
|
* @name kucoin#fetchWithdrawals
|
|
148060
148087
|
* @description fetch all withdrawals made from an account
|
|
148088
|
+
* @see https://docs.kucoin.com/#get-withdrawals-list
|
|
148089
|
+
* @see https://docs.kucoin.com/#get-v1-historical-withdrawals-list
|
|
148061
148090
|
* @param {string} code unified currency code
|
|
148062
148091
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
148063
148092
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -148572,6 +148601,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
148572
148601
|
* @method
|
|
148573
148602
|
* @name kucoin#fetchLedger
|
|
148574
148603
|
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
148604
|
+
* @see https://docs.kucoin.com/#get-account-ledgers
|
|
148575
148605
|
* @param {string} code unified currency code, default is undefined
|
|
148576
148606
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
148577
148607
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
@@ -152476,9 +152506,9 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
152476
152506
|
'cancelOrder': true,
|
|
152477
152507
|
'createOrder': true,
|
|
152478
152508
|
'createPostOnlyOrder': false,
|
|
152479
|
-
'createStopOrder': true,
|
|
152480
152509
|
'createStopLimitOrder': true,
|
|
152481
152510
|
'createStopMarketOrder': false,
|
|
152511
|
+
'createStopOrder': true,
|
|
152482
152512
|
'fetchBalance': true,
|
|
152483
152513
|
'fetchBorrowRate': false,
|
|
152484
152514
|
'fetchBorrowRateHistories': false,
|
|
@@ -230498,8 +230528,8 @@ class okx extends _okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230498
230528
|
// filter orders with no last trade id
|
|
230499
230529
|
for (let i = 0; i < rawOrders.length; i++) {
|
|
230500
230530
|
const rawOrder = rawOrders[i];
|
|
230501
|
-
const tradeId = this.safeString(rawOrder, 'tradeId');
|
|
230502
|
-
if (
|
|
230531
|
+
const tradeId = this.safeString(rawOrder, 'tradeId', '');
|
|
230532
|
+
if (tradeId.length > 0) {
|
|
230503
230533
|
const order = this.parseOrder(rawOrder);
|
|
230504
230534
|
filteredOrders.push(order);
|
|
230505
230535
|
}
|
|
@@ -273577,7 +273607,7 @@ SOFTWARE.
|
|
|
273577
273607
|
|
|
273578
273608
|
//-----------------------------------------------------------------------------
|
|
273579
273609
|
// this is updated by vss.js when building
|
|
273580
|
-
const version = '4.
|
|
273610
|
+
const version = '4.1.1';
|
|
273581
273611
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
273582
273612
|
//-----------------------------------------------------------------------------
|
|
273583
273613
|
|