ccxt 4.2.85 → 4.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/ccxt.browser.js +1132 -432
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +11 -1
- package/dist/cjs/src/binance.js +14 -1
- package/dist/cjs/src/bingx.js +71 -20
- package/dist/cjs/src/bitbank.js +19 -23
- package/dist/cjs/src/bitfinex.js +3 -0
- package/dist/cjs/src/bitfinex2.js +16 -1
- package/dist/cjs/src/bitflyer.js +19 -0
- package/dist/cjs/src/bitget.js +15 -1
- package/dist/cjs/src/bitopro.js +3 -0
- package/dist/cjs/src/bitrue.js +13 -7
- package/dist/cjs/src/bitvavo.js +3 -0
- package/dist/cjs/src/btcmarkets.js +1 -1
- package/dist/cjs/src/btcturk.js +2 -1
- package/dist/cjs/src/coinex.js +576 -302
- package/dist/cjs/src/currencycom.js +1 -1
- package/dist/cjs/src/delta.js +3 -1
- package/dist/cjs/src/digifinex.js +4 -2
- package/dist/cjs/src/exmo.js +11 -12
- package/dist/cjs/src/gate.js +5 -2
- package/dist/cjs/src/hitbtc.js +26 -2
- package/dist/cjs/src/htx.js +2 -2
- package/dist/cjs/src/huobijp.js +1 -1
- package/dist/cjs/src/hyperliquid.js +249 -12
- package/dist/cjs/src/idex.js +11 -12
- package/dist/cjs/src/krakenfutures.js +2 -6
- package/dist/cjs/src/lbank.js +3 -0
- package/dist/cjs/src/oceanex.js +1 -1
- package/dist/cjs/src/okcoin.js +3 -1
- package/dist/cjs/src/okx.js +24 -10
- package/dist/cjs/src/phemex.js +3 -1
- package/dist/cjs/src/pro/bitget.js +1 -0
- package/dist/cjs/src/pro/kucoin.js +11 -6
- package/dist/cjs/src/wazirx.js +1 -1
- package/dist/cjs/src/zonda.js +3 -0
- package/examples/js/benchmark.js +104 -0
- package/examples/ts/benchmark.ts +134 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/coinex.d.ts +232 -123
- package/js/src/ascendex.d.ts +5 -12
- package/js/src/ascendex.js +11 -1
- package/js/src/base/Exchange.d.ts +13 -13
- package/js/src/base/types.d.ts +11 -0
- package/js/src/binance.d.ts +4 -11
- package/js/src/binance.js +14 -1
- package/js/src/bingx.d.ts +5 -2
- package/js/src/bingx.js +71 -20
- package/js/src/bitbank.js +19 -23
- package/js/src/bitfinex.js +3 -0
- package/js/src/bitfinex2.d.ts +3 -17
- package/js/src/bitfinex2.js +16 -1
- package/js/src/bitflyer.d.ts +1 -0
- package/js/src/bitflyer.js +20 -1
- package/js/src/bitget.d.ts +5 -12
- package/js/src/bitget.js +15 -1
- package/js/src/bitopro.js +3 -0
- package/js/src/bitrue.d.ts +3 -17
- package/js/src/bitrue.js +13 -7
- package/js/src/bitvavo.js +3 -0
- package/js/src/btcmarkets.js +1 -1
- package/js/src/btcturk.js +2 -1
- package/js/src/coinex.d.ts +5 -12
- package/js/src/coinex.js +576 -302
- package/js/src/currencycom.js +1 -1
- package/js/src/delta.d.ts +5 -37
- package/js/src/delta.js +3 -1
- package/js/src/digifinex.d.ts +5 -13
- package/js/src/digifinex.js +4 -2
- package/js/src/exmo.d.ts +5 -37
- package/js/src/exmo.js +11 -12
- package/js/src/gate.d.ts +5 -33
- package/js/src/gate.js +5 -2
- package/js/src/hitbtc.d.ts +5 -12
- package/js/src/hitbtc.js +26 -2
- package/js/src/htx.js +2 -2
- package/js/src/huobijp.js +1 -1
- package/js/src/hyperliquid.d.ts +7 -4
- package/js/src/hyperliquid.js +249 -12
- package/js/src/idex.js +11 -12
- package/js/src/krakenfutures.js +2 -6
- package/js/src/kucoinfutures.d.ts +2 -2
- package/js/src/lbank.js +3 -0
- package/js/src/mexc.d.ts +3 -3
- package/js/src/oceanex.js +1 -1
- package/js/src/okcoin.js +3 -1
- package/js/src/okx.d.ts +5 -33
- package/js/src/okx.js +24 -10
- package/js/src/phemex.d.ts +3 -11
- package/js/src/phemex.js +3 -1
- package/js/src/pro/bitget.js +1 -0
- package/js/src/pro/kucoin.js +11 -6
- package/js/src/wazirx.js +1 -1
- package/js/src/zonda.js +3 -0
- package/package.json +3 -2
- package/skip-tests.json +7 -3
|
@@ -1,129 +1,238 @@
|
|
|
1
1
|
import { implicitReturnType } from '../base/types.js';
|
|
2
2
|
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
3
3
|
interface Exchange {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
4
|
+
v1PublicGetAmmMarket(params?: {}): Promise<implicitReturnType>;
|
|
5
|
+
v1PublicGetCommonCurrencyRate(params?: {}): Promise<implicitReturnType>;
|
|
6
|
+
v1PublicGetCommonAssetConfig(params?: {}): Promise<implicitReturnType>;
|
|
7
|
+
v1PublicGetCommonMaintainInfo(params?: {}): Promise<implicitReturnType>;
|
|
8
|
+
v1PublicGetCommonTempMaintainInfo(params?: {}): Promise<implicitReturnType>;
|
|
9
|
+
v1PublicGetMarginMarket(params?: {}): Promise<implicitReturnType>;
|
|
10
|
+
v1PublicGetMarketInfo(params?: {}): Promise<implicitReturnType>;
|
|
11
|
+
v1PublicGetMarketList(params?: {}): Promise<implicitReturnType>;
|
|
12
|
+
v1PublicGetMarketTicker(params?: {}): Promise<implicitReturnType>;
|
|
13
|
+
v1PublicGetMarketTickerAll(params?: {}): Promise<implicitReturnType>;
|
|
14
|
+
v1PublicGetMarketDepth(params?: {}): Promise<implicitReturnType>;
|
|
15
|
+
v1PublicGetMarketDeals(params?: {}): Promise<implicitReturnType>;
|
|
16
|
+
v1PublicGetMarketKline(params?: {}): Promise<implicitReturnType>;
|
|
17
|
+
v1PublicGetMarketDetail(params?: {}): Promise<implicitReturnType>;
|
|
18
|
+
v1PrivateGetAccountAmmBalance(params?: {}): Promise<implicitReturnType>;
|
|
19
|
+
v1PrivateGetAccountInvestmentBalance(params?: {}): Promise<implicitReturnType>;
|
|
20
|
+
v1PrivateGetAccountBalanceHistory(params?: {}): Promise<implicitReturnType>;
|
|
21
|
+
v1PrivateGetAccountMarketFee(params?: {}): Promise<implicitReturnType>;
|
|
22
|
+
v1PrivateGetBalanceCoinDeposit(params?: {}): Promise<implicitReturnType>;
|
|
23
|
+
v1PrivateGetBalanceCoinWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
24
|
+
v1PrivateGetBalanceInfo(params?: {}): Promise<implicitReturnType>;
|
|
25
|
+
v1PrivateGetBalanceDepositAddressCoinType(params?: {}): Promise<implicitReturnType>;
|
|
26
|
+
v1PrivateGetContractTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
27
|
+
v1PrivateGetCreditInfo(params?: {}): Promise<implicitReturnType>;
|
|
28
|
+
v1PrivateGetCreditBalance(params?: {}): Promise<implicitReturnType>;
|
|
29
|
+
v1PrivateGetInvestmentTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
30
|
+
v1PrivateGetMarginAccount(params?: {}): Promise<implicitReturnType>;
|
|
31
|
+
v1PrivateGetMarginConfig(params?: {}): Promise<implicitReturnType>;
|
|
32
|
+
v1PrivateGetMarginLoanHistory(params?: {}): Promise<implicitReturnType>;
|
|
33
|
+
v1PrivateGetMarginTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
34
|
+
v1PrivateGetOrderDeals(params?: {}): Promise<implicitReturnType>;
|
|
35
|
+
v1PrivateGetOrderFinished(params?: {}): Promise<implicitReturnType>;
|
|
36
|
+
v1PrivateGetOrderPending(params?: {}): Promise<implicitReturnType>;
|
|
37
|
+
v1PrivateGetOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
38
|
+
v1PrivateGetOrderStatusBatch(params?: {}): Promise<implicitReturnType>;
|
|
39
|
+
v1PrivateGetOrderUserDeals(params?: {}): Promise<implicitReturnType>;
|
|
40
|
+
v1PrivateGetOrderStopFinished(params?: {}): Promise<implicitReturnType>;
|
|
41
|
+
v1PrivateGetOrderStopPending(params?: {}): Promise<implicitReturnType>;
|
|
42
|
+
v1PrivateGetOrderUserTradeFee(params?: {}): Promise<implicitReturnType>;
|
|
43
|
+
v1PrivateGetOrderMarketTradeInfo(params?: {}): Promise<implicitReturnType>;
|
|
44
|
+
v1PrivateGetSubAccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
45
|
+
v1PrivateGetSubAccountTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
46
|
+
v1PrivateGetSubAccountAuthApi(params?: {}): Promise<implicitReturnType>;
|
|
47
|
+
v1PrivateGetSubAccountAuthApiUserAuthId(params?: {}): Promise<implicitReturnType>;
|
|
48
|
+
v1PrivatePostBalanceCoinWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
49
|
+
v1PrivatePostContractBalanceTransfer(params?: {}): Promise<implicitReturnType>;
|
|
50
|
+
v1PrivatePostMarginFlat(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
v1PrivatePostMarginLoan(params?: {}): Promise<implicitReturnType>;
|
|
52
|
+
v1PrivatePostMarginTransfer(params?: {}): Promise<implicitReturnType>;
|
|
53
|
+
v1PrivatePostOrderLimitBatch(params?: {}): Promise<implicitReturnType>;
|
|
54
|
+
v1PrivatePostOrderIoc(params?: {}): Promise<implicitReturnType>;
|
|
55
|
+
v1PrivatePostOrderLimit(params?: {}): Promise<implicitReturnType>;
|
|
56
|
+
v1PrivatePostOrderMarket(params?: {}): Promise<implicitReturnType>;
|
|
57
|
+
v1PrivatePostOrderModify(params?: {}): Promise<implicitReturnType>;
|
|
58
|
+
v1PrivatePostOrderStopLimit(params?: {}): Promise<implicitReturnType>;
|
|
59
|
+
v1PrivatePostOrderStopMarket(params?: {}): Promise<implicitReturnType>;
|
|
60
|
+
v1PrivatePostOrderStopModify(params?: {}): Promise<implicitReturnType>;
|
|
61
|
+
v1PrivatePostSubAccountTransfer(params?: {}): Promise<implicitReturnType>;
|
|
62
|
+
v1PrivatePostSubAccountRegister(params?: {}): Promise<implicitReturnType>;
|
|
63
|
+
v1PrivatePostSubAccountUnfrozen(params?: {}): Promise<implicitReturnType>;
|
|
64
|
+
v1PrivatePostSubAccountFrozen(params?: {}): Promise<implicitReturnType>;
|
|
65
|
+
v1PrivatePostSubAccountAuthApi(params?: {}): Promise<implicitReturnType>;
|
|
66
|
+
v1PrivatePutBalanceDepositAddressCoinType(params?: {}): Promise<implicitReturnType>;
|
|
67
|
+
v1PrivatePutSubAccountUnfrozen(params?: {}): Promise<implicitReturnType>;
|
|
68
|
+
v1PrivatePutSubAccountFrozen(params?: {}): Promise<implicitReturnType>;
|
|
69
|
+
v1PrivatePutSubAccountAuthApiUserAuthId(params?: {}): Promise<implicitReturnType>;
|
|
70
|
+
v1PrivatePutV1AccountSettings(params?: {}): Promise<implicitReturnType>;
|
|
71
|
+
v1PrivateDeleteBalanceCoinWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
72
|
+
v1PrivateDeleteOrderPendingBatch(params?: {}): Promise<implicitReturnType>;
|
|
73
|
+
v1PrivateDeleteOrderPending(params?: {}): Promise<implicitReturnType>;
|
|
74
|
+
v1PrivateDeleteOrderStopPending(params?: {}): Promise<implicitReturnType>;
|
|
75
|
+
v1PrivateDeleteOrderStopPendingId(params?: {}): Promise<implicitReturnType>;
|
|
76
|
+
v1PrivateDeleteOrderPendingByClientId(params?: {}): Promise<implicitReturnType>;
|
|
77
|
+
v1PrivateDeleteOrderStopPendingByClientId(params?: {}): Promise<implicitReturnType>;
|
|
78
|
+
v1PrivateDeleteSubAccountAuthApiUserAuthId(params?: {}): Promise<implicitReturnType>;
|
|
79
|
+
v1PrivateDeleteSubAccountAuthorizeId(params?: {}): Promise<implicitReturnType>;
|
|
80
|
+
v1PerpetualPublicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
81
|
+
v1PerpetualPublicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
82
|
+
v1PerpetualPublicGetMarketList(params?: {}): Promise<implicitReturnType>;
|
|
83
|
+
v1PerpetualPublicGetMarketLimitConfig(params?: {}): Promise<implicitReturnType>;
|
|
84
|
+
v1PerpetualPublicGetMarketTicker(params?: {}): Promise<implicitReturnType>;
|
|
85
|
+
v1PerpetualPublicGetMarketTickerAll(params?: {}): Promise<implicitReturnType>;
|
|
86
|
+
v1PerpetualPublicGetMarketDepth(params?: {}): Promise<implicitReturnType>;
|
|
87
|
+
v1PerpetualPublicGetMarketDeals(params?: {}): Promise<implicitReturnType>;
|
|
88
|
+
v1PerpetualPublicGetMarketFundingHistory(params?: {}): Promise<implicitReturnType>;
|
|
89
|
+
v1PerpetualPublicGetMarketKline(params?: {}): Promise<implicitReturnType>;
|
|
90
|
+
v1PerpetualPrivateGetMarketUserDeals(params?: {}): Promise<implicitReturnType>;
|
|
91
|
+
v1PerpetualPrivateGetAssetQuery(params?: {}): Promise<implicitReturnType>;
|
|
92
|
+
v1PerpetualPrivateGetOrderPending(params?: {}): Promise<implicitReturnType>;
|
|
93
|
+
v1PerpetualPrivateGetOrderFinished(params?: {}): Promise<implicitReturnType>;
|
|
94
|
+
v1PerpetualPrivateGetOrderStopFinished(params?: {}): Promise<implicitReturnType>;
|
|
95
|
+
v1PerpetualPrivateGetOrderStopPending(params?: {}): Promise<implicitReturnType>;
|
|
96
|
+
v1PerpetualPrivateGetOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
97
|
+
v1PerpetualPrivateGetOrderStopStatus(params?: {}): Promise<implicitReturnType>;
|
|
98
|
+
v1PerpetualPrivateGetPositionFinished(params?: {}): Promise<implicitReturnType>;
|
|
99
|
+
v1PerpetualPrivateGetPositionPending(params?: {}): Promise<implicitReturnType>;
|
|
100
|
+
v1PerpetualPrivateGetPositionFunding(params?: {}): Promise<implicitReturnType>;
|
|
101
|
+
v1PerpetualPrivateGetPositionAdlHistory(params?: {}): Promise<implicitReturnType>;
|
|
102
|
+
v1PerpetualPrivateGetMarketPreference(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
v1PerpetualPrivateGetPositionMarginHistory(params?: {}): Promise<implicitReturnType>;
|
|
104
|
+
v1PerpetualPrivateGetPositionSettleHistory(params?: {}): Promise<implicitReturnType>;
|
|
105
|
+
v1PerpetualPrivatePostMarketAdjustLeverage(params?: {}): Promise<implicitReturnType>;
|
|
106
|
+
v1PerpetualPrivatePostMarketPositionExpect(params?: {}): Promise<implicitReturnType>;
|
|
107
|
+
v1PerpetualPrivatePostOrderPutLimit(params?: {}): Promise<implicitReturnType>;
|
|
108
|
+
v1PerpetualPrivatePostOrderPutMarket(params?: {}): Promise<implicitReturnType>;
|
|
109
|
+
v1PerpetualPrivatePostOrderPutStopLimit(params?: {}): Promise<implicitReturnType>;
|
|
110
|
+
v1PerpetualPrivatePostOrderPutStopMarket(params?: {}): Promise<implicitReturnType>;
|
|
111
|
+
v1PerpetualPrivatePostOrderModify(params?: {}): Promise<implicitReturnType>;
|
|
112
|
+
v1PerpetualPrivatePostOrderModifyStop(params?: {}): Promise<implicitReturnType>;
|
|
113
|
+
v1PerpetualPrivatePostOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
114
|
+
v1PerpetualPrivatePostOrderCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
115
|
+
v1PerpetualPrivatePostOrderCancelBatch(params?: {}): Promise<implicitReturnType>;
|
|
116
|
+
v1PerpetualPrivatePostOrderCancelStop(params?: {}): Promise<implicitReturnType>;
|
|
117
|
+
v1PerpetualPrivatePostOrderCancelStopAll(params?: {}): Promise<implicitReturnType>;
|
|
118
|
+
v1PerpetualPrivatePostOrderCloseLimit(params?: {}): Promise<implicitReturnType>;
|
|
119
|
+
v1PerpetualPrivatePostOrderCloseMarket(params?: {}): Promise<implicitReturnType>;
|
|
120
|
+
v1PerpetualPrivatePostPositionAdjustMargin(params?: {}): Promise<implicitReturnType>;
|
|
121
|
+
v1PerpetualPrivatePostPositionStopLoss(params?: {}): Promise<implicitReturnType>;
|
|
122
|
+
v1PerpetualPrivatePostPositionTakeProfit(params?: {}): Promise<implicitReturnType>;
|
|
123
|
+
v1PerpetualPrivatePostPositionMarketClose(params?: {}): Promise<implicitReturnType>;
|
|
124
|
+
v1PerpetualPrivatePostOrderCancelByClientId(params?: {}): Promise<implicitReturnType>;
|
|
125
|
+
v1PerpetualPrivatePostOrderCancelStopByClientId(params?: {}): Promise<implicitReturnType>;
|
|
126
|
+
v1PerpetualPrivatePostMarketPreference(params?: {}): Promise<implicitReturnType>;
|
|
127
|
+
v2PublicGetMaintainInfo(params?: {}): Promise<implicitReturnType>;
|
|
128
|
+
v2PublicGetPing(params?: {}): Promise<implicitReturnType>;
|
|
129
|
+
v2PublicGetTime(params?: {}): Promise<implicitReturnType>;
|
|
130
|
+
v2PublicGetSpotMarket(params?: {}): Promise<implicitReturnType>;
|
|
131
|
+
v2PublicGetSpotTicker(params?: {}): Promise<implicitReturnType>;
|
|
132
|
+
v2PublicGetSpotDepth(params?: {}): Promise<implicitReturnType>;
|
|
133
|
+
v2PublicGetSpotDeals(params?: {}): Promise<implicitReturnType>;
|
|
134
|
+
v2PublicGetSpotKline(params?: {}): Promise<implicitReturnType>;
|
|
135
|
+
v2PublicGetSpotIndex(params?: {}): Promise<implicitReturnType>;
|
|
136
|
+
v2PublicGetFuturesMarket(params?: {}): Promise<implicitReturnType>;
|
|
137
|
+
v2PublicGetFuturesTicker(params?: {}): Promise<implicitReturnType>;
|
|
138
|
+
v2PublicGetFuturesDepth(params?: {}): Promise<implicitReturnType>;
|
|
139
|
+
v2PublicGetFuturesDeals(params?: {}): Promise<implicitReturnType>;
|
|
140
|
+
v2PublicGetFuturesKline(params?: {}): Promise<implicitReturnType>;
|
|
141
|
+
v2PublicGetFuturesIndex(params?: {}): Promise<implicitReturnType>;
|
|
142
|
+
v2PublicGetFuturesFundingRate(params?: {}): Promise<implicitReturnType>;
|
|
143
|
+
v2PublicGetFuturesFundingRateHistory(params?: {}): Promise<implicitReturnType>;
|
|
144
|
+
v2PublicGetFuturesPositionLevel(params?: {}): Promise<implicitReturnType>;
|
|
145
|
+
v2PublicGetFuturesLiquidationHistory(params?: {}): Promise<implicitReturnType>;
|
|
146
|
+
v2PublicGetFuturesBasisHistory(params?: {}): Promise<implicitReturnType>;
|
|
147
|
+
v2PrivateGetAccountSubs(params?: {}): Promise<implicitReturnType>;
|
|
148
|
+
v2PrivateGetAccountSubsApiDetail(params?: {}): Promise<implicitReturnType>;
|
|
149
|
+
v2PrivateGetAccountSubsInfo(params?: {}): Promise<implicitReturnType>;
|
|
150
|
+
v2PrivateGetAccountSubsApi(params?: {}): Promise<implicitReturnType>;
|
|
151
|
+
v2PrivateGetAccountSubsTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
152
|
+
v2PrivateGetAccountSubsSpotBalance(params?: {}): Promise<implicitReturnType>;
|
|
153
|
+
v2PrivateGetAccountTradeFeeRate(params?: {}): Promise<implicitReturnType>;
|
|
154
|
+
v2PrivateGetAssetsSpotBalance(params?: {}): Promise<implicitReturnType>;
|
|
155
|
+
v2PrivateGetAssetsFuturesBalance(params?: {}): Promise<implicitReturnType>;
|
|
156
|
+
v2PrivateGetAssetsMarginBalance(params?: {}): Promise<implicitReturnType>;
|
|
157
|
+
v2PrivateGetAssetsFinancialBalance(params?: {}): Promise<implicitReturnType>;
|
|
158
|
+
v2PrivateGetAssetsAmmLiquidity(params?: {}): Promise<implicitReturnType>;
|
|
159
|
+
v2PrivateGetAssetsCreditInfo(params?: {}): Promise<implicitReturnType>;
|
|
160
|
+
v2PrivateGetAssetsMarginBorrowHistory(params?: {}): Promise<implicitReturnType>;
|
|
161
|
+
v2PrivateGetAssetsMarginInterestLimit(params?: {}): Promise<implicitReturnType>;
|
|
162
|
+
v2PrivateGetAssetsDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
163
|
+
v2PrivateGetAssetsDepositHistory(params?: {}): Promise<implicitReturnType>;
|
|
164
|
+
v2PrivateGetAssetsWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
165
|
+
v2PrivateGetAssetsDepositWithdrawConfig(params?: {}): Promise<implicitReturnType>;
|
|
166
|
+
v2PrivateGetAssetsTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
167
|
+
v2PrivateGetSpotOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
168
|
+
v2PrivateGetSpotBatchOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
169
|
+
v2PrivateGetSpotPendingOrder(params?: {}): Promise<implicitReturnType>;
|
|
170
|
+
v2PrivateGetSpotFinishedOrder(params?: {}): Promise<implicitReturnType>;
|
|
171
|
+
v2PrivateGetSpotPendingStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
172
|
+
v2PrivateGetSpotFinishedStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
173
|
+
v2PrivateGetSpotUserDeals(params?: {}): Promise<implicitReturnType>;
|
|
174
|
+
v2PrivateGetSpotOrderDeals(params?: {}): Promise<implicitReturnType>;
|
|
175
|
+
v2PrivateGetFuturesOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
176
|
+
v2PrivateGetFuturesBatchOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
177
|
+
v2PrivateGetFuturesPendingOrder(params?: {}): Promise<implicitReturnType>;
|
|
178
|
+
v2PrivateGetFuturesFinishedOrder(params?: {}): Promise<implicitReturnType>;
|
|
179
|
+
v2PrivateGetFuturesPendingStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
180
|
+
v2PrivateGetFuturesFinishedStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
181
|
+
v2PrivateGetFuturesUserDeals(params?: {}): Promise<implicitReturnType>;
|
|
182
|
+
v2PrivateGetFuturesOrderDeals(params?: {}): Promise<implicitReturnType>;
|
|
183
|
+
v2PrivateGetFuturesPendingPosition(params?: {}): Promise<implicitReturnType>;
|
|
184
|
+
v2PrivateGetFuturesFinishedPosition(params?: {}): Promise<implicitReturnType>;
|
|
185
|
+
v2PrivateGetFuturesPositionMarginHistory(params?: {}): Promise<implicitReturnType>;
|
|
186
|
+
v2PrivateGetFuturesPositionFundingHistory(params?: {}): Promise<implicitReturnType>;
|
|
187
|
+
v2PrivateGetFuturesPositionAdlHistory(params?: {}): Promise<implicitReturnType>;
|
|
188
|
+
v2PrivateGetFuturesPositionSettleHistory(params?: {}): Promise<implicitReturnType>;
|
|
189
|
+
v2PrivatePostAccountSubs(params?: {}): Promise<implicitReturnType>;
|
|
190
|
+
v2PrivatePostAccountSubsFrozen(params?: {}): Promise<implicitReturnType>;
|
|
191
|
+
v2PrivatePostAccountSubsUnfrozen(params?: {}): Promise<implicitReturnType>;
|
|
192
|
+
v2PrivatePostAccountSubsApi(params?: {}): Promise<implicitReturnType>;
|
|
193
|
+
v2PrivatePostAccountSubsEditApi(params?: {}): Promise<implicitReturnType>;
|
|
194
|
+
v2PrivatePostAccountSubsDeleteApi(params?: {}): Promise<implicitReturnType>;
|
|
195
|
+
v2PrivatePostAccountSubsTransfer(params?: {}): Promise<implicitReturnType>;
|
|
196
|
+
v2PrivatePostAccountSettings(params?: {}): Promise<implicitReturnType>;
|
|
197
|
+
v2PrivatePostAssetsMarginBorrow(params?: {}): Promise<implicitReturnType>;
|
|
198
|
+
v2PrivatePostAssetsMarginRepay(params?: {}): Promise<implicitReturnType>;
|
|
199
|
+
v2PrivatePostAssetsRenewalDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
200
|
+
v2PrivatePostAssetsWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
201
|
+
v2PrivatePostAssetsCancelWithdraw(params?: {}): Promise<implicitReturnType>;
|
|
202
|
+
v2PrivatePostAssetsTransfer(params?: {}): Promise<implicitReturnType>;
|
|
203
|
+
v2PrivatePostAssetsAmmAddLiquidity(params?: {}): Promise<implicitReturnType>;
|
|
204
|
+
v2PrivatePostAssetsAmmRemoveLiquidity(params?: {}): Promise<implicitReturnType>;
|
|
205
|
+
v2PrivatePostSpotOrder(params?: {}): Promise<implicitReturnType>;
|
|
206
|
+
v2PrivatePostSpotStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
207
|
+
v2PrivatePostSpotBatchOrder(params?: {}): Promise<implicitReturnType>;
|
|
208
|
+
v2PrivatePostSpotBatchStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
209
|
+
v2PrivatePostSpotModifyOrder(params?: {}): Promise<implicitReturnType>;
|
|
210
|
+
v2PrivatePostSpotModifyStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
211
|
+
v2PrivatePostSpotCancelAllOrder(params?: {}): Promise<implicitReturnType>;
|
|
212
|
+
v2PrivatePostSpotCancelOrder(params?: {}): Promise<implicitReturnType>;
|
|
213
|
+
v2PrivatePostSpotCancelStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
214
|
+
v2PrivatePostSpotCancelBatchOrder(params?: {}): Promise<implicitReturnType>;
|
|
215
|
+
v2PrivatePostSpotCancelBatchStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
216
|
+
v2PrivatePostSpotCancelOrderByClientId(params?: {}): Promise<implicitReturnType>;
|
|
217
|
+
v2PrivatePostSpotCancelStopOrderByClientId(params?: {}): Promise<implicitReturnType>;
|
|
218
|
+
v2PrivatePostFuturesOrder(params?: {}): Promise<implicitReturnType>;
|
|
219
|
+
v2PrivatePostFuturesStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
220
|
+
v2PrivatePostFuturesBatchOrder(params?: {}): Promise<implicitReturnType>;
|
|
221
|
+
v2PrivatePostFuturesBatchStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
222
|
+
v2PrivatePostFuturesModifyOrder(params?: {}): Promise<implicitReturnType>;
|
|
223
|
+
v2PrivatePostFuturesModifyStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
224
|
+
v2PrivatePostFuturesCancelAllOrder(params?: {}): Promise<implicitReturnType>;
|
|
225
|
+
v2PrivatePostFuturesCancelOrder(params?: {}): Promise<implicitReturnType>;
|
|
226
|
+
v2PrivatePostFuturesCancelStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
227
|
+
v2PrivatePostFuturesCancelBatchOrder(params?: {}): Promise<implicitReturnType>;
|
|
228
|
+
v2PrivatePostFuturesCancelBatchStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
229
|
+
v2PrivatePostFuturesCancelOrderByClientId(params?: {}): Promise<implicitReturnType>;
|
|
230
|
+
v2PrivatePostFuturesCancelStopOrderByClientId(params?: {}): Promise<implicitReturnType>;
|
|
231
|
+
v2PrivatePostFuturesClosePosition(params?: {}): Promise<implicitReturnType>;
|
|
232
|
+
v2PrivatePostFuturesAdjustPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
233
|
+
v2PrivatePostFuturesAdjustPositionLeverage(params?: {}): Promise<implicitReturnType>;
|
|
234
|
+
v2PrivatePostFuturesSetPositionStopLoss(params?: {}): Promise<implicitReturnType>;
|
|
235
|
+
v2PrivatePostFuturesSetPositionTakeProfit(params?: {}): Promise<implicitReturnType>;
|
|
127
236
|
}
|
|
128
237
|
declare abstract class Exchange extends _Exchange {
|
|
129
238
|
}
|
package/js/src/ascendex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/ascendex.js';
|
|
2
|
-
import type { TransferEntry, FundingHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Strings, Num, Currency, Market, Leverage, Leverages, Account, MarginModes, MarginMode } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, FundingHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Strings, Num, Currency, Market, Leverage, Leverages, Account, MarginModes, MarginMode, MarginModification } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class ascendex
|
|
5
5
|
* @augments Exchange
|
|
@@ -70,17 +70,10 @@ export default class ascendex extends Exchange {
|
|
|
70
70
|
fundingDatetime: string;
|
|
71
71
|
};
|
|
72
72
|
fetchFundingRates(symbols?: Strings, params?: {}): Promise<any>;
|
|
73
|
-
modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<
|
|
74
|
-
parseMarginModification(data: any, market?: Market):
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
amount: any;
|
|
78
|
-
code: string;
|
|
79
|
-
symbol: string;
|
|
80
|
-
status: string;
|
|
81
|
-
};
|
|
82
|
-
reduceMargin(symbol: string, amount: any, params?: {}): Promise<any>;
|
|
83
|
-
addMargin(symbol: string, amount: any, params?: {}): Promise<any>;
|
|
73
|
+
modifyMarginHelper(symbol: string, amount: any, type: any, params?: {}): Promise<MarginModification>;
|
|
74
|
+
parseMarginModification(data: any, market?: Market): MarginModification;
|
|
75
|
+
reduceMargin(symbol: string, amount: any, params?: {}): Promise<MarginModification>;
|
|
76
|
+
addMargin(symbol: string, amount: any, params?: {}): Promise<MarginModification>;
|
|
84
77
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
85
78
|
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
|
|
86
79
|
fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<{}>;
|
package/js/src/ascendex.js
CHANGED
|
@@ -2876,15 +2876,25 @@ export default class ascendex extends Exchange {
|
|
|
2876
2876
|
});
|
|
2877
2877
|
}
|
|
2878
2878
|
parseMarginModification(data, market = undefined) {
|
|
2879
|
+
//
|
|
2880
|
+
// addMargin/reduceMargin
|
|
2881
|
+
//
|
|
2882
|
+
// {
|
|
2883
|
+
// "code": 0
|
|
2884
|
+
// }
|
|
2885
|
+
//
|
|
2879
2886
|
const errorCode = this.safeString(data, 'code');
|
|
2880
2887
|
const status = (errorCode === '0') ? 'ok' : 'failed';
|
|
2881
2888
|
return {
|
|
2882
2889
|
'info': data,
|
|
2890
|
+
'symbol': market['symbol'],
|
|
2883
2891
|
'type': undefined,
|
|
2884
2892
|
'amount': undefined,
|
|
2893
|
+
'total': undefined,
|
|
2885
2894
|
'code': market['quote'],
|
|
2886
|
-
'symbol': market['symbol'],
|
|
2887
2895
|
'status': status,
|
|
2896
|
+
'timestamp': undefined,
|
|
2897
|
+
'datetime': undefined,
|
|
2888
2898
|
};
|
|
2889
2899
|
}
|
|
2890
2900
|
async reduceMargin(symbol, amount, params = {}) {
|
|
@@ -3,7 +3,7 @@ import { // eslint-disable-line object-curly-newline
|
|
|
3
3
|
ExchangeError, AuthenticationError, DDoSProtection, RequestTimeout, ExchangeNotAvailable, RateLimitExceeded } from "./errors.js";
|
|
4
4
|
import WsClient from './ws/WsClient.js';
|
|
5
5
|
import { OrderBook as WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ws/OrderBook.js';
|
|
6
|
-
import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings } from './types.js';
|
|
6
|
+
import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification } from './types.js';
|
|
7
7
|
export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, BorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings } from './types.js';
|
|
8
8
|
import { ArrayCache, ArrayCacheByTimestamp } from './ws/Cache.js';
|
|
9
9
|
import { OrderBook as Ob } from './ws/OrderBook.js';
|
|
@@ -52,7 +52,7 @@ export default class Exchange {
|
|
|
52
52
|
nodeHttpModuleLoaded: boolean;
|
|
53
53
|
httpAgent: any;
|
|
54
54
|
httpsAgent: any;
|
|
55
|
-
minFundingAddressLength:
|
|
55
|
+
minFundingAddressLength: Int;
|
|
56
56
|
substituteCommonCurrencyCodes: boolean;
|
|
57
57
|
quoteJsonNumbers: boolean;
|
|
58
58
|
number: (numberString: string) => number;
|
|
@@ -63,7 +63,7 @@ export default class Exchange {
|
|
|
63
63
|
FetchError: any;
|
|
64
64
|
validateServerSsl: boolean;
|
|
65
65
|
validateClientSsl: boolean;
|
|
66
|
-
timeout:
|
|
66
|
+
timeout: Int;
|
|
67
67
|
verbose: boolean;
|
|
68
68
|
twofa: any;
|
|
69
69
|
apiKey: string;
|
|
@@ -146,23 +146,23 @@ export default class Exchange {
|
|
|
146
146
|
quoteCurrencies: any;
|
|
147
147
|
currencies_by_id: any;
|
|
148
148
|
codes: any;
|
|
149
|
-
reloadingMarkets:
|
|
150
|
-
marketsLoading: any
|
|
149
|
+
reloadingMarkets: boolean;
|
|
150
|
+
marketsLoading: Promise<Dictionary<any>>;
|
|
151
151
|
accounts: any;
|
|
152
152
|
accountsById: any;
|
|
153
|
-
commonCurrencies:
|
|
153
|
+
commonCurrencies: Dictionary<string>;
|
|
154
154
|
hostname: Str;
|
|
155
155
|
precisionMode: Num;
|
|
156
|
-
paddingMode:
|
|
157
|
-
exceptions:
|
|
156
|
+
paddingMode: Num;
|
|
157
|
+
exceptions: Dictionary<string>;
|
|
158
158
|
timeframes: Dictionary<number | string>;
|
|
159
159
|
version: Str;
|
|
160
|
-
marketsByAltname: any
|
|
160
|
+
marketsByAltname: Dictionary<any>;
|
|
161
161
|
name: Str;
|
|
162
162
|
lastRestRequestTimestamp: number;
|
|
163
163
|
targetAccount: any;
|
|
164
164
|
stablePairs: {};
|
|
165
|
-
clients:
|
|
165
|
+
clients: Dictionary<WsClient>;
|
|
166
166
|
newUpdates: boolean;
|
|
167
167
|
streaming: {};
|
|
168
168
|
alias: boolean;
|
|
@@ -678,7 +678,7 @@ export default class Exchange {
|
|
|
678
678
|
fetchCrossBorrowRates(params?: {}): Promise<{}>;
|
|
679
679
|
fetchIsolatedBorrowRates(params?: {}): Promise<{}>;
|
|
680
680
|
parseMarketLeverageTiers(info: any, market?: Market): object;
|
|
681
|
-
fetchLeverageTiers(symbols?: string[], params?: {}): Promise<Dictionary<LeverageTier>>;
|
|
681
|
+
fetchLeverageTiers(symbols?: string[], params?: {}): Promise<Dictionary<LeverageTier[]>>;
|
|
682
682
|
parsePosition(position: any, market?: Market): Position;
|
|
683
683
|
parseFundingRateHistory(info: any, market?: Market): FundingRateHistory;
|
|
684
684
|
parseBorrowInterest(info: any, market?: Market): BorrowInterest;
|
|
@@ -697,8 +697,8 @@ export default class Exchange {
|
|
|
697
697
|
fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
|
|
698
698
|
fetchLeverages(symbols?: string[], params?: {}): Promise<Leverages>;
|
|
699
699
|
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<{}>;
|
|
700
|
-
addMargin(symbol: string, amount: number, params?: {}): Promise<
|
|
701
|
-
reduceMargin(symbol: string, amount: number, params?: {}): Promise<
|
|
700
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
701
|
+
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
702
702
|
setMargin(symbol: string, amount: number, params?: {}): Promise<{}>;
|
|
703
703
|
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<{}>;
|
|
704
704
|
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
|
package/js/src/base/types.d.ts
CHANGED
|
@@ -432,6 +432,17 @@ export interface Leverage {
|
|
|
432
432
|
longLeverage: number;
|
|
433
433
|
shortLeverage: number;
|
|
434
434
|
}
|
|
435
|
+
export interface MarginModification {
|
|
436
|
+
'info': any;
|
|
437
|
+
'symbol': string;
|
|
438
|
+
'type': 'add' | 'reduce' | 'set' | undefined;
|
|
439
|
+
'amount': Num;
|
|
440
|
+
'total': Num;
|
|
441
|
+
'code': Str;
|
|
442
|
+
'status': Str;
|
|
443
|
+
'timestamp': Int;
|
|
444
|
+
'datetime': Str;
|
|
445
|
+
}
|
|
435
446
|
export interface Leverages extends Dictionary<Leverage> {
|
|
436
447
|
}
|
|
437
448
|
export interface LastPrices extends Dictionary<LastPrice> {
|
package/js/src/binance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/binance.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface, MarginMode, MarginModes, Leverage, Leverages, Num, Option } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface, MarginMode, MarginModes, Leverage, Leverages, Num, Option, MarginModification } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class binance
|
|
5
5
|
* @augments Exchange
|
|
@@ -306,16 +306,9 @@ export default class binance extends Exchange {
|
|
|
306
306
|
calculateRateLimiterCost(api: any, method: any, path: any, params: any, config?: {}): any;
|
|
307
307
|
request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
|
|
308
308
|
modifyMarginHelper(symbol: string, amount: any, addOrReduce: any, params?: {}): Promise<any>;
|
|
309
|
-
parseMarginModification(data: any, market?: Market):
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
amount: number;
|
|
313
|
-
code: any;
|
|
314
|
-
symbol: string;
|
|
315
|
-
status: string;
|
|
316
|
-
};
|
|
317
|
-
reduceMargin(symbol: string, amount: any, params?: {}): Promise<any>;
|
|
318
|
-
addMargin(symbol: string, amount: any, params?: {}): Promise<any>;
|
|
309
|
+
parseMarginModification(data: any, market?: Market): MarginModification;
|
|
310
|
+
reduceMargin(symbol: string, amount: any, params?: {}): Promise<MarginModification>;
|
|
311
|
+
addMargin(symbol: string, amount: any, params?: {}): Promise<MarginModification>;
|
|
319
312
|
fetchCrossBorrowRate(code: string, params?: {}): Promise<{
|
|
320
313
|
currency: string;
|
|
321
314
|
rate: number;
|
package/js/src/binance.js
CHANGED
|
@@ -11215,6 +11215,16 @@ export default class binance extends Exchange {
|
|
|
11215
11215
|
});
|
|
11216
11216
|
}
|
|
11217
11217
|
parseMarginModification(data, market = undefined) {
|
|
11218
|
+
//
|
|
11219
|
+
// add/reduce margin
|
|
11220
|
+
//
|
|
11221
|
+
// {
|
|
11222
|
+
// "code": 200,
|
|
11223
|
+
// "msg": "Successfully modify position margin.",
|
|
11224
|
+
// "amount": 0.001,
|
|
11225
|
+
// "type": 1
|
|
11226
|
+
// }
|
|
11227
|
+
//
|
|
11218
11228
|
const rawType = this.safeInteger(data, 'type');
|
|
11219
11229
|
const resultType = (rawType === 1) ? 'add' : 'reduce';
|
|
11220
11230
|
const resultAmount = this.safeNumber(data, 'amount');
|
|
@@ -11222,11 +11232,14 @@ export default class binance extends Exchange {
|
|
|
11222
11232
|
const status = (errorCode === '200') ? 'ok' : 'failed';
|
|
11223
11233
|
return {
|
|
11224
11234
|
'info': data,
|
|
11235
|
+
'symbol': market['symbol'],
|
|
11225
11236
|
'type': resultType,
|
|
11226
11237
|
'amount': resultAmount,
|
|
11238
|
+
'total': undefined,
|
|
11227
11239
|
'code': undefined,
|
|
11228
|
-
'symbol': market['symbol'],
|
|
11229
11240
|
'status': status,
|
|
11241
|
+
'timestamp': undefined,
|
|
11242
|
+
'datetime': undefined,
|
|
11230
11243
|
};
|
|
11231
11244
|
}
|
|
11232
11245
|
async reduceMargin(symbol, amount, params = {}) {
|
package/js/src/bingx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/bingx.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, OHLCV, FundingRateHistory, Order, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Dict, Leverage, MarginMode, Num } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, OHLCV, FundingRateHistory, Order, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Dict, Leverage, MarginMode, Num, MarginModification } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class bingx
|
|
5
5
|
* @augments Exchange
|
|
@@ -109,7 +109,10 @@ export default class bingx extends Exchange {
|
|
|
109
109
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
110
110
|
parseTransactionStatus(status: string): string;
|
|
111
111
|
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
|
|
112
|
-
|
|
112
|
+
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
113
|
+
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
114
|
+
setMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
115
|
+
parseMarginModification(data: any, market?: Market): MarginModification;
|
|
113
116
|
fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
|
|
114
117
|
parseLeverage(leverage: any, market?: any): Leverage;
|
|
115
118
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|