ccxt 4.2.6 → 4.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.js +26 -8
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bitmex.js +24 -6
- package/dist/cjs/src/phemex.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmex.d.ts +20 -0
- package/js/src/bitmex.js +24 -6
- package/js/src/phemex.js +1 -1
- package/package.json +1 -1
package/dist/cjs/ccxt.js
CHANGED
|
@@ -169,7 +169,7 @@ var woo$1 = require('./src/pro/woo.js');
|
|
|
169
169
|
|
|
170
170
|
//-----------------------------------------------------------------------------
|
|
171
171
|
// this is updated by vss.js when building
|
|
172
|
-
const version = '4.2.
|
|
172
|
+
const version = '4.2.7';
|
|
173
173
|
Exchange["default"].ccxtVersion = version;
|
|
174
174
|
const exchanges = {
|
|
175
175
|
'ace': ace,
|
package/dist/cjs/src/bitmex.js
CHANGED
|
@@ -123,6 +123,7 @@ class bitmex extends bitmex$1 {
|
|
|
123
123
|
'chat/connected': 5,
|
|
124
124
|
'chat/pinned': 5,
|
|
125
125
|
'funding': 5,
|
|
126
|
+
'guild': 5,
|
|
126
127
|
'instrument': 5,
|
|
127
128
|
'instrument/active': 5,
|
|
128
129
|
'instrument/activeAndIndices': 5,
|
|
@@ -151,6 +152,7 @@ class bitmex extends bitmex$1 {
|
|
|
151
152
|
},
|
|
152
153
|
'private': {
|
|
153
154
|
'get': {
|
|
155
|
+
'address': 5,
|
|
154
156
|
'apiKey': 5,
|
|
155
157
|
'execution': 5,
|
|
156
158
|
'execution/tradeHistory': 5,
|
|
@@ -163,21 +165,33 @@ class bitmex extends bitmex$1 {
|
|
|
163
165
|
'user/affiliateStatus': 5,
|
|
164
166
|
'user/checkReferralCode': 5,
|
|
165
167
|
'user/commission': 5,
|
|
168
|
+
'user/csa': 5,
|
|
166
169
|
'user/depositAddress': 5,
|
|
167
170
|
'user/executionHistory': 5,
|
|
171
|
+
'user/getWalletTransferAccounts': 5,
|
|
168
172
|
'user/margin': 5,
|
|
169
173
|
'user/quoteFillRatio': 5,
|
|
170
174
|
'user/quoteValueRatio': 5,
|
|
175
|
+
'user/staking': 5,
|
|
176
|
+
'user/staking/instruments': 5,
|
|
177
|
+
'user/staking/tiers': 5,
|
|
171
178
|
'user/tradingVolume': 5,
|
|
179
|
+
'user/unstakingRequests': 5,
|
|
172
180
|
'user/wallet': 5,
|
|
173
181
|
'user/walletHistory': 5,
|
|
174
182
|
'user/walletSummary': 5,
|
|
183
|
+
'userAffiliates': 5,
|
|
175
184
|
'userEvent': 5,
|
|
176
185
|
},
|
|
177
186
|
'post': {
|
|
187
|
+
'address': 5,
|
|
178
188
|
'chat': 5,
|
|
189
|
+
'guild': 5,
|
|
190
|
+
'guild/archive': 5,
|
|
179
191
|
'guild/join': 5,
|
|
192
|
+
'guild/kick': 5,
|
|
180
193
|
'guild/leave': 5,
|
|
194
|
+
'guild/sharesTrades': 5,
|
|
181
195
|
'order': 1,
|
|
182
196
|
'order/cancelAllAfter': 5,
|
|
183
197
|
'order/closePosition': 5,
|
|
@@ -185,6 +199,7 @@ class bitmex extends bitmex$1 {
|
|
|
185
199
|
'position/leverage': 1,
|
|
186
200
|
'position/riskLimit': 5,
|
|
187
201
|
'position/transferMargin': 1,
|
|
202
|
+
'user/addSubaccount': 5,
|
|
188
203
|
'user/cancelWithdrawal': 5,
|
|
189
204
|
'user/communicationToken': 5,
|
|
190
205
|
'user/confirmEmail': 5,
|
|
@@ -192,13 +207,18 @@ class bitmex extends bitmex$1 {
|
|
|
192
207
|
'user/logout': 5,
|
|
193
208
|
'user/preferences': 5,
|
|
194
209
|
'user/requestWithdrawal': 5,
|
|
210
|
+
'user/unstakingRequests': 5,
|
|
211
|
+
'user/updateSubaccount': 5,
|
|
212
|
+
'user/walletTransfer': 5,
|
|
195
213
|
},
|
|
196
214
|
'put': {
|
|
215
|
+
'guild': 5,
|
|
197
216
|
'order': 1,
|
|
198
217
|
},
|
|
199
218
|
'delete': {
|
|
200
219
|
'order': 1,
|
|
201
220
|
'order/all': 1,
|
|
221
|
+
'user/unstakingRequests': 5,
|
|
202
222
|
},
|
|
203
223
|
},
|
|
204
224
|
},
|
|
@@ -1586,13 +1606,11 @@ class bitmex extends bitmex$1 {
|
|
|
1586
1606
|
let fee = undefined;
|
|
1587
1607
|
const feeCostString = this.numberToString(this.convertFromRawCost(symbol, this.safeString(trade, 'execComm')));
|
|
1588
1608
|
if (feeCostString !== undefined) {
|
|
1589
|
-
const currencyId = this.
|
|
1590
|
-
const feeCurrencyCode = this.safeCurrencyCode(currencyId);
|
|
1591
|
-
const feeRateString = this.safeString(trade, 'commission');
|
|
1609
|
+
const currencyId = this.safeString2(trade, 'settlCurrency', 'currency');
|
|
1592
1610
|
fee = {
|
|
1593
|
-
'cost':
|
|
1594
|
-
'currency':
|
|
1595
|
-
'rate':
|
|
1611
|
+
'cost': feeCostString,
|
|
1612
|
+
'currency': this.safeCurrencyCode(currencyId),
|
|
1613
|
+
'rate': this.safeString(trade, 'commission'),
|
|
1596
1614
|
};
|
|
1597
1615
|
}
|
|
1598
1616
|
// Trade or Funding
|
package/dist/cjs/src/phemex.js
CHANGED
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.2.
|
|
7
|
+
declare const version = "4.2.6";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.2.
|
|
41
|
+
const version = '4.2.7';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -8,6 +8,7 @@ interface Exchange {
|
|
|
8
8
|
publicGetChatConnected(params?: {}): Promise<implicitReturnType>;
|
|
9
9
|
publicGetChatPinned(params?: {}): Promise<implicitReturnType>;
|
|
10
10
|
publicGetFunding(params?: {}): Promise<implicitReturnType>;
|
|
11
|
+
publicGetGuild(params?: {}): Promise<implicitReturnType>;
|
|
11
12
|
publicGetInstrument(params?: {}): Promise<implicitReturnType>;
|
|
12
13
|
publicGetInstrumentActive(params?: {}): Promise<implicitReturnType>;
|
|
13
14
|
publicGetInstrumentActiveAndIndices(params?: {}): Promise<implicitReturnType>;
|
|
@@ -32,6 +33,7 @@ interface Exchange {
|
|
|
32
33
|
publicGetTradeBucketed(params?: {}): Promise<implicitReturnType>;
|
|
33
34
|
publicGetWalletAssets(params?: {}): Promise<implicitReturnType>;
|
|
34
35
|
publicGetWalletNetworks(params?: {}): Promise<implicitReturnType>;
|
|
36
|
+
privateGetAddress(params?: {}): Promise<implicitReturnType>;
|
|
35
37
|
privateGetApiKey(params?: {}): Promise<implicitReturnType>;
|
|
36
38
|
privateGetExecution(params?: {}): Promise<implicitReturnType>;
|
|
37
39
|
privateGetExecutionTradeHistory(params?: {}): Promise<implicitReturnType>;
|
|
@@ -44,19 +46,31 @@ interface Exchange {
|
|
|
44
46
|
privateGetUserAffiliateStatus(params?: {}): Promise<implicitReturnType>;
|
|
45
47
|
privateGetUserCheckReferralCode(params?: {}): Promise<implicitReturnType>;
|
|
46
48
|
privateGetUserCommission(params?: {}): Promise<implicitReturnType>;
|
|
49
|
+
privateGetUserCsa(params?: {}): Promise<implicitReturnType>;
|
|
47
50
|
privateGetUserDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
48
51
|
privateGetUserExecutionHistory(params?: {}): Promise<implicitReturnType>;
|
|
52
|
+
privateGetUserGetWalletTransferAccounts(params?: {}): Promise<implicitReturnType>;
|
|
49
53
|
privateGetUserMargin(params?: {}): Promise<implicitReturnType>;
|
|
50
54
|
privateGetUserQuoteFillRatio(params?: {}): Promise<implicitReturnType>;
|
|
51
55
|
privateGetUserQuoteValueRatio(params?: {}): Promise<implicitReturnType>;
|
|
56
|
+
privateGetUserStaking(params?: {}): Promise<implicitReturnType>;
|
|
57
|
+
privateGetUserStakingInstruments(params?: {}): Promise<implicitReturnType>;
|
|
58
|
+
privateGetUserStakingTiers(params?: {}): Promise<implicitReturnType>;
|
|
52
59
|
privateGetUserTradingVolume(params?: {}): Promise<implicitReturnType>;
|
|
60
|
+
privateGetUserUnstakingRequests(params?: {}): Promise<implicitReturnType>;
|
|
53
61
|
privateGetUserWallet(params?: {}): Promise<implicitReturnType>;
|
|
54
62
|
privateGetUserWalletHistory(params?: {}): Promise<implicitReturnType>;
|
|
55
63
|
privateGetUserWalletSummary(params?: {}): Promise<implicitReturnType>;
|
|
64
|
+
privateGetUserAffiliates(params?: {}): Promise<implicitReturnType>;
|
|
56
65
|
privateGetUserEvent(params?: {}): Promise<implicitReturnType>;
|
|
66
|
+
privatePostAddress(params?: {}): Promise<implicitReturnType>;
|
|
57
67
|
privatePostChat(params?: {}): Promise<implicitReturnType>;
|
|
68
|
+
privatePostGuild(params?: {}): Promise<implicitReturnType>;
|
|
69
|
+
privatePostGuildArchive(params?: {}): Promise<implicitReturnType>;
|
|
58
70
|
privatePostGuildJoin(params?: {}): Promise<implicitReturnType>;
|
|
71
|
+
privatePostGuildKick(params?: {}): Promise<implicitReturnType>;
|
|
59
72
|
privatePostGuildLeave(params?: {}): Promise<implicitReturnType>;
|
|
73
|
+
privatePostGuildSharesTrades(params?: {}): Promise<implicitReturnType>;
|
|
60
74
|
privatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
61
75
|
privatePostOrderCancelAllAfter(params?: {}): Promise<implicitReturnType>;
|
|
62
76
|
privatePostOrderClosePosition(params?: {}): Promise<implicitReturnType>;
|
|
@@ -64,6 +78,7 @@ interface Exchange {
|
|
|
64
78
|
privatePostPositionLeverage(params?: {}): Promise<implicitReturnType>;
|
|
65
79
|
privatePostPositionRiskLimit(params?: {}): Promise<implicitReturnType>;
|
|
66
80
|
privatePostPositionTransferMargin(params?: {}): Promise<implicitReturnType>;
|
|
81
|
+
privatePostUserAddSubaccount(params?: {}): Promise<implicitReturnType>;
|
|
67
82
|
privatePostUserCancelWithdrawal(params?: {}): Promise<implicitReturnType>;
|
|
68
83
|
privatePostUserCommunicationToken(params?: {}): Promise<implicitReturnType>;
|
|
69
84
|
privatePostUserConfirmEmail(params?: {}): Promise<implicitReturnType>;
|
|
@@ -71,9 +86,14 @@ interface Exchange {
|
|
|
71
86
|
privatePostUserLogout(params?: {}): Promise<implicitReturnType>;
|
|
72
87
|
privatePostUserPreferences(params?: {}): Promise<implicitReturnType>;
|
|
73
88
|
privatePostUserRequestWithdrawal(params?: {}): Promise<implicitReturnType>;
|
|
89
|
+
privatePostUserUnstakingRequests(params?: {}): Promise<implicitReturnType>;
|
|
90
|
+
privatePostUserUpdateSubaccount(params?: {}): Promise<implicitReturnType>;
|
|
91
|
+
privatePostUserWalletTransfer(params?: {}): Promise<implicitReturnType>;
|
|
92
|
+
privatePutGuild(params?: {}): Promise<implicitReturnType>;
|
|
74
93
|
privatePutOrder(params?: {}): Promise<implicitReturnType>;
|
|
75
94
|
privateDeleteOrder(params?: {}): Promise<implicitReturnType>;
|
|
76
95
|
privateDeleteOrderAll(params?: {}): Promise<implicitReturnType>;
|
|
96
|
+
privateDeleteUserUnstakingRequests(params?: {}): Promise<implicitReturnType>;
|
|
77
97
|
}
|
|
78
98
|
declare abstract class Exchange extends _Exchange {
|
|
79
99
|
}
|
package/js/src/bitmex.js
CHANGED
|
@@ -126,6 +126,7 @@ export default class bitmex extends Exchange {
|
|
|
126
126
|
'chat/connected': 5,
|
|
127
127
|
'chat/pinned': 5,
|
|
128
128
|
'funding': 5,
|
|
129
|
+
'guild': 5,
|
|
129
130
|
'instrument': 5,
|
|
130
131
|
'instrument/active': 5,
|
|
131
132
|
'instrument/activeAndIndices': 5,
|
|
@@ -154,6 +155,7 @@ export default class bitmex extends Exchange {
|
|
|
154
155
|
},
|
|
155
156
|
'private': {
|
|
156
157
|
'get': {
|
|
158
|
+
'address': 5,
|
|
157
159
|
'apiKey': 5,
|
|
158
160
|
'execution': 5,
|
|
159
161
|
'execution/tradeHistory': 5,
|
|
@@ -166,21 +168,33 @@ export default class bitmex extends Exchange {
|
|
|
166
168
|
'user/affiliateStatus': 5,
|
|
167
169
|
'user/checkReferralCode': 5,
|
|
168
170
|
'user/commission': 5,
|
|
171
|
+
'user/csa': 5,
|
|
169
172
|
'user/depositAddress': 5,
|
|
170
173
|
'user/executionHistory': 5,
|
|
174
|
+
'user/getWalletTransferAccounts': 5,
|
|
171
175
|
'user/margin': 5,
|
|
172
176
|
'user/quoteFillRatio': 5,
|
|
173
177
|
'user/quoteValueRatio': 5,
|
|
178
|
+
'user/staking': 5,
|
|
179
|
+
'user/staking/instruments': 5,
|
|
180
|
+
'user/staking/tiers': 5,
|
|
174
181
|
'user/tradingVolume': 5,
|
|
182
|
+
'user/unstakingRequests': 5,
|
|
175
183
|
'user/wallet': 5,
|
|
176
184
|
'user/walletHistory': 5,
|
|
177
185
|
'user/walletSummary': 5,
|
|
186
|
+
'userAffiliates': 5,
|
|
178
187
|
'userEvent': 5,
|
|
179
188
|
},
|
|
180
189
|
'post': {
|
|
190
|
+
'address': 5,
|
|
181
191
|
'chat': 5,
|
|
192
|
+
'guild': 5,
|
|
193
|
+
'guild/archive': 5,
|
|
182
194
|
'guild/join': 5,
|
|
195
|
+
'guild/kick': 5,
|
|
183
196
|
'guild/leave': 5,
|
|
197
|
+
'guild/sharesTrades': 5,
|
|
184
198
|
'order': 1,
|
|
185
199
|
'order/cancelAllAfter': 5,
|
|
186
200
|
'order/closePosition': 5,
|
|
@@ -188,6 +202,7 @@ export default class bitmex extends Exchange {
|
|
|
188
202
|
'position/leverage': 1,
|
|
189
203
|
'position/riskLimit': 5,
|
|
190
204
|
'position/transferMargin': 1,
|
|
205
|
+
'user/addSubaccount': 5,
|
|
191
206
|
'user/cancelWithdrawal': 5,
|
|
192
207
|
'user/communicationToken': 5,
|
|
193
208
|
'user/confirmEmail': 5,
|
|
@@ -195,13 +210,18 @@ export default class bitmex extends Exchange {
|
|
|
195
210
|
'user/logout': 5,
|
|
196
211
|
'user/preferences': 5,
|
|
197
212
|
'user/requestWithdrawal': 5,
|
|
213
|
+
'user/unstakingRequests': 5,
|
|
214
|
+
'user/updateSubaccount': 5,
|
|
215
|
+
'user/walletTransfer': 5,
|
|
198
216
|
},
|
|
199
217
|
'put': {
|
|
218
|
+
'guild': 5,
|
|
200
219
|
'order': 1,
|
|
201
220
|
},
|
|
202
221
|
'delete': {
|
|
203
222
|
'order': 1,
|
|
204
223
|
'order/all': 1,
|
|
224
|
+
'user/unstakingRequests': 5,
|
|
205
225
|
},
|
|
206
226
|
},
|
|
207
227
|
},
|
|
@@ -1589,13 +1609,11 @@ export default class bitmex extends Exchange {
|
|
|
1589
1609
|
let fee = undefined;
|
|
1590
1610
|
const feeCostString = this.numberToString(this.convertFromRawCost(symbol, this.safeString(trade, 'execComm')));
|
|
1591
1611
|
if (feeCostString !== undefined) {
|
|
1592
|
-
const currencyId = this.
|
|
1593
|
-
const feeCurrencyCode = this.safeCurrencyCode(currencyId);
|
|
1594
|
-
const feeRateString = this.safeString(trade, 'commission');
|
|
1612
|
+
const currencyId = this.safeString2(trade, 'settlCurrency', 'currency');
|
|
1595
1613
|
fee = {
|
|
1596
|
-
'cost':
|
|
1597
|
-
'currency':
|
|
1598
|
-
'rate':
|
|
1614
|
+
'cost': feeCostString,
|
|
1615
|
+
'currency': this.safeCurrencyCode(currencyId),
|
|
1616
|
+
'rate': this.safeString(trade, 'commission'),
|
|
1599
1617
|
};
|
|
1600
1618
|
}
|
|
1601
1619
|
// Trade or Funding
|
package/js/src/phemex.js
CHANGED
package/package.json
CHANGED