ccxt 4.3.61 → 4.3.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +2 -1
- package/dist/cjs/src/ace.js +34 -15
- package/dist/cjs/src/base/Exchange.js +8 -1
- package/dist/cjs/src/base/errors.js +8 -1
- package/dist/cjs/src/binance.js +50 -43
- package/dist/cjs/src/bingx.js +507 -184
- package/dist/cjs/src/bybit.js +1 -1
- package/dist/cjs/src/cryptocom.js +18 -2
- package/dist/cjs/src/mercado.js +5 -1
- package/dist/cjs/src/pro/alpaca.js +3 -3
- package/dist/cjs/src/pro/binance.js +60 -38
- package/dist/cjs/src/pro/bingx.js +2 -2
- package/dist/cjs/src/pro/bitfinex2.js +8 -5
- package/dist/cjs/src/pro/bitget.js +5 -2
- package/dist/cjs/src/pro/bitmex.js +1 -1
- package/dist/cjs/src/pro/bitopro.js +1 -1
- package/dist/cjs/src/pro/bitvavo.js +1 -1
- package/dist/cjs/src/pro/bybit.js +49 -23
- package/dist/cjs/src/pro/coinbaseexchange.js +2 -2
- package/dist/cjs/src/pro/coincheck.js +1 -1
- package/dist/cjs/src/pro/coinone.js +1 -1
- package/dist/cjs/src/pro/cryptocom.js +8 -2
- package/dist/cjs/src/pro/deribit.js +1 -1
- package/dist/cjs/src/pro/gate.js +8 -4
- package/dist/cjs/src/pro/hollaex.js +1 -1
- package/dist/cjs/src/pro/htx.js +6 -2
- package/dist/cjs/src/pro/hyperliquid.js +3 -3
- package/dist/cjs/src/pro/independentreserve.js +5 -3
- package/dist/cjs/src/pro/kraken.js +83 -5
- package/dist/cjs/src/pro/kucoin.js +1 -1
- package/dist/cjs/src/pro/mexc.js +1 -1
- package/dist/cjs/src/pro/okx.js +4 -4
- package/dist/cjs/src/pro/oxfun.js +1 -1
- package/dist/cjs/src/pro/phemex.js +1 -1
- package/dist/cjs/src/pro/poloniexfutures.js +5 -1
- package/dist/cjs/src/pro/upbit.js +1 -1
- package/dist/cjs/src/pro/vertex.js +2 -2
- package/dist/cjs/src/pro/whitebit.js +1 -1
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/pro/woofipro.js +1 -1
- package/dist/cjs/src/tradeogre.js +1 -1
- package/dist/cjs/src/woo.js +313 -81
- package/dist/cjs/src/xt.js +1 -1
- package/js/ccxt.d.ts +3 -3
- package/js/ccxt.js +3 -3
- package/js/src/abstract/cryptocom.d.ts +11 -0
- package/js/src/abstract/woo.d.ts +3 -0
- package/js/src/ace.js +34 -15
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +8 -1
- package/js/src/base/errorHierarchy.d.ts +3 -1
- package/js/src/base/errorHierarchy.js +3 -1
- package/js/src/base/errors.d.ts +5 -1
- package/js/src/base/errors.js +8 -2
- package/js/src/base/ws/Client.d.ts +1 -1
- package/js/src/binance.js +50 -43
- package/js/src/bingx.d.ts +1 -0
- package/js/src/bingx.js +507 -184
- package/js/src/bybit.js +1 -1
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/cryptocom.js +18 -2
- package/js/src/mercado.js +5 -1
- package/js/src/pro/alpaca.js +3 -3
- package/js/src/pro/binance.d.ts +1 -0
- package/js/src/pro/binance.js +61 -39
- package/js/src/pro/bingx.js +2 -2
- package/js/src/pro/bitfinex2.js +9 -6
- package/js/src/pro/bitget.js +6 -3
- package/js/src/pro/bitmex.js +1 -1
- package/js/src/pro/bitopro.js +1 -1
- package/js/src/pro/bitvavo.js +1 -1
- package/js/src/pro/bybit.d.ts +1 -0
- package/js/src/pro/bybit.js +49 -23
- package/js/src/pro/coinbaseexchange.js +2 -2
- package/js/src/pro/coincheck.js +1 -1
- package/js/src/pro/coinone.js +1 -1
- package/js/src/pro/cryptocom.js +9 -3
- package/js/src/pro/deribit.js +1 -1
- package/js/src/pro/gate.js +9 -5
- package/js/src/pro/hollaex.js +1 -1
- package/js/src/pro/htx.js +7 -3
- package/js/src/pro/hyperliquid.js +3 -3
- package/js/src/pro/independentreserve.js +6 -4
- package/js/src/pro/kraken.d.ts +3 -1
- package/js/src/pro/kraken.js +84 -6
- package/js/src/pro/kucoin.js +1 -1
- package/js/src/pro/mexc.js +1 -1
- package/js/src/pro/okx.js +5 -5
- package/js/src/pro/oxfun.js +1 -1
- package/js/src/pro/phemex.js +1 -1
- package/js/src/pro/poloniexfutures.js +6 -2
- package/js/src/pro/upbit.js +1 -1
- package/js/src/pro/vertex.js +2 -2
- package/js/src/pro/whitebit.js +1 -1
- package/js/src/pro/woo.js +1 -1
- package/js/src/pro/woofipro.js +1 -1
- package/js/src/tradeogre.js +1 -1
- package/js/src/woo.d.ts +5 -1
- package/js/src/woo.js +313 -81
- package/js/src/xt.d.ts +3 -3
- package/js/src/xt.js +1 -1
- package/package.json +1 -1
package/dist/cjs/src/woo.js
CHANGED
|
@@ -30,7 +30,7 @@ class woo extends woo$1 {
|
|
|
30
30
|
'swap': true,
|
|
31
31
|
'future': false,
|
|
32
32
|
'option': false,
|
|
33
|
-
'addMargin':
|
|
33
|
+
'addMargin': true,
|
|
34
34
|
'cancelAllOrders': true,
|
|
35
35
|
'cancelAllOrdersAfter': true,
|
|
36
36
|
'cancelOrder': true,
|
|
@@ -200,6 +200,7 @@ class woo extends woo$1 {
|
|
|
200
200
|
'positions': 3.33,
|
|
201
201
|
'position/{symbol}': 3.33,
|
|
202
202
|
'client/transaction_history': 60,
|
|
203
|
+
'client/futures_leverage': 60,
|
|
203
204
|
},
|
|
204
205
|
'post': {
|
|
205
206
|
'order': 5,
|
|
@@ -212,6 +213,8 @@ class woo extends woo$1 {
|
|
|
212
213
|
'client/account_mode': 120,
|
|
213
214
|
'client/position_mode': 5,
|
|
214
215
|
'client/leverage': 120,
|
|
216
|
+
'client/futures_leverage': 30,
|
|
217
|
+
'client/isolated_margin': 30,
|
|
215
218
|
},
|
|
216
219
|
'delete': {
|
|
217
220
|
'order': 1,
|
|
@@ -935,16 +938,18 @@ class woo extends woo$1 {
|
|
|
935
938
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
936
939
|
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
937
940
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
941
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated', default 'cross'
|
|
938
942
|
* @param {float} [params.triggerPrice] The price a trigger order is triggered at
|
|
939
943
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
|
|
940
944
|
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
941
945
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
|
|
942
946
|
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
943
|
-
* @param {float} [params.algoType] 'STOP'or 'TRAILING_STOP' or 'OCO' or 'CLOSE_POSITION'
|
|
947
|
+
* @param {float} [params.algoType] 'STOP' or 'TRAILING_STOP' or 'OCO' or 'CLOSE_POSITION'
|
|
944
948
|
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
945
949
|
* @param {string} [params.trailingAmount] the quote amount to trail away from the current market price
|
|
946
950
|
* @param {string} [params.trailingPercent] the percent to trail away from the current market price
|
|
947
951
|
* @param {string} [params.trailingTriggerPrice] the price to trigger a trailing order, default uses the price argument
|
|
952
|
+
* @param {string} [params.position_side] 'SHORT' or 'LONG' - if position mode is HEDGE_MODE and the trading involves futures, then is required, otherwise this parameter is not required
|
|
948
953
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
949
954
|
*/
|
|
950
955
|
const reduceOnly = this.safeBool2(params, 'reduceOnly', 'reduce_only');
|
|
@@ -957,6 +962,11 @@ class woo extends woo$1 {
|
|
|
957
962
|
'symbol': market['id'],
|
|
958
963
|
'side': orderSide,
|
|
959
964
|
};
|
|
965
|
+
let marginMode = undefined;
|
|
966
|
+
[marginMode, params] = this.handleMarginModeAndParams('createOrder', params);
|
|
967
|
+
if (marginMode !== undefined) {
|
|
968
|
+
request['margin_mode'] = this.encodeMarginMode(marginMode);
|
|
969
|
+
}
|
|
960
970
|
const stopPrice = this.safeNumber2(params, 'triggerPrice', 'stopPrice');
|
|
961
971
|
const stopLoss = this.safeValue(params, 'stopLoss');
|
|
962
972
|
const takeProfit = this.safeValue(params, 'takeProfit');
|
|
@@ -1118,6 +1128,13 @@ class woo extends woo$1 {
|
|
|
1118
1128
|
order['type'] = type;
|
|
1119
1129
|
return order;
|
|
1120
1130
|
}
|
|
1131
|
+
encodeMarginMode(mode) {
|
|
1132
|
+
const modes = {
|
|
1133
|
+
'cross': 'CROSS',
|
|
1134
|
+
'isolated': 'ISOLATED',
|
|
1135
|
+
};
|
|
1136
|
+
return this.safeString(modes, mode, mode);
|
|
1137
|
+
}
|
|
1121
1138
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1122
1139
|
/**
|
|
1123
1140
|
* @method
|
|
@@ -2879,61 +2896,204 @@ class woo extends woo$1 {
|
|
|
2879
2896
|
* @see https://docs.woo.org/#get-account-information-new
|
|
2880
2897
|
* @param {string} symbol unified market symbol
|
|
2881
2898
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2899
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
2900
|
+
* @param {string} [params.position_mode] *for swap markets only* 'ONE_WAY' or 'HEDGE_MODE'
|
|
2882
2901
|
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
2883
2902
|
*/
|
|
2884
2903
|
await this.loadMarkets();
|
|
2885
2904
|
const market = this.market(symbol);
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2905
|
+
let response = undefined;
|
|
2906
|
+
if (market['spot']) {
|
|
2907
|
+
response = await this.v3PrivateGetAccountinfo(params);
|
|
2908
|
+
//
|
|
2909
|
+
// {
|
|
2910
|
+
// "success": true,
|
|
2911
|
+
// "data": {
|
|
2912
|
+
// "applicationId": "dsa",
|
|
2913
|
+
// "account": "dsa",
|
|
2914
|
+
// "alias": "haha",
|
|
2915
|
+
// "accountMode": "MARGIN",
|
|
2916
|
+
// "leverage": 1,
|
|
2917
|
+
// "takerFeeRate": 1,
|
|
2918
|
+
// "makerFeeRate": 1,
|
|
2919
|
+
// "interestRate": 1,
|
|
2920
|
+
// "futuresTakerFeeRate": 1,
|
|
2921
|
+
// "futuresMakerFeeRate": 1,
|
|
2922
|
+
// "otpauth": true,
|
|
2923
|
+
// "marginRatio": 1,
|
|
2924
|
+
// "openMarginRatio": 1,
|
|
2925
|
+
// "initialMarginRatio": 1,
|
|
2926
|
+
// "maintenanceMarginRatio": 1,
|
|
2927
|
+
// "totalCollateral": 1,
|
|
2928
|
+
// "freeCollateral": 1,
|
|
2929
|
+
// "totalAccountValue": 1,
|
|
2930
|
+
// "totalVaultValue": 1,
|
|
2931
|
+
// "totalStakingValue": 1
|
|
2932
|
+
// },
|
|
2933
|
+
// "timestamp": 1673323685109
|
|
2934
|
+
// }
|
|
2935
|
+
//
|
|
2936
|
+
}
|
|
2937
|
+
else if (market['swap']) {
|
|
2938
|
+
const request = {
|
|
2939
|
+
'symbol': market['id'],
|
|
2940
|
+
};
|
|
2941
|
+
let marginMode = undefined;
|
|
2942
|
+
[marginMode, params] = this.handleMarginModeAndParams('fetchLeverage', params, 'cross');
|
|
2943
|
+
request['margin_mode'] = this.encodeMarginMode(marginMode);
|
|
2944
|
+
response = await this.v1PrivateGetClientFuturesLeverage(this.extend(request, params));
|
|
2945
|
+
//
|
|
2946
|
+
// HEDGE_MODE
|
|
2947
|
+
// {
|
|
2948
|
+
// "success": true,
|
|
2949
|
+
// "data":
|
|
2950
|
+
// {
|
|
2951
|
+
// "symbol": "PERP_ETH_USDT",
|
|
2952
|
+
// "default_margin_mode": "CROSS",
|
|
2953
|
+
// "position_mode": "HEDGE_MODE",
|
|
2954
|
+
// "details": [
|
|
2955
|
+
// {
|
|
2956
|
+
// "position_side": "LONG",
|
|
2957
|
+
// "leverage": 10
|
|
2958
|
+
// },
|
|
2959
|
+
// {
|
|
2960
|
+
// "position_side": "SHORT",
|
|
2961
|
+
// "leverage": 10
|
|
2962
|
+
// }
|
|
2963
|
+
// ]
|
|
2964
|
+
// },
|
|
2965
|
+
// "timestamp": 1720886470482
|
|
2966
|
+
// }
|
|
2967
|
+
//
|
|
2968
|
+
// ONE_WAY
|
|
2969
|
+
// {
|
|
2970
|
+
// "success": true,
|
|
2971
|
+
// "data": {
|
|
2972
|
+
// "symbol": "PERP_ETH_USDT",
|
|
2973
|
+
// "default_margin_mode": "ISOLATED",
|
|
2974
|
+
// "position_mode": "ONE_WAY",
|
|
2975
|
+
// "details": [
|
|
2976
|
+
// {
|
|
2977
|
+
// "position_side": "BOTH",
|
|
2978
|
+
// "leverage": 10
|
|
2979
|
+
// }
|
|
2980
|
+
// ]
|
|
2981
|
+
// },
|
|
2982
|
+
// "timestamp": 1720886810317
|
|
2983
|
+
// }
|
|
2984
|
+
//
|
|
2985
|
+
}
|
|
2986
|
+
else {
|
|
2987
|
+
throw new errors.NotSupported(this.id + ' fetchLeverage() is not supported for ' + market['type'] + ' markets');
|
|
2988
|
+
}
|
|
2915
2989
|
const data = this.safeDict(response, 'data', {});
|
|
2916
2990
|
return this.parseLeverage(data, market);
|
|
2917
2991
|
}
|
|
2918
2992
|
parseLeverage(leverage, market = undefined) {
|
|
2919
|
-
const
|
|
2993
|
+
const marketId = this.safeString(leverage, 'symbol');
|
|
2994
|
+
market = this.safeMarket(marketId, market);
|
|
2995
|
+
const marginMode = this.safeStringLower(leverage, 'default_margin_mode');
|
|
2996
|
+
const spotLeverage = this.safeInteger(leverage, 'leverage');
|
|
2997
|
+
let longLeverage = spotLeverage;
|
|
2998
|
+
let shortLeverage = spotLeverage;
|
|
2999
|
+
const details = this.safeList(leverage, 'details', []);
|
|
3000
|
+
for (let i = 0; i < details.length; i++) {
|
|
3001
|
+
const position = this.safeDict(details, i, {});
|
|
3002
|
+
const positionLeverage = this.safeInteger(position, 'leverage');
|
|
3003
|
+
const side = this.safeString(position, 'position_side');
|
|
3004
|
+
if (side === 'BOTH') {
|
|
3005
|
+
longLeverage = positionLeverage;
|
|
3006
|
+
shortLeverage = positionLeverage;
|
|
3007
|
+
}
|
|
3008
|
+
else if (side === 'LONG') {
|
|
3009
|
+
longLeverage = positionLeverage;
|
|
3010
|
+
}
|
|
3011
|
+
else if (side === 'SHORT') {
|
|
3012
|
+
shortLeverage = positionLeverage;
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
2920
3015
|
return {
|
|
2921
3016
|
'info': leverage,
|
|
2922
3017
|
'symbol': market['symbol'],
|
|
2923
|
-
'marginMode':
|
|
2924
|
-
'longLeverage':
|
|
2925
|
-
'shortLeverage':
|
|
3018
|
+
'marginMode': marginMode,
|
|
3019
|
+
'longLeverage': longLeverage,
|
|
3020
|
+
'shortLeverage': shortLeverage,
|
|
2926
3021
|
};
|
|
2927
3022
|
}
|
|
2928
3023
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
3024
|
+
/**
|
|
3025
|
+
* @method
|
|
3026
|
+
* @name woo#setLeverage
|
|
3027
|
+
* @description set the level of leverage for a market
|
|
3028
|
+
* @see https://docs.woo.org/#update-leverage-setting
|
|
3029
|
+
* @see https://docs.woo.org/#update-futures-leverage-setting
|
|
3030
|
+
* @param {float} leverage the rate of leverage (1, 2, 3, 4 or 5 for spot markets, 1, 2, 3, 4, 5, 10, 15, 20 for swap markets)
|
|
3031
|
+
* @param {string} [symbo] unified market symbol (is mandatory for swap markets)
|
|
3032
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3033
|
+
* @param {string} [params.marginMode] *for swap markets only* 'cross' or 'isolated'
|
|
3034
|
+
* @param {string} [params.position_side] *for swap markets only* 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode.
|
|
3035
|
+
* @returns {object} response from the exchange
|
|
3036
|
+
*/
|
|
2929
3037
|
await this.loadMarkets();
|
|
2930
|
-
if ((leverage < 1) || (leverage > 20)) {
|
|
2931
|
-
throw new errors.BadRequest(this.id + ' leverage should be between 1 and 20');
|
|
2932
|
-
}
|
|
2933
3038
|
const request = {
|
|
2934
3039
|
'leverage': leverage,
|
|
2935
3040
|
};
|
|
2936
|
-
|
|
3041
|
+
let market = undefined;
|
|
3042
|
+
if (symbol !== undefined) {
|
|
3043
|
+
market = this.market(symbol);
|
|
3044
|
+
}
|
|
3045
|
+
if ((symbol === undefined) || market['spot']) {
|
|
3046
|
+
return await this.v1PrivatePostClientLeverage(this.extend(request, params));
|
|
3047
|
+
}
|
|
3048
|
+
else if (market['swap']) {
|
|
3049
|
+
request['symbol'] = market['id'];
|
|
3050
|
+
let marginMode = undefined;
|
|
3051
|
+
[marginMode, params] = this.handleMarginModeAndParams('fetchLeverage', params, 'cross');
|
|
3052
|
+
request['margin_mode'] = this.encodeMarginMode(marginMode);
|
|
3053
|
+
return await this.v1PrivatePostClientFuturesLeverage(this.extend(request, params));
|
|
3054
|
+
}
|
|
3055
|
+
else {
|
|
3056
|
+
throw new errors.NotSupported(this.id + ' fetchLeverage() is not supported for ' + market['type'] + ' markets');
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
async addMargin(symbol, amount, params = {}) {
|
|
3060
|
+
/**
|
|
3061
|
+
* @method
|
|
3062
|
+
* @name woo#addMargin
|
|
3063
|
+
* @description add margin
|
|
3064
|
+
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3065
|
+
* @param {string} symbol unified market symbol
|
|
3066
|
+
* @param {float} amount amount of margin to add
|
|
3067
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3068
|
+
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3069
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3070
|
+
*/
|
|
3071
|
+
return await this.modifyMarginHelper(symbol, amount, 'ADD', params);
|
|
3072
|
+
}
|
|
3073
|
+
async reduceMargin(symbol, amount, params = {}) {
|
|
3074
|
+
/**
|
|
3075
|
+
* @method
|
|
3076
|
+
* @name woo#reduceMargin
|
|
3077
|
+
* @description remove margin from a position
|
|
3078
|
+
* @see https://docs.woo.org/#update-isolated-margin-setting
|
|
3079
|
+
* @param {string} symbol unified market symbol
|
|
3080
|
+
* @param {float} amount amount of margin to remove
|
|
3081
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3082
|
+
* @param {string} [params.position_side] 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode
|
|
3083
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3084
|
+
*/
|
|
3085
|
+
return await this.modifyMarginHelper(symbol, amount, 'REDUCE', params);
|
|
3086
|
+
}
|
|
3087
|
+
async modifyMarginHelper(symbol, amount, type, params = {}) {
|
|
3088
|
+
await this.loadMarkets();
|
|
3089
|
+
const market = this.market(symbol);
|
|
3090
|
+
const request = {
|
|
3091
|
+
'symbol': market['id'],
|
|
3092
|
+
'adjust_token': 'USDT',
|
|
3093
|
+
'adjust_amount': amount,
|
|
3094
|
+
'action': type,
|
|
3095
|
+
};
|
|
3096
|
+
return await this.v1PrivatePostClientIsolatedMargin(this.extend(request, params));
|
|
2937
3097
|
}
|
|
2938
3098
|
async fetchPosition(symbol = undefined, params = {}) {
|
|
2939
3099
|
await this.loadMarkets();
|
|
@@ -2944,17 +3104,26 @@ class woo extends woo$1 {
|
|
|
2944
3104
|
const response = await this.v1PrivateGetPositionSymbol(this.extend(request, params));
|
|
2945
3105
|
//
|
|
2946
3106
|
// {
|
|
2947
|
-
// "symbol":"
|
|
2948
|
-
// "
|
|
2949
|
-
// "
|
|
2950
|
-
// "
|
|
2951
|
-
// "average_open_price":
|
|
2952
|
-
// "
|
|
2953
|
-
// "
|
|
2954
|
-
// "
|
|
2955
|
-
// "
|
|
2956
|
-
// "
|
|
2957
|
-
// "
|
|
3107
|
+
// "symbol": "PERP_ETH_USDT",
|
|
3108
|
+
// "position_side": "BOTH",
|
|
3109
|
+
// "leverage": 10,
|
|
3110
|
+
// "margin_mode": "CROSS",
|
|
3111
|
+
// "average_open_price": 3139.9,
|
|
3112
|
+
// "isolated_margin_amount": 0.0,
|
|
3113
|
+
// "isolated_margin_token": "",
|
|
3114
|
+
// "opening_time": "1720627963.094",
|
|
3115
|
+
// "mark_price": 3155.19169891,
|
|
3116
|
+
// "pending_short_qty": 0.0,
|
|
3117
|
+
// "pending_long_qty": 0.0,
|
|
3118
|
+
// "holding": -0.7,
|
|
3119
|
+
// "pnl_24_h": 0.0,
|
|
3120
|
+
// "est_liq_price": 9107.40055552,
|
|
3121
|
+
// "settle_price": 3151.0319904,
|
|
3122
|
+
// "success": true,
|
|
3123
|
+
// "fee_24_h": 0.0,
|
|
3124
|
+
// "isolated_frozen_long": 0.0,
|
|
3125
|
+
// "isolated_frozen_short": 0.0,
|
|
3126
|
+
// "timestamp": "1720867502.544"
|
|
2958
3127
|
// }
|
|
2959
3128
|
//
|
|
2960
3129
|
return this.parsePosition(response, market);
|
|
@@ -2965,24 +3134,54 @@ class woo extends woo$1 {
|
|
|
2965
3134
|
//
|
|
2966
3135
|
// {
|
|
2967
3136
|
// "success": true,
|
|
2968
|
-
// "data":
|
|
3137
|
+
// "data":
|
|
3138
|
+
// {
|
|
2969
3139
|
// "positions": [
|
|
2970
3140
|
// {
|
|
2971
|
-
// "symbol": "
|
|
2972
|
-
// "holding": 1,
|
|
2973
|
-
// "pendingLongQty": 0,
|
|
2974
|
-
// "pendingShortQty":
|
|
2975
|
-
// "settlePrice":
|
|
2976
|
-
// "averageOpenPrice":
|
|
2977
|
-
// "pnl24H":
|
|
2978
|
-
// "fee24H": 1,
|
|
2979
|
-
// "markPrice":
|
|
2980
|
-
// "estLiqPrice":
|
|
2981
|
-
// "timestamp":
|
|
3141
|
+
// "symbol": "PERP_ETH_USDT",
|
|
3142
|
+
// "holding": -1.0,
|
|
3143
|
+
// "pendingLongQty": 0.0,
|
|
3144
|
+
// "pendingShortQty": 0.0,
|
|
3145
|
+
// "settlePrice": 3143.2,
|
|
3146
|
+
// "averageOpenPrice": 3143.2,
|
|
3147
|
+
// "pnl24H": 0.0,
|
|
3148
|
+
// "fee24H": 1.5716,
|
|
3149
|
+
// "markPrice": 3134.97984158,
|
|
3150
|
+
// "estLiqPrice": 3436.176349,
|
|
3151
|
+
// "timestamp": 1720628031.463,
|
|
3152
|
+
// "adlQuantile": 5,
|
|
3153
|
+
// "positionSide": "BOTH",
|
|
3154
|
+
// "marginMode": "ISOLATED",
|
|
3155
|
+
// "isolatedMarginToken": "USDT",
|
|
3156
|
+
// "isolatedMarginAmount": 314.62426,
|
|
3157
|
+
// "isolatedFrozenLong": 0.0,
|
|
3158
|
+
// "isolatedFrozenShort": 0.0,
|
|
3159
|
+
// "leverage": 10
|
|
3160
|
+
// },
|
|
3161
|
+
// {
|
|
3162
|
+
// "symbol": "PERP_SOL_USDT",
|
|
3163
|
+
// "holding": -1.0,
|
|
3164
|
+
// "pendingLongQty": 0.0,
|
|
3165
|
+
// "pendingShortQty": 0.0,
|
|
3166
|
+
// "settlePrice": 141.89933923,
|
|
3167
|
+
// "averageOpenPrice": 171.38,
|
|
3168
|
+
// "pnl24H": 0.0,
|
|
3169
|
+
// "fee24H": 0.0,
|
|
3170
|
+
// "markPrice": 141.65155427,
|
|
3171
|
+
// "estLiqPrice": 4242.73548551,
|
|
3172
|
+
// "timestamp": 1720616702.68,
|
|
3173
|
+
// "adlQuantile": 5,
|
|
3174
|
+
// "positionSide": "BOTH",
|
|
3175
|
+
// "marginMode": "CROSS",
|
|
3176
|
+
// "isolatedMarginToken": "",
|
|
3177
|
+
// "isolatedMarginAmount": 0.0,
|
|
3178
|
+
// "isolatedFrozenLong": 0.0,
|
|
3179
|
+
// "isolatedFrozenShort": 0.0,
|
|
3180
|
+
// "leverage": 10
|
|
2982
3181
|
// }
|
|
2983
3182
|
// ]
|
|
2984
3183
|
// },
|
|
2985
|
-
// "timestamp":
|
|
3184
|
+
// "timestamp": 1720628675078
|
|
2986
3185
|
// }
|
|
2987
3186
|
//
|
|
2988
3187
|
const result = this.safeDict(response, 'data', {});
|
|
@@ -2991,18 +3190,51 @@ class woo extends woo$1 {
|
|
|
2991
3190
|
}
|
|
2992
3191
|
parsePosition(position, market = undefined) {
|
|
2993
3192
|
//
|
|
3193
|
+
// v1PrivateGetPositionSymbol
|
|
3194
|
+
// {
|
|
3195
|
+
// "symbol": "PERP_ETH_USDT",
|
|
3196
|
+
// "position_side": "BOTH",
|
|
3197
|
+
// "leverage": 10,
|
|
3198
|
+
// "margin_mode": "CROSS",
|
|
3199
|
+
// "average_open_price": 3139.9,
|
|
3200
|
+
// "isolated_margin_amount": 0.0,
|
|
3201
|
+
// "isolated_margin_token": "",
|
|
3202
|
+
// "opening_time": "1720627963.094",
|
|
3203
|
+
// "mark_price": 3155.19169891,
|
|
3204
|
+
// "pending_short_qty": 0.0,
|
|
3205
|
+
// "pending_long_qty": 0.0,
|
|
3206
|
+
// "holding": -0.7,
|
|
3207
|
+
// "pnl_24_h": 0.0,
|
|
3208
|
+
// "est_liq_price": 9107.40055552,
|
|
3209
|
+
// "settle_price": 3151.0319904,
|
|
3210
|
+
// "success": true,
|
|
3211
|
+
// "fee_24_h": 0.0,
|
|
3212
|
+
// "isolated_frozen_long": 0.0,
|
|
3213
|
+
// "isolated_frozen_short": 0.0,
|
|
3214
|
+
// "timestamp": "1720867502.544"
|
|
3215
|
+
// }
|
|
3216
|
+
//
|
|
3217
|
+
// v3PrivateGetPositions
|
|
2994
3218
|
// {
|
|
2995
|
-
// "symbol": "
|
|
2996
|
-
// "holding": 1,
|
|
2997
|
-
// "pendingLongQty": 0,
|
|
2998
|
-
// "pendingShortQty":
|
|
2999
|
-
// "settlePrice":
|
|
3000
|
-
// "averageOpenPrice":
|
|
3001
|
-
// "pnl24H":
|
|
3002
|
-
// "fee24H": 1,
|
|
3003
|
-
// "markPrice":
|
|
3004
|
-
// "estLiqPrice":
|
|
3005
|
-
// "timestamp":
|
|
3219
|
+
// "symbol": "PERP_ETH_USDT",
|
|
3220
|
+
// "holding": -1.0,
|
|
3221
|
+
// "pendingLongQty": 0.0, // todo: check
|
|
3222
|
+
// "pendingShortQty": 0.0, // todo: check
|
|
3223
|
+
// "settlePrice": 3143.2,
|
|
3224
|
+
// "averageOpenPrice": 3143.2,
|
|
3225
|
+
// "pnl24H": 0.0, // todo: check
|
|
3226
|
+
// "fee24H": 1.5716, // todo: check
|
|
3227
|
+
// "markPrice": 3134.97984158,
|
|
3228
|
+
// "estLiqPrice": 3436.176349,
|
|
3229
|
+
// "timestamp": 1720628031.463,
|
|
3230
|
+
// "adlQuantile": 5,
|
|
3231
|
+
// "positionSide": "BOTH",
|
|
3232
|
+
// "marginMode": "ISOLATED",
|
|
3233
|
+
// "isolatedMarginToken": "USDT", // todo: check
|
|
3234
|
+
// "isolatedMarginAmount": 314.62426, // todo: check
|
|
3235
|
+
// "isolatedFrozenLong": 0.0, // todo: check
|
|
3236
|
+
// "isolatedFrozenShort": 0.0, // todo: check
|
|
3237
|
+
// "leverage": 10
|
|
3006
3238
|
// }
|
|
3007
3239
|
//
|
|
3008
3240
|
const contract = this.safeString(position, 'symbol');
|
|
@@ -3016,13 +3248,14 @@ class woo extends woo$1 {
|
|
|
3016
3248
|
side = 'short';
|
|
3017
3249
|
}
|
|
3018
3250
|
const contractSize = this.safeString(market, 'contractSize');
|
|
3019
|
-
const markPrice = this.
|
|
3251
|
+
const markPrice = this.safeString2(position, 'markPrice', 'mark_price');
|
|
3020
3252
|
const timestamp = this.safeTimestamp(position, 'timestamp');
|
|
3021
|
-
const entryPrice = this.
|
|
3253
|
+
const entryPrice = this.safeString2(position, 'averageOpenPrice', 'average_open_price');
|
|
3022
3254
|
const priceDifference = Precise["default"].stringSub(markPrice, entryPrice);
|
|
3023
3255
|
const unrealisedPnl = Precise["default"].stringMul(priceDifference, size);
|
|
3024
3256
|
size = Precise["default"].stringAbs(size);
|
|
3025
3257
|
const notional = Precise["default"].stringMul(size, markPrice);
|
|
3258
|
+
const positionSide = this.safeString(position, 'positionSide'); // 'SHORT' or 'LONG' for hedged, 'BOTH' for non-hedged
|
|
3026
3259
|
return this.safePosition({
|
|
3027
3260
|
'info': position,
|
|
3028
3261
|
'id': undefined,
|
|
@@ -3036,20 +3269,19 @@ class woo extends woo$1 {
|
|
|
3036
3269
|
'maintenanceMarginPercentage': undefined,
|
|
3037
3270
|
'entryPrice': this.parseNumber(entryPrice),
|
|
3038
3271
|
'notional': this.parseNumber(notional),
|
|
3039
|
-
'leverage':
|
|
3272
|
+
'leverage': this.safeNumber(position, 'leverage'),
|
|
3040
3273
|
'unrealizedPnl': this.parseNumber(unrealisedPnl),
|
|
3041
3274
|
'contracts': this.parseNumber(size),
|
|
3042
3275
|
'contractSize': this.parseNumber(contractSize),
|
|
3043
3276
|
'marginRatio': undefined,
|
|
3044
|
-
'liquidationPrice': this.
|
|
3277
|
+
'liquidationPrice': this.safeNumber2(position, 'estLiqPrice', 'est_liq_price'),
|
|
3045
3278
|
'markPrice': this.parseNumber(markPrice),
|
|
3046
3279
|
'lastPrice': undefined,
|
|
3047
3280
|
'collateral': undefined,
|
|
3048
|
-
'marginMode': '
|
|
3049
|
-
'marginType': undefined,
|
|
3281
|
+
'marginMode': this.safeStringLower2(position, 'marginMode', 'margin_mode'),
|
|
3050
3282
|
'side': side,
|
|
3051
3283
|
'percentage': undefined,
|
|
3052
|
-
'hedged':
|
|
3284
|
+
'hedged': positionSide !== 'BOTH',
|
|
3053
3285
|
'stopLossPrice': undefined,
|
|
3054
3286
|
'takeProfitPrice': undefined,
|
|
3055
3287
|
});
|
package/dist/cjs/src/xt.js
CHANGED
|
@@ -4781,7 +4781,7 @@ class xt extends xt$1 {
|
|
|
4781
4781
|
if (isUndefinedBody) {
|
|
4782
4782
|
if (urlencoded) {
|
|
4783
4783
|
url += '?' + urlencoded;
|
|
4784
|
-
payloadString += '#' + method + '#' + payload + '#' +
|
|
4784
|
+
payloadString += '#' + method + '#' + payload + '#' + this.rawencode(this.keysort(query));
|
|
4785
4785
|
}
|
|
4786
4786
|
else {
|
|
4787
4787
|
payloadString += '#' + method + '#' + payload;
|
package/js/ccxt.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Precise } from './src/base/Precise.js';
|
|
|
3
3
|
import * as functions from './src/base/functions.js';
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers } from './src/base/types.js';
|
|
6
|
-
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.3.
|
|
6
|
+
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
|
|
7
|
+
declare const version = "4.3.62";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -546,5 +546,5 @@ declare const ccxt: {
|
|
|
546
546
|
zaif: typeof zaif;
|
|
547
547
|
zonda: typeof zonda;
|
|
548
548
|
} & typeof functions & typeof errors;
|
|
549
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
549
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
550
550
|
export default ccxt;
|
package/js/ccxt.js
CHANGED
|
@@ -35,10 +35,10 @@ import { Exchange } from './src/base/Exchange.js';
|
|
|
35
35
|
import { Precise } from './src/base/Precise.js';
|
|
36
36
|
import * as functions from './src/base/functions.js';
|
|
37
37
|
import * as errors from './src/base/errors.js';
|
|
38
|
-
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
|
|
38
|
+
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.3.
|
|
41
|
+
const version = '4.3.63';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -410,6 +410,6 @@ pro.exchanges = Object.keys(pro);
|
|
|
410
410
|
pro['Exchange'] = Exchange; // now the same for rest and ts
|
|
411
411
|
//-----------------------------------------------------------------------------
|
|
412
412
|
const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
|
|
413
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
413
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
414
414
|
export default ccxt;
|
|
415
415
|
//-----------------------------------------------------------------------------
|
|
@@ -10,6 +10,7 @@ interface Exchange {
|
|
|
10
10
|
v1PublicGetPublicGetValuations(params?: {}): Promise<implicitReturnType>;
|
|
11
11
|
v1PublicGetPublicGetExpiredSettlementPrice(params?: {}): Promise<implicitReturnType>;
|
|
12
12
|
v1PublicGetPublicGetInsurance(params?: {}): Promise<implicitReturnType>;
|
|
13
|
+
v1PublicPostPublicStakingGetConversionRate(params?: {}): Promise<implicitReturnType>;
|
|
13
14
|
v1PrivatePostPrivateSetCancelOnDisconnect(params?: {}): Promise<implicitReturnType>;
|
|
14
15
|
v1PrivatePostPrivateGetCancelOnDisconnect(params?: {}): Promise<implicitReturnType>;
|
|
15
16
|
v1PrivatePostPrivateUserBalance(params?: {}): Promise<implicitReturnType>;
|
|
@@ -36,6 +37,16 @@ interface Exchange {
|
|
|
36
37
|
v1PrivatePostPrivateGetAccounts(params?: {}): Promise<implicitReturnType>;
|
|
37
38
|
v1PrivatePostPrivateGetWithdrawalHistory(params?: {}): Promise<implicitReturnType>;
|
|
38
39
|
v1PrivatePostPrivateGetDepositHistory(params?: {}): Promise<implicitReturnType>;
|
|
40
|
+
v1PrivatePostPrivateStakingStake(params?: {}): Promise<implicitReturnType>;
|
|
41
|
+
v1PrivatePostPrivateStakingUnstake(params?: {}): Promise<implicitReturnType>;
|
|
42
|
+
v1PrivatePostPrivateStakingGetStakingPosition(params?: {}): Promise<implicitReturnType>;
|
|
43
|
+
v1PrivatePostPrivateStakingGetStakingInstruments(params?: {}): Promise<implicitReturnType>;
|
|
44
|
+
v1PrivatePostPrivateStakingGetOpenStake(params?: {}): Promise<implicitReturnType>;
|
|
45
|
+
v1PrivatePostPrivateStakingGetStakeHistory(params?: {}): Promise<implicitReturnType>;
|
|
46
|
+
v1PrivatePostPrivateStakingGetRewardHistory(params?: {}): Promise<implicitReturnType>;
|
|
47
|
+
v1PrivatePostPrivateStakingConvert(params?: {}): Promise<implicitReturnType>;
|
|
48
|
+
v1PrivatePostPrivateStakingGetOpenConvert(params?: {}): Promise<implicitReturnType>;
|
|
49
|
+
v1PrivatePostPrivateStakingGetConvertHistory(params?: {}): Promise<implicitReturnType>;
|
|
39
50
|
v2PublicGetPublicAuth(params?: {}): Promise<implicitReturnType>;
|
|
40
51
|
v2PublicGetPublicGetInstruments(params?: {}): Promise<implicitReturnType>;
|
|
41
52
|
v2PublicGetPublicGetBook(params?: {}): Promise<implicitReturnType>;
|