ccxt 4.0.102 → 4.0.103
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 +515 -273
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +2 -1
- package/dist/cjs/src/base/errors.js +2 -1
- package/dist/cjs/src/bingx.js +70 -0
- package/dist/cjs/src/bitget.js +3 -0
- package/dist/cjs/src/bitmart.js +202 -46
- package/dist/cjs/src/bitrue.js +7 -0
- package/dist/cjs/src/bybit.js +6 -6
- package/dist/cjs/src/gate.js +221 -218
- package/dist/cjs/src/wavesexchange.js +2 -1
- package/js/ccxt.d.ts +3 -3
- package/js/ccxt.js +3 -3
- package/js/src/base/errorHierarchy.d.ts +1 -0
- package/js/src/base/errorHierarchy.js +1 -0
- package/js/src/base/errors.d.ts +2 -1
- package/js/src/base/errors.js +2 -2
- package/js/src/bingx.d.ts +8 -0
- package/js/src/bingx.js +70 -0
- package/js/src/bitget.js +3 -0
- package/js/src/bitmart.d.ts +8 -5
- package/js/src/bitmart.js +202 -46
- package/js/src/bitrue.js +7 -0
- package/js/src/bybit.js +7 -7
- package/js/src/gate.js +221 -218
- package/js/src/wavesexchange.js +2 -1
- package/package.json +1 -1
- package/skip-tests.json +2 -0
package/dist/ccxt.browser.js
CHANGED
|
@@ -10906,6 +10906,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10906
10906
|
/* harmony export */ "InvalidOrder": () => (/* binding */ InvalidOrder),
|
|
10907
10907
|
/* harmony export */ "MarginModeAlreadySet": () => (/* binding */ MarginModeAlreadySet),
|
|
10908
10908
|
/* harmony export */ "NetworkError": () => (/* binding */ NetworkError),
|
|
10909
|
+
/* harmony export */ "NoChange": () => (/* binding */ NoChange),
|
|
10909
10910
|
/* harmony export */ "NotSupported": () => (/* binding */ NotSupported),
|
|
10910
10911
|
/* harmony export */ "NullResponse": () => (/* binding */ NullResponse),
|
|
10911
10912
|
/* harmony export */ "OnMaintenance": () => (/* binding */ OnMaintenance),
|
|
@@ -11150,7 +11151,7 @@ class RequestTimeout extends NetworkError {
|
|
|
11150
11151
|
// // Derived class hierarchy
|
|
11151
11152
|
// errorHierarchy
|
|
11152
11153
|
// )
|
|
11153
|
-
const errors = { 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, ContractUnavailable };
|
|
11154
|
+
const errors = { 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, ContractUnavailable, NoChange };
|
|
11154
11155
|
|
|
11155
11156
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (errors);
|
|
11156
11157
|
|
|
@@ -24773,6 +24774,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
24773
24774
|
'fetchBalance': true,
|
|
24774
24775
|
'fetchClosedOrders': true,
|
|
24775
24776
|
'fetchCurrencies': true,
|
|
24777
|
+
'fetchDepositAddress': true,
|
|
24776
24778
|
'fetchDeposits': true,
|
|
24777
24779
|
'fetchDepositWithdrawFee': 'emulated',
|
|
24778
24780
|
'fetchDepositWithdrawFees': true,
|
|
@@ -25059,6 +25061,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
25059
25061
|
'PFUTURES': 'swap',
|
|
25060
25062
|
'SFUTURES': 'future',
|
|
25061
25063
|
},
|
|
25064
|
+
'recvWindow': 5 * 1000, // 5 sec
|
|
25062
25065
|
},
|
|
25063
25066
|
});
|
|
25064
25067
|
}
|
|
@@ -27119,6 +27122,74 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
27119
27122
|
'status': status,
|
|
27120
27123
|
};
|
|
27121
27124
|
}
|
|
27125
|
+
async fetchDepositAddress(code, params = {}) {
|
|
27126
|
+
/**
|
|
27127
|
+
* @method
|
|
27128
|
+
* @name bingx#fetchDepositAddress
|
|
27129
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
27130
|
+
* @see https://bingx-api.github.io/docs/#/common/sub-account#Query%20Main%20Account%20Deposit%20Address
|
|
27131
|
+
* @param {string} code unified currency code
|
|
27132
|
+
* @param {object} [params] extra parameters specific to the bingx api endpoint
|
|
27133
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
27134
|
+
*/
|
|
27135
|
+
await this.loadMarkets();
|
|
27136
|
+
const currency = this.currency(code);
|
|
27137
|
+
const defaultRecvWindow = this.safeInteger(this.options, 'recvWindow');
|
|
27138
|
+
const recvWindow = this.safeInteger(this.parseParams, 'recvWindow', defaultRecvWindow);
|
|
27139
|
+
const request = {
|
|
27140
|
+
'coin': currency['id'],
|
|
27141
|
+
'offset': 0,
|
|
27142
|
+
'limit': 1000,
|
|
27143
|
+
'recvWindow': recvWindow,
|
|
27144
|
+
};
|
|
27145
|
+
const response = await this.walletsV1PrivateGetCapitalDepositAddress(this.extend(request, params));
|
|
27146
|
+
//
|
|
27147
|
+
// {
|
|
27148
|
+
// code: '0',
|
|
27149
|
+
// timestamp: '1695200226859',
|
|
27150
|
+
// data: {
|
|
27151
|
+
// data: [
|
|
27152
|
+
// {
|
|
27153
|
+
// coinId: '799',
|
|
27154
|
+
// coin: 'USDT',
|
|
27155
|
+
// network: 'BEP20',
|
|
27156
|
+
// address: '6a7eda2817462dabb6493277a2cfe0f5c3f2550b',
|
|
27157
|
+
// tag: ''
|
|
27158
|
+
// }
|
|
27159
|
+
// ],
|
|
27160
|
+
// total: '1'
|
|
27161
|
+
// }
|
|
27162
|
+
// }
|
|
27163
|
+
//
|
|
27164
|
+
const data = this.safeValue(this.safeValue(response, 'data'), 'data');
|
|
27165
|
+
const parsed = this.parseDepositAddresses(data, [currency['code']], false);
|
|
27166
|
+
return this.indexBy(parsed, 'network');
|
|
27167
|
+
}
|
|
27168
|
+
parseDepositAddress(depositAddress, currency = undefined) {
|
|
27169
|
+
//
|
|
27170
|
+
// {
|
|
27171
|
+
// coinId: '799',
|
|
27172
|
+
// coin: 'USDT',
|
|
27173
|
+
// network: 'BEP20',
|
|
27174
|
+
// address: '6a7eda2817462dabb6493277a2cfe0f5c3f2550b',
|
|
27175
|
+
// tag: ''
|
|
27176
|
+
// }
|
|
27177
|
+
//
|
|
27178
|
+
const address = this.safeString(depositAddress, 'address');
|
|
27179
|
+
const tag = this.safeString(depositAddress, 'tag');
|
|
27180
|
+
const currencyId = this.safeString(depositAddress, 'coin');
|
|
27181
|
+
currency = this.safeCurrency(currencyId, currency);
|
|
27182
|
+
const code = currency['code'];
|
|
27183
|
+
const network = this.safeString(depositAddress, 'network');
|
|
27184
|
+
this.checkAddress(address);
|
|
27185
|
+
return {
|
|
27186
|
+
'currency': code,
|
|
27187
|
+
'address': address,
|
|
27188
|
+
'tag': tag,
|
|
27189
|
+
'network': network,
|
|
27190
|
+
'info': depositAddress,
|
|
27191
|
+
};
|
|
27192
|
+
}
|
|
27122
27193
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
27123
27194
|
/**
|
|
27124
27195
|
* @method
|
|
@@ -39893,6 +39964,9 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39893
39964
|
response = await this.publicMixGetMarketHistoryCandles(this.extend(request, params));
|
|
39894
39965
|
}
|
|
39895
39966
|
}
|
|
39967
|
+
if (response === '') {
|
|
39968
|
+
return []; // happens when a new token is listed
|
|
39969
|
+
}
|
|
39896
39970
|
// [ ["1645911960000","39406","39407","39374.5","39379","35.526","1399132.341"] ]
|
|
39897
39971
|
const data = this.safeValue(response, 'data', response);
|
|
39898
39972
|
return this.parseOHLCVs(data, market, timeframe, since, limit);
|
|
@@ -43630,7 +43704,7 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
43630
43704
|
'fetchTransactionFee': true,
|
|
43631
43705
|
'fetchTransactionFees': false,
|
|
43632
43706
|
'fetchTransfer': false,
|
|
43633
|
-
'fetchTransfers':
|
|
43707
|
+
'fetchTransfers': true,
|
|
43634
43708
|
'fetchWithdrawAddressesByNetwork': false,
|
|
43635
43709
|
'fetchWithdrawal': true,
|
|
43636
43710
|
'fetchWithdrawals': true,
|
|
@@ -44114,6 +44188,7 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
44114
44188
|
},
|
|
44115
44189
|
'accountsByType': {
|
|
44116
44190
|
'spot': 'spot',
|
|
44191
|
+
'swap': 'swap',
|
|
44117
44192
|
},
|
|
44118
44193
|
'createMarketBuyOrderRequiresPrice': true,
|
|
44119
44194
|
},
|
|
@@ -44773,6 +44848,8 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
44773
44848
|
* @method
|
|
44774
44849
|
* @name bitmart#fetchOrderBook
|
|
44775
44850
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
44851
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-depth-v3
|
|
44852
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-market-depth
|
|
44776
44853
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
44777
44854
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
44778
44855
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
@@ -44780,41 +44857,70 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
44780
44857
|
*/
|
|
44781
44858
|
await this.loadMarkets();
|
|
44782
44859
|
const market = this.market(symbol);
|
|
44783
|
-
if (!market['spot']) {
|
|
44784
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchOrderBook() does not support ' + market['type'] + ' markets, only spot markets are accepted');
|
|
44785
|
-
}
|
|
44786
44860
|
const request = {
|
|
44787
44861
|
'symbol': market['id'],
|
|
44788
44862
|
};
|
|
44789
|
-
|
|
44790
|
-
|
|
44863
|
+
let response = undefined;
|
|
44864
|
+
if (market['spot']) {
|
|
44865
|
+
if (limit !== undefined) {
|
|
44866
|
+
request['limit'] = limit; // default 35, max 50
|
|
44867
|
+
}
|
|
44868
|
+
response = await this.publicGetSpotQuotationV3Books(this.extend(request, params));
|
|
44869
|
+
}
|
|
44870
|
+
else if (market['swap']) {
|
|
44871
|
+
response = await this.publicGetContractPublicDepth(this.extend(request, params));
|
|
44872
|
+
}
|
|
44873
|
+
else {
|
|
44874
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' fetchOrderBook() does not support ' + market['type'] + ' markets, only spot and swap markets are accepted');
|
|
44791
44875
|
}
|
|
44792
|
-
// request['precision'] = 4; // optional price precision / depth level whose range is defined in symbol details
|
|
44793
|
-
const response = await this.publicGetSpotV1SymbolsBook(this.extend(request, params));
|
|
44794
44876
|
//
|
|
44795
44877
|
// spot
|
|
44796
44878
|
//
|
|
44797
44879
|
// {
|
|
44798
|
-
// "
|
|
44799
|
-
// "
|
|
44800
|
-
// "
|
|
44801
|
-
//
|
|
44802
|
-
// "
|
|
44803
|
-
//
|
|
44804
|
-
//
|
|
44805
|
-
//
|
|
44880
|
+
// "code": 1000,
|
|
44881
|
+
// "message": "success",
|
|
44882
|
+
// "data": {
|
|
44883
|
+
// "ts": "1695264191808",
|
|
44884
|
+
// "symbol": "BTC_USDT",
|
|
44885
|
+
// "asks": [
|
|
44886
|
+
// ["26942.57","0.06492"],
|
|
44887
|
+
// ["26942.73","0.05447"],
|
|
44888
|
+
// ["26943.00","0.07154"]
|
|
44806
44889
|
// ],
|
|
44807
|
-
// "
|
|
44808
|
-
//
|
|
44809
|
-
//
|
|
44810
|
-
//
|
|
44890
|
+
// "bids": [
|
|
44891
|
+
// ["26942.45","0.00074"],
|
|
44892
|
+
// ["26941.53","0.00371"],
|
|
44893
|
+
// ["26940.94","0.08992"]
|
|
44811
44894
|
// ]
|
|
44812
|
-
// }
|
|
44895
|
+
// },
|
|
44896
|
+
// "trace": "430a7f69581d4258a8e4b424dfb10782.73.16952341919017619"
|
|
44897
|
+
// }
|
|
44898
|
+
//
|
|
44899
|
+
// swap
|
|
44900
|
+
//
|
|
44901
|
+
// {
|
|
44902
|
+
// "code": 1000,
|
|
44903
|
+
// "message": "Ok",
|
|
44904
|
+
// "data": {
|
|
44905
|
+
// "asks": [
|
|
44906
|
+
// ["26938.3","3499","3499"],
|
|
44907
|
+
// ["26938.5","14702","18201"],
|
|
44908
|
+
// ["26938.6","20457","38658"]
|
|
44909
|
+
// ],
|
|
44910
|
+
// "bids": [
|
|
44911
|
+
// ["26938.2","20","20"],
|
|
44912
|
+
// ["26937.9","1913","1933"],
|
|
44913
|
+
// ["26937.8","2588","4521"]
|
|
44914
|
+
// ],
|
|
44915
|
+
// "timestamp": 1695264383999,
|
|
44916
|
+
// "symbol": "BTCUSDT"
|
|
44917
|
+
// },
|
|
44918
|
+
// "trace": "4cad855074664097ac6ba5258c47305d.72.16952643834721135"
|
|
44813
44919
|
// }
|
|
44814
44920
|
//
|
|
44815
44921
|
const data = this.safeValue(response, 'data', {});
|
|
44816
|
-
const timestamp = this.
|
|
44817
|
-
return this.parseOrderBook(data, symbol, timestamp
|
|
44922
|
+
const timestamp = this.safeInteger2(data, 'ts', 'timestamp');
|
|
44923
|
+
return this.parseOrderBook(data, market['symbol'], timestamp);
|
|
44818
44924
|
}
|
|
44819
44925
|
parseTrade(trade, market = undefined) {
|
|
44820
44926
|
//
|
|
@@ -46561,7 +46667,8 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46561
46667
|
* @method
|
|
46562
46668
|
* @name bitmart#transfer
|
|
46563
46669
|
* @description transfer currency internally between wallets on the same account, currently only supports transfer between spot and margin
|
|
46564
|
-
* @see https://developer-pro.bitmart.com/en/spot/#margin-asset-transfer
|
|
46670
|
+
* @see https://developer-pro.bitmart.com/en/spot/#margin-asset-transfer-signed
|
|
46671
|
+
* @see https://developer-pro.bitmart.com/en/futures/#transfer-signed
|
|
46565
46672
|
* @param {string} code unified currency code
|
|
46566
46673
|
* @param {float} amount amount to transfer
|
|
46567
46674
|
* @param {string} fromAccount account to transfer from
|
|
@@ -46579,17 +46686,35 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46579
46686
|
const fromId = this.convertTypeToAccount(fromAccount);
|
|
46580
46687
|
const toId = this.convertTypeToAccount(toAccount);
|
|
46581
46688
|
if (fromAccount === 'spot') {
|
|
46582
|
-
|
|
46583
|
-
|
|
46689
|
+
if (toAccount === 'margin') {
|
|
46690
|
+
request['side'] = 'in';
|
|
46691
|
+
request['symbol'] = toId;
|
|
46692
|
+
}
|
|
46693
|
+
else if (toAccount === 'swap') {
|
|
46694
|
+
request['type'] = 'spot_to_contract';
|
|
46695
|
+
}
|
|
46584
46696
|
}
|
|
46585
46697
|
else if (toAccount === 'spot') {
|
|
46586
|
-
|
|
46587
|
-
|
|
46698
|
+
if (fromAccount === 'margin') {
|
|
46699
|
+
request['side'] = 'out';
|
|
46700
|
+
request['symbol'] = fromId;
|
|
46701
|
+
}
|
|
46702
|
+
else if (fromAccount === 'swap') {
|
|
46703
|
+
request['type'] = 'contract_to_spot';
|
|
46704
|
+
}
|
|
46588
46705
|
}
|
|
46589
46706
|
else {
|
|
46590
46707
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' transfer() requires either fromAccount or toAccount to be spot');
|
|
46591
46708
|
}
|
|
46592
|
-
|
|
46709
|
+
let response = undefined;
|
|
46710
|
+
if ((fromAccount === 'margin') || (toAccount === 'margin')) {
|
|
46711
|
+
response = await this.privatePostSpotV1MarginIsolatedTransfer(this.extend(request, params));
|
|
46712
|
+
}
|
|
46713
|
+
else if ((fromAccount === 'swap') || (toAccount === 'swap')) {
|
|
46714
|
+
response = await this.privatePostAccountV1TransferContract(this.extend(request, params));
|
|
46715
|
+
}
|
|
46716
|
+
//
|
|
46717
|
+
// margin
|
|
46593
46718
|
//
|
|
46594
46719
|
// {
|
|
46595
46720
|
// "message": "OK",
|
|
@@ -46600,41 +46725,146 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
46600
46725
|
// }
|
|
46601
46726
|
// }
|
|
46602
46727
|
//
|
|
46603
|
-
|
|
46604
|
-
|
|
46605
|
-
|
|
46606
|
-
|
|
46728
|
+
// swap
|
|
46729
|
+
//
|
|
46730
|
+
// {
|
|
46731
|
+
// "message": "OK",
|
|
46732
|
+
// "code": 1000,
|
|
46733
|
+
// "trace": "4cad858074667097ac6ba5257c57305d.68.16953302431189455",
|
|
46734
|
+
// "data": {
|
|
46735
|
+
// "currency": "USDT",
|
|
46736
|
+
// "amount": "5"
|
|
46737
|
+
// }
|
|
46738
|
+
// }
|
|
46739
|
+
//
|
|
46740
|
+
const data = this.safeValue(response, 'data', {});
|
|
46741
|
+
return this.extend(this.parseTransfer(data, currency), {
|
|
46742
|
+
'status': this.parseTransferStatus(this.safeString2(response, 'code', 'message')),
|
|
46607
46743
|
});
|
|
46608
46744
|
}
|
|
46609
46745
|
parseTransferStatus(status) {
|
|
46610
46746
|
const statuses = {
|
|
46611
46747
|
'1000': 'ok',
|
|
46612
46748
|
'OK': 'ok',
|
|
46749
|
+
'FINISHED': 'ok',
|
|
46613
46750
|
};
|
|
46614
46751
|
return this.safeString(statuses, status, status);
|
|
46615
46752
|
}
|
|
46753
|
+
parseTransferToAccount(type) {
|
|
46754
|
+
const types = {
|
|
46755
|
+
'contract_to_spot': 'spot',
|
|
46756
|
+
'spot_to_contract': 'swap',
|
|
46757
|
+
};
|
|
46758
|
+
return this.safeString(types, type, type);
|
|
46759
|
+
}
|
|
46760
|
+
parseTransferFromAccount(type) {
|
|
46761
|
+
const types = {
|
|
46762
|
+
'contract_to_spot': 'swap',
|
|
46763
|
+
'spot_to_contract': 'spot',
|
|
46764
|
+
};
|
|
46765
|
+
return this.safeString(types, type, type);
|
|
46766
|
+
}
|
|
46616
46767
|
parseTransfer(transfer, currency = undefined) {
|
|
46768
|
+
//
|
|
46769
|
+
// margin
|
|
46770
|
+
//
|
|
46771
|
+
// {
|
|
46772
|
+
// "transfer_id": "ca90d97a621e47d49774f19af6b029f5"
|
|
46773
|
+
// }
|
|
46774
|
+
//
|
|
46775
|
+
// swap
|
|
46776
|
+
//
|
|
46777
|
+
// {
|
|
46778
|
+
// "currency": "USDT",
|
|
46779
|
+
// "amount": "5"
|
|
46780
|
+
// }
|
|
46781
|
+
//
|
|
46782
|
+
// fetchTransfers
|
|
46783
|
+
//
|
|
46784
|
+
// {
|
|
46785
|
+
// "transfer_id": "902463535961567232",
|
|
46786
|
+
// "currency": "USDT",
|
|
46787
|
+
// "amount": "5",
|
|
46788
|
+
// "type": "contract_to_spot",
|
|
46789
|
+
// "state": "FINISHED",
|
|
46790
|
+
// "timestamp": 1695330539565
|
|
46791
|
+
// }
|
|
46792
|
+
//
|
|
46793
|
+
const currencyId = this.safeString(transfer, 'currency');
|
|
46794
|
+
const timestamp = this.safeInteger(transfer, 'timestamp');
|
|
46795
|
+
return {
|
|
46796
|
+
'id': this.safeString(transfer, 'transfer_id'),
|
|
46797
|
+
'timestamp': timestamp,
|
|
46798
|
+
'datetime': this.iso8601(timestamp),
|
|
46799
|
+
'currency': this.safeCurrencyCode(currencyId, currency),
|
|
46800
|
+
'amount': this.safeNumber(transfer, 'amount'),
|
|
46801
|
+
'fromAccount': this.parseTransferFromAccount(this.safeString(transfer, 'type')),
|
|
46802
|
+
'toAccount': this.parseTransferToAccount(this.safeString(transfer, 'type')),
|
|
46803
|
+
'status': this.parseTransferStatus(this.safeString(transfer, 'state')),
|
|
46804
|
+
};
|
|
46805
|
+
}
|
|
46806
|
+
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
46807
|
+
/**
|
|
46808
|
+
* @method
|
|
46809
|
+
* @name bitmart#fetchTransfers
|
|
46810
|
+
* @description fetch a history of internal transfers made on an account, only transfers between spot and swap are supported
|
|
46811
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-transfer-list-signed
|
|
46812
|
+
* @param {string} code unified currency code of the currency transferred
|
|
46813
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
46814
|
+
* @param {int} [limit] the maximum number of transfer structures to retrieve
|
|
46815
|
+
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
46816
|
+
* @param {int} [params.page] the required number of pages, default is 1, max is 1000
|
|
46817
|
+
* @param {int} [params.until] the latest time in ms to fetch transfers for
|
|
46818
|
+
* @returns {object[]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
46819
|
+
*/
|
|
46820
|
+
await this.loadMarkets();
|
|
46821
|
+
if (limit === undefined) {
|
|
46822
|
+
limit = 10;
|
|
46823
|
+
}
|
|
46824
|
+
const request = {
|
|
46825
|
+
'page': this.safeInteger(params, 'page', 1),
|
|
46826
|
+
'limit': limit, // default is 10, max is 100
|
|
46827
|
+
};
|
|
46828
|
+
let currency = undefined;
|
|
46829
|
+
if (code !== undefined) {
|
|
46830
|
+
currency = this.currency(code);
|
|
46831
|
+
request['currency'] = currency['id'];
|
|
46832
|
+
}
|
|
46833
|
+
if (since !== undefined) {
|
|
46834
|
+
request['time_start'] = since;
|
|
46835
|
+
}
|
|
46836
|
+
if (limit !== undefined) {
|
|
46837
|
+
request['limit'] = limit;
|
|
46838
|
+
}
|
|
46839
|
+
const until = this.safeInteger2(params, 'until', 'till'); // unified in milliseconds
|
|
46840
|
+
const endTime = this.safeInteger(params, 'time_end', until); // exchange-specific in milliseconds
|
|
46841
|
+
params = this.omit(params, ['till', 'until']);
|
|
46842
|
+
if (endTime !== undefined) {
|
|
46843
|
+
request['time_end'] = endTime;
|
|
46844
|
+
}
|
|
46845
|
+
const response = await this.privatePostAccountV1TransferContractList(this.extend(request, params));
|
|
46617
46846
|
//
|
|
46618
46847
|
// {
|
|
46619
46848
|
// "message": "OK",
|
|
46620
46849
|
// "code": 1000,
|
|
46621
|
-
// "trace": "
|
|
46850
|
+
// "trace": "7f9d93e10f9g4513bc08a7btc2a5559a.69.16953325693032193",
|
|
46622
46851
|
// "data": {
|
|
46623
|
-
// "
|
|
46852
|
+
// "records": [
|
|
46853
|
+
// {
|
|
46854
|
+
// "transfer_id": "902463535961567232",
|
|
46855
|
+
// "currency": "USDT",
|
|
46856
|
+
// "amount": "5",
|
|
46857
|
+
// "type": "contract_to_spot",
|
|
46858
|
+
// "state": "FINISHED",
|
|
46859
|
+
// "timestamp": 1695330539565
|
|
46860
|
+
// },
|
|
46861
|
+
// ]
|
|
46624
46862
|
// }
|
|
46625
46863
|
// }
|
|
46626
46864
|
//
|
|
46627
|
-
const data = this.safeValue(
|
|
46628
|
-
|
|
46629
|
-
|
|
46630
|
-
'timestamp': undefined,
|
|
46631
|
-
'datetime': undefined,
|
|
46632
|
-
'currency': this.safeCurrencyCode(undefined, currency),
|
|
46633
|
-
'amount': undefined,
|
|
46634
|
-
'fromAccount': undefined,
|
|
46635
|
-
'toAccount': undefined,
|
|
46636
|
-
'status': this.parseTransferStatus(this.safeString2(transfer, 'code', 'message')),
|
|
46637
|
-
};
|
|
46865
|
+
const data = this.safeValue(response, 'data', {});
|
|
46866
|
+
const records = this.safeValue(data, 'records', []);
|
|
46867
|
+
return this.parseTransfers(records, currency, since, limit);
|
|
46638
46868
|
}
|
|
46639
46869
|
async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
46640
46870
|
/**
|
|
@@ -54619,12 +54849,19 @@ class bitrue extends _abstract_bitrue_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
54619
54849
|
* @method
|
|
54620
54850
|
* @name bitrue#createOrder
|
|
54621
54851
|
* @description create a trade order
|
|
54852
|
+
* @see https://github.com/Bitrue-exchange/Spot-official-api-docs#signed-endpoint-examples-for-post-apiv1order
|
|
54622
54853
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
54623
54854
|
* @param {string} type 'market' or 'limit'
|
|
54624
54855
|
* @param {string} side 'buy' or 'sell'
|
|
54625
54856
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
54626
54857
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
54627
54858
|
* @param {object} [params] extra parameters specific to the bitrue api endpoint
|
|
54859
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
54860
|
+
* @param {string} [params.clientOrderId] a unique id for the order, automatically generated if not sent
|
|
54861
|
+
*
|
|
54862
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
54863
|
+
* @param {decimal} [params.icebergQty]
|
|
54864
|
+
* @param {long} [params.recvWindow]
|
|
54628
54865
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
54629
54866
|
*/
|
|
54630
54867
|
await this.loadMarkets();
|
|
@@ -70600,12 +70837,12 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
70600
70837
|
'110021': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
70601
70838
|
'110022': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
70602
70839
|
'110023': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
70603
|
-
'110024': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
70604
|
-
'110025': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
70605
|
-
'110026': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
70606
|
-
'110027': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
70607
|
-
'110028': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
70608
|
-
'110029': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.
|
|
70840
|
+
'110024': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
70841
|
+
'110025': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NoChange,
|
|
70842
|
+
'110026': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.MarginModeAlreadySet,
|
|
70843
|
+
'110027': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NoChange,
|
|
70844
|
+
'110028': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
70845
|
+
'110029': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.BadRequest,
|
|
70609
70846
|
'110030': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
70610
70847
|
'110031': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
70611
70848
|
'110032': _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder,
|
|
@@ -112226,7 +112463,7 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
112226
112463
|
'id': 'gate',
|
|
112227
112464
|
'name': 'Gate.io',
|
|
112228
112465
|
'countries': ['KR'],
|
|
112229
|
-
'rateLimit':
|
|
112466
|
+
'rateLimit': 50,
|
|
112230
112467
|
'version': 'v4',
|
|
112231
112468
|
'certified': true,
|
|
112232
112469
|
'pro': true,
|
|
@@ -112353,9 +112590,10 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
112353
112590
|
},
|
|
112354
112591
|
'api': {
|
|
112355
112592
|
'public': {
|
|
112593
|
+
// All public endpoints 200r/10s per endpoint
|
|
112356
112594
|
'wallet': {
|
|
112357
112595
|
'get': {
|
|
112358
|
-
'currency_chains': 1
|
|
112596
|
+
'currency_chains': 1,
|
|
112359
112597
|
},
|
|
112360
112598
|
},
|
|
112361
112599
|
'spot': {
|
|
@@ -112389,131 +112627,133 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
112389
112627
|
},
|
|
112390
112628
|
'futures': {
|
|
112391
112629
|
'get': {
|
|
112392
|
-
'{settle}/contracts': 1
|
|
112393
|
-
'{settle}/contracts/{contract}': 1
|
|
112394
|
-
'{settle}/order_book': 1
|
|
112395
|
-
'{settle}/trades': 1
|
|
112396
|
-
'{settle}/candlesticks': 1
|
|
112397
|
-
'{settle}/premium_index': 1
|
|
112398
|
-
'{settle}/tickers': 1
|
|
112399
|
-
'{settle}/funding_rate': 1
|
|
112400
|
-
'{settle}/insurance': 1
|
|
112401
|
-
'{settle}/contract_stats': 1
|
|
112402
|
-
'{settle}/index_constituents/{index}': 1
|
|
112403
|
-
'{settle}/liq_orders': 1
|
|
112630
|
+
'{settle}/contracts': 1,
|
|
112631
|
+
'{settle}/contracts/{contract}': 1,
|
|
112632
|
+
'{settle}/order_book': 1,
|
|
112633
|
+
'{settle}/trades': 1,
|
|
112634
|
+
'{settle}/candlesticks': 1,
|
|
112635
|
+
'{settle}/premium_index': 1,
|
|
112636
|
+
'{settle}/tickers': 1,
|
|
112637
|
+
'{settle}/funding_rate': 1,
|
|
112638
|
+
'{settle}/insurance': 1,
|
|
112639
|
+
'{settle}/contract_stats': 1,
|
|
112640
|
+
'{settle}/index_constituents/{index}': 1,
|
|
112641
|
+
'{settle}/liq_orders': 1,
|
|
112404
112642
|
},
|
|
112405
112643
|
},
|
|
112406
112644
|
'delivery': {
|
|
112407
112645
|
'get': {
|
|
112408
|
-
'{settle}/contracts': 1
|
|
112409
|
-
'{settle}/contracts/{contract}': 1
|
|
112410
|
-
'{settle}/order_book': 1
|
|
112411
|
-
'{settle}/trades': 1
|
|
112412
|
-
'{settle}/candlesticks': 1
|
|
112413
|
-
'{settle}/tickers': 1
|
|
112414
|
-
'{settle}/insurance': 1
|
|
112646
|
+
'{settle}/contracts': 1,
|
|
112647
|
+
'{settle}/contracts/{contract}': 1,
|
|
112648
|
+
'{settle}/order_book': 1,
|
|
112649
|
+
'{settle}/trades': 1,
|
|
112650
|
+
'{settle}/candlesticks': 1,
|
|
112651
|
+
'{settle}/tickers': 1,
|
|
112652
|
+
'{settle}/insurance': 1,
|
|
112415
112653
|
},
|
|
112416
112654
|
},
|
|
112417
112655
|
'options': {
|
|
112418
112656
|
'get': {
|
|
112419
|
-
'underlyings': 1
|
|
112420
|
-
'expirations': 1
|
|
112421
|
-
'contracts': 1
|
|
112422
|
-
'contracts/{contract}': 1
|
|
112423
|
-
'settlements': 1
|
|
112424
|
-
'settlements/{contract}': 1
|
|
112425
|
-
'order_book': 1
|
|
112426
|
-
'tickers': 1
|
|
112427
|
-
'underlying/tickers/{underlying}': 1
|
|
112428
|
-
'candlesticks': 1
|
|
112429
|
-
'underlying/candlesticks': 1
|
|
112430
|
-
'trades': 1
|
|
112657
|
+
'underlyings': 1,
|
|
112658
|
+
'expirations': 1,
|
|
112659
|
+
'contracts': 1,
|
|
112660
|
+
'contracts/{contract}': 1,
|
|
112661
|
+
'settlements': 1,
|
|
112662
|
+
'settlements/{contract}': 1,
|
|
112663
|
+
'order_book': 1,
|
|
112664
|
+
'tickers': 1,
|
|
112665
|
+
'underlying/tickers/{underlying}': 1,
|
|
112666
|
+
'candlesticks': 1,
|
|
112667
|
+
'underlying/candlesticks': 1,
|
|
112668
|
+
'trades': 1,
|
|
112431
112669
|
},
|
|
112432
112670
|
},
|
|
112433
112671
|
'earn': {
|
|
112434
112672
|
'get': {
|
|
112435
|
-
'uni/currencies': 1
|
|
112436
|
-
'uni/currencies/{currency}': 1
|
|
112673
|
+
'uni/currencies': 1,
|
|
112674
|
+
'uni/currencies/{currency}': 1,
|
|
112437
112675
|
},
|
|
112438
112676
|
},
|
|
112439
112677
|
},
|
|
112440
112678
|
'private': {
|
|
112679
|
+
// private endpoints default is 150r/10s per endpoint
|
|
112441
112680
|
'withdrawals': {
|
|
112442
112681
|
'post': {
|
|
112443
|
-
'withdrawals':
|
|
112682
|
+
'withdrawals': 20, // 1r/s cost = 20 / 1 = 20
|
|
112444
112683
|
},
|
|
112445
112684
|
'delete': {
|
|
112446
|
-
'withdrawals/{withdrawal_id}':
|
|
112685
|
+
'withdrawals/{withdrawal_id}': 1,
|
|
112447
112686
|
},
|
|
112448
112687
|
},
|
|
112449
112688
|
'wallet': {
|
|
112450
112689
|
'get': {
|
|
112451
|
-
'deposit_address':
|
|
112452
|
-
'withdrawals':
|
|
112453
|
-
'deposits':
|
|
112454
|
-
'sub_account_transfers':
|
|
112455
|
-
'withdraw_status':
|
|
112456
|
-
'sub_account_balances':
|
|
112457
|
-
'sub_account_margin_balances':
|
|
112458
|
-
'sub_account_futures_balances':
|
|
112459
|
-
'sub_account_cross_margin_balances':
|
|
112460
|
-
'saved_address':
|
|
112461
|
-
'fee':
|
|
112462
|
-
'total_balance':
|
|
112690
|
+
'deposit_address': 1,
|
|
112691
|
+
'withdrawals': 1,
|
|
112692
|
+
'deposits': 1,
|
|
112693
|
+
'sub_account_transfers': 1,
|
|
112694
|
+
'withdraw_status': 1,
|
|
112695
|
+
'sub_account_balances': 2.5,
|
|
112696
|
+
'sub_account_margin_balances': 2.5,
|
|
112697
|
+
'sub_account_futures_balances': 2.5,
|
|
112698
|
+
'sub_account_cross_margin_balances': 2.5,
|
|
112699
|
+
'saved_address': 1,
|
|
112700
|
+
'fee': 1,
|
|
112701
|
+
'total_balance': 2.5,
|
|
112463
112702
|
},
|
|
112464
112703
|
'post': {
|
|
112465
|
-
'transfers':
|
|
112466
|
-
'sub_account_transfers':
|
|
112467
|
-
'sub_account_to_sub_account':
|
|
112704
|
+
'transfers': 2.5,
|
|
112705
|
+
'sub_account_transfers': 2.5,
|
|
112706
|
+
'sub_account_to_sub_account': 2.5,
|
|
112468
112707
|
},
|
|
112469
112708
|
},
|
|
112470
112709
|
'subAccounts': {
|
|
112471
112710
|
'get': {
|
|
112472
|
-
'sub_accounts':
|
|
112473
|
-
'sub_accounts/{user_id}':
|
|
112474
|
-
'sub_accounts/{user_id}/keys':
|
|
112475
|
-
'sub_accounts/{user_id}/keys/{key}':
|
|
112711
|
+
'sub_accounts': 2.5,
|
|
112712
|
+
'sub_accounts/{user_id}': 2.5,
|
|
112713
|
+
'sub_accounts/{user_id}/keys': 2.5,
|
|
112714
|
+
'sub_accounts/{user_id}/keys/{key}': 2.5,
|
|
112476
112715
|
},
|
|
112477
112716
|
'post': {
|
|
112478
|
-
'sub_accounts':
|
|
112479
|
-
'sub_accounts/{user_id}/keys':
|
|
112480
|
-
'sub_accounts/{user_id}/lock':
|
|
112481
|
-
'sub_accounts/{user_id}/unlock':
|
|
112717
|
+
'sub_accounts': 2.5,
|
|
112718
|
+
'sub_accounts/{user_id}/keys': 2.5,
|
|
112719
|
+
'sub_accounts/{user_id}/lock': 2.5,
|
|
112720
|
+
'sub_accounts/{user_id}/unlock': 2.5,
|
|
112482
112721
|
},
|
|
112483
112722
|
'put': {
|
|
112484
|
-
'sub_accounts/{user_id}/keys/{key}':
|
|
112723
|
+
'sub_accounts/{user_id}/keys/{key}': 2.5,
|
|
112485
112724
|
},
|
|
112486
112725
|
'delete': {
|
|
112487
|
-
'sub_accounts/{user_id}/keys/{key}':
|
|
112726
|
+
'sub_accounts/{user_id}/keys/{key}': 2.5,
|
|
112488
112727
|
},
|
|
112489
112728
|
},
|
|
112490
112729
|
'portfolio': {
|
|
112491
112730
|
'get': {
|
|
112492
|
-
'spot/currency_pairs':
|
|
112493
|
-
'spot/currency_pairs/{currency_pair}':
|
|
112494
|
-
'accounts':
|
|
112495
|
-
'account_mode':
|
|
112496
|
-
'borrowable':
|
|
112497
|
-
'transferable':
|
|
112498
|
-
'loans':
|
|
112499
|
-
'loan_records':
|
|
112500
|
-
'interest_records':
|
|
112501
|
-
'spot/orders':
|
|
112502
|
-
'spot/orders/{order_id}':
|
|
112731
|
+
'spot/currency_pairs': 20 / 15,
|
|
112732
|
+
'spot/currency_pairs/{currency_pair}': 20 / 15,
|
|
112733
|
+
'accounts': 20 / 15,
|
|
112734
|
+
'account_mode': 20 / 15,
|
|
112735
|
+
'borrowable': 20 / 15,
|
|
112736
|
+
'transferable': 20 / 15,
|
|
112737
|
+
'loans': 20 / 15,
|
|
112738
|
+
'loan_records': 20 / 15,
|
|
112739
|
+
'interest_records': 20 / 15,
|
|
112740
|
+
'spot/orders': 20 / 15,
|
|
112741
|
+
'spot/orders/{order_id}': 20 / 15,
|
|
112503
112742
|
},
|
|
112504
112743
|
'post': {
|
|
112505
|
-
'account_mode':
|
|
112506
|
-
'loans':
|
|
112507
|
-
'spot/orders':
|
|
112744
|
+
'account_mode': 20 / 15,
|
|
112745
|
+
'loans': 200 / 15,
|
|
112746
|
+
'spot/orders': 20 / 15,
|
|
112508
112747
|
},
|
|
112509
112748
|
'delete': {
|
|
112510
|
-
'spot/orders/{order_id}':
|
|
112749
|
+
'spot/orders/{order_id}': 20 / 15,
|
|
112511
112750
|
},
|
|
112512
112751
|
'patch': {
|
|
112513
|
-
'spot/orders/{order_id}':
|
|
112752
|
+
'spot/orders/{order_id}': 20 / 15,
|
|
112514
112753
|
},
|
|
112515
112754
|
},
|
|
112516
112755
|
'spot': {
|
|
112756
|
+
// default is 200r/10s
|
|
112517
112757
|
'get': {
|
|
112518
112758
|
'fee': 1,
|
|
112519
112759
|
'batch_fee': 1,
|
|
@@ -112527,219 +112767,219 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
112527
112767
|
'price_orders/{order_id}': 1,
|
|
112528
112768
|
},
|
|
112529
112769
|
'post': {
|
|
112530
|
-
'batch_orders':
|
|
112770
|
+
'batch_orders': 0.4,
|
|
112531
112771
|
'cross_liquidate_orders': 1,
|
|
112532
|
-
'orders':
|
|
112533
|
-
'cancel_batch_orders':
|
|
112534
|
-
'countdown_cancel_all':
|
|
112535
|
-
'price_orders':
|
|
112772
|
+
'orders': 0.4,
|
|
112773
|
+
'cancel_batch_orders': 20 / 75,
|
|
112774
|
+
'countdown_cancel_all': 20 / 75,
|
|
112775
|
+
'price_orders': 0.4,
|
|
112536
112776
|
},
|
|
112537
112777
|
'delete': {
|
|
112538
|
-
'orders':
|
|
112539
|
-
'orders/{order_id}':
|
|
112540
|
-
'price_orders':
|
|
112541
|
-
'price_orders/{order_id}':
|
|
112778
|
+
'orders': 20 / 75,
|
|
112779
|
+
'orders/{order_id}': 20 / 75,
|
|
112780
|
+
'price_orders': 20 / 75,
|
|
112781
|
+
'price_orders/{order_id}': 20 / 75,
|
|
112542
112782
|
},
|
|
112543
112783
|
'patch': {
|
|
112544
|
-
'orders/{order_id}':
|
|
112784
|
+
'orders/{order_id}': 0.4,
|
|
112545
112785
|
},
|
|
112546
112786
|
},
|
|
112547
112787
|
'margin': {
|
|
112548
112788
|
'get': {
|
|
112549
|
-
'accounts':
|
|
112550
|
-
'account_book':
|
|
112551
|
-
'funding_accounts':
|
|
112552
|
-
'auto_repay':
|
|
112553
|
-
'transferable':
|
|
112554
|
-
'loans':
|
|
112555
|
-
'loans/{loan_id}':
|
|
112556
|
-
'loans/{loan_id}/repayment':
|
|
112557
|
-
'loan_records':
|
|
112558
|
-
'loan_records/{loan_record_id}':
|
|
112559
|
-
'borrowable':
|
|
112560
|
-
'cross/accounts':
|
|
112561
|
-
'cross/account_book':
|
|
112562
|
-
'cross/loans':
|
|
112563
|
-
'cross/loans/{loan_id}':
|
|
112564
|
-
'cross/repayments':
|
|
112565
|
-
'cross/interest_records':
|
|
112566
|
-
'cross/transferable':
|
|
112567
|
-
'cross/estimate_rate':
|
|
112568
|
-
'cross/borrowable':
|
|
112569
|
-
'uni/estimate_rate':
|
|
112570
|
-
'uni/loans':
|
|
112571
|
-
'uni/loan_records':
|
|
112572
|
-
'uni/interest_records':
|
|
112573
|
-
'uni/borrowable':
|
|
112789
|
+
'accounts': 20 / 15,
|
|
112790
|
+
'account_book': 20 / 15,
|
|
112791
|
+
'funding_accounts': 20 / 15,
|
|
112792
|
+
'auto_repay': 20 / 15,
|
|
112793
|
+
'transferable': 20 / 15,
|
|
112794
|
+
'loans': 20 / 15,
|
|
112795
|
+
'loans/{loan_id}': 20 / 15,
|
|
112796
|
+
'loans/{loan_id}/repayment': 20 / 15,
|
|
112797
|
+
'loan_records': 20 / 15,
|
|
112798
|
+
'loan_records/{loan_record_id}': 20 / 15,
|
|
112799
|
+
'borrowable': 20 / 15,
|
|
112800
|
+
'cross/accounts': 20 / 15,
|
|
112801
|
+
'cross/account_book': 20 / 15,
|
|
112802
|
+
'cross/loans': 20 / 15,
|
|
112803
|
+
'cross/loans/{loan_id}': 20 / 15,
|
|
112804
|
+
'cross/repayments': 20 / 15,
|
|
112805
|
+
'cross/interest_records': 20 / 15,
|
|
112806
|
+
'cross/transferable': 20 / 15,
|
|
112807
|
+
'cross/estimate_rate': 20 / 15,
|
|
112808
|
+
'cross/borrowable': 20 / 15,
|
|
112809
|
+
'uni/estimate_rate': 20 / 15,
|
|
112810
|
+
'uni/loans': 20 / 15,
|
|
112811
|
+
'uni/loan_records': 20 / 15,
|
|
112812
|
+
'uni/interest_records': 20 / 15,
|
|
112813
|
+
'uni/borrowable': 20 / 15,
|
|
112574
112814
|
},
|
|
112575
112815
|
'post': {
|
|
112576
|
-
'auto_repay':
|
|
112577
|
-
'loans':
|
|
112578
|
-
'merged_loans':
|
|
112579
|
-
'loans/{loan_id}/repayment':
|
|
112580
|
-
'cross/loans':
|
|
112581
|
-
'cross/repayments':
|
|
112582
|
-
'uni/loans':
|
|
112816
|
+
'auto_repay': 20 / 15,
|
|
112817
|
+
'loans': 20 / 15,
|
|
112818
|
+
'merged_loans': 20 / 15,
|
|
112819
|
+
'loans/{loan_id}/repayment': 20 / 15,
|
|
112820
|
+
'cross/loans': 20 / 15,
|
|
112821
|
+
'cross/repayments': 20 / 15,
|
|
112822
|
+
'uni/loans': 20 / 15,
|
|
112583
112823
|
},
|
|
112584
112824
|
'patch': {
|
|
112585
|
-
'loans/{loan_id}':
|
|
112586
|
-
'loan_records/{loan_record_id}':
|
|
112825
|
+
'loans/{loan_id}': 20 / 15,
|
|
112826
|
+
'loan_records/{loan_record_id}': 20 / 15,
|
|
112587
112827
|
},
|
|
112588
112828
|
'delete': {
|
|
112589
|
-
'loans/{loan_id}':
|
|
112829
|
+
'loans/{loan_id}': 20 / 15,
|
|
112590
112830
|
},
|
|
112591
112831
|
},
|
|
112592
112832
|
'flash_swap': {
|
|
112593
112833
|
'get': {
|
|
112594
|
-
'currencies': 1
|
|
112595
|
-
'currency_pairs': 1
|
|
112596
|
-
'orders': 1
|
|
112597
|
-
'orders/{order_id}': 1
|
|
112834
|
+
'currencies': 1,
|
|
112835
|
+
'currency_pairs': 1,
|
|
112836
|
+
'orders': 1,
|
|
112837
|
+
'orders/{order_id}': 1,
|
|
112598
112838
|
},
|
|
112599
112839
|
'post': {
|
|
112600
|
-
'orders': 1
|
|
112601
|
-
'orders/preview': 1
|
|
112840
|
+
'orders': 1,
|
|
112841
|
+
'orders/preview': 1,
|
|
112602
112842
|
},
|
|
112603
112843
|
},
|
|
112604
112844
|
'futures': {
|
|
112605
112845
|
'get': {
|
|
112606
|
-
'{settle}/accounts': 1
|
|
112607
|
-
'{settle}/account_book': 1
|
|
112608
|
-
'{settle}/positions': 1
|
|
112609
|
-
'{settle}/positions/{contract}': 1
|
|
112610
|
-
'{settle}/dual_comp/positions/{contract}': 1
|
|
112611
|
-
'{settle}/orders': 1
|
|
112612
|
-
'{settle}/orders_timerange': 1
|
|
112613
|
-
'{settle}/orders/{order_id}': 1
|
|
112614
|
-
'{settle}/my_trades': 1
|
|
112615
|
-
'{settle}/my_trades_timerange': 1
|
|
112616
|
-
'{settle}/position_close': 1
|
|
112617
|
-
'{settle}/liquidates': 1
|
|
112618
|
-
'{settle}/auto_deleverages': 1
|
|
112619
|
-
'{settle}/fee': 1
|
|
112620
|
-
'{settle}/price_orders': 1
|
|
112621
|
-
'{settle}/price_orders/{order_id}': 1
|
|
112846
|
+
'{settle}/accounts': 1,
|
|
112847
|
+
'{settle}/account_book': 1,
|
|
112848
|
+
'{settle}/positions': 1,
|
|
112849
|
+
'{settle}/positions/{contract}': 1,
|
|
112850
|
+
'{settle}/dual_comp/positions/{contract}': 1,
|
|
112851
|
+
'{settle}/orders': 1,
|
|
112852
|
+
'{settle}/orders_timerange': 1,
|
|
112853
|
+
'{settle}/orders/{order_id}': 1,
|
|
112854
|
+
'{settle}/my_trades': 1,
|
|
112855
|
+
'{settle}/my_trades_timerange': 1,
|
|
112856
|
+
'{settle}/position_close': 1,
|
|
112857
|
+
'{settle}/liquidates': 1,
|
|
112858
|
+
'{settle}/auto_deleverages': 1,
|
|
112859
|
+
'{settle}/fee': 1,
|
|
112860
|
+
'{settle}/price_orders': 1,
|
|
112861
|
+
'{settle}/price_orders/{order_id}': 1,
|
|
112622
112862
|
},
|
|
112623
112863
|
'post': {
|
|
112624
|
-
'{settle}/positions/{contract}/margin': 1
|
|
112625
|
-
'{settle}/positions/{contract}/leverage': 1
|
|
112626
|
-
'{settle}/positions/{contract}/risk_limit': 1
|
|
112627
|
-
'{settle}/dual_mode': 1
|
|
112628
|
-
'{settle}/dual_comp/positions/{contract}/margin': 1
|
|
112629
|
-
'{settle}/dual_comp/positions/{contract}/leverage': 1
|
|
112630
|
-
'{settle}/dual_comp/positions/{contract}/risk_limit': 1
|
|
112631
|
-
'{settle}/orders':
|
|
112632
|
-
'{settle}/batch_orders':
|
|
112633
|
-
'{settle}/countdown_cancel_all':
|
|
112634
|
-
'{settle}/price_orders':
|
|
112864
|
+
'{settle}/positions/{contract}/margin': 1,
|
|
112865
|
+
'{settle}/positions/{contract}/leverage': 1,
|
|
112866
|
+
'{settle}/positions/{contract}/risk_limit': 1,
|
|
112867
|
+
'{settle}/dual_mode': 1,
|
|
112868
|
+
'{settle}/dual_comp/positions/{contract}/margin': 1,
|
|
112869
|
+
'{settle}/dual_comp/positions/{contract}/leverage': 1,
|
|
112870
|
+
'{settle}/dual_comp/positions/{contract}/risk_limit': 1,
|
|
112871
|
+
'{settle}/orders': 0.4,
|
|
112872
|
+
'{settle}/batch_orders': 0.4,
|
|
112873
|
+
'{settle}/countdown_cancel_all': 0.4,
|
|
112874
|
+
'{settle}/price_orders': 0.4,
|
|
112635
112875
|
},
|
|
112636
112876
|
'put': {
|
|
112637
|
-
'{settle}/orders/{order_id}': 1
|
|
112877
|
+
'{settle}/orders/{order_id}': 1,
|
|
112638
112878
|
},
|
|
112639
112879
|
'delete': {
|
|
112640
|
-
'{settle}/orders':
|
|
112641
|
-
'{settle}/orders/{order_id}':
|
|
112642
|
-
'{settle}/price_orders':
|
|
112643
|
-
'{settle}/price_orders/{order_id}':
|
|
112880
|
+
'{settle}/orders': 20 / 75,
|
|
112881
|
+
'{settle}/orders/{order_id}': 20 / 75,
|
|
112882
|
+
'{settle}/price_orders': 20 / 75,
|
|
112883
|
+
'{settle}/price_orders/{order_id}': 20 / 75,
|
|
112644
112884
|
},
|
|
112645
112885
|
},
|
|
112646
112886
|
'delivery': {
|
|
112647
112887
|
'get': {
|
|
112648
|
-
'{settle}/accounts':
|
|
112649
|
-
'{settle}/account_book':
|
|
112650
|
-
'{settle}/positions':
|
|
112651
|
-
'{settle}/positions/{contract}':
|
|
112652
|
-
'{settle}/orders':
|
|
112653
|
-
'{settle}/orders/{order_id}':
|
|
112654
|
-
'{settle}/my_trades':
|
|
112655
|
-
'{settle}/position_close':
|
|
112656
|
-
'{settle}/liquidates':
|
|
112657
|
-
'{settle}/settlements':
|
|
112658
|
-
'{settle}/price_orders':
|
|
112659
|
-
'{settle}/price_orders/{order_id}':
|
|
112888
|
+
'{settle}/accounts': 20 / 15,
|
|
112889
|
+
'{settle}/account_book': 20 / 15,
|
|
112890
|
+
'{settle}/positions': 20 / 15,
|
|
112891
|
+
'{settle}/positions/{contract}': 20 / 15,
|
|
112892
|
+
'{settle}/orders': 20 / 15,
|
|
112893
|
+
'{settle}/orders/{order_id}': 20 / 15,
|
|
112894
|
+
'{settle}/my_trades': 20 / 15,
|
|
112895
|
+
'{settle}/position_close': 20 / 15,
|
|
112896
|
+
'{settle}/liquidates': 20 / 15,
|
|
112897
|
+
'{settle}/settlements': 20 / 15,
|
|
112898
|
+
'{settle}/price_orders': 20 / 15,
|
|
112899
|
+
'{settle}/price_orders/{order_id}': 20 / 15,
|
|
112660
112900
|
},
|
|
112661
112901
|
'post': {
|
|
112662
|
-
'{settle}/positions/{contract}/margin':
|
|
112663
|
-
'{settle}/positions/{contract}/leverage':
|
|
112664
|
-
'{settle}/positions/{contract}/risk_limit':
|
|
112665
|
-
'{settle}/orders':
|
|
112666
|
-
'{settle}/price_orders':
|
|
112902
|
+
'{settle}/positions/{contract}/margin': 20 / 15,
|
|
112903
|
+
'{settle}/positions/{contract}/leverage': 20 / 15,
|
|
112904
|
+
'{settle}/positions/{contract}/risk_limit': 20 / 15,
|
|
112905
|
+
'{settle}/orders': 20 / 15,
|
|
112906
|
+
'{settle}/price_orders': 20 / 15,
|
|
112667
112907
|
},
|
|
112668
112908
|
'delete': {
|
|
112669
|
-
'{settle}/orders':
|
|
112670
|
-
'{settle}/orders/{order_id}':
|
|
112671
|
-
'{settle}/price_orders':
|
|
112672
|
-
'{settle}/price_orders/{order_id}':
|
|
112909
|
+
'{settle}/orders': 20 / 15,
|
|
112910
|
+
'{settle}/orders/{order_id}': 20 / 15,
|
|
112911
|
+
'{settle}/price_orders': 20 / 15,
|
|
112912
|
+
'{settle}/price_orders/{order_id}': 20 / 15,
|
|
112673
112913
|
},
|
|
112674
112914
|
},
|
|
112675
112915
|
'options': {
|
|
112676
112916
|
'get': {
|
|
112677
|
-
'my_settlements':
|
|
112678
|
-
'accounts':
|
|
112679
|
-
'account_book':
|
|
112680
|
-
'positions':
|
|
112681
|
-
'positions/{contract}':
|
|
112682
|
-
'position_close':
|
|
112683
|
-
'orders':
|
|
112684
|
-
'orders/{order_id}':
|
|
112685
|
-
'my_trades':
|
|
112917
|
+
'my_settlements': 20 / 15,
|
|
112918
|
+
'accounts': 20 / 15,
|
|
112919
|
+
'account_book': 20 / 15,
|
|
112920
|
+
'positions': 20 / 15,
|
|
112921
|
+
'positions/{contract}': 20 / 15,
|
|
112922
|
+
'position_close': 20 / 15,
|
|
112923
|
+
'orders': 20 / 15,
|
|
112924
|
+
'orders/{order_id}': 20 / 15,
|
|
112925
|
+
'my_trades': 20 / 15,
|
|
112686
112926
|
},
|
|
112687
112927
|
'post': {
|
|
112688
|
-
'orders':
|
|
112928
|
+
'orders': 20 / 15,
|
|
112689
112929
|
},
|
|
112690
112930
|
'delete': {
|
|
112691
|
-
'orders':
|
|
112692
|
-
'orders/{order_id}':
|
|
112931
|
+
'orders': 20 / 15,
|
|
112932
|
+
'orders/{order_id}': 20 / 15,
|
|
112693
112933
|
},
|
|
112694
112934
|
},
|
|
112695
112935
|
'earn': {
|
|
112696
112936
|
'get': {
|
|
112697
|
-
'uni/lends':
|
|
112698
|
-
'uni/lend_records':
|
|
112699
|
-
'uni/interests/{currency}':
|
|
112700
|
-
'uni/interest_records':
|
|
112937
|
+
'uni/lends': 20 / 15,
|
|
112938
|
+
'uni/lend_records': 20 / 15,
|
|
112939
|
+
'uni/interests/{currency}': 20 / 15,
|
|
112940
|
+
'uni/interest_records': 20 / 15,
|
|
112701
112941
|
},
|
|
112702
112942
|
'post': {
|
|
112703
|
-
'uni/lends':
|
|
112943
|
+
'uni/lends': 20 / 15,
|
|
112704
112944
|
},
|
|
112705
112945
|
'patch': {
|
|
112706
|
-
'uni/lends':
|
|
112946
|
+
'uni/lends': 20 / 15,
|
|
112707
112947
|
},
|
|
112708
112948
|
},
|
|
112709
112949
|
'loan': {
|
|
112710
112950
|
'get': {
|
|
112711
|
-
'collateral/orders':
|
|
112712
|
-
'collateral/orders/{order_id}':
|
|
112713
|
-
'collateral/repay_records':
|
|
112714
|
-
'collateral/collaterals':
|
|
112715
|
-
'collateral/total_amount':
|
|
112716
|
-
'collateral/ltv':
|
|
112717
|
-
'collateral/currencies':
|
|
112951
|
+
'collateral/orders': 20 / 15,
|
|
112952
|
+
'collateral/orders/{order_id}': 20 / 15,
|
|
112953
|
+
'collateral/repay_records': 20 / 15,
|
|
112954
|
+
'collateral/collaterals': 20 / 15,
|
|
112955
|
+
'collateral/total_amount': 20 / 15,
|
|
112956
|
+
'collateral/ltv': 20 / 15,
|
|
112957
|
+
'collateral/currencies': 20 / 15,
|
|
112718
112958
|
},
|
|
112719
112959
|
'post': {
|
|
112720
|
-
'collateral/orders':
|
|
112721
|
-
'collateral/repay':
|
|
112722
|
-
'collateral/collaterals':
|
|
112960
|
+
'collateral/orders': 20 / 15,
|
|
112961
|
+
'collateral/repay': 20 / 15,
|
|
112962
|
+
'collateral/collaterals': 20 / 15,
|
|
112723
112963
|
},
|
|
112724
112964
|
},
|
|
112725
112965
|
'account': {
|
|
112726
112966
|
'get': {
|
|
112727
|
-
'detail':
|
|
112728
|
-
'stp_groups':
|
|
112729
|
-
'stp_groups/{stp_id}/users':
|
|
112967
|
+
'detail': 20 / 15,
|
|
112968
|
+
'stp_groups': 20 / 15,
|
|
112969
|
+
'stp_groups/{stp_id}/users': 20 / 15,
|
|
112730
112970
|
},
|
|
112731
112971
|
'post': {
|
|
112732
|
-
'stp_groups':
|
|
112733
|
-
'stp_groups/{stp_id}/users':
|
|
112972
|
+
'stp_groups': 20 / 15,
|
|
112973
|
+
'stp_groups/{stp_id}/users': 20 / 15,
|
|
112734
112974
|
},
|
|
112735
112975
|
'delete': {
|
|
112736
|
-
'stp_groups/{stp_id}/users':
|
|
112976
|
+
'stp_groups/{stp_id}/users': 20 / 15,
|
|
112737
112977
|
},
|
|
112738
112978
|
},
|
|
112739
112979
|
'rebate': {
|
|
112740
112980
|
'get': {
|
|
112741
|
-
'agency/transaction_history':
|
|
112742
|
-
'agency/commission_history':
|
|
112981
|
+
'agency/transaction_history': 20 / 15,
|
|
112982
|
+
'agency/commission_history': 20 / 15,
|
|
112743
112983
|
},
|
|
112744
112984
|
},
|
|
112745
112985
|
},
|
|
@@ -255476,7 +255716,8 @@ class wavesexchange extends _abstract_wavesexchange_js__WEBPACK_IMPORTED_MODULE_
|
|
|
255476
255716
|
toPrecision(amount, scale) {
|
|
255477
255717
|
const amountString = this.numberToString(amount);
|
|
255478
255718
|
const precise = new _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O(amountString);
|
|
255479
|
-
precise.decimals
|
|
255719
|
+
// precise.decimals should be integer
|
|
255720
|
+
precise.decimals = this.parseToInt(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise.stringSub */ .O.stringSub(this.numberToString(precise.decimals), this.numberToString(scale)));
|
|
255480
255721
|
precise.reduce();
|
|
255481
255722
|
return precise;
|
|
255482
255723
|
}
|
|
@@ -271855,6 +272096,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
271855
272096
|
/* harmony export */ "InvalidOrder": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.InvalidOrder),
|
|
271856
272097
|
/* harmony export */ "MarginModeAlreadySet": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.MarginModeAlreadySet),
|
|
271857
272098
|
/* harmony export */ "NetworkError": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.NetworkError),
|
|
272099
|
+
/* harmony export */ "NoChange": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.NoChange),
|
|
271858
272100
|
/* harmony export */ "NotSupported": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.NotSupported),
|
|
271859
272101
|
/* harmony export */ "NullResponse": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.NullResponse),
|
|
271860
272102
|
/* harmony export */ "OnMaintenance": () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_167__.OnMaintenance),
|
|
@@ -272180,7 +272422,7 @@ SOFTWARE.
|
|
|
272180
272422
|
|
|
272181
272423
|
//-----------------------------------------------------------------------------
|
|
272182
272424
|
// this is updated by vss.js when building
|
|
272183
|
-
const version = '4.0.
|
|
272425
|
+
const version = '4.0.103';
|
|
272184
272426
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
|
|
272185
272427
|
//-----------------------------------------------------------------------------
|
|
272186
272428
|
|