ccxt 4.2.36 → 4.2.38
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/CONTRIBUTING.md +3 -2
- package/README.md +8 -7
- package/dist/ccxt.browser.js +3085 -602
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +4 -1
- package/dist/cjs/src/abstract/blofin.js +9 -0
- package/dist/cjs/src/binance.js +147 -65
- package/dist/cjs/src/bitfinex2.js +122 -122
- package/dist/cjs/src/bitmex.js +22 -3
- package/dist/cjs/src/blofin.js +2103 -0
- package/dist/cjs/src/bybit.js +13 -4
- package/dist/cjs/src/pro/gemini.js +190 -3
- package/dist/cjs/src/pro/kucoin.js +93 -40
- package/js/ccxt.d.ts +5 -2
- package/js/ccxt.js +4 -2
- package/js/src/abstract/blofin.d.ts +36 -0
- package/js/src/abstract/blofin.js +11 -0
- package/js/src/base/types.d.ts +2 -0
- package/js/src/binance.js +147 -65
- package/js/src/bitfinex2.js +122 -122
- package/js/src/bitmex.js +22 -3
- package/js/src/blofin.d.ts +124 -0
- package/js/src/blofin.js +2104 -0
- package/js/src/bybit.js +13 -4
- package/js/src/pro/gemini.d.ts +5 -0
- package/js/src/pro/gemini.js +191 -4
- package/js/src/pro/kucoin.js +93 -40
- package/package.json +2 -2
package/dist/ccxt.browser.js
CHANGED
|
@@ -400,6 +400,22 @@ 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
|
+
/***/ 6065:
|
|
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
|
+
|
|
403
419
|
/***/ }),
|
|
404
420
|
|
|
405
421
|
/***/ 5489:
|
|
@@ -23004,7 +23020,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23004
23020
|
// "msg": "Quantity greater than max quantity."
|
|
23005
23021
|
// }
|
|
23006
23022
|
//
|
|
23007
|
-
// createOrder: portfolio margin linear swap and future
|
|
23023
|
+
// createOrder, fetchOpenOrders: portfolio margin linear swap and future
|
|
23008
23024
|
//
|
|
23009
23025
|
// {
|
|
23010
23026
|
// "symbol": "BTCUSDT",
|
|
@@ -23027,7 +23043,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23027
23043
|
// "status": "NEW"
|
|
23028
23044
|
// }
|
|
23029
23045
|
//
|
|
23030
|
-
// createOrder: portfolio margin inverse swap and future
|
|
23046
|
+
// createOrder, fetchOpenOrders: portfolio margin inverse swap and future
|
|
23031
23047
|
//
|
|
23032
23048
|
// {
|
|
23033
23049
|
// "symbol": "ETHUSD_PERP",
|
|
@@ -23049,7 +23065,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23049
23065
|
// "status": "NEW"
|
|
23050
23066
|
// }
|
|
23051
23067
|
//
|
|
23052
|
-
// createOrder: portfolio margin linear swap and future conditional
|
|
23068
|
+
// createOrder, fetchOpenOrders: portfolio margin linear swap and future conditional
|
|
23053
23069
|
//
|
|
23054
23070
|
// {
|
|
23055
23071
|
// "newClientStrategyId": "x-xcKtGhcu27f109953d6e4dc0974006",
|
|
@@ -23072,7 +23088,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23072
23088
|
// "selfTradePreventionMode": "NONE"
|
|
23073
23089
|
// }
|
|
23074
23090
|
//
|
|
23075
|
-
// createOrder: portfolio margin inverse swap and future conditional
|
|
23091
|
+
// createOrder, fetchOpenOrders: portfolio margin inverse swap and future conditional
|
|
23076
23092
|
//
|
|
23077
23093
|
// {
|
|
23078
23094
|
// "newClientStrategyId": "x-xcKtGhcuc6b86f053bb34933850739",
|
|
@@ -23093,7 +23109,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23093
23109
|
// "priceProtect": false
|
|
23094
23110
|
// }
|
|
23095
23111
|
//
|
|
23096
|
-
// createOrder: portfolio margin spot margin
|
|
23112
|
+
// createOrder, cancelAllOrders: portfolio margin spot margin
|
|
23097
23113
|
//
|
|
23098
23114
|
// {
|
|
23099
23115
|
// "clientOrderId": "x-R4BD3S82e9ef29d8346440f0b28b86",
|
|
@@ -23112,6 +23128,31 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23112
23128
|
// "type": "LIMIT"
|
|
23113
23129
|
// }
|
|
23114
23130
|
//
|
|
23131
|
+
// fetchOpenOrders: portfolio margin spot margin
|
|
23132
|
+
//
|
|
23133
|
+
// {
|
|
23134
|
+
// "symbol": "BTCUSDT",
|
|
23135
|
+
// "orderId": 24700763749,
|
|
23136
|
+
// "clientOrderId": "x-R4BD3S826f724c2a4af6425f98c7b6",
|
|
23137
|
+
// "price": "35000.00000000",
|
|
23138
|
+
// "origQty": "0.00100000",
|
|
23139
|
+
// "executedQty": "0.00000000",
|
|
23140
|
+
// "cummulativeQuoteQty": "0.00000000",
|
|
23141
|
+
// "status": "NEW",
|
|
23142
|
+
// "timeInForce": "GTC",
|
|
23143
|
+
// "type": "LIMIT",
|
|
23144
|
+
// "side": "BUY",
|
|
23145
|
+
// "stopPrice": "0.00000000",
|
|
23146
|
+
// "icebergQty": "0.00000000",
|
|
23147
|
+
// "time": 1707199187679,
|
|
23148
|
+
// "updateTime": 1707199187679,
|
|
23149
|
+
// "isWorking": true,
|
|
23150
|
+
// "accountId": 200180970,
|
|
23151
|
+
// "selfTradePreventionMode": "EXPIRE_MAKER",
|
|
23152
|
+
// "preventedMatchId": null,
|
|
23153
|
+
// "preventedQuantity": null
|
|
23154
|
+
// }
|
|
23155
|
+
//
|
|
23115
23156
|
const code = this.safeString(order, 'code');
|
|
23116
23157
|
if (code !== undefined) {
|
|
23117
23158
|
// cancelOrders/createOrders might have a partial success
|
|
@@ -23119,7 +23160,8 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23119
23160
|
}
|
|
23120
23161
|
const status = this.parseOrderStatus(this.safeString2(order, 'status', 'strategyStatus'));
|
|
23121
23162
|
const marketId = this.safeString(order, 'symbol');
|
|
23122
|
-
const
|
|
23163
|
+
const isContract = ('positionSide' in order) || ('cumQuote' in order);
|
|
23164
|
+
const marketType = isContract ? 'contract' : 'spot';
|
|
23123
23165
|
const symbol = this.safeSymbol(marketId, market, undefined, marketType);
|
|
23124
23166
|
const filled = this.safeString(order, 'executedQty', '0');
|
|
23125
23167
|
const timestamp = this.safeIntegerN(order, ['time', 'createTime', 'workingTime', 'transactTime', 'updateTime']); // order of the keys matters here
|
|
@@ -23426,21 +23468,6 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23426
23468
|
}
|
|
23427
23469
|
}
|
|
23428
23470
|
}
|
|
23429
|
-
if (!isPortfolioMargin) {
|
|
23430
|
-
const postOnly = this.isPostOnly(isMarketOrder, initialUppercaseType === 'LIMIT_MAKER', params);
|
|
23431
|
-
if (market['spot'] || marketType === 'margin') {
|
|
23432
|
-
// only supported for spot/margin api (all margin markets are spot markets)
|
|
23433
|
-
if (postOnly) {
|
|
23434
|
-
type = 'LIMIT_MAKER';
|
|
23435
|
-
}
|
|
23436
|
-
if (marginMode === 'isolated') {
|
|
23437
|
-
request['isIsolated'] = true;
|
|
23438
|
-
}
|
|
23439
|
-
}
|
|
23440
|
-
if (market['contract'] && postOnly) {
|
|
23441
|
-
request['timeInForce'] = 'GTX';
|
|
23442
|
-
}
|
|
23443
|
-
}
|
|
23444
23471
|
const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
23445
23472
|
const stopLossPrice = this.safeString(params, 'stopLossPrice', triggerPrice); // fallback to stopLoss
|
|
23446
23473
|
const takeProfitPrice = this.safeString(params, 'takeProfitPrice');
|
|
@@ -23517,6 +23544,19 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23517
23544
|
else {
|
|
23518
23545
|
request[clientOrderIdRequest] = clientOrderId;
|
|
23519
23546
|
}
|
|
23547
|
+
let postOnly = undefined;
|
|
23548
|
+
if (!isPortfolioMargin) {
|
|
23549
|
+
postOnly = this.isPostOnly(isMarketOrder, initialUppercaseType === 'LIMIT_MAKER', params);
|
|
23550
|
+
if (market['spot'] || marketType === 'margin') {
|
|
23551
|
+
// only supported for spot/margin api (all margin markets are spot markets)
|
|
23552
|
+
if (postOnly) {
|
|
23553
|
+
uppercaseType = 'LIMIT_MAKER';
|
|
23554
|
+
}
|
|
23555
|
+
if (marginMode === 'isolated') {
|
|
23556
|
+
request['isIsolated'] = true;
|
|
23557
|
+
}
|
|
23558
|
+
}
|
|
23559
|
+
}
|
|
23520
23560
|
const typeRequest = isPortfolioMarginConditional ? 'strategyType' : 'type';
|
|
23521
23561
|
request[typeRequest] = uppercaseType;
|
|
23522
23562
|
// additional required fields depending on the order type
|
|
@@ -23626,9 +23666,6 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23626
23666
|
}
|
|
23627
23667
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
23628
23668
|
}
|
|
23629
|
-
if (timeInForceIsRequired) {
|
|
23630
|
-
request['timeInForce'] = this.options['defaultTimeInForce']; // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel
|
|
23631
|
-
}
|
|
23632
23669
|
if (stopPriceIsRequired) {
|
|
23633
23670
|
if (market['contract']) {
|
|
23634
23671
|
if (stopPrice === undefined) {
|
|
@@ -23645,20 +23682,11 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23645
23682
|
request['stopPrice'] = this.priceToPrecision(symbol, stopPrice);
|
|
23646
23683
|
}
|
|
23647
23684
|
}
|
|
23648
|
-
if (
|
|
23649
|
-
|
|
23650
|
-
|
|
23651
|
-
|
|
23652
|
-
|
|
23653
|
-
type = 'LIMIT_MAKER';
|
|
23654
|
-
}
|
|
23655
|
-
if (marginMode === 'isolated') {
|
|
23656
|
-
request['isIsolated'] = true;
|
|
23657
|
-
}
|
|
23658
|
-
}
|
|
23659
|
-
if (market['contract'] && postOnly) {
|
|
23660
|
-
request['timeInForce'] = 'GTX';
|
|
23661
|
-
}
|
|
23685
|
+
if (timeInForceIsRequired && (this.safeString(params, 'timeInForce') === undefined)) {
|
|
23686
|
+
request['timeInForce'] = this.options['defaultTimeInForce']; // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel
|
|
23687
|
+
}
|
|
23688
|
+
if (!isPortfolioMargin && market['contract'] && postOnly) {
|
|
23689
|
+
request['timeInForce'] = 'GTX';
|
|
23662
23690
|
}
|
|
23663
23691
|
// remove timeInForce from params because PO is only used by this.isPostOnly and it's not a valid value for Binance
|
|
23664
23692
|
if (this.safeString(params, 'timeInForce') === 'PO') {
|
|
@@ -23930,21 +23958,28 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23930
23958
|
/**
|
|
23931
23959
|
* @method
|
|
23932
23960
|
* @name binance#fetchOpenOrders
|
|
23961
|
+
* @description fetch all unfilled currently open orders
|
|
23933
23962
|
* @see https://binance-docs.github.io/apidocs/spot/en/#cancel-an-existing-order-and-send-a-new-order-trade
|
|
23934
23963
|
* @see https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data
|
|
23935
23964
|
* @see https://binance-docs.github.io/apidocs/delivery/en/#current-all-open-orders-user_data
|
|
23936
23965
|
* @see https://binance-docs.github.io/apidocs/voptions/en/#query-current-open-option-orders-user_data
|
|
23937
|
-
* @description fetch all unfilled currently open orders
|
|
23938
23966
|
* @see https://binance-docs.github.io/apidocs/spot/en/#current-open-orders-user_data
|
|
23939
23967
|
* @see https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data
|
|
23940
23968
|
* @see https://binance-docs.github.io/apidocs/delivery/en/#current-all-open-orders-user_data
|
|
23941
23969
|
* @see https://binance-docs.github.io/apidocs/voptions/en/#query-current-open-option-orders-user_data
|
|
23942
23970
|
* @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data
|
|
23971
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-current-um-open-orders-user_data
|
|
23972
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-current-cm-open-orders-user_data
|
|
23973
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-current-um-open-conditional-orders-user_data
|
|
23974
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#query-all-current-cm-open-conditional-orders-user_data
|
|
23975
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#query-current-margin-open-order-user_data
|
|
23943
23976
|
* @param {string} symbol unified market symbol
|
|
23944
23977
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
23945
23978
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
23946
23979
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
23947
23980
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
23981
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch open orders in the portfolio margin account
|
|
23982
|
+
* @param {boolean} [params.stop] set to true if you would like to fetch portfolio margin account conditional orders
|
|
23948
23983
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
23949
23984
|
*/
|
|
23950
23985
|
await this.loadMarkets();
|
|
@@ -23952,14 +23987,16 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23952
23987
|
let type = undefined;
|
|
23953
23988
|
const request = {};
|
|
23954
23989
|
let marginMode = undefined;
|
|
23955
|
-
|
|
23956
|
-
|
|
23990
|
+
[marginMode, params] = this.handleMarginModeAndParams('fetchOpenOrders', params);
|
|
23991
|
+
let isPortfolioMargin = undefined;
|
|
23992
|
+
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'fetchOpenOrders', 'papi', 'portfolioMargin', false);
|
|
23993
|
+
const isConditional = this.safeBool2(params, 'stop', 'conditional');
|
|
23957
23994
|
if (symbol !== undefined) {
|
|
23958
23995
|
market = this.market(symbol);
|
|
23959
23996
|
request['symbol'] = market['id'];
|
|
23960
23997
|
const defaultType = this.safeString2(this.options, 'fetchOpenOrders', 'defaultType', 'spot');
|
|
23961
23998
|
const marketType = ('type' in market) ? market['type'] : defaultType;
|
|
23962
|
-
type = this.safeString(
|
|
23999
|
+
type = this.safeString(params, 'type', marketType);
|
|
23963
24000
|
}
|
|
23964
24001
|
else if (this.options['warnOnFetchOpenOrdersWithoutSymbol']) {
|
|
23965
24002
|
const symbols = this.symbols;
|
|
@@ -23969,11 +24006,11 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23969
24006
|
}
|
|
23970
24007
|
else {
|
|
23971
24008
|
const defaultType = this.safeString2(this.options, 'fetchOpenOrders', 'defaultType', 'spot');
|
|
23972
|
-
type = this.safeString(
|
|
24009
|
+
type = this.safeString(params, 'type', defaultType);
|
|
23973
24010
|
}
|
|
23974
24011
|
let subType = undefined;
|
|
23975
|
-
[subType,
|
|
23976
|
-
|
|
24012
|
+
[subType, params] = this.handleSubTypeAndParams('fetchOpenOrders', market, params);
|
|
24013
|
+
params = this.omit(params, ['type', 'stop', 'conditional']);
|
|
23977
24014
|
let response = undefined;
|
|
23978
24015
|
if (type === 'option') {
|
|
23979
24016
|
if (since !== undefined) {
|
|
@@ -23982,25 +24019,50 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
23982
24019
|
if (limit !== undefined) {
|
|
23983
24020
|
request['limit'] = limit;
|
|
23984
24021
|
}
|
|
23985
|
-
response = await this.eapiPrivateGetOpenOrders(this.extend(request,
|
|
24022
|
+
response = await this.eapiPrivateGetOpenOrders(this.extend(request, params));
|
|
23986
24023
|
}
|
|
23987
24024
|
else if (this.isLinear(type, subType)) {
|
|
23988
|
-
|
|
24025
|
+
if (isPortfolioMargin) {
|
|
24026
|
+
if (isConditional) {
|
|
24027
|
+
response = await this.papiGetUmConditionalOpenOrders(this.extend(request, params));
|
|
24028
|
+
}
|
|
24029
|
+
else {
|
|
24030
|
+
response = await this.papiGetUmOpenOrders(this.extend(request, params));
|
|
24031
|
+
}
|
|
24032
|
+
}
|
|
24033
|
+
else {
|
|
24034
|
+
response = await this.fapiPrivateGetOpenOrders(this.extend(request, params));
|
|
24035
|
+
}
|
|
23989
24036
|
}
|
|
23990
24037
|
else if (this.isInverse(type, subType)) {
|
|
23991
|
-
|
|
24038
|
+
if (isPortfolioMargin) {
|
|
24039
|
+
if (isConditional) {
|
|
24040
|
+
response = await this.papiGetCmConditionalOpenOrders(this.extend(request, params));
|
|
24041
|
+
}
|
|
24042
|
+
else {
|
|
24043
|
+
response = await this.papiGetCmOpenOrders(this.extend(request, params));
|
|
24044
|
+
}
|
|
24045
|
+
}
|
|
24046
|
+
else {
|
|
24047
|
+
response = await this.dapiPrivateGetOpenOrders(this.extend(request, params));
|
|
24048
|
+
}
|
|
23992
24049
|
}
|
|
23993
24050
|
else if (type === 'margin' || marginMode !== undefined) {
|
|
23994
|
-
if (
|
|
23995
|
-
|
|
23996
|
-
|
|
23997
|
-
|
|
24051
|
+
if (isPortfolioMargin) {
|
|
24052
|
+
response = await this.papiGetMarginOpenOrders(this.extend(request, params));
|
|
24053
|
+
}
|
|
24054
|
+
else {
|
|
24055
|
+
if (marginMode === 'isolated') {
|
|
24056
|
+
request['isIsolated'] = true;
|
|
24057
|
+
if (symbol === undefined) {
|
|
24058
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument for isolated markets');
|
|
24059
|
+
}
|
|
23998
24060
|
}
|
|
24061
|
+
response = await this.sapiGetMarginOpenOrders(this.extend(request, params));
|
|
23999
24062
|
}
|
|
24000
|
-
response = await this.sapiGetMarginOpenOrders(this.extend(request, requestParams));
|
|
24001
24063
|
}
|
|
24002
24064
|
else {
|
|
24003
|
-
response = await this.privateGetOpenOrders(this.extend(request,
|
|
24065
|
+
response = await this.privateGetOpenOrders(this.extend(request, params));
|
|
24004
24066
|
}
|
|
24005
24067
|
return this.parseOrders(response, market, since, limit);
|
|
24006
24068
|
}
|
|
@@ -24118,46 +24180,82 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
24118
24180
|
/**
|
|
24119
24181
|
* @method
|
|
24120
24182
|
* @name binance#cancelAllOrders
|
|
24183
|
+
* @description cancel all open orders in a market
|
|
24121
24184
|
* @see https://binance-docs.github.io/apidocs/spot/en/#cancel-all-open-orders-on-a-symbol-trade
|
|
24122
24185
|
* @see https://binance-docs.github.io/apidocs/futures/en/#cancel-all-open-orders-trade
|
|
24123
24186
|
* @see https://binance-docs.github.io/apidocs/delivery/en/#cancel-all-open-orders-trade
|
|
24124
24187
|
* @see https://binance-docs.github.io/apidocs/voptions/en/#cancel-all-option-orders-on-specific-symbol-trade
|
|
24125
24188
|
* @see https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-order-trade
|
|
24126
|
-
* @
|
|
24189
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#cancel-all-um-open-orders-trade
|
|
24190
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#cancel-all-cm-open-orders-trade
|
|
24191
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#cancel-all-um-open-conditional-orders-trade
|
|
24192
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#cancel-all-cm-open-conditional-orders-trade
|
|
24193
|
+
* @see https://binance-docs.github.io/apidocs/pm/en/#cancel-margin-account-all-open-orders-on-a-symbol-trade
|
|
24127
24194
|
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
24128
24195
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
24129
24196
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
24197
|
+
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel orders in a portfolio margin account
|
|
24198
|
+
* @param {boolean} [params.stop] set to true if you would like to cancel portfolio margin account conditional orders
|
|
24130
24199
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
24131
24200
|
*/
|
|
24132
24201
|
if (symbol === undefined) {
|
|
24133
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + '
|
|
24202
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
|
|
24134
24203
|
}
|
|
24135
24204
|
await this.loadMarkets();
|
|
24136
24205
|
const market = this.market(symbol);
|
|
24137
24206
|
const request = {
|
|
24138
24207
|
'symbol': market['id'],
|
|
24139
24208
|
};
|
|
24209
|
+
let isPortfolioMargin = undefined;
|
|
24210
|
+
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'cancelAllOrders', 'papi', 'portfolioMargin', false);
|
|
24211
|
+
const isConditional = this.safeBool2(params, 'stop', 'conditional');
|
|
24140
24212
|
const type = this.safeString(params, 'type', market['type']);
|
|
24141
|
-
params = this.omit(params, ['type']);
|
|
24142
|
-
|
|
24213
|
+
params = this.omit(params, ['type', 'stop', 'conditional']);
|
|
24214
|
+
let marginMode = undefined;
|
|
24215
|
+
[marginMode, params] = this.handleMarginModeAndParams('cancelAllOrders', params);
|
|
24143
24216
|
let response = undefined;
|
|
24144
24217
|
if (market['option']) {
|
|
24145
|
-
response = await this.eapiPrivateDeleteAllOpenOrders(this.extend(request,
|
|
24218
|
+
response = await this.eapiPrivateDeleteAllOpenOrders(this.extend(request, params));
|
|
24146
24219
|
}
|
|
24147
24220
|
else if (market['linear']) {
|
|
24148
|
-
|
|
24221
|
+
if (isPortfolioMargin) {
|
|
24222
|
+
if (isConditional) {
|
|
24223
|
+
response = await this.papiDeleteUmConditionalAllOpenOrders(this.extend(request, params));
|
|
24224
|
+
}
|
|
24225
|
+
else {
|
|
24226
|
+
response = await this.papiDeleteUmAllOpenOrders(this.extend(request, params));
|
|
24227
|
+
}
|
|
24228
|
+
}
|
|
24229
|
+
else {
|
|
24230
|
+
response = await this.fapiPrivateDeleteAllOpenOrders(this.extend(request, params));
|
|
24231
|
+
}
|
|
24149
24232
|
}
|
|
24150
24233
|
else if (market['inverse']) {
|
|
24151
|
-
|
|
24234
|
+
if (isPortfolioMargin) {
|
|
24235
|
+
if (isConditional) {
|
|
24236
|
+
response = await this.papiDeleteCmConditionalAllOpenOrders(this.extend(request, params));
|
|
24237
|
+
}
|
|
24238
|
+
else {
|
|
24239
|
+
response = await this.papiDeleteCmAllOpenOrders(this.extend(request, params));
|
|
24240
|
+
}
|
|
24241
|
+
}
|
|
24242
|
+
else {
|
|
24243
|
+
response = await this.dapiPrivateDeleteAllOpenOrders(this.extend(request, params));
|
|
24244
|
+
}
|
|
24152
24245
|
}
|
|
24153
24246
|
else if ((type === 'margin') || (marginMode !== undefined)) {
|
|
24154
|
-
if (
|
|
24155
|
-
|
|
24247
|
+
if (isPortfolioMargin) {
|
|
24248
|
+
response = await this.papiDeleteMarginAllOpenOrders(this.extend(request, params));
|
|
24249
|
+
}
|
|
24250
|
+
else {
|
|
24251
|
+
if (marginMode === 'isolated') {
|
|
24252
|
+
request['isIsolated'] = true;
|
|
24253
|
+
}
|
|
24254
|
+
response = await this.sapiDeleteMarginOpenOrders(this.extend(request, params));
|
|
24156
24255
|
}
|
|
24157
|
-
response = await this.sapiDeleteMarginOpenOrders(this.extend(request, query));
|
|
24158
24256
|
}
|
|
24159
24257
|
else {
|
|
24160
|
-
response = await this.privateDeleteOpenOrders(this.extend(request,
|
|
24258
|
+
response = await this.privateDeleteOpenOrders(this.extend(request, params));
|
|
24161
24259
|
}
|
|
24162
24260
|
if (Array.isArray(response)) {
|
|
24163
24261
|
return this.parseOrders(response, market);
|
|
@@ -38072,149 +38170,149 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
38072
38170
|
'api': {
|
|
38073
38171
|
'public': {
|
|
38074
38172
|
'get': {
|
|
38075
|
-
'conf/{config}': 2.
|
|
38076
|
-
'conf/pub:{action}:{object}': 2.
|
|
38077
|
-
'conf/pub:{action}:{object}:{detail}': 2.
|
|
38078
|
-
'conf/pub:map:{object}': 2.
|
|
38079
|
-
'conf/pub:map:{object}:{detail}': 2.
|
|
38080
|
-
'conf/pub:map:currency:{detail}': 2.
|
|
38081
|
-
'conf/pub:map:currency:sym': 2.
|
|
38082
|
-
'conf/pub:map:currency:label': 2.
|
|
38083
|
-
'conf/pub:map:currency:unit': 2.
|
|
38084
|
-
'conf/pub:map:currency:undl': 2.
|
|
38085
|
-
'conf/pub:map:currency:pool': 2.
|
|
38086
|
-
'conf/pub:map:currency:explorer': 2.
|
|
38087
|
-
'conf/pub:map:currency:tx:fee': 2.
|
|
38088
|
-
'conf/pub:map:tx:method': 2.
|
|
38089
|
-
'conf/pub:list:{object}': 2.
|
|
38090
|
-
'conf/pub:list:{object}:{detail}': 2.
|
|
38091
|
-
'conf/pub:list:currency': 2.
|
|
38092
|
-
'conf/pub:list:pair:exchange': 2.
|
|
38093
|
-
'conf/pub:list:pair:margin': 2.
|
|
38094
|
-
'conf/pub:list:pair:futures': 2.
|
|
38095
|
-
'conf/pub:list:competitions': 2.
|
|
38096
|
-
'conf/pub:info:{object}': 2.
|
|
38097
|
-
'conf/pub:info:{object}:{detail}': 2.
|
|
38098
|
-
'conf/pub:info:pair': 2.
|
|
38099
|
-
'conf/pub:info:pair:futures': 2.
|
|
38100
|
-
'conf/pub:info:tx:status': 2.
|
|
38101
|
-
'conf/pub:fees': 2.
|
|
38173
|
+
'conf/{config}': 2.7,
|
|
38174
|
+
'conf/pub:{action}:{object}': 2.7,
|
|
38175
|
+
'conf/pub:{action}:{object}:{detail}': 2.7,
|
|
38176
|
+
'conf/pub:map:{object}': 2.7,
|
|
38177
|
+
'conf/pub:map:{object}:{detail}': 2.7,
|
|
38178
|
+
'conf/pub:map:currency:{detail}': 2.7,
|
|
38179
|
+
'conf/pub:map:currency:sym': 2.7,
|
|
38180
|
+
'conf/pub:map:currency:label': 2.7,
|
|
38181
|
+
'conf/pub:map:currency:unit': 2.7,
|
|
38182
|
+
'conf/pub:map:currency:undl': 2.7,
|
|
38183
|
+
'conf/pub:map:currency:pool': 2.7,
|
|
38184
|
+
'conf/pub:map:currency:explorer': 2.7,
|
|
38185
|
+
'conf/pub:map:currency:tx:fee': 2.7,
|
|
38186
|
+
'conf/pub:map:tx:method': 2.7,
|
|
38187
|
+
'conf/pub:list:{object}': 2.7,
|
|
38188
|
+
'conf/pub:list:{object}:{detail}': 2.7,
|
|
38189
|
+
'conf/pub:list:currency': 2.7,
|
|
38190
|
+
'conf/pub:list:pair:exchange': 2.7,
|
|
38191
|
+
'conf/pub:list:pair:margin': 2.7,
|
|
38192
|
+
'conf/pub:list:pair:futures': 2.7,
|
|
38193
|
+
'conf/pub:list:competitions': 2.7,
|
|
38194
|
+
'conf/pub:info:{object}': 2.7,
|
|
38195
|
+
'conf/pub:info:{object}:{detail}': 2.7,
|
|
38196
|
+
'conf/pub:info:pair': 2.7,
|
|
38197
|
+
'conf/pub:info:pair:futures': 2.7,
|
|
38198
|
+
'conf/pub:info:tx:status': 2.7,
|
|
38199
|
+
'conf/pub:fees': 2.7,
|
|
38102
38200
|
'platform/status': 8,
|
|
38103
|
-
'tickers': 2.
|
|
38104
|
-
'ticker/{symbol}': 2.
|
|
38105
|
-
'tickers/hist': 2.
|
|
38106
|
-
'trades/{symbol}/hist': 2.
|
|
38201
|
+
'tickers': 2.7,
|
|
38202
|
+
'ticker/{symbol}': 2.7,
|
|
38203
|
+
'tickers/hist': 2.7,
|
|
38204
|
+
'trades/{symbol}/hist': 2.7,
|
|
38107
38205
|
'book/{symbol}/{precision}': 1,
|
|
38108
38206
|
'book/{symbol}/P0': 1,
|
|
38109
38207
|
'book/{symbol}/P1': 1,
|
|
38110
38208
|
'book/{symbol}/P2': 1,
|
|
38111
38209
|
'book/{symbol}/P3': 1,
|
|
38112
38210
|
'book/{symbol}/R0': 1,
|
|
38113
|
-
'stats1/{key}:{size}:{symbol}:{side}/{section}': 2.
|
|
38114
|
-
'stats1/{key}:{size}:{symbol}:{side}/last': 2.
|
|
38115
|
-
'stats1/{key}:{size}:{symbol}:{side}/hist': 2.
|
|
38116
|
-
'stats1/{key}:{size}:{symbol}/{section}': 2.
|
|
38117
|
-
'stats1/{key}:{size}:{symbol}/last': 2.
|
|
38118
|
-
'stats1/{key}:{size}:{symbol}/hist': 2.
|
|
38119
|
-
'stats1/{key}:{size}:{symbol}:long/last': 2.
|
|
38120
|
-
'stats1/{key}:{size}:{symbol}:long/hist': 2.
|
|
38121
|
-
'stats1/{key}:{size}:{symbol}:short/last': 2.
|
|
38122
|
-
'stats1/{key}:{size}:{symbol}:short/hist': 2.
|
|
38123
|
-
'candles/trade:{timeframe}:{symbol}:{period}/{section}': 2.
|
|
38124
|
-
'candles/trade:{timeframe}:{symbol}/{section}': 2.
|
|
38125
|
-
'candles/trade:{timeframe}:{symbol}/last': 2.
|
|
38126
|
-
'candles/trade:{timeframe}:{symbol}/hist': 2.
|
|
38127
|
-
'status/{type}': 2.
|
|
38128
|
-
'status/deriv': 2.
|
|
38129
|
-
'status/deriv/{symbol}/hist': 2.
|
|
38211
|
+
'stats1/{key}:{size}:{symbol}:{side}/{section}': 2.7,
|
|
38212
|
+
'stats1/{key}:{size}:{symbol}:{side}/last': 2.7,
|
|
38213
|
+
'stats1/{key}:{size}:{symbol}:{side}/hist': 2.7,
|
|
38214
|
+
'stats1/{key}:{size}:{symbol}/{section}': 2.7,
|
|
38215
|
+
'stats1/{key}:{size}:{symbol}/last': 2.7,
|
|
38216
|
+
'stats1/{key}:{size}:{symbol}/hist': 2.7,
|
|
38217
|
+
'stats1/{key}:{size}:{symbol}:long/last': 2.7,
|
|
38218
|
+
'stats1/{key}:{size}:{symbol}:long/hist': 2.7,
|
|
38219
|
+
'stats1/{key}:{size}:{symbol}:short/last': 2.7,
|
|
38220
|
+
'stats1/{key}:{size}:{symbol}:short/hist': 2.7,
|
|
38221
|
+
'candles/trade:{timeframe}:{symbol}:{period}/{section}': 2.7,
|
|
38222
|
+
'candles/trade:{timeframe}:{symbol}/{section}': 2.7,
|
|
38223
|
+
'candles/trade:{timeframe}:{symbol}/last': 2.7,
|
|
38224
|
+
'candles/trade:{timeframe}:{symbol}/hist': 2.7,
|
|
38225
|
+
'status/{type}': 2.7,
|
|
38226
|
+
'status/deriv': 2.7,
|
|
38227
|
+
'status/deriv/{symbol}/hist': 2.7,
|
|
38130
38228
|
'liquidations/hist': 80,
|
|
38131
|
-
'rankings/{key}:{timeframe}:{symbol}/{section}': 2.
|
|
38132
|
-
'rankings/{key}:{timeframe}:{symbol}/hist': 2.
|
|
38133
|
-
'pulse/hist': 2.
|
|
38134
|
-
'pulse/profile/{nickname}': 2.
|
|
38229
|
+
'rankings/{key}:{timeframe}:{symbol}/{section}': 2.7,
|
|
38230
|
+
'rankings/{key}:{timeframe}:{symbol}/hist': 2.7,
|
|
38231
|
+
'pulse/hist': 2.7,
|
|
38232
|
+
'pulse/profile/{nickname}': 2.7,
|
|
38135
38233
|
'funding/stats/{symbol}/hist': 10, // ratelimit not in docs
|
|
38136
38234
|
},
|
|
38137
38235
|
'post': {
|
|
38138
|
-
'calc/trade/avg': 2.
|
|
38139
|
-
'calc/fx': 2.
|
|
38236
|
+
'calc/trade/avg': 2.7,
|
|
38237
|
+
'calc/fx': 2.7,
|
|
38140
38238
|
},
|
|
38141
38239
|
},
|
|
38142
38240
|
'private': {
|
|
38143
38241
|
'post': {
|
|
38144
38242
|
// 'auth/r/orders/{symbol}/new', // outdated
|
|
38145
38243
|
// 'auth/r/stats/perf:{timeframe}/hist', // outdated
|
|
38146
|
-
'auth/r/wallets': 2.
|
|
38147
|
-
'auth/r/wallets/hist': 2.
|
|
38148
|
-
'auth/r/orders': 2.
|
|
38149
|
-
'auth/r/orders/{symbol}': 2.
|
|
38150
|
-
'auth/w/order/submit': 2.
|
|
38151
|
-
'auth/w/order/update': 2.
|
|
38152
|
-
'auth/w/order/cancel': 2.
|
|
38153
|
-
'auth/w/order/multi': 2.
|
|
38154
|
-
'auth/w/order/cancel/multi': 2.
|
|
38155
|
-
'auth/r/orders/{symbol}/hist': 2.
|
|
38156
|
-
'auth/r/orders/hist': 2.
|
|
38157
|
-
'auth/r/order/{symbol}:{id}/trades': 2.
|
|
38158
|
-
'auth/r/trades/{symbol}/hist': 2.
|
|
38159
|
-
'auth/r/trades/hist': 2.
|
|
38160
|
-
'auth/r/ledgers/{currency}/hist': 2.
|
|
38161
|
-
'auth/r/ledgers/hist': 2.
|
|
38162
|
-
'auth/r/info/margin/{key}': 2.
|
|
38163
|
-
'auth/r/info/margin/base': 2.
|
|
38164
|
-
'auth/r/info/margin/sym_all': 2.
|
|
38165
|
-
'auth/r/positions': 2.
|
|
38166
|
-
'auth/w/position/claim': 2.
|
|
38167
|
-
'auth/w/position/increase:': 2.
|
|
38168
|
-
'auth/r/position/increase/info': 2.
|
|
38169
|
-
'auth/r/positions/hist': 2.
|
|
38170
|
-
'auth/r/positions/audit': 2.
|
|
38171
|
-
'auth/r/positions/snap': 2.
|
|
38172
|
-
'auth/w/deriv/collateral/set': 2.
|
|
38173
|
-
'auth/w/deriv/collateral/limits': 2.
|
|
38174
|
-
'auth/r/funding/offers': 2.
|
|
38175
|
-
'auth/r/funding/offers/{symbol}': 2.
|
|
38176
|
-
'auth/w/funding/offer/submit': 2.
|
|
38177
|
-
'auth/w/funding/offer/cancel': 2.
|
|
38178
|
-
'auth/w/funding/offer/cancel/all': 2.
|
|
38179
|
-
'auth/w/funding/close': 2.
|
|
38180
|
-
'auth/w/funding/auto': 2.
|
|
38181
|
-
'auth/w/funding/keep': 2.
|
|
38182
|
-
'auth/r/funding/offers/{symbol}/hist': 2.
|
|
38183
|
-
'auth/r/funding/offers/hist': 2.
|
|
38184
|
-
'auth/r/funding/loans': 2.
|
|
38185
|
-
'auth/r/funding/loans/hist': 2.
|
|
38186
|
-
'auth/r/funding/loans/{symbol}': 2.
|
|
38187
|
-
'auth/r/funding/loans/{symbol}/hist': 2.
|
|
38188
|
-
'auth/r/funding/credits': 2.
|
|
38189
|
-
'auth/r/funding/credits/hist': 2.
|
|
38190
|
-
'auth/r/funding/credits/{symbol}': 2.
|
|
38191
|
-
'auth/r/funding/credits/{symbol}/hist': 2.
|
|
38192
|
-
'auth/r/funding/trades/{symbol}/hist': 2.
|
|
38193
|
-
'auth/r/funding/trades/hist': 2.
|
|
38194
|
-
'auth/r/info/funding/{key}': 2.
|
|
38195
|
-
'auth/r/info/user': 2.
|
|
38196
|
-
'auth/r/summary': 2.
|
|
38197
|
-
'auth/r/logins/hist': 2.
|
|
38198
|
-
'auth/r/permissions': 2.
|
|
38199
|
-
'auth/w/token': 2.
|
|
38200
|
-
'auth/r/audit/hist': 2.
|
|
38201
|
-
'auth/w/transfer': 2.
|
|
38244
|
+
'auth/r/wallets': 2.7,
|
|
38245
|
+
'auth/r/wallets/hist': 2.7,
|
|
38246
|
+
'auth/r/orders': 2.7,
|
|
38247
|
+
'auth/r/orders/{symbol}': 2.7,
|
|
38248
|
+
'auth/w/order/submit': 2.7,
|
|
38249
|
+
'auth/w/order/update': 2.7,
|
|
38250
|
+
'auth/w/order/cancel': 2.7,
|
|
38251
|
+
'auth/w/order/multi': 2.7,
|
|
38252
|
+
'auth/w/order/cancel/multi': 2.7,
|
|
38253
|
+
'auth/r/orders/{symbol}/hist': 2.7,
|
|
38254
|
+
'auth/r/orders/hist': 2.7,
|
|
38255
|
+
'auth/r/order/{symbol}:{id}/trades': 2.7,
|
|
38256
|
+
'auth/r/trades/{symbol}/hist': 2.7,
|
|
38257
|
+
'auth/r/trades/hist': 2.7,
|
|
38258
|
+
'auth/r/ledgers/{currency}/hist': 2.7,
|
|
38259
|
+
'auth/r/ledgers/hist': 2.7,
|
|
38260
|
+
'auth/r/info/margin/{key}': 2.7,
|
|
38261
|
+
'auth/r/info/margin/base': 2.7,
|
|
38262
|
+
'auth/r/info/margin/sym_all': 2.7,
|
|
38263
|
+
'auth/r/positions': 2.7,
|
|
38264
|
+
'auth/w/position/claim': 2.7,
|
|
38265
|
+
'auth/w/position/increase:': 2.7,
|
|
38266
|
+
'auth/r/position/increase/info': 2.7,
|
|
38267
|
+
'auth/r/positions/hist': 2.7,
|
|
38268
|
+
'auth/r/positions/audit': 2.7,
|
|
38269
|
+
'auth/r/positions/snap': 2.7,
|
|
38270
|
+
'auth/w/deriv/collateral/set': 2.7,
|
|
38271
|
+
'auth/w/deriv/collateral/limits': 2.7,
|
|
38272
|
+
'auth/r/funding/offers': 2.7,
|
|
38273
|
+
'auth/r/funding/offers/{symbol}': 2.7,
|
|
38274
|
+
'auth/w/funding/offer/submit': 2.7,
|
|
38275
|
+
'auth/w/funding/offer/cancel': 2.7,
|
|
38276
|
+
'auth/w/funding/offer/cancel/all': 2.7,
|
|
38277
|
+
'auth/w/funding/close': 2.7,
|
|
38278
|
+
'auth/w/funding/auto': 2.7,
|
|
38279
|
+
'auth/w/funding/keep': 2.7,
|
|
38280
|
+
'auth/r/funding/offers/{symbol}/hist': 2.7,
|
|
38281
|
+
'auth/r/funding/offers/hist': 2.7,
|
|
38282
|
+
'auth/r/funding/loans': 2.7,
|
|
38283
|
+
'auth/r/funding/loans/hist': 2.7,
|
|
38284
|
+
'auth/r/funding/loans/{symbol}': 2.7,
|
|
38285
|
+
'auth/r/funding/loans/{symbol}/hist': 2.7,
|
|
38286
|
+
'auth/r/funding/credits': 2.7,
|
|
38287
|
+
'auth/r/funding/credits/hist': 2.7,
|
|
38288
|
+
'auth/r/funding/credits/{symbol}': 2.7,
|
|
38289
|
+
'auth/r/funding/credits/{symbol}/hist': 2.7,
|
|
38290
|
+
'auth/r/funding/trades/{symbol}/hist': 2.7,
|
|
38291
|
+
'auth/r/funding/trades/hist': 2.7,
|
|
38292
|
+
'auth/r/info/funding/{key}': 2.7,
|
|
38293
|
+
'auth/r/info/user': 2.7,
|
|
38294
|
+
'auth/r/summary': 2.7,
|
|
38295
|
+
'auth/r/logins/hist': 2.7,
|
|
38296
|
+
'auth/r/permissions': 2.7,
|
|
38297
|
+
'auth/w/token': 2.7,
|
|
38298
|
+
'auth/r/audit/hist': 2.7,
|
|
38299
|
+
'auth/w/transfer': 2.7,
|
|
38202
38300
|
'auth/w/deposit/address': 24,
|
|
38203
38301
|
'auth/w/deposit/invoice': 24,
|
|
38204
38302
|
'auth/w/withdraw': 24,
|
|
38205
|
-
'auth/r/movements/{currency}/hist': 2.
|
|
38206
|
-
'auth/r/movements/hist': 2.
|
|
38207
|
-
'auth/r/alerts': 5.
|
|
38208
|
-
'auth/w/alert/set': 2.
|
|
38209
|
-
'auth/w/alert/price:{symbol}:{price}/del': 2.
|
|
38210
|
-
'auth/w/alert/{type}:{symbol}:{price}/del': 2.
|
|
38211
|
-
'auth/calc/order/avail': 2.
|
|
38212
|
-
'auth/w/settings/set': 2.
|
|
38213
|
-
'auth/r/settings': 2.
|
|
38214
|
-
'auth/w/settings/del': 2.
|
|
38215
|
-
'auth/r/pulse/hist': 2.
|
|
38303
|
+
'auth/r/movements/{currency}/hist': 2.7,
|
|
38304
|
+
'auth/r/movements/hist': 2.7,
|
|
38305
|
+
'auth/r/alerts': 5.34,
|
|
38306
|
+
'auth/w/alert/set': 2.7,
|
|
38307
|
+
'auth/w/alert/price:{symbol}:{price}/del': 2.7,
|
|
38308
|
+
'auth/w/alert/{type}:{symbol}:{price}/del': 2.7,
|
|
38309
|
+
'auth/calc/order/avail': 2.7,
|
|
38310
|
+
'auth/w/settings/set': 2.7,
|
|
38311
|
+
'auth/r/settings': 2.7,
|
|
38312
|
+
'auth/w/settings/del': 2.7,
|
|
38313
|
+
'auth/r/pulse/hist': 2.7,
|
|
38216
38314
|
'auth/w/pulse/add': 16,
|
|
38217
|
-
'auth/w/pulse/del': 2.
|
|
38315
|
+
'auth/w/pulse/del': 2.7,
|
|
38218
38316
|
},
|
|
38219
38317
|
},
|
|
38220
38318
|
},
|
|
@@ -57768,6 +57866,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
57768
57866
|
* @method
|
|
57769
57867
|
* @name bitmex#fetchCurrencies
|
|
57770
57868
|
* @description fetches all available currencies on an exchange
|
|
57869
|
+
* @see https://www.bitmex.com/api/explorer/#!/Wallet/Wallet_getAssetsConfig
|
|
57771
57870
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
57772
57871
|
* @returns {object} an associative dictionary of currencies
|
|
57773
57872
|
*/
|
|
@@ -58253,6 +58352,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58253
58352
|
* @method
|
|
58254
58353
|
* @name bitmex#fetchBalance
|
|
58255
58354
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
58355
|
+
* @see https://www.bitmex.com/api/explorer/#!/User/User_getMargin
|
|
58256
58356
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
58257
58357
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
58258
58358
|
*/
|
|
@@ -58315,6 +58415,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58315
58415
|
* @method
|
|
58316
58416
|
* @name bitmex#fetchOrderBook
|
|
58317
58417
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
58418
|
+
* @see https://www.bitmex.com/api/explorer/#!/OrderBook/OrderBook_getL2
|
|
58318
58419
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
58319
58420
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
58320
58421
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -58358,6 +58459,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58358
58459
|
* @method
|
|
58359
58460
|
* @name bitmex#fetchOrder
|
|
58360
58461
|
* @description fetches information on an order made by the user
|
|
58462
|
+
* @see https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders
|
|
58361
58463
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
58362
58464
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
58363
58465
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -58426,6 +58528,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58426
58528
|
* @method
|
|
58427
58529
|
* @name bitmex#fetchOpenOrders
|
|
58428
58530
|
* @description fetch all unfilled currently open orders
|
|
58531
|
+
* @see https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders
|
|
58429
58532
|
* @param {string} symbol unified market symbol
|
|
58430
58533
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
58431
58534
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -58444,6 +58547,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58444
58547
|
* @method
|
|
58445
58548
|
* @name bitmex#fetchClosedOrders
|
|
58446
58549
|
* @description fetches information on multiple closed orders made by the user
|
|
58550
|
+
* @see https://www.bitmex.com/api/explorer/#!/Order/Order_getOrders
|
|
58447
58551
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
58448
58552
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
58449
58553
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -58458,8 +58562,8 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58458
58562
|
/**
|
|
58459
58563
|
* @method
|
|
58460
58564
|
* @name bitmex#fetchMyTrades
|
|
58461
|
-
* @see https://www.bitmex.com/api/explorer/#!/Execution/Execution_getTradeHistory
|
|
58462
58565
|
* @description fetch all trades made by the user
|
|
58566
|
+
* @see https://www.bitmex.com/api/explorer/#!/Execution/Execution_getTradeHistory
|
|
58463
58567
|
* @param {string} symbol unified market symbol
|
|
58464
58568
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
58465
58569
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -58668,6 +58772,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58668
58772
|
* @method
|
|
58669
58773
|
* @name bitmex#fetchLedger
|
|
58670
58774
|
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
58775
|
+
* @see https://www.bitmex.com/api/explorer/#!/User/User_getWalletHistory
|
|
58671
58776
|
* @param {string} code unified currency code, default is undefined
|
|
58672
58777
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
58673
58778
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
@@ -58719,6 +58824,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58719
58824
|
* @method
|
|
58720
58825
|
* @name bitmex#fetchDepositsWithdrawals
|
|
58721
58826
|
* @description fetch history of deposits and withdrawals
|
|
58827
|
+
* @see https://www.bitmex.com/api/explorer/#!/User/User_getWalletHistory
|
|
58722
58828
|
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
58723
58829
|
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
58724
58830
|
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
@@ -58837,6 +58943,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58837
58943
|
* @method
|
|
58838
58944
|
* @name bitmex#fetchTicker
|
|
58839
58945
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
58946
|
+
* @see https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_get
|
|
58840
58947
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
58841
58948
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
58842
58949
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -58858,6 +58965,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58858
58965
|
* @method
|
|
58859
58966
|
* @name bitmex#fetchTickers
|
|
58860
58967
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
58968
|
+
* @see https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_getActiveAndIndices
|
|
58861
58969
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
58862
58970
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
58863
58971
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -58940,8 +59048,8 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58940
59048
|
/**
|
|
58941
59049
|
* @method
|
|
58942
59050
|
* @name bitmex#fetchOHLCV
|
|
58943
|
-
* @see https://www.bitmex.com/api/explorer/#!/Trade/Trade_getBucketed
|
|
58944
59051
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
59052
|
+
* @see https://www.bitmex.com/api/explorer/#!/Trade/Trade_getBucketed
|
|
58945
59053
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
58946
59054
|
* @param {string} timeframe the length of time each candle represents
|
|
58947
59055
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -59256,8 +59364,8 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
59256
59364
|
/**
|
|
59257
59365
|
* @method
|
|
59258
59366
|
* @name bitmex#fetchTrades
|
|
59259
|
-
* @see https://www.bitmex.com/api/explorer/#!/Trade/Trade_get
|
|
59260
59367
|
* @description get the list of most recent trades for a particular symbol
|
|
59368
|
+
* @see https://www.bitmex.com/api/explorer/#!/Trade/Trade_get
|
|
59261
59369
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
59262
59370
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
59263
59371
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -59478,6 +59586,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
59478
59586
|
* @method
|
|
59479
59587
|
* @name bitmex#cancelOrder
|
|
59480
59588
|
* @description cancels an open order
|
|
59589
|
+
* @see https://www.bitmex.com/api/explorer/#!/Order/Order_cancel
|
|
59481
59590
|
* @param {string} id order id
|
|
59482
59591
|
* @param {string} symbol not used by bitmex cancelOrder ()
|
|
59483
59592
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -59509,6 +59618,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
59509
59618
|
* @method
|
|
59510
59619
|
* @name bitmex#cancelOrders
|
|
59511
59620
|
* @description cancel multiple orders
|
|
59621
|
+
* @see https://www.bitmex.com/api/explorer/#!/Order/Order_cancel
|
|
59512
59622
|
* @param {string[]} ids order ids
|
|
59513
59623
|
* @param {string} symbol not used by bitmex cancelOrders ()
|
|
59514
59624
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -59534,6 +59644,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
59534
59644
|
* @method
|
|
59535
59645
|
* @name bitmex#cancelAllOrders
|
|
59536
59646
|
* @description cancel all open orders
|
|
59647
|
+
* @see https://www.bitmex.com/api/explorer/#!/Order/Order_cancelAll
|
|
59537
59648
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
59538
59649
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
59539
59650
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -59592,6 +59703,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
59592
59703
|
* @method
|
|
59593
59704
|
* @name bitmex#fetchPositions
|
|
59594
59705
|
* @description fetch all open positions
|
|
59706
|
+
* @see https://www.bitmex.com/api/explorer/#!/Position/Position_get
|
|
59595
59707
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
59596
59708
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
59597
59709
|
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
@@ -59850,6 +59962,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
59850
59962
|
* @method
|
|
59851
59963
|
* @name bitmex#withdraw
|
|
59852
59964
|
* @description make a withdrawal
|
|
59965
|
+
* @see https://www.bitmex.com/api/explorer/#!/User/User_requestWithdrawal
|
|
59853
59966
|
* @param {string} code unified currency code
|
|
59854
59967
|
* @param {float} amount the amount to withdraw
|
|
59855
59968
|
* @param {string} address the address to withdraw to
|
|
@@ -59897,6 +60010,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
59897
60010
|
* @method
|
|
59898
60011
|
* @name bitmex#fetchFundingRates
|
|
59899
60012
|
* @description fetch the funding rate for multiple markets
|
|
60013
|
+
* @see https://www.bitmex.com/api/explorer/#!/Instrument/Instrument_getActiveAndIndices
|
|
59900
60014
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
59901
60015
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
59902
60016
|
* @returns {object} a dictionary of [funding rates structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexe by market symbols
|
|
@@ -59948,6 +60062,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
59948
60062
|
* @method
|
|
59949
60063
|
* @name bitmex#fetchFundingRateHistory
|
|
59950
60064
|
* @description Fetches the history of funding rates
|
|
60065
|
+
* @see https://www.bitmex.com/api/explorer/#!/Funding/Funding_get
|
|
59951
60066
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
59952
60067
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
59953
60068
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
@@ -60031,6 +60146,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
60031
60146
|
* @method
|
|
60032
60147
|
* @name bitmex#setLeverage
|
|
60033
60148
|
* @description set the level of leverage for a market
|
|
60149
|
+
* @see https://www.bitmex.com/api/explorer/#!/Position/Position_updateLeverage
|
|
60034
60150
|
* @param {float} leverage the rate of leverage
|
|
60035
60151
|
* @param {string} symbol unified market symbol
|
|
60036
60152
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -60058,6 +60174,7 @@ class bitmex extends _abstract_bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
60058
60174
|
* @method
|
|
60059
60175
|
* @name bitmex#setMarginMode
|
|
60060
60176
|
* @description set margin mode to 'cross' or 'isolated'
|
|
60177
|
+
* @see https://www.bitmex.com/api/explorer/#!/Position/Position_isolateMargin
|
|
60061
60178
|
* @param {string} marginMode 'cross' or 'isolated'
|
|
60062
60179
|
* @param {string} symbol unified market symbol
|
|
60063
60180
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -75379,6 +75496,2119 @@ class blockchaincom extends _abstract_blockchaincom_js__WEBPACK_IMPORTED_MODULE_
|
|
|
75379
75496
|
}
|
|
75380
75497
|
|
|
75381
75498
|
|
|
75499
|
+
/***/ }),
|
|
75500
|
+
|
|
75501
|
+
/***/ 687:
|
|
75502
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
75503
|
+
|
|
75504
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
75505
|
+
/* harmony export */ Z: () => (/* binding */ blofin)
|
|
75506
|
+
/* harmony export */ });
|
|
75507
|
+
/* harmony import */ var _abstract_blofin_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6065);
|
|
75508
|
+
/* harmony import */ var _base_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
|
|
75509
|
+
/* harmony import */ var _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2194);
|
|
75510
|
+
/* harmony import */ var _base_functions_number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9292);
|
|
75511
|
+
/* harmony import */ var _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1372);
|
|
75512
|
+
// ---------------------------------------------------------------------------
|
|
75513
|
+
|
|
75514
|
+
|
|
75515
|
+
|
|
75516
|
+
|
|
75517
|
+
|
|
75518
|
+
// ---------------------------------------------------------------------------
|
|
75519
|
+
/**
|
|
75520
|
+
* @class blofin
|
|
75521
|
+
* @augments Exchange
|
|
75522
|
+
*/
|
|
75523
|
+
class blofin extends _abstract_blofin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
75524
|
+
describe() {
|
|
75525
|
+
return this.deepExtend(super.describe(), {
|
|
75526
|
+
'id': 'blofin',
|
|
75527
|
+
'name': 'BloFin',
|
|
75528
|
+
'countries': ['US'],
|
|
75529
|
+
'version': 'v1',
|
|
75530
|
+
'rateLimit': 100,
|
|
75531
|
+
'has': {
|
|
75532
|
+
'CORS': undefined,
|
|
75533
|
+
'spot': false,
|
|
75534
|
+
'margin': false,
|
|
75535
|
+
'swap': true,
|
|
75536
|
+
'future': false,
|
|
75537
|
+
'option': false,
|
|
75538
|
+
'addMargin': false,
|
|
75539
|
+
'borrowMargin': false,
|
|
75540
|
+
'cancelAllOrders': false,
|
|
75541
|
+
'cancelOrder': true,
|
|
75542
|
+
'cancelOrders': true,
|
|
75543
|
+
'closeAllPositions': false,
|
|
75544
|
+
'closePosition': true,
|
|
75545
|
+
'createDepositAddress': false,
|
|
75546
|
+
'createMarketBuyOrderWithCost': false,
|
|
75547
|
+
'createMarketSellOrderWithCost': false,
|
|
75548
|
+
'createOrder': true,
|
|
75549
|
+
'createOrders': true,
|
|
75550
|
+
'createOrderWithTakeProfitAndStopLoss': true,
|
|
75551
|
+
'createPostOnlyOrder': false,
|
|
75552
|
+
'createReduceOnlyOrder': false,
|
|
75553
|
+
'createStopLimitOrder': false,
|
|
75554
|
+
'createStopLossOrder': true,
|
|
75555
|
+
'createStopMarketOrder': false,
|
|
75556
|
+
'createStopOrder': false,
|
|
75557
|
+
'createTakeProfitOrder': true,
|
|
75558
|
+
'editOrder': false,
|
|
75559
|
+
'fetchAccounts': false,
|
|
75560
|
+
'fetchBalance': true,
|
|
75561
|
+
'fetchBidsAsks': undefined,
|
|
75562
|
+
'fetchBorrowInterest': false,
|
|
75563
|
+
'fetchBorrowRateHistories': false,
|
|
75564
|
+
'fetchBorrowRateHistory': false,
|
|
75565
|
+
'fetchCanceledOrders': false,
|
|
75566
|
+
'fetchClosedOrder': false,
|
|
75567
|
+
'fetchClosedOrders': false,
|
|
75568
|
+
'fetchCrossBorrowRate': false,
|
|
75569
|
+
'fetchCrossBorrowRates': false,
|
|
75570
|
+
'fetchCurrencies': false,
|
|
75571
|
+
'fetchDeposit': false,
|
|
75572
|
+
'fetchDepositAddress': false,
|
|
75573
|
+
'fetchDepositAddresses': false,
|
|
75574
|
+
'fetchDepositAddressesByNetwork': false,
|
|
75575
|
+
'fetchDeposits': true,
|
|
75576
|
+
'fetchDepositsWithdrawals': false,
|
|
75577
|
+
'fetchDepositWithdrawFee': 'emulated',
|
|
75578
|
+
'fetchDepositWithdrawFees': false,
|
|
75579
|
+
'fetchFundingHistory': true,
|
|
75580
|
+
'fetchFundingRate': true,
|
|
75581
|
+
'fetchFundingRateHistory': true,
|
|
75582
|
+
'fetchFundingRates': false,
|
|
75583
|
+
'fetchGreeks': false,
|
|
75584
|
+
'fetchIndexOHLCV': false,
|
|
75585
|
+
'fetchIsolatedBorrowRate': false,
|
|
75586
|
+
'fetchIsolatedBorrowRates': false,
|
|
75587
|
+
'fetchL3OrderBook': false,
|
|
75588
|
+
'fetchLedger': true,
|
|
75589
|
+
'fetchLedgerEntry': undefined,
|
|
75590
|
+
'fetchLeverage': true,
|
|
75591
|
+
'fetchLeverageTiers': false,
|
|
75592
|
+
'fetchMarketLeverageTiers': false,
|
|
75593
|
+
'fetchMarkets': true,
|
|
75594
|
+
'fetchMarkOHLCV': false,
|
|
75595
|
+
'fetchMySettlementHistory': false,
|
|
75596
|
+
'fetchMyTrades': true,
|
|
75597
|
+
'fetchOHLCV': true,
|
|
75598
|
+
'fetchOpenInterest': false,
|
|
75599
|
+
'fetchOpenInterestHistory': false,
|
|
75600
|
+
'fetchOpenOrder': undefined,
|
|
75601
|
+
'fetchOpenOrders': true,
|
|
75602
|
+
'fetchOrder': true,
|
|
75603
|
+
'fetchOrderBook': true,
|
|
75604
|
+
'fetchOrderBooks': false,
|
|
75605
|
+
'fetchOrders': false,
|
|
75606
|
+
'fetchOrderTrades': true,
|
|
75607
|
+
'fetchPermissions': undefined,
|
|
75608
|
+
'fetchPosition': true,
|
|
75609
|
+
'fetchPositions': true,
|
|
75610
|
+
'fetchPositionsForSymbol': false,
|
|
75611
|
+
'fetchPositionsRisk': false,
|
|
75612
|
+
'fetchPremiumIndexOHLCV': false,
|
|
75613
|
+
'fetchSettlementHistory': false,
|
|
75614
|
+
'fetchStatus': false,
|
|
75615
|
+
'fetchTicker': true,
|
|
75616
|
+
'fetchTickers': true,
|
|
75617
|
+
'fetchTime': false,
|
|
75618
|
+
'fetchTrades': true,
|
|
75619
|
+
'fetchTradingFee': false,
|
|
75620
|
+
'fetchTradingFees': false,
|
|
75621
|
+
'fetchTradingLimits': false,
|
|
75622
|
+
'fetchTransactionFee': false,
|
|
75623
|
+
'fetchTransactionFees': false,
|
|
75624
|
+
'fetchTransactions': false,
|
|
75625
|
+
'fetchTransfer': false,
|
|
75626
|
+
'fetchTransfers': false,
|
|
75627
|
+
'fetchUnderlyingAssets': false,
|
|
75628
|
+
'fetchVolatilityHistory': false,
|
|
75629
|
+
'fetchWithdrawal': false,
|
|
75630
|
+
'fetchWithdrawals': true,
|
|
75631
|
+
'fetchWithdrawalWhitelist': false,
|
|
75632
|
+
'reduceMargin': false,
|
|
75633
|
+
'repayCrossMargin': false,
|
|
75634
|
+
'setLeverage': true,
|
|
75635
|
+
'setMargin': false,
|
|
75636
|
+
'setMarginMode': false,
|
|
75637
|
+
'setPositionMode': false,
|
|
75638
|
+
'signIn': false,
|
|
75639
|
+
'transfer': true,
|
|
75640
|
+
'withdraw': false,
|
|
75641
|
+
},
|
|
75642
|
+
'timeframes': {
|
|
75643
|
+
'1m': '1m',
|
|
75644
|
+
'3m': '3m',
|
|
75645
|
+
'5m': '5m',
|
|
75646
|
+
'15m': '15m',
|
|
75647
|
+
'30m': '30m',
|
|
75648
|
+
'1h': '1H',
|
|
75649
|
+
'2h': '2H',
|
|
75650
|
+
'4h': '4H',
|
|
75651
|
+
'6h': '6H',
|
|
75652
|
+
'12h': '12H',
|
|
75653
|
+
'1d': '1D',
|
|
75654
|
+
'1w': '1W',
|
|
75655
|
+
'1M': '1M',
|
|
75656
|
+
'3M': '3M',
|
|
75657
|
+
},
|
|
75658
|
+
'hostname': 'www.blofin.com',
|
|
75659
|
+
'urls': {
|
|
75660
|
+
'logo': 'https://github.com/ccxt/ccxt/assets/43336371/255a7b29-341f-4d20-8342-fbfae4932807',
|
|
75661
|
+
'api': {
|
|
75662
|
+
'rest': 'https://openapi.blofin.com',
|
|
75663
|
+
},
|
|
75664
|
+
'referral': {
|
|
75665
|
+
'url': 'https://blofin.com/register?referral_code=jBd8U1',
|
|
75666
|
+
'discount': 0.05,
|
|
75667
|
+
},
|
|
75668
|
+
'www': 'https://www.blofin.com',
|
|
75669
|
+
'doc': 'https://blofin.com/docs',
|
|
75670
|
+
},
|
|
75671
|
+
'api': {
|
|
75672
|
+
'public': {
|
|
75673
|
+
'get': {
|
|
75674
|
+
'market/instruments': 1,
|
|
75675
|
+
'market/tickers': 1,
|
|
75676
|
+
'market/books': 1,
|
|
75677
|
+
'market/trades': 1,
|
|
75678
|
+
'market/candles': 1,
|
|
75679
|
+
'market/mark-price': 1,
|
|
75680
|
+
'market/funding-rate': 1,
|
|
75681
|
+
'market/funding-rate-history': 1,
|
|
75682
|
+
},
|
|
75683
|
+
},
|
|
75684
|
+
'private': {
|
|
75685
|
+
'get': {
|
|
75686
|
+
'asset/balances': 1,
|
|
75687
|
+
'trade/orders-pending': 1,
|
|
75688
|
+
'trade/fills-history': 1,
|
|
75689
|
+
'asset/deposit-history': 1,
|
|
75690
|
+
'asset/withdrawal-history': 1,
|
|
75691
|
+
'asset/bills': 1,
|
|
75692
|
+
'account/balance': 1,
|
|
75693
|
+
'account/positions': 1,
|
|
75694
|
+
'account/leverage-info': 1,
|
|
75695
|
+
'trade/orders-tpsl-pending': 1,
|
|
75696
|
+
'trade/orders-history': 1,
|
|
75697
|
+
'trade/orders-tpsl-history': 1,
|
|
75698
|
+
},
|
|
75699
|
+
'post': {
|
|
75700
|
+
'trade/order': 1,
|
|
75701
|
+
'trade/cancel-order': 1,
|
|
75702
|
+
'account/set-leverage': 1,
|
|
75703
|
+
'trade/batch-orders': 1,
|
|
75704
|
+
'trade/order-tpsl': 1,
|
|
75705
|
+
'trade/cancel-batch-orders': 1,
|
|
75706
|
+
'trade/cancel-tpsl': 1,
|
|
75707
|
+
'trade/close-position': 1,
|
|
75708
|
+
'asset/transfer': 1,
|
|
75709
|
+
},
|
|
75710
|
+
},
|
|
75711
|
+
},
|
|
75712
|
+
'fees': {
|
|
75713
|
+
'swap': {
|
|
75714
|
+
'taker': this.parseNumber('0.00060'),
|
|
75715
|
+
'maker': this.parseNumber('0.00020'),
|
|
75716
|
+
},
|
|
75717
|
+
},
|
|
75718
|
+
'requiredCredentials': {
|
|
75719
|
+
'apiKey': true,
|
|
75720
|
+
'secret': true,
|
|
75721
|
+
'password': true,
|
|
75722
|
+
},
|
|
75723
|
+
'exceptions': {
|
|
75724
|
+
'exact': {
|
|
75725
|
+
'400': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75726
|
+
'401': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError,
|
|
75727
|
+
'500': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError,
|
|
75728
|
+
'404': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75729
|
+
'405': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75730
|
+
'406': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75731
|
+
'429': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.RateLimitExceeded,
|
|
75732
|
+
'152001': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75733
|
+
'152002': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75734
|
+
'152003': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75735
|
+
'152004': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75736
|
+
'152005': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75737
|
+
'152006': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75738
|
+
'152007': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75739
|
+
'152008': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75740
|
+
'152009': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75741
|
+
'150003': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75742
|
+
'150004': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75743
|
+
'542': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75744
|
+
'102002': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75745
|
+
'102005': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75746
|
+
'102014': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75747
|
+
'102015': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75748
|
+
'102022': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75749
|
+
'102037': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75750
|
+
'102038': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75751
|
+
'102039': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75752
|
+
'102040': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75753
|
+
'102047': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75754
|
+
'102048': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75755
|
+
'102049': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75756
|
+
'102050': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75757
|
+
'102051': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75758
|
+
'102052': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75759
|
+
'102053': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75760
|
+
'102054': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75761
|
+
'102055': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
75762
|
+
'102064': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75763
|
+
'102065': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75764
|
+
'102068': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
75765
|
+
'103013': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError,
|
|
75766
|
+
'Order failed. Insufficient USDT margin in account': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InsufficientFunds, // Insufficient USDT margin in account
|
|
75767
|
+
},
|
|
75768
|
+
'broad': {
|
|
75769
|
+
'Internal Server Error': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeNotAvailable,
|
|
75770
|
+
'server error': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeNotAvailable, // {"code":500,"data":{},"detailMsg":"","error_code":"500","error_message":"server error 1236805249","msg":"server error 1236805249"}
|
|
75771
|
+
},
|
|
75772
|
+
},
|
|
75773
|
+
'httpExceptions': {
|
|
75774
|
+
'429': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeNotAvailable, // https://github.com/ccxt/ccxt/issues/9612
|
|
75775
|
+
},
|
|
75776
|
+
'precisionMode': _base_functions_number_js__WEBPACK_IMPORTED_MODULE_2__/* .TICK_SIZE */ .sh,
|
|
75777
|
+
'options': {
|
|
75778
|
+
'brokerId': 'ec6dd3a7dd982d0b',
|
|
75779
|
+
'accountsByType': {
|
|
75780
|
+
'swap': 'futures',
|
|
75781
|
+
'future': 'futures',
|
|
75782
|
+
},
|
|
75783
|
+
'accountsById': {
|
|
75784
|
+
'futures': 'swap',
|
|
75785
|
+
},
|
|
75786
|
+
'sandboxMode': false,
|
|
75787
|
+
'defaultNetwork': 'ERC20',
|
|
75788
|
+
'defaultNetworks': {
|
|
75789
|
+
'ETH': 'ERC20',
|
|
75790
|
+
'BTC': 'BTC',
|
|
75791
|
+
'USDT': 'TRC20',
|
|
75792
|
+
},
|
|
75793
|
+
'networks': {
|
|
75794
|
+
'BTC': 'Bitcoin',
|
|
75795
|
+
'BEP20': 'BSC',
|
|
75796
|
+
'ERC20': 'ERC20',
|
|
75797
|
+
'TRC20': 'TRC20',
|
|
75798
|
+
},
|
|
75799
|
+
'fetchOpenInterestHistory': {
|
|
75800
|
+
'timeframes': {
|
|
75801
|
+
'5m': '5m',
|
|
75802
|
+
'1h': '1H',
|
|
75803
|
+
'8h': '8H',
|
|
75804
|
+
'1d': '1D',
|
|
75805
|
+
'5M': '5m',
|
|
75806
|
+
'1H': '1H',
|
|
75807
|
+
'8H': '8H',
|
|
75808
|
+
'1D': '1D',
|
|
75809
|
+
},
|
|
75810
|
+
},
|
|
75811
|
+
'fetchOHLCV': {
|
|
75812
|
+
// 'type': 'Candles', // Candles or HistoryCandles, IndexCandles, MarkPriceCandles
|
|
75813
|
+
'timezone': 'UTC', // UTC, HK
|
|
75814
|
+
},
|
|
75815
|
+
'fetchPositions': {
|
|
75816
|
+
'method': 'privateGetAccountPositions', // privateGetAccountPositions or privateGetAccountPositionsHistory
|
|
75817
|
+
},
|
|
75818
|
+
'createOrder': 'privatePostTradeOrder',
|
|
75819
|
+
'createMarketBuyOrderRequiresPrice': false,
|
|
75820
|
+
'fetchMarkets': ['swap'],
|
|
75821
|
+
'defaultType': 'swap',
|
|
75822
|
+
'fetchLedger': {
|
|
75823
|
+
'method': 'privateGetAssetBills',
|
|
75824
|
+
},
|
|
75825
|
+
'fetchOpenOrders': {
|
|
75826
|
+
'method': 'privateGetTradeOrdersPending',
|
|
75827
|
+
},
|
|
75828
|
+
'cancelOrders': {
|
|
75829
|
+
'method': 'privatePostTradeCancelBatchOrders',
|
|
75830
|
+
},
|
|
75831
|
+
'fetchCanceledOrders': {
|
|
75832
|
+
'method': 'privateGetTradeOrdersHistory', // privateGetTradeOrdersTpslHistory
|
|
75833
|
+
},
|
|
75834
|
+
'fetchClosedOrders': {
|
|
75835
|
+
'method': 'privateGetTradeOrdersHistory', // privateGetTradeOrdersTpslHistory
|
|
75836
|
+
},
|
|
75837
|
+
'withdraw': {
|
|
75838
|
+
// a funding password credential is required by the exchange for the
|
|
75839
|
+
// withdraw call (not to be confused with the api password credential)
|
|
75840
|
+
'password': undefined,
|
|
75841
|
+
'pwd': undefined, // password or pwd both work
|
|
75842
|
+
},
|
|
75843
|
+
'exchangeType': {
|
|
75844
|
+
'spot': 'SPOT',
|
|
75845
|
+
'swap': 'SWAP',
|
|
75846
|
+
'SPOT': 'SPOT',
|
|
75847
|
+
'SWAP': 'SWAP',
|
|
75848
|
+
},
|
|
75849
|
+
},
|
|
75850
|
+
});
|
|
75851
|
+
}
|
|
75852
|
+
async fetchMarkets(params = {}) {
|
|
75853
|
+
/**
|
|
75854
|
+
* @method
|
|
75855
|
+
* @name blofin#fetchMarkets
|
|
75856
|
+
* @description retrieves data on all markets for blofin
|
|
75857
|
+
* @see https://blofin.com/docs#get-instruments
|
|
75858
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
75859
|
+
* @returns {object[]} an array of objects representing market data
|
|
75860
|
+
*/
|
|
75861
|
+
const response = await this.publicGetMarketInstruments(params);
|
|
75862
|
+
const data = this.safeList(response, 'data', []);
|
|
75863
|
+
return this.parseMarkets(data);
|
|
75864
|
+
}
|
|
75865
|
+
parseMarket(market) {
|
|
75866
|
+
const id = this.safeString(market, 'instId');
|
|
75867
|
+
const type = this.safeStringLower(market, 'instType');
|
|
75868
|
+
const spot = (type === 'spot');
|
|
75869
|
+
const future = (type === 'future');
|
|
75870
|
+
const swap = (type === 'swap');
|
|
75871
|
+
const option = (type === 'option');
|
|
75872
|
+
const contract = swap || future;
|
|
75873
|
+
const baseId = this.safeString(market, 'baseCurrency');
|
|
75874
|
+
const quoteId = this.safeString(market, 'quoteCurrency');
|
|
75875
|
+
const settleId = this.safeString(market, 'quoteCurrency');
|
|
75876
|
+
const settle = this.safeCurrencyCode(settleId);
|
|
75877
|
+
const base = this.safeCurrencyCode(baseId);
|
|
75878
|
+
const quote = this.safeCurrencyCode(quoteId);
|
|
75879
|
+
let symbol = base + '/' + quote;
|
|
75880
|
+
if (swap) {
|
|
75881
|
+
symbol = symbol + ':' + settle;
|
|
75882
|
+
}
|
|
75883
|
+
const expiry = undefined;
|
|
75884
|
+
const strikePrice = undefined;
|
|
75885
|
+
const optionType = undefined;
|
|
75886
|
+
const tickSize = this.safeString(market, 'tickSize');
|
|
75887
|
+
const fees = this.safeValue2(this.fees, type, 'trading', {});
|
|
75888
|
+
const taker = this.safeNumber(fees, 'taker');
|
|
75889
|
+
const maker = this.safeNumber(fees, 'maker');
|
|
75890
|
+
let maxLeverage = this.safeString(market, 'maxLeverage', '100');
|
|
75891
|
+
maxLeverage = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMax(maxLeverage, '1');
|
|
75892
|
+
const isActive = (this.safeString(market, 'state') === 'live');
|
|
75893
|
+
return this.safeMarketStructure({
|
|
75894
|
+
'id': id,
|
|
75895
|
+
'symbol': symbol,
|
|
75896
|
+
'base': base,
|
|
75897
|
+
'quote': quote,
|
|
75898
|
+
'baseId': baseId,
|
|
75899
|
+
'quoteId': quoteId,
|
|
75900
|
+
'settle': settle,
|
|
75901
|
+
'settleId': settleId,
|
|
75902
|
+
'type': type,
|
|
75903
|
+
'spot': spot,
|
|
75904
|
+
'option': option,
|
|
75905
|
+
'margin': spot && (_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringGt(maxLeverage, '1')),
|
|
75906
|
+
'swap': swap,
|
|
75907
|
+
'future': future,
|
|
75908
|
+
'active': isActive,
|
|
75909
|
+
'taker': taker,
|
|
75910
|
+
'maker': maker,
|
|
75911
|
+
'contract': contract,
|
|
75912
|
+
'linear': contract ? (quoteId === settleId) : undefined,
|
|
75913
|
+
'inverse': contract ? (baseId === settleId) : undefined,
|
|
75914
|
+
'contractSize': contract ? this.safeNumber(market, 'contractValue') : undefined,
|
|
75915
|
+
'expiry': expiry,
|
|
75916
|
+
'expiryDatetime': expiry,
|
|
75917
|
+
'strike': strikePrice,
|
|
75918
|
+
'optionType': optionType,
|
|
75919
|
+
'created': this.safeInteger(market, 'listTime'),
|
|
75920
|
+
'precision': {
|
|
75921
|
+
'amount': this.safeNumber(market, 'lotSize'),
|
|
75922
|
+
'price': this.parseNumber(tickSize),
|
|
75923
|
+
},
|
|
75924
|
+
'limits': {
|
|
75925
|
+
'leverage': {
|
|
75926
|
+
'min': this.parseNumber('1'),
|
|
75927
|
+
'max': this.parseNumber(maxLeverage),
|
|
75928
|
+
},
|
|
75929
|
+
'amount': {
|
|
75930
|
+
'min': this.safeNumber(market, 'minSize'),
|
|
75931
|
+
'max': undefined,
|
|
75932
|
+
},
|
|
75933
|
+
'price': {
|
|
75934
|
+
'min': undefined,
|
|
75935
|
+
'max': undefined,
|
|
75936
|
+
},
|
|
75937
|
+
'cost': {
|
|
75938
|
+
'min': undefined,
|
|
75939
|
+
'max': undefined,
|
|
75940
|
+
},
|
|
75941
|
+
},
|
|
75942
|
+
'info': market,
|
|
75943
|
+
});
|
|
75944
|
+
}
|
|
75945
|
+
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
75946
|
+
/**
|
|
75947
|
+
* @method
|
|
75948
|
+
* @name blofin#fetchOrderBook
|
|
75949
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
75950
|
+
* @see https://blofin.com/docs#get-order-book
|
|
75951
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
75952
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
75953
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
75954
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
75955
|
+
*/
|
|
75956
|
+
await this.loadMarkets();
|
|
75957
|
+
const market = this.market(symbol);
|
|
75958
|
+
const request = {
|
|
75959
|
+
'instId': market['id'],
|
|
75960
|
+
};
|
|
75961
|
+
limit = (limit === undefined) ? 50 : limit;
|
|
75962
|
+
if (limit !== undefined) {
|
|
75963
|
+
request['size'] = limit; // max 100
|
|
75964
|
+
}
|
|
75965
|
+
const response = await this.publicGetMarketBooks(this.extend(request, params));
|
|
75966
|
+
//
|
|
75967
|
+
// {
|
|
75968
|
+
// "code": "0",
|
|
75969
|
+
// "msg": "",
|
|
75970
|
+
// "data": [
|
|
75971
|
+
// {
|
|
75972
|
+
// "asks": [
|
|
75973
|
+
// ["0.07228","4.211619","0","2"], // price, amount, liquidated orders, total open orders
|
|
75974
|
+
// ["0.0723","299.880364","0","2"],
|
|
75975
|
+
// ["0.07231","3.72832","0","1"],
|
|
75976
|
+
// ],
|
|
75977
|
+
// "bids": [
|
|
75978
|
+
// ["0.07221","18.5","0","1"],
|
|
75979
|
+
// ["0.0722","18.5","0","1"],
|
|
75980
|
+
// ["0.07219","0.505407","0","1"],
|
|
75981
|
+
// ],
|
|
75982
|
+
// "ts": "1621438475342"
|
|
75983
|
+
// }
|
|
75984
|
+
// ]
|
|
75985
|
+
// }
|
|
75986
|
+
//
|
|
75987
|
+
const data = this.safeList(response, 'data', []);
|
|
75988
|
+
const first = this.safeValue(data, 0, {});
|
|
75989
|
+
const timestamp = this.safeInteger(first, 'ts');
|
|
75990
|
+
return this.parseOrderBook(first, symbol, timestamp);
|
|
75991
|
+
}
|
|
75992
|
+
parseTicker(ticker, market = undefined) {
|
|
75993
|
+
const timestamp = this.safeInteger(ticker, 'ts');
|
|
75994
|
+
const marketId = this.safeString(ticker, 'instId');
|
|
75995
|
+
market = this.safeMarket(marketId, market, '-');
|
|
75996
|
+
const symbol = market['symbol'];
|
|
75997
|
+
const last = this.safeString(ticker, 'last');
|
|
75998
|
+
const open = this.safeString(ticker, 'open24h');
|
|
75999
|
+
const spot = this.safeValue(market, 'spot', false);
|
|
76000
|
+
const quoteVolume = spot ? this.safeString(ticker, 'volCurrency24h') : undefined;
|
|
76001
|
+
const baseVolume = this.safeString(ticker, 'vol24h');
|
|
76002
|
+
const high = this.safeString(ticker, 'high24h');
|
|
76003
|
+
const low = this.safeString(ticker, 'low24h');
|
|
76004
|
+
return this.safeTicker({
|
|
76005
|
+
'symbol': symbol,
|
|
76006
|
+
'timestamp': timestamp,
|
|
76007
|
+
'datetime': this.iso8601(timestamp),
|
|
76008
|
+
'high': high,
|
|
76009
|
+
'low': low,
|
|
76010
|
+
'bid': this.safeString(ticker, 'bidPrice'),
|
|
76011
|
+
'bidVolume': this.safeString(ticker, 'bidSize'),
|
|
76012
|
+
'ask': this.safeString(ticker, 'askPrice'),
|
|
76013
|
+
'askVolume': this.safeString(ticker, 'askSize'),
|
|
76014
|
+
'vwap': undefined,
|
|
76015
|
+
'open': open,
|
|
76016
|
+
'close': last,
|
|
76017
|
+
'last': last,
|
|
76018
|
+
'previousClose': undefined,
|
|
76019
|
+
'change': undefined,
|
|
76020
|
+
'percentage': undefined,
|
|
76021
|
+
'average': undefined,
|
|
76022
|
+
'baseVolume': baseVolume,
|
|
76023
|
+
'quoteVolume': quoteVolume,
|
|
76024
|
+
'info': ticker,
|
|
76025
|
+
}, market);
|
|
76026
|
+
}
|
|
76027
|
+
async fetchTicker(symbol, params = {}) {
|
|
76028
|
+
/**
|
|
76029
|
+
* @method
|
|
76030
|
+
* @name blofin#fetchTicker
|
|
76031
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
76032
|
+
* @see https://blofin.com/docs#get-tickers
|
|
76033
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
76034
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76035
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
76036
|
+
*/
|
|
76037
|
+
await this.loadMarkets();
|
|
76038
|
+
const market = this.market(symbol);
|
|
76039
|
+
const request = {
|
|
76040
|
+
'instId': market['id'],
|
|
76041
|
+
};
|
|
76042
|
+
const response = await this.publicGetMarketTickers(this.extend(request, params));
|
|
76043
|
+
const data = this.safeList(response, 'data', []);
|
|
76044
|
+
const first = this.safeValue(data, 0, {});
|
|
76045
|
+
return this.parseTicker(first, market);
|
|
76046
|
+
}
|
|
76047
|
+
async fetchTickers(symbols = undefined, params = {}) {
|
|
76048
|
+
/**
|
|
76049
|
+
* @method
|
|
76050
|
+
* @name blofin#fetchTickers
|
|
76051
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
76052
|
+
* @see https://blofin.com/docs#get-tickers
|
|
76053
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
76054
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76055
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
76056
|
+
*/
|
|
76057
|
+
await this.loadMarkets();
|
|
76058
|
+
symbols = this.marketSymbols(symbols);
|
|
76059
|
+
const response = await this.publicGetMarketTickers(params);
|
|
76060
|
+
const tickers = this.safeList(response, 'data', []);
|
|
76061
|
+
return this.parseTickers(tickers, symbols);
|
|
76062
|
+
}
|
|
76063
|
+
parseTrade(trade, market = undefined) {
|
|
76064
|
+
//
|
|
76065
|
+
// fetch trades
|
|
76066
|
+
// {
|
|
76067
|
+
// "tradeId": "3263934920",
|
|
76068
|
+
// "instId": "LTC-USDT",
|
|
76069
|
+
// "price": "67.87",
|
|
76070
|
+
// "size": "1",
|
|
76071
|
+
// "side": "buy",
|
|
76072
|
+
// "ts": "1707232020854"
|
|
76073
|
+
// }
|
|
76074
|
+
// my trades
|
|
76075
|
+
// {
|
|
76076
|
+
// "instId": "LTC-USDT",
|
|
76077
|
+
// "tradeId": "1440847",
|
|
76078
|
+
// "orderId": "2075705202",
|
|
76079
|
+
// "fillPrice": "67.850000000000000000",
|
|
76080
|
+
// "fillSize": "1.000000000000000000",
|
|
76081
|
+
// "fillPnl": "0.000000000000000000",
|
|
76082
|
+
// "side": "buy",
|
|
76083
|
+
// "positionSide": "net",
|
|
76084
|
+
// "fee": "0.040710000000000000",
|
|
76085
|
+
// "ts": "1707224678878",
|
|
76086
|
+
// "brokerId": ""
|
|
76087
|
+
// }
|
|
76088
|
+
//
|
|
76089
|
+
const id = this.safeString(trade, 'tradeId');
|
|
76090
|
+
const marketId = this.safeString(trade, 'instId');
|
|
76091
|
+
market = this.safeMarket(marketId, market, '-');
|
|
76092
|
+
const symbol = market['symbol'];
|
|
76093
|
+
const timestamp = this.safeInteger(trade, 'ts');
|
|
76094
|
+
const price = this.safeString2(trade, 'price', 'fillPrice');
|
|
76095
|
+
const amount = this.safeString2(trade, 'size', 'fillSize');
|
|
76096
|
+
const side = this.safeString(trade, 'side');
|
|
76097
|
+
const orderId = this.safeString(trade, 'orderId');
|
|
76098
|
+
const feeCost = this.safeString(trade, 'fee');
|
|
76099
|
+
let fee = undefined;
|
|
76100
|
+
if (feeCost !== undefined) {
|
|
76101
|
+
fee = {
|
|
76102
|
+
'cost': feeCost,
|
|
76103
|
+
'currency': market['settle'],
|
|
76104
|
+
};
|
|
76105
|
+
}
|
|
76106
|
+
return this.safeTrade({
|
|
76107
|
+
'info': trade,
|
|
76108
|
+
'timestamp': timestamp,
|
|
76109
|
+
'datetime': this.iso8601(timestamp),
|
|
76110
|
+
'symbol': symbol,
|
|
76111
|
+
'id': id,
|
|
76112
|
+
'order': orderId,
|
|
76113
|
+
'type': undefined,
|
|
76114
|
+
'takerOrMaker': undefined,
|
|
76115
|
+
'side': side,
|
|
76116
|
+
'price': price,
|
|
76117
|
+
'amount': amount,
|
|
76118
|
+
'cost': undefined,
|
|
76119
|
+
'fee': fee,
|
|
76120
|
+
}, market);
|
|
76121
|
+
}
|
|
76122
|
+
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
76123
|
+
/**
|
|
76124
|
+
* @method
|
|
76125
|
+
* @name blofin#fetchTrades
|
|
76126
|
+
* @description get the list of most recent trades for a particular symbol
|
|
76127
|
+
* @see https://blofin.com/docs#get-trades
|
|
76128
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
76129
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
76130
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
76131
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76132
|
+
* @param {boolean} [params.paginate] *only applies to publicGetMarketHistoryTrades* default false, when true will automatically paginate by calling this endpoint multiple times
|
|
76133
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
76134
|
+
*/
|
|
76135
|
+
await this.loadMarkets();
|
|
76136
|
+
let paginate = false;
|
|
76137
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchTrades', 'paginate');
|
|
76138
|
+
if (paginate) {
|
|
76139
|
+
return await this.fetchPaginatedCallCursor('fetchTrades', symbol, since, limit, params, 'tradeId', 'after', undefined, 100);
|
|
76140
|
+
}
|
|
76141
|
+
const market = this.market(symbol);
|
|
76142
|
+
const request = {
|
|
76143
|
+
'instId': market['id'],
|
|
76144
|
+
};
|
|
76145
|
+
let response = undefined;
|
|
76146
|
+
if (limit !== undefined) {
|
|
76147
|
+
request['limit'] = limit; // default 100
|
|
76148
|
+
}
|
|
76149
|
+
let method = undefined;
|
|
76150
|
+
[method, params] = this.handleOptionAndParams(params, 'fetchTrades', 'method', 'publicGetMarketTrades');
|
|
76151
|
+
if (method === 'publicGetMarketTrades') {
|
|
76152
|
+
response = await this.publicGetMarketTrades(this.extend(request, params));
|
|
76153
|
+
}
|
|
76154
|
+
const data = this.safeList(response, 'data', []);
|
|
76155
|
+
return this.parseTrades(data, market, since, limit);
|
|
76156
|
+
}
|
|
76157
|
+
parseOHLCV(ohlcv, market = undefined) {
|
|
76158
|
+
//
|
|
76159
|
+
// [
|
|
76160
|
+
// "1678928760000", // timestamp
|
|
76161
|
+
// "24341.4", // open
|
|
76162
|
+
// "24344", // high
|
|
76163
|
+
// "24313.2", // low
|
|
76164
|
+
// "24323", // close
|
|
76165
|
+
// "628", // contract volume
|
|
76166
|
+
// "2.5819", // base volume
|
|
76167
|
+
// "62800", // quote volume
|
|
76168
|
+
// "0" // candlestick state
|
|
76169
|
+
// ]
|
|
76170
|
+
//
|
|
76171
|
+
return [
|
|
76172
|
+
this.safeInteger(ohlcv, 0),
|
|
76173
|
+
this.safeNumber(ohlcv, 1),
|
|
76174
|
+
this.safeNumber(ohlcv, 2),
|
|
76175
|
+
this.safeNumber(ohlcv, 3),
|
|
76176
|
+
this.safeNumber(ohlcv, 4),
|
|
76177
|
+
this.safeNumber(ohlcv, 6),
|
|
76178
|
+
];
|
|
76179
|
+
}
|
|
76180
|
+
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
76181
|
+
/**
|
|
76182
|
+
* @method
|
|
76183
|
+
* @name blofin#fetchOHLCV
|
|
76184
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
76185
|
+
* @see https://blofin.com/docs#get-candlesticks
|
|
76186
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
76187
|
+
* @param {string} timeframe the length of time each candle represents
|
|
76188
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
76189
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
76190
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76191
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
76192
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
76193
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
76194
|
+
*/
|
|
76195
|
+
await this.loadMarkets();
|
|
76196
|
+
const market = this.market(symbol);
|
|
76197
|
+
let paginate = false;
|
|
76198
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
|
|
76199
|
+
if (paginate) {
|
|
76200
|
+
return await this.fetchPaginatedCallDeterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 100);
|
|
76201
|
+
}
|
|
76202
|
+
if (limit === undefined) {
|
|
76203
|
+
limit = 100; // default 100, max 100
|
|
76204
|
+
}
|
|
76205
|
+
const request = {
|
|
76206
|
+
'instId': market['id'],
|
|
76207
|
+
'bar': this.safeString(this.timeframes, timeframe, timeframe),
|
|
76208
|
+
'limit': limit,
|
|
76209
|
+
};
|
|
76210
|
+
const until = this.safeInteger(params, 'until');
|
|
76211
|
+
if (until !== undefined) {
|
|
76212
|
+
request['after'] = until;
|
|
76213
|
+
params = this.omit(params, 'until');
|
|
76214
|
+
}
|
|
76215
|
+
let response = undefined;
|
|
76216
|
+
response = await this.publicGetMarketCandles(this.extend(request, params));
|
|
76217
|
+
const data = this.safeList(response, 'data', []);
|
|
76218
|
+
return this.parseOHLCVs(data, market, timeframe, since, limit);
|
|
76219
|
+
}
|
|
76220
|
+
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
76221
|
+
/**
|
|
76222
|
+
* @method
|
|
76223
|
+
* @name blofin#fetchFundingRateHistory
|
|
76224
|
+
* @description fetches historical funding rate prices
|
|
76225
|
+
* @see https://blofin.com/docs#get-funding-rate-history
|
|
76226
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
76227
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
76228
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
76229
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76230
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
76231
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
76232
|
+
*/
|
|
76233
|
+
if (symbol === undefined) {
|
|
76234
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
76235
|
+
}
|
|
76236
|
+
await this.loadMarkets();
|
|
76237
|
+
let paginate = false;
|
|
76238
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
76239
|
+
if (paginate) {
|
|
76240
|
+
return await this.fetchPaginatedCallDeterministic('fetchFundingRateHistory', symbol, since, limit, '8h', params);
|
|
76241
|
+
}
|
|
76242
|
+
const market = this.market(symbol);
|
|
76243
|
+
const request = {
|
|
76244
|
+
'instId': market['id'],
|
|
76245
|
+
};
|
|
76246
|
+
if (since !== undefined) {
|
|
76247
|
+
request['before'] = Math.max(since - 1, 0);
|
|
76248
|
+
}
|
|
76249
|
+
if (limit !== undefined) {
|
|
76250
|
+
request['limit'] = limit;
|
|
76251
|
+
}
|
|
76252
|
+
const response = await this.publicGetMarketFundingRateHistory(this.extend(request, params));
|
|
76253
|
+
const rates = [];
|
|
76254
|
+
const data = this.safeList(response, 'data', []);
|
|
76255
|
+
for (let i = 0; i < data.length; i++) {
|
|
76256
|
+
const rate = data[i];
|
|
76257
|
+
const timestamp = this.safeInteger(rate, 'fundingTime');
|
|
76258
|
+
rates.push({
|
|
76259
|
+
'info': rate,
|
|
76260
|
+
'symbol': market['symbol'],
|
|
76261
|
+
'fundingRate': this.safeNumber(rate, 'fundingRate'),
|
|
76262
|
+
'timestamp': timestamp,
|
|
76263
|
+
'datetime': this.iso8601(timestamp),
|
|
76264
|
+
});
|
|
76265
|
+
}
|
|
76266
|
+
const sorted = this.sortBy(rates, 'timestamp');
|
|
76267
|
+
return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
|
|
76268
|
+
}
|
|
76269
|
+
parseFundingRate(contract, market = undefined) {
|
|
76270
|
+
//
|
|
76271
|
+
// {
|
|
76272
|
+
// "fundingRate": "0.00027815",
|
|
76273
|
+
// "fundingTime": "1634256000000",
|
|
76274
|
+
// "instId": "BTC-USD-SWAP",
|
|
76275
|
+
// "instType": "SWAP",
|
|
76276
|
+
// "nextFundingRate": "0.00017",
|
|
76277
|
+
// "nextFundingTime": "1634284800000"
|
|
76278
|
+
// }
|
|
76279
|
+
//
|
|
76280
|
+
// in the response above nextFundingRate is actually two funding rates from now
|
|
76281
|
+
//
|
|
76282
|
+
const nextFundingRateTimestamp = this.safeInteger(contract, 'nextFundingTime');
|
|
76283
|
+
const marketId = this.safeString(contract, 'instId');
|
|
76284
|
+
const symbol = this.safeSymbol(marketId, market);
|
|
76285
|
+
const nextFundingRate = this.safeNumber(contract, 'nextFundingRate');
|
|
76286
|
+
const fundingTime = this.safeInteger(contract, 'fundingTime');
|
|
76287
|
+
// > The current interest is 0.
|
|
76288
|
+
return {
|
|
76289
|
+
'info': contract,
|
|
76290
|
+
'symbol': symbol,
|
|
76291
|
+
'markPrice': undefined,
|
|
76292
|
+
'indexPrice': undefined,
|
|
76293
|
+
'interestRate': this.parseNumber('0'),
|
|
76294
|
+
'estimatedSettlePrice': undefined,
|
|
76295
|
+
'timestamp': undefined,
|
|
76296
|
+
'datetime': undefined,
|
|
76297
|
+
'fundingRate': this.safeNumber(contract, 'fundingRate'),
|
|
76298
|
+
'fundingTimestamp': fundingTime,
|
|
76299
|
+
'fundingDatetime': this.iso8601(fundingTime),
|
|
76300
|
+
'nextFundingRate': nextFundingRate,
|
|
76301
|
+
'nextFundingTimestamp': nextFundingRateTimestamp,
|
|
76302
|
+
'nextFundingDatetime': this.iso8601(nextFundingRateTimestamp),
|
|
76303
|
+
'previousFundingRate': undefined,
|
|
76304
|
+
'previousFundingTimestamp': undefined,
|
|
76305
|
+
'previousFundingDatetime': undefined,
|
|
76306
|
+
};
|
|
76307
|
+
}
|
|
76308
|
+
async fetchFundingRate(symbol, params = {}) {
|
|
76309
|
+
/**
|
|
76310
|
+
* @method
|
|
76311
|
+
* @name blofin#fetchFundingRate
|
|
76312
|
+
* @description fetch the current funding rate
|
|
76313
|
+
* @see https://blofin.com/docs#get-funding-rate
|
|
76314
|
+
* @param {string} symbol unified market symbol
|
|
76315
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76316
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
76317
|
+
*/
|
|
76318
|
+
await this.loadMarkets();
|
|
76319
|
+
const market = this.market(symbol);
|
|
76320
|
+
if (!market['swap']) {
|
|
76321
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError(this.id + ' fetchFundingRate() is only valid for swap markets');
|
|
76322
|
+
}
|
|
76323
|
+
const request = {
|
|
76324
|
+
'instId': market['id'],
|
|
76325
|
+
};
|
|
76326
|
+
const response = await this.publicGetMarketFundingRate(this.extend(request, params));
|
|
76327
|
+
//
|
|
76328
|
+
// {
|
|
76329
|
+
// "code": "0",
|
|
76330
|
+
// "data": [
|
|
76331
|
+
// {
|
|
76332
|
+
// "fundingRate": "0.00027815",
|
|
76333
|
+
// "fundingTime": "1634256000000",
|
|
76334
|
+
// "instId": "BTC-USD-SWAP",
|
|
76335
|
+
// "instType": "SWAP",
|
|
76336
|
+
// "nextFundingRate": "0.00017",
|
|
76337
|
+
// "nextFundingTime": "1634284800000"
|
|
76338
|
+
// }
|
|
76339
|
+
// ],
|
|
76340
|
+
// "msg": ""
|
|
76341
|
+
// }
|
|
76342
|
+
//
|
|
76343
|
+
const data = this.safeList(response, 'data', []);
|
|
76344
|
+
const entry = this.safeDict(data, 0, {});
|
|
76345
|
+
return this.parseFundingRate(entry, market);
|
|
76346
|
+
}
|
|
76347
|
+
parseBalanceByType(type, response) {
|
|
76348
|
+
if (type) {
|
|
76349
|
+
return this.parseFundingBalance(response);
|
|
76350
|
+
}
|
|
76351
|
+
else {
|
|
76352
|
+
return this.parseTradingBalance(response);
|
|
76353
|
+
}
|
|
76354
|
+
}
|
|
76355
|
+
parseTradingBalance(response) {
|
|
76356
|
+
//
|
|
76357
|
+
// {
|
|
76358
|
+
// "code": "0",
|
|
76359
|
+
// "msg": "success",
|
|
76360
|
+
// "data": {
|
|
76361
|
+
// "ts": "1697021343571",
|
|
76362
|
+
// "totalEquity": "10011254.077985990315787910",
|
|
76363
|
+
// "isolatedEquity": "861.763132108800000000",
|
|
76364
|
+
// "details": [
|
|
76365
|
+
// {
|
|
76366
|
+
// "currency": "USDT",
|
|
76367
|
+
// "equity": "10014042.988958415234430699548",
|
|
76368
|
+
// "balance": "10013119.885958415234430699",
|
|
76369
|
+
// "ts": "1697021343571",
|
|
76370
|
+
// "isolatedEquity": "862.003200000000000000048",
|
|
76371
|
+
// "available": "9996399.4708691159703362725",
|
|
76372
|
+
// "availableEquity": "9996399.4708691159703362725",
|
|
76373
|
+
// "frozen": "15805.149672632597427761",
|
|
76374
|
+
// "orderFrozen": "14920.994472632597427761",
|
|
76375
|
+
// "equityUsd": "10011254.077985990315787910",
|
|
76376
|
+
// "isolatedUnrealizedPnl": "-22.151999999999999999952",
|
|
76377
|
+
// "bonus": "0"
|
|
76378
|
+
// }
|
|
76379
|
+
// ]
|
|
76380
|
+
// }
|
|
76381
|
+
// }
|
|
76382
|
+
//
|
|
76383
|
+
const result = { 'info': response };
|
|
76384
|
+
const data = this.safeDict(response, 'data', {});
|
|
76385
|
+
const timestamp = this.safeInteger(data, 'ts');
|
|
76386
|
+
const details = this.safeList(data, 'details', []);
|
|
76387
|
+
for (let i = 0; i < details.length; i++) {
|
|
76388
|
+
const balance = details[i];
|
|
76389
|
+
const currencyId = this.safeString(balance, 'currency');
|
|
76390
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
76391
|
+
const account = this.account();
|
|
76392
|
+
// it may be incorrect to use total, free and used for swap accounts
|
|
76393
|
+
const eq = this.safeString(balance, 'equity');
|
|
76394
|
+
const availEq = this.safeString(balance, 'available');
|
|
76395
|
+
if ((eq === undefined) || (availEq === undefined)) {
|
|
76396
|
+
account['free'] = this.safeString(balance, 'availableEquity');
|
|
76397
|
+
account['used'] = this.safeString(balance, 'frozen');
|
|
76398
|
+
}
|
|
76399
|
+
else {
|
|
76400
|
+
account['total'] = eq;
|
|
76401
|
+
account['free'] = availEq;
|
|
76402
|
+
}
|
|
76403
|
+
result[code] = account;
|
|
76404
|
+
}
|
|
76405
|
+
result['timestamp'] = timestamp;
|
|
76406
|
+
result['datetime'] = this.iso8601(timestamp);
|
|
76407
|
+
return this.safeBalance(result);
|
|
76408
|
+
}
|
|
76409
|
+
parseFundingBalance(response) {
|
|
76410
|
+
//
|
|
76411
|
+
// {
|
|
76412
|
+
// "code": "0",
|
|
76413
|
+
// "msg": "success",
|
|
76414
|
+
// "data": [
|
|
76415
|
+
// {
|
|
76416
|
+
// "currency": "USDT",
|
|
76417
|
+
// "balance": "10012514.919418081548717298",
|
|
76418
|
+
// "available": "9872132.414278782284622898",
|
|
76419
|
+
// "frozen": "138556.471805965930761067",
|
|
76420
|
+
// "bonus": "0"
|
|
76421
|
+
// }
|
|
76422
|
+
// ]
|
|
76423
|
+
// }
|
|
76424
|
+
//
|
|
76425
|
+
const result = { 'info': response };
|
|
76426
|
+
const data = this.safeList(response, 'data', []);
|
|
76427
|
+
for (let i = 0; i < data.length; i++) {
|
|
76428
|
+
const balance = data[i];
|
|
76429
|
+
const currencyId = this.safeString(balance, 'currency');
|
|
76430
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
76431
|
+
const account = this.account();
|
|
76432
|
+
// it may be incorrect to use total, free and used for swap accounts
|
|
76433
|
+
account['total'] = this.safeString(balance, 'balance');
|
|
76434
|
+
account['free'] = this.safeString(balance, 'available');
|
|
76435
|
+
account['used'] = this.safeString(balance, 'frozen');
|
|
76436
|
+
result[code] = account;
|
|
76437
|
+
}
|
|
76438
|
+
return this.safeBalance(result);
|
|
76439
|
+
}
|
|
76440
|
+
parseTradingFee(fee, market = undefined) {
|
|
76441
|
+
return {
|
|
76442
|
+
'info': fee,
|
|
76443
|
+
'symbol': this.safeSymbol(undefined, market),
|
|
76444
|
+
// blofin returns the fees as negative values opposed to other exchanges, so the sign needs to be flipped
|
|
76445
|
+
'maker': this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringNeg(this.safeString2(fee, 'maker', 'makerU'))),
|
|
76446
|
+
'taker': this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringNeg(this.safeString2(fee, 'taker', 'takerU'))),
|
|
76447
|
+
};
|
|
76448
|
+
}
|
|
76449
|
+
async fetchBalance(params = {}) {
|
|
76450
|
+
/**
|
|
76451
|
+
* @method
|
|
76452
|
+
* @name blofin#fetchBalance
|
|
76453
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
76454
|
+
* @see https://blofin.com/docs#get-balance
|
|
76455
|
+
* @see https://blofin.com/docs#get-futures-account-balance
|
|
76456
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76457
|
+
* @param {string} [params.accountType] the type of account to fetch the balance for, either 'funding' or 'futures' or 'copy_trading' or 'earn'
|
|
76458
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
76459
|
+
*/
|
|
76460
|
+
await this.loadMarkets();
|
|
76461
|
+
const accountType = this.safeString2(params, 'accountType', 'type');
|
|
76462
|
+
params = this.omit(params, ['accountType', 'type']);
|
|
76463
|
+
const request = {};
|
|
76464
|
+
let response = undefined;
|
|
76465
|
+
if (accountType !== undefined) {
|
|
76466
|
+
const parsedAccountType = this.safeString(this.options, 'accountsByType', accountType);
|
|
76467
|
+
request['accountType'] = parsedAccountType;
|
|
76468
|
+
response = await this.privateGetAssetBalances(this.extend(request, params));
|
|
76469
|
+
}
|
|
76470
|
+
else {
|
|
76471
|
+
response = await this.privateGetAccountBalance(this.extend(request, params));
|
|
76472
|
+
}
|
|
76473
|
+
return this.parseBalanceByType(accountType, response);
|
|
76474
|
+
}
|
|
76475
|
+
createOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
|
|
76476
|
+
const market = this.market(symbol);
|
|
76477
|
+
const request = {
|
|
76478
|
+
'instId': market['id'],
|
|
76479
|
+
'side': side,
|
|
76480
|
+
'orderType': type,
|
|
76481
|
+
'size': this.amountToPrecision(symbol, amount),
|
|
76482
|
+
'brokerId': this.safeString(this.options, 'brokerId', 'ec6dd3a7dd982d0b'),
|
|
76483
|
+
};
|
|
76484
|
+
let marginMode = undefined;
|
|
76485
|
+
[marginMode, params] = this.handleMarginModeAndParams('createOrder', params, 'cross');
|
|
76486
|
+
request['marginMode'] = marginMode;
|
|
76487
|
+
const timeInForce = this.safeString(params, 'timeInForce', 'GTC');
|
|
76488
|
+
const isMarketOrder = type === 'market';
|
|
76489
|
+
params = this.omit(params, ['timeInForce']);
|
|
76490
|
+
const ioc = (timeInForce === 'IOC') || (type === 'ioc');
|
|
76491
|
+
const marketIOC = (isMarketOrder && ioc);
|
|
76492
|
+
if (isMarketOrder || marketIOC) {
|
|
76493
|
+
request['orderType'] = 'market';
|
|
76494
|
+
}
|
|
76495
|
+
else {
|
|
76496
|
+
request['price'] = this.priceToPrecision(symbol, price);
|
|
76497
|
+
}
|
|
76498
|
+
let postOnly = false;
|
|
76499
|
+
[postOnly, params] = this.handlePostOnly(isMarketOrder, type === 'post_only', params);
|
|
76500
|
+
if (postOnly) {
|
|
76501
|
+
request['type'] = 'post_only';
|
|
76502
|
+
}
|
|
76503
|
+
const stopLoss = this.safeValue(params, 'stopLoss');
|
|
76504
|
+
const takeProfit = this.safeValue(params, 'takeProfit');
|
|
76505
|
+
params = this.omit(params, ['stopLoss', 'takeProfit']);
|
|
76506
|
+
const isStopLoss = stopLoss !== undefined;
|
|
76507
|
+
const isTakeProfit = takeProfit !== undefined;
|
|
76508
|
+
if (isStopLoss || isTakeProfit) {
|
|
76509
|
+
if (isStopLoss) {
|
|
76510
|
+
const slTriggerPrice = this.safeString2(stopLoss, 'triggerPrice', 'stopPrice');
|
|
76511
|
+
request['slTriggerPrice'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
76512
|
+
const slOrderPrice = this.safeString(stopLoss, 'price', '-1');
|
|
76513
|
+
request['slOrderPrice'] = this.priceToPrecision(symbol, slOrderPrice);
|
|
76514
|
+
}
|
|
76515
|
+
if (isTakeProfit) {
|
|
76516
|
+
const tpTriggerPrice = this.safeString2(takeProfit, 'triggerPrice', 'stopPrice');
|
|
76517
|
+
request['tpTriggerPrice'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
76518
|
+
const tpPrice = this.safeString(takeProfit, 'price', '-1');
|
|
76519
|
+
request['tpOrderPrice'] = this.priceToPrecision(symbol, tpPrice);
|
|
76520
|
+
}
|
|
76521
|
+
}
|
|
76522
|
+
return this.extend(request, params);
|
|
76523
|
+
}
|
|
76524
|
+
parseOrderStatus(status) {
|
|
76525
|
+
const statuses = {
|
|
76526
|
+
'canceled': 'canceled',
|
|
76527
|
+
'order_failed': 'canceled',
|
|
76528
|
+
'live': 'open',
|
|
76529
|
+
'partially_filled': 'open',
|
|
76530
|
+
'filled': 'closed',
|
|
76531
|
+
'effective': 'closed',
|
|
76532
|
+
};
|
|
76533
|
+
return this.safeString(statuses, status, status);
|
|
76534
|
+
}
|
|
76535
|
+
parseOrder(order, market = undefined) {
|
|
76536
|
+
//
|
|
76537
|
+
// {
|
|
76538
|
+
// "orderId": "2075628533",
|
|
76539
|
+
// "clientOrderId": "",
|
|
76540
|
+
// "instId": "LTC-USDT",
|
|
76541
|
+
// "marginMode": "cross",
|
|
76542
|
+
// "positionSide": "net",
|
|
76543
|
+
// "side": "buy",
|
|
76544
|
+
// "orderType": "market",
|
|
76545
|
+
// "price": "0.000000000000000000",
|
|
76546
|
+
// "size": "1.000000000000000000",
|
|
76547
|
+
// "reduceOnly": "true",
|
|
76548
|
+
// "leverage": "3",
|
|
76549
|
+
// "state": "filled",
|
|
76550
|
+
// "filledSize": "1.000000000000000000",
|
|
76551
|
+
// "pnl": "-0.050000000000000000",
|
|
76552
|
+
// "averagePrice": "68.110000000000000000",
|
|
76553
|
+
// "fee": "0.040866000000000000",
|
|
76554
|
+
// "createTime": "1706891359010",
|
|
76555
|
+
// "updateTime": "1706891359098",
|
|
76556
|
+
// "orderCategory": "normal",
|
|
76557
|
+
// "tpTriggerPrice": null,
|
|
76558
|
+
// "tpOrderPrice": null,
|
|
76559
|
+
// "slTriggerPrice": null,
|
|
76560
|
+
// "slOrderPrice": null,
|
|
76561
|
+
// "cancelSource": "not_canceled",
|
|
76562
|
+
// "cancelSourceReason": null,
|
|
76563
|
+
// "brokerId": "ec6dd3a7dd982d0b"
|
|
76564
|
+
// }
|
|
76565
|
+
//
|
|
76566
|
+
const id = this.safeString2(order, 'tpslId', 'orderId');
|
|
76567
|
+
const timestamp = this.safeInteger(order, 'createTime');
|
|
76568
|
+
const lastUpdateTimestamp = this.safeInteger(order, 'updateTime');
|
|
76569
|
+
const lastTradeTimestamp = this.safeInteger(order, 'fillTime');
|
|
76570
|
+
const side = this.safeString(order, 'side');
|
|
76571
|
+
let type = this.safeString(order, 'orderType');
|
|
76572
|
+
let postOnly = undefined;
|
|
76573
|
+
let timeInForce = undefined;
|
|
76574
|
+
if (type === 'post_only') {
|
|
76575
|
+
postOnly = true;
|
|
76576
|
+
type = 'limit';
|
|
76577
|
+
}
|
|
76578
|
+
else if (type === 'fok') {
|
|
76579
|
+
timeInForce = 'FOK';
|
|
76580
|
+
type = 'limit';
|
|
76581
|
+
}
|
|
76582
|
+
else if (type === 'ioc') {
|
|
76583
|
+
timeInForce = 'IOC';
|
|
76584
|
+
type = 'limit';
|
|
76585
|
+
}
|
|
76586
|
+
const marketId = this.safeString(order, 'instId');
|
|
76587
|
+
market = this.safeMarket(marketId, market);
|
|
76588
|
+
const symbol = this.safeSymbol(marketId, market, '-');
|
|
76589
|
+
const filled = this.safeString(order, 'filledSize');
|
|
76590
|
+
const price = this.safeString2(order, 'px', 'price');
|
|
76591
|
+
const average = this.safeString(order, 'averagePrice');
|
|
76592
|
+
const status = this.parseOrderStatus(this.safeString(order, 'state'));
|
|
76593
|
+
const feeCostString = this.safeString(order, 'fee');
|
|
76594
|
+
const amount = this.safeString(order, 'size');
|
|
76595
|
+
const leverage = this.safeString(order, 'leverage', '1');
|
|
76596
|
+
const contractSize = this.safeString(market, 'contractSize');
|
|
76597
|
+
const baseAmount = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(contractSize, filled);
|
|
76598
|
+
let cost = undefined;
|
|
76599
|
+
if (average !== undefined) {
|
|
76600
|
+
cost = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(average, baseAmount);
|
|
76601
|
+
cost = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(cost, leverage);
|
|
76602
|
+
}
|
|
76603
|
+
// spot market buy: "sz" can refer either to base currency units or to quote currency units
|
|
76604
|
+
let fee = undefined;
|
|
76605
|
+
if (feeCostString !== undefined) {
|
|
76606
|
+
const feeCostSigned = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAbs(feeCostString);
|
|
76607
|
+
const feeCurrencyId = this.safeString(order, 'feeCcy', 'USDT');
|
|
76608
|
+
const feeCurrencyCode = this.safeCurrencyCode(feeCurrencyId);
|
|
76609
|
+
fee = {
|
|
76610
|
+
'cost': this.parseNumber(feeCostSigned),
|
|
76611
|
+
'currency': feeCurrencyCode,
|
|
76612
|
+
};
|
|
76613
|
+
}
|
|
76614
|
+
let clientOrderId = this.safeString(order, 'clientOrderId');
|
|
76615
|
+
if ((clientOrderId !== undefined) && (clientOrderId.length < 1)) {
|
|
76616
|
+
clientOrderId = undefined; // fix empty clientOrderId string
|
|
76617
|
+
}
|
|
76618
|
+
const stopLossTriggerPrice = this.safeNumber(order, 'slTriggerPrice');
|
|
76619
|
+
const stopLossPrice = this.safeNumber(order, 'slOrderPrice');
|
|
76620
|
+
const takeProfitTriggerPrice = this.safeNumber(order, 'tpTriggerPrice');
|
|
76621
|
+
const takeProfitPrice = this.safeNumber(order, 'tpOrderPrice');
|
|
76622
|
+
const reduceOnlyRaw = this.safeString(order, 'reduceOnly');
|
|
76623
|
+
const reduceOnly = (reduceOnlyRaw === 'true');
|
|
76624
|
+
return this.safeOrder({
|
|
76625
|
+
'info': order,
|
|
76626
|
+
'id': id,
|
|
76627
|
+
'clientOrderId': clientOrderId,
|
|
76628
|
+
'timestamp': timestamp,
|
|
76629
|
+
'datetime': this.iso8601(timestamp),
|
|
76630
|
+
'lastTradeTimestamp': lastTradeTimestamp,
|
|
76631
|
+
'lastUpdateTimestamp': lastUpdateTimestamp,
|
|
76632
|
+
'symbol': symbol,
|
|
76633
|
+
'type': type,
|
|
76634
|
+
'timeInForce': timeInForce,
|
|
76635
|
+
'postOnly': postOnly,
|
|
76636
|
+
'side': side,
|
|
76637
|
+
'price': price,
|
|
76638
|
+
'stopLossTriggerPrice': stopLossTriggerPrice,
|
|
76639
|
+
'takeProfitTriggerPrice': takeProfitTriggerPrice,
|
|
76640
|
+
'stopLossPrice': stopLossPrice,
|
|
76641
|
+
'takeProfitPrice': takeProfitPrice,
|
|
76642
|
+
'average': average,
|
|
76643
|
+
'cost': cost,
|
|
76644
|
+
'amount': amount,
|
|
76645
|
+
'filled': filled,
|
|
76646
|
+
'remaining': undefined,
|
|
76647
|
+
'status': status,
|
|
76648
|
+
'fee': fee,
|
|
76649
|
+
'trades': undefined,
|
|
76650
|
+
'reduceOnly': reduceOnly,
|
|
76651
|
+
}, market);
|
|
76652
|
+
}
|
|
76653
|
+
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
76654
|
+
/**
|
|
76655
|
+
* @method
|
|
76656
|
+
* @name blofin#createOrder
|
|
76657
|
+
* @description create a trade order
|
|
76658
|
+
* @see https://blofin.com/docs#place-order
|
|
76659
|
+
* @see https://blofin.com/docs#place-tpsl-order
|
|
76660
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
76661
|
+
* @param {string} type 'market' or 'limit' or 'post_only' or 'ioc' or 'fok'
|
|
76662
|
+
* @param {string} side 'buy' or 'sell'
|
|
76663
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
76664
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
76665
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76666
|
+
* @param {bool} [params.reduceOnly] a mark to reduce the position size for margin, swap and future orders
|
|
76667
|
+
* @param {bool} [params.postOnly] true to place a post only order
|
|
76668
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
|
|
76669
|
+
* @param {float} [params.stopLossPrice] stop loss trigger price (will use privatePostTradeOrderTpsl)
|
|
76670
|
+
* @param {float} [params.takeProfitPrice] take profit trigger price (will use privatePostTradeOrderTpsl)
|
|
76671
|
+
* @param {string} [param.positionSide] *stopLossPrice/takeProfitPrice orders only* 'long' or 'short' or 'net' default is 'net'
|
|
76672
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
76673
|
+
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
76674
|
+
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
76675
|
+
* @param {float} [params.takeProfit.price] take profit order price (if not provided the order will be a market order)
|
|
76676
|
+
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
|
76677
|
+
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
76678
|
+
* @param {float} [params.stopLoss.price] stop loss order price (if not provided the order will be a market order)
|
|
76679
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
76680
|
+
*/
|
|
76681
|
+
await this.loadMarkets();
|
|
76682
|
+
const market = this.market(symbol);
|
|
76683
|
+
const tpsl = this.safeBool(params, 'tpsl', false);
|
|
76684
|
+
params = this.omit(params, 'tpsl');
|
|
76685
|
+
let method = undefined;
|
|
76686
|
+
[method, params] = this.handleOptionAndParams(params, 'createOrder', 'method', 'privatePostTradeOrder');
|
|
76687
|
+
const isStopLossPriceDefined = this.safeString(params, 'stopLossPrice') !== undefined;
|
|
76688
|
+
const isTakeProfitPriceDefined = this.safeString(params, 'takeProfitPrice') !== undefined;
|
|
76689
|
+
const isType2Order = (isStopLossPriceDefined || isTakeProfitPriceDefined);
|
|
76690
|
+
let response = undefined;
|
|
76691
|
+
if (tpsl || (method === 'privatePostTradeOrderTpsl') || isType2Order) {
|
|
76692
|
+
const tpslRequest = this.createTpslOrderRequest(symbol, type, side, amount, price, params);
|
|
76693
|
+
response = await this.privatePostTradeOrderTpsl(tpslRequest);
|
|
76694
|
+
}
|
|
76695
|
+
else {
|
|
76696
|
+
const request = this.createOrderRequest(symbol, type, side, amount, price, params);
|
|
76697
|
+
response = await this.privatePostTradeOrder(request);
|
|
76698
|
+
}
|
|
76699
|
+
const data = this.safeList(response, 'data', []);
|
|
76700
|
+
const first = this.safeDict(data, 0);
|
|
76701
|
+
const order = this.parseOrder(first, market);
|
|
76702
|
+
order['type'] = type;
|
|
76703
|
+
order['side'] = side;
|
|
76704
|
+
return order;
|
|
76705
|
+
}
|
|
76706
|
+
createTpslOrderRequest(symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
76707
|
+
const market = this.market(symbol);
|
|
76708
|
+
const positionSide = this.safeString(params, 'positionSide', 'net');
|
|
76709
|
+
const request = {
|
|
76710
|
+
'instId': market['id'],
|
|
76711
|
+
'side': side,
|
|
76712
|
+
'positionSide': positionSide,
|
|
76713
|
+
'brokerId': this.safeString(this.options, 'brokerId', 'ec6dd3a7dd982d0b'),
|
|
76714
|
+
};
|
|
76715
|
+
if (amount !== undefined) {
|
|
76716
|
+
request['size'] = this.amountToPrecision(symbol, amount);
|
|
76717
|
+
}
|
|
76718
|
+
const marginMode = this.safeString(params, 'marginMode', 'cross'); // cross or isolated
|
|
76719
|
+
if (marginMode !== 'cross' && marginMode !== 'isolated') {
|
|
76720
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' createTpslOrder() requires a marginMode parameter that must be either cross or isolated');
|
|
76721
|
+
}
|
|
76722
|
+
const stopLossPrice = this.safeString(params, 'stopLossPrice');
|
|
76723
|
+
const takeProfitPrice = this.safeString(params, 'takeProfitPrice');
|
|
76724
|
+
if (stopLossPrice !== undefined) {
|
|
76725
|
+
request['slTriggerPrice'] = this.priceToPrecision(symbol, stopLossPrice);
|
|
76726
|
+
if (type === 'market') {
|
|
76727
|
+
request['slOrderPrice'] = '-1';
|
|
76728
|
+
}
|
|
76729
|
+
else {
|
|
76730
|
+
request['slOrderPrice'] = this.priceToPrecision(symbol, price);
|
|
76731
|
+
}
|
|
76732
|
+
}
|
|
76733
|
+
else if (takeProfitPrice !== undefined) {
|
|
76734
|
+
request['tpTriggerPrice'] = this.priceToPrecision(symbol, takeProfitPrice);
|
|
76735
|
+
if (type === 'market') {
|
|
76736
|
+
request['tpOrderPrice'] = '-1';
|
|
76737
|
+
}
|
|
76738
|
+
else {
|
|
76739
|
+
request['tpOrderPrice'] = this.priceToPrecision(symbol, price);
|
|
76740
|
+
}
|
|
76741
|
+
}
|
|
76742
|
+
request['marginMode'] = marginMode;
|
|
76743
|
+
params = this.omit(params, ['stopLossPrice', 'takeProfitPrice']);
|
|
76744
|
+
return this.extend(request, params);
|
|
76745
|
+
}
|
|
76746
|
+
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
76747
|
+
/**
|
|
76748
|
+
* @method
|
|
76749
|
+
* @name blofin#cancelOrder
|
|
76750
|
+
* @description cancels an open order
|
|
76751
|
+
* @see https://blofin.com/docs#cancel-order
|
|
76752
|
+
* @see https://blofin.com/docs#cancel-tpsl-order
|
|
76753
|
+
* @param {string} id order id
|
|
76754
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
76755
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76756
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
76757
|
+
*/
|
|
76758
|
+
if (symbol === undefined) {
|
|
76759
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
76760
|
+
}
|
|
76761
|
+
await this.loadMarkets();
|
|
76762
|
+
const market = this.market(symbol);
|
|
76763
|
+
const request = {
|
|
76764
|
+
'instId': market['id'],
|
|
76765
|
+
};
|
|
76766
|
+
const clientOrderId = this.safeString(params, 'clientOrderId');
|
|
76767
|
+
if (clientOrderId !== undefined) {
|
|
76768
|
+
request['clientOrderId'] = clientOrderId;
|
|
76769
|
+
}
|
|
76770
|
+
else {
|
|
76771
|
+
request['orderId'] = id;
|
|
76772
|
+
}
|
|
76773
|
+
const query = this.omit(params, ['orderId', 'clientOrderId']);
|
|
76774
|
+
const response = await this.privatePostTradeCancelOrder(this.extend(request, query));
|
|
76775
|
+
const data = this.safeList(response, 'data', []);
|
|
76776
|
+
const order = this.safeDict(data, 0);
|
|
76777
|
+
return this.parseOrder(order, market);
|
|
76778
|
+
}
|
|
76779
|
+
async createOrders(orders, params = {}) {
|
|
76780
|
+
/**
|
|
76781
|
+
* @method
|
|
76782
|
+
* @name blofin#createOrders
|
|
76783
|
+
* @description create a list of trade orders
|
|
76784
|
+
* @see https://blofin.com/docs#place-multiple-orders
|
|
76785
|
+
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
76786
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
76787
|
+
*/
|
|
76788
|
+
await this.loadMarkets();
|
|
76789
|
+
const ordersRequests = [];
|
|
76790
|
+
for (let i = 0; i < orders.length; i++) {
|
|
76791
|
+
const rawOrder = orders[i];
|
|
76792
|
+
const marketId = this.safeString(rawOrder, 'symbol');
|
|
76793
|
+
const type = this.safeString(rawOrder, 'type');
|
|
76794
|
+
const side = this.safeString(rawOrder, 'side');
|
|
76795
|
+
const amount = this.safeValue(rawOrder, 'amount');
|
|
76796
|
+
const price = this.safeValue(rawOrder, 'price');
|
|
76797
|
+
const orderParams = this.safeValue(rawOrder, 'params', {});
|
|
76798
|
+
const extendedParams = this.extend(orderParams, params); // the request does not accept extra params since it's a list, so we're extending each order with the common params
|
|
76799
|
+
const orderRequest = this.createOrderRequest(marketId, type, side, amount, price, extendedParams);
|
|
76800
|
+
ordersRequests.push(orderRequest);
|
|
76801
|
+
}
|
|
76802
|
+
const response = await this.privatePostTradeBatchOrders(ordersRequests);
|
|
76803
|
+
const data = this.safeList(response, 'data', []);
|
|
76804
|
+
return this.parseOrders(data);
|
|
76805
|
+
}
|
|
76806
|
+
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
76807
|
+
/**
|
|
76808
|
+
* @method
|
|
76809
|
+
* @name blofin#fetchOpenOrders
|
|
76810
|
+
* @description Fetch orders that are still open
|
|
76811
|
+
* @see https://blofin.com/docs#get-active-orders
|
|
76812
|
+
* @see https://blofin.com/docs#get-active-tpsl-orders
|
|
76813
|
+
* @param {string} symbol unified market symbol
|
|
76814
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
76815
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
76816
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76817
|
+
* @param {bool} [params.stop] True if fetching trigger or conditional orders
|
|
76818
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
76819
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
76820
|
+
*/
|
|
76821
|
+
await this.loadMarkets();
|
|
76822
|
+
let paginate = false;
|
|
76823
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
|
|
76824
|
+
if (paginate) {
|
|
76825
|
+
return await this.fetchPaginatedCallDynamic('fetchOpenOrders', symbol, since, limit, params);
|
|
76826
|
+
}
|
|
76827
|
+
const request = {};
|
|
76828
|
+
let market = undefined;
|
|
76829
|
+
if (symbol !== undefined) {
|
|
76830
|
+
market = this.market(symbol);
|
|
76831
|
+
request['instId'] = market['id'];
|
|
76832
|
+
}
|
|
76833
|
+
if (limit !== undefined) {
|
|
76834
|
+
request['limit'] = limit; // default 100, max 100
|
|
76835
|
+
}
|
|
76836
|
+
const isStop = this.safeValueN(params, ['stop', 'trigger', 'tpsl', 'TPSL'], false);
|
|
76837
|
+
let method = undefined;
|
|
76838
|
+
[method, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'method', 'privateGetTradeOrdersPending');
|
|
76839
|
+
const query = this.omit(params, ['method', 'stop', 'trigger', 'tpsl', 'TPSL']);
|
|
76840
|
+
let response = undefined;
|
|
76841
|
+
if (isStop || (method === 'privateGetTradeOrdersTpslPending')) {
|
|
76842
|
+
response = await this.privateGetTradeOrdersTpslPending(this.extend(request, query));
|
|
76843
|
+
}
|
|
76844
|
+
else {
|
|
76845
|
+
response = await this.privateGetTradeOrdersPending(this.extend(request, query));
|
|
76846
|
+
}
|
|
76847
|
+
const data = this.safeList(response, 'data', []);
|
|
76848
|
+
return this.parseOrders(data, market, since, limit);
|
|
76849
|
+
}
|
|
76850
|
+
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
76851
|
+
/**
|
|
76852
|
+
* @method
|
|
76853
|
+
* @name blofin#fetchMyTrades
|
|
76854
|
+
* @description fetch all trades made by the user
|
|
76855
|
+
* @see https://blofin.com/docs#get-trade-history
|
|
76856
|
+
* @param {string} symbol unified market symbol
|
|
76857
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
76858
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
76859
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76860
|
+
* @param {int} [params.until] Timestamp in ms of the latest time to retrieve trades for
|
|
76861
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
76862
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
76863
|
+
*/
|
|
76864
|
+
await this.loadMarkets();
|
|
76865
|
+
let paginate = false;
|
|
76866
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
|
|
76867
|
+
if (paginate) {
|
|
76868
|
+
return await this.fetchPaginatedCallDynamic('fetchMyTrades', symbol, since, limit, params);
|
|
76869
|
+
}
|
|
76870
|
+
let request = {};
|
|
76871
|
+
let market = undefined;
|
|
76872
|
+
if (symbol !== undefined) {
|
|
76873
|
+
market = this.market(symbol);
|
|
76874
|
+
request['instId'] = market['id'];
|
|
76875
|
+
}
|
|
76876
|
+
[request, params] = this.handleUntilOption('end', request, params);
|
|
76877
|
+
if (limit !== undefined) {
|
|
76878
|
+
request['limit'] = limit; // default 100, max 100
|
|
76879
|
+
}
|
|
76880
|
+
const response = await this.privateGetTradeFillsHistory(this.extend(request, params));
|
|
76881
|
+
const data = this.safeList(response, 'data', []);
|
|
76882
|
+
return this.parseTrades(data, market, since, limit);
|
|
76883
|
+
}
|
|
76884
|
+
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
76885
|
+
/**
|
|
76886
|
+
* @method
|
|
76887
|
+
* @name blofin#fetchDeposits
|
|
76888
|
+
* @description fetch all deposits made to an account
|
|
76889
|
+
* @see https://blofin.com/docs#get-deposite-history
|
|
76890
|
+
* @param {string} code unified currency code
|
|
76891
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
76892
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
76893
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76894
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
76895
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
76896
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
76897
|
+
*/
|
|
76898
|
+
await this.loadMarkets();
|
|
76899
|
+
let paginate = false;
|
|
76900
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchDeposits', 'paginate');
|
|
76901
|
+
if (paginate) {
|
|
76902
|
+
return await this.fetchPaginatedCallDynamic('fetchDeposits', code, since, limit, params);
|
|
76903
|
+
}
|
|
76904
|
+
let request = {};
|
|
76905
|
+
let currency = undefined;
|
|
76906
|
+
if (code !== undefined) {
|
|
76907
|
+
currency = this.currency(code);
|
|
76908
|
+
request['currency'] = currency['id'];
|
|
76909
|
+
}
|
|
76910
|
+
if (since !== undefined) {
|
|
76911
|
+
request['before'] = Math.max(since - 1, 0);
|
|
76912
|
+
}
|
|
76913
|
+
if (limit !== undefined) {
|
|
76914
|
+
request['limit'] = limit; // default 100, max 100
|
|
76915
|
+
}
|
|
76916
|
+
[request, params] = this.handleUntilOption('after', request, params);
|
|
76917
|
+
const response = await this.privateGetAssetDepositHistory(this.extend(request, params));
|
|
76918
|
+
const data = this.safeList(response, 'data', []);
|
|
76919
|
+
return this.parseTransactions(data, currency, since, limit, params);
|
|
76920
|
+
}
|
|
76921
|
+
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
76922
|
+
/**
|
|
76923
|
+
* @method
|
|
76924
|
+
* @name blofin#fetchWithdrawals
|
|
76925
|
+
* @description fetch all withdrawals made from an account
|
|
76926
|
+
* @see https://blofin.com/docs#get-withdraw-history
|
|
76927
|
+
* @param {string} code unified currency code
|
|
76928
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
76929
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
76930
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76931
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
76932
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
76933
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
76934
|
+
*/
|
|
76935
|
+
await this.loadMarkets();
|
|
76936
|
+
let paginate = false;
|
|
76937
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
|
|
76938
|
+
if (paginate) {
|
|
76939
|
+
return await this.fetchPaginatedCallDynamic('fetchWithdrawals', code, since, limit, params);
|
|
76940
|
+
}
|
|
76941
|
+
let request = {};
|
|
76942
|
+
let currency = undefined;
|
|
76943
|
+
if (code !== undefined) {
|
|
76944
|
+
currency = this.currency(code);
|
|
76945
|
+
request['currency'] = currency['id'];
|
|
76946
|
+
}
|
|
76947
|
+
if (since !== undefined) {
|
|
76948
|
+
request['before'] = Math.max(since - 1, 0);
|
|
76949
|
+
}
|
|
76950
|
+
if (limit !== undefined) {
|
|
76951
|
+
request['limit'] = limit; // default 100, max 100
|
|
76952
|
+
}
|
|
76953
|
+
[request, params] = this.handleUntilOption('after', request, params);
|
|
76954
|
+
const response = await this.privateGetAssetWithdrawalHistory(this.extend(request, params));
|
|
76955
|
+
const data = this.safeList(response, 'data', []);
|
|
76956
|
+
return this.parseTransactions(data, currency, since, limit, params);
|
|
76957
|
+
}
|
|
76958
|
+
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
76959
|
+
/**
|
|
76960
|
+
* @method
|
|
76961
|
+
* @name blofin#fetchLedger
|
|
76962
|
+
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
76963
|
+
* @see https://blofin.com/docs#get-funds-transfer-history
|
|
76964
|
+
* @param {string} code unified currency code, default is undefined
|
|
76965
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
76966
|
+
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
76967
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
76968
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
76969
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
76970
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
76971
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
76972
|
+
*/
|
|
76973
|
+
await this.loadMarkets();
|
|
76974
|
+
let paginate = false;
|
|
76975
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
76976
|
+
if (paginate) {
|
|
76977
|
+
return await this.fetchPaginatedCallDynamic('fetchLedger', code, since, limit, params);
|
|
76978
|
+
}
|
|
76979
|
+
let request = {};
|
|
76980
|
+
if (limit !== undefined) {
|
|
76981
|
+
request['limit'] = limit;
|
|
76982
|
+
}
|
|
76983
|
+
let currency = undefined;
|
|
76984
|
+
if (code !== undefined) {
|
|
76985
|
+
currency = this.currency(code);
|
|
76986
|
+
request['currency'] = currency['id'];
|
|
76987
|
+
}
|
|
76988
|
+
[request, params] = this.handleUntilOption('end', request, params);
|
|
76989
|
+
let response = undefined;
|
|
76990
|
+
response = await this.privateGetAssetBills(this.extend(request, params));
|
|
76991
|
+
const data = this.safeList(response, 'data', []);
|
|
76992
|
+
return this.parseLedger(data, currency, since, limit);
|
|
76993
|
+
}
|
|
76994
|
+
parseTransaction(transaction, currency = undefined) {
|
|
76995
|
+
//
|
|
76996
|
+
//
|
|
76997
|
+
// fetchDeposits
|
|
76998
|
+
//
|
|
76999
|
+
// {
|
|
77000
|
+
// "currency": "USDT",
|
|
77001
|
+
// "chain": "TRC20",
|
|
77002
|
+
// "address": "TGfJLtnsh3B9EqekFEBZ1nR14QanBUf5Bi",
|
|
77003
|
+
// "txId": "892f4e0c32268b29b2e541ef30d32a30bbf10f902adcc4b1428319ed7c3758fd",
|
|
77004
|
+
// "type": "0",
|
|
77005
|
+
// "amount": "86.975843",
|
|
77006
|
+
// "state": "1",
|
|
77007
|
+
// "ts": "1703163304153",
|
|
77008
|
+
// "tag": null,
|
|
77009
|
+
// "confirm": "16",
|
|
77010
|
+
// "depositId": "36c8e2a7ea184a219de72215a696acaf"
|
|
77011
|
+
// }
|
|
77012
|
+
// fetchWithdrawals
|
|
77013
|
+
// {
|
|
77014
|
+
// "currency": "USDT",
|
|
77015
|
+
// "chain": "TRC20",
|
|
77016
|
+
// "address": "TYgB3sVXHPEDQUu288EG1uMFh9Pk2swLgW",
|
|
77017
|
+
// "txId": "1fd5ac52df414d7ea66194cadd9a5b4d2422c2b9720037f66d98207f9858fd96",
|
|
77018
|
+
// "type": "0",
|
|
77019
|
+
// "amount": "9",
|
|
77020
|
+
// "fee": "1",
|
|
77021
|
+
// "feeCurrency": "USDT",
|
|
77022
|
+
// "state": "3",
|
|
77023
|
+
// "clientId": null,
|
|
77024
|
+
// "ts": "1707217439351",
|
|
77025
|
+
// "tag": null,
|
|
77026
|
+
// "memo": null,
|
|
77027
|
+
// "withdrawId": "e0768698cfdf4aee8e54654c3775914b"
|
|
77028
|
+
// }
|
|
77029
|
+
//
|
|
77030
|
+
let type = undefined;
|
|
77031
|
+
let id = undefined;
|
|
77032
|
+
const withdrawalId = this.safeString(transaction, 'withdrawId');
|
|
77033
|
+
const depositId = this.safeString(transaction, 'depositId');
|
|
77034
|
+
const addressTo = this.safeString(transaction, 'address');
|
|
77035
|
+
const address = addressTo;
|
|
77036
|
+
const tagTo = this.safeString(transaction, 'tag');
|
|
77037
|
+
if (withdrawalId !== undefined) {
|
|
77038
|
+
type = 'withdrawal';
|
|
77039
|
+
id = withdrawalId;
|
|
77040
|
+
}
|
|
77041
|
+
else {
|
|
77042
|
+
id = depositId;
|
|
77043
|
+
type = 'deposit';
|
|
77044
|
+
}
|
|
77045
|
+
const currencyId = this.safeString(transaction, 'currency');
|
|
77046
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
77047
|
+
const amount = this.safeNumber(transaction, 'amount');
|
|
77048
|
+
const status = this.parseTransactionStatus(this.safeString(transaction, 'state'));
|
|
77049
|
+
const txid = this.safeString(transaction, 'txId');
|
|
77050
|
+
const timestamp = this.safeInteger(transaction, 'ts');
|
|
77051
|
+
const feeCurrencyId = this.safeString(transaction, 'feeCurrency');
|
|
77052
|
+
const feeCode = this.safeCurrencyCode(feeCurrencyId);
|
|
77053
|
+
const feeCost = this.safeNumber(transaction, 'fee');
|
|
77054
|
+
return {
|
|
77055
|
+
'info': transaction,
|
|
77056
|
+
'id': id,
|
|
77057
|
+
'currency': code,
|
|
77058
|
+
'amount': amount,
|
|
77059
|
+
'network': undefined,
|
|
77060
|
+
'addressFrom': undefined,
|
|
77061
|
+
'addressTo': addressTo,
|
|
77062
|
+
'address': address,
|
|
77063
|
+
'tagFrom': undefined,
|
|
77064
|
+
'tagTo': tagTo,
|
|
77065
|
+
'tag': tagTo,
|
|
77066
|
+
'status': status,
|
|
77067
|
+
'type': type,
|
|
77068
|
+
'updated': undefined,
|
|
77069
|
+
'txid': txid,
|
|
77070
|
+
'timestamp': timestamp,
|
|
77071
|
+
'datetime': this.iso8601(timestamp),
|
|
77072
|
+
'internal': undefined,
|
|
77073
|
+
'comment': undefined,
|
|
77074
|
+
'fee': {
|
|
77075
|
+
'currency': feeCode,
|
|
77076
|
+
'cost': feeCost,
|
|
77077
|
+
},
|
|
77078
|
+
};
|
|
77079
|
+
}
|
|
77080
|
+
parseTransactionStatus(status) {
|
|
77081
|
+
const statuses = {
|
|
77082
|
+
'0': 'pending',
|
|
77083
|
+
'1': 'ok',
|
|
77084
|
+
'2': 'failed',
|
|
77085
|
+
'3': 'pending',
|
|
77086
|
+
};
|
|
77087
|
+
return this.safeString(statuses, status, status);
|
|
77088
|
+
}
|
|
77089
|
+
parseLedgerEntryType(type) {
|
|
77090
|
+
const types = {
|
|
77091
|
+
'1': 'transfer',
|
|
77092
|
+
'2': 'trade',
|
|
77093
|
+
'3': 'trade',
|
|
77094
|
+
'4': 'rebate',
|
|
77095
|
+
'5': 'trade',
|
|
77096
|
+
'6': 'transfer',
|
|
77097
|
+
'7': 'trade',
|
|
77098
|
+
'8': 'fee',
|
|
77099
|
+
'9': 'trade',
|
|
77100
|
+
'10': 'trade',
|
|
77101
|
+
'11': 'trade', // system token conversion
|
|
77102
|
+
};
|
|
77103
|
+
return this.safeString(types, type, type);
|
|
77104
|
+
}
|
|
77105
|
+
parseLedgerEntry(item, currency = undefined) {
|
|
77106
|
+
const id = this.safeString(item, 'transferId');
|
|
77107
|
+
const referenceId = this.safeString(item, 'clientId');
|
|
77108
|
+
const fromAccount = this.safeString(item, 'fromAccount');
|
|
77109
|
+
const toAccount = this.safeString(item, 'toAccount');
|
|
77110
|
+
const type = this.parseLedgerEntryType(this.safeString(item, 'type'));
|
|
77111
|
+
const code = this.safeCurrencyCode(this.safeString(item, 'currency'), currency);
|
|
77112
|
+
const amountString = this.safeString(item, 'amount');
|
|
77113
|
+
const amount = this.parseNumber(amountString);
|
|
77114
|
+
const timestamp = this.safeInteger(item, 'ts');
|
|
77115
|
+
const status = 'ok';
|
|
77116
|
+
return {
|
|
77117
|
+
'id': id,
|
|
77118
|
+
'info': item,
|
|
77119
|
+
'timestamp': timestamp,
|
|
77120
|
+
'datetime': this.iso8601(timestamp),
|
|
77121
|
+
'fromAccount': fromAccount,
|
|
77122
|
+
'toAccount': toAccount,
|
|
77123
|
+
'type': type,
|
|
77124
|
+
'currency': code,
|
|
77125
|
+
'amount': amount,
|
|
77126
|
+
'clientId': referenceId,
|
|
77127
|
+
'status': status,
|
|
77128
|
+
};
|
|
77129
|
+
}
|
|
77130
|
+
parseIds(ids) {
|
|
77131
|
+
/**
|
|
77132
|
+
* @ignore
|
|
77133
|
+
* @method
|
|
77134
|
+
* @name blofin#parseIds
|
|
77135
|
+
* @param {string[]|string} ids order ids
|
|
77136
|
+
* @returns {string[]} list of order ids
|
|
77137
|
+
*/
|
|
77138
|
+
if (typeof ids === 'string') {
|
|
77139
|
+
return ids.split(',');
|
|
77140
|
+
}
|
|
77141
|
+
else {
|
|
77142
|
+
return ids;
|
|
77143
|
+
}
|
|
77144
|
+
}
|
|
77145
|
+
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
77146
|
+
/**
|
|
77147
|
+
* @method
|
|
77148
|
+
* @name blofin#cancelOrders
|
|
77149
|
+
* @description cancel multiple orders
|
|
77150
|
+
* @see https://blofin.com/docs#cancel-multiple-orders
|
|
77151
|
+
* @param {string[]} ids order ids
|
|
77152
|
+
* @param {string} symbol unified market symbol
|
|
77153
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
77154
|
+
* @param {boolean} [params.trigger] whether the order is a stop/trigger order
|
|
77155
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
77156
|
+
*/
|
|
77157
|
+
// TODO : the original endpoint signature differs, according to that you can skip individual symbol and assign ids in batch. At this moment, `params` is not being used too.
|
|
77158
|
+
if (symbol === undefined) {
|
|
77159
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
77160
|
+
}
|
|
77161
|
+
await this.loadMarkets();
|
|
77162
|
+
const market = this.market(symbol);
|
|
77163
|
+
const request = [];
|
|
77164
|
+
const options = this.safeValue(this.options, 'cancelOrders', {});
|
|
77165
|
+
const defaultMethod = this.safeString(options, 'method', 'privatePostTradeCancelBatchOrders');
|
|
77166
|
+
let method = this.safeString(params, 'method', defaultMethod);
|
|
77167
|
+
const clientOrderIds = this.parseIds(this.safeValue(params, 'clientOrderId'));
|
|
77168
|
+
const tpslIds = this.parseIds(this.safeValue(params, 'tpslId'));
|
|
77169
|
+
const stop = this.safeBoolN(params, ['stop', 'trigger', 'tpsl']);
|
|
77170
|
+
if (stop) {
|
|
77171
|
+
method = 'privatePostTradeCancelTpsl';
|
|
77172
|
+
}
|
|
77173
|
+
if (clientOrderIds === undefined) {
|
|
77174
|
+
ids = this.parseIds(ids);
|
|
77175
|
+
if (tpslIds !== undefined) {
|
|
77176
|
+
for (let i = 0; i < tpslIds.length; i++) {
|
|
77177
|
+
request.push({
|
|
77178
|
+
'tpslId': tpslIds[i],
|
|
77179
|
+
'instId': market['id'],
|
|
77180
|
+
});
|
|
77181
|
+
}
|
|
77182
|
+
}
|
|
77183
|
+
for (let i = 0; i < ids.length; i++) {
|
|
77184
|
+
if (stop) {
|
|
77185
|
+
request.push({
|
|
77186
|
+
'tpslId': ids[i],
|
|
77187
|
+
'instId': market['id'],
|
|
77188
|
+
});
|
|
77189
|
+
}
|
|
77190
|
+
else {
|
|
77191
|
+
request.push({
|
|
77192
|
+
'orderId': ids[i],
|
|
77193
|
+
'instId': market['id'],
|
|
77194
|
+
});
|
|
77195
|
+
}
|
|
77196
|
+
}
|
|
77197
|
+
}
|
|
77198
|
+
else {
|
|
77199
|
+
for (let i = 0; i < clientOrderIds.length; i++) {
|
|
77200
|
+
request.push({
|
|
77201
|
+
'instId': market['id'],
|
|
77202
|
+
'clientOrderId': clientOrderIds[i],
|
|
77203
|
+
});
|
|
77204
|
+
}
|
|
77205
|
+
}
|
|
77206
|
+
let response = undefined;
|
|
77207
|
+
if (method === 'privatePostTradeCancelTpsl') {
|
|
77208
|
+
response = await this.privatePostTradeCancelTpsl(request); // * dont extend with params, otherwise ARRAY will be turned into OBJECT
|
|
77209
|
+
}
|
|
77210
|
+
else {
|
|
77211
|
+
response = await this.privatePostTradeCancelBatchOrders(request); // * dont extend with params, otherwise ARRAY will be turned into OBJECT
|
|
77212
|
+
}
|
|
77213
|
+
const ordersData = this.safeList(response, 'data', []);
|
|
77214
|
+
return this.parseOrders(ordersData, market, undefined, undefined, params);
|
|
77215
|
+
}
|
|
77216
|
+
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
77217
|
+
/**
|
|
77218
|
+
* @method
|
|
77219
|
+
* @name blofin#transfer
|
|
77220
|
+
* @description transfer currency internally between wallets on the same account
|
|
77221
|
+
* @see https://blofin.com/docs#funds-transfer
|
|
77222
|
+
* @param {string} code unified currency code
|
|
77223
|
+
* @param {float} amount amount to transfer
|
|
77224
|
+
* @param {string} fromAccount account to transfer from (funding, swap, copy_trading, earn)
|
|
77225
|
+
* @param {string} toAccount account to transfer to (funding, swap, copy_trading, earn)
|
|
77226
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
77227
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
77228
|
+
*/
|
|
77229
|
+
await this.loadMarkets();
|
|
77230
|
+
const currency = this.currency(code);
|
|
77231
|
+
const accountsByType = this.safeValue(this.options, 'accountsByType', {});
|
|
77232
|
+
const fromId = this.safeString(accountsByType, fromAccount, fromAccount);
|
|
77233
|
+
const toId = this.safeString(accountsByType, toAccount, toAccount);
|
|
77234
|
+
const request = {
|
|
77235
|
+
'currency': currency['id'],
|
|
77236
|
+
'amount': this.currencyToPrecision(code, amount),
|
|
77237
|
+
'fromAccount': fromId,
|
|
77238
|
+
'toAccount': toId,
|
|
77239
|
+
};
|
|
77240
|
+
const response = await this.privatePostAssetTransfer(this.extend(request, params));
|
|
77241
|
+
const data = this.safeDict(response, 'data', {});
|
|
77242
|
+
return this.parseTransfer(data, currency);
|
|
77243
|
+
}
|
|
77244
|
+
parseTransfer(transfer, currency = undefined) {
|
|
77245
|
+
const id = this.safeString(transfer, 'transferId');
|
|
77246
|
+
return {
|
|
77247
|
+
'info': transfer,
|
|
77248
|
+
'id': id,
|
|
77249
|
+
'timestamp': undefined,
|
|
77250
|
+
'datetime': undefined,
|
|
77251
|
+
'currency': undefined,
|
|
77252
|
+
'amount': undefined,
|
|
77253
|
+
'fromAccount': undefined,
|
|
77254
|
+
'toAccount': undefined,
|
|
77255
|
+
'status': undefined,
|
|
77256
|
+
};
|
|
77257
|
+
}
|
|
77258
|
+
async fetchPosition(symbol, params = {}) {
|
|
77259
|
+
/**
|
|
77260
|
+
* @method
|
|
77261
|
+
* @name blofin#fetchPosition
|
|
77262
|
+
* @description fetch data on a single open contract trade position
|
|
77263
|
+
* @see https://blofin.com/docs#get-positions
|
|
77264
|
+
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
77265
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
77266
|
+
* @param {string} [params.instType] MARGIN, SWAP, FUTURES, OPTION
|
|
77267
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
77268
|
+
*/
|
|
77269
|
+
await this.loadMarkets();
|
|
77270
|
+
const market = this.market(symbol);
|
|
77271
|
+
const request = {
|
|
77272
|
+
'instId': market['id'],
|
|
77273
|
+
};
|
|
77274
|
+
const response = await this.privateGetAccountPositions(this.extend(request, params));
|
|
77275
|
+
const data = this.safeList(response, 'data', []);
|
|
77276
|
+
const position = this.safeDict(data, 0);
|
|
77277
|
+
if (position === undefined) {
|
|
77278
|
+
return undefined;
|
|
77279
|
+
}
|
|
77280
|
+
return this.parsePosition(position, market);
|
|
77281
|
+
}
|
|
77282
|
+
async fetchPositions(symbols = undefined, params = {}) {
|
|
77283
|
+
/**
|
|
77284
|
+
* @method
|
|
77285
|
+
* @name blofin#fetchPosition
|
|
77286
|
+
* @description fetch data on a single open contract trade position
|
|
77287
|
+
* @see https://blofin.com/docs#get-positions
|
|
77288
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
77289
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
77290
|
+
* @param {string} [params.instType] MARGIN, SWAP, FUTURES, OPTION
|
|
77291
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
77292
|
+
*/
|
|
77293
|
+
await this.loadMarkets();
|
|
77294
|
+
symbols = this.marketSymbols(symbols);
|
|
77295
|
+
const response = await this.privateGetAccountPositions(params);
|
|
77296
|
+
const data = this.safeList(response, 'data', []);
|
|
77297
|
+
const result = this.parsePositions(data);
|
|
77298
|
+
return this.filterByArrayPositions(result, 'symbol', symbols, false);
|
|
77299
|
+
}
|
|
77300
|
+
parsePosition(position, market = undefined) {
|
|
77301
|
+
const marketId = this.safeString(position, 'instId');
|
|
77302
|
+
market = this.safeMarket(marketId, market);
|
|
77303
|
+
const symbol = market['symbol'];
|
|
77304
|
+
const pos = this.safeString(position, 'positions');
|
|
77305
|
+
const contractsAbs = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAbs(pos);
|
|
77306
|
+
let side = this.safeString(position, 'positionSide');
|
|
77307
|
+
const hedged = side !== 'net';
|
|
77308
|
+
const contracts = this.parseNumber(contractsAbs);
|
|
77309
|
+
if (pos !== undefined) {
|
|
77310
|
+
if (side === 'net') {
|
|
77311
|
+
if (_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringGt(pos, '0')) {
|
|
77312
|
+
side = 'long';
|
|
77313
|
+
}
|
|
77314
|
+
else if (_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringLt(pos, '0')) {
|
|
77315
|
+
side = 'short';
|
|
77316
|
+
}
|
|
77317
|
+
else {
|
|
77318
|
+
side = undefined;
|
|
77319
|
+
}
|
|
77320
|
+
}
|
|
77321
|
+
}
|
|
77322
|
+
const contractSize = this.safeNumber(market, 'contractSize');
|
|
77323
|
+
const contractSizeString = this.numberToString(contractSize);
|
|
77324
|
+
const markPriceString = this.safeString(position, 'markPrice');
|
|
77325
|
+
let notionalString = this.safeString(position, 'notionalUsd');
|
|
77326
|
+
if (market['inverse']) {
|
|
77327
|
+
notionalString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(contractsAbs, contractSizeString), markPriceString);
|
|
77328
|
+
}
|
|
77329
|
+
const notional = this.parseNumber(notionalString);
|
|
77330
|
+
const marginMode = this.safeString(position, 'marginMode');
|
|
77331
|
+
let initialMarginString = undefined;
|
|
77332
|
+
const entryPriceString = this.safeString(position, 'averagePrice');
|
|
77333
|
+
const unrealizedPnlString = this.safeString(position, 'unrealizedPnl');
|
|
77334
|
+
const leverageString = this.safeString(position, 'leverage');
|
|
77335
|
+
let initialMarginPercentage = undefined;
|
|
77336
|
+
let collateralString = undefined;
|
|
77337
|
+
if (marginMode === 'cross') {
|
|
77338
|
+
initialMarginString = this.safeString(position, 'initialMargin');
|
|
77339
|
+
collateralString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAdd(initialMarginString, unrealizedPnlString);
|
|
77340
|
+
}
|
|
77341
|
+
else if (marginMode === 'isolated') {
|
|
77342
|
+
initialMarginPercentage = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv('1', leverageString);
|
|
77343
|
+
collateralString = this.safeString(position, 'margin');
|
|
77344
|
+
}
|
|
77345
|
+
const maintenanceMarginString = this.safeString(position, 'maintenanceMargin');
|
|
77346
|
+
const maintenanceMargin = this.parseNumber(maintenanceMarginString);
|
|
77347
|
+
const maintenanceMarginPercentageString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(maintenanceMarginString, notionalString);
|
|
77348
|
+
if (initialMarginPercentage === undefined) {
|
|
77349
|
+
initialMarginPercentage = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(initialMarginString, notionalString, 4));
|
|
77350
|
+
}
|
|
77351
|
+
else if (initialMarginString === undefined) {
|
|
77352
|
+
initialMarginString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(initialMarginPercentage, notionalString);
|
|
77353
|
+
}
|
|
77354
|
+
const rounder = '0.00005'; // round to closest 0.01%
|
|
77355
|
+
const maintenanceMarginPercentage = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAdd(maintenanceMarginPercentageString, rounder), '1', 4));
|
|
77356
|
+
const liquidationPrice = this.safeNumber(position, 'liquidationPrice');
|
|
77357
|
+
const percentageString = this.safeString(position, 'unrealizedPnlRatio');
|
|
77358
|
+
const percentage = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(percentageString, '100'));
|
|
77359
|
+
const timestamp = this.safeInteger(position, 'updateTime');
|
|
77360
|
+
const marginRatio = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(maintenanceMarginString, collateralString, 4));
|
|
77361
|
+
return this.safePosition({
|
|
77362
|
+
'info': position,
|
|
77363
|
+
'id': undefined,
|
|
77364
|
+
'symbol': symbol,
|
|
77365
|
+
'notional': notional,
|
|
77366
|
+
'marginMode': marginMode,
|
|
77367
|
+
'liquidationPrice': liquidationPrice,
|
|
77368
|
+
'entryPrice': this.parseNumber(entryPriceString),
|
|
77369
|
+
'unrealizedPnl': this.parseNumber(unrealizedPnlString),
|
|
77370
|
+
'percentage': percentage,
|
|
77371
|
+
'contracts': contracts,
|
|
77372
|
+
'contractSize': contractSize,
|
|
77373
|
+
'markPrice': this.parseNumber(markPriceString),
|
|
77374
|
+
'lastPrice': undefined,
|
|
77375
|
+
'side': side,
|
|
77376
|
+
'hedged': hedged,
|
|
77377
|
+
'timestamp': timestamp,
|
|
77378
|
+
'datetime': this.iso8601(timestamp),
|
|
77379
|
+
'lastUpdateTimestamp': undefined,
|
|
77380
|
+
'maintenanceMargin': maintenanceMargin,
|
|
77381
|
+
'maintenanceMarginPercentage': maintenanceMarginPercentage,
|
|
77382
|
+
'collateral': this.parseNumber(collateralString),
|
|
77383
|
+
'initialMargin': this.parseNumber(initialMarginString),
|
|
77384
|
+
'initialMarginPercentage': this.parseNumber(initialMarginPercentage),
|
|
77385
|
+
'leverage': this.parseNumber(leverageString),
|
|
77386
|
+
'marginRatio': marginRatio,
|
|
77387
|
+
'stopLossPrice': undefined,
|
|
77388
|
+
'takeProfitPrice': undefined,
|
|
77389
|
+
});
|
|
77390
|
+
}
|
|
77391
|
+
async fetchLeverage(symbol, params = {}) {
|
|
77392
|
+
/**
|
|
77393
|
+
* @method
|
|
77394
|
+
* @name blofin#fetchLeverage
|
|
77395
|
+
* @description fetch the set leverage for a market
|
|
77396
|
+
* @see https://blofin.com/docs#set-leverage
|
|
77397
|
+
* @param {string} symbol unified market symbol
|
|
77398
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
77399
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
77400
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
77401
|
+
*/
|
|
77402
|
+
await this.loadMarkets();
|
|
77403
|
+
let marginMode = undefined;
|
|
77404
|
+
[marginMode, params] = this.handleMarginModeAndParams('fetchLeverage', params);
|
|
77405
|
+
if (marginMode === undefined) {
|
|
77406
|
+
marginMode = this.safeString(params, 'marginMode', 'cross'); // cross as default marginMode
|
|
77407
|
+
}
|
|
77408
|
+
if ((marginMode !== 'cross') && (marginMode !== 'isolated')) {
|
|
77409
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' fetchLeverage() requires a marginMode parameter that must be either cross or isolated');
|
|
77410
|
+
}
|
|
77411
|
+
const market = this.market(symbol);
|
|
77412
|
+
const request = {
|
|
77413
|
+
'instId': market['id'],
|
|
77414
|
+
'marginMode': marginMode,
|
|
77415
|
+
};
|
|
77416
|
+
const response = await this.privateGetAccountLeverageInfo(this.extend(request, params));
|
|
77417
|
+
return response;
|
|
77418
|
+
}
|
|
77419
|
+
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
77420
|
+
/**
|
|
77421
|
+
* @method
|
|
77422
|
+
* @name blofin#setLeverage
|
|
77423
|
+
* @description set the level of leverage for a market
|
|
77424
|
+
* @see https://blofin.com/docs#set-leverage
|
|
77425
|
+
* @param {int} leverage the rate of leverage
|
|
77426
|
+
* @param {string} symbol unified market symbol
|
|
77427
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
77428
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
77429
|
+
* @returns {object} response from the exchange
|
|
77430
|
+
*/
|
|
77431
|
+
if (symbol === undefined) {
|
|
77432
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
77433
|
+
}
|
|
77434
|
+
// WARNING: THIS WILL INCREASE LIQUIDATION PRICE FOR OPEN ISOLATED LONG POSITIONS
|
|
77435
|
+
// AND DECREASE LIQUIDATION PRICE FOR OPEN ISOLATED SHORT POSITIONS
|
|
77436
|
+
if ((leverage < 1) || (leverage > 125)) {
|
|
77437
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' setLeverage() leverage should be between 1 and 125');
|
|
77438
|
+
}
|
|
77439
|
+
await this.loadMarkets();
|
|
77440
|
+
const market = this.market(symbol);
|
|
77441
|
+
let marginMode = undefined;
|
|
77442
|
+
[marginMode, params] = this.handleMarginModeAndParams('setLeverage', params, 'cross');
|
|
77443
|
+
if ((marginMode !== 'cross') && (marginMode !== 'isolated')) {
|
|
77444
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest(this.id + ' setLeverage() requires a marginMode parameter that must be either cross or isolated');
|
|
77445
|
+
}
|
|
77446
|
+
const request = {
|
|
77447
|
+
'leverage': leverage,
|
|
77448
|
+
'marginMode': marginMode,
|
|
77449
|
+
'instId': market['id'],
|
|
77450
|
+
};
|
|
77451
|
+
const response = await this.privatePostAccountSetLeverage(this.extend(request, params));
|
|
77452
|
+
return response;
|
|
77453
|
+
}
|
|
77454
|
+
async closePosition(symbol, side = undefined, params = {}) {
|
|
77455
|
+
/**
|
|
77456
|
+
* @method
|
|
77457
|
+
* @name blofin#closePosition
|
|
77458
|
+
* @description closes open positions for a market
|
|
77459
|
+
* @see https://blofin.com/docs#close-positions
|
|
77460
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
77461
|
+
* @param {string} [side] 'buy' or 'sell', leave as undefined in net mode
|
|
77462
|
+
* @param {object} [params] extra parameters specific to the blofin api endpoint
|
|
77463
|
+
* @param {string} [params.clientOrderId] a unique identifier for the order
|
|
77464
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross;
|
|
77465
|
+
* @param {string} [params.code] *required in the case of closing cross MARGIN position for Single-currency margin* margin currency
|
|
77466
|
+
*
|
|
77467
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
77468
|
+
* @param {boolean} [params.autoCxl] whether any pending orders for closing out needs to be automatically canceled when close position via a market order. false or true, the default is false
|
|
77469
|
+
* @param {string} [params.tag] order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters
|
|
77470
|
+
* @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
77471
|
+
*/
|
|
77472
|
+
await this.loadMarkets();
|
|
77473
|
+
const market = this.market(symbol);
|
|
77474
|
+
const clientOrderId = this.safeString(params, 'clientOrderId');
|
|
77475
|
+
let marginMode = undefined;
|
|
77476
|
+
[marginMode, params] = this.handleMarginModeAndParams('closePosition', params, 'cross');
|
|
77477
|
+
const request = {
|
|
77478
|
+
'instId': market['id'],
|
|
77479
|
+
'marginMode': marginMode,
|
|
77480
|
+
};
|
|
77481
|
+
if (clientOrderId !== undefined) {
|
|
77482
|
+
request['clientOrderId'] = clientOrderId;
|
|
77483
|
+
}
|
|
77484
|
+
const response = await this.privatePostTradeClosePosition(this.extend(request, params));
|
|
77485
|
+
return this.safeValue(response, 'data');
|
|
77486
|
+
}
|
|
77487
|
+
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
77488
|
+
/**
|
|
77489
|
+
* @method
|
|
77490
|
+
* @name blofin#fetchClosedOrders
|
|
77491
|
+
* @description fetches information on multiple closed orders made by the user
|
|
77492
|
+
* @see https://blofin.com/docs#get-order-history
|
|
77493
|
+
* @see https://blofin.com/docs#get-tpsl-order-history
|
|
77494
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
77495
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
77496
|
+
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
77497
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
77498
|
+
* @param {bool} [params.stop] True if fetching trigger or conditional orders
|
|
77499
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
77500
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
77501
|
+
*/
|
|
77502
|
+
await this.loadMarkets();
|
|
77503
|
+
let paginate = false;
|
|
77504
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchClosedOrders', 'paginate');
|
|
77505
|
+
if (paginate) {
|
|
77506
|
+
return await this.fetchPaginatedCallDynamic('fetchClosedOrders', symbol, since, limit, params);
|
|
77507
|
+
}
|
|
77508
|
+
const request = {};
|
|
77509
|
+
let market = undefined;
|
|
77510
|
+
if (symbol !== undefined) {
|
|
77511
|
+
market = this.market(symbol);
|
|
77512
|
+
request['instId'] = market['id'];
|
|
77513
|
+
}
|
|
77514
|
+
if (limit !== undefined) {
|
|
77515
|
+
request['limit'] = limit; // default 100, max 100
|
|
77516
|
+
}
|
|
77517
|
+
if (since !== undefined) {
|
|
77518
|
+
request['begin'] = since;
|
|
77519
|
+
}
|
|
77520
|
+
const isStop = this.safeValueN(params, ['stop', 'trigger', 'tpsl', 'TPSL'], false);
|
|
77521
|
+
let method = undefined;
|
|
77522
|
+
[method, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'method', 'privateGetTradeOrdersHistory');
|
|
77523
|
+
const query = this.omit(params, ['method', 'stop', 'trigger', 'tpsl', 'TPSL']);
|
|
77524
|
+
let response = undefined;
|
|
77525
|
+
if ((isStop) || (method === 'privateGetTradeOrdersTpslHistory')) {
|
|
77526
|
+
response = await this.privateGetTradeOrdersTpslHistory(this.extend(request, query));
|
|
77527
|
+
}
|
|
77528
|
+
else {
|
|
77529
|
+
response = await this.privateGetTradeOrdersHistory(this.extend(request, query));
|
|
77530
|
+
}
|
|
77531
|
+
const data = this.safeList(response, 'data', []);
|
|
77532
|
+
return this.parseOrders(data, market, since, limit);
|
|
77533
|
+
}
|
|
77534
|
+
handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {
|
|
77535
|
+
if (response === undefined) {
|
|
77536
|
+
return undefined; // fallback to default error handler
|
|
77537
|
+
}
|
|
77538
|
+
//
|
|
77539
|
+
// {"code":"152002","msg":"Parameter bar error."}
|
|
77540
|
+
//
|
|
77541
|
+
const code = this.safeString(response, 'code');
|
|
77542
|
+
const message = this.safeString(response, 'msg');
|
|
77543
|
+
const feedback = this.id + ' ' + body;
|
|
77544
|
+
if (code !== undefined && code !== '0') {
|
|
77545
|
+
this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);
|
|
77546
|
+
this.throwExactlyMatchedException(this.exceptions['exact'], code, feedback);
|
|
77547
|
+
this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);
|
|
77548
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError(feedback); // unknown message
|
|
77549
|
+
}
|
|
77550
|
+
//
|
|
77551
|
+
// {
|
|
77552
|
+
// orderId: null,
|
|
77553
|
+
// clientOrderId: '',
|
|
77554
|
+
// msg: 'Order failed. Insufficient USDT margin in account',
|
|
77555
|
+
// code: '103003'
|
|
77556
|
+
// }
|
|
77557
|
+
//
|
|
77558
|
+
const data = this.safeList(response, 'data');
|
|
77559
|
+
const first = this.safeDict(data, 0);
|
|
77560
|
+
const insideMsg = this.safeString(first, 'msg');
|
|
77561
|
+
const insideCode = this.safeString(first, 'code');
|
|
77562
|
+
if (insideCode !== undefined && insideCode !== '0') {
|
|
77563
|
+
this.throwExactlyMatchedException(this.exceptions['exact'], insideCode, feedback);
|
|
77564
|
+
this.throwExactlyMatchedException(this.exceptions['exact'], insideMsg, feedback);
|
|
77565
|
+
this.throwBroadlyMatchedException(this.exceptions['broad'], insideMsg, feedback);
|
|
77566
|
+
}
|
|
77567
|
+
return undefined;
|
|
77568
|
+
}
|
|
77569
|
+
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
77570
|
+
let request = '/api/' + this.version + '/' + this.implodeParams(path, params);
|
|
77571
|
+
const query = this.omit(params, this.extractParams(path));
|
|
77572
|
+
let url = this.implodeHostname(this.urls['api']['rest']) + request;
|
|
77573
|
+
// const type = this.getPathAuthenticationType (path);
|
|
77574
|
+
if (api === 'public') {
|
|
77575
|
+
if (!this.isEmpty(query)) {
|
|
77576
|
+
url += '?' + this.urlencode(query);
|
|
77577
|
+
}
|
|
77578
|
+
}
|
|
77579
|
+
else if (api === 'private') {
|
|
77580
|
+
this.checkRequiredCredentials();
|
|
77581
|
+
const timestamp = this.milliseconds().toString();
|
|
77582
|
+
headers = {
|
|
77583
|
+
'ACCESS-KEY': this.apiKey,
|
|
77584
|
+
'ACCESS-PASSPHRASE': this.password,
|
|
77585
|
+
'ACCESS-TIMESTAMP': timestamp,
|
|
77586
|
+
'ACCESS-NONCE': timestamp,
|
|
77587
|
+
};
|
|
77588
|
+
let sign_body = '';
|
|
77589
|
+
if (method === 'GET') {
|
|
77590
|
+
if (!this.isEmpty(query)) {
|
|
77591
|
+
const urlencodedQuery = '?' + this.urlencode(query);
|
|
77592
|
+
url += urlencodedQuery;
|
|
77593
|
+
request += urlencodedQuery;
|
|
77594
|
+
}
|
|
77595
|
+
}
|
|
77596
|
+
else {
|
|
77597
|
+
if (!this.isEmpty(query)) {
|
|
77598
|
+
body = this.json(query);
|
|
77599
|
+
sign_body = body;
|
|
77600
|
+
}
|
|
77601
|
+
headers['Content-Type'] = 'application/json';
|
|
77602
|
+
}
|
|
77603
|
+
const auth = request + method + timestamp + timestamp + sign_body;
|
|
77604
|
+
const signature = this.stringToBase64(this.hmac(this.encode(auth), this.encode(this.secret), _static_dependencies_noble_hashes_sha256_js__WEBPACK_IMPORTED_MODULE_4__/* .sha256 */ .J));
|
|
77605
|
+
headers['ACCESS-SIGN'] = signature;
|
|
77606
|
+
}
|
|
77607
|
+
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
|
77608
|
+
}
|
|
77609
|
+
}
|
|
77610
|
+
|
|
77611
|
+
|
|
75382
77612
|
/***/ }),
|
|
75383
77613
|
|
|
75384
77614
|
/***/ 6246:
|
|
@@ -82830,10 +85060,22 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
82830
85060
|
if (isStopLoss) {
|
|
82831
85061
|
const slTriggerPrice = this.safeValue2(stopLoss, 'triggerPrice', 'stopPrice', stopLoss);
|
|
82832
85062
|
request['stopLoss'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
85063
|
+
const slLimitPrice = this.safeValue(stopLoss, 'price');
|
|
85064
|
+
if (slLimitPrice !== undefined) {
|
|
85065
|
+
request['tpslMode'] = 'Partial';
|
|
85066
|
+
request['slOrderType'] = 'Limit';
|
|
85067
|
+
request['slLimitPrice'] = this.priceToPrecision(symbol, slLimitPrice);
|
|
85068
|
+
}
|
|
82833
85069
|
}
|
|
82834
85070
|
if (isTakeProfit) {
|
|
82835
85071
|
const tpTriggerPrice = this.safeValue2(takeProfit, 'triggerPrice', 'stopPrice', takeProfit);
|
|
82836
85072
|
request['takeProfit'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
85073
|
+
const tpLimitPrice = this.safeValue(takeProfit, 'price');
|
|
85074
|
+
if (tpLimitPrice !== undefined) {
|
|
85075
|
+
request['tpslMode'] = 'Partial';
|
|
85076
|
+
request['tpOrderType'] = 'Limit';
|
|
85077
|
+
request['tpLimitPrice'] = this.priceToPrecision(symbol, tpLimitPrice);
|
|
85078
|
+
}
|
|
82837
85079
|
}
|
|
82838
85080
|
}
|
|
82839
85081
|
if (market['spot']) {
|
|
@@ -85115,9 +87357,6 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
85115
87357
|
if (timestamp === undefined) {
|
|
85116
87358
|
timestamp = this.safeIntegerN(position, ['updatedTime', 'updatedAt']);
|
|
85117
87359
|
}
|
|
85118
|
-
// default to cross of USDC margined positions
|
|
85119
|
-
const tradeMode = this.safeInteger(position, 'tradeMode', 0);
|
|
85120
|
-
const marginMode = tradeMode ? 'isolated' : 'cross';
|
|
85121
87360
|
let collateralString = this.safeString(position, 'positionBalance');
|
|
85122
87361
|
const entryPrice = this.omitZero(this.safeString2(position, 'entryPrice', 'avgPrice'));
|
|
85123
87362
|
const liquidationPrice = this.omitZero(this.safeString(position, 'liqPrice'));
|
|
@@ -85181,7 +87420,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
85181
87420
|
'markPrice': this.safeNumber(position, 'markPrice'),
|
|
85182
87421
|
'lastPrice': undefined,
|
|
85183
87422
|
'collateral': this.parseNumber(collateralString),
|
|
85184
|
-
'marginMode':
|
|
87423
|
+
'marginMode': undefined,
|
|
85185
87424
|
'side': side,
|
|
85186
87425
|
'percentage': undefined,
|
|
85187
87426
|
'stopLossPrice': this.safeNumber2(position, 'stop_loss', 'stopLoss'),
|
|
@@ -240618,9 +242857,11 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
240618
242857
|
'watchTicker': false,
|
|
240619
242858
|
'watchTickers': false,
|
|
240620
242859
|
'watchTrades': true,
|
|
242860
|
+
'watchTradesForSymbols': true,
|
|
240621
242861
|
'watchMyTrades': false,
|
|
240622
242862
|
'watchOrders': true,
|
|
240623
242863
|
'watchOrderBook': true,
|
|
242864
|
+
'watchOrderBookForSymbols': true,
|
|
240624
242865
|
'watchOHLCV': true,
|
|
240625
242866
|
},
|
|
240626
242867
|
'hostname': 'api.gemini.com',
|
|
@@ -240669,7 +242910,29 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
240669
242910
|
}
|
|
240670
242911
|
return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
|
|
240671
242912
|
}
|
|
242913
|
+
async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
|
|
242914
|
+
/**
|
|
242915
|
+
* @method
|
|
242916
|
+
* @name gemini#watchTradesForSymbols
|
|
242917
|
+
* @see https://docs.gemini.com/websocket-api/#multi-market-data
|
|
242918
|
+
* @description get the list of most recent trades for a list of symbols
|
|
242919
|
+
* @param {string[]} symbols unified symbol of the market to fetch trades for
|
|
242920
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
242921
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
242922
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
242923
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
242924
|
+
*/
|
|
242925
|
+
const trades = await this.helperForWatchMultipleConstruct('trades', symbols, params);
|
|
242926
|
+
if (this.newUpdates) {
|
|
242927
|
+
const first = this.safeList(trades, 0);
|
|
242928
|
+
const tradeSymbol = this.safeString(first, 'symbol');
|
|
242929
|
+
limit = trades.getLimit(tradeSymbol, limit);
|
|
242930
|
+
}
|
|
242931
|
+
return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
|
|
242932
|
+
}
|
|
240672
242933
|
parseWsTrade(trade, market = undefined) {
|
|
242934
|
+
//
|
|
242935
|
+
// regular v2 trade
|
|
240673
242936
|
//
|
|
240674
242937
|
// {
|
|
240675
242938
|
// "type": "trade",
|
|
@@ -240681,11 +242944,31 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
240681
242944
|
// "side": "buy"
|
|
240682
242945
|
// }
|
|
240683
242946
|
//
|
|
242947
|
+
// multi data trade
|
|
242948
|
+
//
|
|
242949
|
+
// {
|
|
242950
|
+
// "type": "trade",
|
|
242951
|
+
// "symbol": "ETHUSD",
|
|
242952
|
+
// "tid": "1683002242170204", // this is not TS, but somewhat ID
|
|
242953
|
+
// "price": "2299.24",
|
|
242954
|
+
// "amount": "0.002662",
|
|
242955
|
+
// "makerSide": "bid"
|
|
242956
|
+
// }
|
|
242957
|
+
//
|
|
240684
242958
|
const timestamp = this.safeInteger(trade, 'timestamp');
|
|
240685
|
-
const id = this.
|
|
242959
|
+
const id = this.safeString2(trade, 'event_id', 'tid');
|
|
240686
242960
|
const priceString = this.safeString(trade, 'price');
|
|
240687
|
-
const amountString = this.
|
|
240688
|
-
|
|
242961
|
+
const amountString = this.safeString2(trade, 'quantity', 'amount');
|
|
242962
|
+
let side = this.safeStringLower(trade, 'side');
|
|
242963
|
+
if (side === undefined) {
|
|
242964
|
+
const marketSide = this.safeStringLower(trade, 'makerSide');
|
|
242965
|
+
if (marketSide === 'bid') {
|
|
242966
|
+
side = 'sell';
|
|
242967
|
+
}
|
|
242968
|
+
else if (marketSide === 'ask') {
|
|
242969
|
+
side = 'buy';
|
|
242970
|
+
}
|
|
242971
|
+
}
|
|
240689
242972
|
const marketId = this.safeStringLower(trade, 'symbol');
|
|
240690
242973
|
const symbol = this.safeSymbol(marketId, market);
|
|
240691
242974
|
return this.safeTrade({
|
|
@@ -240785,6 +243068,34 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
240785
243068
|
client.resolve(stored, messageHash);
|
|
240786
243069
|
}
|
|
240787
243070
|
}
|
|
243071
|
+
handleTradesForMultidata(client, trades, timestamp) {
|
|
243072
|
+
if (trades !== undefined) {
|
|
243073
|
+
const tradesLimit = this.safeInteger(this.options, 'tradesLimit', 1000);
|
|
243074
|
+
const storesForSymbols = {};
|
|
243075
|
+
for (let i = 0; i < trades.length; i++) {
|
|
243076
|
+
const marketId = trades[i]['symbol'];
|
|
243077
|
+
const market = this.safeMarket(marketId.toLowerCase());
|
|
243078
|
+
const symbol = market['symbol'];
|
|
243079
|
+
const trade = this.parseWsTrade(trades[i], market);
|
|
243080
|
+
trade['timestamp'] = timestamp;
|
|
243081
|
+
trade['datetime'] = this.iso8601(timestamp);
|
|
243082
|
+
let stored = this.safeValue(this.trades, symbol);
|
|
243083
|
+
if (stored === undefined) {
|
|
243084
|
+
stored = new _base_ws_Cache_js__WEBPACK_IMPORTED_MODULE_1__/* .ArrayCache */ .ZL(tradesLimit);
|
|
243085
|
+
this.trades[symbol] = stored;
|
|
243086
|
+
}
|
|
243087
|
+
stored.append(trade);
|
|
243088
|
+
storesForSymbols[symbol] = stored;
|
|
243089
|
+
}
|
|
243090
|
+
const symbols = Object.keys(storesForSymbols);
|
|
243091
|
+
for (let i = 0; i < symbols.length; i++) {
|
|
243092
|
+
const symbol = symbols[i];
|
|
243093
|
+
const stored = storesForSymbols[symbol];
|
|
243094
|
+
const messageHash = 'trades:' + symbol;
|
|
243095
|
+
client.resolve(stored, messageHash);
|
|
243096
|
+
}
|
|
243097
|
+
}
|
|
243098
|
+
}
|
|
240788
243099
|
async watchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
240789
243100
|
/**
|
|
240790
243101
|
* @method
|
|
@@ -240930,6 +243241,93 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
240930
243241
|
this.orderbooks[symbol] = orderbook;
|
|
240931
243242
|
client.resolve(orderbook, messageHash);
|
|
240932
243243
|
}
|
|
243244
|
+
async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
|
|
243245
|
+
/**
|
|
243246
|
+
* @method
|
|
243247
|
+
* @name gemini#watchOrderBookForSymbols
|
|
243248
|
+
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
243249
|
+
* @see https://docs.gemini.com/websocket-api/#multi-market-data
|
|
243250
|
+
* @param {string[]} symbols unified array of symbols
|
|
243251
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
243252
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
243253
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
243254
|
+
*/
|
|
243255
|
+
const orderbook = await this.helperForWatchMultipleConstruct('orderbook', symbols, params);
|
|
243256
|
+
return orderbook.limit();
|
|
243257
|
+
}
|
|
243258
|
+
async helperForWatchMultipleConstruct(itemHashName, symbols, params = {}) {
|
|
243259
|
+
await this.loadMarkets();
|
|
243260
|
+
symbols = this.marketSymbols(symbols, undefined, false, true, true);
|
|
243261
|
+
const firstMarket = this.market(symbols[0]);
|
|
243262
|
+
if (!firstMarket['spot'] && !firstMarket['linear']) {
|
|
243263
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' watchMultiple supports only spot or linear-swap symbols');
|
|
243264
|
+
}
|
|
243265
|
+
const messageHashes = [];
|
|
243266
|
+
const marketIds = [];
|
|
243267
|
+
for (let i = 0; i < symbols.length; i++) {
|
|
243268
|
+
const symbol = symbols[i];
|
|
243269
|
+
const messageHash = itemHashName + ':' + symbol;
|
|
243270
|
+
messageHashes.push(messageHash);
|
|
243271
|
+
const market = this.market(symbol);
|
|
243272
|
+
marketIds.push(market['id']);
|
|
243273
|
+
}
|
|
243274
|
+
const queryStr = marketIds.join(',');
|
|
243275
|
+
let url = this.urls['api']['ws'] + '/v1/multimarketdata?symbols=' + queryStr + '&heartbeat=true&';
|
|
243276
|
+
if (itemHashName === 'orderbook') {
|
|
243277
|
+
url += 'trades=false&bids=true&offers=true';
|
|
243278
|
+
}
|
|
243279
|
+
else if (itemHashName === 'trades') {
|
|
243280
|
+
url += 'trades=true&bids=false&offers=false';
|
|
243281
|
+
}
|
|
243282
|
+
return await this.watchMultiple(url, messageHashes, undefined);
|
|
243283
|
+
}
|
|
243284
|
+
handleOrderBookForMultidata(client, rawOrderBookChanges, timestamp, nonce) {
|
|
243285
|
+
//
|
|
243286
|
+
// rawOrderBookChanges
|
|
243287
|
+
//
|
|
243288
|
+
// [
|
|
243289
|
+
// {
|
|
243290
|
+
// delta: "4105123935484.817624",
|
|
243291
|
+
// price: "0.000000001",
|
|
243292
|
+
// reason: "initial", // initial|cancel|place
|
|
243293
|
+
// remaining: "4105123935484.817624",
|
|
243294
|
+
// side: "bid", // bid|ask
|
|
243295
|
+
// symbol: "SHIBUSD",
|
|
243296
|
+
// type: "change", // seems always change
|
|
243297
|
+
// },
|
|
243298
|
+
// ...
|
|
243299
|
+
//
|
|
243300
|
+
const marketId = rawOrderBookChanges[0]['symbol'];
|
|
243301
|
+
const market = this.safeMarket(marketId.toLowerCase());
|
|
243302
|
+
const symbol = market['symbol'];
|
|
243303
|
+
const messageHash = 'orderbook:' + symbol;
|
|
243304
|
+
let orderbook = this.safeDict(this.orderbooks, symbol);
|
|
243305
|
+
if (orderbook === undefined) {
|
|
243306
|
+
orderbook = this.orderBook();
|
|
243307
|
+
}
|
|
243308
|
+
const bids = orderbook['bids'];
|
|
243309
|
+
const asks = orderbook['asks'];
|
|
243310
|
+
for (let i = 0; i < rawOrderBookChanges.length; i++) {
|
|
243311
|
+
const entry = rawOrderBookChanges[i];
|
|
243312
|
+
const price = this.safeNumber(entry, 'price');
|
|
243313
|
+
const size = this.safeNumber(entry, 'remaining');
|
|
243314
|
+
const rawSide = this.safeString(entry, 'side');
|
|
243315
|
+
if (rawSide === 'bid') {
|
|
243316
|
+
bids.store(price, size);
|
|
243317
|
+
}
|
|
243318
|
+
else {
|
|
243319
|
+
asks.store(price, size);
|
|
243320
|
+
}
|
|
243321
|
+
}
|
|
243322
|
+
orderbook['bids'] = bids;
|
|
243323
|
+
orderbook['asks'] = asks;
|
|
243324
|
+
orderbook['symbol'] = symbol;
|
|
243325
|
+
orderbook['nonce'] = nonce;
|
|
243326
|
+
orderbook['timestamp'] = timestamp;
|
|
243327
|
+
orderbook['datetime'] = this.iso8601(timestamp);
|
|
243328
|
+
this.orderbooks[symbol] = orderbook;
|
|
243329
|
+
client.resolve(orderbook, messageHash);
|
|
243330
|
+
}
|
|
240933
243331
|
handleL2Updates(client, message) {
|
|
240934
243332
|
//
|
|
240935
243333
|
// {
|
|
@@ -241010,6 +243408,7 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
241010
243408
|
// "socket_sequence": 7
|
|
241011
243409
|
// }
|
|
241012
243410
|
//
|
|
243411
|
+
client.lastPong = this.milliseconds();
|
|
241013
243412
|
return message;
|
|
241014
243413
|
}
|
|
241015
243414
|
handleSubscription(client, message) {
|
|
@@ -241212,6 +243611,33 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
241212
243611
|
if (method !== undefined) {
|
|
241213
243612
|
method.call(this, client, message);
|
|
241214
243613
|
}
|
|
243614
|
+
// handle multimarketdata
|
|
243615
|
+
if (type === 'update') {
|
|
243616
|
+
const ts = this.safeInteger(message, 'timestampms', this.milliseconds());
|
|
243617
|
+
const eventId = this.safeInteger(message, 'eventId');
|
|
243618
|
+
const events = this.safeList(message, 'events');
|
|
243619
|
+
const orderBookItems = [];
|
|
243620
|
+
const collectedEventsOfTrades = [];
|
|
243621
|
+
for (let i = 0; i < events.length; i++) {
|
|
243622
|
+
const event = events[i];
|
|
243623
|
+
const eventType = this.safeString(event, 'type');
|
|
243624
|
+
const isOrderBook = (eventType === 'change') && ('side' in event) && this.inArray(event['side'], ['ask', 'bid']);
|
|
243625
|
+
if (isOrderBook) {
|
|
243626
|
+
orderBookItems.push(event);
|
|
243627
|
+
}
|
|
243628
|
+
else if (eventType === 'trade') {
|
|
243629
|
+
collectedEventsOfTrades.push(events[i]);
|
|
243630
|
+
}
|
|
243631
|
+
}
|
|
243632
|
+
const lengthOb = orderBookItems.length;
|
|
243633
|
+
if (lengthOb > 0) {
|
|
243634
|
+
this.handleOrderBookForMultidata(client, orderBookItems, ts, eventId);
|
|
243635
|
+
}
|
|
243636
|
+
const lengthTrades = collectedEventsOfTrades.length;
|
|
243637
|
+
if (lengthTrades > 0) {
|
|
243638
|
+
this.handleTradesForMultidata(client, collectedEventsOfTrades, ts);
|
|
243639
|
+
}
|
|
243640
|
+
}
|
|
241215
243641
|
}
|
|
241216
243642
|
async authenticate(params = {}) {
|
|
241217
243643
|
const url = this.safeString(params, 'url');
|
|
@@ -250144,6 +252570,7 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
250144
252570
|
'watchOrderBook': {
|
|
250145
252571
|
'snapshotDelay': 5,
|
|
250146
252572
|
'snapshotMaxRetries': 3,
|
|
252573
|
+
'method': '/market/level2', // '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50'
|
|
250147
252574
|
},
|
|
250148
252575
|
},
|
|
250149
252576
|
'streaming': {
|
|
@@ -250545,10 +252972,15 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
250545
252972
|
/**
|
|
250546
252973
|
* @method
|
|
250547
252974
|
* @name kucoin#watchOrderBook
|
|
252975
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level1-bbo-market-data
|
|
252976
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-market-data
|
|
252977
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-5-best-ask-bid-orders
|
|
252978
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-50-best-ask-bid-orders
|
|
250548
252979
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
250549
252980
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
250550
252981
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
250551
252982
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
252983
|
+
* @param {string} [params.method] either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2'
|
|
250552
252984
|
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
250553
252985
|
*/
|
|
250554
252986
|
//
|
|
@@ -250572,10 +253004,15 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
250572
253004
|
/**
|
|
250573
253005
|
* @method
|
|
250574
253006
|
* @name kucoin#watchOrderBookForSymbols
|
|
253007
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level1-bbo-market-data
|
|
253008
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-market-data
|
|
253009
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-5-best-ask-bid-orders
|
|
253010
|
+
* @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/level2-50-best-ask-bid-orders
|
|
250575
253011
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
250576
253012
|
* @param {string[]} symbols unified array of symbols
|
|
250577
253013
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
250578
253014
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
253015
|
+
* @param {string} [params.method] either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2'
|
|
250579
253016
|
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
250580
253017
|
*/
|
|
250581
253018
|
const symbolsLength = symbols.length;
|
|
@@ -250583,28 +253020,36 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
250583
253020
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' watchOrderBookForSymbols() requires a non-empty array of symbols');
|
|
250584
253021
|
}
|
|
250585
253022
|
if (limit !== undefined) {
|
|
250586
|
-
if ((limit !== 20) && (limit !== 100)) {
|
|
250587
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + " watchOrderBook 'limit' argument must be undefined, 20 or 100");
|
|
253023
|
+
if ((limit !== 20) && (limit !== 100) && (limit !== 50) && (limit !== 5)) {
|
|
253024
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + " watchOrderBook 'limit' argument must be undefined, 5, 20, 50 or 100");
|
|
250588
253025
|
}
|
|
250589
253026
|
}
|
|
250590
253027
|
await this.loadMarkets();
|
|
250591
253028
|
symbols = this.marketSymbols(symbols);
|
|
250592
253029
|
const marketIds = this.marketIds(symbols);
|
|
250593
253030
|
const url = await this.negotiate(false);
|
|
250594
|
-
|
|
253031
|
+
let method = undefined;
|
|
253032
|
+
[method, params] = this.handleOptionAndParams(params, 'watchOrderBook', 'method', '/market/level2');
|
|
253033
|
+
if ((limit === 5) || (limit === 50)) {
|
|
253034
|
+
method = '/spotMarket/level2Depth' + limit.toString();
|
|
253035
|
+
}
|
|
253036
|
+
const topic = method + ':' + marketIds.join(',');
|
|
250595
253037
|
const messageHashes = [];
|
|
250596
253038
|
const subscriptionHashes = [];
|
|
250597
253039
|
for (let i = 0; i < symbols.length; i++) {
|
|
250598
253040
|
const symbol = symbols[i];
|
|
250599
253041
|
messageHashes.push('orderbook:' + symbol);
|
|
250600
253042
|
const marketId = marketIds[i];
|
|
250601
|
-
subscriptionHashes.push('
|
|
253043
|
+
subscriptionHashes.push(method + ':' + marketId);
|
|
253044
|
+
}
|
|
253045
|
+
let subscription = {};
|
|
253046
|
+
if (method === '/market/level2') { // other streams return the entire orderbook, so we don't need to fetch the snapshot through REST
|
|
253047
|
+
subscription = {
|
|
253048
|
+
'method': this.handleOrderBookSubscription,
|
|
253049
|
+
'symbols': symbols,
|
|
253050
|
+
'limit': limit,
|
|
253051
|
+
};
|
|
250602
253052
|
}
|
|
250603
|
-
const subscription = {
|
|
250604
|
-
'method': this.handleOrderBookSubscription,
|
|
250605
|
-
'symbols': symbols,
|
|
250606
|
-
'limit': limit,
|
|
250607
|
-
};
|
|
250608
253053
|
const orderbook = await this.subscribeMultiple(url, messageHashes, topic, subscriptionHashes, params, subscription);
|
|
250609
253054
|
return orderbook.limit();
|
|
250610
253055
|
}
|
|
@@ -250628,41 +253073,74 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
250628
253073
|
// }
|
|
250629
253074
|
// }
|
|
250630
253075
|
//
|
|
253076
|
+
// {
|
|
253077
|
+
// "topic": "/spotMarket/level2Depth5:BTC-USDT",
|
|
253078
|
+
// "type": "message",
|
|
253079
|
+
// "data": {
|
|
253080
|
+
// "asks": [
|
|
253081
|
+
// [
|
|
253082
|
+
// "42815.6",
|
|
253083
|
+
// "1.24016245"
|
|
253084
|
+
// ]
|
|
253085
|
+
// ],
|
|
253086
|
+
// "bids": [
|
|
253087
|
+
// [
|
|
253088
|
+
// "42815.5",
|
|
253089
|
+
// "0.08652716"
|
|
253090
|
+
// ]
|
|
253091
|
+
// ],
|
|
253092
|
+
// "timestamp": 1707204474018
|
|
253093
|
+
// },
|
|
253094
|
+
// "subject": "level2"
|
|
253095
|
+
// }
|
|
253096
|
+
//
|
|
250631
253097
|
const data = this.safeValue(message, 'data');
|
|
250632
|
-
const
|
|
253098
|
+
const subject = this.safeString(message, 'subject');
|
|
253099
|
+
const topic = this.safeString(message, 'topic');
|
|
253100
|
+
const topicParts = topic.split(':');
|
|
253101
|
+
const topicSymbol = this.safeString(topicParts, 1);
|
|
253102
|
+
const topicChannel = this.safeString(topicParts, 0);
|
|
253103
|
+
const marketId = this.safeString(data, 'symbol', topicSymbol);
|
|
250633
253104
|
const symbol = this.safeSymbol(marketId, undefined, '-');
|
|
250634
253105
|
const messageHash = 'orderbook:' + symbol;
|
|
250635
|
-
|
|
250636
|
-
|
|
250637
|
-
|
|
250638
|
-
|
|
250639
|
-
const cacheLength = storedOrderBook.cache.length;
|
|
250640
|
-
const topic = this.safeString(message, 'topic');
|
|
250641
|
-
const topicParts = topic.split(':');
|
|
250642
|
-
const topicSymbol = this.safeString(topicParts, 1);
|
|
250643
|
-
const topicChannel = this.safeString(topicParts, 0);
|
|
250644
|
-
const subscriptions = Object.keys(client.subscriptions);
|
|
250645
|
-
let subscription = undefined;
|
|
250646
|
-
for (let i = 0; i < subscriptions.length; i++) {
|
|
250647
|
-
const key = subscriptions[i];
|
|
250648
|
-
if ((key.indexOf(topicSymbol) >= 0) && (key.indexOf(topicChannel) >= 0)) {
|
|
250649
|
-
subscription = client.subscriptions[key];
|
|
250650
|
-
break;
|
|
250651
|
-
}
|
|
253106
|
+
let orderbook = this.safeDict(this.orderbooks, symbol);
|
|
253107
|
+
if (subject === 'level2') {
|
|
253108
|
+
if (orderbook === undefined) {
|
|
253109
|
+
orderbook = this.orderBook();
|
|
250652
253110
|
}
|
|
250653
|
-
|
|
250654
|
-
|
|
250655
|
-
if (cacheLength === snapshotDelay) {
|
|
250656
|
-
this.spawn(this.loadOrderBook, client, messageHash, symbol, limit, {});
|
|
253111
|
+
else {
|
|
253112
|
+
orderbook.reset();
|
|
250657
253113
|
}
|
|
250658
|
-
|
|
250659
|
-
return;
|
|
253114
|
+
orderbook['symbol'] = symbol;
|
|
250660
253115
|
}
|
|
250661
|
-
else
|
|
250662
|
-
|
|
253116
|
+
else {
|
|
253117
|
+
const nonce = this.safeInteger(orderbook, 'nonce');
|
|
253118
|
+
const deltaEnd = this.safeInteger2(data, 'sequenceEnd', 'timestamp');
|
|
253119
|
+
if (nonce === undefined) {
|
|
253120
|
+
const cacheLength = orderbook.cache.length;
|
|
253121
|
+
const subscriptions = Object.keys(client.subscriptions);
|
|
253122
|
+
let subscription = undefined;
|
|
253123
|
+
for (let i = 0; i < subscriptions.length; i++) {
|
|
253124
|
+
const key = subscriptions[i];
|
|
253125
|
+
if ((key.indexOf(topicSymbol) >= 0) && (key.indexOf(topicChannel) >= 0)) {
|
|
253126
|
+
subscription = client.subscriptions[key];
|
|
253127
|
+
break;
|
|
253128
|
+
}
|
|
253129
|
+
}
|
|
253130
|
+
const limit = this.safeInteger(subscription, 'limit');
|
|
253131
|
+
const snapshotDelay = this.handleOption('watchOrderBook', 'snapshotDelay', 5);
|
|
253132
|
+
if (cacheLength === snapshotDelay) {
|
|
253133
|
+
this.spawn(this.loadOrderBook, client, messageHash, symbol, limit, {});
|
|
253134
|
+
}
|
|
253135
|
+
orderbook.cache.push(data);
|
|
253136
|
+
return;
|
|
253137
|
+
}
|
|
253138
|
+
else if (nonce >= deltaEnd) {
|
|
253139
|
+
return;
|
|
253140
|
+
}
|
|
250663
253141
|
}
|
|
250664
|
-
this.handleDelta(
|
|
250665
|
-
client.resolve(
|
|
253142
|
+
this.handleDelta(orderbook, data);
|
|
253143
|
+
client.resolve(orderbook, messageHash);
|
|
250666
253144
|
}
|
|
250667
253145
|
getCacheIndex(orderbook, cache) {
|
|
250668
253146
|
const firstDelta = this.safeValue(cache, 0);
|
|
@@ -250682,11 +253160,11 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
250682
253160
|
return cache.length;
|
|
250683
253161
|
}
|
|
250684
253162
|
handleDelta(orderbook, delta) {
|
|
250685
|
-
|
|
250686
|
-
|
|
253163
|
+
const timestamp = this.safeInteger2(delta, 'time', 'timestamp');
|
|
253164
|
+
orderbook['nonce'] = this.safeInteger(delta, 'sequenceEnd', timestamp);
|
|
250687
253165
|
orderbook['timestamp'] = timestamp;
|
|
250688
253166
|
orderbook['datetime'] = this.iso8601(timestamp);
|
|
250689
|
-
const changes = this.safeValue(delta, 'changes');
|
|
253167
|
+
const changes = this.safeValue(delta, 'changes', delta);
|
|
250690
253168
|
const bids = this.safeValue(changes, 'bids', []);
|
|
250691
253169
|
const asks = this.safeValue(changes, 'asks', []);
|
|
250692
253170
|
const storedBids = orderbook['bids'];
|
|
@@ -251100,6 +253578,7 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
251100
253578
|
}
|
|
251101
253579
|
const subject = this.safeString(message, 'subject');
|
|
251102
253580
|
const methods = {
|
|
253581
|
+
'level2': this.handleOrderBook,
|
|
251103
253582
|
'trade.l2update': this.handleOrderBook,
|
|
251104
253583
|
'trade.ticker': this.handleTicker,
|
|
251105
253584
|
'trade.snapshot': this.handleTicker,
|
|
@@ -301316,39 +303795,39 @@ var __webpack_exports__ = {};
|
|
|
301316
303795
|
(() => {
|
|
301317
303796
|
__webpack_require__.r(__webpack_exports__);
|
|
301318
303797
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301319
|
-
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */
|
|
301320
|
-
/* harmony export */ AccountSuspended: () => (/* reexport safe */
|
|
301321
|
-
/* harmony export */ AddressPending: () => (/* reexport safe */
|
|
301322
|
-
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */
|
|
301323
|
-
/* harmony export */ AuthenticationError: () => (/* reexport safe */
|
|
301324
|
-
/* harmony export */ BadRequest: () => (/* reexport safe */
|
|
301325
|
-
/* harmony export */ BadResponse: () => (/* reexport safe */
|
|
301326
|
-
/* harmony export */ BadSymbol: () => (/* reexport safe */
|
|
301327
|
-
/* harmony export */ BaseError: () => (/* reexport safe */
|
|
301328
|
-
/* harmony export */ CancelPending: () => (/* reexport safe */
|
|
301329
|
-
/* harmony export */ DDoSProtection: () => (/* reexport safe */
|
|
301330
|
-
/* harmony export */ DuplicateOrderId: () => (/* reexport safe */
|
|
303798
|
+
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.AccountNotEnabled),
|
|
303799
|
+
/* harmony export */ AccountSuspended: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.AccountSuspended),
|
|
303800
|
+
/* harmony export */ AddressPending: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.AddressPending),
|
|
303801
|
+
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.ArgumentsRequired),
|
|
303802
|
+
/* harmony export */ AuthenticationError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.AuthenticationError),
|
|
303803
|
+
/* harmony export */ BadRequest: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.BadRequest),
|
|
303804
|
+
/* harmony export */ BadResponse: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.BadResponse),
|
|
303805
|
+
/* harmony export */ BadSymbol: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.BadSymbol),
|
|
303806
|
+
/* harmony export */ BaseError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.BaseError),
|
|
303807
|
+
/* harmony export */ CancelPending: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.CancelPending),
|
|
303808
|
+
/* harmony export */ DDoSProtection: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.DDoSProtection),
|
|
303809
|
+
/* harmony export */ DuplicateOrderId: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.DuplicateOrderId),
|
|
301331
303810
|
/* harmony export */ Exchange: () => (/* reexport safe */ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__.e),
|
|
301332
|
-
/* harmony export */ ExchangeError: () => (/* reexport safe */
|
|
301333
|
-
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */
|
|
301334
|
-
/* harmony export */ InsufficientFunds: () => (/* reexport safe */
|
|
301335
|
-
/* harmony export */ InvalidAddress: () => (/* reexport safe */
|
|
301336
|
-
/* harmony export */ InvalidNonce: () => (/* reexport safe */
|
|
301337
|
-
/* harmony export */ InvalidOrder: () => (/* reexport safe */
|
|
301338
|
-
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */
|
|
301339
|
-
/* harmony export */ NetworkError: () => (/* reexport safe */
|
|
301340
|
-
/* harmony export */ NoChange: () => (/* reexport safe */
|
|
301341
|
-
/* harmony export */ NotSupported: () => (/* reexport safe */
|
|
301342
|
-
/* harmony export */ NullResponse: () => (/* reexport safe */
|
|
301343
|
-
/* harmony export */ OnMaintenance: () => (/* reexport safe */
|
|
301344
|
-
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */
|
|
301345
|
-
/* harmony export */ OrderNotCached: () => (/* reexport safe */
|
|
301346
|
-
/* harmony export */ OrderNotFillable: () => (/* reexport safe */
|
|
301347
|
-
/* harmony export */ OrderNotFound: () => (/* reexport safe */
|
|
301348
|
-
/* harmony export */ PermissionDenied: () => (/* reexport safe */
|
|
301349
|
-
/* harmony export */ Precise: () => (/* reexport safe */
|
|
301350
|
-
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */
|
|
301351
|
-
/* harmony export */ RequestTimeout: () => (/* reexport safe */
|
|
303811
|
+
/* harmony export */ ExchangeError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.ExchangeError),
|
|
303812
|
+
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.ExchangeNotAvailable),
|
|
303813
|
+
/* harmony export */ InsufficientFunds: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.InsufficientFunds),
|
|
303814
|
+
/* harmony export */ InvalidAddress: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.InvalidAddress),
|
|
303815
|
+
/* harmony export */ InvalidNonce: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.InvalidNonce),
|
|
303816
|
+
/* harmony export */ InvalidOrder: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.InvalidOrder),
|
|
303817
|
+
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.MarginModeAlreadySet),
|
|
303818
|
+
/* harmony export */ NetworkError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.NetworkError),
|
|
303819
|
+
/* harmony export */ NoChange: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.NoChange),
|
|
303820
|
+
/* harmony export */ NotSupported: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.NotSupported),
|
|
303821
|
+
/* harmony export */ NullResponse: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.NullResponse),
|
|
303822
|
+
/* harmony export */ OnMaintenance: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.OnMaintenance),
|
|
303823
|
+
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.OrderImmediatelyFillable),
|
|
303824
|
+
/* harmony export */ OrderNotCached: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.OrderNotCached),
|
|
303825
|
+
/* harmony export */ OrderNotFillable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.OrderNotFillable),
|
|
303826
|
+
/* harmony export */ OrderNotFound: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.OrderNotFound),
|
|
303827
|
+
/* harmony export */ PermissionDenied: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.PermissionDenied),
|
|
303828
|
+
/* harmony export */ Precise: () => (/* reexport safe */ _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_163__.O),
|
|
303829
|
+
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.RateLimitExceeded),
|
|
303830
|
+
/* harmony export */ RequestTimeout: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__.RequestTimeout),
|
|
301352
303831
|
/* harmony export */ ace: () => (/* reexport safe */ _src_ace_js__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
301353
303832
|
/* harmony export */ alpaca: () => (/* reexport safe */ _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__.Z),
|
|
301354
303833
|
/* harmony export */ ascendex: () => (/* reexport safe */ _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__.Z),
|
|
@@ -301381,85 +303860,86 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301381
303860
|
/* harmony export */ bitvavo: () => (/* reexport safe */ _src_bitvavo_js__WEBPACK_IMPORTED_MODULE_30__.Z),
|
|
301382
303861
|
/* harmony export */ bl3p: () => (/* reexport safe */ _src_bl3p_js__WEBPACK_IMPORTED_MODULE_31__.Z),
|
|
301383
303862
|
/* harmony export */ blockchaincom: () => (/* reexport safe */ _src_blockchaincom_js__WEBPACK_IMPORTED_MODULE_32__.Z),
|
|
301384
|
-
/* harmony export */
|
|
301385
|
-
/* harmony export */
|
|
301386
|
-
/* harmony export */
|
|
301387
|
-
/* harmony export */
|
|
301388
|
-
/* harmony export */
|
|
301389
|
-
/* harmony export */
|
|
301390
|
-
/* harmony export */
|
|
301391
|
-
/* harmony export */
|
|
301392
|
-
/* harmony export */
|
|
301393
|
-
/* harmony export */
|
|
301394
|
-
/* harmony export */
|
|
301395
|
-
/* harmony export */
|
|
301396
|
-
/* harmony export */
|
|
301397
|
-
/* harmony export */
|
|
301398
|
-
/* harmony export */
|
|
301399
|
-
/* harmony export */
|
|
301400
|
-
/* harmony export */
|
|
301401
|
-
/* harmony export */
|
|
303863
|
+
/* harmony export */ blofin: () => (/* reexport safe */ _src_blofin_js__WEBPACK_IMPORTED_MODULE_33__.Z),
|
|
303864
|
+
/* harmony export */ btcalpha: () => (/* reexport safe */ _src_btcalpha_js__WEBPACK_IMPORTED_MODULE_34__.Z),
|
|
303865
|
+
/* harmony export */ btcbox: () => (/* reexport safe */ _src_btcbox_js__WEBPACK_IMPORTED_MODULE_35__.Z),
|
|
303866
|
+
/* harmony export */ btcmarkets: () => (/* reexport safe */ _src_btcmarkets_js__WEBPACK_IMPORTED_MODULE_36__.Z),
|
|
303867
|
+
/* harmony export */ btcturk: () => (/* reexport safe */ _src_btcturk_js__WEBPACK_IMPORTED_MODULE_37__.Z),
|
|
303868
|
+
/* harmony export */ bybit: () => (/* reexport safe */ _src_bybit_js__WEBPACK_IMPORTED_MODULE_38__.Z),
|
|
303869
|
+
/* harmony export */ cex: () => (/* reexport safe */ _src_cex_js__WEBPACK_IMPORTED_MODULE_39__.Z),
|
|
303870
|
+
/* harmony export */ coinbase: () => (/* reexport safe */ _src_coinbase_js__WEBPACK_IMPORTED_MODULE_40__.Z),
|
|
303871
|
+
/* harmony export */ coinbasepro: () => (/* reexport safe */ _src_coinbasepro_js__WEBPACK_IMPORTED_MODULE_41__.Z),
|
|
303872
|
+
/* harmony export */ coincheck: () => (/* reexport safe */ _src_coincheck_js__WEBPACK_IMPORTED_MODULE_42__.Z),
|
|
303873
|
+
/* harmony export */ coinex: () => (/* reexport safe */ _src_coinex_js__WEBPACK_IMPORTED_MODULE_43__.Z),
|
|
303874
|
+
/* harmony export */ coinlist: () => (/* reexport safe */ _src_coinlist_js__WEBPACK_IMPORTED_MODULE_44__.Z),
|
|
303875
|
+
/* harmony export */ coinmate: () => (/* reexport safe */ _src_coinmate_js__WEBPACK_IMPORTED_MODULE_45__.Z),
|
|
303876
|
+
/* harmony export */ coinmetro: () => (/* reexport safe */ _src_coinmetro_js__WEBPACK_IMPORTED_MODULE_46__.Z),
|
|
303877
|
+
/* harmony export */ coinone: () => (/* reexport safe */ _src_coinone_js__WEBPACK_IMPORTED_MODULE_47__.Z),
|
|
303878
|
+
/* harmony export */ coinsph: () => (/* reexport safe */ _src_coinsph_js__WEBPACK_IMPORTED_MODULE_48__.Z),
|
|
303879
|
+
/* harmony export */ coinspot: () => (/* reexport safe */ _src_coinspot_js__WEBPACK_IMPORTED_MODULE_49__.Z),
|
|
303880
|
+
/* harmony export */ cryptocom: () => (/* reexport safe */ _src_cryptocom_js__WEBPACK_IMPORTED_MODULE_50__.Z),
|
|
303881
|
+
/* harmony export */ currencycom: () => (/* reexport safe */ _src_currencycom_js__WEBPACK_IMPORTED_MODULE_51__.Z),
|
|
301402
303882
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
301403
|
-
/* harmony export */ delta: () => (/* reexport safe */
|
|
301404
|
-
/* harmony export */ deribit: () => (/* reexport safe */
|
|
301405
|
-
/* harmony export */ digifinex: () => (/* reexport safe */
|
|
301406
|
-
/* harmony export */ errors: () => (/* reexport module object */
|
|
303883
|
+
/* harmony export */ delta: () => (/* reexport safe */ _src_delta_js__WEBPACK_IMPORTED_MODULE_52__.Z),
|
|
303884
|
+
/* harmony export */ deribit: () => (/* reexport safe */ _src_deribit_js__WEBPACK_IMPORTED_MODULE_53__.Z),
|
|
303885
|
+
/* harmony export */ digifinex: () => (/* reexport safe */ _src_digifinex_js__WEBPACK_IMPORTED_MODULE_54__.Z),
|
|
303886
|
+
/* harmony export */ errors: () => (/* reexport module object */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__),
|
|
301407
303887
|
/* harmony export */ exchanges: () => (/* binding */ exchanges),
|
|
301408
|
-
/* harmony export */ exmo: () => (/* reexport safe */
|
|
301409
|
-
/* harmony export */ fmfwio: () => (/* reexport safe */
|
|
301410
|
-
/* harmony export */ functions: () => (/* reexport module object */
|
|
301411
|
-
/* harmony export */ gate: () => (/* reexport safe */
|
|
301412
|
-
/* harmony export */ gateio: () => (/* reexport safe */
|
|
301413
|
-
/* harmony export */ gemini: () => (/* reexport safe */
|
|
301414
|
-
/* harmony export */ hitbtc: () => (/* reexport safe */
|
|
301415
|
-
/* harmony export */ hitbtc3: () => (/* reexport safe */
|
|
301416
|
-
/* harmony export */ hollaex: () => (/* reexport safe */
|
|
301417
|
-
/* harmony export */ htx: () => (/* reexport safe */
|
|
301418
|
-
/* harmony export */ huobi: () => (/* reexport safe */
|
|
301419
|
-
/* harmony export */ huobijp: () => (/* reexport safe */
|
|
301420
|
-
/* harmony export */ idex: () => (/* reexport safe */
|
|
301421
|
-
/* harmony export */ independentreserve: () => (/* reexport safe */
|
|
301422
|
-
/* harmony export */ indodax: () => (/* reexport safe */
|
|
301423
|
-
/* harmony export */ kraken: () => (/* reexport safe */
|
|
301424
|
-
/* harmony export */ krakenfutures: () => (/* reexport safe */
|
|
301425
|
-
/* harmony export */ kucoin: () => (/* reexport safe */
|
|
301426
|
-
/* harmony export */ kucoinfutures: () => (/* reexport safe */
|
|
301427
|
-
/* harmony export */ kuna: () => (/* reexport safe */
|
|
301428
|
-
/* harmony export */ latoken: () => (/* reexport safe */
|
|
301429
|
-
/* harmony export */ lbank: () => (/* reexport safe */
|
|
301430
|
-
/* harmony export */ luno: () => (/* reexport safe */
|
|
301431
|
-
/* harmony export */ lykke: () => (/* reexport safe */
|
|
301432
|
-
/* harmony export */ mercado: () => (/* reexport safe */
|
|
301433
|
-
/* harmony export */ mexc: () => (/* reexport safe */
|
|
301434
|
-
/* harmony export */ ndax: () => (/* reexport safe */
|
|
301435
|
-
/* harmony export */ novadax: () => (/* reexport safe */
|
|
301436
|
-
/* harmony export */ oceanex: () => (/* reexport safe */
|
|
301437
|
-
/* harmony export */ okcoin: () => (/* reexport safe */
|
|
301438
|
-
/* harmony export */ okx: () => (/* reexport safe */
|
|
301439
|
-
/* harmony export */ onetrading: () => (/* reexport safe */
|
|
301440
|
-
/* harmony export */ p2b: () => (/* reexport safe */
|
|
301441
|
-
/* harmony export */ paymium: () => (/* reexport safe */
|
|
301442
|
-
/* harmony export */ phemex: () => (/* reexport safe */
|
|
301443
|
-
/* harmony export */ poloniex: () => (/* reexport safe */
|
|
301444
|
-
/* harmony export */ poloniexfutures: () => (/* reexport safe */
|
|
303888
|
+
/* harmony export */ exmo: () => (/* reexport safe */ _src_exmo_js__WEBPACK_IMPORTED_MODULE_55__.Z),
|
|
303889
|
+
/* harmony export */ fmfwio: () => (/* reexport safe */ _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_56__.Z),
|
|
303890
|
+
/* harmony export */ functions: () => (/* reexport module object */ _src_base_functions_js__WEBPACK_IMPORTED_MODULE_164__),
|
|
303891
|
+
/* harmony export */ gate: () => (/* reexport safe */ _src_gate_js__WEBPACK_IMPORTED_MODULE_57__.Z),
|
|
303892
|
+
/* harmony export */ gateio: () => (/* reexport safe */ _src_gateio_js__WEBPACK_IMPORTED_MODULE_58__.Z),
|
|
303893
|
+
/* harmony export */ gemini: () => (/* reexport safe */ _src_gemini_js__WEBPACK_IMPORTED_MODULE_59__.Z),
|
|
303894
|
+
/* harmony export */ hitbtc: () => (/* reexport safe */ _src_hitbtc_js__WEBPACK_IMPORTED_MODULE_60__.Z),
|
|
303895
|
+
/* harmony export */ hitbtc3: () => (/* reexport safe */ _src_hitbtc3_js__WEBPACK_IMPORTED_MODULE_61__.Z),
|
|
303896
|
+
/* harmony export */ hollaex: () => (/* reexport safe */ _src_hollaex_js__WEBPACK_IMPORTED_MODULE_62__.Z),
|
|
303897
|
+
/* harmony export */ htx: () => (/* reexport safe */ _src_htx_js__WEBPACK_IMPORTED_MODULE_63__.Z),
|
|
303898
|
+
/* harmony export */ huobi: () => (/* reexport safe */ _src_huobi_js__WEBPACK_IMPORTED_MODULE_64__.Z),
|
|
303899
|
+
/* harmony export */ huobijp: () => (/* reexport safe */ _src_huobijp_js__WEBPACK_IMPORTED_MODULE_65__.Z),
|
|
303900
|
+
/* harmony export */ idex: () => (/* reexport safe */ _src_idex_js__WEBPACK_IMPORTED_MODULE_66__.Z),
|
|
303901
|
+
/* harmony export */ independentreserve: () => (/* reexport safe */ _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_67__.Z),
|
|
303902
|
+
/* harmony export */ indodax: () => (/* reexport safe */ _src_indodax_js__WEBPACK_IMPORTED_MODULE_68__.Z),
|
|
303903
|
+
/* harmony export */ kraken: () => (/* reexport safe */ _src_kraken_js__WEBPACK_IMPORTED_MODULE_69__.Z),
|
|
303904
|
+
/* harmony export */ krakenfutures: () => (/* reexport safe */ _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_70__.Z),
|
|
303905
|
+
/* harmony export */ kucoin: () => (/* reexport safe */ _src_kucoin_js__WEBPACK_IMPORTED_MODULE_71__.Z),
|
|
303906
|
+
/* harmony export */ kucoinfutures: () => (/* reexport safe */ _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_72__.Z),
|
|
303907
|
+
/* harmony export */ kuna: () => (/* reexport safe */ _src_kuna_js__WEBPACK_IMPORTED_MODULE_73__.Z),
|
|
303908
|
+
/* harmony export */ latoken: () => (/* reexport safe */ _src_latoken_js__WEBPACK_IMPORTED_MODULE_74__.Z),
|
|
303909
|
+
/* harmony export */ lbank: () => (/* reexport safe */ _src_lbank_js__WEBPACK_IMPORTED_MODULE_75__.Z),
|
|
303910
|
+
/* harmony export */ luno: () => (/* reexport safe */ _src_luno_js__WEBPACK_IMPORTED_MODULE_76__.Z),
|
|
303911
|
+
/* harmony export */ lykke: () => (/* reexport safe */ _src_lykke_js__WEBPACK_IMPORTED_MODULE_77__.Z),
|
|
303912
|
+
/* harmony export */ mercado: () => (/* reexport safe */ _src_mercado_js__WEBPACK_IMPORTED_MODULE_78__.Z),
|
|
303913
|
+
/* harmony export */ mexc: () => (/* reexport safe */ _src_mexc_js__WEBPACK_IMPORTED_MODULE_79__.Z),
|
|
303914
|
+
/* harmony export */ ndax: () => (/* reexport safe */ _src_ndax_js__WEBPACK_IMPORTED_MODULE_80__.Z),
|
|
303915
|
+
/* harmony export */ novadax: () => (/* reexport safe */ _src_novadax_js__WEBPACK_IMPORTED_MODULE_81__.Z),
|
|
303916
|
+
/* harmony export */ oceanex: () => (/* reexport safe */ _src_oceanex_js__WEBPACK_IMPORTED_MODULE_82__.Z),
|
|
303917
|
+
/* harmony export */ okcoin: () => (/* reexport safe */ _src_okcoin_js__WEBPACK_IMPORTED_MODULE_83__.Z),
|
|
303918
|
+
/* harmony export */ okx: () => (/* reexport safe */ _src_okx_js__WEBPACK_IMPORTED_MODULE_84__.Z),
|
|
303919
|
+
/* harmony export */ onetrading: () => (/* reexport safe */ _src_onetrading_js__WEBPACK_IMPORTED_MODULE_85__.Z),
|
|
303920
|
+
/* harmony export */ p2b: () => (/* reexport safe */ _src_p2b_js__WEBPACK_IMPORTED_MODULE_86__.Z),
|
|
303921
|
+
/* harmony export */ paymium: () => (/* reexport safe */ _src_paymium_js__WEBPACK_IMPORTED_MODULE_87__.Z),
|
|
303922
|
+
/* harmony export */ phemex: () => (/* reexport safe */ _src_phemex_js__WEBPACK_IMPORTED_MODULE_88__.Z),
|
|
303923
|
+
/* harmony export */ poloniex: () => (/* reexport safe */ _src_poloniex_js__WEBPACK_IMPORTED_MODULE_89__.Z),
|
|
303924
|
+
/* harmony export */ poloniexfutures: () => (/* reexport safe */ _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_90__.Z),
|
|
301445
303925
|
/* harmony export */ pro: () => (/* binding */ pro),
|
|
301446
|
-
/* harmony export */ probit: () => (/* reexport safe */
|
|
301447
|
-
/* harmony export */ timex: () => (/* reexport safe */
|
|
301448
|
-
/* harmony export */ tokocrypto: () => (/* reexport safe */
|
|
301449
|
-
/* harmony export */ upbit: () => (/* reexport safe */
|
|
303926
|
+
/* harmony export */ probit: () => (/* reexport safe */ _src_probit_js__WEBPACK_IMPORTED_MODULE_91__.Z),
|
|
303927
|
+
/* harmony export */ timex: () => (/* reexport safe */ _src_timex_js__WEBPACK_IMPORTED_MODULE_92__.Z),
|
|
303928
|
+
/* harmony export */ tokocrypto: () => (/* reexport safe */ _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_93__.Z),
|
|
303929
|
+
/* harmony export */ upbit: () => (/* reexport safe */ _src_upbit_js__WEBPACK_IMPORTED_MODULE_94__.Z),
|
|
301450
303930
|
/* harmony export */ version: () => (/* binding */ version),
|
|
301451
|
-
/* harmony export */ wavesexchange: () => (/* reexport safe */
|
|
301452
|
-
/* harmony export */ wazirx: () => (/* reexport safe */
|
|
301453
|
-
/* harmony export */ whitebit: () => (/* reexport safe */
|
|
301454
|
-
/* harmony export */ woo: () => (/* reexport safe */
|
|
301455
|
-
/* harmony export */ yobit: () => (/* reexport safe */
|
|
301456
|
-
/* harmony export */ zaif: () => (/* reexport safe */
|
|
301457
|
-
/* harmony export */ zonda: () => (/* reexport safe */
|
|
303931
|
+
/* harmony export */ wavesexchange: () => (/* reexport safe */ _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_95__.Z),
|
|
303932
|
+
/* harmony export */ wazirx: () => (/* reexport safe */ _src_wazirx_js__WEBPACK_IMPORTED_MODULE_96__.Z),
|
|
303933
|
+
/* harmony export */ whitebit: () => (/* reexport safe */ _src_whitebit_js__WEBPACK_IMPORTED_MODULE_97__.Z),
|
|
303934
|
+
/* harmony export */ woo: () => (/* reexport safe */ _src_woo_js__WEBPACK_IMPORTED_MODULE_98__.Z),
|
|
303935
|
+
/* harmony export */ yobit: () => (/* reexport safe */ _src_yobit_js__WEBPACK_IMPORTED_MODULE_99__.Z),
|
|
303936
|
+
/* harmony export */ zaif: () => (/* reexport safe */ _src_zaif_js__WEBPACK_IMPORTED_MODULE_100__.Z),
|
|
303937
|
+
/* harmony export */ zonda: () => (/* reexport safe */ _src_zonda_js__WEBPACK_IMPORTED_MODULE_101__.Z)
|
|
301458
303938
|
/* harmony export */ });
|
|
301459
303939
|
/* harmony import */ var _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
301460
|
-
/* harmony import */ var
|
|
301461
|
-
/* harmony import */ var
|
|
301462
|
-
/* harmony import */ var
|
|
303940
|
+
/* harmony import */ var _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(2194);
|
|
303941
|
+
/* harmony import */ var _src_base_functions_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(7100);
|
|
303942
|
+
/* harmony import */ var _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(6689);
|
|
301463
303943
|
/* harmony import */ var _src_ace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9869);
|
|
301464
303944
|
/* harmony import */ var _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5660);
|
|
301465
303945
|
/* harmony import */ var _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9612);
|
|
@@ -301492,135 +303972,136 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301492
303972
|
/* harmony import */ var _src_bitvavo_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(9943);
|
|
301493
303973
|
/* harmony import */ var _src_bl3p_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(9476);
|
|
301494
303974
|
/* harmony import */ var _src_blockchaincom_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(182);
|
|
301495
|
-
/* harmony import */ var
|
|
301496
|
-
/* harmony import */ var
|
|
301497
|
-
/* harmony import */ var
|
|
301498
|
-
/* harmony import */ var
|
|
301499
|
-
/* harmony import */ var
|
|
301500
|
-
/* harmony import */ var
|
|
301501
|
-
/* harmony import */ var
|
|
301502
|
-
/* harmony import */ var
|
|
301503
|
-
/* harmony import */ var
|
|
301504
|
-
/* harmony import */ var
|
|
301505
|
-
/* harmony import */ var
|
|
301506
|
-
/* harmony import */ var
|
|
301507
|
-
/* harmony import */ var
|
|
301508
|
-
/* harmony import */ var
|
|
301509
|
-
/* harmony import */ var
|
|
301510
|
-
/* harmony import */ var
|
|
301511
|
-
/* harmony import */ var
|
|
301512
|
-
/* harmony import */ var
|
|
301513
|
-
/* harmony import */ var
|
|
301514
|
-
/* harmony import */ var
|
|
301515
|
-
/* harmony import */ var
|
|
301516
|
-
/* harmony import */ var
|
|
301517
|
-
/* harmony import */ var
|
|
301518
|
-
/* harmony import */ var
|
|
301519
|
-
/* harmony import */ var
|
|
301520
|
-
/* harmony import */ var
|
|
301521
|
-
/* harmony import */ var
|
|
301522
|
-
/* harmony import */ var
|
|
301523
|
-
/* harmony import */ var
|
|
301524
|
-
/* harmony import */ var
|
|
301525
|
-
/* harmony import */ var
|
|
301526
|
-
/* harmony import */ var
|
|
301527
|
-
/* harmony import */ var
|
|
301528
|
-
/* harmony import */ var
|
|
301529
|
-
/* harmony import */ var
|
|
301530
|
-
/* harmony import */ var
|
|
301531
|
-
/* harmony import */ var
|
|
301532
|
-
/* harmony import */ var
|
|
301533
|
-
/* harmony import */ var
|
|
301534
|
-
/* harmony import */ var
|
|
301535
|
-
/* harmony import */ var
|
|
301536
|
-
/* harmony import */ var
|
|
301537
|
-
/* harmony import */ var
|
|
301538
|
-
/* harmony import */ var
|
|
301539
|
-
/* harmony import */ var
|
|
301540
|
-
/* harmony import */ var
|
|
301541
|
-
/* harmony import */ var
|
|
301542
|
-
/* harmony import */ var
|
|
301543
|
-
/* harmony import */ var
|
|
301544
|
-
/* harmony import */ var
|
|
301545
|
-
/* harmony import */ var
|
|
301546
|
-
/* harmony import */ var
|
|
301547
|
-
/* harmony import */ var
|
|
301548
|
-
/* harmony import */ var
|
|
301549
|
-
/* harmony import */ var
|
|
301550
|
-
/* harmony import */ var
|
|
301551
|
-
/* harmony import */ var
|
|
301552
|
-
/* harmony import */ var
|
|
301553
|
-
/* harmony import */ var
|
|
301554
|
-
/* harmony import */ var
|
|
301555
|
-
/* harmony import */ var
|
|
301556
|
-
/* harmony import */ var
|
|
301557
|
-
/* harmony import */ var
|
|
301558
|
-
/* harmony import */ var
|
|
301559
|
-
/* harmony import */ var
|
|
301560
|
-
/* harmony import */ var
|
|
301561
|
-
/* harmony import */ var
|
|
301562
|
-
/* harmony import */ var
|
|
301563
|
-
/* harmony import */ var
|
|
301564
|
-
/* harmony import */ var
|
|
301565
|
-
/* harmony import */ var
|
|
301566
|
-
/* harmony import */ var
|
|
301567
|
-
/* harmony import */ var
|
|
301568
|
-
/* harmony import */ var
|
|
301569
|
-
/* harmony import */ var
|
|
301570
|
-
/* harmony import */ var
|
|
301571
|
-
/* harmony import */ var
|
|
301572
|
-
/* harmony import */ var
|
|
301573
|
-
/* harmony import */ var
|
|
301574
|
-
/* harmony import */ var
|
|
301575
|
-
/* harmony import */ var
|
|
301576
|
-
/* harmony import */ var
|
|
301577
|
-
/* harmony import */ var
|
|
301578
|
-
/* harmony import */ var
|
|
301579
|
-
/* harmony import */ var
|
|
301580
|
-
/* harmony import */ var
|
|
301581
|
-
/* harmony import */ var
|
|
301582
|
-
/* harmony import */ var
|
|
301583
|
-
/* harmony import */ var
|
|
301584
|
-
/* harmony import */ var
|
|
301585
|
-
/* harmony import */ var
|
|
301586
|
-
/* harmony import */ var
|
|
301587
|
-
/* harmony import */ var
|
|
301588
|
-
/* harmony import */ var
|
|
301589
|
-
/* harmony import */ var
|
|
301590
|
-
/* harmony import */ var
|
|
301591
|
-
/* harmony import */ var
|
|
301592
|
-
/* harmony import */ var
|
|
301593
|
-
/* harmony import */ var
|
|
301594
|
-
/* harmony import */ var
|
|
301595
|
-
/* harmony import */ var
|
|
301596
|
-
/* harmony import */ var
|
|
301597
|
-
/* harmony import */ var
|
|
301598
|
-
/* harmony import */ var
|
|
301599
|
-
/* harmony import */ var
|
|
301600
|
-
/* harmony import */ var
|
|
301601
|
-
/* harmony import */ var
|
|
301602
|
-
/* harmony import */ var
|
|
301603
|
-
/* harmony import */ var
|
|
301604
|
-
/* harmony import */ var
|
|
301605
|
-
/* harmony import */ var
|
|
301606
|
-
/* harmony import */ var
|
|
301607
|
-
/* harmony import */ var
|
|
301608
|
-
/* harmony import */ var
|
|
301609
|
-
/* harmony import */ var
|
|
301610
|
-
/* harmony import */ var
|
|
301611
|
-
/* harmony import */ var
|
|
301612
|
-
/* harmony import */ var
|
|
301613
|
-
/* harmony import */ var
|
|
301614
|
-
/* harmony import */ var
|
|
301615
|
-
/* harmony import */ var
|
|
301616
|
-
/* harmony import */ var
|
|
301617
|
-
/* harmony import */ var
|
|
301618
|
-
/* harmony import */ var
|
|
301619
|
-
/* harmony import */ var
|
|
301620
|
-
/* harmony import */ var
|
|
301621
|
-
/* harmony import */ var
|
|
301622
|
-
/* harmony import */ var
|
|
301623
|
-
/* harmony import */ var
|
|
303975
|
+
/* harmony import */ var _src_blofin_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(687);
|
|
303976
|
+
/* harmony import */ var _src_btcalpha_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(6246);
|
|
303977
|
+
/* harmony import */ var _src_btcbox_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(7796);
|
|
303978
|
+
/* harmony import */ var _src_btcmarkets_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(1776);
|
|
303979
|
+
/* harmony import */ var _src_btcturk_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(6304);
|
|
303980
|
+
/* harmony import */ var _src_bybit_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(3527);
|
|
303981
|
+
/* harmony import */ var _src_cex_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(6445);
|
|
303982
|
+
/* harmony import */ var _src_coinbase_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(437);
|
|
303983
|
+
/* harmony import */ var _src_coinbasepro_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(8856);
|
|
303984
|
+
/* harmony import */ var _src_coincheck_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(2117);
|
|
303985
|
+
/* harmony import */ var _src_coinex_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(332);
|
|
303986
|
+
/* harmony import */ var _src_coinlist_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(3623);
|
|
303987
|
+
/* harmony import */ var _src_coinmate_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(9816);
|
|
303988
|
+
/* harmony import */ var _src_coinmetro_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(4759);
|
|
303989
|
+
/* harmony import */ var _src_coinone_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(7811);
|
|
303990
|
+
/* harmony import */ var _src_coinsph_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(5782);
|
|
303991
|
+
/* harmony import */ var _src_coinspot_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(7794);
|
|
303992
|
+
/* harmony import */ var _src_cryptocom_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(9129);
|
|
303993
|
+
/* harmony import */ var _src_currencycom_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(3214);
|
|
303994
|
+
/* harmony import */ var _src_delta_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(1753);
|
|
303995
|
+
/* harmony import */ var _src_deribit_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(24);
|
|
303996
|
+
/* harmony import */ var _src_digifinex_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(8846);
|
|
303997
|
+
/* harmony import */ var _src_exmo_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(1729);
|
|
303998
|
+
/* harmony import */ var _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(5788);
|
|
303999
|
+
/* harmony import */ var _src_gate_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(7290);
|
|
304000
|
+
/* harmony import */ var _src_gateio_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(7036);
|
|
304001
|
+
/* harmony import */ var _src_gemini_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(6743);
|
|
304002
|
+
/* harmony import */ var _src_hitbtc_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(4714);
|
|
304003
|
+
/* harmony import */ var _src_hitbtc3_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(4815);
|
|
304004
|
+
/* harmony import */ var _src_hollaex_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(8422);
|
|
304005
|
+
/* harmony import */ var _src_htx_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(5939);
|
|
304006
|
+
/* harmony import */ var _src_huobi_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(8146);
|
|
304007
|
+
/* harmony import */ var _src_huobijp_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(7034);
|
|
304008
|
+
/* harmony import */ var _src_idex_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(8232);
|
|
304009
|
+
/* harmony import */ var _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(9570);
|
|
304010
|
+
/* harmony import */ var _src_indodax_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(1605);
|
|
304011
|
+
/* harmony import */ var _src_kraken_js__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(9922);
|
|
304012
|
+
/* harmony import */ var _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(4470);
|
|
304013
|
+
/* harmony import */ var _src_kucoin_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(3583);
|
|
304014
|
+
/* harmony import */ var _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(1924);
|
|
304015
|
+
/* harmony import */ var _src_kuna_js__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(7732);
|
|
304016
|
+
/* harmony import */ var _src_latoken_js__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(2545);
|
|
304017
|
+
/* harmony import */ var _src_lbank_js__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(3944);
|
|
304018
|
+
/* harmony import */ var _src_luno_js__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(1758);
|
|
304019
|
+
/* harmony import */ var _src_lykke_js__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(3803);
|
|
304020
|
+
/* harmony import */ var _src_mercado_js__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(9013);
|
|
304021
|
+
/* harmony import */ var _src_mexc_js__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(6641);
|
|
304022
|
+
/* harmony import */ var _src_ndax_js__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(4531);
|
|
304023
|
+
/* harmony import */ var _src_novadax_js__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(2449);
|
|
304024
|
+
/* harmony import */ var _src_oceanex_js__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(6749);
|
|
304025
|
+
/* harmony import */ var _src_okcoin_js__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(3007);
|
|
304026
|
+
/* harmony import */ var _src_okx_js__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(4042);
|
|
304027
|
+
/* harmony import */ var _src_onetrading_js__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(6481);
|
|
304028
|
+
/* harmony import */ var _src_p2b_js__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(2466);
|
|
304029
|
+
/* harmony import */ var _src_paymium_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(7082);
|
|
304030
|
+
/* harmony import */ var _src_phemex_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(79);
|
|
304031
|
+
/* harmony import */ var _src_poloniex_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(8891);
|
|
304032
|
+
/* harmony import */ var _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(6877);
|
|
304033
|
+
/* harmony import */ var _src_probit_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(3657);
|
|
304034
|
+
/* harmony import */ var _src_timex_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(1067);
|
|
304035
|
+
/* harmony import */ var _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(5261);
|
|
304036
|
+
/* harmony import */ var _src_upbit_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(7584);
|
|
304037
|
+
/* harmony import */ var _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(3853);
|
|
304038
|
+
/* harmony import */ var _src_wazirx_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(6536);
|
|
304039
|
+
/* harmony import */ var _src_whitebit_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(5467);
|
|
304040
|
+
/* harmony import */ var _src_woo_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(517);
|
|
304041
|
+
/* harmony import */ var _src_yobit_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(3850);
|
|
304042
|
+
/* harmony import */ var _src_zaif_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(5934);
|
|
304043
|
+
/* harmony import */ var _src_zonda_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(5140);
|
|
304044
|
+
/* harmony import */ var _src_pro_alpaca_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(2467);
|
|
304045
|
+
/* harmony import */ var _src_pro_ascendex_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(2383);
|
|
304046
|
+
/* harmony import */ var _src_pro_bequant_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(8848);
|
|
304047
|
+
/* harmony import */ var _src_pro_binance_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(8764);
|
|
304048
|
+
/* harmony import */ var _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(5078);
|
|
304049
|
+
/* harmony import */ var _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(1326);
|
|
304050
|
+
/* harmony import */ var _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(1230);
|
|
304051
|
+
/* harmony import */ var _src_pro_bingx_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(6955);
|
|
304052
|
+
/* harmony import */ var _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(453);
|
|
304053
|
+
/* harmony import */ var _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(9772);
|
|
304054
|
+
/* harmony import */ var _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(588);
|
|
304055
|
+
/* harmony import */ var _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(1885);
|
|
304056
|
+
/* harmony import */ var _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(7504);
|
|
304057
|
+
/* harmony import */ var _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(2302);
|
|
304058
|
+
/* harmony import */ var _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(2191);
|
|
304059
|
+
/* harmony import */ var _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(1297);
|
|
304060
|
+
/* harmony import */ var _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(3005);
|
|
304061
|
+
/* harmony import */ var _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(2317);
|
|
304062
|
+
/* harmony import */ var _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(6977);
|
|
304063
|
+
/* harmony import */ var _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(2519);
|
|
304064
|
+
/* harmony import */ var _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(5030);
|
|
304065
|
+
/* harmony import */ var _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(5272);
|
|
304066
|
+
/* harmony import */ var _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(3414);
|
|
304067
|
+
/* harmony import */ var _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(8368);
|
|
304068
|
+
/* harmony import */ var _src_pro_coincheck_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(7891);
|
|
304069
|
+
/* harmony import */ var _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(204);
|
|
304070
|
+
/* harmony import */ var _src_pro_coinone_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(5208);
|
|
304071
|
+
/* harmony import */ var _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(6820);
|
|
304072
|
+
/* harmony import */ var _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(2952);
|
|
304073
|
+
/* harmony import */ var _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(1788);
|
|
304074
|
+
/* harmony import */ var _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(9004);
|
|
304075
|
+
/* harmony import */ var _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(8335);
|
|
304076
|
+
/* harmony import */ var _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(1465);
|
|
304077
|
+
/* harmony import */ var _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(9488);
|
|
304078
|
+
/* harmony import */ var _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(5189);
|
|
304079
|
+
/* harmony import */ var _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(8559);
|
|
304080
|
+
/* harmony import */ var _src_pro_htx_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(7474);
|
|
304081
|
+
/* harmony import */ var _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(8384);
|
|
304082
|
+
/* harmony import */ var _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(9021);
|
|
304083
|
+
/* harmony import */ var _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(3484);
|
|
304084
|
+
/* harmony import */ var _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(1311);
|
|
304085
|
+
/* harmony import */ var _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(736);
|
|
304086
|
+
/* harmony import */ var _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(449);
|
|
304087
|
+
/* harmony import */ var _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(2387);
|
|
304088
|
+
/* harmony import */ var _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(7181);
|
|
304089
|
+
/* harmony import */ var _src_pro_lbank_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(1267);
|
|
304090
|
+
/* harmony import */ var _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(627);
|
|
304091
|
+
/* harmony import */ var _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(6484);
|
|
304092
|
+
/* harmony import */ var _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(8080);
|
|
304093
|
+
/* harmony import */ var _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(7105);
|
|
304094
|
+
/* harmony import */ var _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(2214);
|
|
304095
|
+
/* harmony import */ var _src_pro_onetrading_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(9419);
|
|
304096
|
+
/* harmony import */ var _src_pro_p2b_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(8516);
|
|
304097
|
+
/* harmony import */ var _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(4360);
|
|
304098
|
+
/* harmony import */ var _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(7924);
|
|
304099
|
+
/* harmony import */ var _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(3541);
|
|
304100
|
+
/* harmony import */ var _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(9782);
|
|
304101
|
+
/* harmony import */ var _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(7614);
|
|
304102
|
+
/* harmony import */ var _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(4828);
|
|
304103
|
+
/* harmony import */ var _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(5630);
|
|
304104
|
+
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(3910);
|
|
301624
304105
|
/*
|
|
301625
304106
|
|
|
301626
304107
|
MIT License
|
|
@@ -301655,7 +304136,7 @@ SOFTWARE.
|
|
|
301655
304136
|
|
|
301656
304137
|
//-----------------------------------------------------------------------------
|
|
301657
304138
|
// this is updated by vss.js when building
|
|
301658
|
-
const version = '4.2.
|
|
304139
|
+
const version = '4.2.38';
|
|
301659
304140
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
301660
304141
|
//-----------------------------------------------------------------------------
|
|
301661
304142
|
|
|
@@ -301756,6 +304237,7 @@ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion
|
|
|
301756
304237
|
|
|
301757
304238
|
|
|
301758
304239
|
|
|
304240
|
+
|
|
301759
304241
|
|
|
301760
304242
|
|
|
301761
304243
|
// pro exchanges
|
|
@@ -301853,137 +304335,138 @@ const exchanges = {
|
|
|
301853
304335
|
'bitvavo': _src_bitvavo_js__WEBPACK_IMPORTED_MODULE_30__/* ["default"] */ .Z,
|
|
301854
304336
|
'bl3p': _src_bl3p_js__WEBPACK_IMPORTED_MODULE_31__/* ["default"] */ .Z,
|
|
301855
304337
|
'blockchaincom': _src_blockchaincom_js__WEBPACK_IMPORTED_MODULE_32__/* ["default"] */ .Z,
|
|
301856
|
-
'
|
|
301857
|
-
'
|
|
301858
|
-
'
|
|
301859
|
-
'
|
|
301860
|
-
'
|
|
301861
|
-
'
|
|
301862
|
-
'
|
|
301863
|
-
'
|
|
301864
|
-
'
|
|
301865
|
-
'
|
|
301866
|
-
'
|
|
301867
|
-
'
|
|
301868
|
-
'
|
|
301869
|
-
'
|
|
301870
|
-
'
|
|
301871
|
-
'
|
|
301872
|
-
'
|
|
301873
|
-
'
|
|
301874
|
-
'
|
|
301875
|
-
'
|
|
301876
|
-
'
|
|
301877
|
-
'
|
|
301878
|
-
'
|
|
301879
|
-
'
|
|
301880
|
-
'
|
|
301881
|
-
'
|
|
301882
|
-
'
|
|
301883
|
-
'
|
|
301884
|
-
'
|
|
301885
|
-
'
|
|
301886
|
-
'
|
|
301887
|
-
'
|
|
301888
|
-
'
|
|
301889
|
-
'
|
|
301890
|
-
'
|
|
301891
|
-
'
|
|
301892
|
-
'
|
|
301893
|
-
'
|
|
301894
|
-
'
|
|
301895
|
-
'
|
|
301896
|
-
'
|
|
301897
|
-
'
|
|
301898
|
-
'
|
|
301899
|
-
'
|
|
301900
|
-
'
|
|
301901
|
-
'
|
|
301902
|
-
'
|
|
301903
|
-
'
|
|
301904
|
-
'
|
|
301905
|
-
'
|
|
301906
|
-
'
|
|
301907
|
-
'
|
|
301908
|
-
'
|
|
301909
|
-
'
|
|
301910
|
-
'
|
|
301911
|
-
'
|
|
301912
|
-
'
|
|
301913
|
-
'
|
|
301914
|
-
'
|
|
301915
|
-
'
|
|
301916
|
-
'
|
|
301917
|
-
'
|
|
301918
|
-
'
|
|
301919
|
-
'
|
|
301920
|
-
'
|
|
301921
|
-
'
|
|
301922
|
-
'
|
|
301923
|
-
'
|
|
304338
|
+
'blofin': _src_blofin_js__WEBPACK_IMPORTED_MODULE_33__/* ["default"] */ .Z,
|
|
304339
|
+
'btcalpha': _src_btcalpha_js__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .Z,
|
|
304340
|
+
'btcbox': _src_btcbox_js__WEBPACK_IMPORTED_MODULE_35__/* ["default"] */ .Z,
|
|
304341
|
+
'btcmarkets': _src_btcmarkets_js__WEBPACK_IMPORTED_MODULE_36__/* ["default"] */ .Z,
|
|
304342
|
+
'btcturk': _src_btcturk_js__WEBPACK_IMPORTED_MODULE_37__/* ["default"] */ .Z,
|
|
304343
|
+
'bybit': _src_bybit_js__WEBPACK_IMPORTED_MODULE_38__/* ["default"] */ .Z,
|
|
304344
|
+
'cex': _src_cex_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z,
|
|
304345
|
+
'coinbase': _src_coinbase_js__WEBPACK_IMPORTED_MODULE_40__/* ["default"] */ .Z,
|
|
304346
|
+
'coinbasepro': _src_coinbasepro_js__WEBPACK_IMPORTED_MODULE_41__/* ["default"] */ .Z,
|
|
304347
|
+
'coincheck': _src_coincheck_js__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z,
|
|
304348
|
+
'coinex': _src_coinex_js__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z,
|
|
304349
|
+
'coinlist': _src_coinlist_js__WEBPACK_IMPORTED_MODULE_44__/* ["default"] */ .Z,
|
|
304350
|
+
'coinmate': _src_coinmate_js__WEBPACK_IMPORTED_MODULE_45__/* ["default"] */ .Z,
|
|
304351
|
+
'coinmetro': _src_coinmetro_js__WEBPACK_IMPORTED_MODULE_46__/* ["default"] */ .Z,
|
|
304352
|
+
'coinone': _src_coinone_js__WEBPACK_IMPORTED_MODULE_47__/* ["default"] */ .Z,
|
|
304353
|
+
'coinsph': _src_coinsph_js__WEBPACK_IMPORTED_MODULE_48__/* ["default"] */ .Z,
|
|
304354
|
+
'coinspot': _src_coinspot_js__WEBPACK_IMPORTED_MODULE_49__/* ["default"] */ .Z,
|
|
304355
|
+
'cryptocom': _src_cryptocom_js__WEBPACK_IMPORTED_MODULE_50__/* ["default"] */ .Z,
|
|
304356
|
+
'currencycom': _src_currencycom_js__WEBPACK_IMPORTED_MODULE_51__/* ["default"] */ .Z,
|
|
304357
|
+
'delta': _src_delta_js__WEBPACK_IMPORTED_MODULE_52__/* ["default"] */ .Z,
|
|
304358
|
+
'deribit': _src_deribit_js__WEBPACK_IMPORTED_MODULE_53__/* ["default"] */ .Z,
|
|
304359
|
+
'digifinex': _src_digifinex_js__WEBPACK_IMPORTED_MODULE_54__/* ["default"] */ .Z,
|
|
304360
|
+
'exmo': _src_exmo_js__WEBPACK_IMPORTED_MODULE_55__/* ["default"] */ .Z,
|
|
304361
|
+
'fmfwio': _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_56__/* ["default"] */ .Z,
|
|
304362
|
+
'gate': _src_gate_js__WEBPACK_IMPORTED_MODULE_57__/* ["default"] */ .Z,
|
|
304363
|
+
'gateio': _src_gateio_js__WEBPACK_IMPORTED_MODULE_58__/* ["default"] */ .Z,
|
|
304364
|
+
'gemini': _src_gemini_js__WEBPACK_IMPORTED_MODULE_59__/* ["default"] */ .Z,
|
|
304365
|
+
'hitbtc': _src_hitbtc_js__WEBPACK_IMPORTED_MODULE_60__/* ["default"] */ .Z,
|
|
304366
|
+
'hitbtc3': _src_hitbtc3_js__WEBPACK_IMPORTED_MODULE_61__/* ["default"] */ .Z,
|
|
304367
|
+
'hollaex': _src_hollaex_js__WEBPACK_IMPORTED_MODULE_62__/* ["default"] */ .Z,
|
|
304368
|
+
'htx': _src_htx_js__WEBPACK_IMPORTED_MODULE_63__/* ["default"] */ .Z,
|
|
304369
|
+
'huobi': _src_huobi_js__WEBPACK_IMPORTED_MODULE_64__/* ["default"] */ .Z,
|
|
304370
|
+
'huobijp': _src_huobijp_js__WEBPACK_IMPORTED_MODULE_65__/* ["default"] */ .Z,
|
|
304371
|
+
'idex': _src_idex_js__WEBPACK_IMPORTED_MODULE_66__/* ["default"] */ .Z,
|
|
304372
|
+
'independentreserve': _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_67__/* ["default"] */ .Z,
|
|
304373
|
+
'indodax': _src_indodax_js__WEBPACK_IMPORTED_MODULE_68__/* ["default"] */ .Z,
|
|
304374
|
+
'kraken': _src_kraken_js__WEBPACK_IMPORTED_MODULE_69__/* ["default"] */ .Z,
|
|
304375
|
+
'krakenfutures': _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_70__/* ["default"] */ .Z,
|
|
304376
|
+
'kucoin': _src_kucoin_js__WEBPACK_IMPORTED_MODULE_71__/* ["default"] */ .Z,
|
|
304377
|
+
'kucoinfutures': _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_72__/* ["default"] */ .Z,
|
|
304378
|
+
'kuna': _src_kuna_js__WEBPACK_IMPORTED_MODULE_73__/* ["default"] */ .Z,
|
|
304379
|
+
'latoken': _src_latoken_js__WEBPACK_IMPORTED_MODULE_74__/* ["default"] */ .Z,
|
|
304380
|
+
'lbank': _src_lbank_js__WEBPACK_IMPORTED_MODULE_75__/* ["default"] */ .Z,
|
|
304381
|
+
'luno': _src_luno_js__WEBPACK_IMPORTED_MODULE_76__/* ["default"] */ .Z,
|
|
304382
|
+
'lykke': _src_lykke_js__WEBPACK_IMPORTED_MODULE_77__/* ["default"] */ .Z,
|
|
304383
|
+
'mercado': _src_mercado_js__WEBPACK_IMPORTED_MODULE_78__/* ["default"] */ .Z,
|
|
304384
|
+
'mexc': _src_mexc_js__WEBPACK_IMPORTED_MODULE_79__/* ["default"] */ .Z,
|
|
304385
|
+
'ndax': _src_ndax_js__WEBPACK_IMPORTED_MODULE_80__/* ["default"] */ .Z,
|
|
304386
|
+
'novadax': _src_novadax_js__WEBPACK_IMPORTED_MODULE_81__/* ["default"] */ .Z,
|
|
304387
|
+
'oceanex': _src_oceanex_js__WEBPACK_IMPORTED_MODULE_82__/* ["default"] */ .Z,
|
|
304388
|
+
'okcoin': _src_okcoin_js__WEBPACK_IMPORTED_MODULE_83__/* ["default"] */ .Z,
|
|
304389
|
+
'okx': _src_okx_js__WEBPACK_IMPORTED_MODULE_84__/* ["default"] */ .Z,
|
|
304390
|
+
'onetrading': _src_onetrading_js__WEBPACK_IMPORTED_MODULE_85__/* ["default"] */ .Z,
|
|
304391
|
+
'p2b': _src_p2b_js__WEBPACK_IMPORTED_MODULE_86__/* ["default"] */ .Z,
|
|
304392
|
+
'paymium': _src_paymium_js__WEBPACK_IMPORTED_MODULE_87__/* ["default"] */ .Z,
|
|
304393
|
+
'phemex': _src_phemex_js__WEBPACK_IMPORTED_MODULE_88__/* ["default"] */ .Z,
|
|
304394
|
+
'poloniex': _src_poloniex_js__WEBPACK_IMPORTED_MODULE_89__/* ["default"] */ .Z,
|
|
304395
|
+
'poloniexfutures': _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_90__/* ["default"] */ .Z,
|
|
304396
|
+
'probit': _src_probit_js__WEBPACK_IMPORTED_MODULE_91__/* ["default"] */ .Z,
|
|
304397
|
+
'timex': _src_timex_js__WEBPACK_IMPORTED_MODULE_92__/* ["default"] */ .Z,
|
|
304398
|
+
'tokocrypto': _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_93__/* ["default"] */ .Z,
|
|
304399
|
+
'upbit': _src_upbit_js__WEBPACK_IMPORTED_MODULE_94__/* ["default"] */ .Z,
|
|
304400
|
+
'wavesexchange': _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_95__/* ["default"] */ .Z,
|
|
304401
|
+
'wazirx': _src_wazirx_js__WEBPACK_IMPORTED_MODULE_96__/* ["default"] */ .Z,
|
|
304402
|
+
'whitebit': _src_whitebit_js__WEBPACK_IMPORTED_MODULE_97__/* ["default"] */ .Z,
|
|
304403
|
+
'woo': _src_woo_js__WEBPACK_IMPORTED_MODULE_98__/* ["default"] */ .Z,
|
|
304404
|
+
'yobit': _src_yobit_js__WEBPACK_IMPORTED_MODULE_99__/* ["default"] */ .Z,
|
|
304405
|
+
'zaif': _src_zaif_js__WEBPACK_IMPORTED_MODULE_100__/* ["default"] */ .Z,
|
|
304406
|
+
'zonda': _src_zonda_js__WEBPACK_IMPORTED_MODULE_101__/* ["default"] */ .Z,
|
|
301924
304407
|
};
|
|
301925
304408
|
const pro = {
|
|
301926
|
-
'alpaca':
|
|
301927
|
-
'ascendex':
|
|
301928
|
-
'bequant':
|
|
301929
|
-
'binance':
|
|
301930
|
-
'binancecoinm':
|
|
301931
|
-
'binanceus':
|
|
301932
|
-
'binanceusdm':
|
|
301933
|
-
'bingx':
|
|
301934
|
-
'bitcoincom':
|
|
301935
|
-
'bitfinex':
|
|
301936
|
-
'bitfinex2':
|
|
301937
|
-
'bitget':
|
|
301938
|
-
'bitmart':
|
|
301939
|
-
'bitmex':
|
|
301940
|
-
'bitopro':
|
|
301941
|
-
'bitpanda':
|
|
301942
|
-
'bitrue':
|
|
301943
|
-
'bitstamp':
|
|
301944
|
-
'bitvavo':
|
|
301945
|
-
'blockchaincom':
|
|
301946
|
-
'bybit':
|
|
301947
|
-
'cex':
|
|
301948
|
-
'coinbase':
|
|
301949
|
-
'coinbasepro':
|
|
301950
|
-
'coincheck':
|
|
301951
|
-
'coinex':
|
|
301952
|
-
'coinone':
|
|
301953
|
-
'cryptocom':
|
|
301954
|
-
'currencycom':
|
|
301955
|
-
'deribit':
|
|
301956
|
-
'exmo':
|
|
301957
|
-
'gate':
|
|
301958
|
-
'gateio':
|
|
301959
|
-
'gemini':
|
|
301960
|
-
'hitbtc':
|
|
301961
|
-
'hollaex':
|
|
301962
|
-
'htx':
|
|
301963
|
-
'huobi':
|
|
301964
|
-
'huobijp':
|
|
301965
|
-
'idex':
|
|
301966
|
-
'independentreserve':
|
|
301967
|
-
'kraken':
|
|
301968
|
-
'krakenfutures':
|
|
301969
|
-
'kucoin':
|
|
301970
|
-
'kucoinfutures':
|
|
301971
|
-
'lbank':
|
|
301972
|
-
'luno':
|
|
301973
|
-
'mexc':
|
|
301974
|
-
'ndax':
|
|
301975
|
-
'okcoin':
|
|
301976
|
-
'okx':
|
|
301977
|
-
'onetrading':
|
|
301978
|
-
'p2b':
|
|
301979
|
-
'phemex':
|
|
301980
|
-
'poloniex':
|
|
301981
|
-
'poloniexfutures':
|
|
301982
|
-
'probit':
|
|
301983
|
-
'upbit':
|
|
301984
|
-
'wazirx':
|
|
301985
|
-
'whitebit':
|
|
301986
|
-
'woo':
|
|
304409
|
+
'alpaca': _src_pro_alpaca_js__WEBPACK_IMPORTED_MODULE_102__/* ["default"] */ .Z,
|
|
304410
|
+
'ascendex': _src_pro_ascendex_js__WEBPACK_IMPORTED_MODULE_103__/* ["default"] */ .Z,
|
|
304411
|
+
'bequant': _src_pro_bequant_js__WEBPACK_IMPORTED_MODULE_104__/* ["default"] */ .Z,
|
|
304412
|
+
'binance': _src_pro_binance_js__WEBPACK_IMPORTED_MODULE_105__/* ["default"] */ .Z,
|
|
304413
|
+
'binancecoinm': _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_106__/* ["default"] */ .Z,
|
|
304414
|
+
'binanceus': _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_107__/* ["default"] */ .Z,
|
|
304415
|
+
'binanceusdm': _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_108__/* ["default"] */ .Z,
|
|
304416
|
+
'bingx': _src_pro_bingx_js__WEBPACK_IMPORTED_MODULE_109__/* ["default"] */ .Z,
|
|
304417
|
+
'bitcoincom': _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_110__/* ["default"] */ .Z,
|
|
304418
|
+
'bitfinex': _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_111__/* ["default"] */ .Z,
|
|
304419
|
+
'bitfinex2': _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_112__/* ["default"] */ .Z,
|
|
304420
|
+
'bitget': _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_113__/* ["default"] */ .Z,
|
|
304421
|
+
'bitmart': _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_114__/* ["default"] */ .Z,
|
|
304422
|
+
'bitmex': _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_115__/* ["default"] */ .Z,
|
|
304423
|
+
'bitopro': _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_116__/* ["default"] */ .Z,
|
|
304424
|
+
'bitpanda': _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_117__/* ["default"] */ .Z,
|
|
304425
|
+
'bitrue': _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_118__/* ["default"] */ .Z,
|
|
304426
|
+
'bitstamp': _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_119__/* ["default"] */ .Z,
|
|
304427
|
+
'bitvavo': _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_120__/* ["default"] */ .Z,
|
|
304428
|
+
'blockchaincom': _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_121__/* ["default"] */ .Z,
|
|
304429
|
+
'bybit': _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_122__/* ["default"] */ .Z,
|
|
304430
|
+
'cex': _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_123__/* ["default"] */ .Z,
|
|
304431
|
+
'coinbase': _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_124__/* ["default"] */ .Z,
|
|
304432
|
+
'coinbasepro': _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_125__/* ["default"] */ .Z,
|
|
304433
|
+
'coincheck': _src_pro_coincheck_js__WEBPACK_IMPORTED_MODULE_126__/* ["default"] */ .Z,
|
|
304434
|
+
'coinex': _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_127__/* ["default"] */ .Z,
|
|
304435
|
+
'coinone': _src_pro_coinone_js__WEBPACK_IMPORTED_MODULE_128__/* ["default"] */ .Z,
|
|
304436
|
+
'cryptocom': _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_129__/* ["default"] */ .Z,
|
|
304437
|
+
'currencycom': _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_130__/* ["default"] */ .Z,
|
|
304438
|
+
'deribit': _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_131__/* ["default"] */ .Z,
|
|
304439
|
+
'exmo': _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_132__/* ["default"] */ .Z,
|
|
304440
|
+
'gate': _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_133__/* ["default"] */ .Z,
|
|
304441
|
+
'gateio': _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_134__/* ["default"] */ .Z,
|
|
304442
|
+
'gemini': _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_135__/* ["default"] */ .Z,
|
|
304443
|
+
'hitbtc': _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_136__/* ["default"] */ .Z,
|
|
304444
|
+
'hollaex': _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_137__/* ["default"] */ .Z,
|
|
304445
|
+
'htx': _src_pro_htx_js__WEBPACK_IMPORTED_MODULE_138__/* ["default"] */ .Z,
|
|
304446
|
+
'huobi': _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_139__/* ["default"] */ .Z,
|
|
304447
|
+
'huobijp': _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_140__/* ["default"] */ .Z,
|
|
304448
|
+
'idex': _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_141__/* ["default"] */ .Z,
|
|
304449
|
+
'independentreserve': _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_142__/* ["default"] */ .Z,
|
|
304450
|
+
'kraken': _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_143__/* ["default"] */ .Z,
|
|
304451
|
+
'krakenfutures': _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_144__/* ["default"] */ .Z,
|
|
304452
|
+
'kucoin': _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_145__/* ["default"] */ .Z,
|
|
304453
|
+
'kucoinfutures': _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_146__/* ["default"] */ .Z,
|
|
304454
|
+
'lbank': _src_pro_lbank_js__WEBPACK_IMPORTED_MODULE_147__/* ["default"] */ .Z,
|
|
304455
|
+
'luno': _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_148__/* ["default"] */ .Z,
|
|
304456
|
+
'mexc': _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_149__/* ["default"] */ .Z,
|
|
304457
|
+
'ndax': _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_150__/* ["default"] */ .Z,
|
|
304458
|
+
'okcoin': _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_151__/* ["default"] */ .Z,
|
|
304459
|
+
'okx': _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_152__/* ["default"] */ .Z,
|
|
304460
|
+
'onetrading': _src_pro_onetrading_js__WEBPACK_IMPORTED_MODULE_153__/* ["default"] */ .Z,
|
|
304461
|
+
'p2b': _src_pro_p2b_js__WEBPACK_IMPORTED_MODULE_154__/* ["default"] */ .Z,
|
|
304462
|
+
'phemex': _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_155__/* ["default"] */ .Z,
|
|
304463
|
+
'poloniex': _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_156__/* ["default"] */ .Z,
|
|
304464
|
+
'poloniexfutures': _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_157__/* ["default"] */ .Z,
|
|
304465
|
+
'probit': _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_158__/* ["default"] */ .Z,
|
|
304466
|
+
'upbit': _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_159__/* ["default"] */ .Z,
|
|
304467
|
+
'wazirx': _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_160__/* ["default"] */ .Z,
|
|
304468
|
+
'whitebit': _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_161__/* ["default"] */ .Z,
|
|
304469
|
+
'woo': _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_162__/* ["default"] */ .Z,
|
|
301987
304470
|
};
|
|
301988
304471
|
for (const exchange in pro) {
|
|
301989
304472
|
// const ccxtExchange = exchanges[exchange]
|
|
@@ -301996,7 +304479,7 @@ for (const exchange in pro) {
|
|
|
301996
304479
|
pro.exchanges = Object.keys(pro);
|
|
301997
304480
|
pro['Exchange'] = _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e; // now the same for rest and ts
|
|
301998
304481
|
//-----------------------------------------------------------------------------
|
|
301999
|
-
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise:
|
|
304482
|
+
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise: _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_163__/* .Precise */ .O, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, _src_base_functions_js__WEBPACK_IMPORTED_MODULE_164__, _src_base_errors_js__WEBPACK_IMPORTED_MODULE_165__);
|
|
302000
304483
|
|
|
302001
304484
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ccxt);
|
|
302002
304485
|
//-----------------------------------------------------------------------------
|