ccxt 4.0.101 → 4.0.103
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 -6
- package/dist/ccxt.browser.js +1130 -2730
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +2 -4
- package/dist/cjs/src/base/errors.js +2 -1
- package/dist/cjs/src/binance.js +8 -0
- package/dist/cjs/src/bingx.js +111 -4
- package/dist/cjs/src/bitget.js +3 -0
- package/dist/cjs/src/bitmart.js +271 -46
- package/dist/cjs/src/bitrue.js +7 -0
- package/dist/cjs/src/bl3p.js +8 -0
- package/dist/cjs/src/bybit.js +79 -55
- package/dist/cjs/src/gate.js +221 -218
- package/dist/cjs/src/gemini.js +1 -0
- package/dist/cjs/src/pro/binance.js +7 -7
- package/dist/cjs/src/pro/bybit.js +18 -17
- package/dist/cjs/src/pro/coinbasepro.js +10 -10
- package/dist/cjs/src/pro/kucoin.js +3 -3
- package/dist/cjs/src/wavesexchange.js +2 -1
- package/js/ccxt.d.ts +3 -6
- package/js/ccxt.js +3 -5
- package/js/src/abstract/binance.d.ts +8 -0
- package/js/src/abstract/binancecoinm.d.ts +8 -0
- package/js/src/abstract/binanceus.d.ts +8 -0
- package/js/src/abstract/binanceusdm.d.ts +8 -0
- package/js/src/abstract/bingx.d.ts +16 -1
- package/js/src/base/errorHierarchy.d.ts +1 -0
- package/js/src/base/errorHierarchy.js +1 -0
- package/js/src/base/errors.d.ts +2 -1
- package/js/src/base/errors.js +2 -2
- package/js/src/binance.js +8 -0
- package/js/src/bingx.d.ts +8 -0
- package/js/src/bingx.js +111 -4
- package/js/src/bitget.js +3 -0
- package/js/src/bitmart.d.ts +46 -5
- package/js/src/bitmart.js +271 -46
- package/js/src/bitrue.js +7 -0
- package/js/src/bl3p.js +8 -0
- package/js/src/bybit.js +80 -56
- package/js/src/gate.js +221 -218
- package/js/src/gemini.js +1 -0
- package/js/src/pro/binance.js +7 -7
- package/js/src/pro/bybit.js +18 -17
- package/js/src/pro/coinbasepro.js +10 -10
- package/js/src/pro/kucoin.js +3 -3
- package/js/src/wavesexchange.js +2 -1
- package/package.json +1 -1
- package/skip-tests.json +5 -7
- package/js/src/abstract/bkex.d.ts +0 -61
- package/js/src/abstract/bkex.js +0 -11
package/dist/ccxt.browser.js
CHANGED
|
@@ -400,22 +400,6 @@ class Exchange extends _base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchang
|
|
|
400
400
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Exchange);
|
|
401
401
|
|
|
402
402
|
|
|
403
|
-
/***/ }),
|
|
404
|
-
|
|
405
|
-
/***/ 5569:
|
|
406
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
407
|
-
|
|
408
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
409
|
-
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
410
|
-
/* harmony export */ });
|
|
411
|
-
/* harmony import */ var _base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
412
|
-
// -------------------------------------------------------------------------------
|
|
413
|
-
|
|
414
|
-
class Exchange extends _base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e {
|
|
415
|
-
}
|
|
416
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Exchange);
|
|
417
|
-
|
|
418
|
-
|
|
419
403
|
/***/ }),
|
|
420
404
|
|
|
421
405
|
/***/ 858:
|
|
@@ -10922,6 +10906,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10922
10906
|
/* harmony export */ "InvalidOrder": () => (/* binding */ InvalidOrder),
|
|
10923
10907
|
/* harmony export */ "MarginModeAlreadySet": () => (/* binding */ MarginModeAlreadySet),
|
|
10924
10908
|
/* harmony export */ "NetworkError": () => (/* binding */ NetworkError),
|
|
10909
|
+
/* harmony export */ "NoChange": () => (/* binding */ NoChange),
|
|
10925
10910
|
/* harmony export */ "NotSupported": () => (/* binding */ NotSupported),
|
|
10926
10911
|
/* harmony export */ "NullResponse": () => (/* binding */ NullResponse),
|
|
10927
10912
|
/* harmony export */ "OnMaintenance": () => (/* binding */ OnMaintenance),
|
|
@@ -11166,7 +11151,7 @@ class RequestTimeout extends NetworkError {
|
|
|
11166
11151
|
// // Derived class hierarchy
|
|
11167
11152
|
// errorHierarchy
|
|
11168
11153
|
// )
|
|
11169
|
-
const errors = { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, ContractUnavailable };
|
|
11154
|
+
const errors = { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, ContractUnavailable, NoChange };
|
|
11170
11155
|
|
|
11171
11156
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (errors);
|
|
11172
11157
|
|
|
@@ -16075,6 +16060,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16075
16060
|
'portfolio/interest-history': 0.6667,
|
|
16076
16061
|
'portfolio/asset-index-price': 0.1,
|
|
16077
16062
|
'portfolio/repay-futures-switch': 3,
|
|
16063
|
+
'portfolio/margin-asset-leverage': 5,
|
|
16078
16064
|
// staking
|
|
16079
16065
|
'staking/productList': 0.1,
|
|
16080
16066
|
'staking/position': 0.1,
|
|
@@ -16087,6 +16073,11 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16087
16073
|
'lending/auto-invest/plan/list': 0.1,
|
|
16088
16074
|
'lending/auto-invest/plan/id': 0.1,
|
|
16089
16075
|
'lending/auto-invest/history/list': 0.1,
|
|
16076
|
+
'lending/auto-invest/index/info': 0.1,
|
|
16077
|
+
'lending/auto-invest/index/user-summary': 0.1,
|
|
16078
|
+
'lending/auto-invest/one-off/status': 0.1,
|
|
16079
|
+
'lending/auto-invest/redeem/history': 0.1,
|
|
16080
|
+
'lending/auto-invest/rebalance/history': 0.1,
|
|
16090
16081
|
// simple earn
|
|
16091
16082
|
'simple-earn/flexible/list': 15,
|
|
16092
16083
|
'simple-earn/locked/list': 15,
|
|
@@ -16214,6 +16205,8 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16214
16205
|
'lending/auto-invest/plan/add': 0.1,
|
|
16215
16206
|
'lending/auto-invest/plan/edit': 0.1,
|
|
16216
16207
|
'lending/auto-invest/plan/edit-status': 0.1,
|
|
16208
|
+
'lending/auto-invest/one-off': 0.1,
|
|
16209
|
+
'lending/auto-invest/redeem': 0.1,
|
|
16217
16210
|
// simple earn
|
|
16218
16211
|
'simple-earn/flexible/subscribe': 0.1,
|
|
16219
16212
|
'simple-earn/locked/subscribe': 0.1,
|
|
@@ -24781,6 +24774,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
24781
24774
|
'fetchBalance': true,
|
|
24782
24775
|
'fetchClosedOrders': true,
|
|
24783
24776
|
'fetchCurrencies': true,
|
|
24777
|
+
'fetchDepositAddress': true,
|
|
24784
24778
|
'fetchDeposits': true,
|
|
24785
24779
|
'fetchDepositWithdrawFee': 'emulated',
|
|
24786
24780
|
'fetchDepositWithdrawFees': true,
|
|
@@ -24884,6 +24878,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
24884
24878
|
'quote/klines': 1,
|
|
24885
24879
|
'quote/openInterest': 1,
|
|
24886
24880
|
'quote/ticker': 1,
|
|
24881
|
+
'quote/bookTicker': 1,
|
|
24887
24882
|
},
|
|
24888
24883
|
},
|
|
24889
24884
|
'private': {
|
|
@@ -24935,11 +24930,17 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
24935
24930
|
'private': {
|
|
24936
24931
|
'get': {
|
|
24937
24932
|
'capital/config/getall': 3,
|
|
24933
|
+
'capital/deposit/address': 1,
|
|
24934
|
+
'capital/innerTransfer/records': 1,
|
|
24935
|
+
'capital/subAccount/deposit/address': 1,
|
|
24936
|
+
'capital/deposit/subHisrec': 1,
|
|
24937
|
+
'capital/subAccount/innerTransfer/records': 1,
|
|
24938
24938
|
},
|
|
24939
24939
|
'post': {
|
|
24940
24940
|
'capital/withdraw/apply': 3,
|
|
24941
24941
|
'capital/innerTransfer/apply': 3,
|
|
24942
24942
|
'capital/subAccountInnerTransfer/apply': 3,
|
|
24943
|
+
'capital/deposit/createSubAddress': 1,
|
|
24943
24944
|
},
|
|
24944
24945
|
},
|
|
24945
24946
|
},
|
|
@@ -24950,6 +24951,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
24950
24951
|
'get': {
|
|
24951
24952
|
'list': 3,
|
|
24952
24953
|
'assets': 3,
|
|
24954
|
+
'apiKey/query': 1,
|
|
24953
24955
|
},
|
|
24954
24956
|
'post': {
|
|
24955
24957
|
'create': 3,
|
|
@@ -24964,13 +24966,42 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
24964
24966
|
'account': {
|
|
24965
24967
|
'v1': {
|
|
24966
24968
|
'private': {
|
|
24969
|
+
'get': {
|
|
24970
|
+
'uid': 1,
|
|
24971
|
+
},
|
|
24967
24972
|
'post': {
|
|
24968
|
-
'uid': 3,
|
|
24969
24973
|
'innerTransfer/authorizeSubAccount': 3,
|
|
24970
24974
|
},
|
|
24971
24975
|
},
|
|
24972
24976
|
},
|
|
24973
24977
|
},
|
|
24978
|
+
'copyTrading': {
|
|
24979
|
+
'v1': {
|
|
24980
|
+
'private': {
|
|
24981
|
+
'get': {
|
|
24982
|
+
'swap/trace/currentTrack': 1,
|
|
24983
|
+
},
|
|
24984
|
+
'post': {
|
|
24985
|
+
'swap/trace/closeTrackOrder': 1,
|
|
24986
|
+
'swap/trace/setTPSL': 1,
|
|
24987
|
+
},
|
|
24988
|
+
},
|
|
24989
|
+
},
|
|
24990
|
+
},
|
|
24991
|
+
'api': {
|
|
24992
|
+
'v3': {
|
|
24993
|
+
'private': {
|
|
24994
|
+
'get': {
|
|
24995
|
+
'asset/transfer': 1,
|
|
24996
|
+
'capital/deposit/hisrec': 1,
|
|
24997
|
+
'capital/withdraw/history': 1,
|
|
24998
|
+
},
|
|
24999
|
+
'post': {
|
|
25000
|
+
'post/asset/transfer': 1,
|
|
25001
|
+
},
|
|
25002
|
+
},
|
|
25003
|
+
},
|
|
25004
|
+
},
|
|
24974
25005
|
},
|
|
24975
25006
|
'timeframes': {
|
|
24976
25007
|
'1m': '1m',
|
|
@@ -25030,6 +25061,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
25030
25061
|
'PFUTURES': 'swap',
|
|
25031
25062
|
'SFUTURES': 'future',
|
|
25032
25063
|
},
|
|
25064
|
+
'recvWindow': 5 * 1000, // 5 sec
|
|
25033
25065
|
},
|
|
25034
25066
|
});
|
|
25035
25067
|
}
|
|
@@ -26234,9 +26266,9 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
26234
26266
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
26235
26267
|
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
26236
26268
|
* @param {bool} [params.postOnly] true to place a post only order
|
|
26237
|
-
* @param {
|
|
26238
|
-
* @param {float} [params.stopLossPrice] stop loss trigger price
|
|
26239
|
-
* @param {float} [params.takeProfitPrice] take profit trigger price
|
|
26269
|
+
* @param {float} [params.triggerPrice] *swap only* triggerPrice at which the attached take profit / stop loss order will be triggered
|
|
26270
|
+
* @param {float} [params.stopLossPrice] *swap only* stop loss trigger price
|
|
26271
|
+
* @param {float} [params.takeProfitPrice] *swap only* take profit trigger price
|
|
26240
26272
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
26241
26273
|
*/
|
|
26242
26274
|
await this.loadMarkets();
|
|
@@ -27090,6 +27122,74 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
27090
27122
|
'status': status,
|
|
27091
27123
|
};
|
|
27092
27124
|
}
|
|
27125
|
+
async fetchDepositAddress(code, params = {}) {
|
|
27126
|
+
/**
|
|
27127
|
+
* @method
|
|
27128
|
+
* @name bingx#fetchDepositAddress
|
|
27129
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
27130
|
+
* @see https://bingx-api.github.io/docs/#/common/sub-account#Query%20Main%20Account%20Deposit%20Address
|
|
27131
|
+
* @param {string} code unified currency code
|
|
27132
|
+
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
27133
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
27134
|
+
*/
|
|
27135
|
+
await this.loadMarkets();
|
|
27136
|
+
const currency = this.currency(code);
|
|
27137
|
+
const defaultRecvWindow = this.safeInteger(this.options, 'recvWindow');
|
|
27138
|
+
const recvWindow = this.safeInteger(this.parseParams, 'recvWindow', defaultRecvWindow);
|
|
27139
|
+
const request = {
|
|
27140
|
+
'coin': currency['id'],
|
|
27141
|
+
'offset': 0,
|
|
27142
|
+
'limit': 1000,
|
|
27143
|
+
'recvWindow': recvWindow,
|
|
27144
|
+
};
|
|
27145
|
+
const response = await this.walletsV1PrivateGetCapitalDepositAddress(this.extend(request, params));
|
|
27146
|
+
//
|
|
27147
|
+
// {
|
|
27148
|
+
// code: '0',
|
|
27149
|
+
// timestamp: '1695200226859',
|
|
27150
|
+
// data: {
|
|
27151
|
+
// data: [
|
|
27152
|
+
// {
|
|
27153
|
+
// coinId: '799',
|
|
27154
|
+
// coin: 'USDT',
|
|
27155
|
+
// network: 'BEP20',
|
|
27156
|
+
// address: '6a7eda2817462dabb6493277a2cfe0f5c3f2550b',
|
|
27157
|
+
// tag: ''
|
|
27158
|
+
// }
|
|
27159
|
+
// ],
|
|
27160
|
+
// total: '1'
|
|
27161
|
+
// }
|
|
27162
|
+
// }
|
|
27163
|
+
//
|
|
27164
|
+
const data = this.safeValue(this.safeValue(response, 'data'), 'data');
|
|
27165
|
+
const parsed = this.parseDepositAddresses(data, [currency['code']], false);
|
|
27166
|
+
return this.indexBy(parsed, 'network');
|
|
27167
|
+
}
|
|
27168
|
+
parseDepositAddress(depositAddress, currency = undefined) {
|
|
27169
|
+
//
|
|
27170
|
+
// {
|
|
27171
|
+
// coinId: '799',
|
|
27172
|
+
// coin: 'USDT',
|
|
27173
|
+
// network: 'BEP20',
|
|
27174
|
+
// address: '6a7eda2817462dabb6493277a2cfe0f5c3f2550b',
|
|
27175
|
+
// tag: ''
|
|
27176
|
+
// }
|
|
27177
|
+
//
|
|
27178
|
+
const address = this.safeString(depositAddress, 'address');
|
|
27179
|
+
const tag = this.safeString(depositAddress, 'tag');
|
|
27180
|
+
const currencyId = this.safeString(depositAddress, 'coin');
|
|
27181
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
27182
|
+
const code = currency['code'];
|
|
27183
|
+
const network = this.safeString(depositAddress, 'network');
|
|
27184
|
+
this.checkAddress(address);
|
|
27185
|
+
return {
|
|
27186
|
+
'currency': code,
|
|
27187
|
+
'address': address,
|
|
27188
|
+
'tag': tag,
|
|
27189
|
+
'network': network,
|
|
27190
|
+
'info': depositAddress,
|
|
27191
|
+
};
|
|
27192
|
+
}
|
|
27093
27193
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
27094
27194
|
/**
|
|
27095
27195
|
* @method
|
|
@@ -39864,6 +39964,9 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39864
39964
|
response = await this.publicMixGetMarketHistoryCandles(this.extend(request, params));
|
|
39865
39965
|
}
|
|
39866
39966
|
}
|
|
39967
|
+
if (response === '') {
|
|
39968
|
+
return []; // happens when a new token is listed
|
|
39969
|
+
}
|
|
39867
39970
|
// [ ["1645911960000","39406","39407","39374.5","39379","35.526","1399132.341"] ]
|
|
39868
39971
|
const data = this.safeValue(response, 'data', response);
|
|
39869
39972
|
return this.parseOHLCVs(data, market, timeframe, since, limit);
|
|
@@ -43576,6 +43679,9 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
43576
43679
|
'fetchDepositWithdrawFee': true,
|
|
43577
43680
|
'fetchDepositWithdrawFees': false,
|
|
43578
43681
|
'fetchFundingHistory': undefined,
|
|
43682
|
+
'fetchFundingRate': true,
|
|
43683
|
+
'fetchFundingRateHistory': false,
|
|
43684
|
+
'fetchFundingRates': false,
|
|
43579
43685
|
'fetchMarginMode': false,
|
|
43580
43686
|
'fetchMarkets': true,
|
|
43581
43687
|
'fetchMyTrades': true,
|
|
@@ -43598,7 +43704,7 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
43598
43704
|
'fetchTransactionFee': true,
|
|
43599
43705
|
'fetchTransactionFees': false,
|
|
43600
43706
|
'fetchTransfer': false,
|
|
43601
|
-
'fetchTransfers':
|
|
43707
|
+
'fetchTransfers': true,
|
|
43602
43708
|
'fetchWithdrawAddressesByNetwork': false,
|
|
43603
43709
|
'fetchWithdrawal': true,
|
|
43604
43710
|
'fetchWithdrawals': true,
|
|
@@ -44082,6 +44188,7 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
44082
44188
|
},
|
|
44083
44189
|
'accountsByType': {
|
|
44084
44190
|
'spot': 'spot',
|
|
44191
|
+
'swap': 'swap',
|
|
44085
44192
|
},
|
|
44086
44193
|
'createMarketBuyOrderRequiresPrice': true,
|
|
44087
44194
|
},
|
|
@@ -44741,6 +44848,8 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
44741
44848
|
* @method
|
|
44742
44849
|
* @name bitmart#fetchOrderBook
|
|
44743
44850
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
44851
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-depth-v3
|
|
44852
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-market-depth
|
|
44744
44853
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
44745
44854
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
44746
44855
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
@@ -44748,41 +44857,70 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
44748
44857
|
*/
|
|
44749
44858
|
await this.loadMarkets();
|
|
44750
44859
|
const market = this.market(symbol);
|
|
44751
|
-
if (!market['spot']) {
|
|
44752
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchOrderBook() does not support ' + market['type'] + ' markets, only spot markets are accepted');
|
|
44753
|
-
}
|
|
44754
44860
|
const request = {
|
|
44755
44861
|
'symbol': market['id'],
|
|
44756
44862
|
};
|
|
44757
|
-
|
|
44758
|
-
|
|
44863
|
+
let response = undefined;
|
|
44864
|
+
if (market['spot']) {
|
|
44865
|
+
if (limit !== undefined) {
|
|
44866
|
+
request['limit'] = limit; // default 35, max 50
|
|
44867
|
+
}
|
|
44868
|
+
response = await this.publicGetSpotQuotationV3Books(this.extend(request, params));
|
|
44869
|
+
}
|
|
44870
|
+
else if (market['swap']) {
|
|
44871
|
+
response = await this.publicGetContractPublicDepth(this.extend(request, params));
|
|
44872
|
+
}
|
|
44873
|
+
else {
|
|
44874
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchOrderBook() does not support ' + market['type'] + ' markets, only spot and swap markets are accepted');
|
|
44759
44875
|
}
|
|
44760
|
-
// request['precision'] = 4; // optional price precision / depth level whose range is defined in symbol details
|
|
44761
|
-
const response = await this.publicGetSpotV1SymbolsBook(this.extend(request, params));
|
|
44762
44876
|
//
|
|
44763
44877
|
// spot
|
|
44764
44878
|
//
|
|
44765
44879
|
// {
|
|
44766
|
-
// "
|
|
44767
|
-
// "
|
|
44768
|
-
// "
|
|
44769
|
-
//
|
|
44770
|
-
// "
|
|
44771
|
-
//
|
|
44772
|
-
//
|
|
44773
|
-
//
|
|
44880
|
+
// "code": 1000,
|
|
44881
|
+
// "message": "success",
|
|
44882
|
+
// "data": {
|
|
44883
|
+
// "ts": "1695264191808",
|
|
44884
|
+
// "symbol": "BTC_USDT",
|
|
44885
|
+
// "asks": [
|
|
44886
|
+
// ["26942.57","0.06492"],
|
|
44887
|
+
// ["26942.73","0.05447"],
|
|
44888
|
+
// ["26943.00","0.07154"]
|
|
44774
44889
|
// ],
|
|
44775
|
-
// "
|
|
44776
|
-
//
|
|
44777
|
-
//
|
|
44778
|
-
//
|
|
44890
|
+
// "bids": [
|
|
44891
|
+
// ["26942.45","0.00074"],
|
|
44892
|
+
// ["26941.53","0.00371"],
|
|
44893
|
+
// ["26940.94","0.08992"]
|
|
44779
44894
|
// ]
|
|
44780
|
-
// }
|
|
44895
|
+
// },
|
|
44896
|
+
// "trace": "430a7f69581d4258a8e4b424dfb10782.73.16952341919017619"
|
|
44897
|
+
// }
|
|
44898
|
+
//
|
|
44899
|
+
// swap
|
|
44900
|
+
//
|
|
44901
|
+
// {
|
|
44902
|
+
// "code": 1000,
|
|
44903
|
+
// "message": "Ok",
|
|
44904
|
+
// "data": {
|
|
44905
|
+
// "asks": [
|
|
44906
|
+
// ["26938.3","3499","3499"],
|
|
44907
|
+
// ["26938.5","14702","18201"],
|
|
44908
|
+
// ["26938.6","20457","38658"]
|
|
44909
|
+
// ],
|
|
44910
|
+
// "bids": [
|
|
44911
|
+
// ["26938.2","20","20"],
|
|
44912
|
+
// ["26937.9","1913","1933"],
|
|
44913
|
+
// ["26937.8","2588","4521"]
|
|
44914
|
+
// ],
|
|
44915
|
+
// "timestamp": 1695264383999,
|
|
44916
|
+
// "symbol": "BTCUSDT"
|
|
44917
|
+
// },
|
|
44918
|
+
// "trace": "4cad855074664097ac6ba5258c47305d.72.16952643834721135"
|
|
44781
44919
|
// }
|
|
44782
44920
|
//
|
|
44783
44921
|
const data = this.safeValue(response, 'data', {});
|
|
44784
|
-
const timestamp = this.
|
|
44785
|
-
return this.parseOrderBook(data, symbol, timestamp
|
|
44922
|
+
const timestamp = this.safeInteger2(data, 'ts', 'timestamp');
|
|
44923
|
+
return this.parseOrderBook(data, market['symbol'], timestamp);
|
|
44786
44924
|
}
|
|
44787
44925
|
parseTrade(trade, market = undefined) {
|
|
44788
44926
|
//
|
|
@@ -46529,7 +46667,8 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46529
46667
|
* @method
|
|
46530
46668
|
* @name bitmart#transfer
|
|
46531
46669
|
* @description transfer currency internally between wallets on the same account, currently only supports transfer between spot and margin
|
|
46532
|
-
* @see https://developer-pro.bitmart.com/en/spot/#margin-asset-transfer
|
|
46670
|
+
* @see https://developer-pro.bitmart.com/en/spot/#margin-asset-transfer-signed
|
|
46671
|
+
* @see https://developer-pro.bitmart.com/en/futures/#transfer-signed
|
|
46533
46672
|
* @param {string} code unified currency code
|
|
46534
46673
|
* @param {float} amount amount to transfer
|
|
46535
46674
|
* @param {string} fromAccount account to transfer from
|
|
@@ -46547,17 +46686,35 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46547
46686
|
const fromId = this.convertTypeToAccount(fromAccount);
|
|
46548
46687
|
const toId = this.convertTypeToAccount(toAccount);
|
|
46549
46688
|
if (fromAccount === 'spot') {
|
|
46550
|
-
|
|
46551
|
-
|
|
46689
|
+
if (toAccount === 'margin') {
|
|
46690
|
+
request['side'] = 'in';
|
|
46691
|
+
request['symbol'] = toId;
|
|
46692
|
+
}
|
|
46693
|
+
else if (toAccount === 'swap') {
|
|
46694
|
+
request['type'] = 'spot_to_contract';
|
|
46695
|
+
}
|
|
46552
46696
|
}
|
|
46553
46697
|
else if (toAccount === 'spot') {
|
|
46554
|
-
|
|
46555
|
-
|
|
46698
|
+
if (fromAccount === 'margin') {
|
|
46699
|
+
request['side'] = 'out';
|
|
46700
|
+
request['symbol'] = fromId;
|
|
46701
|
+
}
|
|
46702
|
+
else if (fromAccount === 'swap') {
|
|
46703
|
+
request['type'] = 'contract_to_spot';
|
|
46704
|
+
}
|
|
46556
46705
|
}
|
|
46557
46706
|
else {
|
|
46558
46707
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' transfer() requires either fromAccount or toAccount to be spot');
|
|
46559
46708
|
}
|
|
46560
|
-
|
|
46709
|
+
let response = undefined;
|
|
46710
|
+
if ((fromAccount === 'margin') || (toAccount === 'margin')) {
|
|
46711
|
+
response = await this.privatePostSpotV1MarginIsolatedTransfer(this.extend(request, params));
|
|
46712
|
+
}
|
|
46713
|
+
else if ((fromAccount === 'swap') || (toAccount === 'swap')) {
|
|
46714
|
+
response = await this.privatePostAccountV1TransferContract(this.extend(request, params));
|
|
46715
|
+
}
|
|
46716
|
+
//
|
|
46717
|
+
// margin
|
|
46561
46718
|
//
|
|
46562
46719
|
// {
|
|
46563
46720
|
// "message": "OK",
|
|
@@ -46568,41 +46725,146 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46568
46725
|
// }
|
|
46569
46726
|
// }
|
|
46570
46727
|
//
|
|
46571
|
-
|
|
46572
|
-
|
|
46573
|
-
|
|
46574
|
-
|
|
46728
|
+
// swap
|
|
46729
|
+
//
|
|
46730
|
+
// {
|
|
46731
|
+
// "message": "OK",
|
|
46732
|
+
// "code": 1000,
|
|
46733
|
+
// "trace": "4cad858074667097ac6ba5257c57305d.68.16953302431189455",
|
|
46734
|
+
// "data": {
|
|
46735
|
+
// "currency": "USDT",
|
|
46736
|
+
// "amount": "5"
|
|
46737
|
+
// }
|
|
46738
|
+
// }
|
|
46739
|
+
//
|
|
46740
|
+
const data = this.safeValue(response, 'data', {});
|
|
46741
|
+
return this.extend(this.parseTransfer(data, currency), {
|
|
46742
|
+
'status': this.parseTransferStatus(this.safeString2(response, 'code', 'message')),
|
|
46575
46743
|
});
|
|
46576
46744
|
}
|
|
46577
46745
|
parseTransferStatus(status) {
|
|
46578
46746
|
const statuses = {
|
|
46579
46747
|
'1000': 'ok',
|
|
46580
46748
|
'OK': 'ok',
|
|
46749
|
+
'FINISHED': 'ok',
|
|
46581
46750
|
};
|
|
46582
46751
|
return this.safeString(statuses, status, status);
|
|
46583
46752
|
}
|
|
46753
|
+
parseTransferToAccount(type) {
|
|
46754
|
+
const types = {
|
|
46755
|
+
'contract_to_spot': 'spot',
|
|
46756
|
+
'spot_to_contract': 'swap',
|
|
46757
|
+
};
|
|
46758
|
+
return this.safeString(types, type, type);
|
|
46759
|
+
}
|
|
46760
|
+
parseTransferFromAccount(type) {
|
|
46761
|
+
const types = {
|
|
46762
|
+
'contract_to_spot': 'swap',
|
|
46763
|
+
'spot_to_contract': 'spot',
|
|
46764
|
+
};
|
|
46765
|
+
return this.safeString(types, type, type);
|
|
46766
|
+
}
|
|
46584
46767
|
parseTransfer(transfer, currency = undefined) {
|
|
46768
|
+
//
|
|
46769
|
+
// margin
|
|
46770
|
+
//
|
|
46771
|
+
// {
|
|
46772
|
+
// "transfer_id": "ca90d97a621e47d49774f19af6b029f5"
|
|
46773
|
+
// }
|
|
46774
|
+
//
|
|
46775
|
+
// swap
|
|
46776
|
+
//
|
|
46777
|
+
// {
|
|
46778
|
+
// "currency": "USDT",
|
|
46779
|
+
// "amount": "5"
|
|
46780
|
+
// }
|
|
46781
|
+
//
|
|
46782
|
+
// fetchTransfers
|
|
46783
|
+
//
|
|
46784
|
+
// {
|
|
46785
|
+
// "transfer_id": "902463535961567232",
|
|
46786
|
+
// "currency": "USDT",
|
|
46787
|
+
// "amount": "5",
|
|
46788
|
+
// "type": "contract_to_spot",
|
|
46789
|
+
// "state": "FINISHED",
|
|
46790
|
+
// "timestamp": 1695330539565
|
|
46791
|
+
// }
|
|
46792
|
+
//
|
|
46793
|
+
const currencyId = this.safeString(transfer, 'currency');
|
|
46794
|
+
const timestamp = this.safeInteger(transfer, 'timestamp');
|
|
46795
|
+
return {
|
|
46796
|
+
'id': this.safeString(transfer, 'transfer_id'),
|
|
46797
|
+
'timestamp': timestamp,
|
|
46798
|
+
'datetime': this.iso8601(timestamp),
|
|
46799
|
+
'currency': this.safeCurrencyCode(currencyId, currency),
|
|
46800
|
+
'amount': this.safeNumber(transfer, 'amount'),
|
|
46801
|
+
'fromAccount': this.parseTransferFromAccount(this.safeString(transfer, 'type')),
|
|
46802
|
+
'toAccount': this.parseTransferToAccount(this.safeString(transfer, 'type')),
|
|
46803
|
+
'status': this.parseTransferStatus(this.safeString(transfer, 'state')),
|
|
46804
|
+
};
|
|
46805
|
+
}
|
|
46806
|
+
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
46807
|
+
/**
|
|
46808
|
+
* @method
|
|
46809
|
+
* @name bitmart#fetchTransfers
|
|
46810
|
+
* @description fetch a history of internal transfers made on an account, only transfers between spot and swap are supported
|
|
46811
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-transfer-list-signed
|
|
46812
|
+
* @param {string} code unified currency code of the currency transferred
|
|
46813
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
46814
|
+
* @param {int} [limit] the maximum number of transfer structures to retrieve
|
|
46815
|
+
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
46816
|
+
* @param {int} [params.page] the required number of pages, default is 1, max is 1000
|
|
46817
|
+
* @param {int} [params.until] the latest time in ms to fetch transfers for
|
|
46818
|
+
* @returns {object[]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
46819
|
+
*/
|
|
46820
|
+
await this.loadMarkets();
|
|
46821
|
+
if (limit === undefined) {
|
|
46822
|
+
limit = 10;
|
|
46823
|
+
}
|
|
46824
|
+
const request = {
|
|
46825
|
+
'page': this.safeInteger(params, 'page', 1),
|
|
46826
|
+
'limit': limit, // default is 10, max is 100
|
|
46827
|
+
};
|
|
46828
|
+
let currency = undefined;
|
|
46829
|
+
if (code !== undefined) {
|
|
46830
|
+
currency = this.currency(code);
|
|
46831
|
+
request['currency'] = currency['id'];
|
|
46832
|
+
}
|
|
46833
|
+
if (since !== undefined) {
|
|
46834
|
+
request['time_start'] = since;
|
|
46835
|
+
}
|
|
46836
|
+
if (limit !== undefined) {
|
|
46837
|
+
request['limit'] = limit;
|
|
46838
|
+
}
|
|
46839
|
+
const until = this.safeInteger2(params, 'until', 'till'); // unified in milliseconds
|
|
46840
|
+
const endTime = this.safeInteger(params, 'time_end', until); // exchange-specific in milliseconds
|
|
46841
|
+
params = this.omit(params, ['till', 'until']);
|
|
46842
|
+
if (endTime !== undefined) {
|
|
46843
|
+
request['time_end'] = endTime;
|
|
46844
|
+
}
|
|
46845
|
+
const response = await this.privatePostAccountV1TransferContractList(this.extend(request, params));
|
|
46585
46846
|
//
|
|
46586
46847
|
// {
|
|
46587
46848
|
// "message": "OK",
|
|
46588
46849
|
// "code": 1000,
|
|
46589
|
-
// "trace": "
|
|
46850
|
+
// "trace": "7f9d93e10f9g4513bc08a7btc2a5559a.69.16953325693032193",
|
|
46590
46851
|
// "data": {
|
|
46591
|
-
// "
|
|
46852
|
+
// "records": [
|
|
46853
|
+
// {
|
|
46854
|
+
// "transfer_id": "902463535961567232",
|
|
46855
|
+
// "currency": "USDT",
|
|
46856
|
+
// "amount": "5",
|
|
46857
|
+
// "type": "contract_to_spot",
|
|
46858
|
+
// "state": "FINISHED",
|
|
46859
|
+
// "timestamp": 1695330539565
|
|
46860
|
+
// },
|
|
46861
|
+
// ]
|
|
46592
46862
|
// }
|
|
46593
46863
|
// }
|
|
46594
46864
|
//
|
|
46595
|
-
const data = this.safeValue(
|
|
46596
|
-
|
|
46597
|
-
|
|
46598
|
-
'timestamp': undefined,
|
|
46599
|
-
'datetime': undefined,
|
|
46600
|
-
'currency': this.safeCurrencyCode(undefined, currency),
|
|
46601
|
-
'amount': undefined,
|
|
46602
|
-
'fromAccount': undefined,
|
|
46603
|
-
'toAccount': undefined,
|
|
46604
|
-
'status': this.parseTransferStatus(this.safeString2(transfer, 'code', 'message')),
|
|
46605
|
-
};
|
|
46865
|
+
const data = this.safeValue(response, 'data', {});
|
|
46866
|
+
const records = this.safeValue(data, 'records', []);
|
|
46867
|
+
return this.parseTransfers(records, currency, since, limit);
|
|
46606
46868
|
}
|
|
46607
46869
|
async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
46608
46870
|
/**
|
|
@@ -46769,6 +47031,72 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46769
47031
|
};
|
|
46770
47032
|
return await this.privatePostContractPrivateSubmitLeverage(this.extend(request, params));
|
|
46771
47033
|
}
|
|
47034
|
+
async fetchFundingRate(symbol, params = {}) {
|
|
47035
|
+
/**
|
|
47036
|
+
* @method
|
|
47037
|
+
* @name bitmart#fetchFundingRate
|
|
47038
|
+
* @description fetch the current funding rate
|
|
47039
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-current-funding-rate
|
|
47040
|
+
* @param {string} symbol unified market symbol
|
|
47041
|
+
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
47042
|
+
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
47043
|
+
*/
|
|
47044
|
+
await this.loadMarkets();
|
|
47045
|
+
const market = this.market(symbol);
|
|
47046
|
+
if (!market['swap']) {
|
|
47047
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadSymbol(this.id + ' fetchFundingRate() supports swap contracts only');
|
|
47048
|
+
}
|
|
47049
|
+
const request = {
|
|
47050
|
+
'symbol': market['id'],
|
|
47051
|
+
};
|
|
47052
|
+
const response = await this.publicGetContractPublicFundingRate(this.extend(request, params));
|
|
47053
|
+
//
|
|
47054
|
+
// {
|
|
47055
|
+
// "code": 1000,
|
|
47056
|
+
// "message": "Ok",
|
|
47057
|
+
// "data": {
|
|
47058
|
+
// "timestamp": 1695184410697,
|
|
47059
|
+
// "symbol": "BTCUSDT",
|
|
47060
|
+
// "rate_value": "-0.00002614",
|
|
47061
|
+
// "expected_rate": "-0.00002"
|
|
47062
|
+
// },
|
|
47063
|
+
// "trace": "4cad855074654097ac7ba5257c47305d.54.16951844206655589"
|
|
47064
|
+
// }
|
|
47065
|
+
//
|
|
47066
|
+
const data = this.safeValue(response, 'data', {});
|
|
47067
|
+
return this.parseFundingRate(data, market);
|
|
47068
|
+
}
|
|
47069
|
+
parseFundingRate(contract, market = undefined) {
|
|
47070
|
+
//
|
|
47071
|
+
// {
|
|
47072
|
+
// "timestamp": 1695184410697,
|
|
47073
|
+
// "symbol": "BTCUSDT",
|
|
47074
|
+
// "rate_value": "-0.00002614",
|
|
47075
|
+
// "expected_rate": "-0.00002"
|
|
47076
|
+
// }
|
|
47077
|
+
//
|
|
47078
|
+
const marketId = this.safeString(contract, 'symbol');
|
|
47079
|
+
const timestamp = this.safeInteger(contract, 'timestamp');
|
|
47080
|
+
return {
|
|
47081
|
+
'info': contract,
|
|
47082
|
+
'symbol': this.safeSymbol(marketId, market),
|
|
47083
|
+
'markPrice': undefined,
|
|
47084
|
+
'indexPrice': undefined,
|
|
47085
|
+
'interestRate': undefined,
|
|
47086
|
+
'estimatedSettlePrice': undefined,
|
|
47087
|
+
'timestamp': timestamp,
|
|
47088
|
+
'datetime': this.iso8601(timestamp),
|
|
47089
|
+
'fundingRate': this.safeNumber(contract, 'expected_rate'),
|
|
47090
|
+
'fundingTimestamp': undefined,
|
|
47091
|
+
'fundingDatetime': undefined,
|
|
47092
|
+
'nextFundingRate': undefined,
|
|
47093
|
+
'nextFundingTimestamp': undefined,
|
|
47094
|
+
'nextFundingDatetime': undefined,
|
|
47095
|
+
'previousFundingRate': this.safeNumber(contract, 'rate_value'),
|
|
47096
|
+
'previousFundingTimestamp': undefined,
|
|
47097
|
+
'previousFundingDatetime': undefined,
|
|
47098
|
+
};
|
|
47099
|
+
}
|
|
46772
47100
|
nonce() {
|
|
46773
47101
|
return this.milliseconds();
|
|
46774
47102
|
}
|
|
@@ -54521,12 +54849,19 @@ class bitrue extends _abstract_bitrue_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
54521
54849
|
* @method
|
|
54522
54850
|
* @name bitrue#createOrder
|
|
54523
54851
|
* @description create a trade order
|
|
54852
|
+
* @see https://github.com/Bitrue-exchange/Spot-official-api-docs#signed-endpoint-examples-for-post-apiv1order
|
|
54524
54853
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
54525
54854
|
* @param {string} type 'market' or 'limit'
|
|
54526
54855
|
* @param {string} side 'buy' or 'sell'
|
|
54527
54856
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
54528
54857
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
54529
54858
|
* @param {object} [params] extra parameters specific to the bitrue api endpoint
|
|
54859
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
54860
|
+
* @param {string} [params.clientOrderId] a unique id for the order, automatically generated if not sent
|
|
54861
|
+
*
|
|
54862
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
54863
|
+
* @param {decimal} [params.icebergQty]
|
|
54864
|
+
* @param {long} [params.recvWindow]
|
|
54530
54865
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
54531
54866
|
*/
|
|
54532
54867
|
await this.loadMarkets();
|
|
@@ -63841,1976 +64176,6 @@ class bitvavo extends _abstract_bitvavo_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
63841
64176
|
}
|
|
63842
64177
|
|
|
63843
64178
|
|
|
63844
|
-
/***/ }),
|
|
63845
|
-
|
|
63846
|
-
/***/ 2574:
|
|
63847
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
63848
|
-
|
|
63849
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
63850
|
-
/* harmony export */ "Z": () => (/* binding */ bkex)
|
|
63851
|
-
/* harmony export */ });
|
|
63852
|
-
/* harmony import */ var _abstract_bkex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5569);
|
|
63853
|
-
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6689);
|
|
63854
|
-
/* harmony import */ var _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9292);
|
|
63855
|
-
/* harmony import */ var _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1372);
|
|
63856
|
-
// ---------------------------------------------------------------------------
|
|
63857
|
-
|
|
63858
|
-
|
|
63859
|
-
|
|
63860
|
-
|
|
63861
|
-
// ---------------------------------------------------------------------------
|
|
63862
|
-
/**
|
|
63863
|
-
* @class bkex
|
|
63864
|
-
* @extends Exchange
|
|
63865
|
-
*/
|
|
63866
|
-
class bkex extends _abstract_bkex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
63867
|
-
describe() {
|
|
63868
|
-
return this.deepExtend(super.describe(), {
|
|
63869
|
-
'id': 'bkex',
|
|
63870
|
-
'name': 'BKEX',
|
|
63871
|
-
'countries': ['BVI'],
|
|
63872
|
-
'rateLimit': 100,
|
|
63873
|
-
'version': 'v2',
|
|
63874
|
-
'certified': false,
|
|
63875
|
-
'has': {
|
|
63876
|
-
'CORS': undefined,
|
|
63877
|
-
'spot': true,
|
|
63878
|
-
'margin': undefined,
|
|
63879
|
-
'swap': true,
|
|
63880
|
-
'future': undefined,
|
|
63881
|
-
'option': undefined,
|
|
63882
|
-
'addMargin': undefined,
|
|
63883
|
-
'cancelAllOrders': undefined,
|
|
63884
|
-
'cancelOrder': true,
|
|
63885
|
-
'cancelOrders': true,
|
|
63886
|
-
'createDepositAddress': undefined,
|
|
63887
|
-
'createLimitOrder': undefined,
|
|
63888
|
-
'createMarketOrder': undefined,
|
|
63889
|
-
'createOrder': true,
|
|
63890
|
-
'editOrder': undefined,
|
|
63891
|
-
'fetchAccounts': undefined,
|
|
63892
|
-
'fetchBalance': true,
|
|
63893
|
-
'fetchBidsAsks': undefined,
|
|
63894
|
-
'fetchBorrowRate': undefined,
|
|
63895
|
-
'fetchBorrowRateHistory': undefined,
|
|
63896
|
-
'fetchBorrowRates': undefined,
|
|
63897
|
-
'fetchBorrowRatesPerSymbol': undefined,
|
|
63898
|
-
'fetchCanceledOrders': undefined,
|
|
63899
|
-
'fetchClosedOrder': undefined,
|
|
63900
|
-
'fetchClosedOrders': true,
|
|
63901
|
-
'fetchCurrencies': true,
|
|
63902
|
-
'fetchDeposit': false,
|
|
63903
|
-
'fetchDepositAddress': true,
|
|
63904
|
-
'fetchDepositAddresses': undefined,
|
|
63905
|
-
'fetchDepositAddressesByNetwork': undefined,
|
|
63906
|
-
'fetchDeposits': true,
|
|
63907
|
-
'fetchDepositWithdrawFee': 'emulated',
|
|
63908
|
-
'fetchDepositWithdrawFees': true,
|
|
63909
|
-
'fetchFundingHistory': undefined,
|
|
63910
|
-
'fetchFundingRate': undefined,
|
|
63911
|
-
'fetchFundingRateHistory': true,
|
|
63912
|
-
'fetchFundingRates': undefined,
|
|
63913
|
-
'fetchIndexOHLCV': undefined,
|
|
63914
|
-
'fetchL2OrderBook': undefined,
|
|
63915
|
-
'fetchLedger': undefined,
|
|
63916
|
-
'fetchLedgerEntry': undefined,
|
|
63917
|
-
'fetchLeverageTiers': undefined,
|
|
63918
|
-
'fetchMarginMode': false,
|
|
63919
|
-
'fetchMarketLeverageTiers': true,
|
|
63920
|
-
'fetchMarkets': true,
|
|
63921
|
-
'fetchMarkOHLCV': undefined,
|
|
63922
|
-
'fetchMyTrades': undefined,
|
|
63923
|
-
'fetchOHLCV': true,
|
|
63924
|
-
'fetchOpenOrder': true,
|
|
63925
|
-
'fetchOpenOrders': true,
|
|
63926
|
-
'fetchOrder': false,
|
|
63927
|
-
'fetchOrderBook': true,
|
|
63928
|
-
'fetchOrderBooks': undefined,
|
|
63929
|
-
'fetchOrders': undefined,
|
|
63930
|
-
'fetchOrderTrades': undefined,
|
|
63931
|
-
'fetchPosition': undefined,
|
|
63932
|
-
'fetchPositionMode': false,
|
|
63933
|
-
'fetchPositions': undefined,
|
|
63934
|
-
'fetchPositionsRisk': undefined,
|
|
63935
|
-
'fetchPremiumIndexOHLCV': undefined,
|
|
63936
|
-
'fetchStatus': true,
|
|
63937
|
-
'fetchTicker': true,
|
|
63938
|
-
'fetchTickers': true,
|
|
63939
|
-
'fetchTime': true,
|
|
63940
|
-
'fetchTrades': true,
|
|
63941
|
-
'fetchTradingFee': false,
|
|
63942
|
-
'fetchTradingFees': false,
|
|
63943
|
-
'fetchTradingLimits': undefined,
|
|
63944
|
-
'fetchTransactionFee': 'emulated',
|
|
63945
|
-
'fetchTransactionFees': true,
|
|
63946
|
-
'fetchTransactions': undefined,
|
|
63947
|
-
'fetchTransfer': false,
|
|
63948
|
-
'fetchTransfers': false,
|
|
63949
|
-
'fetchWithdrawal': false,
|
|
63950
|
-
'fetchWithdrawals': true,
|
|
63951
|
-
'reduceMargin': undefined,
|
|
63952
|
-
'setLeverage': undefined,
|
|
63953
|
-
'setMarginMode': undefined,
|
|
63954
|
-
'setPositionMode': undefined,
|
|
63955
|
-
'signIn': undefined,
|
|
63956
|
-
'transfer': false,
|
|
63957
|
-
'withdraw': false,
|
|
63958
|
-
},
|
|
63959
|
-
'timeframes': {
|
|
63960
|
-
'1m': '1m',
|
|
63961
|
-
'5m': '5m',
|
|
63962
|
-
'15m': '15m',
|
|
63963
|
-
'30m': '30m',
|
|
63964
|
-
'1h': '1h',
|
|
63965
|
-
'4h': '4h',
|
|
63966
|
-
'6h': '6h',
|
|
63967
|
-
'12h': '12h',
|
|
63968
|
-
'1d': '1d',
|
|
63969
|
-
'1w': '1w',
|
|
63970
|
-
},
|
|
63971
|
-
'urls': {
|
|
63972
|
-
'logo': 'https://user-images.githubusercontent.com/1294454/158043180-bb079a65-69e8-45a2-b393-f094d334e610.jpg',
|
|
63973
|
-
'api': {
|
|
63974
|
-
'spot': 'https://api.bkex.com',
|
|
63975
|
-
'swap': 'https://fapi.bkex.com',
|
|
63976
|
-
},
|
|
63977
|
-
'www': 'https://www.bkex.com/',
|
|
63978
|
-
'doc': [
|
|
63979
|
-
'https://bkexapi.github.io/docs/api_en.htm',
|
|
63980
|
-
],
|
|
63981
|
-
'fees': [
|
|
63982
|
-
'https://www.bkex.com/help/instruction/33',
|
|
63983
|
-
],
|
|
63984
|
-
},
|
|
63985
|
-
'api': {
|
|
63986
|
-
'public': {
|
|
63987
|
-
'spot': {
|
|
63988
|
-
'get': {
|
|
63989
|
-
'/common/symbols': 1,
|
|
63990
|
-
'/common/currencys': 1,
|
|
63991
|
-
'/common/timestamp': 1,
|
|
63992
|
-
'/q/kline': 1,
|
|
63993
|
-
'/q/tickers': 1,
|
|
63994
|
-
'/q/ticker/price': 1,
|
|
63995
|
-
'/q/depth': 1,
|
|
63996
|
-
'/q/deals': 1,
|
|
63997
|
-
},
|
|
63998
|
-
},
|
|
63999
|
-
'swap': {
|
|
64000
|
-
'get': {
|
|
64001
|
-
'/market/candle': 1,
|
|
64002
|
-
'/market/deals': 1,
|
|
64003
|
-
'/market/depth': 1,
|
|
64004
|
-
'/market/fundingRate': 1,
|
|
64005
|
-
'/market/index': 1,
|
|
64006
|
-
'/market/riskLimit': 1,
|
|
64007
|
-
'/market/symbols': 1,
|
|
64008
|
-
'/market/ticker/price': 1,
|
|
64009
|
-
'/market/tickers': 1,
|
|
64010
|
-
'/server/ping': 1,
|
|
64011
|
-
},
|
|
64012
|
-
},
|
|
64013
|
-
},
|
|
64014
|
-
'private': {
|
|
64015
|
-
'spot': {
|
|
64016
|
-
'get': {
|
|
64017
|
-
'/u/api/info': 1,
|
|
64018
|
-
'/u/account/balance': 1,
|
|
64019
|
-
'/u/wallet/address': 1,
|
|
64020
|
-
'/u/wallet/depositRecord': 1,
|
|
64021
|
-
'/u/wallet/withdrawRecord': 1,
|
|
64022
|
-
'/u/order/openOrders': 1,
|
|
64023
|
-
'/u/order/openOrder/detail': 1,
|
|
64024
|
-
'/u/order/historyOrders': 1,
|
|
64025
|
-
},
|
|
64026
|
-
'post': {
|
|
64027
|
-
'/u/account/transfer': 1,
|
|
64028
|
-
'/u/wallet/withdraw': 1,
|
|
64029
|
-
'/u/order/create': 1,
|
|
64030
|
-
'/u/order/cancel': 1,
|
|
64031
|
-
'/u/order/batchCreate': 1,
|
|
64032
|
-
'/u/order/batchCancel': 1,
|
|
64033
|
-
},
|
|
64034
|
-
},
|
|
64035
|
-
'swap': {
|
|
64036
|
-
'get': {
|
|
64037
|
-
'/account/balance': 1,
|
|
64038
|
-
'/account/balanceRecord': 1,
|
|
64039
|
-
'/account/order': 1,
|
|
64040
|
-
'/account/orderForced': 1,
|
|
64041
|
-
'/account/position': 1,
|
|
64042
|
-
'/entrust/finished': 1,
|
|
64043
|
-
'/entrust/unFinish': 1,
|
|
64044
|
-
'/order/finished': 1,
|
|
64045
|
-
'/order/finishedInfo': 1,
|
|
64046
|
-
'/order/unFinish': 1,
|
|
64047
|
-
'/position/info': 1,
|
|
64048
|
-
},
|
|
64049
|
-
'post': {
|
|
64050
|
-
'/account/setLeverage': 1,
|
|
64051
|
-
'/entrust/add': 1,
|
|
64052
|
-
'/entrust/cancel': 1,
|
|
64053
|
-
'/order/batchCancel': 1,
|
|
64054
|
-
'/order/batchOpen': 1,
|
|
64055
|
-
'/order/cancel': 1,
|
|
64056
|
-
'/order/close': 1,
|
|
64057
|
-
'/order/closeAll': 1,
|
|
64058
|
-
'/order/open': 1,
|
|
64059
|
-
'/position/setSpSl': 1,
|
|
64060
|
-
'/position/update': 1,
|
|
64061
|
-
},
|
|
64062
|
-
},
|
|
64063
|
-
},
|
|
64064
|
-
},
|
|
64065
|
-
'fees': {
|
|
64066
|
-
'trading': {
|
|
64067
|
-
'tierBased': false,
|
|
64068
|
-
'percentage': true,
|
|
64069
|
-
'maker': this.parseNumber('0.0015'),
|
|
64070
|
-
'taker': this.parseNumber('0.002'),
|
|
64071
|
-
},
|
|
64072
|
-
},
|
|
64073
|
-
'options': {
|
|
64074
|
-
'timeframes': {
|
|
64075
|
-
'spot': {
|
|
64076
|
-
'1m': '1m',
|
|
64077
|
-
'5m': '5m',
|
|
64078
|
-
'15m': '15m',
|
|
64079
|
-
'30m': '30m',
|
|
64080
|
-
'1h': '1h',
|
|
64081
|
-
'4h': '4h',
|
|
64082
|
-
'6h': '6h',
|
|
64083
|
-
'12h': '12h',
|
|
64084
|
-
'1d': '1d',
|
|
64085
|
-
'1w': '1w',
|
|
64086
|
-
},
|
|
64087
|
-
'swap': {
|
|
64088
|
-
'1m': 'M1',
|
|
64089
|
-
'5m': 'M5',
|
|
64090
|
-
'15m': 'M15',
|
|
64091
|
-
'30m': 'M30',
|
|
64092
|
-
'1h': 'H1',
|
|
64093
|
-
'4h': 'H4',
|
|
64094
|
-
'6h': 'H6',
|
|
64095
|
-
'1d': 'D1',
|
|
64096
|
-
},
|
|
64097
|
-
},
|
|
64098
|
-
'defaultType': 'spot',
|
|
64099
|
-
'networks': {
|
|
64100
|
-
'TRX': 'TRC-20',
|
|
64101
|
-
'TRC20': 'TRC-20',
|
|
64102
|
-
'ETH': 'ERC-20',
|
|
64103
|
-
'ERC20': 'ERC-20',
|
|
64104
|
-
'BEP20': 'BEP-20(BSC)',
|
|
64105
|
-
},
|
|
64106
|
-
},
|
|
64107
|
-
'commonCurrencies': {
|
|
64108
|
-
'SHINJA': 'SHINJA(1M)',
|
|
64109
|
-
},
|
|
64110
|
-
'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_1__/* .TICK_SIZE */ .sh,
|
|
64111
|
-
'exceptions': {
|
|
64112
|
-
'exact': {
|
|
64113
|
-
'1005': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InsufficientFunds,
|
|
64114
|
-
},
|
|
64115
|
-
'broad': {
|
|
64116
|
-
'Not Enough balance': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InsufficientFunds,
|
|
64117
|
-
'Order does not exist': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
64118
|
-
'System busy, please try again later': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest,
|
|
64119
|
-
'System busy. Please try again later': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeNotAvailable, // as seen https://app.travis-ci.com/github/ccxt/ccxt/builds/265039537#L2152
|
|
64120
|
-
},
|
|
64121
|
-
},
|
|
64122
|
-
});
|
|
64123
|
-
}
|
|
64124
|
-
async fetchMarkets(params = {}) {
|
|
64125
|
-
/**
|
|
64126
|
-
* @method
|
|
64127
|
-
* @name bkex#fetchMarkets
|
|
64128
|
-
* @description retrieves data on all markets for bkex
|
|
64129
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#basicInformation-1
|
|
64130
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#contract-market-symbols
|
|
64131
|
-
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
64132
|
-
* @returns {object[]} an array of objects representing market data
|
|
64133
|
-
*/
|
|
64134
|
-
let promises = [
|
|
64135
|
-
this.publicSpotGetCommonSymbols(params),
|
|
64136
|
-
this.publicSwapGetMarketSymbols(params),
|
|
64137
|
-
];
|
|
64138
|
-
promises = await Promise.all(promises);
|
|
64139
|
-
const spotMarkets = promises[0];
|
|
64140
|
-
//
|
|
64141
|
-
// {
|
|
64142
|
-
// "code": "0",
|
|
64143
|
-
// "data": [
|
|
64144
|
-
// {
|
|
64145
|
-
// "minimumOrderSize": "0",
|
|
64146
|
-
// "minimumTradeVolume": "0E-18",
|
|
64147
|
-
// "pricePrecision": "11",
|
|
64148
|
-
// "supportTrade": true,
|
|
64149
|
-
// "symbol": "COMT_USDT",
|
|
64150
|
-
// "volumePrecision": 0
|
|
64151
|
-
// },
|
|
64152
|
-
// ],
|
|
64153
|
-
// "msg": "success",
|
|
64154
|
-
// "status": 0
|
|
64155
|
-
// }
|
|
64156
|
-
//
|
|
64157
|
-
const swapMarkets = promises[1];
|
|
64158
|
-
//
|
|
64159
|
-
// {
|
|
64160
|
-
// "code": 0,
|
|
64161
|
-
// "msg": "success",
|
|
64162
|
-
// "data": [
|
|
64163
|
-
// {
|
|
64164
|
-
// "symbol": "luna_usdt",
|
|
64165
|
-
// "supportTrade": false,
|
|
64166
|
-
// "volumePrecision": 0,
|
|
64167
|
-
// "pricePrecision": 3,
|
|
64168
|
-
// "marketMiniAmount": "1",
|
|
64169
|
-
// "limitMiniAmount": "1"
|
|
64170
|
-
// },
|
|
64171
|
-
// ]
|
|
64172
|
-
// }
|
|
64173
|
-
//
|
|
64174
|
-
const spotData = this.safeValue(spotMarkets, 'data', []);
|
|
64175
|
-
const swapData = this.safeValue(swapMarkets, 'data', []);
|
|
64176
|
-
const data = this.arrayConcat(spotData, swapData);
|
|
64177
|
-
const result = [];
|
|
64178
|
-
for (let i = 0; i < data.length; i++) {
|
|
64179
|
-
const market = data[i];
|
|
64180
|
-
const marketId = this.safeString(market, 'symbol');
|
|
64181
|
-
const id = this.safeStringUpper(market, 'symbol');
|
|
64182
|
-
const [baseId, quoteId] = id.split('_');
|
|
64183
|
-
const base = this.safeCurrencyCode(baseId);
|
|
64184
|
-
const quote = this.safeCurrencyCode(quoteId);
|
|
64185
|
-
const minimumOrderSize = this.safeString(market, 'minimumOrderSize');
|
|
64186
|
-
const type = (minimumOrderSize !== undefined) ? 'spot' : 'swap';
|
|
64187
|
-
const swap = (type === 'swap');
|
|
64188
|
-
let symbol = base + '/' + quote;
|
|
64189
|
-
let settleId = undefined;
|
|
64190
|
-
let settle = undefined;
|
|
64191
|
-
if (swap) {
|
|
64192
|
-
settleId = quoteId;
|
|
64193
|
-
settle = quote;
|
|
64194
|
-
symbol = base + '/' + quote + ':' + settle;
|
|
64195
|
-
}
|
|
64196
|
-
const linear = swap ? true : undefined;
|
|
64197
|
-
result.push({
|
|
64198
|
-
'id': marketId,
|
|
64199
|
-
'symbol': symbol,
|
|
64200
|
-
'base': base,
|
|
64201
|
-
'quote': quote,
|
|
64202
|
-
'settle': settle,
|
|
64203
|
-
'baseId': baseId,
|
|
64204
|
-
'quoteId': quoteId,
|
|
64205
|
-
'settleId': settleId,
|
|
64206
|
-
'type': type,
|
|
64207
|
-
'spot': (type === 'spot'),
|
|
64208
|
-
'margin': false,
|
|
64209
|
-
'future': false,
|
|
64210
|
-
'swap': swap,
|
|
64211
|
-
'option': false,
|
|
64212
|
-
'active': this.safeValue(market, 'supportTrade'),
|
|
64213
|
-
'contract': swap,
|
|
64214
|
-
'linear': linear,
|
|
64215
|
-
'inverse': undefined,
|
|
64216
|
-
'contractSize': undefined,
|
|
64217
|
-
'expiry': undefined,
|
|
64218
|
-
'expiryDatetime': undefined,
|
|
64219
|
-
'strike': undefined,
|
|
64220
|
-
'optionType': undefined,
|
|
64221
|
-
'precision': {
|
|
64222
|
-
'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'volumePrecision'))),
|
|
64223
|
-
'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'pricePrecision'))),
|
|
64224
|
-
},
|
|
64225
|
-
'limits': {
|
|
64226
|
-
'leverage': {
|
|
64227
|
-
'min': undefined,
|
|
64228
|
-
'max': undefined,
|
|
64229
|
-
},
|
|
64230
|
-
'amount': {
|
|
64231
|
-
'min': this.safeNumberN(market, ['minimumOrderSize', 'marketMiniAmount', 'limitMiniAmount']),
|
|
64232
|
-
'max': undefined,
|
|
64233
|
-
},
|
|
64234
|
-
'price': {
|
|
64235
|
-
'min': undefined,
|
|
64236
|
-
'max': undefined,
|
|
64237
|
-
},
|
|
64238
|
-
'cost': {
|
|
64239
|
-
'min': this.safeNumber(market, 'minimumTradeVolume'),
|
|
64240
|
-
'max': undefined,
|
|
64241
|
-
},
|
|
64242
|
-
},
|
|
64243
|
-
'info': market,
|
|
64244
|
-
});
|
|
64245
|
-
}
|
|
64246
|
-
return result;
|
|
64247
|
-
}
|
|
64248
|
-
async fetchCurrencies(params = {}) {
|
|
64249
|
-
/**
|
|
64250
|
-
* @method
|
|
64251
|
-
* @name bkex#fetchCurrencies
|
|
64252
|
-
* @description fetches all available currencies on an exchange
|
|
64253
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64254
|
-
* @returns {object} an associative dictionary of currencies
|
|
64255
|
-
*/
|
|
64256
|
-
const response = await this.publicSpotGetCommonCurrencys(params);
|
|
64257
|
-
//
|
|
64258
|
-
// {
|
|
64259
|
-
// "code": "0",
|
|
64260
|
-
// "data": [
|
|
64261
|
-
// {
|
|
64262
|
-
// "currency": "ETH",
|
|
64263
|
-
// "maxWithdrawOneDay": "100.000000000000000000",
|
|
64264
|
-
// "maxWithdrawSingle": "50.000000000000000000",
|
|
64265
|
-
// "minWithdrawSingle": "0.005000000000000000",
|
|
64266
|
-
// "supportDeposit": true,
|
|
64267
|
-
// "supportTrade": true,
|
|
64268
|
-
// "supportWithdraw": true,
|
|
64269
|
-
// "withdrawFee": 0.01
|
|
64270
|
-
// },
|
|
64271
|
-
// ],
|
|
64272
|
-
// "msg": "success",
|
|
64273
|
-
// "status": 0
|
|
64274
|
-
// }
|
|
64275
|
-
//
|
|
64276
|
-
const data = this.safeValue(response, 'data', []);
|
|
64277
|
-
const result = {};
|
|
64278
|
-
for (let i = 0; i < data.length; i++) {
|
|
64279
|
-
const currency = data[i];
|
|
64280
|
-
const id = this.safeString(currency, 'currency');
|
|
64281
|
-
const code = this.safeCurrencyCode(id);
|
|
64282
|
-
const name = this.safeString(currency, 'name');
|
|
64283
|
-
const withdrawEnabled = this.safeValue(currency, 'supportWithdraw');
|
|
64284
|
-
const depositEnabled = this.safeValue(currency, 'supportDeposit');
|
|
64285
|
-
const tradeEnabled = this.safeValue(currency, 'supportTrade');
|
|
64286
|
-
const active = withdrawEnabled && depositEnabled && tradeEnabled;
|
|
64287
|
-
result[code] = {
|
|
64288
|
-
'id': id,
|
|
64289
|
-
'code': code,
|
|
64290
|
-
'name': name,
|
|
64291
|
-
'deposit': depositEnabled,
|
|
64292
|
-
'withdraw': withdrawEnabled,
|
|
64293
|
-
'active': active,
|
|
64294
|
-
'fee': this.safeNumber(currency, 'withdrawFee'),
|
|
64295
|
-
'precision': undefined,
|
|
64296
|
-
'limits': {
|
|
64297
|
-
'amount': { 'min': undefined, 'max': undefined },
|
|
64298
|
-
'price': { 'min': undefined, 'max': undefined },
|
|
64299
|
-
'cost': { 'min': undefined, 'max': undefined },
|
|
64300
|
-
'withdraw': { 'min': this.safeNumber(currency, 'minWithdrawSingle'), 'max': this.safeNumber(currency, 'maxWithdrawSingle') },
|
|
64301
|
-
},
|
|
64302
|
-
'info': currency,
|
|
64303
|
-
};
|
|
64304
|
-
}
|
|
64305
|
-
return result;
|
|
64306
|
-
}
|
|
64307
|
-
async fetchTime(params = {}) {
|
|
64308
|
-
/**
|
|
64309
|
-
* @method
|
|
64310
|
-
* @name bkex#fetchTime
|
|
64311
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
64312
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64313
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
64314
|
-
*/
|
|
64315
|
-
const response = await this.publicSpotGetCommonTimestamp(params);
|
|
64316
|
-
//
|
|
64317
|
-
// {
|
|
64318
|
-
// "code": '0',
|
|
64319
|
-
// "data": 1573542445411,
|
|
64320
|
-
// "msg": "success",
|
|
64321
|
-
// "status": 0
|
|
64322
|
-
// }
|
|
64323
|
-
//
|
|
64324
|
-
return this.safeInteger(response, 'data');
|
|
64325
|
-
}
|
|
64326
|
-
async fetchStatus(params = {}) {
|
|
64327
|
-
/**
|
|
64328
|
-
* @method
|
|
64329
|
-
* @name bkex#fetchStatus
|
|
64330
|
-
* @description the latest known information on the availability of the exchange API
|
|
64331
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64332
|
-
* @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
|
|
64333
|
-
*/
|
|
64334
|
-
const response = await this.publicSpotGetCommonTimestamp(params);
|
|
64335
|
-
//
|
|
64336
|
-
// {
|
|
64337
|
-
// "code": '0',
|
|
64338
|
-
// "data": 1573542445411,
|
|
64339
|
-
// "msg": "success",
|
|
64340
|
-
// "status": 0
|
|
64341
|
-
// }
|
|
64342
|
-
//
|
|
64343
|
-
const statusRaw = this.safeInteger(response, 'status');
|
|
64344
|
-
const codeRaw = this.safeInteger(response, 'code');
|
|
64345
|
-
const updated = this.safeInteger(response, 'data');
|
|
64346
|
-
return {
|
|
64347
|
-
'status': (statusRaw === 0 && codeRaw === 0) ? 'ok' : statusRaw,
|
|
64348
|
-
'updated': updated,
|
|
64349
|
-
'eta': undefined,
|
|
64350
|
-
'url': undefined,
|
|
64351
|
-
'info': response,
|
|
64352
|
-
};
|
|
64353
|
-
}
|
|
64354
|
-
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
64355
|
-
/**
|
|
64356
|
-
* @method
|
|
64357
|
-
* @name bkex#fetchOHLCV
|
|
64358
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
64359
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#quotationData-1
|
|
64360
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#contract-kline
|
|
64361
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
64362
|
-
* @param {string} timeframe the length of time each candle represents
|
|
64363
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
64364
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
64365
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64366
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
64367
|
-
*/
|
|
64368
|
-
await this.loadMarkets();
|
|
64369
|
-
const market = this.market(symbol);
|
|
64370
|
-
const swap = market['swap'];
|
|
64371
|
-
const request = {
|
|
64372
|
-
'symbol': market['id'],
|
|
64373
|
-
};
|
|
64374
|
-
let method = 'publicSpotGetQKline';
|
|
64375
|
-
const timeframes = this.safeValue(this.options, 'timeframes');
|
|
64376
|
-
if (swap) {
|
|
64377
|
-
const swapTimeframes = this.safeValue(timeframes, 'swap');
|
|
64378
|
-
method = 'publicSwapGetMarketCandle';
|
|
64379
|
-
request['period'] = this.safeString(swapTimeframes, timeframe, timeframe);
|
|
64380
|
-
if (limit !== undefined) {
|
|
64381
|
-
request['count'] = limit;
|
|
64382
|
-
}
|
|
64383
|
-
}
|
|
64384
|
-
else {
|
|
64385
|
-
const spotTimeframes = this.safeValue(timeframes, 'spot');
|
|
64386
|
-
request['symbol'] = market['id'];
|
|
64387
|
-
request['period'] = this.safeString(spotTimeframes, timeframe, timeframe);
|
|
64388
|
-
}
|
|
64389
|
-
if (limit !== undefined) {
|
|
64390
|
-
const limitRequest = swap ? 'count' : 'size';
|
|
64391
|
-
request[limitRequest] = limit;
|
|
64392
|
-
}
|
|
64393
|
-
// their docs says that 'from/to' arguments are mandatory, however that's not true in reality
|
|
64394
|
-
if (since !== undefined) {
|
|
64395
|
-
const sinceRequest = swap ? 'start' : 'from';
|
|
64396
|
-
request[sinceRequest] = since;
|
|
64397
|
-
// when 'since' [from] argument is set, then exchange also requires 'to' value to be set. So we have to set 'to' argument depending 'limit' amount (if limit was not provided, then exchange-default 500).
|
|
64398
|
-
if (limit === undefined) {
|
|
64399
|
-
limit = 500;
|
|
64400
|
-
}
|
|
64401
|
-
const duration = this.parseTimeframe(timeframe);
|
|
64402
|
-
const timerange = limit * duration * 1000;
|
|
64403
|
-
const toRequest = swap ? 'end' : 'to';
|
|
64404
|
-
request[toRequest] = this.sum(request[sinceRequest], timerange);
|
|
64405
|
-
}
|
|
64406
|
-
const response = await this[method](request);
|
|
64407
|
-
//
|
|
64408
|
-
// spot
|
|
64409
|
-
//
|
|
64410
|
-
// {
|
|
64411
|
-
// "code": "0",
|
|
64412
|
-
// "data": [
|
|
64413
|
-
// {
|
|
64414
|
-
// "close": "43414.68",
|
|
64415
|
-
// "high": "43446.47",
|
|
64416
|
-
// "low": "43403.05",
|
|
64417
|
-
// "open": "43406.05",
|
|
64418
|
-
// "quoteVolume": "61500.40099",
|
|
64419
|
-
// "symbol": "BTC_USDT",
|
|
64420
|
-
// "ts": "1646152440000",
|
|
64421
|
-
// "volume": 1.41627
|
|
64422
|
-
// },
|
|
64423
|
-
// ],
|
|
64424
|
-
// "msg": "success",
|
|
64425
|
-
// "status": 0
|
|
64426
|
-
// }
|
|
64427
|
-
//
|
|
64428
|
-
// swap
|
|
64429
|
-
//
|
|
64430
|
-
// {
|
|
64431
|
-
// "code": 0,
|
|
64432
|
-
// "msg": "success",
|
|
64433
|
-
// "data": [
|
|
64434
|
-
// {
|
|
64435
|
-
// "symbol": "btc_usdt",
|
|
64436
|
-
// "amount": "10.26",
|
|
64437
|
-
// "volume": "172540.9433",
|
|
64438
|
-
// "open": "16817.29",
|
|
64439
|
-
// "close": "1670476440000",
|
|
64440
|
-
// "high": "16816.45",
|
|
64441
|
-
// "low": "16817.29",
|
|
64442
|
-
// "ts": 1670476440000
|
|
64443
|
-
// },
|
|
64444
|
-
// ]
|
|
64445
|
-
// }
|
|
64446
|
-
//
|
|
64447
|
-
const data = this.safeValue(response, 'data', []);
|
|
64448
|
-
return this.parseOHLCVs(data, market, timeframe, since, limit);
|
|
64449
|
-
}
|
|
64450
|
-
parseOHLCV(ohlcv, market = undefined) {
|
|
64451
|
-
const baseCurrencyVolume = market['swap'] ? 'amount' : 'volume';
|
|
64452
|
-
return [
|
|
64453
|
-
this.safeInteger(ohlcv, 'ts'),
|
|
64454
|
-
this.safeFloat(ohlcv, 'open'),
|
|
64455
|
-
this.safeFloat(ohlcv, 'high'),
|
|
64456
|
-
this.safeFloat(ohlcv, 'low'),
|
|
64457
|
-
this.safeFloat(ohlcv, 'close'),
|
|
64458
|
-
this.safeFloat(ohlcv, baseCurrencyVolume),
|
|
64459
|
-
];
|
|
64460
|
-
}
|
|
64461
|
-
async fetchTicker(symbol, params = {}) {
|
|
64462
|
-
/**
|
|
64463
|
-
* @method
|
|
64464
|
-
* @name bkex#fetchTicker
|
|
64465
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
64466
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#quotationData-2
|
|
64467
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#contract-ticker-data
|
|
64468
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
64469
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64470
|
-
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
64471
|
-
*/
|
|
64472
|
-
await this.loadMarkets();
|
|
64473
|
-
const market = this.market(symbol);
|
|
64474
|
-
const request = {
|
|
64475
|
-
'symbol': market['id'],
|
|
64476
|
-
};
|
|
64477
|
-
const [marketType, query] = this.handleMarketTypeAndParams('fetchTicker', market, params);
|
|
64478
|
-
const method = (marketType === 'swap') ? 'publicSwapGetMarketTickers' : 'publicSpotGetQTickers';
|
|
64479
|
-
const response = await this[method](this.extend(request, query));
|
|
64480
|
-
//
|
|
64481
|
-
// spot
|
|
64482
|
-
//
|
|
64483
|
-
// {
|
|
64484
|
-
// "code": "0",
|
|
64485
|
-
// "data": [
|
|
64486
|
-
// {
|
|
64487
|
-
// "change": "6.52",
|
|
64488
|
-
// "close": "43573.470000",
|
|
64489
|
-
// "high": "44940.540000",
|
|
64490
|
-
// "low": "40799.840000",
|
|
64491
|
-
// "open": "40905.780000",
|
|
64492
|
-
// "quoteVolume": "225621691.5991",
|
|
64493
|
-
// "symbol": "BTC_USDT",
|
|
64494
|
-
// "ts": "1646156490781",
|
|
64495
|
-
// "volume": 5210.349
|
|
64496
|
-
// }
|
|
64497
|
-
// ],
|
|
64498
|
-
// "msg": "success",
|
|
64499
|
-
// "status": 0
|
|
64500
|
-
// }
|
|
64501
|
-
//
|
|
64502
|
-
// swap
|
|
64503
|
-
//
|
|
64504
|
-
// {
|
|
64505
|
-
// "code": 0,
|
|
64506
|
-
// "msg": "success",
|
|
64507
|
-
// "data": [
|
|
64508
|
-
// {
|
|
64509
|
-
// "symbol": "btc_usdt",
|
|
64510
|
-
// "amount": "171035.45",
|
|
64511
|
-
// "volume": "2934757466.3859",
|
|
64512
|
-
// "open": "17111.43",
|
|
64513
|
-
// "close": "17135.74",
|
|
64514
|
-
// "high": "17225.99",
|
|
64515
|
-
// "low": "17105.77",
|
|
64516
|
-
// "lastPrice": "17135.74",
|
|
64517
|
-
// "lastAmount": "1.05",
|
|
64518
|
-
// "lastTime": 1670709364912,
|
|
64519
|
-
// "change": "0.14"
|
|
64520
|
-
// }
|
|
64521
|
-
// ]
|
|
64522
|
-
// }
|
|
64523
|
-
//
|
|
64524
|
-
const tickers = this.safeValue(response, 'data', []);
|
|
64525
|
-
const ticker = this.safeValue(tickers, 0);
|
|
64526
|
-
return this.parseTicker(ticker, market);
|
|
64527
|
-
}
|
|
64528
|
-
async fetchTickers(symbols = undefined, params = {}) {
|
|
64529
|
-
/**
|
|
64530
|
-
* @method
|
|
64531
|
-
* @name bkex#fetchTickers
|
|
64532
|
-
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
64533
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#quotationData-2
|
|
64534
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#contract-ticker-data
|
|
64535
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
64536
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64537
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
64538
|
-
*/
|
|
64539
|
-
await this.loadMarkets();
|
|
64540
|
-
const request = {};
|
|
64541
|
-
if (symbols !== undefined) {
|
|
64542
|
-
if (!Array.isArray(symbols)) {
|
|
64543
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchTickers() symbols argument should be an array');
|
|
64544
|
-
}
|
|
64545
|
-
}
|
|
64546
|
-
let market = undefined;
|
|
64547
|
-
if (symbols !== undefined) {
|
|
64548
|
-
const marketIds = this.marketIds(symbols);
|
|
64549
|
-
const symbol = this.safeString(symbols, 0);
|
|
64550
|
-
market = this.market(symbol);
|
|
64551
|
-
if (market['swap']) {
|
|
64552
|
-
if (Array.isArray(symbols)) {
|
|
64553
|
-
const symbolsLength = symbols.length;
|
|
64554
|
-
if (symbolsLength > 1) {
|
|
64555
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchTickers() symbols argument cannot contain more than 1 symbol for swap markets');
|
|
64556
|
-
}
|
|
64557
|
-
}
|
|
64558
|
-
request['symbol'] = market['id'];
|
|
64559
|
-
}
|
|
64560
|
-
else {
|
|
64561
|
-
request['symbol'] = marketIds.join(',');
|
|
64562
|
-
}
|
|
64563
|
-
}
|
|
64564
|
-
const [marketType, query] = this.handleMarketTypeAndParams('fetchTickers', market, params);
|
|
64565
|
-
const method = (marketType === 'swap') ? 'publicSwapGetMarketTickers' : 'publicSpotGetQTickers';
|
|
64566
|
-
const response = await this[method](this.extend(request, query));
|
|
64567
|
-
//
|
|
64568
|
-
// spot
|
|
64569
|
-
//
|
|
64570
|
-
// {
|
|
64571
|
-
// "code": "0",
|
|
64572
|
-
// "data": [
|
|
64573
|
-
// {
|
|
64574
|
-
// "change": "6.52",
|
|
64575
|
-
// "close": "43573.470000",
|
|
64576
|
-
// "high": "44940.540000",
|
|
64577
|
-
// "low": "40799.840000",
|
|
64578
|
-
// "open": "40905.780000",
|
|
64579
|
-
// "quoteVolume": "225621691.5991",
|
|
64580
|
-
// "symbol": "BTC_USDT",
|
|
64581
|
-
// "ts": "1646156490781",
|
|
64582
|
-
// "volume": 5210.349
|
|
64583
|
-
// }
|
|
64584
|
-
// ],
|
|
64585
|
-
// "msg": "success",
|
|
64586
|
-
// "status": 0
|
|
64587
|
-
// }
|
|
64588
|
-
//
|
|
64589
|
-
// swap
|
|
64590
|
-
//
|
|
64591
|
-
// {
|
|
64592
|
-
// "code": 0,
|
|
64593
|
-
// "msg": "success",
|
|
64594
|
-
// "data": [
|
|
64595
|
-
// {
|
|
64596
|
-
// "symbol": "btc_usdt",
|
|
64597
|
-
// "amount": "171035.45",
|
|
64598
|
-
// "volume": "2934757466.3859",
|
|
64599
|
-
// "open": "17111.43",
|
|
64600
|
-
// "close": "17135.74",
|
|
64601
|
-
// "high": "17225.99",
|
|
64602
|
-
// "low": "17105.77",
|
|
64603
|
-
// "lastPrice": "17135.74",
|
|
64604
|
-
// "lastAmount": "1.05",
|
|
64605
|
-
// "lastTime": 1670709364912,
|
|
64606
|
-
// "change": "0.14"
|
|
64607
|
-
// }
|
|
64608
|
-
// ]
|
|
64609
|
-
// }
|
|
64610
|
-
//
|
|
64611
|
-
const tickers = this.safeValue(response, 'data', []);
|
|
64612
|
-
return this.parseTickers(tickers, symbols, query);
|
|
64613
|
-
}
|
|
64614
|
-
parseTicker(ticker, market = undefined) {
|
|
64615
|
-
//
|
|
64616
|
-
// spot
|
|
64617
|
-
//
|
|
64618
|
-
// {
|
|
64619
|
-
// "change":-0.46,
|
|
64620
|
-
// "close":29664.46,
|
|
64621
|
-
// "high":30784.99,
|
|
64622
|
-
// "low":29455.36,
|
|
64623
|
-
// "open":29803.38,
|
|
64624
|
-
// "quoteVolume":714653752.6991,
|
|
64625
|
-
// "symbol":"BTC_USDT",
|
|
64626
|
-
// "ts":1652812048118,
|
|
64627
|
-
// "volume":23684.9416
|
|
64628
|
-
// }
|
|
64629
|
-
//
|
|
64630
|
-
// swap
|
|
64631
|
-
//
|
|
64632
|
-
// {
|
|
64633
|
-
// "symbol": "btc_usdt",
|
|
64634
|
-
// "amount": "171035.45",
|
|
64635
|
-
// "volume": "2934757466.3859",
|
|
64636
|
-
// "open": "17111.43",
|
|
64637
|
-
// "close": "17135.74",
|
|
64638
|
-
// "high": "17225.99",
|
|
64639
|
-
// "low": "17105.77",
|
|
64640
|
-
// "lastPrice": "17135.74",
|
|
64641
|
-
// "lastAmount": "1.05",
|
|
64642
|
-
// "lastTime": 1670709364912,
|
|
64643
|
-
// "change": "0.14"
|
|
64644
|
-
// }
|
|
64645
|
-
//
|
|
64646
|
-
const marketId = this.safeString(ticker, 'symbol');
|
|
64647
|
-
market = this.safeMarket(marketId, market);
|
|
64648
|
-
const symbol = this.safeSymbol(marketId, market);
|
|
64649
|
-
const timestamp = this.safeInteger2(ticker, 'ts', 'lastTime');
|
|
64650
|
-
const baseCurrencyVolume = market['swap'] ? 'amount' : 'volume';
|
|
64651
|
-
const quoteCurrencyVolume = market['swap'] ? 'volume' : 'quoteVolume';
|
|
64652
|
-
const lastPrice = market['swap'] ? 'lastPrice' : 'close';
|
|
64653
|
-
return this.safeTicker({
|
|
64654
|
-
'symbol': symbol,
|
|
64655
|
-
'timestamp': timestamp,
|
|
64656
|
-
'datetime': this.iso8601(timestamp),
|
|
64657
|
-
'high': this.safeString(ticker, 'high'),
|
|
64658
|
-
'low': this.safeString(ticker, 'low'),
|
|
64659
|
-
'bid': undefined,
|
|
64660
|
-
'bidVolume': undefined,
|
|
64661
|
-
'ask': undefined,
|
|
64662
|
-
'askVolume': undefined,
|
|
64663
|
-
'vwap': undefined,
|
|
64664
|
-
'open': this.safeString(ticker, 'open'),
|
|
64665
|
-
'close': this.safeString(ticker, 'close'),
|
|
64666
|
-
'last': this.safeString(ticker, lastPrice),
|
|
64667
|
-
'previousClose': undefined,
|
|
64668
|
-
'change': undefined,
|
|
64669
|
-
'percentage': this.safeString(ticker, 'change'),
|
|
64670
|
-
'average': undefined,
|
|
64671
|
-
'baseVolume': this.safeString(ticker, baseCurrencyVolume),
|
|
64672
|
-
'quoteVolume': this.safeString(ticker, quoteCurrencyVolume),
|
|
64673
|
-
'info': ticker,
|
|
64674
|
-
}, market);
|
|
64675
|
-
}
|
|
64676
|
-
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
64677
|
-
/**
|
|
64678
|
-
* @method
|
|
64679
|
-
* @name bkex#fetchOrderBook
|
|
64680
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
64681
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#quotationData-4
|
|
64682
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#contract-deep-data
|
|
64683
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
64684
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
64685
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64686
|
-
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
64687
|
-
*/
|
|
64688
|
-
await this.loadMarkets();
|
|
64689
|
-
const market = this.market(symbol);
|
|
64690
|
-
const swap = market['swap'];
|
|
64691
|
-
const request = {
|
|
64692
|
-
'symbol': market['id'],
|
|
64693
|
-
};
|
|
64694
|
-
let method = 'publicSpotGetQDepth';
|
|
64695
|
-
if (swap) {
|
|
64696
|
-
method = 'publicSwapGetMarketDepth';
|
|
64697
|
-
}
|
|
64698
|
-
else {
|
|
64699
|
-
if (limit !== undefined) {
|
|
64700
|
-
request['depth'] = Math.min(limit, 50);
|
|
64701
|
-
}
|
|
64702
|
-
}
|
|
64703
|
-
const response = await this[method](this.extend(request, params));
|
|
64704
|
-
//
|
|
64705
|
-
// spot
|
|
64706
|
-
//
|
|
64707
|
-
// {
|
|
64708
|
-
// "code": "0",
|
|
64709
|
-
// "data": {
|
|
64710
|
-
// "ask": [
|
|
64711
|
-
// ["43820.07","0.86947"],
|
|
64712
|
-
// ["43820.25","0.07503"],
|
|
64713
|
-
// ],
|
|
64714
|
-
// "bid": [
|
|
64715
|
-
// ["43815.94","0.43743"],
|
|
64716
|
-
// ["43815.72","0.08901"],
|
|
64717
|
-
// ],
|
|
64718
|
-
// "symbol": "BTC_USDT",
|
|
64719
|
-
// "timestamp": 1646161595841
|
|
64720
|
-
// },
|
|
64721
|
-
// "msg": "success",
|
|
64722
|
-
// "status": 0
|
|
64723
|
-
// }
|
|
64724
|
-
//
|
|
64725
|
-
// swap
|
|
64726
|
-
//
|
|
64727
|
-
// {
|
|
64728
|
-
// "code": 0,
|
|
64729
|
-
// "msg": "success",
|
|
64730
|
-
// "data": {
|
|
64731
|
-
// "bid": [
|
|
64732
|
-
// ["16803.170000","4.96"],
|
|
64733
|
-
// ["16803.140000","11.07"],
|
|
64734
|
-
// ],
|
|
64735
|
-
// "ask": [
|
|
64736
|
-
// ["16803.690000","9.2"],
|
|
64737
|
-
// ["16804.180000","9.43"],
|
|
64738
|
-
// ]
|
|
64739
|
-
// }
|
|
64740
|
-
// }
|
|
64741
|
-
//
|
|
64742
|
-
const data = this.safeValue(response, 'data');
|
|
64743
|
-
const timestamp = this.safeInteger(data, 'timestamp');
|
|
64744
|
-
return this.parseOrderBook(data, market['symbol'], timestamp, 'bid', 'ask');
|
|
64745
|
-
}
|
|
64746
|
-
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
64747
|
-
/**
|
|
64748
|
-
* @method
|
|
64749
|
-
* @name bkex#fetchTrades
|
|
64750
|
-
* @description get the list of most recent trades for a particular symbol
|
|
64751
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#quotationData-5
|
|
64752
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#contract-trades-history
|
|
64753
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
64754
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
64755
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
64756
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64757
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
|
|
64758
|
-
*/
|
|
64759
|
-
await this.loadMarkets();
|
|
64760
|
-
const market = this.market(symbol);
|
|
64761
|
-
const swap = market['swap'];
|
|
64762
|
-
const request = {
|
|
64763
|
-
'symbol': market['id'],
|
|
64764
|
-
};
|
|
64765
|
-
let method = 'publicSpotGetQDeals';
|
|
64766
|
-
if (swap) {
|
|
64767
|
-
method = 'publicSwapGetMarketDeals';
|
|
64768
|
-
}
|
|
64769
|
-
else {
|
|
64770
|
-
if (limit !== undefined) {
|
|
64771
|
-
request['size'] = Math.min(limit, 50);
|
|
64772
|
-
}
|
|
64773
|
-
}
|
|
64774
|
-
const response = await this[method](this.extend(request, params));
|
|
64775
|
-
//
|
|
64776
|
-
// spot
|
|
64777
|
-
//
|
|
64778
|
-
// {
|
|
64779
|
-
// "code": "0",
|
|
64780
|
-
// "data": [
|
|
64781
|
-
// {
|
|
64782
|
-
// "direction": "S",
|
|
64783
|
-
// "price": "43930.63",
|
|
64784
|
-
// "symbol": "BTC_USDT",
|
|
64785
|
-
// "ts": "1646224171992",
|
|
64786
|
-
// "volume": 0.030653
|
|
64787
|
-
// }, // first item is most recent
|
|
64788
|
-
// ],
|
|
64789
|
-
// "msg": "success",
|
|
64790
|
-
// "status": 0
|
|
64791
|
-
// }
|
|
64792
|
-
//
|
|
64793
|
-
// swap
|
|
64794
|
-
//
|
|
64795
|
-
// {
|
|
64796
|
-
// "code": 0,
|
|
64797
|
-
// "msg": "success",
|
|
64798
|
-
// "data": [
|
|
64799
|
-
// {
|
|
64800
|
-
// "symbol": "btc_usdt",
|
|
64801
|
-
// "amount": "0.06",
|
|
64802
|
-
// "price": "17134.66",
|
|
64803
|
-
// "side": "sell",
|
|
64804
|
-
// "time": 1670651851646
|
|
64805
|
-
// },
|
|
64806
|
-
// ]
|
|
64807
|
-
// }
|
|
64808
|
-
//
|
|
64809
|
-
const trades = this.safeValue(response, 'data');
|
|
64810
|
-
return this.parseTrades(trades, market, since, limit);
|
|
64811
|
-
}
|
|
64812
|
-
parseTrade(trade, market = undefined) {
|
|
64813
|
-
const timestamp = this.safeInteger2(trade, 'ts', 'time');
|
|
64814
|
-
const marketId = this.safeString(trade, 'symbol');
|
|
64815
|
-
market = this.safeMarket(marketId, market);
|
|
64816
|
-
const side = this.parseTradeSide(this.safeString2(trade, 'direction', 'side'));
|
|
64817
|
-
const amount = this.safeNumber2(trade, 'volume', 'amount');
|
|
64818
|
-
const price = this.safeNumber(trade, 'price');
|
|
64819
|
-
const type = undefined;
|
|
64820
|
-
let id = this.safeString(trade, 'tid');
|
|
64821
|
-
if (id === undefined) {
|
|
64822
|
-
id = this.syntheticTradeId(market, timestamp, side, amount, price, type);
|
|
64823
|
-
}
|
|
64824
|
-
return this.safeTrade({
|
|
64825
|
-
'id': id,
|
|
64826
|
-
'timestamp': timestamp,
|
|
64827
|
-
'datetime': this.iso8601(timestamp),
|
|
64828
|
-
'symbol': market['symbol'],
|
|
64829
|
-
'order': undefined,
|
|
64830
|
-
'type': type,
|
|
64831
|
-
'side': side,
|
|
64832
|
-
'takerOrMaker': undefined,
|
|
64833
|
-
'price': price,
|
|
64834
|
-
'amount': amount,
|
|
64835
|
-
'cost': undefined,
|
|
64836
|
-
'fee': undefined,
|
|
64837
|
-
'info': trade,
|
|
64838
|
-
}, market);
|
|
64839
|
-
}
|
|
64840
|
-
parseTradeSide(side) {
|
|
64841
|
-
const sides = {
|
|
64842
|
-
'B': 'buy',
|
|
64843
|
-
'S': 'sell',
|
|
64844
|
-
'buy': 'buy',
|
|
64845
|
-
'sell': 'sell',
|
|
64846
|
-
};
|
|
64847
|
-
return this.safeString(sides, side, side);
|
|
64848
|
-
}
|
|
64849
|
-
syntheticTradeId(market = undefined, timestamp = undefined, side = undefined, amount = undefined, price = undefined, orderType = undefined, takerOrMaker = undefined) {
|
|
64850
|
-
// TODO: can be unified method? this approach is being used by multiple exchanges (mexc, woo-coinsbit, dydx, ...)
|
|
64851
|
-
let id = '';
|
|
64852
|
-
if (timestamp !== undefined) {
|
|
64853
|
-
id = this.numberToString(timestamp) + '-' + this.safeString(market, 'id', '_');
|
|
64854
|
-
if (side !== undefined) {
|
|
64855
|
-
id += '-' + side;
|
|
64856
|
-
}
|
|
64857
|
-
if (orderType !== undefined) {
|
|
64858
|
-
id += '-' + orderType;
|
|
64859
|
-
}
|
|
64860
|
-
if (takerOrMaker !== undefined) {
|
|
64861
|
-
id += '-' + takerOrMaker;
|
|
64862
|
-
}
|
|
64863
|
-
if (amount !== undefined) {
|
|
64864
|
-
id += '-' + this.numberToString(amount);
|
|
64865
|
-
}
|
|
64866
|
-
if (price !== undefined) {
|
|
64867
|
-
id += '-' + this.numberToString(price);
|
|
64868
|
-
}
|
|
64869
|
-
}
|
|
64870
|
-
return id;
|
|
64871
|
-
}
|
|
64872
|
-
async fetchBalance(params = {}) {
|
|
64873
|
-
/**
|
|
64874
|
-
* @method
|
|
64875
|
-
* @name bkex#fetchBalance
|
|
64876
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
64877
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64878
|
-
* @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
|
|
64879
|
-
*/
|
|
64880
|
-
await this.loadMarkets();
|
|
64881
|
-
const query = this.omit(params, 'type');
|
|
64882
|
-
const response = await this.privateSpotGetUAccountBalance(query);
|
|
64883
|
-
//
|
|
64884
|
-
// {
|
|
64885
|
-
// "code": "0",
|
|
64886
|
-
// "data": {
|
|
64887
|
-
// "WALLET": [
|
|
64888
|
-
// {
|
|
64889
|
-
// "available": "0.221212121000000000",
|
|
64890
|
-
// "currency": "PHX",
|
|
64891
|
-
// "frozen": "0E-18",
|
|
64892
|
-
// "total": 0.221212121
|
|
64893
|
-
// },
|
|
64894
|
-
// {
|
|
64895
|
-
// "available": "44.959577229600000000",
|
|
64896
|
-
// "currency": "USDT",
|
|
64897
|
-
// "frozen": "0E-18",
|
|
64898
|
-
// "total": 44.9595772296
|
|
64899
|
-
// }
|
|
64900
|
-
// ]
|
|
64901
|
-
// },
|
|
64902
|
-
// "msg": "success",
|
|
64903
|
-
// "status": 0
|
|
64904
|
-
// }
|
|
64905
|
-
//
|
|
64906
|
-
const balances = this.safeValue(response, 'data');
|
|
64907
|
-
const wallets = this.safeValue(balances, 'WALLET', []);
|
|
64908
|
-
const result = { 'info': wallets };
|
|
64909
|
-
for (let i = 0; i < wallets.length; i++) {
|
|
64910
|
-
const wallet = wallets[i];
|
|
64911
|
-
const currencyId = wallet['currency'];
|
|
64912
|
-
const code = this.safeCurrencyCode(currencyId);
|
|
64913
|
-
const account = this.account();
|
|
64914
|
-
account['free'] = this.safeNumber(wallet, 'available');
|
|
64915
|
-
account['used'] = this.safeNumber(wallet, 'frozen');
|
|
64916
|
-
account['total'] = this.safeNumber(wallet, 'total');
|
|
64917
|
-
result[code] = account;
|
|
64918
|
-
}
|
|
64919
|
-
return this.safeBalance(result);
|
|
64920
|
-
}
|
|
64921
|
-
async fetchDepositAddress(code, params = {}) {
|
|
64922
|
-
/**
|
|
64923
|
-
* @method
|
|
64924
|
-
* @name bkex#fetchDepositAddress
|
|
64925
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
64926
|
-
* @param {string} code unified currency code
|
|
64927
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64928
|
-
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
64929
|
-
*/
|
|
64930
|
-
await this.loadMarkets();
|
|
64931
|
-
const currency = this.currency(code);
|
|
64932
|
-
const request = {
|
|
64933
|
-
'currency': currency['id'],
|
|
64934
|
-
};
|
|
64935
|
-
const response = await this.privateSpotGetUWalletAddress(this.extend(request, params));
|
|
64936
|
-
// NOTE: You can only retrieve addresses of already generated wallets - so should already have generated that COIN deposit address in UI. Otherwise, it seems from API you can't create/obtain addresses for those coins.
|
|
64937
|
-
//
|
|
64938
|
-
// {
|
|
64939
|
-
// "code": "0",
|
|
64940
|
-
// "data": [
|
|
64941
|
-
// {
|
|
64942
|
-
// "currency": "BTC",
|
|
64943
|
-
// "address": "1m4k2yUKTSrX6SM9FGgvwMyxQbYtRVi2N",
|
|
64944
|
-
// "memo": ""
|
|
64945
|
-
// }
|
|
64946
|
-
// ],
|
|
64947
|
-
// "msg": "success",
|
|
64948
|
-
// "status": 0
|
|
64949
|
-
// }
|
|
64950
|
-
//
|
|
64951
|
-
const data = this.safeValue(response, 'data', {});
|
|
64952
|
-
return this.parseDepositAddress(data, currency);
|
|
64953
|
-
}
|
|
64954
|
-
parseDepositAddress(data, currency = undefined) {
|
|
64955
|
-
const depositObject = this.safeValue(data, 0);
|
|
64956
|
-
const address = this.safeString(depositObject, 'address');
|
|
64957
|
-
const tag = this.safeString(depositObject, 'memo');
|
|
64958
|
-
const currencyId = this.safeString(depositObject, 'currency');
|
|
64959
|
-
currency = this.safeCurrency(currencyId, currency);
|
|
64960
|
-
return {
|
|
64961
|
-
'currency': currency['code'],
|
|
64962
|
-
'address': address,
|
|
64963
|
-
'tag': tag,
|
|
64964
|
-
'network': undefined,
|
|
64965
|
-
'info': data,
|
|
64966
|
-
};
|
|
64967
|
-
}
|
|
64968
|
-
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
64969
|
-
/**
|
|
64970
|
-
* @method
|
|
64971
|
-
* @name bkex#fetchDeposits
|
|
64972
|
-
* @description fetch all deposits made to an account
|
|
64973
|
-
* @param {string} code unified currency code
|
|
64974
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
64975
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
64976
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
64977
|
-
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
64978
|
-
*/
|
|
64979
|
-
if (code === undefined) {
|
|
64980
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchDeposits() requires code argument');
|
|
64981
|
-
}
|
|
64982
|
-
await this.loadMarkets();
|
|
64983
|
-
const currency = this.currency(code);
|
|
64984
|
-
const request = {
|
|
64985
|
-
'currency': currency['id'],
|
|
64986
|
-
};
|
|
64987
|
-
if (since !== undefined) {
|
|
64988
|
-
request['startTime'] = since;
|
|
64989
|
-
const endTime = this.milliseconds();
|
|
64990
|
-
request['endTime'] = endTime;
|
|
64991
|
-
}
|
|
64992
|
-
if (limit !== undefined) {
|
|
64993
|
-
request['Size'] = limit; // Todo: id api-docs, 'size' is incorrectly required to be in Uppercase
|
|
64994
|
-
}
|
|
64995
|
-
const response = await this.privateSpotGetUWalletDepositRecord(this.extend(request, params));
|
|
64996
|
-
//
|
|
64997
|
-
// {
|
|
64998
|
-
// "code": "0",
|
|
64999
|
-
// "data": {
|
|
65000
|
-
// "data": [
|
|
65001
|
-
// {
|
|
65002
|
-
// "createTime": "1622274255000",
|
|
65003
|
-
// "currency": "BNB",
|
|
65004
|
-
// "fromAddress": "bnb10af52w77pkehgxhnwgeca50q2t2354q4xexa5y",
|
|
65005
|
-
// "hash": "97B982F497782C2777C0F6AD16CEAAC65A93A364B684A23A71CFBB8C010DEEA6",
|
|
65006
|
-
// "id": "2021052923441510234383337",
|
|
65007
|
-
// "status": "0",
|
|
65008
|
-
// "toAddress": "bnb13w64gkc42c0l45m2p5me4qn35z0a3ej9ldks3j_82784659",
|
|
65009
|
-
// "volume": 0.073
|
|
65010
|
-
// }
|
|
65011
|
-
// ],
|
|
65012
|
-
// "total": 1
|
|
65013
|
-
// },
|
|
65014
|
-
// "msg": "success",
|
|
65015
|
-
// "status": 0
|
|
65016
|
-
// }
|
|
65017
|
-
//
|
|
65018
|
-
const data = this.safeValue(response, 'data', {});
|
|
65019
|
-
const dataInner = this.safeValue(data, 'data', []);
|
|
65020
|
-
for (let i = 0; i < dataInner.length; i++) {
|
|
65021
|
-
dataInner[i]['transactType'] = 'deposit';
|
|
65022
|
-
}
|
|
65023
|
-
return this.parseTransactions(dataInner, currency, since, limit, params);
|
|
65024
|
-
}
|
|
65025
|
-
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
65026
|
-
/**
|
|
65027
|
-
* @method
|
|
65028
|
-
* @name bkex#fetchWithdrawals
|
|
65029
|
-
* @description fetch all withdrawals made from an account
|
|
65030
|
-
* @param {string} code unified currency code
|
|
65031
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
65032
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
65033
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65034
|
-
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
65035
|
-
*/
|
|
65036
|
-
if (code === undefined) {
|
|
65037
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchWithdrawals() requires code argument');
|
|
65038
|
-
}
|
|
65039
|
-
await this.loadMarkets();
|
|
65040
|
-
const currency = this.currency(code);
|
|
65041
|
-
const request = {
|
|
65042
|
-
'currency': currency['id'],
|
|
65043
|
-
};
|
|
65044
|
-
if (since !== undefined) {
|
|
65045
|
-
request['startTime'] = since;
|
|
65046
|
-
const endTime = this.milliseconds();
|
|
65047
|
-
request['endTime'] = endTime;
|
|
65048
|
-
}
|
|
65049
|
-
if (limit !== undefined) {
|
|
65050
|
-
request['Size'] = limit; // Todo: id api-docs, 'size' is incorrectly required to be in Uppercase
|
|
65051
|
-
}
|
|
65052
|
-
const response = await this.privateSpotGetUWalletWithdrawRecord(this.extend(request, params));
|
|
65053
|
-
//
|
|
65054
|
-
// {
|
|
65055
|
-
// "code": "0",
|
|
65056
|
-
// "data": {
|
|
65057
|
-
// "data": [
|
|
65058
|
-
// {
|
|
65059
|
-
// ...
|
|
65060
|
-
// }
|
|
65061
|
-
// ],
|
|
65062
|
-
// "total": 1
|
|
65063
|
-
// },
|
|
65064
|
-
// "msg": "success",
|
|
65065
|
-
// "status": 0
|
|
65066
|
-
// }
|
|
65067
|
-
//
|
|
65068
|
-
const data = this.safeValue(response, 'data', {});
|
|
65069
|
-
const dataInner = this.safeValue(data, 'data', []);
|
|
65070
|
-
for (let i = 0; i < dataInner.length; i++) {
|
|
65071
|
-
dataInner[i]['transactType'] = 'withdrawal';
|
|
65072
|
-
}
|
|
65073
|
-
return this.parseTransactions(dataInner, currency, since, limit, params);
|
|
65074
|
-
}
|
|
65075
|
-
parseTransaction(transaction, currency = undefined) {
|
|
65076
|
-
//
|
|
65077
|
-
// fetchDeposits
|
|
65078
|
-
//
|
|
65079
|
-
// {
|
|
65080
|
-
// "createTime": "1622274255000",
|
|
65081
|
-
// "currency": "BNB",
|
|
65082
|
-
// "fromAddress": "bnb10af52w77pkehgxhnwgeca50q2t2354q4xexa5y",
|
|
65083
|
-
// "hash": "97B982F497782C2777C0F6AD16CEAAC65A93A364B684A23A71CFBB8C010DEEA6",
|
|
65084
|
-
// "id": "2021052923441510234383337",
|
|
65085
|
-
// "status": "0",
|
|
65086
|
-
// "toAddress": "bnb13w64gkc42c0l45m2p5me4qn35z0a3ej9ldks3j_82784659",
|
|
65087
|
-
// "volume": 0.073
|
|
65088
|
-
// }
|
|
65089
|
-
//
|
|
65090
|
-
const id = this.safeString(transaction, 'id');
|
|
65091
|
-
const amount = this.safeNumber(transaction, 'volume');
|
|
65092
|
-
const addressTo = this.safeValue(transaction, 'toAddress', {});
|
|
65093
|
-
const addressFrom = this.safeString(transaction, 'fromAddress');
|
|
65094
|
-
const txid = this.safeString(transaction, 'hash');
|
|
65095
|
-
const type = this.safeString(transaction, 'transactType');
|
|
65096
|
-
const timestamp = this.safeInteger(transaction, 'createTime');
|
|
65097
|
-
const currencyId = this.safeString(transaction, 'currency');
|
|
65098
|
-
const code = this.safeCurrencyCode(currencyId, currency);
|
|
65099
|
-
const status = this.parseTransactionStatus(this.safeString(transaction, 'status'));
|
|
65100
|
-
return {
|
|
65101
|
-
'id': id,
|
|
65102
|
-
'currency': code,
|
|
65103
|
-
'amount': amount,
|
|
65104
|
-
'network': undefined,
|
|
65105
|
-
'address': addressTo,
|
|
65106
|
-
'addressTo': addressTo,
|
|
65107
|
-
'addressFrom': addressFrom,
|
|
65108
|
-
'tag': undefined,
|
|
65109
|
-
'tagTo': undefined,
|
|
65110
|
-
'tagFrom': undefined,
|
|
65111
|
-
'status': status,
|
|
65112
|
-
'type': type,
|
|
65113
|
-
'updated': undefined,
|
|
65114
|
-
'txid': txid,
|
|
65115
|
-
'timestamp': timestamp,
|
|
65116
|
-
'datetime': this.iso8601(timestamp),
|
|
65117
|
-
'fee': {
|
|
65118
|
-
'currency': code,
|
|
65119
|
-
'cost': undefined,
|
|
65120
|
-
},
|
|
65121
|
-
'info': transaction,
|
|
65122
|
-
};
|
|
65123
|
-
}
|
|
65124
|
-
parseTransactionStatus(status) {
|
|
65125
|
-
const statuses = {
|
|
65126
|
-
'-1': 'failed',
|
|
65127
|
-
'0': 'ok',
|
|
65128
|
-
'3': 'pending',
|
|
65129
|
-
'5': 'pending',
|
|
65130
|
-
};
|
|
65131
|
-
return this.safeString(statuses, status, status);
|
|
65132
|
-
}
|
|
65133
|
-
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
65134
|
-
/**
|
|
65135
|
-
* @method
|
|
65136
|
-
* @name bkex#createOrder
|
|
65137
|
-
* @description create a trade order
|
|
65138
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
65139
|
-
* @param {string} type 'market' or 'limit'
|
|
65140
|
-
* @param {string} side 'buy' or 'sell'
|
|
65141
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
65142
|
-
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
65143
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65144
|
-
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
65145
|
-
*/
|
|
65146
|
-
await this.loadMarkets();
|
|
65147
|
-
const market = this.market(symbol);
|
|
65148
|
-
const direction = (side === 'buy') ? 'BID' : 'ASK';
|
|
65149
|
-
const request = {
|
|
65150
|
-
'symbol': market['id'],
|
|
65151
|
-
'type': type.toUpperCase(),
|
|
65152
|
-
'volume': this.amountToPrecision(symbol, amount),
|
|
65153
|
-
'direction': direction,
|
|
65154
|
-
};
|
|
65155
|
-
if ((type !== 'market') && (price !== undefined)) {
|
|
65156
|
-
request['price'] = this.priceToPrecision(symbol, price);
|
|
65157
|
-
}
|
|
65158
|
-
const response = await this.privateSpotPostUOrderCreate(this.extend(request, params));
|
|
65159
|
-
//
|
|
65160
|
-
// {
|
|
65161
|
-
// "code": "0",
|
|
65162
|
-
// "data": "2022030302410146630023187",
|
|
65163
|
-
// "msg": "Create Order Successfully",
|
|
65164
|
-
// "status": 0
|
|
65165
|
-
// }
|
|
65166
|
-
//
|
|
65167
|
-
return this.parseOrder(response, market);
|
|
65168
|
-
}
|
|
65169
|
-
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
65170
|
-
/**
|
|
65171
|
-
* @method
|
|
65172
|
-
* @name bkex#cancelOrder
|
|
65173
|
-
* @description cancels an open order
|
|
65174
|
-
* @param {string} id order id
|
|
65175
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
65176
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65177
|
-
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
65178
|
-
*/
|
|
65179
|
-
await this.loadMarkets();
|
|
65180
|
-
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
65181
|
-
const request = {
|
|
65182
|
-
'orderId': id,
|
|
65183
|
-
};
|
|
65184
|
-
const response = await this.privateSpotPostUOrderCancel(this.extend(request, params));
|
|
65185
|
-
//
|
|
65186
|
-
// {
|
|
65187
|
-
// "code": "0",
|
|
65188
|
-
// "data": "2022030303032700030025325",
|
|
65189
|
-
// "status": 0
|
|
65190
|
-
// }
|
|
65191
|
-
//
|
|
65192
|
-
return this.parseOrder(response, market);
|
|
65193
|
-
}
|
|
65194
|
-
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
65195
|
-
/**
|
|
65196
|
-
* @method
|
|
65197
|
-
* @name bkex#cancelOrders
|
|
65198
|
-
* @description cancel multiple orders
|
|
65199
|
-
* @param {string[]} ids order ids
|
|
65200
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
65201
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65202
|
-
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
65203
|
-
*/
|
|
65204
|
-
if (!Array.isArray(ids)) {
|
|
65205
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' cancelOrders() ids argument should be an array');
|
|
65206
|
-
}
|
|
65207
|
-
await this.loadMarkets();
|
|
65208
|
-
const request = {
|
|
65209
|
-
'orders': this.json(ids),
|
|
65210
|
-
};
|
|
65211
|
-
const response = await this.privateSpotPostUOrderBatchCancel(this.extend(request, params));
|
|
65212
|
-
// {
|
|
65213
|
-
// "code": 0,
|
|
65214
|
-
// "msg": "success",
|
|
65215
|
-
// "data": {
|
|
65216
|
-
// "success": 2,
|
|
65217
|
-
// "fail": 0,
|
|
65218
|
-
// "results": ["2019062312313131231"," 2019063123131312313"]
|
|
65219
|
-
// }
|
|
65220
|
-
// }
|
|
65221
|
-
const data = this.safeValue(response, 'data');
|
|
65222
|
-
const results = this.safeValue(data, 'results');
|
|
65223
|
-
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
65224
|
-
return this.parseOrders(results, market, undefined, undefined, params);
|
|
65225
|
-
}
|
|
65226
|
-
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
65227
|
-
/**
|
|
65228
|
-
* @method
|
|
65229
|
-
* @name bkex#fetchOpenOrders
|
|
65230
|
-
* @description fetch all unfilled currently open orders
|
|
65231
|
-
* @param {string} symbol unified market symbol
|
|
65232
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
65233
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
65234
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65235
|
-
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
65236
|
-
*/
|
|
65237
|
-
if (symbol === undefined) {
|
|
65238
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
65239
|
-
}
|
|
65240
|
-
await this.loadMarkets();
|
|
65241
|
-
const market = this.market(symbol);
|
|
65242
|
-
const request = {
|
|
65243
|
-
'symbol': market['id'],
|
|
65244
|
-
};
|
|
65245
|
-
if (limit !== undefined) {
|
|
65246
|
-
request['size'] = limit; // Todo: id api-docs, 'size' is incorrectly required to be in Uppercase
|
|
65247
|
-
}
|
|
65248
|
-
const response = await this.privateSpotGetUOrderOpenOrders(this.extend(request, params));
|
|
65249
|
-
//
|
|
65250
|
-
// {
|
|
65251
|
-
// "code": "0",
|
|
65252
|
-
// "data": {
|
|
65253
|
-
// "data": [
|
|
65254
|
-
// {
|
|
65255
|
-
// "createdTime": "1646248301418",
|
|
65256
|
-
// "dealVolume": "0E-18",
|
|
65257
|
-
// "direction": "BID",
|
|
65258
|
-
// "frozenVolumeByOrder": "2.421300000000000000",
|
|
65259
|
-
// "id": "2022030303114141830007699",
|
|
65260
|
-
// "price": "0.150000000000000000",
|
|
65261
|
-
// "source": "WALLET",
|
|
65262
|
-
// "status": "0",
|
|
65263
|
-
// "symbol": "BKK_USDT",
|
|
65264
|
-
// "totalVolume": "16.142000000000000000",
|
|
65265
|
-
// "type": "LIMIT"
|
|
65266
|
-
// }
|
|
65267
|
-
// ],
|
|
65268
|
-
// "pageRequest": {
|
|
65269
|
-
// "asc": false,
|
|
65270
|
-
// "orderBy": "id",
|
|
65271
|
-
// "page": "1",
|
|
65272
|
-
// "size": 10
|
|
65273
|
-
// },
|
|
65274
|
-
// "total": 1
|
|
65275
|
-
// },
|
|
65276
|
-
// "msg": "success",
|
|
65277
|
-
// "status": 0
|
|
65278
|
-
// }
|
|
65279
|
-
//
|
|
65280
|
-
const result = this.safeValue(response, 'data');
|
|
65281
|
-
const innerData = this.safeValue(result, 'data');
|
|
65282
|
-
return this.parseOrders(innerData, market, since, limit, params);
|
|
65283
|
-
}
|
|
65284
|
-
async fetchOpenOrder(id, symbol = undefined, params = {}) {
|
|
65285
|
-
/**
|
|
65286
|
-
* @method
|
|
65287
|
-
* @name bkex#fetchOpenOrder
|
|
65288
|
-
* @description fetch an open order by it's id
|
|
65289
|
-
* @param {string} id order id
|
|
65290
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
65291
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65292
|
-
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
65293
|
-
*/
|
|
65294
|
-
const request = {
|
|
65295
|
-
'orderId': id,
|
|
65296
|
-
};
|
|
65297
|
-
const response = await this.privateSpotGetUOrderOpenOrderDetail(this.extend(request, params));
|
|
65298
|
-
//
|
|
65299
|
-
// {
|
|
65300
|
-
// "code": "0",
|
|
65301
|
-
// "data": {
|
|
65302
|
-
// "createdTime": "1646248301418",
|
|
65303
|
-
// "dealAvgPrice": "0",
|
|
65304
|
-
// "dealVolume": "0E-18",
|
|
65305
|
-
// "direction": "BID",
|
|
65306
|
-
// "frozenVolumeByOrder": "2.421300000000000000",
|
|
65307
|
-
// "id": "2022030303114141830002452",
|
|
65308
|
-
// "price": "0.150000000000000000",
|
|
65309
|
-
// "source": "WALLET",
|
|
65310
|
-
// "status": "0",
|
|
65311
|
-
// "symbol": "BKK_USDT",
|
|
65312
|
-
// "totalVolume": "16.142000000000000000",
|
|
65313
|
-
// "type": "LIMIT",
|
|
65314
|
-
// "updateTime": 1646248301418
|
|
65315
|
-
// },
|
|
65316
|
-
// "msg": "success",
|
|
65317
|
-
// "status": 0
|
|
65318
|
-
// }
|
|
65319
|
-
//
|
|
65320
|
-
const data = this.safeValue(response, 'data');
|
|
65321
|
-
const market = (symbol !== undefined) ? this.market(symbol) : undefined;
|
|
65322
|
-
return this.parseOrder(data, market);
|
|
65323
|
-
}
|
|
65324
|
-
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
65325
|
-
/**
|
|
65326
|
-
* @method
|
|
65327
|
-
* @name bkex#fetchClosedOrders
|
|
65328
|
-
* @description fetches information on multiple closed orders made by the user
|
|
65329
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
65330
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
65331
|
-
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
65332
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65333
|
-
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
65334
|
-
*/
|
|
65335
|
-
if (symbol === undefined) {
|
|
65336
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchClosedOrders() requires a symbol argument');
|
|
65337
|
-
}
|
|
65338
|
-
await this.loadMarkets();
|
|
65339
|
-
const market = this.market(symbol);
|
|
65340
|
-
const request = {
|
|
65341
|
-
'symbol': market['id'],
|
|
65342
|
-
};
|
|
65343
|
-
if (limit !== undefined) {
|
|
65344
|
-
request['size'] = limit; // Todo: id api-docs, 'size' is incorrectly required to be in Uppercase
|
|
65345
|
-
}
|
|
65346
|
-
if (since !== undefined) {
|
|
65347
|
-
request['startTime'] = since;
|
|
65348
|
-
}
|
|
65349
|
-
const response = await this.privateSpotGetUOrderHistoryOrders(this.extend(request, params));
|
|
65350
|
-
//
|
|
65351
|
-
// {
|
|
65352
|
-
// "code": "0",
|
|
65353
|
-
// "data": {
|
|
65354
|
-
// "data": [
|
|
65355
|
-
// {
|
|
65356
|
-
// "createdTime": "1646247807000",
|
|
65357
|
-
// "dealAvgPrice": "0",
|
|
65358
|
-
// "dealVolume": "0",
|
|
65359
|
-
// "direction": "BID",
|
|
65360
|
-
// "frozenVolumeByOrder": "1.65",
|
|
65361
|
-
// "id": "2022030303032700030025943",
|
|
65362
|
-
// "price": "0.15",
|
|
65363
|
-
// "source": "WALLET",
|
|
65364
|
-
// "status": "2",
|
|
65365
|
-
// "symbol": "BKK_USDT",
|
|
65366
|
-
// "totalVolume": "11",
|
|
65367
|
-
// "type": "LIMIT",
|
|
65368
|
-
// "updateTime": 1646247852558
|
|
65369
|
-
// },
|
|
65370
|
-
// ],
|
|
65371
|
-
// "pageRequest": {
|
|
65372
|
-
// "asc": false,
|
|
65373
|
-
// "orderBy": "id",
|
|
65374
|
-
// "page": "1",
|
|
65375
|
-
// "size": 10
|
|
65376
|
-
// },
|
|
65377
|
-
// "total": 6
|
|
65378
|
-
// },
|
|
65379
|
-
// "msg": "success",
|
|
65380
|
-
// "status": 0
|
|
65381
|
-
// }
|
|
65382
|
-
//
|
|
65383
|
-
const result = this.safeValue(response, 'data');
|
|
65384
|
-
const innerData = this.safeValue(result, 'data');
|
|
65385
|
-
return this.parseOrders(innerData, market, since, limit, params);
|
|
65386
|
-
}
|
|
65387
|
-
parseOrder(order, market = undefined) {
|
|
65388
|
-
//
|
|
65389
|
-
// fetchOpenOrders
|
|
65390
|
-
//
|
|
65391
|
-
// {
|
|
65392
|
-
// "createdTime": "1646248301418",
|
|
65393
|
-
// "dealVolume": "0E-18",
|
|
65394
|
-
// "direction": "BID",
|
|
65395
|
-
// "frozenVolumeByOrder": "2.421300000000000000",
|
|
65396
|
-
// "id": "2022030303114141830007699",
|
|
65397
|
-
// "price": "0.150000000000000000",
|
|
65398
|
-
// "source": "WALLET",
|
|
65399
|
-
// "status": "0",
|
|
65400
|
-
// "symbol": "BKK_USDT",
|
|
65401
|
-
// "totalVolume": "16.142000000000000000",
|
|
65402
|
-
// "type": "LIMIT"
|
|
65403
|
-
// "stopPrice": "0.14", // present only for 'stop' order types
|
|
65404
|
-
// "operator": ">=" // present only for 'stop' order types
|
|
65405
|
-
// "dealAvgPrice": "0", // only present in 'fetchOrder' & 'fetchClosedOrders'
|
|
65406
|
-
// "updateTime": 1646248301418 // only present in 'fetchOrder' & 'fetchClosedOrders'
|
|
65407
|
-
// }
|
|
65408
|
-
//
|
|
65409
|
-
const timestamp = this.safeInteger(order, 'createdTime');
|
|
65410
|
-
const updateTime = this.safeInteger(order, 'updateTime');
|
|
65411
|
-
const filled = this.safeString(order, 'dealVolume');
|
|
65412
|
-
const side = this.parseOrderSide(this.safeString(order, 'direction'));
|
|
65413
|
-
const id = this.safeString2(order, 'id', 'data');
|
|
65414
|
-
const price = this.safeString(order, 'price');
|
|
65415
|
-
const rawStatus = this.safeString(order, 'status');
|
|
65416
|
-
const rawType = this.safeString(order, 'type');
|
|
65417
|
-
const type = this.parseOrderType(rawType);
|
|
65418
|
-
let postOnly = false;
|
|
65419
|
-
if (rawType === 'LIMIT_MAKER') {
|
|
65420
|
-
postOnly = true;
|
|
65421
|
-
}
|
|
65422
|
-
let status = undefined;
|
|
65423
|
-
if (timestamp !== undefined) {
|
|
65424
|
-
// cancelOrder handling
|
|
65425
|
-
status = this.parseOrderStatus(rawStatus);
|
|
65426
|
-
}
|
|
65427
|
-
const marketId = this.safeString(order, 'symbol');
|
|
65428
|
-
market = this.safeMarket(marketId, market);
|
|
65429
|
-
const amount = this.safeString(order, 'totalVolume');
|
|
65430
|
-
const stopPrice = this.safeNumber(order, 'stopPrice');
|
|
65431
|
-
const average = this.safeString(order, 'dealAvgPrice');
|
|
65432
|
-
return this.safeOrder({
|
|
65433
|
-
'id': id,
|
|
65434
|
-
'clientOrderId': undefined,
|
|
65435
|
-
'timestamp': timestamp,
|
|
65436
|
-
'datetime': this.iso8601(timestamp),
|
|
65437
|
-
'lastTradeTimestamp': updateTime,
|
|
65438
|
-
'status': status,
|
|
65439
|
-
'symbol': market['symbol'],
|
|
65440
|
-
'type': type,
|
|
65441
|
-
'timeInForce': undefined,
|
|
65442
|
-
'postOnly': postOnly,
|
|
65443
|
-
'side': side,
|
|
65444
|
-
'price': price,
|
|
65445
|
-
'stopPrice': stopPrice,
|
|
65446
|
-
'triggerPrice': stopPrice,
|
|
65447
|
-
'average': average,
|
|
65448
|
-
'amount': amount,
|
|
65449
|
-
'filled': filled,
|
|
65450
|
-
'remaining': undefined,
|
|
65451
|
-
'cost': undefined,
|
|
65452
|
-
'trades': undefined,
|
|
65453
|
-
'fee': undefined,
|
|
65454
|
-
'info': order,
|
|
65455
|
-
}, market);
|
|
65456
|
-
}
|
|
65457
|
-
parseOrderSide(side) {
|
|
65458
|
-
const sides = {
|
|
65459
|
-
'BID': 'buy',
|
|
65460
|
-
'ASK': 'sell',
|
|
65461
|
-
};
|
|
65462
|
-
return this.safeString(sides, side, side);
|
|
65463
|
-
}
|
|
65464
|
-
parseOrderStatus(status) {
|
|
65465
|
-
const statuses = {
|
|
65466
|
-
'0': 'open',
|
|
65467
|
-
'1': 'closed',
|
|
65468
|
-
'2': 'canceled',
|
|
65469
|
-
'3': 'open',
|
|
65470
|
-
};
|
|
65471
|
-
return this.safeString(statuses, status, status);
|
|
65472
|
-
}
|
|
65473
|
-
parseOrderType(status) {
|
|
65474
|
-
const statuses = {
|
|
65475
|
-
'MARKET': 'market',
|
|
65476
|
-
'LIMIT': 'limit',
|
|
65477
|
-
'LIMIT_MAKER': 'limit',
|
|
65478
|
-
'STOP_LIMIT': 'limit',
|
|
65479
|
-
};
|
|
65480
|
-
return this.safeString(statuses, status, status);
|
|
65481
|
-
}
|
|
65482
|
-
async fetchTransactionFees(codes = undefined, params = {}) {
|
|
65483
|
-
/**
|
|
65484
|
-
* @method
|
|
65485
|
-
* @name bkex#fetchTransactionFees
|
|
65486
|
-
* @deprecated
|
|
65487
|
-
* @description please use fetchDepositWithdrawFees instead
|
|
65488
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#basicInformation-2
|
|
65489
|
-
* @param {string[]|undefined} codes list of unified currency codes
|
|
65490
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65491
|
-
* @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
65492
|
-
*/
|
|
65493
|
-
await this.loadMarkets();
|
|
65494
|
-
const response = await this.publicSpotGetCommonCurrencys(params);
|
|
65495
|
-
//
|
|
65496
|
-
// {
|
|
65497
|
-
// "msg": "success",
|
|
65498
|
-
// "code": "0",
|
|
65499
|
-
// "data": [
|
|
65500
|
-
// {
|
|
65501
|
-
// "currency": "ETH",
|
|
65502
|
-
// "maxWithdrawOneDay": 2000,
|
|
65503
|
-
// "maxWithdrawSingle": 2000,
|
|
65504
|
-
// "minWithdrawSingle": 0.1,
|
|
65505
|
-
// "supportDeposit": true,
|
|
65506
|
-
// "supportTrade": true,
|
|
65507
|
-
// "supportWithdraw": true,
|
|
65508
|
-
// "withdrawFee": 0.008
|
|
65509
|
-
// },
|
|
65510
|
-
// {
|
|
65511
|
-
// "currency": "BTC",
|
|
65512
|
-
// "maxWithdrawOneDay": 100,
|
|
65513
|
-
// "maxWithdrawSingle": 100,
|
|
65514
|
-
// "minWithdrawSingle": 0.01,
|
|
65515
|
-
// "supportDeposit": true,
|
|
65516
|
-
// "supportTrade": true,
|
|
65517
|
-
// "supportWithdraw": true,
|
|
65518
|
-
// "withdrawFee": 0.008
|
|
65519
|
-
// }
|
|
65520
|
-
// ]
|
|
65521
|
-
// }
|
|
65522
|
-
//
|
|
65523
|
-
return this.parseTransactionFees(response, codes);
|
|
65524
|
-
}
|
|
65525
|
-
parseTransactionFees(response, codes = undefined) {
|
|
65526
|
-
const data = this.safeValue(response, 'data');
|
|
65527
|
-
const result = {};
|
|
65528
|
-
for (let i = 0; i < data.length; i++) {
|
|
65529
|
-
const entry = data[i];
|
|
65530
|
-
const currencyId = this.safeString(entry, 'currency');
|
|
65531
|
-
const currency = this.safeCurrency(currencyId);
|
|
65532
|
-
const code = this.safeString(currency, 'code');
|
|
65533
|
-
if ((codes === undefined) || (this.inArray(code, codes))) {
|
|
65534
|
-
result[code] = {
|
|
65535
|
-
'withdraw': this.parseTransactionFee(entry),
|
|
65536
|
-
'deposit': undefined,
|
|
65537
|
-
'info': entry,
|
|
65538
|
-
};
|
|
65539
|
-
}
|
|
65540
|
-
}
|
|
65541
|
-
return result;
|
|
65542
|
-
}
|
|
65543
|
-
parseTransactionFee(transaction, currency = undefined) {
|
|
65544
|
-
//
|
|
65545
|
-
// {
|
|
65546
|
-
// "currency": "ETH",
|
|
65547
|
-
// "maxWithdrawOneDay": 2000,
|
|
65548
|
-
// "maxWithdrawSingle": 2000,
|
|
65549
|
-
// "minWithdrawSingle": 0.1,
|
|
65550
|
-
// "supportDeposit": true,
|
|
65551
|
-
// "supportTrade": true,
|
|
65552
|
-
// "supportWithdraw": true,
|
|
65553
|
-
// "withdrawFee": 0.008
|
|
65554
|
-
// }
|
|
65555
|
-
//
|
|
65556
|
-
return this.safeNumber(transaction, 'withdrawFee');
|
|
65557
|
-
}
|
|
65558
|
-
async fetchDepositWithdrawFees(codes = undefined, params = {}) {
|
|
65559
|
-
/**
|
|
65560
|
-
* @method
|
|
65561
|
-
* @name bkex#fetchDepositWithdrawFees
|
|
65562
|
-
* @description fetch deposit and withdraw fees
|
|
65563
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#basicInformation-2
|
|
65564
|
-
* @param {string[]|undefined} codes list of unified currency codes
|
|
65565
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65566
|
-
* @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
65567
|
-
*/
|
|
65568
|
-
await this.loadMarkets();
|
|
65569
|
-
const response = await this.publicSpotGetCommonCurrencys(params);
|
|
65570
|
-
//
|
|
65571
|
-
// {
|
|
65572
|
-
// "msg": "success",
|
|
65573
|
-
// "code": "0",
|
|
65574
|
-
// "data": [
|
|
65575
|
-
// {
|
|
65576
|
-
// "currency": "ETH",
|
|
65577
|
-
// "maxWithdrawOneDay": 2000,
|
|
65578
|
-
// "maxWithdrawSingle": 2000,
|
|
65579
|
-
// "minWithdrawSingle": 0.1,
|
|
65580
|
-
// "supportDeposit": true,
|
|
65581
|
-
// "supportTrade": true,
|
|
65582
|
-
// "supportWithdraw": true,
|
|
65583
|
-
// "withdrawFee": 0.008
|
|
65584
|
-
// },
|
|
65585
|
-
// {
|
|
65586
|
-
// "currency": "BTC",
|
|
65587
|
-
// "maxWithdrawOneDay": 100,
|
|
65588
|
-
// "maxWithdrawSingle": 100,
|
|
65589
|
-
// "minWithdrawSingle": 0.01,
|
|
65590
|
-
// "supportDeposit": true,
|
|
65591
|
-
// "supportTrade": true,
|
|
65592
|
-
// "supportWithdraw": true,
|
|
65593
|
-
// "withdrawFee": 0.008
|
|
65594
|
-
// }
|
|
65595
|
-
// ]
|
|
65596
|
-
// }
|
|
65597
|
-
//
|
|
65598
|
-
const data = this.safeValue(response, 'data');
|
|
65599
|
-
return this.parseDepositWithdrawFees(data, codes, 'currency');
|
|
65600
|
-
}
|
|
65601
|
-
parseDepositWithdrawFee(fee, currency = undefined) {
|
|
65602
|
-
//
|
|
65603
|
-
// {
|
|
65604
|
-
// "currency": "ETH",
|
|
65605
|
-
// "maxWithdrawOneDay": 2000,
|
|
65606
|
-
// "maxWithdrawSingle": 2000,
|
|
65607
|
-
// "minWithdrawSingle": 0.1,
|
|
65608
|
-
// "supportDeposit": true,
|
|
65609
|
-
// "supportTrade": true,
|
|
65610
|
-
// "supportWithdraw": true,
|
|
65611
|
-
// "withdrawFee": 0.008
|
|
65612
|
-
// }
|
|
65613
|
-
//
|
|
65614
|
-
const result = this.depositWithdrawFee(fee);
|
|
65615
|
-
result['withdraw']['fee'] = this.safeNumber(fee, 'withdrawFee');
|
|
65616
|
-
return result;
|
|
65617
|
-
}
|
|
65618
|
-
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
65619
|
-
/**
|
|
65620
|
-
* @method
|
|
65621
|
-
* @name bkex#fetchFundingRateHistory
|
|
65622
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#contract-fundingRate
|
|
65623
|
-
* @description fetches historical funding rate prices
|
|
65624
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
65625
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
65626
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
|
|
65627
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65628
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
|
|
65629
|
-
*/
|
|
65630
|
-
if (symbol === undefined) {
|
|
65631
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
65632
|
-
}
|
|
65633
|
-
await this.loadMarkets();
|
|
65634
|
-
const market = this.market(symbol);
|
|
65635
|
-
const request = {
|
|
65636
|
-
'symbol': market['id'],
|
|
65637
|
-
};
|
|
65638
|
-
const response = await this.publicSwapGetMarketFundingRate(this.extend(request, params));
|
|
65639
|
-
//
|
|
65640
|
-
// {
|
|
65641
|
-
// "code": 0,
|
|
65642
|
-
// "msg": "success",
|
|
65643
|
-
// "data": [
|
|
65644
|
-
// {
|
|
65645
|
-
// "symbol": "btc_usdt",
|
|
65646
|
-
// "rate": "-0.00008654",
|
|
65647
|
-
// "time": 1670658302128
|
|
65648
|
-
// },
|
|
65649
|
-
// ]
|
|
65650
|
-
// }
|
|
65651
|
-
//
|
|
65652
|
-
const data = this.safeValue(response, 'data', []);
|
|
65653
|
-
const rates = [];
|
|
65654
|
-
for (let i = 0; i < data.length; i++) {
|
|
65655
|
-
const entry = data[i];
|
|
65656
|
-
const marketId = this.safeString(entry, 'symbol');
|
|
65657
|
-
const symbolInner = this.safeSymbol(marketId);
|
|
65658
|
-
const timestamp = this.safeInteger(entry, 'time');
|
|
65659
|
-
rates.push({
|
|
65660
|
-
'info': entry,
|
|
65661
|
-
'symbol': symbolInner,
|
|
65662
|
-
'fundingRate': this.safeNumber(entry, 'rate'),
|
|
65663
|
-
'timestamp': timestamp,
|
|
65664
|
-
'datetime': this.iso8601(timestamp),
|
|
65665
|
-
});
|
|
65666
|
-
}
|
|
65667
|
-
const sorted = this.sortBy(rates, 'timestamp');
|
|
65668
|
-
return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
|
|
65669
|
-
}
|
|
65670
|
-
async fetchMarketLeverageTiers(symbol, params = {}) {
|
|
65671
|
-
/**
|
|
65672
|
-
* @method
|
|
65673
|
-
* @name bkex#fetchMarketLeverageTiers
|
|
65674
|
-
* @see https://bkexapi.github.io/docs/api_en.htm?shell#contract-riskLimit
|
|
65675
|
-
* @description retrieve information on the maximum leverage, for different trade sizes for a single market
|
|
65676
|
-
* @param {string} symbol unified market symbol
|
|
65677
|
-
* @param {object} [params] extra parameters specific to the bkex api endpoint
|
|
65678
|
-
* @returns {object} a [leverage tiers structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}
|
|
65679
|
-
*/
|
|
65680
|
-
await this.loadMarkets();
|
|
65681
|
-
const market = this.market(symbol);
|
|
65682
|
-
if (!market['swap']) {
|
|
65683
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchMarketLeverageTiers() supports swap markets only');
|
|
65684
|
-
}
|
|
65685
|
-
const request = {
|
|
65686
|
-
'symbol': market['id'],
|
|
65687
|
-
};
|
|
65688
|
-
const response = await this.publicSwapGetMarketRiskLimit(this.extend(request, params));
|
|
65689
|
-
//
|
|
65690
|
-
// {
|
|
65691
|
-
// "code": 0,
|
|
65692
|
-
// "msg": "success",
|
|
65693
|
-
// "data": [
|
|
65694
|
-
// {
|
|
65695
|
-
// "symbol": "btc_usdt",
|
|
65696
|
-
// "minValue": "0",
|
|
65697
|
-
// "maxValue": "500000",
|
|
65698
|
-
// "maxLeverage": 100,
|
|
65699
|
-
// "maintenanceMarginRate": "0.005"
|
|
65700
|
-
// },
|
|
65701
|
-
// ]
|
|
65702
|
-
// }
|
|
65703
|
-
//
|
|
65704
|
-
const data = this.safeValue(response, 'data', []);
|
|
65705
|
-
return this.parseMarketLeverageTiers(data, market);
|
|
65706
|
-
}
|
|
65707
|
-
parseMarketLeverageTiers(info, market = undefined) {
|
|
65708
|
-
//
|
|
65709
|
-
// [
|
|
65710
|
-
// {
|
|
65711
|
-
// "symbol": "btc_usdt",
|
|
65712
|
-
// "minValue": "0",
|
|
65713
|
-
// "maxValue": "500000",
|
|
65714
|
-
// "maxLeverage": 100,
|
|
65715
|
-
// "maintenanceMarginRate": "0.005"
|
|
65716
|
-
// },
|
|
65717
|
-
// ]
|
|
65718
|
-
//
|
|
65719
|
-
const tiers = [];
|
|
65720
|
-
for (let i = 0; i < info.length; i++) {
|
|
65721
|
-
const tier = info[i];
|
|
65722
|
-
const marketId = this.safeString(info, 'symbol');
|
|
65723
|
-
market = this.safeMarket(marketId, market);
|
|
65724
|
-
tiers.push({
|
|
65725
|
-
'tier': this.sum(i, 1),
|
|
65726
|
-
'currency': market['settle'],
|
|
65727
|
-
'minNotional': this.safeNumber(tier, 'minValue'),
|
|
65728
|
-
'maxNotional': this.safeNumber(tier, 'maxValue'),
|
|
65729
|
-
'maintenanceMarginRate': this.safeNumber(tier, 'maintenanceMarginRate'),
|
|
65730
|
-
'maxLeverage': this.safeNumber(tier, 'maxLeverage'),
|
|
65731
|
-
'info': tier,
|
|
65732
|
-
});
|
|
65733
|
-
}
|
|
65734
|
-
return tiers;
|
|
65735
|
-
}
|
|
65736
|
-
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
65737
|
-
const signed = api[0] === 'private';
|
|
65738
|
-
const endpoint = api[1];
|
|
65739
|
-
const pathPart = (endpoint === 'spot') ? this.version : 'fapi/' + this.version;
|
|
65740
|
-
let url = this.urls['api'][endpoint] + '/' + pathPart + this.implodeParams(path, params);
|
|
65741
|
-
params = this.omit(params, this.extractParams(path));
|
|
65742
|
-
let paramsSortedEncoded = '';
|
|
65743
|
-
if (Object.keys(params).length) {
|
|
65744
|
-
paramsSortedEncoded = this.rawencode(this.keysort(params));
|
|
65745
|
-
if (method === 'GET') {
|
|
65746
|
-
url += '?' + paramsSortedEncoded;
|
|
65747
|
-
}
|
|
65748
|
-
}
|
|
65749
|
-
if (signed) {
|
|
65750
|
-
this.checkRequiredCredentials();
|
|
65751
|
-
const signature = this.hmac(this.encode(paramsSortedEncoded), this.encode(this.secret), _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_3__/* .sha256 */ .J);
|
|
65752
|
-
headers = {
|
|
65753
|
-
'Cache-Control': 'no-cache',
|
|
65754
|
-
'Content-type': 'application/x-www-form-urlencoded',
|
|
65755
|
-
'X_ACCESS_KEY': this.apiKey,
|
|
65756
|
-
'X_SIGNATURE': signature,
|
|
65757
|
-
};
|
|
65758
|
-
if (method !== 'GET') {
|
|
65759
|
-
body = paramsSortedEncoded;
|
|
65760
|
-
}
|
|
65761
|
-
}
|
|
65762
|
-
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
65763
|
-
}
|
|
65764
|
-
handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {
|
|
65765
|
-
if (response === undefined) {
|
|
65766
|
-
return undefined;
|
|
65767
|
-
}
|
|
65768
|
-
//
|
|
65769
|
-
// success
|
|
65770
|
-
//
|
|
65771
|
-
// {
|
|
65772
|
-
// "code": "0",
|
|
65773
|
-
// "msg": "success",
|
|
65774
|
-
// "status": 0,
|
|
65775
|
-
// "data": [...],
|
|
65776
|
-
// }
|
|
65777
|
-
//
|
|
65778
|
-
//
|
|
65779
|
-
// action error
|
|
65780
|
-
//
|
|
65781
|
-
// {
|
|
65782
|
-
// "code":1005,
|
|
65783
|
-
// "msg":"BKK:Not Enough balance",
|
|
65784
|
-
// "status":0
|
|
65785
|
-
// }
|
|
65786
|
-
//
|
|
65787
|
-
//
|
|
65788
|
-
// HTTP error
|
|
65789
|
-
//
|
|
65790
|
-
// {
|
|
65791
|
-
// "timestamp": "1646041085490",
|
|
65792
|
-
// "status": "403",
|
|
65793
|
-
// "error": "Forbidden",
|
|
65794
|
-
// "message": "签名错误",
|
|
65795
|
-
// "path": "/whatever/incorrect/path"
|
|
65796
|
-
// }
|
|
65797
|
-
//
|
|
65798
|
-
const message = this.safeValue(response, 'msg');
|
|
65799
|
-
if (message === 'success') {
|
|
65800
|
-
return undefined;
|
|
65801
|
-
}
|
|
65802
|
-
const responseCode = this.safeString(response, 'code');
|
|
65803
|
-
if (responseCode !== '0') {
|
|
65804
|
-
const feedback = this.id + ' ' + body;
|
|
65805
|
-
this.throwExactlyMatchedException(this.exceptions['exact'], responseCode, feedback);
|
|
65806
|
-
this.throwBroadlyMatchedException(this.exceptions['broad'], body, feedback);
|
|
65807
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(feedback);
|
|
65808
|
-
}
|
|
65809
|
-
return undefined;
|
|
65810
|
-
}
|
|
65811
|
-
}
|
|
65812
|
-
|
|
65813
|
-
|
|
65814
64179
|
/***/ }),
|
|
65815
64180
|
|
|
65816
64181
|
/***/ 9476:
|
|
@@ -65854,6 +64219,9 @@ class bl3p extends _abstract_bl3p_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
65854
64219
|
'cancelOrder': true,
|
|
65855
64220
|
'createOrder': true,
|
|
65856
64221
|
'createReduceOnlyOrder': false,
|
|
64222
|
+
'createStopLimitOrder': false,
|
|
64223
|
+
'createStopMarketOrder': false,
|
|
64224
|
+
'createStopOrder': false,
|
|
65857
64225
|
'fetchBalance': true,
|
|
65858
64226
|
'fetchBorrowRate': false,
|
|
65859
64227
|
'fetchBorrowRateHistories': false,
|
|
@@ -66186,12 +64554,17 @@ class bl3p extends _abstract_bl3p_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
66186
64554
|
* @method
|
|
66187
64555
|
* @name bl3p#createOrder
|
|
66188
64556
|
* @description create a trade order
|
|
64557
|
+
* @see https://github.com/BitonicNL/bl3p-api/blob/master/examples/nodejs/example.md#21---create-an-order
|
|
66189
64558
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
66190
64559
|
* @param {string} type 'market' or 'limit'
|
|
66191
64560
|
* @param {string} side 'buy' or 'sell'
|
|
66192
64561
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
66193
64562
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
66194
64563
|
* @param {object} [params] extra parameters specific to the bl3p api endpoint
|
|
64564
|
+
*
|
|
64565
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
64566
|
+
* @param {int} [params.amount_funds] maximal EUR amount to spend (*1e5)
|
|
64567
|
+
* @param {string} [params.fee_currency] 'EUR' or 'BTC'
|
|
66195
64568
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
66196
64569
|
*/
|
|
66197
64570
|
const market = this.market(symbol);
|
|
@@ -72464,12 +70837,12 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
72464
70837
|
'110021': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
72465
70838
|
'110022': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
72466
70839
|
'110023': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
72467
|
-
'110024': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
72468
|
-
'110025': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
72469
|
-
'110026': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
72470
|
-
'110027': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
72471
|
-
'110028': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
72472
|
-
'110029': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
70840
|
+
'110024': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
70841
|
+
'110025': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NoChange,
|
|
70842
|
+
'110026': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.MarginModeAlreadySet,
|
|
70843
|
+
'110027': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NoChange,
|
|
70844
|
+
'110028': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
70845
|
+
'110029': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
72473
70846
|
'110030': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
72474
70847
|
'110031': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
72475
70848
|
'110032': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
@@ -75461,12 +73834,12 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
75461
73834
|
}
|
|
75462
73835
|
else if (isStopLoss || isTakeProfit) {
|
|
75463
73836
|
if (isStopLoss) {
|
|
75464
|
-
const
|
|
75465
|
-
request['stopLoss'] = this.priceToPrecision(symbol,
|
|
73837
|
+
const slTriggerPrice = this.safeValue2(stopLoss, 'triggerPrice', 'stopPrice', stopLoss);
|
|
73838
|
+
request['stopLoss'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
75466
73839
|
}
|
|
75467
73840
|
if (isTakeProfit) {
|
|
75468
|
-
const
|
|
75469
|
-
request['takeProfit'] = this.priceToPrecision(symbol,
|
|
73841
|
+
const tpTriggerPrice = this.safeValue2(takeProfit, 'triggerPrice', 'stopPrice', takeProfit);
|
|
73842
|
+
request['takeProfit'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
75470
73843
|
}
|
|
75471
73844
|
}
|
|
75472
73845
|
if (market['spot']) {
|
|
@@ -75575,12 +73948,12 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
75575
73948
|
}
|
|
75576
73949
|
else if (isStopLoss || isTakeProfit) {
|
|
75577
73950
|
if (isStopLoss) {
|
|
75578
|
-
const
|
|
75579
|
-
request['stopLoss'] = this.priceToPrecision(symbol,
|
|
73951
|
+
const slTriggerPrice = this.safeValue2(stopLoss, 'triggerPrice', 'stopPrice', stopLoss);
|
|
73952
|
+
request['stopLoss'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
75580
73953
|
}
|
|
75581
73954
|
if (isTakeProfit) {
|
|
75582
|
-
const
|
|
75583
|
-
request['takeProfit'] = this.priceToPrecision(symbol,
|
|
73955
|
+
const tpTriggerPrice = this.safeValue2(takeProfit, 'triggerPrice', 'stopPrice', takeProfit);
|
|
73956
|
+
request['takeProfit'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
75584
73957
|
}
|
|
75585
73958
|
}
|
|
75586
73959
|
else {
|
|
@@ -75761,12 +74134,12 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
75761
74134
|
}
|
|
75762
74135
|
if (isStopLoss || isTakeProfit) {
|
|
75763
74136
|
if (isStopLoss) {
|
|
75764
|
-
const
|
|
75765
|
-
request['stopLoss'] = this.priceToPrecision(symbol,
|
|
74137
|
+
const slTriggerPrice = this.safeValue2(stopLoss, 'triggerPrice', 'stopPrice', stopLoss);
|
|
74138
|
+
request['stopLoss'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
75766
74139
|
}
|
|
75767
74140
|
if (isTakeProfit) {
|
|
75768
|
-
const
|
|
75769
|
-
request['takeProfit'] = this.priceToPrecision(symbol,
|
|
74141
|
+
const tpTriggerPrice = this.safeValue2(takeProfit, 'triggerPrice', 'stopPrice', takeProfit);
|
|
74142
|
+
request['takeProfit'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
75770
74143
|
}
|
|
75771
74144
|
}
|
|
75772
74145
|
const clientOrderId = this.safeString(params, 'clientOrderId');
|
|
@@ -77736,12 +76109,10 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
77736
76109
|
await this.loadMarkets();
|
|
77737
76110
|
const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
|
|
77738
76111
|
const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
|
|
76112
|
+
let market = undefined;
|
|
77739
76113
|
let response = undefined;
|
|
77740
|
-
if (
|
|
76114
|
+
if (isUnifiedAccount) {
|
|
77741
76115
|
if (marginMode === 'isolated') {
|
|
77742
|
-
if (!isUnifiedAccount) {
|
|
77743
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' setMarginMode() Normal Account not support ISOLATED_MARGIN');
|
|
77744
|
-
}
|
|
77745
76116
|
marginMode = 'ISOLATED_MARGIN';
|
|
77746
76117
|
}
|
|
77747
76118
|
else if (marginMode === 'cross') {
|
|
@@ -77759,44 +76130,70 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
77759
76130
|
response = await this.privatePostV5AccountSetMarginMode(this.extend(request, params));
|
|
77760
76131
|
}
|
|
77761
76132
|
else {
|
|
77762
|
-
|
|
77763
|
-
|
|
77764
|
-
|
|
77765
|
-
|
|
77766
|
-
|
|
77767
|
-
|
|
76133
|
+
if (symbol === undefined) {
|
|
76134
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol parameter for non unified account');
|
|
76135
|
+
}
|
|
76136
|
+
market = this.market(symbol);
|
|
76137
|
+
const isUsdcSettled = market['settle'] === 'USDC';
|
|
76138
|
+
if (isUsdcSettled) {
|
|
76139
|
+
if (marginMode === 'cross') {
|
|
76140
|
+
marginMode = 'REGULAR_MARGIN';
|
|
77768
76141
|
}
|
|
77769
|
-
|
|
77770
|
-
|
|
77771
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' setMarginMode() with symbol only support USDT perpetual / inverse contract');
|
|
76142
|
+
else if (marginMode === 'portfolio') {
|
|
76143
|
+
marginMode = 'PORTFOLIO_MARGIN';
|
|
77772
76144
|
}
|
|
77773
|
-
|
|
77774
|
-
|
|
77775
|
-
|
|
77776
|
-
|
|
77777
|
-
|
|
77778
|
-
|
|
77779
|
-
|
|
77780
|
-
}
|
|
77781
|
-
else if (marginMode === 'isolated') {
|
|
77782
|
-
tradeMode = 1;
|
|
76145
|
+
else {
|
|
76146
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' setMarginMode() for usdc market marginMode must be either [cross, portfolio]');
|
|
76147
|
+
}
|
|
76148
|
+
const request = {
|
|
76149
|
+
'setMarginMode': marginMode,
|
|
76150
|
+
};
|
|
76151
|
+
response = await this.privatePostV5AccountSetMarginMode(this.extend(request, params));
|
|
77783
76152
|
}
|
|
77784
76153
|
else {
|
|
77785
|
-
|
|
77786
|
-
|
|
77787
|
-
|
|
77788
|
-
|
|
77789
|
-
|
|
77790
|
-
|
|
76154
|
+
let type = undefined;
|
|
76155
|
+
[type, params] = this.getBybitType('setPositionMode', market, params);
|
|
76156
|
+
let tradeMode = undefined;
|
|
76157
|
+
if (marginMode === 'cross') {
|
|
76158
|
+
tradeMode = 0;
|
|
76159
|
+
}
|
|
76160
|
+
else if (marginMode === 'isolated') {
|
|
76161
|
+
tradeMode = 1;
|
|
76162
|
+
}
|
|
76163
|
+
else {
|
|
76164
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' setMarginMode() with symbol marginMode must be either [isolated, cross]');
|
|
76165
|
+
}
|
|
76166
|
+
let sellLeverage = undefined;
|
|
76167
|
+
let buyLeverage = undefined;
|
|
76168
|
+
const leverage = this.safeString(params, 'leverage');
|
|
76169
|
+
if (leverage === undefined) {
|
|
76170
|
+
sellLeverage = this.safeString2(params, 'sell_leverage', 'sellLeverage');
|
|
76171
|
+
buyLeverage = this.safeString2(params, 'buy_leverage', 'buyLeverage');
|
|
76172
|
+
if (sellLeverage === undefined && buyLeverage === undefined) {
|
|
76173
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' setMarginMode() requires a leverage parameter or sell_leverage and buy_leverage parameters');
|
|
76174
|
+
}
|
|
76175
|
+
if (buyLeverage === undefined) {
|
|
76176
|
+
buyLeverage = sellLeverage;
|
|
76177
|
+
}
|
|
76178
|
+
if (sellLeverage === undefined) {
|
|
76179
|
+
sellLeverage = buyLeverage;
|
|
76180
|
+
}
|
|
76181
|
+
params = this.omit(params, ['buy_leverage', 'sell_leverage', 'sellLeverage', 'buyLeverage']);
|
|
76182
|
+
}
|
|
76183
|
+
else {
|
|
76184
|
+
sellLeverage = leverage;
|
|
76185
|
+
buyLeverage = leverage;
|
|
76186
|
+
params = this.omit(params, 'leverage');
|
|
76187
|
+
}
|
|
76188
|
+
const request = {
|
|
76189
|
+
'category': type,
|
|
76190
|
+
'symbol': market['id'],
|
|
76191
|
+
'tradeMode': tradeMode,
|
|
76192
|
+
'buyLeverage': buyLeverage,
|
|
76193
|
+
'sellLeverage': sellLeverage,
|
|
76194
|
+
};
|
|
76195
|
+
response = await this.privatePostV5PositionSwitchIsolated(this.extend(request, params));
|
|
77791
76196
|
}
|
|
77792
|
-
const request = {
|
|
77793
|
-
'category': type,
|
|
77794
|
-
'symbol': market['id'],
|
|
77795
|
-
'tradeMode': tradeMode,
|
|
77796
|
-
'buyLeverage': leverage,
|
|
77797
|
-
'sellLeverage': leverage,
|
|
77798
|
-
};
|
|
77799
|
-
response = await this.privatePostV5PositionSwitchIsolated(this.extend(request, params));
|
|
77800
76197
|
}
|
|
77801
76198
|
return response;
|
|
77802
76199
|
}
|
|
@@ -114066,7 +112463,7 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
114066
112463
|
'id': 'gate',
|
|
114067
112464
|
'name': 'Gate.io',
|
|
114068
112465
|
'countries': ['KR'],
|
|
114069
|
-
'rateLimit':
|
|
112466
|
+
'rateLimit': 50,
|
|
114070
112467
|
'version': 'v4',
|
|
114071
112468
|
'certified': true,
|
|
114072
112469
|
'pro': true,
|
|
@@ -114193,9 +112590,10 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
114193
112590
|
},
|
|
114194
112591
|
'api': {
|
|
114195
112592
|
'public': {
|
|
112593
|
+
// All public endpoints 200r/10s per endpoint
|
|
114196
112594
|
'wallet': {
|
|
114197
112595
|
'get': {
|
|
114198
|
-
'currency_chains': 1
|
|
112596
|
+
'currency_chains': 1,
|
|
114199
112597
|
},
|
|
114200
112598
|
},
|
|
114201
112599
|
'spot': {
|
|
@@ -114229,131 +112627,133 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
114229
112627
|
},
|
|
114230
112628
|
'futures': {
|
|
114231
112629
|
'get': {
|
|
114232
|
-
'{settle}/contracts': 1
|
|
114233
|
-
'{settle}/contracts/{contract}': 1
|
|
114234
|
-
'{settle}/order_book': 1
|
|
114235
|
-
'{settle}/trades': 1
|
|
114236
|
-
'{settle}/candlesticks': 1
|
|
114237
|
-
'{settle}/premium_index': 1
|
|
114238
|
-
'{settle}/tickers': 1
|
|
114239
|
-
'{settle}/funding_rate': 1
|
|
114240
|
-
'{settle}/insurance': 1
|
|
114241
|
-
'{settle}/contract_stats': 1
|
|
114242
|
-
'{settle}/index_constituents/{index}': 1
|
|
114243
|
-
'{settle}/liq_orders': 1
|
|
112630
|
+
'{settle}/contracts': 1,
|
|
112631
|
+
'{settle}/contracts/{contract}': 1,
|
|
112632
|
+
'{settle}/order_book': 1,
|
|
112633
|
+
'{settle}/trades': 1,
|
|
112634
|
+
'{settle}/candlesticks': 1,
|
|
112635
|
+
'{settle}/premium_index': 1,
|
|
112636
|
+
'{settle}/tickers': 1,
|
|
112637
|
+
'{settle}/funding_rate': 1,
|
|
112638
|
+
'{settle}/insurance': 1,
|
|
112639
|
+
'{settle}/contract_stats': 1,
|
|
112640
|
+
'{settle}/index_constituents/{index}': 1,
|
|
112641
|
+
'{settle}/liq_orders': 1,
|
|
114244
112642
|
},
|
|
114245
112643
|
},
|
|
114246
112644
|
'delivery': {
|
|
114247
112645
|
'get': {
|
|
114248
|
-
'{settle}/contracts': 1
|
|
114249
|
-
'{settle}/contracts/{contract}': 1
|
|
114250
|
-
'{settle}/order_book': 1
|
|
114251
|
-
'{settle}/trades': 1
|
|
114252
|
-
'{settle}/candlesticks': 1
|
|
114253
|
-
'{settle}/tickers': 1
|
|
114254
|
-
'{settle}/insurance': 1
|
|
112646
|
+
'{settle}/contracts': 1,
|
|
112647
|
+
'{settle}/contracts/{contract}': 1,
|
|
112648
|
+
'{settle}/order_book': 1,
|
|
112649
|
+
'{settle}/trades': 1,
|
|
112650
|
+
'{settle}/candlesticks': 1,
|
|
112651
|
+
'{settle}/tickers': 1,
|
|
112652
|
+
'{settle}/insurance': 1,
|
|
114255
112653
|
},
|
|
114256
112654
|
},
|
|
114257
112655
|
'options': {
|
|
114258
112656
|
'get': {
|
|
114259
|
-
'underlyings': 1
|
|
114260
|
-
'expirations': 1
|
|
114261
|
-
'contracts': 1
|
|
114262
|
-
'contracts/{contract}': 1
|
|
114263
|
-
'settlements': 1
|
|
114264
|
-
'settlements/{contract}': 1
|
|
114265
|
-
'order_book': 1
|
|
114266
|
-
'tickers': 1
|
|
114267
|
-
'underlying/tickers/{underlying}': 1
|
|
114268
|
-
'candlesticks': 1
|
|
114269
|
-
'underlying/candlesticks': 1
|
|
114270
|
-
'trades': 1
|
|
112657
|
+
'underlyings': 1,
|
|
112658
|
+
'expirations': 1,
|
|
112659
|
+
'contracts': 1,
|
|
112660
|
+
'contracts/{contract}': 1,
|
|
112661
|
+
'settlements': 1,
|
|
112662
|
+
'settlements/{contract}': 1,
|
|
112663
|
+
'order_book': 1,
|
|
112664
|
+
'tickers': 1,
|
|
112665
|
+
'underlying/tickers/{underlying}': 1,
|
|
112666
|
+
'candlesticks': 1,
|
|
112667
|
+
'underlying/candlesticks': 1,
|
|
112668
|
+
'trades': 1,
|
|
114271
112669
|
},
|
|
114272
112670
|
},
|
|
114273
112671
|
'earn': {
|
|
114274
112672
|
'get': {
|
|
114275
|
-
'uni/currencies': 1
|
|
114276
|
-
'uni/currencies/{currency}': 1
|
|
112673
|
+
'uni/currencies': 1,
|
|
112674
|
+
'uni/currencies/{currency}': 1,
|
|
114277
112675
|
},
|
|
114278
112676
|
},
|
|
114279
112677
|
},
|
|
114280
112678
|
'private': {
|
|
112679
|
+
// private endpoints default is 150r/10s per endpoint
|
|
114281
112680
|
'withdrawals': {
|
|
114282
112681
|
'post': {
|
|
114283
|
-
'withdrawals':
|
|
112682
|
+
'withdrawals': 20, // 1r/s cost = 20 / 1 = 20
|
|
114284
112683
|
},
|
|
114285
112684
|
'delete': {
|
|
114286
|
-
'withdrawals/{withdrawal_id}':
|
|
112685
|
+
'withdrawals/{withdrawal_id}': 1,
|
|
114287
112686
|
},
|
|
114288
112687
|
},
|
|
114289
112688
|
'wallet': {
|
|
114290
112689
|
'get': {
|
|
114291
|
-
'deposit_address':
|
|
114292
|
-
'withdrawals':
|
|
114293
|
-
'deposits':
|
|
114294
|
-
'sub_account_transfers':
|
|
114295
|
-
'withdraw_status':
|
|
114296
|
-
'sub_account_balances':
|
|
114297
|
-
'sub_account_margin_balances':
|
|
114298
|
-
'sub_account_futures_balances':
|
|
114299
|
-
'sub_account_cross_margin_balances':
|
|
114300
|
-
'saved_address':
|
|
114301
|
-
'fee':
|
|
114302
|
-
'total_balance':
|
|
112690
|
+
'deposit_address': 1,
|
|
112691
|
+
'withdrawals': 1,
|
|
112692
|
+
'deposits': 1,
|
|
112693
|
+
'sub_account_transfers': 1,
|
|
112694
|
+
'withdraw_status': 1,
|
|
112695
|
+
'sub_account_balances': 2.5,
|
|
112696
|
+
'sub_account_margin_balances': 2.5,
|
|
112697
|
+
'sub_account_futures_balances': 2.5,
|
|
112698
|
+
'sub_account_cross_margin_balances': 2.5,
|
|
112699
|
+
'saved_address': 1,
|
|
112700
|
+
'fee': 1,
|
|
112701
|
+
'total_balance': 2.5,
|
|
114303
112702
|
},
|
|
114304
112703
|
'post': {
|
|
114305
|
-
'transfers':
|
|
114306
|
-
'sub_account_transfers':
|
|
114307
|
-
'sub_account_to_sub_account':
|
|
112704
|
+
'transfers': 2.5,
|
|
112705
|
+
'sub_account_transfers': 2.5,
|
|
112706
|
+
'sub_account_to_sub_account': 2.5,
|
|
114308
112707
|
},
|
|
114309
112708
|
},
|
|
114310
112709
|
'subAccounts': {
|
|
114311
112710
|
'get': {
|
|
114312
|
-
'sub_accounts':
|
|
114313
|
-
'sub_accounts/{user_id}':
|
|
114314
|
-
'sub_accounts/{user_id}/keys':
|
|
114315
|
-
'sub_accounts/{user_id}/keys/{key}':
|
|
112711
|
+
'sub_accounts': 2.5,
|
|
112712
|
+
'sub_accounts/{user_id}': 2.5,
|
|
112713
|
+
'sub_accounts/{user_id}/keys': 2.5,
|
|
112714
|
+
'sub_accounts/{user_id}/keys/{key}': 2.5,
|
|
114316
112715
|
},
|
|
114317
112716
|
'post': {
|
|
114318
|
-
'sub_accounts':
|
|
114319
|
-
'sub_accounts/{user_id}/keys':
|
|
114320
|
-
'sub_accounts/{user_id}/lock':
|
|
114321
|
-
'sub_accounts/{user_id}/unlock':
|
|
112717
|
+
'sub_accounts': 2.5,
|
|
112718
|
+
'sub_accounts/{user_id}/keys': 2.5,
|
|
112719
|
+
'sub_accounts/{user_id}/lock': 2.5,
|
|
112720
|
+
'sub_accounts/{user_id}/unlock': 2.5,
|
|
114322
112721
|
},
|
|
114323
112722
|
'put': {
|
|
114324
|
-
'sub_accounts/{user_id}/keys/{key}':
|
|
112723
|
+
'sub_accounts/{user_id}/keys/{key}': 2.5,
|
|
114325
112724
|
},
|
|
114326
112725
|
'delete': {
|
|
114327
|
-
'sub_accounts/{user_id}/keys/{key}':
|
|
112726
|
+
'sub_accounts/{user_id}/keys/{key}': 2.5,
|
|
114328
112727
|
},
|
|
114329
112728
|
},
|
|
114330
112729
|
'portfolio': {
|
|
114331
112730
|
'get': {
|
|
114332
|
-
'spot/currency_pairs':
|
|
114333
|
-
'spot/currency_pairs/{currency_pair}':
|
|
114334
|
-
'accounts':
|
|
114335
|
-
'account_mode':
|
|
114336
|
-
'borrowable':
|
|
114337
|
-
'transferable':
|
|
114338
|
-
'loans':
|
|
114339
|
-
'loan_records':
|
|
114340
|
-
'interest_records':
|
|
114341
|
-
'spot/orders':
|
|
114342
|
-
'spot/orders/{order_id}':
|
|
112731
|
+
'spot/currency_pairs': 20 / 15,
|
|
112732
|
+
'spot/currency_pairs/{currency_pair}': 20 / 15,
|
|
112733
|
+
'accounts': 20 / 15,
|
|
112734
|
+
'account_mode': 20 / 15,
|
|
112735
|
+
'borrowable': 20 / 15,
|
|
112736
|
+
'transferable': 20 / 15,
|
|
112737
|
+
'loans': 20 / 15,
|
|
112738
|
+
'loan_records': 20 / 15,
|
|
112739
|
+
'interest_records': 20 / 15,
|
|
112740
|
+
'spot/orders': 20 / 15,
|
|
112741
|
+
'spot/orders/{order_id}': 20 / 15,
|
|
114343
112742
|
},
|
|
114344
112743
|
'post': {
|
|
114345
|
-
'account_mode':
|
|
114346
|
-
'loans':
|
|
114347
|
-
'spot/orders':
|
|
112744
|
+
'account_mode': 20 / 15,
|
|
112745
|
+
'loans': 200 / 15,
|
|
112746
|
+
'spot/orders': 20 / 15,
|
|
114348
112747
|
},
|
|
114349
112748
|
'delete': {
|
|
114350
|
-
'spot/orders/{order_id}':
|
|
112749
|
+
'spot/orders/{order_id}': 20 / 15,
|
|
114351
112750
|
},
|
|
114352
112751
|
'patch': {
|
|
114353
|
-
'spot/orders/{order_id}':
|
|
112752
|
+
'spot/orders/{order_id}': 20 / 15,
|
|
114354
112753
|
},
|
|
114355
112754
|
},
|
|
114356
112755
|
'spot': {
|
|
112756
|
+
// default is 200r/10s
|
|
114357
112757
|
'get': {
|
|
114358
112758
|
'fee': 1,
|
|
114359
112759
|
'batch_fee': 1,
|
|
@@ -114367,219 +112767,219 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
114367
112767
|
'price_orders/{order_id}': 1,
|
|
114368
112768
|
},
|
|
114369
112769
|
'post': {
|
|
114370
|
-
'batch_orders':
|
|
112770
|
+
'batch_orders': 0.4,
|
|
114371
112771
|
'cross_liquidate_orders': 1,
|
|
114372
|
-
'orders':
|
|
114373
|
-
'cancel_batch_orders':
|
|
114374
|
-
'countdown_cancel_all':
|
|
114375
|
-
'price_orders':
|
|
112772
|
+
'orders': 0.4,
|
|
112773
|
+
'cancel_batch_orders': 20 / 75,
|
|
112774
|
+
'countdown_cancel_all': 20 / 75,
|
|
112775
|
+
'price_orders': 0.4,
|
|
114376
112776
|
},
|
|
114377
112777
|
'delete': {
|
|
114378
|
-
'orders':
|
|
114379
|
-
'orders/{order_id}':
|
|
114380
|
-
'price_orders':
|
|
114381
|
-
'price_orders/{order_id}':
|
|
112778
|
+
'orders': 20 / 75,
|
|
112779
|
+
'orders/{order_id}': 20 / 75,
|
|
112780
|
+
'price_orders': 20 / 75,
|
|
112781
|
+
'price_orders/{order_id}': 20 / 75,
|
|
114382
112782
|
},
|
|
114383
112783
|
'patch': {
|
|
114384
|
-
'orders/{order_id}':
|
|
112784
|
+
'orders/{order_id}': 0.4,
|
|
114385
112785
|
},
|
|
114386
112786
|
},
|
|
114387
112787
|
'margin': {
|
|
114388
112788
|
'get': {
|
|
114389
|
-
'accounts':
|
|
114390
|
-
'account_book':
|
|
114391
|
-
'funding_accounts':
|
|
114392
|
-
'auto_repay':
|
|
114393
|
-
'transferable':
|
|
114394
|
-
'loans':
|
|
114395
|
-
'loans/{loan_id}':
|
|
114396
|
-
'loans/{loan_id}/repayment':
|
|
114397
|
-
'loan_records':
|
|
114398
|
-
'loan_records/{loan_record_id}':
|
|
114399
|
-
'borrowable':
|
|
114400
|
-
'cross/accounts':
|
|
114401
|
-
'cross/account_book':
|
|
114402
|
-
'cross/loans':
|
|
114403
|
-
'cross/loans/{loan_id}':
|
|
114404
|
-
'cross/repayments':
|
|
114405
|
-
'cross/interest_records':
|
|
114406
|
-
'cross/transferable':
|
|
114407
|
-
'cross/estimate_rate':
|
|
114408
|
-
'cross/borrowable':
|
|
114409
|
-
'uni/estimate_rate':
|
|
114410
|
-
'uni/loans':
|
|
114411
|
-
'uni/loan_records':
|
|
114412
|
-
'uni/interest_records':
|
|
114413
|
-
'uni/borrowable':
|
|
112789
|
+
'accounts': 20 / 15,
|
|
112790
|
+
'account_book': 20 / 15,
|
|
112791
|
+
'funding_accounts': 20 / 15,
|
|
112792
|
+
'auto_repay': 20 / 15,
|
|
112793
|
+
'transferable': 20 / 15,
|
|
112794
|
+
'loans': 20 / 15,
|
|
112795
|
+
'loans/{loan_id}': 20 / 15,
|
|
112796
|
+
'loans/{loan_id}/repayment': 20 / 15,
|
|
112797
|
+
'loan_records': 20 / 15,
|
|
112798
|
+
'loan_records/{loan_record_id}': 20 / 15,
|
|
112799
|
+
'borrowable': 20 / 15,
|
|
112800
|
+
'cross/accounts': 20 / 15,
|
|
112801
|
+
'cross/account_book': 20 / 15,
|
|
112802
|
+
'cross/loans': 20 / 15,
|
|
112803
|
+
'cross/loans/{loan_id}': 20 / 15,
|
|
112804
|
+
'cross/repayments': 20 / 15,
|
|
112805
|
+
'cross/interest_records': 20 / 15,
|
|
112806
|
+
'cross/transferable': 20 / 15,
|
|
112807
|
+
'cross/estimate_rate': 20 / 15,
|
|
112808
|
+
'cross/borrowable': 20 / 15,
|
|
112809
|
+
'uni/estimate_rate': 20 / 15,
|
|
112810
|
+
'uni/loans': 20 / 15,
|
|
112811
|
+
'uni/loan_records': 20 / 15,
|
|
112812
|
+
'uni/interest_records': 20 / 15,
|
|
112813
|
+
'uni/borrowable': 20 / 15,
|
|
114414
112814
|
},
|
|
114415
112815
|
'post': {
|
|
114416
|
-
'auto_repay':
|
|
114417
|
-
'loans':
|
|
114418
|
-
'merged_loans':
|
|
114419
|
-
'loans/{loan_id}/repayment':
|
|
114420
|
-
'cross/loans':
|
|
114421
|
-
'cross/repayments':
|
|
114422
|
-
'uni/loans':
|
|
112816
|
+
'auto_repay': 20 / 15,
|
|
112817
|
+
'loans': 20 / 15,
|
|
112818
|
+
'merged_loans': 20 / 15,
|
|
112819
|
+
'loans/{loan_id}/repayment': 20 / 15,
|
|
112820
|
+
'cross/loans': 20 / 15,
|
|
112821
|
+
'cross/repayments': 20 / 15,
|
|
112822
|
+
'uni/loans': 20 / 15,
|
|
114423
112823
|
},
|
|
114424
112824
|
'patch': {
|
|
114425
|
-
'loans/{loan_id}':
|
|
114426
|
-
'loan_records/{loan_record_id}':
|
|
112825
|
+
'loans/{loan_id}': 20 / 15,
|
|
112826
|
+
'loan_records/{loan_record_id}': 20 / 15,
|
|
114427
112827
|
},
|
|
114428
112828
|
'delete': {
|
|
114429
|
-
'loans/{loan_id}':
|
|
112829
|
+
'loans/{loan_id}': 20 / 15,
|
|
114430
112830
|
},
|
|
114431
112831
|
},
|
|
114432
112832
|
'flash_swap': {
|
|
114433
112833
|
'get': {
|
|
114434
|
-
'currencies': 1
|
|
114435
|
-
'currency_pairs': 1
|
|
114436
|
-
'orders': 1
|
|
114437
|
-
'orders/{order_id}': 1
|
|
112834
|
+
'currencies': 1,
|
|
112835
|
+
'currency_pairs': 1,
|
|
112836
|
+
'orders': 1,
|
|
112837
|
+
'orders/{order_id}': 1,
|
|
114438
112838
|
},
|
|
114439
112839
|
'post': {
|
|
114440
|
-
'orders': 1
|
|
114441
|
-
'orders/preview': 1
|
|
112840
|
+
'orders': 1,
|
|
112841
|
+
'orders/preview': 1,
|
|
114442
112842
|
},
|
|
114443
112843
|
},
|
|
114444
112844
|
'futures': {
|
|
114445
112845
|
'get': {
|
|
114446
|
-
'{settle}/accounts': 1
|
|
114447
|
-
'{settle}/account_book': 1
|
|
114448
|
-
'{settle}/positions': 1
|
|
114449
|
-
'{settle}/positions/{contract}': 1
|
|
114450
|
-
'{settle}/dual_comp/positions/{contract}': 1
|
|
114451
|
-
'{settle}/orders': 1
|
|
114452
|
-
'{settle}/orders_timerange': 1
|
|
114453
|
-
'{settle}/orders/{order_id}': 1
|
|
114454
|
-
'{settle}/my_trades': 1
|
|
114455
|
-
'{settle}/my_trades_timerange': 1
|
|
114456
|
-
'{settle}/position_close': 1
|
|
114457
|
-
'{settle}/liquidates': 1
|
|
114458
|
-
'{settle}/auto_deleverages': 1
|
|
114459
|
-
'{settle}/fee': 1
|
|
114460
|
-
'{settle}/price_orders': 1
|
|
114461
|
-
'{settle}/price_orders/{order_id}': 1
|
|
112846
|
+
'{settle}/accounts': 1,
|
|
112847
|
+
'{settle}/account_book': 1,
|
|
112848
|
+
'{settle}/positions': 1,
|
|
112849
|
+
'{settle}/positions/{contract}': 1,
|
|
112850
|
+
'{settle}/dual_comp/positions/{contract}': 1,
|
|
112851
|
+
'{settle}/orders': 1,
|
|
112852
|
+
'{settle}/orders_timerange': 1,
|
|
112853
|
+
'{settle}/orders/{order_id}': 1,
|
|
112854
|
+
'{settle}/my_trades': 1,
|
|
112855
|
+
'{settle}/my_trades_timerange': 1,
|
|
112856
|
+
'{settle}/position_close': 1,
|
|
112857
|
+
'{settle}/liquidates': 1,
|
|
112858
|
+
'{settle}/auto_deleverages': 1,
|
|
112859
|
+
'{settle}/fee': 1,
|
|
112860
|
+
'{settle}/price_orders': 1,
|
|
112861
|
+
'{settle}/price_orders/{order_id}': 1,
|
|
114462
112862
|
},
|
|
114463
112863
|
'post': {
|
|
114464
|
-
'{settle}/positions/{contract}/margin': 1
|
|
114465
|
-
'{settle}/positions/{contract}/leverage': 1
|
|
114466
|
-
'{settle}/positions/{contract}/risk_limit': 1
|
|
114467
|
-
'{settle}/dual_mode': 1
|
|
114468
|
-
'{settle}/dual_comp/positions/{contract}/margin': 1
|
|
114469
|
-
'{settle}/dual_comp/positions/{contract}/leverage': 1
|
|
114470
|
-
'{settle}/dual_comp/positions/{contract}/risk_limit': 1
|
|
114471
|
-
'{settle}/orders':
|
|
114472
|
-
'{settle}/batch_orders':
|
|
114473
|
-
'{settle}/countdown_cancel_all':
|
|
114474
|
-
'{settle}/price_orders':
|
|
112864
|
+
'{settle}/positions/{contract}/margin': 1,
|
|
112865
|
+
'{settle}/positions/{contract}/leverage': 1,
|
|
112866
|
+
'{settle}/positions/{contract}/risk_limit': 1,
|
|
112867
|
+
'{settle}/dual_mode': 1,
|
|
112868
|
+
'{settle}/dual_comp/positions/{contract}/margin': 1,
|
|
112869
|
+
'{settle}/dual_comp/positions/{contract}/leverage': 1,
|
|
112870
|
+
'{settle}/dual_comp/positions/{contract}/risk_limit': 1,
|
|
112871
|
+
'{settle}/orders': 0.4,
|
|
112872
|
+
'{settle}/batch_orders': 0.4,
|
|
112873
|
+
'{settle}/countdown_cancel_all': 0.4,
|
|
112874
|
+
'{settle}/price_orders': 0.4,
|
|
114475
112875
|
},
|
|
114476
112876
|
'put': {
|
|
114477
|
-
'{settle}/orders/{order_id}': 1
|
|
112877
|
+
'{settle}/orders/{order_id}': 1,
|
|
114478
112878
|
},
|
|
114479
112879
|
'delete': {
|
|
114480
|
-
'{settle}/orders':
|
|
114481
|
-
'{settle}/orders/{order_id}':
|
|
114482
|
-
'{settle}/price_orders':
|
|
114483
|
-
'{settle}/price_orders/{order_id}':
|
|
112880
|
+
'{settle}/orders': 20 / 75,
|
|
112881
|
+
'{settle}/orders/{order_id}': 20 / 75,
|
|
112882
|
+
'{settle}/price_orders': 20 / 75,
|
|
112883
|
+
'{settle}/price_orders/{order_id}': 20 / 75,
|
|
114484
112884
|
},
|
|
114485
112885
|
},
|
|
114486
112886
|
'delivery': {
|
|
114487
112887
|
'get': {
|
|
114488
|
-
'{settle}/accounts':
|
|
114489
|
-
'{settle}/account_book':
|
|
114490
|
-
'{settle}/positions':
|
|
114491
|
-
'{settle}/positions/{contract}':
|
|
114492
|
-
'{settle}/orders':
|
|
114493
|
-
'{settle}/orders/{order_id}':
|
|
114494
|
-
'{settle}/my_trades':
|
|
114495
|
-
'{settle}/position_close':
|
|
114496
|
-
'{settle}/liquidates':
|
|
114497
|
-
'{settle}/settlements':
|
|
114498
|
-
'{settle}/price_orders':
|
|
114499
|
-
'{settle}/price_orders/{order_id}':
|
|
112888
|
+
'{settle}/accounts': 20 / 15,
|
|
112889
|
+
'{settle}/account_book': 20 / 15,
|
|
112890
|
+
'{settle}/positions': 20 / 15,
|
|
112891
|
+
'{settle}/positions/{contract}': 20 / 15,
|
|
112892
|
+
'{settle}/orders': 20 / 15,
|
|
112893
|
+
'{settle}/orders/{order_id}': 20 / 15,
|
|
112894
|
+
'{settle}/my_trades': 20 / 15,
|
|
112895
|
+
'{settle}/position_close': 20 / 15,
|
|
112896
|
+
'{settle}/liquidates': 20 / 15,
|
|
112897
|
+
'{settle}/settlements': 20 / 15,
|
|
112898
|
+
'{settle}/price_orders': 20 / 15,
|
|
112899
|
+
'{settle}/price_orders/{order_id}': 20 / 15,
|
|
114500
112900
|
},
|
|
114501
112901
|
'post': {
|
|
114502
|
-
'{settle}/positions/{contract}/margin':
|
|
114503
|
-
'{settle}/positions/{contract}/leverage':
|
|
114504
|
-
'{settle}/positions/{contract}/risk_limit':
|
|
114505
|
-
'{settle}/orders':
|
|
114506
|
-
'{settle}/price_orders':
|
|
112902
|
+
'{settle}/positions/{contract}/margin': 20 / 15,
|
|
112903
|
+
'{settle}/positions/{contract}/leverage': 20 / 15,
|
|
112904
|
+
'{settle}/positions/{contract}/risk_limit': 20 / 15,
|
|
112905
|
+
'{settle}/orders': 20 / 15,
|
|
112906
|
+
'{settle}/price_orders': 20 / 15,
|
|
114507
112907
|
},
|
|
114508
112908
|
'delete': {
|
|
114509
|
-
'{settle}/orders':
|
|
114510
|
-
'{settle}/orders/{order_id}':
|
|
114511
|
-
'{settle}/price_orders':
|
|
114512
|
-
'{settle}/price_orders/{order_id}':
|
|
112909
|
+
'{settle}/orders': 20 / 15,
|
|
112910
|
+
'{settle}/orders/{order_id}': 20 / 15,
|
|
112911
|
+
'{settle}/price_orders': 20 / 15,
|
|
112912
|
+
'{settle}/price_orders/{order_id}': 20 / 15,
|
|
114513
112913
|
},
|
|
114514
112914
|
},
|
|
114515
112915
|
'options': {
|
|
114516
112916
|
'get': {
|
|
114517
|
-
'my_settlements':
|
|
114518
|
-
'accounts':
|
|
114519
|
-
'account_book':
|
|
114520
|
-
'positions':
|
|
114521
|
-
'positions/{contract}':
|
|
114522
|
-
'position_close':
|
|
114523
|
-
'orders':
|
|
114524
|
-
'orders/{order_id}':
|
|
114525
|
-
'my_trades':
|
|
112917
|
+
'my_settlements': 20 / 15,
|
|
112918
|
+
'accounts': 20 / 15,
|
|
112919
|
+
'account_book': 20 / 15,
|
|
112920
|
+
'positions': 20 / 15,
|
|
112921
|
+
'positions/{contract}': 20 / 15,
|
|
112922
|
+
'position_close': 20 / 15,
|
|
112923
|
+
'orders': 20 / 15,
|
|
112924
|
+
'orders/{order_id}': 20 / 15,
|
|
112925
|
+
'my_trades': 20 / 15,
|
|
114526
112926
|
},
|
|
114527
112927
|
'post': {
|
|
114528
|
-
'orders':
|
|
112928
|
+
'orders': 20 / 15,
|
|
114529
112929
|
},
|
|
114530
112930
|
'delete': {
|
|
114531
|
-
'orders':
|
|
114532
|
-
'orders/{order_id}':
|
|
112931
|
+
'orders': 20 / 15,
|
|
112932
|
+
'orders/{order_id}': 20 / 15,
|
|
114533
112933
|
},
|
|
114534
112934
|
},
|
|
114535
112935
|
'earn': {
|
|
114536
112936
|
'get': {
|
|
114537
|
-
'uni/lends':
|
|
114538
|
-
'uni/lend_records':
|
|
114539
|
-
'uni/interests/{currency}':
|
|
114540
|
-
'uni/interest_records':
|
|
112937
|
+
'uni/lends': 20 / 15,
|
|
112938
|
+
'uni/lend_records': 20 / 15,
|
|
112939
|
+
'uni/interests/{currency}': 20 / 15,
|
|
112940
|
+
'uni/interest_records': 20 / 15,
|
|
114541
112941
|
},
|
|
114542
112942
|
'post': {
|
|
114543
|
-
'uni/lends':
|
|
112943
|
+
'uni/lends': 20 / 15,
|
|
114544
112944
|
},
|
|
114545
112945
|
'patch': {
|
|
114546
|
-
'uni/lends':
|
|
112946
|
+
'uni/lends': 20 / 15,
|
|
114547
112947
|
},
|
|
114548
112948
|
},
|
|
114549
112949
|
'loan': {
|
|
114550
112950
|
'get': {
|
|
114551
|
-
'collateral/orders':
|
|
114552
|
-
'collateral/orders/{order_id}':
|
|
114553
|
-
'collateral/repay_records':
|
|
114554
|
-
'collateral/collaterals':
|
|
114555
|
-
'collateral/total_amount':
|
|
114556
|
-
'collateral/ltv':
|
|
114557
|
-
'collateral/currencies':
|
|
112951
|
+
'collateral/orders': 20 / 15,
|
|
112952
|
+
'collateral/orders/{order_id}': 20 / 15,
|
|
112953
|
+
'collateral/repay_records': 20 / 15,
|
|
112954
|
+
'collateral/collaterals': 20 / 15,
|
|
112955
|
+
'collateral/total_amount': 20 / 15,
|
|
112956
|
+
'collateral/ltv': 20 / 15,
|
|
112957
|
+
'collateral/currencies': 20 / 15,
|
|
114558
112958
|
},
|
|
114559
112959
|
'post': {
|
|
114560
|
-
'collateral/orders':
|
|
114561
|
-
'collateral/repay':
|
|
114562
|
-
'collateral/collaterals':
|
|
112960
|
+
'collateral/orders': 20 / 15,
|
|
112961
|
+
'collateral/repay': 20 / 15,
|
|
112962
|
+
'collateral/collaterals': 20 / 15,
|
|
114563
112963
|
},
|
|
114564
112964
|
},
|
|
114565
112965
|
'account': {
|
|
114566
112966
|
'get': {
|
|
114567
|
-
'detail':
|
|
114568
|
-
'stp_groups':
|
|
114569
|
-
'stp_groups/{stp_id}/users':
|
|
112967
|
+
'detail': 20 / 15,
|
|
112968
|
+
'stp_groups': 20 / 15,
|
|
112969
|
+
'stp_groups/{stp_id}/users': 20 / 15,
|
|
114570
112970
|
},
|
|
114571
112971
|
'post': {
|
|
114572
|
-
'stp_groups':
|
|
114573
|
-
'stp_groups/{stp_id}/users':
|
|
112972
|
+
'stp_groups': 20 / 15,
|
|
112973
|
+
'stp_groups/{stp_id}/users': 20 / 15,
|
|
114574
112974
|
},
|
|
114575
112975
|
'delete': {
|
|
114576
|
-
'stp_groups/{stp_id}/users':
|
|
112976
|
+
'stp_groups/{stp_id}/users': 20 / 15,
|
|
114577
112977
|
},
|
|
114578
112978
|
},
|
|
114579
112979
|
'rebate': {
|
|
114580
112980
|
'get': {
|
|
114581
|
-
'agency/transaction_history':
|
|
114582
|
-
'agency/commission_history':
|
|
112981
|
+
'agency/transaction_history': 20 / 15,
|
|
112982
|
+
'agency/commission_history': 20 / 15,
|
|
114583
112983
|
},
|
|
114584
112984
|
},
|
|
114585
112985
|
},
|
|
@@ -120588,6 +118988,7 @@ class gemini extends _abstract_gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
120588
118988
|
'InsufficientFunds': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InsufficientFunds,
|
|
120589
118989
|
'InvalidJson': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest,
|
|
120590
118990
|
'InvalidNonce': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidNonce,
|
|
118991
|
+
'InvalidApiKey': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.AuthenticationError,
|
|
120591
118992
|
'InvalidOrderType': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
120592
118993
|
'InvalidPrice': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
120593
118994
|
'InvalidQuantity': _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder,
|
|
@@ -194075,8 +192476,8 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
194075
192476
|
for (let i = 0; i < symbols.length; i++) {
|
|
194076
192477
|
const symbol = symbols[i];
|
|
194077
192478
|
const market = this.market(symbol);
|
|
194078
|
-
const
|
|
194079
|
-
subParams.push(
|
|
192479
|
+
const currentMessageHash = market['lowercaseId'] + '@' + name;
|
|
192480
|
+
subParams.push(currentMessageHash);
|
|
194080
192481
|
}
|
|
194081
192482
|
const messageHash = 'multipleTrades::' + symbols.join(',');
|
|
194082
192483
|
const query = this.omit(params, 'type');
|
|
@@ -194394,10 +192795,10 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
194394
192795
|
const hashes = [];
|
|
194395
192796
|
for (let i = 0; i < symbolsAndTimeframes.length; i++) {
|
|
194396
192797
|
const data = symbolsAndTimeframes[i];
|
|
194397
|
-
const
|
|
194398
|
-
const
|
|
194399
|
-
const interval = this.safeString(this.timeframes,
|
|
194400
|
-
const market = this.market(
|
|
192798
|
+
const symbolString = data[0];
|
|
192799
|
+
const timeframeString = data[1];
|
|
192800
|
+
const interval = this.safeString(this.timeframes, timeframeString, timeframeString);
|
|
192801
|
+
const market = this.market(symbolString);
|
|
194401
192802
|
let marketId = market['lowercaseId'];
|
|
194402
192803
|
if (name === 'indexPriceKline') {
|
|
194403
192804
|
// weird behavior for index price kline we can't use the perp suffix
|
|
@@ -194405,7 +192806,7 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
194405
192806
|
}
|
|
194406
192807
|
const topic = marketId + '@' + name + '_' + interval;
|
|
194407
192808
|
subParams.push(topic);
|
|
194408
|
-
hashes.push(
|
|
192809
|
+
hashes.push(symbolString + '#' + timeframeString);
|
|
194409
192810
|
}
|
|
194410
192811
|
const messageHash = 'multipleOHLCV::' + hashes.join(',');
|
|
194411
192812
|
const url = this.urls['api']['ws'][type] + '/' + this.stream(type, messageHash);
|
|
@@ -207161,17 +205562,17 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
207161
205562
|
let firstSymbol = undefined;
|
|
207162
205563
|
for (let i = 0; i < symbolsAndTimeframes.length; i++) {
|
|
207163
205564
|
const data = symbolsAndTimeframes[i];
|
|
207164
|
-
let
|
|
207165
|
-
const
|
|
207166
|
-
const market = this.market(
|
|
207167
|
-
|
|
205565
|
+
let symbolString = this.safeString(data, 0);
|
|
205566
|
+
const timeframeString = this.safeString(data, 1);
|
|
205567
|
+
const market = this.market(symbolString);
|
|
205568
|
+
symbolString = market['symbol'];
|
|
207168
205569
|
if (i === 0) {
|
|
207169
205570
|
firstSymbol = market['symbol'];
|
|
207170
205571
|
}
|
|
207171
|
-
const timeframeId = this.safeString(this.timeframes,
|
|
205572
|
+
const timeframeId = this.safeString(this.timeframes, timeframeString, timeframeString);
|
|
207172
205573
|
const topic = 'kline.' + timeframeId + '.' + market['id'];
|
|
207173
205574
|
topics.push(topic);
|
|
207174
|
-
hashes.push(
|
|
205575
|
+
hashes.push(symbolString + '#' + timeframeString);
|
|
207175
205576
|
}
|
|
207176
205577
|
const messageHash = 'multipleOHLCV::' + hashes.join(',');
|
|
207177
205578
|
const url = this.getUrlByMarketType(firstSymbol, false, params);
|
|
@@ -207718,8 +206119,8 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
207718
206119
|
}
|
|
207719
206120
|
const keys = Object.keys(symbols);
|
|
207720
206121
|
for (let i = 0; i < keys.length; i++) {
|
|
207721
|
-
const
|
|
207722
|
-
client.resolve(trades,
|
|
206122
|
+
const currentMessageHash = 'myTrades:' + keys[i];
|
|
206123
|
+
client.resolve(trades, currentMessageHash);
|
|
207723
206124
|
}
|
|
207724
206125
|
// non-symbol specific
|
|
207725
206126
|
const messageHash = 'myTrades';
|
|
@@ -207851,25 +206252,26 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
207851
206252
|
const first = this.safeValue(rawOrders, 0, {});
|
|
207852
206253
|
const category = this.safeString(first, 'category');
|
|
207853
206254
|
const isSpot = category === 'spot';
|
|
207854
|
-
|
|
207855
|
-
if (isSpot) {
|
|
207856
|
-
parser = 'parseWsSpotOrder';
|
|
207857
|
-
}
|
|
207858
|
-
else {
|
|
207859
|
-
parser = 'parseContractOrder';
|
|
206255
|
+
if (!isSpot) {
|
|
207860
206256
|
rawOrders = this.safeValue(rawOrders, 'result', rawOrders);
|
|
207861
206257
|
}
|
|
207862
206258
|
const symbols = {};
|
|
207863
206259
|
for (let i = 0; i < rawOrders.length; i++) {
|
|
207864
|
-
|
|
206260
|
+
let parsed = undefined;
|
|
206261
|
+
if (isSpot) {
|
|
206262
|
+
parsed = this.parseWsSpotOrder(rawOrders[i]);
|
|
206263
|
+
}
|
|
206264
|
+
else {
|
|
206265
|
+
parsed = this.parseOrder(rawOrders[i]);
|
|
206266
|
+
}
|
|
207865
206267
|
const symbol = parsed['symbol'];
|
|
207866
206268
|
symbols[symbol] = true;
|
|
207867
206269
|
orders.append(parsed);
|
|
207868
206270
|
}
|
|
207869
206271
|
const symbolsArray = Object.keys(symbols);
|
|
207870
206272
|
for (let i = 0; i < symbolsArray.length; i++) {
|
|
207871
|
-
const
|
|
207872
|
-
client.resolve(orders,
|
|
206273
|
+
const currentMessageHash = 'orders:' + symbolsArray[i];
|
|
206274
|
+
client.resolve(orders, currentMessageHash);
|
|
207873
206275
|
}
|
|
207874
206276
|
const messageHash = 'orders';
|
|
207875
206277
|
client.resolve(orders, messageHash);
|
|
@@ -210868,11 +209270,11 @@ class coinbasepro extends _coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/* ["defau
|
|
|
210868
209270
|
// reason: 'filled'
|
|
210869
209271
|
// }
|
|
210870
209272
|
//
|
|
210871
|
-
let
|
|
210872
|
-
if (
|
|
209273
|
+
let currentOrders = this.orders;
|
|
209274
|
+
if (currentOrders === undefined) {
|
|
210873
209275
|
const limit = this.safeInteger(this.options, 'ordersLimit', 1000);
|
|
210874
|
-
|
|
210875
|
-
this.orders =
|
|
209276
|
+
currentOrders = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_3__/* .ArrayCacheBySymbolById */ .hl(limit);
|
|
209277
|
+
this.orders = currentOrders;
|
|
210876
209278
|
}
|
|
210877
209279
|
const type = this.safeString(message, 'type');
|
|
210878
209280
|
const marketId = this.safeString(message, 'product_id');
|
|
@@ -210909,9 +209311,9 @@ class coinbasepro extends _coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/* ["defau
|
|
|
210909
209311
|
let totalAmount = 0;
|
|
210910
209312
|
const trades = previousOrder['trades'];
|
|
210911
209313
|
for (let i = 0; i < trades.length; i++) {
|
|
210912
|
-
const
|
|
210913
|
-
totalCost = this.sum(totalCost,
|
|
210914
|
-
totalAmount = this.sum(totalAmount,
|
|
209314
|
+
const tradeEntry = trades[i];
|
|
209315
|
+
totalCost = this.sum(totalCost, tradeEntry['cost']);
|
|
209316
|
+
totalAmount = this.sum(totalAmount, tradeEntry['amount']);
|
|
210915
209317
|
}
|
|
210916
209318
|
if (totalAmount > 0) {
|
|
210917
209319
|
previousOrder['average'] = totalCost / totalAmount;
|
|
@@ -211039,12 +209441,12 @@ class coinbasepro extends _coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/* ["defau
|
|
|
211039
209441
|
client.resolve(ticker, messageHash);
|
|
211040
209442
|
const messageHashes = this.findMessageHashes(client, 'tickers::');
|
|
211041
209443
|
for (let i = 0; i < messageHashes.length; i++) {
|
|
211042
|
-
const
|
|
211043
|
-
const parts =
|
|
209444
|
+
const currentMessageHash = messageHashes[i];
|
|
209445
|
+
const parts = currentMessageHash.split('::');
|
|
211044
209446
|
const symbolsString = parts[1];
|
|
211045
209447
|
const symbols = symbolsString.split(',');
|
|
211046
209448
|
if (this.inArray(symbol, symbols)) {
|
|
211047
|
-
client.resolve(ticker,
|
|
209449
|
+
client.resolve(ticker, currentMessageHash);
|
|
211048
209450
|
}
|
|
211049
209451
|
}
|
|
211050
209452
|
}
|
|
@@ -225550,15 +223952,15 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
225550
223952
|
client.resolve(ticker, 'tickers');
|
|
225551
223953
|
const messageHashes = this.findMessageHashes(client, 'tickers::');
|
|
225552
223954
|
for (let i = 0; i < messageHashes.length; i++) {
|
|
225553
|
-
const
|
|
225554
|
-
const parts =
|
|
223955
|
+
const currentMessageHash = messageHashes[i];
|
|
223956
|
+
const parts = currentMessageHash.split('::');
|
|
225555
223957
|
const symbolsString = parts[1];
|
|
225556
223958
|
const symbols = symbolsString.split(',');
|
|
225557
223959
|
const tickers = this.filterByArray(this.tickers, 'symbol', symbols);
|
|
225558
223960
|
const tickersSymbols = Object.keys(tickers);
|
|
225559
223961
|
const numTickers = tickersSymbols.length;
|
|
225560
223962
|
if (numTickers > 0) {
|
|
225561
|
-
client.resolve(tickers,
|
|
223963
|
+
client.resolve(tickers, currentMessageHash);
|
|
225562
223964
|
}
|
|
225563
223965
|
}
|
|
225564
223966
|
}
|
|
@@ -257314,7 +255716,8 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
257314
255716
|
toPrecision(amount, scale) {
|
|
257315
255717
|
const amountString = this.numberToString(amount);
|
|
257316
255718
|
const precise = new _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O(amountString);
|
|
257317
|
-
precise.decimals
|
|
255719
|
+
// precise.decimals should be integer
|
|
255720
|
+
precise.decimals = this.parseToInt(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringSub */ .O.stringSub(this.numberToString(precise.decimals), this.numberToString(scale)));
|
|
257318
255721
|
precise.reduce();
|
|
257319
255722
|
return precise;
|
|
257320
255723
|
}
|
|
@@ -273672,38 +272075,39 @@ var __webpack_exports__ = {};
|
|
|
273672
272075
|
(() => {
|
|
273673
272076
|
__webpack_require__.r(__webpack_exports__);
|
|
273674
272077
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
273675
|
-
/* harmony export */ "AccountNotEnabled": () => (/* reexport safe */
|
|
273676
|
-
/* harmony export */ "AccountSuspended": () => (/* reexport safe */
|
|
273677
|
-
/* harmony export */ "AddressPending": () => (/* reexport safe */
|
|
273678
|
-
/* harmony export */ "ArgumentsRequired": () => (/* reexport safe */
|
|
273679
|
-
/* harmony export */ "AuthenticationError": () => (/* reexport safe */
|
|
273680
|
-
/* harmony export */ "BadRequest": () => (/* reexport safe */
|
|
273681
|
-
/* harmony export */ "BadResponse": () => (/* reexport safe */
|
|
273682
|
-
/* harmony export */ "BadSymbol": () => (/* reexport safe */
|
|
273683
|
-
/* harmony export */ "BaseError": () => (/* reexport safe */
|
|
273684
|
-
/* harmony export */ "CancelPending": () => (/* reexport safe */
|
|
273685
|
-
/* harmony export */ "DDoSProtection": () => (/* reexport safe */
|
|
273686
|
-
/* harmony export */ "DuplicateOrderId": () => (/* reexport safe */
|
|
272078
|
+
/* harmony export */ "AccountNotEnabled": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.AccountNotEnabled),
|
|
272079
|
+
/* harmony export */ "AccountSuspended": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.AccountSuspended),
|
|
272080
|
+
/* harmony export */ "AddressPending": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.AddressPending),
|
|
272081
|
+
/* harmony export */ "ArgumentsRequired": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.ArgumentsRequired),
|
|
272082
|
+
/* harmony export */ "AuthenticationError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.AuthenticationError),
|
|
272083
|
+
/* harmony export */ "BadRequest": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.BadRequest),
|
|
272084
|
+
/* harmony export */ "BadResponse": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.BadResponse),
|
|
272085
|
+
/* harmony export */ "BadSymbol": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.BadSymbol),
|
|
272086
|
+
/* harmony export */ "BaseError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.BaseError),
|
|
272087
|
+
/* harmony export */ "CancelPending": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.CancelPending),
|
|
272088
|
+
/* harmony export */ "DDoSProtection": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.DDoSProtection),
|
|
272089
|
+
/* harmony export */ "DuplicateOrderId": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.DuplicateOrderId),
|
|
273687
272090
|
/* harmony export */ "Exchange": () => (/* reexport safe */ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__.e),
|
|
273688
|
-
/* harmony export */ "ExchangeError": () => (/* reexport safe */
|
|
273689
|
-
/* harmony export */ "ExchangeNotAvailable": () => (/* reexport safe */
|
|
273690
|
-
/* harmony export */ "InsufficientFunds": () => (/* reexport safe */
|
|
273691
|
-
/* harmony export */ "InvalidAddress": () => (/* reexport safe */
|
|
273692
|
-
/* harmony export */ "InvalidNonce": () => (/* reexport safe */
|
|
273693
|
-
/* harmony export */ "InvalidOrder": () => (/* reexport safe */
|
|
273694
|
-
/* harmony export */ "MarginModeAlreadySet": () => (/* reexport safe */
|
|
273695
|
-
/* harmony export */ "NetworkError": () => (/* reexport safe */
|
|
273696
|
-
/* harmony export */ "
|
|
273697
|
-
/* harmony export */ "
|
|
273698
|
-
/* harmony export */ "
|
|
273699
|
-
/* harmony export */ "
|
|
273700
|
-
/* harmony export */ "
|
|
273701
|
-
/* harmony export */ "
|
|
273702
|
-
/* harmony export */ "
|
|
273703
|
-
/* harmony export */ "
|
|
273704
|
-
/* harmony export */ "
|
|
273705
|
-
/* harmony export */ "
|
|
273706
|
-
/* harmony export */ "
|
|
272091
|
+
/* harmony export */ "ExchangeError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.ExchangeError),
|
|
272092
|
+
/* harmony export */ "ExchangeNotAvailable": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.ExchangeNotAvailable),
|
|
272093
|
+
/* harmony export */ "InsufficientFunds": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.InsufficientFunds),
|
|
272094
|
+
/* harmony export */ "InvalidAddress": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.InvalidAddress),
|
|
272095
|
+
/* harmony export */ "InvalidNonce": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.InvalidNonce),
|
|
272096
|
+
/* harmony export */ "InvalidOrder": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.InvalidOrder),
|
|
272097
|
+
/* harmony export */ "MarginModeAlreadySet": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.MarginModeAlreadySet),
|
|
272098
|
+
/* harmony export */ "NetworkError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.NetworkError),
|
|
272099
|
+
/* harmony export */ "NoChange": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.NoChange),
|
|
272100
|
+
/* harmony export */ "NotSupported": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.NotSupported),
|
|
272101
|
+
/* harmony export */ "NullResponse": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.NullResponse),
|
|
272102
|
+
/* harmony export */ "OnMaintenance": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.OnMaintenance),
|
|
272103
|
+
/* harmony export */ "OrderImmediatelyFillable": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.OrderImmediatelyFillable),
|
|
272104
|
+
/* harmony export */ "OrderNotCached": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.OrderNotCached),
|
|
272105
|
+
/* harmony export */ "OrderNotFillable": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.OrderNotFillable),
|
|
272106
|
+
/* harmony export */ "OrderNotFound": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.OrderNotFound),
|
|
272107
|
+
/* harmony export */ "PermissionDenied": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.PermissionDenied),
|
|
272108
|
+
/* harmony export */ "Precise": () => (/* reexport safe */ _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_165__.O),
|
|
272109
|
+
/* harmony export */ "RateLimitExceeded": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.RateLimitExceeded),
|
|
272110
|
+
/* harmony export */ "RequestTimeout": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.RequestTimeout),
|
|
273707
272111
|
/* harmony export */ "ace": () => (/* reexport safe */ _src_ace_js__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
273708
272112
|
/* harmony export */ "alpaca": () => (/* reexport safe */ _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__.Z),
|
|
273709
272113
|
/* harmony export */ "ascendex": () => (/* reexport safe */ _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__.Z),
|
|
@@ -273735,92 +272139,91 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
273735
272139
|
/* harmony export */ "bitstamp1": () => (/* reexport safe */ _src_bitstamp1_js__WEBPACK_IMPORTED_MODULE_29__.Z),
|
|
273736
272140
|
/* harmony export */ "bittrex": () => (/* reexport safe */ _src_bittrex_js__WEBPACK_IMPORTED_MODULE_30__.Z),
|
|
273737
272141
|
/* harmony export */ "bitvavo": () => (/* reexport safe */ _src_bitvavo_js__WEBPACK_IMPORTED_MODULE_31__.Z),
|
|
273738
|
-
/* harmony export */ "
|
|
273739
|
-
/* harmony export */ "
|
|
273740
|
-
/* harmony export */ "
|
|
273741
|
-
/* harmony export */ "
|
|
273742
|
-
/* harmony export */ "
|
|
273743
|
-
/* harmony export */ "
|
|
273744
|
-
/* harmony export */ "
|
|
273745
|
-
/* harmony export */ "
|
|
273746
|
-
/* harmony export */ "
|
|
273747
|
-
/* harmony export */ "
|
|
273748
|
-
/* harmony export */ "
|
|
273749
|
-
/* harmony export */ "
|
|
273750
|
-
/* harmony export */ "
|
|
273751
|
-
/* harmony export */ "
|
|
273752
|
-
/* harmony export */ "
|
|
273753
|
-
/* harmony export */ "
|
|
273754
|
-
/* harmony export */ "
|
|
273755
|
-
/* harmony export */ "
|
|
273756
|
-
/* harmony export */ "
|
|
273757
|
-
/* harmony export */ "
|
|
273758
|
-
/* harmony export */ "
|
|
273759
|
-
/* harmony export */ "currencycom": () => (/* reexport safe */ _src_currencycom_js__WEBPACK_IMPORTED_MODULE_53__.Z),
|
|
272142
|
+
/* harmony export */ "bl3p": () => (/* reexport safe */ _src_bl3p_js__WEBPACK_IMPORTED_MODULE_32__.Z),
|
|
272143
|
+
/* harmony export */ "blockchaincom": () => (/* reexport safe */ _src_blockchaincom_js__WEBPACK_IMPORTED_MODULE_33__.Z),
|
|
272144
|
+
/* harmony export */ "btcalpha": () => (/* reexport safe */ _src_btcalpha_js__WEBPACK_IMPORTED_MODULE_34__.Z),
|
|
272145
|
+
/* harmony export */ "btcbox": () => (/* reexport safe */ _src_btcbox_js__WEBPACK_IMPORTED_MODULE_35__.Z),
|
|
272146
|
+
/* harmony export */ "btcmarkets": () => (/* reexport safe */ _src_btcmarkets_js__WEBPACK_IMPORTED_MODULE_36__.Z),
|
|
272147
|
+
/* harmony export */ "btctradeua": () => (/* reexport safe */ _src_btctradeua_js__WEBPACK_IMPORTED_MODULE_37__.Z),
|
|
272148
|
+
/* harmony export */ "btcturk": () => (/* reexport safe */ _src_btcturk_js__WEBPACK_IMPORTED_MODULE_38__.Z),
|
|
272149
|
+
/* harmony export */ "bybit": () => (/* reexport safe */ _src_bybit_js__WEBPACK_IMPORTED_MODULE_39__.Z),
|
|
272150
|
+
/* harmony export */ "cex": () => (/* reexport safe */ _src_cex_js__WEBPACK_IMPORTED_MODULE_40__.Z),
|
|
272151
|
+
/* harmony export */ "coinbase": () => (/* reexport safe */ _src_coinbase_js__WEBPACK_IMPORTED_MODULE_41__.Z),
|
|
272152
|
+
/* harmony export */ "coinbaseprime": () => (/* reexport safe */ _src_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_42__.Z),
|
|
272153
|
+
/* harmony export */ "coinbasepro": () => (/* reexport safe */ _src_coinbasepro_js__WEBPACK_IMPORTED_MODULE_43__.Z),
|
|
272154
|
+
/* harmony export */ "coincheck": () => (/* reexport safe */ _src_coincheck_js__WEBPACK_IMPORTED_MODULE_44__.Z),
|
|
272155
|
+
/* harmony export */ "coinex": () => (/* reexport safe */ _src_coinex_js__WEBPACK_IMPORTED_MODULE_45__.Z),
|
|
272156
|
+
/* harmony export */ "coinfalcon": () => (/* reexport safe */ _src_coinfalcon_js__WEBPACK_IMPORTED_MODULE_46__.Z),
|
|
272157
|
+
/* harmony export */ "coinmate": () => (/* reexport safe */ _src_coinmate_js__WEBPACK_IMPORTED_MODULE_47__.Z),
|
|
272158
|
+
/* harmony export */ "coinone": () => (/* reexport safe */ _src_coinone_js__WEBPACK_IMPORTED_MODULE_48__.Z),
|
|
272159
|
+
/* harmony export */ "coinsph": () => (/* reexport safe */ _src_coinsph_js__WEBPACK_IMPORTED_MODULE_49__.Z),
|
|
272160
|
+
/* harmony export */ "coinspot": () => (/* reexport safe */ _src_coinspot_js__WEBPACK_IMPORTED_MODULE_50__.Z),
|
|
272161
|
+
/* harmony export */ "cryptocom": () => (/* reexport safe */ _src_cryptocom_js__WEBPACK_IMPORTED_MODULE_51__.Z),
|
|
272162
|
+
/* harmony export */ "currencycom": () => (/* reexport safe */ _src_currencycom_js__WEBPACK_IMPORTED_MODULE_52__.Z),
|
|
273760
272163
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
273761
|
-
/* harmony export */ "delta": () => (/* reexport safe */
|
|
273762
|
-
/* harmony export */ "deribit": () => (/* reexport safe */
|
|
273763
|
-
/* harmony export */ "digifinex": () => (/* reexport safe */
|
|
273764
|
-
/* harmony export */ "errors": () => (/* reexport module object */
|
|
272164
|
+
/* harmony export */ "delta": () => (/* reexport safe */ _src_delta_js__WEBPACK_IMPORTED_MODULE_53__.Z),
|
|
272165
|
+
/* harmony export */ "deribit": () => (/* reexport safe */ _src_deribit_js__WEBPACK_IMPORTED_MODULE_54__.Z),
|
|
272166
|
+
/* harmony export */ "digifinex": () => (/* reexport safe */ _src_digifinex_js__WEBPACK_IMPORTED_MODULE_55__.Z),
|
|
272167
|
+
/* harmony export */ "errors": () => (/* reexport module object */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__),
|
|
273765
272168
|
/* harmony export */ "exchanges": () => (/* binding */ exchanges),
|
|
273766
|
-
/* harmony export */ "exmo": () => (/* reexport safe */
|
|
273767
|
-
/* harmony export */ "fmfwio": () => (/* reexport safe */
|
|
273768
|
-
/* harmony export */ "functions": () => (/* reexport module object */
|
|
273769
|
-
/* harmony export */ "gate": () => (/* reexport safe */
|
|
273770
|
-
/* harmony export */ "gateio": () => (/* reexport safe */
|
|
273771
|
-
/* harmony export */ "gemini": () => (/* reexport safe */
|
|
273772
|
-
/* harmony export */ "hitbtc": () => (/* reexport safe */
|
|
273773
|
-
/* harmony export */ "hitbtc3": () => (/* reexport safe */
|
|
273774
|
-
/* harmony export */ "hollaex": () => (/* reexport safe */
|
|
273775
|
-
/* harmony export */ "huobi": () => (/* reexport safe */
|
|
273776
|
-
/* harmony export */ "huobijp": () => (/* reexport safe */
|
|
273777
|
-
/* harmony export */ "huobipro": () => (/* reexport safe */
|
|
273778
|
-
/* harmony export */ "idex": () => (/* reexport safe */
|
|
273779
|
-
/* harmony export */ "independentreserve": () => (/* reexport safe */
|
|
273780
|
-
/* harmony export */ "indodax": () => (/* reexport safe */
|
|
273781
|
-
/* harmony export */ "kraken": () => (/* reexport safe */
|
|
273782
|
-
/* harmony export */ "krakenfutures": () => (/* reexport safe */
|
|
273783
|
-
/* harmony export */ "kucoin": () => (/* reexport safe */
|
|
273784
|
-
/* harmony export */ "kucoinfutures": () => (/* reexport safe */
|
|
273785
|
-
/* harmony export */ "kuna": () => (/* reexport safe */
|
|
273786
|
-
/* harmony export */ "latoken": () => (/* reexport safe */
|
|
273787
|
-
/* harmony export */ "lbank": () => (/* reexport safe */
|
|
273788
|
-
/* harmony export */ "lbank2": () => (/* reexport safe */
|
|
273789
|
-
/* harmony export */ "luno": () => (/* reexport safe */
|
|
273790
|
-
/* harmony export */ "lykke": () => (/* reexport safe */
|
|
273791
|
-
/* harmony export */ "mercado": () => (/* reexport safe */
|
|
273792
|
-
/* harmony export */ "mexc": () => (/* reexport safe */
|
|
273793
|
-
/* harmony export */ "mexc3": () => (/* reexport safe */
|
|
273794
|
-
/* harmony export */ "ndax": () => (/* reexport safe */
|
|
273795
|
-
/* harmony export */ "novadax": () => (/* reexport safe */
|
|
273796
|
-
/* harmony export */ "oceanex": () => (/* reexport safe */
|
|
273797
|
-
/* harmony export */ "okcoin": () => (/* reexport safe */
|
|
273798
|
-
/* harmony export */ "okex": () => (/* reexport safe */
|
|
273799
|
-
/* harmony export */ "okex5": () => (/* reexport safe */
|
|
273800
|
-
/* harmony export */ "okx": () => (/* reexport safe */
|
|
273801
|
-
/* harmony export */ "paymium": () => (/* reexport safe */
|
|
273802
|
-
/* harmony export */ "phemex": () => (/* reexport safe */
|
|
273803
|
-
/* harmony export */ "poloniex": () => (/* reexport safe */
|
|
273804
|
-
/* harmony export */ "poloniexfutures": () => (/* reexport safe */
|
|
272169
|
+
/* harmony export */ "exmo": () => (/* reexport safe */ _src_exmo_js__WEBPACK_IMPORTED_MODULE_56__.Z),
|
|
272170
|
+
/* harmony export */ "fmfwio": () => (/* reexport safe */ _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_57__.Z),
|
|
272171
|
+
/* harmony export */ "functions": () => (/* reexport module object */ _src_base_functions_js__WEBPACK_IMPORTED_MODULE_166__),
|
|
272172
|
+
/* harmony export */ "gate": () => (/* reexport safe */ _src_gate_js__WEBPACK_IMPORTED_MODULE_58__.Z),
|
|
272173
|
+
/* harmony export */ "gateio": () => (/* reexport safe */ _src_gateio_js__WEBPACK_IMPORTED_MODULE_59__.Z),
|
|
272174
|
+
/* harmony export */ "gemini": () => (/* reexport safe */ _src_gemini_js__WEBPACK_IMPORTED_MODULE_60__.Z),
|
|
272175
|
+
/* harmony export */ "hitbtc": () => (/* reexport safe */ _src_hitbtc_js__WEBPACK_IMPORTED_MODULE_61__.Z),
|
|
272176
|
+
/* harmony export */ "hitbtc3": () => (/* reexport safe */ _src_hitbtc3_js__WEBPACK_IMPORTED_MODULE_62__.Z),
|
|
272177
|
+
/* harmony export */ "hollaex": () => (/* reexport safe */ _src_hollaex_js__WEBPACK_IMPORTED_MODULE_63__.Z),
|
|
272178
|
+
/* harmony export */ "huobi": () => (/* reexport safe */ _src_huobi_js__WEBPACK_IMPORTED_MODULE_64__.Z),
|
|
272179
|
+
/* harmony export */ "huobijp": () => (/* reexport safe */ _src_huobijp_js__WEBPACK_IMPORTED_MODULE_65__.Z),
|
|
272180
|
+
/* harmony export */ "huobipro": () => (/* reexport safe */ _src_huobipro_js__WEBPACK_IMPORTED_MODULE_66__.Z),
|
|
272181
|
+
/* harmony export */ "idex": () => (/* reexport safe */ _src_idex_js__WEBPACK_IMPORTED_MODULE_67__.Z),
|
|
272182
|
+
/* harmony export */ "independentreserve": () => (/* reexport safe */ _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_68__.Z),
|
|
272183
|
+
/* harmony export */ "indodax": () => (/* reexport safe */ _src_indodax_js__WEBPACK_IMPORTED_MODULE_69__.Z),
|
|
272184
|
+
/* harmony export */ "kraken": () => (/* reexport safe */ _src_kraken_js__WEBPACK_IMPORTED_MODULE_70__.Z),
|
|
272185
|
+
/* harmony export */ "krakenfutures": () => (/* reexport safe */ _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_71__.Z),
|
|
272186
|
+
/* harmony export */ "kucoin": () => (/* reexport safe */ _src_kucoin_js__WEBPACK_IMPORTED_MODULE_72__.Z),
|
|
272187
|
+
/* harmony export */ "kucoinfutures": () => (/* reexport safe */ _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_73__.Z),
|
|
272188
|
+
/* harmony export */ "kuna": () => (/* reexport safe */ _src_kuna_js__WEBPACK_IMPORTED_MODULE_74__.Z),
|
|
272189
|
+
/* harmony export */ "latoken": () => (/* reexport safe */ _src_latoken_js__WEBPACK_IMPORTED_MODULE_75__.Z),
|
|
272190
|
+
/* harmony export */ "lbank": () => (/* reexport safe */ _src_lbank_js__WEBPACK_IMPORTED_MODULE_76__.Z),
|
|
272191
|
+
/* harmony export */ "lbank2": () => (/* reexport safe */ _src_lbank2_js__WEBPACK_IMPORTED_MODULE_77__.Z),
|
|
272192
|
+
/* harmony export */ "luno": () => (/* reexport safe */ _src_luno_js__WEBPACK_IMPORTED_MODULE_78__.Z),
|
|
272193
|
+
/* harmony export */ "lykke": () => (/* reexport safe */ _src_lykke_js__WEBPACK_IMPORTED_MODULE_79__.Z),
|
|
272194
|
+
/* harmony export */ "mercado": () => (/* reexport safe */ _src_mercado_js__WEBPACK_IMPORTED_MODULE_80__.Z),
|
|
272195
|
+
/* harmony export */ "mexc": () => (/* reexport safe */ _src_mexc_js__WEBPACK_IMPORTED_MODULE_81__.Z),
|
|
272196
|
+
/* harmony export */ "mexc3": () => (/* reexport safe */ _src_mexc3_js__WEBPACK_IMPORTED_MODULE_82__.Z),
|
|
272197
|
+
/* harmony export */ "ndax": () => (/* reexport safe */ _src_ndax_js__WEBPACK_IMPORTED_MODULE_83__.Z),
|
|
272198
|
+
/* harmony export */ "novadax": () => (/* reexport safe */ _src_novadax_js__WEBPACK_IMPORTED_MODULE_84__.Z),
|
|
272199
|
+
/* harmony export */ "oceanex": () => (/* reexport safe */ _src_oceanex_js__WEBPACK_IMPORTED_MODULE_85__.Z),
|
|
272200
|
+
/* harmony export */ "okcoin": () => (/* reexport safe */ _src_okcoin_js__WEBPACK_IMPORTED_MODULE_86__.Z),
|
|
272201
|
+
/* harmony export */ "okex": () => (/* reexport safe */ _src_okex_js__WEBPACK_IMPORTED_MODULE_87__.Z),
|
|
272202
|
+
/* harmony export */ "okex5": () => (/* reexport safe */ _src_okex5_js__WEBPACK_IMPORTED_MODULE_88__.Z),
|
|
272203
|
+
/* harmony export */ "okx": () => (/* reexport safe */ _src_okx_js__WEBPACK_IMPORTED_MODULE_89__.Z),
|
|
272204
|
+
/* harmony export */ "paymium": () => (/* reexport safe */ _src_paymium_js__WEBPACK_IMPORTED_MODULE_90__.Z),
|
|
272205
|
+
/* harmony export */ "phemex": () => (/* reexport safe */ _src_phemex_js__WEBPACK_IMPORTED_MODULE_91__.Z),
|
|
272206
|
+
/* harmony export */ "poloniex": () => (/* reexport safe */ _src_poloniex_js__WEBPACK_IMPORTED_MODULE_92__.Z),
|
|
272207
|
+
/* harmony export */ "poloniexfutures": () => (/* reexport safe */ _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_93__.Z),
|
|
273805
272208
|
/* harmony export */ "pro": () => (/* binding */ pro),
|
|
273806
|
-
/* harmony export */ "probit": () => (/* reexport safe */
|
|
273807
|
-
/* harmony export */ "tidex": () => (/* reexport safe */
|
|
273808
|
-
/* harmony export */ "timex": () => (/* reexport safe */
|
|
273809
|
-
/* harmony export */ "tokocrypto": () => (/* reexport safe */
|
|
273810
|
-
/* harmony export */ "upbit": () => (/* reexport safe */
|
|
272209
|
+
/* harmony export */ "probit": () => (/* reexport safe */ _src_probit_js__WEBPACK_IMPORTED_MODULE_94__.Z),
|
|
272210
|
+
/* harmony export */ "tidex": () => (/* reexport safe */ _src_tidex_js__WEBPACK_IMPORTED_MODULE_95__.Z),
|
|
272211
|
+
/* harmony export */ "timex": () => (/* reexport safe */ _src_timex_js__WEBPACK_IMPORTED_MODULE_96__.Z),
|
|
272212
|
+
/* harmony export */ "tokocrypto": () => (/* reexport safe */ _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_97__.Z),
|
|
272213
|
+
/* harmony export */ "upbit": () => (/* reexport safe */ _src_upbit_js__WEBPACK_IMPORTED_MODULE_98__.Z),
|
|
273811
272214
|
/* harmony export */ "version": () => (/* binding */ version),
|
|
273812
|
-
/* harmony export */ "wavesexchange": () => (/* reexport safe */
|
|
273813
|
-
/* harmony export */ "wazirx": () => (/* reexport safe */
|
|
273814
|
-
/* harmony export */ "whitebit": () => (/* reexport safe */
|
|
273815
|
-
/* harmony export */ "woo": () => (/* reexport safe */
|
|
273816
|
-
/* harmony export */ "yobit": () => (/* reexport safe */
|
|
273817
|
-
/* harmony export */ "zaif": () => (/* reexport safe */
|
|
273818
|
-
/* harmony export */ "zonda": () => (/* reexport safe */
|
|
272215
|
+
/* harmony export */ "wavesexchange": () => (/* reexport safe */ _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_99__.Z),
|
|
272216
|
+
/* harmony export */ "wazirx": () => (/* reexport safe */ _src_wazirx_js__WEBPACK_IMPORTED_MODULE_100__.Z),
|
|
272217
|
+
/* harmony export */ "whitebit": () => (/* reexport safe */ _src_whitebit_js__WEBPACK_IMPORTED_MODULE_101__.Z),
|
|
272218
|
+
/* harmony export */ "woo": () => (/* reexport safe */ _src_woo_js__WEBPACK_IMPORTED_MODULE_102__.Z),
|
|
272219
|
+
/* harmony export */ "yobit": () => (/* reexport safe */ _src_yobit_js__WEBPACK_IMPORTED_MODULE_103__.Z),
|
|
272220
|
+
/* harmony export */ "zaif": () => (/* reexport safe */ _src_zaif_js__WEBPACK_IMPORTED_MODULE_104__.Z),
|
|
272221
|
+
/* harmony export */ "zonda": () => (/* reexport safe */ _src_zonda_js__WEBPACK_IMPORTED_MODULE_105__.Z)
|
|
273819
272222
|
/* harmony export */ });
|
|
273820
272223
|
/* harmony import */ var _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
273821
|
-
/* harmony import */ var
|
|
273822
|
-
/* harmony import */ var
|
|
273823
|
-
/* harmony import */ var
|
|
272224
|
+
/* harmony import */ var _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(2194);
|
|
272225
|
+
/* harmony import */ var _src_base_functions_js__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(7100);
|
|
272226
|
+
/* harmony import */ var _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(6689);
|
|
273824
272227
|
/* harmony import */ var _src_ace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9869);
|
|
273825
272228
|
/* harmony import */ var _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5660);
|
|
273826
272229
|
/* harmony import */ var _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9612);
|
|
@@ -273852,140 +272255,139 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
273852
272255
|
/* harmony import */ var _src_bitstamp1_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(1242);
|
|
273853
272256
|
/* harmony import */ var _src_bittrex_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(8963);
|
|
273854
272257
|
/* harmony import */ var _src_bitvavo_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(9943);
|
|
273855
|
-
/* harmony import */ var
|
|
273856
|
-
/* harmony import */ var
|
|
273857
|
-
/* harmony import */ var
|
|
273858
|
-
/* harmony import */ var
|
|
273859
|
-
/* harmony import */ var
|
|
273860
|
-
/* harmony import */ var
|
|
273861
|
-
/* harmony import */ var
|
|
273862
|
-
/* harmony import */ var
|
|
273863
|
-
/* harmony import */ var
|
|
273864
|
-
/* harmony import */ var
|
|
273865
|
-
/* harmony import */ var
|
|
273866
|
-
/* harmony import */ var
|
|
273867
|
-
/* harmony import */ var
|
|
273868
|
-
/* harmony import */ var
|
|
273869
|
-
/* harmony import */ var
|
|
273870
|
-
/* harmony import */ var
|
|
273871
|
-
/* harmony import */ var
|
|
273872
|
-
/* harmony import */ var
|
|
273873
|
-
/* harmony import */ var
|
|
273874
|
-
/* harmony import */ var
|
|
273875
|
-
/* harmony import */ var
|
|
273876
|
-
/* harmony import */ var
|
|
273877
|
-
/* harmony import */ var
|
|
273878
|
-
/* harmony import */ var
|
|
273879
|
-
/* harmony import */ var
|
|
273880
|
-
/* harmony import */ var
|
|
273881
|
-
/* harmony import */ var
|
|
273882
|
-
/* harmony import */ var
|
|
273883
|
-
/* harmony import */ var
|
|
273884
|
-
/* harmony import */ var
|
|
273885
|
-
/* harmony import */ var
|
|
273886
|
-
/* harmony import */ var
|
|
273887
|
-
/* harmony import */ var
|
|
273888
|
-
/* harmony import */ var
|
|
273889
|
-
/* harmony import */ var
|
|
273890
|
-
/* harmony import */ var
|
|
273891
|
-
/* harmony import */ var
|
|
273892
|
-
/* harmony import */ var
|
|
273893
|
-
/* harmony import */ var
|
|
273894
|
-
/* harmony import */ var
|
|
273895
|
-
/* harmony import */ var
|
|
273896
|
-
/* harmony import */ var
|
|
273897
|
-
/* harmony import */ var
|
|
273898
|
-
/* harmony import */ var
|
|
273899
|
-
/* harmony import */ var
|
|
273900
|
-
/* harmony import */ var
|
|
273901
|
-
/* harmony import */ var
|
|
273902
|
-
/* harmony import */ var
|
|
273903
|
-
/* harmony import */ var
|
|
273904
|
-
/* harmony import */ var
|
|
273905
|
-
/* harmony import */ var
|
|
273906
|
-
/* harmony import */ var
|
|
273907
|
-
/* harmony import */ var
|
|
273908
|
-
/* harmony import */ var
|
|
273909
|
-
/* harmony import */ var
|
|
273910
|
-
/* harmony import */ var
|
|
273911
|
-
/* harmony import */ var
|
|
273912
|
-
/* harmony import */ var
|
|
273913
|
-
/* harmony import */ var
|
|
273914
|
-
/* harmony import */ var
|
|
273915
|
-
/* harmony import */ var
|
|
273916
|
-
/* harmony import */ var
|
|
273917
|
-
/* harmony import */ var
|
|
273918
|
-
/* harmony import */ var
|
|
273919
|
-
/* harmony import */ var
|
|
273920
|
-
/* harmony import */ var
|
|
273921
|
-
/* harmony import */ var
|
|
273922
|
-
/* harmony import */ var
|
|
273923
|
-
/* harmony import */ var
|
|
273924
|
-
/* harmony import */ var
|
|
273925
|
-
/* harmony import */ var
|
|
273926
|
-
/* harmony import */ var
|
|
273927
|
-
/* harmony import */ var
|
|
273928
|
-
/* harmony import */ var
|
|
273929
|
-
/* harmony import */ var
|
|
273930
|
-
/* harmony import */ var
|
|
273931
|
-
/* harmony import */ var
|
|
273932
|
-
/* harmony import */ var
|
|
273933
|
-
/* harmony import */ var
|
|
273934
|
-
/* harmony import */ var
|
|
273935
|
-
/* harmony import */ var
|
|
273936
|
-
/* harmony import */ var
|
|
273937
|
-
/* harmony import */ var
|
|
273938
|
-
/* harmony import */ var
|
|
273939
|
-
/* harmony import */ var
|
|
273940
|
-
/* harmony import */ var
|
|
273941
|
-
/* harmony import */ var
|
|
273942
|
-
/* harmony import */ var
|
|
273943
|
-
/* harmony import */ var
|
|
273944
|
-
/* harmony import */ var
|
|
273945
|
-
/* harmony import */ var
|
|
273946
|
-
/* harmony import */ var
|
|
273947
|
-
/* harmony import */ var
|
|
273948
|
-
/* harmony import */ var
|
|
273949
|
-
/* harmony import */ var
|
|
273950
|
-
/* harmony import */ var
|
|
273951
|
-
/* harmony import */ var
|
|
273952
|
-
/* harmony import */ var
|
|
273953
|
-
/* harmony import */ var
|
|
273954
|
-
/* harmony import */ var
|
|
273955
|
-
/* harmony import */ var
|
|
273956
|
-
/* harmony import */ var
|
|
273957
|
-
/* harmony import */ var
|
|
273958
|
-
/* harmony import */ var
|
|
273959
|
-
/* harmony import */ var
|
|
273960
|
-
/* harmony import */ var
|
|
273961
|
-
/* harmony import */ var
|
|
273962
|
-
/* harmony import */ var
|
|
273963
|
-
/* harmony import */ var
|
|
273964
|
-
/* harmony import */ var
|
|
273965
|
-
/* harmony import */ var
|
|
273966
|
-
/* harmony import */ var
|
|
273967
|
-
/* harmony import */ var
|
|
273968
|
-
/* harmony import */ var
|
|
273969
|
-
/* harmony import */ var
|
|
273970
|
-
/* harmony import */ var
|
|
273971
|
-
/* harmony import */ var
|
|
273972
|
-
/* harmony import */ var
|
|
273973
|
-
/* harmony import */ var
|
|
273974
|
-
/* harmony import */ var
|
|
273975
|
-
/* harmony import */ var
|
|
273976
|
-
/* harmony import */ var
|
|
273977
|
-
/* harmony import */ var
|
|
273978
|
-
/* harmony import */ var
|
|
273979
|
-
/* harmony import */ var
|
|
273980
|
-
/* harmony import */ var
|
|
273981
|
-
/* harmony import */ var
|
|
273982
|
-
/* harmony import */ var
|
|
273983
|
-
/* harmony import */ var
|
|
273984
|
-
/* harmony import */ var
|
|
273985
|
-
/* harmony import */ var
|
|
273986
|
-
/* harmony import */ var
|
|
273987
|
-
/* harmony import */ var
|
|
273988
|
-
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(3910);
|
|
272258
|
+
/* harmony import */ var _src_bl3p_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(9476);
|
|
272259
|
+
/* harmony import */ var _src_blockchaincom_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(182);
|
|
272260
|
+
/* harmony import */ var _src_btcalpha_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(6246);
|
|
272261
|
+
/* harmony import */ var _src_btcbox_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(7796);
|
|
272262
|
+
/* harmony import */ var _src_btcmarkets_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(1776);
|
|
272263
|
+
/* harmony import */ var _src_btctradeua_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(8776);
|
|
272264
|
+
/* harmony import */ var _src_btcturk_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(6304);
|
|
272265
|
+
/* harmony import */ var _src_bybit_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(3527);
|
|
272266
|
+
/* harmony import */ var _src_cex_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(6445);
|
|
272267
|
+
/* harmony import */ var _src_coinbase_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(437);
|
|
272268
|
+
/* harmony import */ var _src_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(1741);
|
|
272269
|
+
/* harmony import */ var _src_coinbasepro_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(8856);
|
|
272270
|
+
/* harmony import */ var _src_coincheck_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(2117);
|
|
272271
|
+
/* harmony import */ var _src_coinex_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(332);
|
|
272272
|
+
/* harmony import */ var _src_coinfalcon_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(5585);
|
|
272273
|
+
/* harmony import */ var _src_coinmate_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(9816);
|
|
272274
|
+
/* harmony import */ var _src_coinone_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(7811);
|
|
272275
|
+
/* harmony import */ var _src_coinsph_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(5782);
|
|
272276
|
+
/* harmony import */ var _src_coinspot_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(7794);
|
|
272277
|
+
/* harmony import */ var _src_cryptocom_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(9129);
|
|
272278
|
+
/* harmony import */ var _src_currencycom_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(3214);
|
|
272279
|
+
/* harmony import */ var _src_delta_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(1753);
|
|
272280
|
+
/* harmony import */ var _src_deribit_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(24);
|
|
272281
|
+
/* harmony import */ var _src_digifinex_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(8846);
|
|
272282
|
+
/* harmony import */ var _src_exmo_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(1729);
|
|
272283
|
+
/* harmony import */ var _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(5788);
|
|
272284
|
+
/* harmony import */ var _src_gate_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(7290);
|
|
272285
|
+
/* harmony import */ var _src_gateio_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(7036);
|
|
272286
|
+
/* harmony import */ var _src_gemini_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(6743);
|
|
272287
|
+
/* harmony import */ var _src_hitbtc_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(4714);
|
|
272288
|
+
/* harmony import */ var _src_hitbtc3_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(4815);
|
|
272289
|
+
/* harmony import */ var _src_hollaex_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(8422);
|
|
272290
|
+
/* harmony import */ var _src_huobi_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(8146);
|
|
272291
|
+
/* harmony import */ var _src_huobijp_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(7034);
|
|
272292
|
+
/* harmony import */ var _src_huobipro_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(5547);
|
|
272293
|
+
/* harmony import */ var _src_idex_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(8232);
|
|
272294
|
+
/* harmony import */ var _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(9570);
|
|
272295
|
+
/* harmony import */ var _src_indodax_js__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(1605);
|
|
272296
|
+
/* harmony import */ var _src_kraken_js__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(9922);
|
|
272297
|
+
/* harmony import */ var _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(4470);
|
|
272298
|
+
/* harmony import */ var _src_kucoin_js__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(3583);
|
|
272299
|
+
/* harmony import */ var _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(1924);
|
|
272300
|
+
/* harmony import */ var _src_kuna_js__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(7732);
|
|
272301
|
+
/* harmony import */ var _src_latoken_js__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(2545);
|
|
272302
|
+
/* harmony import */ var _src_lbank_js__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(3944);
|
|
272303
|
+
/* harmony import */ var _src_lbank2_js__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(8601);
|
|
272304
|
+
/* harmony import */ var _src_luno_js__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(1758);
|
|
272305
|
+
/* harmony import */ var _src_lykke_js__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(3803);
|
|
272306
|
+
/* harmony import */ var _src_mercado_js__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(9013);
|
|
272307
|
+
/* harmony import */ var _src_mexc_js__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(6641);
|
|
272308
|
+
/* harmony import */ var _src_mexc3_js__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(2305);
|
|
272309
|
+
/* harmony import */ var _src_ndax_js__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(4531);
|
|
272310
|
+
/* harmony import */ var _src_novadax_js__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(2449);
|
|
272311
|
+
/* harmony import */ var _src_oceanex_js__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(6749);
|
|
272312
|
+
/* harmony import */ var _src_okcoin_js__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(3007);
|
|
272313
|
+
/* harmony import */ var _src_okex_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(5322);
|
|
272314
|
+
/* harmony import */ var _src_okex5_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(7826);
|
|
272315
|
+
/* harmony import */ var _src_okx_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(4042);
|
|
272316
|
+
/* harmony import */ var _src_paymium_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(7082);
|
|
272317
|
+
/* harmony import */ var _src_phemex_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(79);
|
|
272318
|
+
/* harmony import */ var _src_poloniex_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(8891);
|
|
272319
|
+
/* harmony import */ var _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(6877);
|
|
272320
|
+
/* harmony import */ var _src_probit_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(3657);
|
|
272321
|
+
/* harmony import */ var _src_tidex_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(4224);
|
|
272322
|
+
/* harmony import */ var _src_timex_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(1067);
|
|
272323
|
+
/* harmony import */ var _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(5261);
|
|
272324
|
+
/* harmony import */ var _src_upbit_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(7584);
|
|
272325
|
+
/* harmony import */ var _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(3853);
|
|
272326
|
+
/* harmony import */ var _src_wazirx_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(6536);
|
|
272327
|
+
/* harmony import */ var _src_whitebit_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(5467);
|
|
272328
|
+
/* harmony import */ var _src_woo_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(517);
|
|
272329
|
+
/* harmony import */ var _src_yobit_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(3850);
|
|
272330
|
+
/* harmony import */ var _src_zaif_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(5934);
|
|
272331
|
+
/* harmony import */ var _src_zonda_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(5140);
|
|
272332
|
+
/* harmony import */ var _src_pro_alpaca_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(2467);
|
|
272333
|
+
/* harmony import */ var _src_pro_ascendex_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(2383);
|
|
272334
|
+
/* harmony import */ var _src_pro_bequant_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(8848);
|
|
272335
|
+
/* harmony import */ var _src_pro_binance_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(8764);
|
|
272336
|
+
/* harmony import */ var _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(5078);
|
|
272337
|
+
/* harmony import */ var _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(1326);
|
|
272338
|
+
/* harmony import */ var _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(1230);
|
|
272339
|
+
/* harmony import */ var _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(453);
|
|
272340
|
+
/* harmony import */ var _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(9772);
|
|
272341
|
+
/* harmony import */ var _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(588);
|
|
272342
|
+
/* harmony import */ var _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(1885);
|
|
272343
|
+
/* harmony import */ var _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(7504);
|
|
272344
|
+
/* harmony import */ var _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(2302);
|
|
272345
|
+
/* harmony import */ var _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(2191);
|
|
272346
|
+
/* harmony import */ var _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(1297);
|
|
272347
|
+
/* harmony import */ var _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(3005);
|
|
272348
|
+
/* harmony import */ var _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(3623);
|
|
272349
|
+
/* harmony import */ var _src_pro_bittrex_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(2883);
|
|
272350
|
+
/* harmony import */ var _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(6977);
|
|
272351
|
+
/* harmony import */ var _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(2519);
|
|
272352
|
+
/* harmony import */ var _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(5030);
|
|
272353
|
+
/* harmony import */ var _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(5272);
|
|
272354
|
+
/* harmony import */ var _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(3414);
|
|
272355
|
+
/* harmony import */ var _src_pro_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(3848);
|
|
272356
|
+
/* harmony import */ var _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(8368);
|
|
272357
|
+
/* harmony import */ var _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(204);
|
|
272358
|
+
/* harmony import */ var _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(6820);
|
|
272359
|
+
/* harmony import */ var _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(2952);
|
|
272360
|
+
/* harmony import */ var _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(1788);
|
|
272361
|
+
/* harmony import */ var _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(9004);
|
|
272362
|
+
/* harmony import */ var _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(8335);
|
|
272363
|
+
/* harmony import */ var _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(1465);
|
|
272364
|
+
/* harmony import */ var _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(9488);
|
|
272365
|
+
/* harmony import */ var _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(5189);
|
|
272366
|
+
/* harmony import */ var _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(8559);
|
|
272367
|
+
/* harmony import */ var _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(8384);
|
|
272368
|
+
/* harmony import */ var _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(9021);
|
|
272369
|
+
/* harmony import */ var _src_pro_huobipro_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(4625);
|
|
272370
|
+
/* harmony import */ var _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(3484);
|
|
272371
|
+
/* harmony import */ var _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(1311);
|
|
272372
|
+
/* harmony import */ var _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(736);
|
|
272373
|
+
/* harmony import */ var _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(449);
|
|
272374
|
+
/* harmony import */ var _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(2387);
|
|
272375
|
+
/* harmony import */ var _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(7181);
|
|
272376
|
+
/* harmony import */ var _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(627);
|
|
272377
|
+
/* harmony import */ var _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(6484);
|
|
272378
|
+
/* harmony import */ var _src_pro_mexc3_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(5351);
|
|
272379
|
+
/* harmony import */ var _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(8080);
|
|
272380
|
+
/* harmony import */ var _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(7105);
|
|
272381
|
+
/* harmony import */ var _src_pro_okex_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(1530);
|
|
272382
|
+
/* harmony import */ var _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(2214);
|
|
272383
|
+
/* harmony import */ var _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(4360);
|
|
272384
|
+
/* harmony import */ var _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(7924);
|
|
272385
|
+
/* harmony import */ var _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(3541);
|
|
272386
|
+
/* harmony import */ var _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(9782);
|
|
272387
|
+
/* harmony import */ var _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(7614);
|
|
272388
|
+
/* harmony import */ var _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(4828);
|
|
272389
|
+
/* harmony import */ var _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(5630);
|
|
272390
|
+
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(3910);
|
|
273989
272391
|
/*
|
|
273990
272392
|
|
|
273991
272393
|
MIT License
|
|
@@ -274020,7 +272422,7 @@ SOFTWARE.
|
|
|
274020
272422
|
|
|
274021
272423
|
//-----------------------------------------------------------------------------
|
|
274022
272424
|
// this is updated by vss.js when building
|
|
274023
|
-
const version = '4.0.
|
|
272425
|
+
const version = '4.0.103';
|
|
274024
272426
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
274025
272427
|
//-----------------------------------------------------------------------------
|
|
274026
272428
|
|
|
@@ -274126,7 +272528,6 @@ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e
|
|
|
274126
272528
|
|
|
274127
272529
|
|
|
274128
272530
|
|
|
274129
|
-
|
|
274130
272531
|
|
|
274131
272532
|
|
|
274132
272533
|
// pro exchanges
|
|
@@ -274221,142 +272622,141 @@ const exchanges = {
|
|
|
274221
272622
|
'bitstamp1': _src_bitstamp1_js__WEBPACK_IMPORTED_MODULE_29__/* ["default"] */ .Z,
|
|
274222
272623
|
'bittrex': _src_bittrex_js__WEBPACK_IMPORTED_MODULE_30__/* ["default"] */ .Z,
|
|
274223
272624
|
'bitvavo': _src_bitvavo_js__WEBPACK_IMPORTED_MODULE_31__/* ["default"] */ .Z,
|
|
274224
|
-
'
|
|
274225
|
-
'
|
|
274226
|
-
'
|
|
274227
|
-
'
|
|
274228
|
-
'
|
|
274229
|
-
'
|
|
274230
|
-
'
|
|
274231
|
-
'
|
|
274232
|
-
'
|
|
274233
|
-
'
|
|
274234
|
-
'
|
|
274235
|
-
'
|
|
274236
|
-
'
|
|
274237
|
-
'
|
|
274238
|
-
'
|
|
274239
|
-
'
|
|
274240
|
-
'
|
|
274241
|
-
'
|
|
274242
|
-
'
|
|
274243
|
-
'
|
|
274244
|
-
'
|
|
274245
|
-
'
|
|
274246
|
-
'
|
|
274247
|
-
'
|
|
274248
|
-
'
|
|
274249
|
-
'
|
|
274250
|
-
'
|
|
274251
|
-
'
|
|
274252
|
-
'
|
|
274253
|
-
'
|
|
274254
|
-
'
|
|
274255
|
-
'
|
|
274256
|
-
'
|
|
274257
|
-
'
|
|
274258
|
-
'
|
|
274259
|
-
'
|
|
274260
|
-
'
|
|
274261
|
-
'
|
|
274262
|
-
'
|
|
274263
|
-
'
|
|
274264
|
-
'
|
|
274265
|
-
'
|
|
274266
|
-
'
|
|
274267
|
-
'
|
|
274268
|
-
'
|
|
274269
|
-
'
|
|
274270
|
-
'
|
|
274271
|
-
'
|
|
274272
|
-
'
|
|
274273
|
-
'
|
|
274274
|
-
'
|
|
274275
|
-
'
|
|
274276
|
-
'
|
|
274277
|
-
'
|
|
274278
|
-
'
|
|
274279
|
-
'
|
|
274280
|
-
'
|
|
274281
|
-
'
|
|
274282
|
-
'
|
|
274283
|
-
'
|
|
274284
|
-
'
|
|
274285
|
-
'
|
|
274286
|
-
'
|
|
274287
|
-
'
|
|
274288
|
-
'
|
|
274289
|
-
'
|
|
274290
|
-
'
|
|
274291
|
-
'
|
|
274292
|
-
'
|
|
274293
|
-
'
|
|
274294
|
-
'
|
|
274295
|
-
'
|
|
274296
|
-
'
|
|
274297
|
-
'
|
|
274298
|
-
'zonda': _src_zonda_js__WEBPACK_IMPORTED_MODULE_106__/* ["default"] */ .Z,
|
|
272625
|
+
'bl3p': _src_bl3p_js__WEBPACK_IMPORTED_MODULE_32__/* ["default"] */ .Z,
|
|
272626
|
+
'blockchaincom': _src_blockchaincom_js__WEBPACK_IMPORTED_MODULE_33__/* ["default"] */ .Z,
|
|
272627
|
+
'btcalpha': _src_btcalpha_js__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .Z,
|
|
272628
|
+
'btcbox': _src_btcbox_js__WEBPACK_IMPORTED_MODULE_35__/* ["default"] */ .Z,
|
|
272629
|
+
'btcmarkets': _src_btcmarkets_js__WEBPACK_IMPORTED_MODULE_36__/* ["default"] */ .Z,
|
|
272630
|
+
'btctradeua': _src_btctradeua_js__WEBPACK_IMPORTED_MODULE_37__/* ["default"] */ .Z,
|
|
272631
|
+
'btcturk': _src_btcturk_js__WEBPACK_IMPORTED_MODULE_38__/* ["default"] */ .Z,
|
|
272632
|
+
'bybit': _src_bybit_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z,
|
|
272633
|
+
'cex': _src_cex_js__WEBPACK_IMPORTED_MODULE_40__/* ["default"] */ .Z,
|
|
272634
|
+
'coinbase': _src_coinbase_js__WEBPACK_IMPORTED_MODULE_41__/* ["default"] */ .Z,
|
|
272635
|
+
'coinbaseprime': _src_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z,
|
|
272636
|
+
'coinbasepro': _src_coinbasepro_js__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z,
|
|
272637
|
+
'coincheck': _src_coincheck_js__WEBPACK_IMPORTED_MODULE_44__/* ["default"] */ .Z,
|
|
272638
|
+
'coinex': _src_coinex_js__WEBPACK_IMPORTED_MODULE_45__/* ["default"] */ .Z,
|
|
272639
|
+
'coinfalcon': _src_coinfalcon_js__WEBPACK_IMPORTED_MODULE_46__/* ["default"] */ .Z,
|
|
272640
|
+
'coinmate': _src_coinmate_js__WEBPACK_IMPORTED_MODULE_47__/* ["default"] */ .Z,
|
|
272641
|
+
'coinone': _src_coinone_js__WEBPACK_IMPORTED_MODULE_48__/* ["default"] */ .Z,
|
|
272642
|
+
'coinsph': _src_coinsph_js__WEBPACK_IMPORTED_MODULE_49__/* ["default"] */ .Z,
|
|
272643
|
+
'coinspot': _src_coinspot_js__WEBPACK_IMPORTED_MODULE_50__/* ["default"] */ .Z,
|
|
272644
|
+
'cryptocom': _src_cryptocom_js__WEBPACK_IMPORTED_MODULE_51__/* ["default"] */ .Z,
|
|
272645
|
+
'currencycom': _src_currencycom_js__WEBPACK_IMPORTED_MODULE_52__/* ["default"] */ .Z,
|
|
272646
|
+
'delta': _src_delta_js__WEBPACK_IMPORTED_MODULE_53__/* ["default"] */ .Z,
|
|
272647
|
+
'deribit': _src_deribit_js__WEBPACK_IMPORTED_MODULE_54__/* ["default"] */ .Z,
|
|
272648
|
+
'digifinex': _src_digifinex_js__WEBPACK_IMPORTED_MODULE_55__/* ["default"] */ .Z,
|
|
272649
|
+
'exmo': _src_exmo_js__WEBPACK_IMPORTED_MODULE_56__/* ["default"] */ .Z,
|
|
272650
|
+
'fmfwio': _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_57__/* ["default"] */ .Z,
|
|
272651
|
+
'gate': _src_gate_js__WEBPACK_IMPORTED_MODULE_58__/* ["default"] */ .Z,
|
|
272652
|
+
'gateio': _src_gateio_js__WEBPACK_IMPORTED_MODULE_59__/* ["default"] */ .Z,
|
|
272653
|
+
'gemini': _src_gemini_js__WEBPACK_IMPORTED_MODULE_60__/* ["default"] */ .Z,
|
|
272654
|
+
'hitbtc': _src_hitbtc_js__WEBPACK_IMPORTED_MODULE_61__/* ["default"] */ .Z,
|
|
272655
|
+
'hitbtc3': _src_hitbtc3_js__WEBPACK_IMPORTED_MODULE_62__/* ["default"] */ .Z,
|
|
272656
|
+
'hollaex': _src_hollaex_js__WEBPACK_IMPORTED_MODULE_63__/* ["default"] */ .Z,
|
|
272657
|
+
'huobi': _src_huobi_js__WEBPACK_IMPORTED_MODULE_64__/* ["default"] */ .Z,
|
|
272658
|
+
'huobijp': _src_huobijp_js__WEBPACK_IMPORTED_MODULE_65__/* ["default"] */ .Z,
|
|
272659
|
+
'huobipro': _src_huobipro_js__WEBPACK_IMPORTED_MODULE_66__/* ["default"] */ .Z,
|
|
272660
|
+
'idex': _src_idex_js__WEBPACK_IMPORTED_MODULE_67__/* ["default"] */ .Z,
|
|
272661
|
+
'independentreserve': _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_68__/* ["default"] */ .Z,
|
|
272662
|
+
'indodax': _src_indodax_js__WEBPACK_IMPORTED_MODULE_69__/* ["default"] */ .Z,
|
|
272663
|
+
'kraken': _src_kraken_js__WEBPACK_IMPORTED_MODULE_70__/* ["default"] */ .Z,
|
|
272664
|
+
'krakenfutures': _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_71__/* ["default"] */ .Z,
|
|
272665
|
+
'kucoin': _src_kucoin_js__WEBPACK_IMPORTED_MODULE_72__/* ["default"] */ .Z,
|
|
272666
|
+
'kucoinfutures': _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_73__/* ["default"] */ .Z,
|
|
272667
|
+
'kuna': _src_kuna_js__WEBPACK_IMPORTED_MODULE_74__/* ["default"] */ .Z,
|
|
272668
|
+
'latoken': _src_latoken_js__WEBPACK_IMPORTED_MODULE_75__/* ["default"] */ .Z,
|
|
272669
|
+
'lbank': _src_lbank_js__WEBPACK_IMPORTED_MODULE_76__/* ["default"] */ .Z,
|
|
272670
|
+
'lbank2': _src_lbank2_js__WEBPACK_IMPORTED_MODULE_77__/* ["default"] */ .Z,
|
|
272671
|
+
'luno': _src_luno_js__WEBPACK_IMPORTED_MODULE_78__/* ["default"] */ .Z,
|
|
272672
|
+
'lykke': _src_lykke_js__WEBPACK_IMPORTED_MODULE_79__/* ["default"] */ .Z,
|
|
272673
|
+
'mercado': _src_mercado_js__WEBPACK_IMPORTED_MODULE_80__/* ["default"] */ .Z,
|
|
272674
|
+
'mexc': _src_mexc_js__WEBPACK_IMPORTED_MODULE_81__/* ["default"] */ .Z,
|
|
272675
|
+
'mexc3': _src_mexc3_js__WEBPACK_IMPORTED_MODULE_82__/* ["default"] */ .Z,
|
|
272676
|
+
'ndax': _src_ndax_js__WEBPACK_IMPORTED_MODULE_83__/* ["default"] */ .Z,
|
|
272677
|
+
'novadax': _src_novadax_js__WEBPACK_IMPORTED_MODULE_84__/* ["default"] */ .Z,
|
|
272678
|
+
'oceanex': _src_oceanex_js__WEBPACK_IMPORTED_MODULE_85__/* ["default"] */ .Z,
|
|
272679
|
+
'okcoin': _src_okcoin_js__WEBPACK_IMPORTED_MODULE_86__/* ["default"] */ .Z,
|
|
272680
|
+
'okex': _src_okex_js__WEBPACK_IMPORTED_MODULE_87__/* ["default"] */ .Z,
|
|
272681
|
+
'okex5': _src_okex5_js__WEBPACK_IMPORTED_MODULE_88__/* ["default"] */ .Z,
|
|
272682
|
+
'okx': _src_okx_js__WEBPACK_IMPORTED_MODULE_89__/* ["default"] */ .Z,
|
|
272683
|
+
'paymium': _src_paymium_js__WEBPACK_IMPORTED_MODULE_90__/* ["default"] */ .Z,
|
|
272684
|
+
'phemex': _src_phemex_js__WEBPACK_IMPORTED_MODULE_91__/* ["default"] */ .Z,
|
|
272685
|
+
'poloniex': _src_poloniex_js__WEBPACK_IMPORTED_MODULE_92__/* ["default"] */ .Z,
|
|
272686
|
+
'poloniexfutures': _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_93__/* ["default"] */ .Z,
|
|
272687
|
+
'probit': _src_probit_js__WEBPACK_IMPORTED_MODULE_94__/* ["default"] */ .Z,
|
|
272688
|
+
'tidex': _src_tidex_js__WEBPACK_IMPORTED_MODULE_95__/* ["default"] */ .Z,
|
|
272689
|
+
'timex': _src_timex_js__WEBPACK_IMPORTED_MODULE_96__/* ["default"] */ .Z,
|
|
272690
|
+
'tokocrypto': _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_97__/* ["default"] */ .Z,
|
|
272691
|
+
'upbit': _src_upbit_js__WEBPACK_IMPORTED_MODULE_98__/* ["default"] */ .Z,
|
|
272692
|
+
'wavesexchange': _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_99__/* ["default"] */ .Z,
|
|
272693
|
+
'wazirx': _src_wazirx_js__WEBPACK_IMPORTED_MODULE_100__/* ["default"] */ .Z,
|
|
272694
|
+
'whitebit': _src_whitebit_js__WEBPACK_IMPORTED_MODULE_101__/* ["default"] */ .Z,
|
|
272695
|
+
'woo': _src_woo_js__WEBPACK_IMPORTED_MODULE_102__/* ["default"] */ .Z,
|
|
272696
|
+
'yobit': _src_yobit_js__WEBPACK_IMPORTED_MODULE_103__/* ["default"] */ .Z,
|
|
272697
|
+
'zaif': _src_zaif_js__WEBPACK_IMPORTED_MODULE_104__/* ["default"] */ .Z,
|
|
272698
|
+
'zonda': _src_zonda_js__WEBPACK_IMPORTED_MODULE_105__/* ["default"] */ .Z,
|
|
274299
272699
|
};
|
|
274300
272700
|
const pro = {
|
|
274301
|
-
'alpaca':
|
|
274302
|
-
'ascendex':
|
|
274303
|
-
'bequant':
|
|
274304
|
-
'binance':
|
|
274305
|
-
'binancecoinm':
|
|
274306
|
-
'binanceus':
|
|
274307
|
-
'binanceusdm':
|
|
274308
|
-
'bitcoincom':
|
|
274309
|
-
'bitfinex':
|
|
274310
|
-
'bitfinex2':
|
|
274311
|
-
'bitget':
|
|
274312
|
-
'bitmart':
|
|
274313
|
-
'bitmex':
|
|
274314
|
-
'bitopro':
|
|
274315
|
-
'bitpanda':
|
|
274316
|
-
'bitrue':
|
|
274317
|
-
'bitstamp':
|
|
274318
|
-
'bittrex':
|
|
274319
|
-
'bitvavo':
|
|
274320
|
-
'blockchaincom':
|
|
274321
|
-
'bybit':
|
|
274322
|
-
'cex':
|
|
274323
|
-
'coinbase':
|
|
274324
|
-
'coinbaseprime':
|
|
274325
|
-
'coinbasepro':
|
|
274326
|
-
'coinex':
|
|
274327
|
-
'cryptocom':
|
|
274328
|
-
'currencycom':
|
|
274329
|
-
'deribit':
|
|
274330
|
-
'exmo':
|
|
274331
|
-
'gate':
|
|
274332
|
-
'gateio':
|
|
274333
|
-
'gemini':
|
|
274334
|
-
'hitbtc':
|
|
274335
|
-
'hollaex':
|
|
274336
|
-
'huobi':
|
|
274337
|
-
'huobijp':
|
|
274338
|
-
'huobipro':
|
|
274339
|
-
'idex':
|
|
274340
|
-
'independentreserve':
|
|
274341
|
-
'kraken':
|
|
274342
|
-
'krakenfutures':
|
|
274343
|
-
'kucoin':
|
|
274344
|
-
'kucoinfutures':
|
|
274345
|
-
'luno':
|
|
274346
|
-
'mexc':
|
|
274347
|
-
'mexc3':
|
|
274348
|
-
'ndax':
|
|
274349
|
-
'okcoin':
|
|
274350
|
-
'okex':
|
|
274351
|
-
'okx':
|
|
274352
|
-
'phemex':
|
|
274353
|
-
'poloniex':
|
|
274354
|
-
'poloniexfutures':
|
|
274355
|
-
'probit':
|
|
274356
|
-
'upbit':
|
|
274357
|
-
'wazirx':
|
|
274358
|
-
'whitebit':
|
|
274359
|
-
'woo':
|
|
272701
|
+
'alpaca': _src_pro_alpaca_js__WEBPACK_IMPORTED_MODULE_106__/* ["default"] */ .Z,
|
|
272702
|
+
'ascendex': _src_pro_ascendex_js__WEBPACK_IMPORTED_MODULE_107__/* ["default"] */ .Z,
|
|
272703
|
+
'bequant': _src_pro_bequant_js__WEBPACK_IMPORTED_MODULE_108__/* ["default"] */ .Z,
|
|
272704
|
+
'binance': _src_pro_binance_js__WEBPACK_IMPORTED_MODULE_109__/* ["default"] */ .Z,
|
|
272705
|
+
'binancecoinm': _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_110__/* ["default"] */ .Z,
|
|
272706
|
+
'binanceus': _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_111__/* ["default"] */ .Z,
|
|
272707
|
+
'binanceusdm': _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_112__/* ["default"] */ .Z,
|
|
272708
|
+
'bitcoincom': _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_113__/* ["default"] */ .Z,
|
|
272709
|
+
'bitfinex': _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_114__/* ["default"] */ .Z,
|
|
272710
|
+
'bitfinex2': _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_115__/* ["default"] */ .Z,
|
|
272711
|
+
'bitget': _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_116__/* ["default"] */ .Z,
|
|
272712
|
+
'bitmart': _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_117__/* ["default"] */ .Z,
|
|
272713
|
+
'bitmex': _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_118__/* ["default"] */ .Z,
|
|
272714
|
+
'bitopro': _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_119__/* ["default"] */ .Z,
|
|
272715
|
+
'bitpanda': _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_120__/* ["default"] */ .Z,
|
|
272716
|
+
'bitrue': _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_121__/* ["default"] */ .Z,
|
|
272717
|
+
'bitstamp': _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_122__/* ["default"] */ .Z,
|
|
272718
|
+
'bittrex': _src_pro_bittrex_js__WEBPACK_IMPORTED_MODULE_123__/* ["default"] */ .Z,
|
|
272719
|
+
'bitvavo': _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_124__/* ["default"] */ .Z,
|
|
272720
|
+
'blockchaincom': _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_125__/* ["default"] */ .Z,
|
|
272721
|
+
'bybit': _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_126__/* ["default"] */ .Z,
|
|
272722
|
+
'cex': _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_127__/* ["default"] */ .Z,
|
|
272723
|
+
'coinbase': _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_128__/* ["default"] */ .Z,
|
|
272724
|
+
'coinbaseprime': _src_pro_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_129__/* ["default"] */ .Z,
|
|
272725
|
+
'coinbasepro': _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_130__/* ["default"] */ .Z,
|
|
272726
|
+
'coinex': _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_131__/* ["default"] */ .Z,
|
|
272727
|
+
'cryptocom': _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_132__/* ["default"] */ .Z,
|
|
272728
|
+
'currencycom': _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_133__/* ["default"] */ .Z,
|
|
272729
|
+
'deribit': _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_134__/* ["default"] */ .Z,
|
|
272730
|
+
'exmo': _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_135__/* ["default"] */ .Z,
|
|
272731
|
+
'gate': _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_136__/* ["default"] */ .Z,
|
|
272732
|
+
'gateio': _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_137__/* ["default"] */ .Z,
|
|
272733
|
+
'gemini': _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_138__/* ["default"] */ .Z,
|
|
272734
|
+
'hitbtc': _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_139__/* ["default"] */ .Z,
|
|
272735
|
+
'hollaex': _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_140__/* ["default"] */ .Z,
|
|
272736
|
+
'huobi': _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_141__/* ["default"] */ .Z,
|
|
272737
|
+
'huobijp': _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_142__/* ["default"] */ .Z,
|
|
272738
|
+
'huobipro': _src_pro_huobipro_js__WEBPACK_IMPORTED_MODULE_143__/* ["default"] */ .Z,
|
|
272739
|
+
'idex': _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_144__/* ["default"] */ .Z,
|
|
272740
|
+
'independentreserve': _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_145__/* ["default"] */ .Z,
|
|
272741
|
+
'kraken': _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_146__/* ["default"] */ .Z,
|
|
272742
|
+
'krakenfutures': _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_147__/* ["default"] */ .Z,
|
|
272743
|
+
'kucoin': _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_148__/* ["default"] */ .Z,
|
|
272744
|
+
'kucoinfutures': _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_149__/* ["default"] */ .Z,
|
|
272745
|
+
'luno': _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_150__/* ["default"] */ .Z,
|
|
272746
|
+
'mexc': _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_151__/* ["default"] */ .Z,
|
|
272747
|
+
'mexc3': _src_pro_mexc3_js__WEBPACK_IMPORTED_MODULE_152__/* ["default"] */ .Z,
|
|
272748
|
+
'ndax': _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_153__/* ["default"] */ .Z,
|
|
272749
|
+
'okcoin': _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_154__/* ["default"] */ .Z,
|
|
272750
|
+
'okex': _src_pro_okex_js__WEBPACK_IMPORTED_MODULE_155__/* ["default"] */ .Z,
|
|
272751
|
+
'okx': _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_156__/* ["default"] */ .Z,
|
|
272752
|
+
'phemex': _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_157__/* ["default"] */ .Z,
|
|
272753
|
+
'poloniex': _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_158__/* ["default"] */ .Z,
|
|
272754
|
+
'poloniexfutures': _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_159__/* ["default"] */ .Z,
|
|
272755
|
+
'probit': _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_160__/* ["default"] */ .Z,
|
|
272756
|
+
'upbit': _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_161__/* ["default"] */ .Z,
|
|
272757
|
+
'wazirx': _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_162__/* ["default"] */ .Z,
|
|
272758
|
+
'whitebit': _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_163__/* ["default"] */ .Z,
|
|
272759
|
+
'woo': _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_164__/* ["default"] */ .Z,
|
|
274360
272760
|
};
|
|
274361
272761
|
for (const exchange in pro) {
|
|
274362
272762
|
// const ccxtExchange = exchanges[exchange]
|
|
@@ -274369,7 +272769,7 @@ for (const exchange in pro) {
|
|
|
274369
272769
|
pro.exchanges = Object.keys(pro);
|
|
274370
272770
|
pro['Exchange'] = _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e; // now the same for rest and ts
|
|
274371
272771
|
//-----------------------------------------------------------------------------
|
|
274372
|
-
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise:
|
|
272772
|
+
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise: _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_165__/* .Precise */ .O, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, _src_base_functions_js__WEBPACK_IMPORTED_MODULE_166__, _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__);
|
|
274373
272773
|
|
|
274374
272774
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ccxt);
|
|
274375
272775
|
//-----------------------------------------------------------------------------
|