ccxt 4.3.22 → 4.3.23
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/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +1 -1
- package/dist/cjs/src/coinbase.js +5 -0
- package/dist/cjs/src/coinex.js +157 -181
- package/dist/cjs/src/phemex.js +26 -9
- package/dist/cjs/src/pro/poloniexfutures.js +22 -17
- package/dist/cjs/src/probit.js +1 -20
- package/dist/cjs/src/whitebit.js +9 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/whitebit.d.ts +9 -0
- package/js/src/binance.js +1 -1
- package/js/src/coinbase.js +5 -0
- package/js/src/coinex.d.ts +12 -12
- package/js/src/coinex.js +158 -182
- package/js/src/phemex.d.ts +1 -0
- package/js/src/phemex.js +26 -9
- package/js/src/pro/poloniexfutures.js +22 -17
- package/js/src/probit.js +1 -20
- package/js/src/whitebit.js +9 -0
- package/package.json +1 -1
|
@@ -843,31 +843,36 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
843
843
|
handleDelta(orderbook, delta) {
|
|
844
844
|
//
|
|
845
845
|
// {
|
|
846
|
-
//
|
|
847
|
-
//
|
|
848
|
-
//
|
|
849
|
-
//
|
|
846
|
+
// sequence: 123677914,
|
|
847
|
+
// lastSequence: 123677913,
|
|
848
|
+
// change: '80.36,buy,4924',
|
|
849
|
+
// changes: [ '80.19,buy,0',"80.15,buy,10794" ],
|
|
850
|
+
// timestamp: 1715643483528
|
|
851
|
+
// },
|
|
850
852
|
//
|
|
851
853
|
const sequence = this.safeInteger(delta, 'sequence');
|
|
854
|
+
const lastSequence = this.safeInteger(delta, 'lastSequence');
|
|
852
855
|
const nonce = this.safeInteger(orderbook, 'nonce');
|
|
853
|
-
if (nonce
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
856
|
+
if (nonce > sequence) {
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
if (nonce !== lastSequence) {
|
|
860
|
+
throw new errors.InvalidNonce(this.id + ' watchOrderBook received an out-of-order nonce');
|
|
861
|
+
}
|
|
862
|
+
const changes = this.safeList(delta, 'changes');
|
|
863
|
+
for (let i = 0; i < changes.length; i++) {
|
|
864
|
+
const change = changes[i];
|
|
865
|
+
const splitChange = change.split(',');
|
|
866
|
+
const price = this.safeNumber(splitChange, 0);
|
|
867
|
+
const side = this.safeString(splitChange, 1);
|
|
868
|
+
const size = this.safeNumber(splitChange, 2);
|
|
869
|
+
const orderBookSide = (side === 'buy') ? orderbook['bids'] : orderbook['asks'];
|
|
870
|
+
orderBookSide.store(price, size);
|
|
859
871
|
}
|
|
860
|
-
const change = this.safeString(delta, 'change');
|
|
861
|
-
const splitChange = change.split(',');
|
|
862
|
-
const price = this.safeNumber(splitChange, 0);
|
|
863
|
-
const side = this.safeString(splitChange, 1);
|
|
864
|
-
const size = this.safeNumber(splitChange, 2);
|
|
865
872
|
const timestamp = this.safeInteger(delta, 'timestamp');
|
|
866
873
|
orderbook['timestamp'] = timestamp;
|
|
867
874
|
orderbook['datetime'] = this.iso8601(timestamp);
|
|
868
875
|
orderbook['nonce'] = sequence;
|
|
869
|
-
const orderBookSide = (side === 'buy') ? orderbook['bids'] : orderbook['asks'];
|
|
870
|
-
orderBookSide.store(price, size);
|
|
871
876
|
}
|
|
872
877
|
handleBalance(client, message) {
|
|
873
878
|
//
|
package/dist/cjs/src/probit.js
CHANGED
|
@@ -205,41 +205,22 @@ class probit extends probit$1 {
|
|
|
205
205
|
},
|
|
206
206
|
},
|
|
207
207
|
'commonCurrencies': {
|
|
208
|
-
'
|
|
209
|
-
'AZU': 'Azultec',
|
|
210
|
-
'BCC': 'BCC',
|
|
211
|
-
'BDP': 'BidiPass',
|
|
212
|
-
'BIRD': 'Birdchain',
|
|
213
|
-
'BTCBEAR': 'BEAR',
|
|
214
|
-
'BTCBULL': 'BULL',
|
|
208
|
+
'BB': 'Baby Bali',
|
|
215
209
|
'CBC': 'CryptoBharatCoin',
|
|
216
|
-
'CHE': 'Chellit',
|
|
217
|
-
'CLR': 'Color Platform',
|
|
218
210
|
'CTK': 'Cryptyk',
|
|
219
211
|
'CTT': 'Castweet',
|
|
220
|
-
'DIP': 'Dipper',
|
|
221
212
|
'DKT': 'DAKOTA',
|
|
222
213
|
'EGC': 'EcoG9coin',
|
|
223
214
|
'EPS': 'Epanus',
|
|
224
215
|
'FX': 'Fanzy',
|
|
225
|
-
'GDT': 'Gorilla Diamond',
|
|
226
216
|
'GM': 'GM Holding',
|
|
227
217
|
'GOGOL': 'GOL',
|
|
228
218
|
'GOL': 'Goldofir',
|
|
229
|
-
'GRB': 'Global Reward Bank',
|
|
230
|
-
'HBC': 'Hybrid Bank Cash',
|
|
231
219
|
'HUSL': 'The Hustle App',
|
|
232
220
|
'LAND': 'Landbox',
|
|
233
|
-
'LBK': 'Legal Block',
|
|
234
|
-
'ORC': 'Oracle System',
|
|
235
|
-
'PXP': 'PIXSHOP COIN',
|
|
236
|
-
'PYE': 'CreamPYE',
|
|
237
|
-
'ROOK': 'Reckoon',
|
|
238
|
-
'SOC': 'Soda Coin',
|
|
239
221
|
'SST': 'SocialSwap',
|
|
240
222
|
'TCT': 'Top Coin Token',
|
|
241
223
|
'TOR': 'Torex',
|
|
242
|
-
'TPAY': 'Tetra Pay',
|
|
243
224
|
'UNI': 'UNICORN Token',
|
|
244
225
|
'UNISWAP': 'UNI',
|
|
245
226
|
},
|
package/dist/cjs/src/whitebit.js
CHANGED
|
@@ -232,6 +232,15 @@ class whitebit extends whitebit$1 {
|
|
|
232
232
|
'convert/estimate',
|
|
233
233
|
'convert/confirm',
|
|
234
234
|
'convert/history',
|
|
235
|
+
'sub-account/create',
|
|
236
|
+
'sub-account/delete',
|
|
237
|
+
'sub-account/edit',
|
|
238
|
+
'sub-account/list',
|
|
239
|
+
'sub-account/transfer',
|
|
240
|
+
'sub-account/block',
|
|
241
|
+
'sub-account/unblock',
|
|
242
|
+
'sub-account/balances',
|
|
243
|
+
'sub-account/transfer/history',
|
|
235
244
|
],
|
|
236
245
|
},
|
|
237
246
|
},
|
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, Leverage, Leverages, Option, OptionChain, Conversion } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.3.
|
|
7
|
+
declare const version = "4.3.22";
|
|
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, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } 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.23';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -86,6 +86,15 @@ interface Exchange {
|
|
|
86
86
|
v4PrivatePostConvertEstimate(params?: {}): Promise<implicitReturnType>;
|
|
87
87
|
v4PrivatePostConvertConfirm(params?: {}): Promise<implicitReturnType>;
|
|
88
88
|
v4PrivatePostConvertHistory(params?: {}): Promise<implicitReturnType>;
|
|
89
|
+
v4PrivatePostSubAccountCreate(params?: {}): Promise<implicitReturnType>;
|
|
90
|
+
v4PrivatePostSubAccountDelete(params?: {}): Promise<implicitReturnType>;
|
|
91
|
+
v4PrivatePostSubAccountEdit(params?: {}): Promise<implicitReturnType>;
|
|
92
|
+
v4PrivatePostSubAccountList(params?: {}): Promise<implicitReturnType>;
|
|
93
|
+
v4PrivatePostSubAccountTransfer(params?: {}): Promise<implicitReturnType>;
|
|
94
|
+
v4PrivatePostSubAccountBlock(params?: {}): Promise<implicitReturnType>;
|
|
95
|
+
v4PrivatePostSubAccountUnblock(params?: {}): Promise<implicitReturnType>;
|
|
96
|
+
v4PrivatePostSubAccountBalances(params?: {}): Promise<implicitReturnType>;
|
|
97
|
+
v4PrivatePostSubAccountTransferHistory(params?: {}): Promise<implicitReturnType>;
|
|
89
98
|
}
|
|
90
99
|
declare abstract class Exchange extends _Exchange {
|
|
91
100
|
}
|
package/js/src/binance.js
CHANGED
|
@@ -9692,7 +9692,7 @@ export default class binance extends Exchange {
|
|
|
9692
9692
|
await this.loadMarkets();
|
|
9693
9693
|
// by default cache the leverage bracket
|
|
9694
9694
|
// it contains useful stuff like the maintenance margin and initial margin for positions
|
|
9695
|
-
const leverageBrackets = this.safeDict(this.options, 'leverageBrackets'
|
|
9695
|
+
const leverageBrackets = this.safeDict(this.options, 'leverageBrackets');
|
|
9696
9696
|
if ((leverageBrackets === undefined) || (reload)) {
|
|
9697
9697
|
const defaultType = this.safeString(this.options, 'defaultType', 'future');
|
|
9698
9698
|
const type = this.safeString(params, 'type', defaultType);
|
package/js/src/coinbase.js
CHANGED
|
@@ -1813,6 +1813,11 @@ export default class coinbase extends Exchange {
|
|
|
1813
1813
|
if (symbols !== undefined) {
|
|
1814
1814
|
request['product_ids'] = this.marketIds(symbols);
|
|
1815
1815
|
}
|
|
1816
|
+
let marketType = undefined;
|
|
1817
|
+
[marketType, params] = this.handleMarketTypeAndParams('fetchTickers', this.getMarketFromSymbols(symbols), params, 'default');
|
|
1818
|
+
if (marketType !== undefined && marketType !== 'default') {
|
|
1819
|
+
request['product_type'] = (marketType === 'swap') ? 'FUTURE' : 'SPOT';
|
|
1820
|
+
}
|
|
1816
1821
|
const response = await this.v3PublicGetBrokerageMarketProducts(this.extend(request, params));
|
|
1817
1822
|
//
|
|
1818
1823
|
// {
|
package/js/src/coinex.d.ts
CHANGED
|
@@ -81,18 +81,18 @@ export default class coinex extends Exchange {
|
|
|
81
81
|
info: any;
|
|
82
82
|
symbol: string;
|
|
83
83
|
markPrice: number;
|
|
84
|
-
indexPrice:
|
|
84
|
+
indexPrice: any;
|
|
85
85
|
interestRate: any;
|
|
86
86
|
estimatedSettlePrice: any;
|
|
87
|
-
timestamp:
|
|
88
|
-
datetime:
|
|
87
|
+
timestamp: any;
|
|
88
|
+
datetime: any;
|
|
89
89
|
fundingRate: number;
|
|
90
90
|
fundingTimestamp: number;
|
|
91
91
|
fundingDatetime: string;
|
|
92
92
|
nextFundingRate: number;
|
|
93
|
-
nextFundingTimestamp:
|
|
94
|
-
nextFundingDatetime:
|
|
95
|
-
previousFundingRate:
|
|
93
|
+
nextFundingTimestamp: number;
|
|
94
|
+
nextFundingDatetime: string;
|
|
95
|
+
previousFundingRate: any;
|
|
96
96
|
previousFundingTimestamp: any;
|
|
97
97
|
previousFundingDatetime: any;
|
|
98
98
|
}>;
|
|
@@ -100,18 +100,18 @@ export default class coinex extends Exchange {
|
|
|
100
100
|
info: any;
|
|
101
101
|
symbol: string;
|
|
102
102
|
markPrice: number;
|
|
103
|
-
indexPrice:
|
|
103
|
+
indexPrice: any;
|
|
104
104
|
interestRate: any;
|
|
105
105
|
estimatedSettlePrice: any;
|
|
106
|
-
timestamp:
|
|
107
|
-
datetime:
|
|
106
|
+
timestamp: any;
|
|
107
|
+
datetime: any;
|
|
108
108
|
fundingRate: number;
|
|
109
109
|
fundingTimestamp: number;
|
|
110
110
|
fundingDatetime: string;
|
|
111
111
|
nextFundingRate: number;
|
|
112
|
-
nextFundingTimestamp:
|
|
113
|
-
nextFundingDatetime:
|
|
114
|
-
previousFundingRate:
|
|
112
|
+
nextFundingTimestamp: number;
|
|
113
|
+
nextFundingDatetime: string;
|
|
114
|
+
previousFundingRate: any;
|
|
115
115
|
previousFundingTimestamp: any;
|
|
116
116
|
previousFundingDatetime: any;
|
|
117
117
|
};
|