ccxt 4.2.29 → 4.2.30
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 +4 -4
- package/dist/ccxt.browser.js +1709 -533
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/ascendex.js +5 -5
- package/dist/cjs/src/base/Exchange.js +21 -21
- package/dist/cjs/src/base/errors.js +3 -3
- package/dist/cjs/src/base/functions/type.js +12 -0
- package/dist/cjs/src/bigone.js +2 -2
- package/dist/cjs/src/binance.js +896 -217
- package/dist/cjs/src/bingx.js +1 -1
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +52 -62
- package/dist/cjs/src/bitget.js +8 -4
- package/dist/cjs/src/bitmart.js +3 -3
- package/dist/cjs/src/bitmex.js +4 -4
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitteam.js +2 -2
- package/dist/cjs/src/btcalpha.js +1 -1
- package/dist/cjs/src/bybit.js +3 -3
- package/dist/cjs/src/coinbase.js +12 -5
- package/dist/cjs/src/coincheck.js +1 -1
- package/dist/cjs/src/coinex.js +2 -2
- package/dist/cjs/src/coinlist.js +1 -1
- package/dist/cjs/src/coinmate.js +1 -1
- package/dist/cjs/src/coinmetro.js +2 -2
- package/dist/cjs/src/coinsph.js +1 -1
- package/dist/cjs/src/cryptocom.js +3 -3
- package/dist/cjs/src/digifinex.js +6 -4
- package/dist/cjs/src/exmo.js +2 -2
- package/dist/cjs/src/gate.js +5 -5
- package/dist/cjs/src/gemini.js +3 -3
- package/dist/cjs/src/hitbtc.js +14 -20
- package/dist/cjs/src/hollaex.js +2 -2
- package/dist/cjs/src/htx.js +5 -5
- package/dist/cjs/src/huobijp.js +1 -1
- package/dist/cjs/src/krakenfutures.js +1 -1
- package/dist/cjs/src/kucoin.js +17 -17
- package/dist/cjs/src/kucoinfutures.js +3 -3
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/mexc.js +7 -7
- package/dist/cjs/src/novadax.js +1 -1
- package/dist/cjs/src/okcoin.js +2 -2
- package/dist/cjs/src/okx.js +7 -6
- package/dist/cjs/src/p2b.js +1 -0
- package/dist/cjs/src/phemex.js +3 -3
- package/dist/cjs/src/poloniexfutures.js +3 -3
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/binance.js +4 -4
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +49 -6
- package/dist/cjs/src/pro/bitvavo.js +1 -1
- package/dist/cjs/src/pro/bybit.js +2 -2
- package/dist/cjs/src/pro/cex.js +2 -2
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/okx.js +1 -1
- package/dist/cjs/src/pro/onetrading.js +2 -2
- package/dist/cjs/src/pro/p2b.js +432 -0
- package/dist/cjs/src/pro/probit.js +5 -5
- package/dist/cjs/src/pro/whitebit.js +1 -1
- package/dist/cjs/src/probit.js +1 -1
- package/dist/cjs/src/timex.js +1 -1
- package/dist/cjs/src/tokocrypto.js +3 -3
- package/dist/cjs/src/wavesexchange.js +2 -2
- package/dist/cjs/src/whitebit.js +2 -2
- package/dist/cjs/src/woo.js +3 -3
- package/dist/cjs/src/yobit.js +1 -1
- package/dist/cjs/src/zaif.js +1 -1
- package/dist/cjs/src/zonda.js +3 -3
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/bybit.d.ts +2 -2
- package/js/src/ascendex.js +5 -5
- package/js/src/base/Exchange.d.ts +1 -1
- package/js/src/base/Exchange.js +21 -21
- package/js/src/base/errorHierarchy.d.ts +7 -6
- package/js/src/base/errorHierarchy.js +7 -6
- package/js/src/base/errors.d.ts +3 -3
- package/js/src/base/errors.js +3 -3
- package/js/src/base/functions/type.js +12 -0
- package/js/src/bigone.js +2 -2
- package/js/src/binance.d.ts +1 -0
- package/js/src/binance.js +897 -218
- package/js/src/bingx.js +1 -1
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.js +52 -62
- package/js/src/bitget.js +8 -4
- package/js/src/bitmart.js +3 -3
- package/js/src/bitmex.js +4 -4
- package/js/src/bitrue.js +1 -1
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitso.js +1 -1
- package/js/src/bitteam.js +2 -2
- package/js/src/btcalpha.js +1 -1
- package/js/src/bybit.js +3 -3
- package/js/src/coinbase.js +12 -5
- package/js/src/coincheck.js +1 -1
- package/js/src/coinex.js +2 -2
- package/js/src/coinlist.js +1 -1
- package/js/src/coinmate.js +1 -1
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +2 -2
- package/js/src/coinsph.js +1 -1
- package/js/src/cryptocom.js +3 -3
- package/js/src/digifinex.js +6 -4
- package/js/src/exmo.js +2 -2
- package/js/src/gate.js +5 -5
- package/js/src/gemini.d.ts +1 -1
- package/js/src/gemini.js +3 -3
- package/js/src/hitbtc.js +14 -20
- package/js/src/hollaex.js +2 -2
- package/js/src/htx.js +5 -5
- package/js/src/huobijp.js +1 -1
- package/js/src/krakenfutures.js +1 -1
- package/js/src/kucoin.js +17 -17
- package/js/src/kucoinfutures.js +3 -3
- package/js/src/lbank.js +1 -1
- package/js/src/mexc.js +7 -7
- package/js/src/novadax.js +1 -1
- package/js/src/okcoin.js +2 -2
- package/js/src/okx.js +7 -6
- package/js/src/p2b.js +1 -0
- package/js/src/phemex.js +3 -3
- package/js/src/poloniexfutures.js +3 -3
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/binance.js +4 -4
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bitmart.js +1 -1
- package/js/src/pro/bitmex.d.ts +2 -1
- package/js/src/pro/bitmex.js +49 -6
- package/js/src/pro/bitvavo.js +1 -1
- package/js/src/pro/bybit.js +2 -2
- package/js/src/pro/cex.js +2 -2
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/okx.js +1 -1
- package/js/src/pro/onetrading.js +2 -2
- package/js/src/pro/p2b.d.ts +23 -0
- package/js/src/pro/p2b.js +433 -0
- package/js/src/pro/probit.js +5 -5
- package/js/src/pro/whitebit.js +1 -1
- package/js/src/probit.js +1 -1
- package/js/src/timex.js +1 -1
- package/js/src/tokocrypto.js +3 -3
- package/js/src/wavesexchange.js +2 -2
- package/js/src/whitebit.js +2 -2
- package/js/src/woo.js +3 -3
- package/js/src/yobit.js +1 -1
- package/js/src/zaif.js +1 -1
- package/js/src/zonda.d.ts +1 -1
- package/js/src/zonda.js +3 -3
- package/package.json +1 -1
- package/skip-tests.json +3 -10
package/dist/cjs/ccxt.js
CHANGED
|
@@ -164,6 +164,7 @@ var ndax$1 = require('./src/pro/ndax.js');
|
|
|
164
164
|
var okcoin$1 = require('./src/pro/okcoin.js');
|
|
165
165
|
var okx$1 = require('./src/pro/okx.js');
|
|
166
166
|
var onetrading$1 = require('./src/pro/onetrading.js');
|
|
167
|
+
var p2b$1 = require('./src/pro/p2b.js');
|
|
167
168
|
var phemex$1 = require('./src/pro/phemex.js');
|
|
168
169
|
var poloniex$1 = require('./src/pro/poloniex.js');
|
|
169
170
|
var poloniexfutures$1 = require('./src/pro/poloniexfutures.js');
|
|
@@ -175,7 +176,7 @@ var woo$1 = require('./src/pro/woo.js');
|
|
|
175
176
|
|
|
176
177
|
//-----------------------------------------------------------------------------
|
|
177
178
|
// this is updated by vss.js when building
|
|
178
|
-
const version = '4.2.
|
|
179
|
+
const version = '4.2.30';
|
|
179
180
|
Exchange["default"].ccxtVersion = version;
|
|
180
181
|
const exchanges = {
|
|
181
182
|
'ace': ace,
|
|
@@ -332,6 +333,7 @@ const pro = {
|
|
|
332
333
|
'okcoin': okcoin$1,
|
|
333
334
|
'okx': okx$1,
|
|
334
335
|
'onetrading': onetrading$1,
|
|
336
|
+
'p2b': p2b$1,
|
|
335
337
|
'phemex': phemex$1,
|
|
336
338
|
'poloniex': poloniex$1,
|
|
337
339
|
'poloniexfutures': poloniexfutures$1,
|
package/dist/cjs/src/ascendex.js
CHANGED
|
@@ -619,7 +619,7 @@ class ascendex extends ascendex$1 {
|
|
|
619
619
|
symbol = base + '/' + quote + ':' + settle;
|
|
620
620
|
}
|
|
621
621
|
const fee = this.safeNumber(market, 'commissionReserveRate');
|
|
622
|
-
const marginTradable = this.
|
|
622
|
+
const marginTradable = this.safeBool(market, 'marginTradable', false);
|
|
623
623
|
result.push({
|
|
624
624
|
'id': id,
|
|
625
625
|
'symbol': symbol,
|
|
@@ -814,7 +814,7 @@ class ascendex extends ascendex$1 {
|
|
|
814
814
|
let marginMode = undefined;
|
|
815
815
|
[marketType, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
|
|
816
816
|
[marginMode, params] = this.handleMarginModeAndParams('fetchBalance', params);
|
|
817
|
-
const isMargin = this.
|
|
817
|
+
const isMargin = this.safeBool(params, 'margin', false);
|
|
818
818
|
const isCross = marginMode === 'cross';
|
|
819
819
|
marketType = (isMargin || isCross) ? 'margin' : marketType;
|
|
820
820
|
params = this.omit(params, 'margin');
|
|
@@ -1174,7 +1174,7 @@ class ascendex extends ascendex$1 {
|
|
|
1174
1174
|
const timestamp = this.safeInteger(trade, 'ts');
|
|
1175
1175
|
const priceString = this.safeString2(trade, 'price', 'p');
|
|
1176
1176
|
const amountString = this.safeString(trade, 'q');
|
|
1177
|
-
const buyerIsMaker = this.
|
|
1177
|
+
const buyerIsMaker = this.safeBool(trade, 'bm', false);
|
|
1178
1178
|
const side = buyerIsMaker ? 'sell' : 'buy';
|
|
1179
1179
|
market = this.safeMarket(undefined, market);
|
|
1180
1180
|
return this.safeTrade({
|
|
@@ -1518,7 +1518,7 @@ class ascendex extends ascendex$1 {
|
|
|
1518
1518
|
const isLimitOrder = ((type === 'limit') || (type === 'stop_limit'));
|
|
1519
1519
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
1520
1520
|
const postOnly = this.isPostOnly(isMarketOrder, false, params);
|
|
1521
|
-
const reduceOnly = this.
|
|
1521
|
+
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
1522
1522
|
const stopPrice = this.safeValue2(params, 'triggerPrice', 'stopPrice');
|
|
1523
1523
|
if (isLimitOrder) {
|
|
1524
1524
|
request['orderPrice'] = this.priceToPrecision(symbol, price);
|
|
@@ -3161,7 +3161,7 @@ class ascendex extends ascendex$1 {
|
|
|
3161
3161
|
// { "code": "0" }
|
|
3162
3162
|
//
|
|
3163
3163
|
const transferOptions = this.safeValue(this.options, 'transfer', {});
|
|
3164
|
-
const fillResponseFromRequest = this.
|
|
3164
|
+
const fillResponseFromRequest = this.safeBool(transferOptions, 'fillResponseFromRequest', true);
|
|
3165
3165
|
const transfer = this.parseTransfer(response, currency);
|
|
3166
3166
|
if (fillResponseFromRequest) {
|
|
3167
3167
|
transfer['fromAccount'] = fromAccount;
|
|
@@ -1984,7 +1984,7 @@ class Exchange {
|
|
|
1984
1984
|
fee['cost'] = this.safeNumber(fee, 'cost');
|
|
1985
1985
|
}
|
|
1986
1986
|
const timestamp = this.safeInteger(entry, 'timestamp');
|
|
1987
|
-
const info = this.
|
|
1987
|
+
const info = this.safeDict(entry, 'info', {});
|
|
1988
1988
|
return {
|
|
1989
1989
|
'id': this.safeString(entry, 'id'),
|
|
1990
1990
|
'timestamp': timestamp,
|
|
@@ -2156,7 +2156,7 @@ class Exchange {
|
|
|
2156
2156
|
for (let i = 0; i < values.length; i++) {
|
|
2157
2157
|
const market = values[i];
|
|
2158
2158
|
const defaultCurrencyPrecision = (this.precisionMode === DECIMAL_PLACES) ? 8 : this.parseNumber('1e-8');
|
|
2159
|
-
const marketPrecision = this.
|
|
2159
|
+
const marketPrecision = this.safeDict(market, 'precision', {});
|
|
2160
2160
|
if ('base' in market) {
|
|
2161
2161
|
const currency = this.safeCurrencyStructure({
|
|
2162
2162
|
'id': this.safeString2(market, 'baseId', 'base'),
|
|
@@ -2186,7 +2186,7 @@ class Exchange {
|
|
|
2186
2186
|
const resultingCurrencies = [];
|
|
2187
2187
|
for (let i = 0; i < codes.length; i++) {
|
|
2188
2188
|
const code = codes[i];
|
|
2189
|
-
const groupedCurrenciesCode = this.
|
|
2189
|
+
const groupedCurrenciesCode = this.safeList(groupedCurrencies, code, []);
|
|
2190
2190
|
let highestPrecisionCurrency = this.safeValue(groupedCurrenciesCode, 0);
|
|
2191
2191
|
for (let j = 1; j < groupedCurrenciesCode.length; j++) {
|
|
2192
2192
|
const currentCurrency = groupedCurrenciesCode[j];
|
|
@@ -2269,7 +2269,7 @@ class Exchange {
|
|
|
2269
2269
|
const parseSymbol = symbol === undefined;
|
|
2270
2270
|
const parseSide = side === undefined;
|
|
2271
2271
|
const shouldParseFees = parseFee || parseFees;
|
|
2272
|
-
const fees = this.
|
|
2272
|
+
const fees = this.safeList(order, 'fees', []);
|
|
2273
2273
|
let trades = [];
|
|
2274
2274
|
if (parseFilled || parseCost || shouldParseFees) {
|
|
2275
2275
|
const rawTrades = this.safeValue(order, 'trades', trades);
|
|
@@ -2403,7 +2403,7 @@ class Exchange {
|
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
2405
|
// ensure that the average field is calculated correctly
|
|
2406
|
-
const inverse = this.
|
|
2406
|
+
const inverse = this.safeBool(market, 'inverse', false);
|
|
2407
2407
|
const contractSize = this.numberToString(this.safeValue(market, 'contractSize', 1));
|
|
2408
2408
|
// inverse
|
|
2409
2409
|
// price = filled * contract size / cost
|
|
@@ -2457,12 +2457,12 @@ class Exchange {
|
|
|
2457
2457
|
entry['amount'] = this.safeNumber(entry, 'amount');
|
|
2458
2458
|
entry['price'] = this.safeNumber(entry, 'price');
|
|
2459
2459
|
entry['cost'] = this.safeNumber(entry, 'cost');
|
|
2460
|
-
const tradeFee = this.
|
|
2460
|
+
const tradeFee = this.safeDict(entry, 'fee', {});
|
|
2461
2461
|
tradeFee['cost'] = this.safeNumber(tradeFee, 'cost');
|
|
2462
2462
|
if ('rate' in tradeFee) {
|
|
2463
2463
|
tradeFee['rate'] = this.safeNumber(tradeFee, 'rate');
|
|
2464
2464
|
}
|
|
2465
|
-
const entryFees = this.
|
|
2465
|
+
const entryFees = this.safeList(entry, 'fees', []);
|
|
2466
2466
|
for (let j = 0; j < entryFees.length; j++) {
|
|
2467
2467
|
entryFees[j]['cost'] = this.safeNumber(entryFees[j], 'cost');
|
|
2468
2468
|
}
|
|
@@ -2637,7 +2637,7 @@ class Exchange {
|
|
|
2637
2637
|
const contractSize = this.safeString(market, 'contractSize');
|
|
2638
2638
|
let multiplyPrice = price;
|
|
2639
2639
|
if (contractSize !== undefined) {
|
|
2640
|
-
const inverse = this.
|
|
2640
|
+
const inverse = this.safeBool(market, 'inverse', false);
|
|
2641
2641
|
if (inverse) {
|
|
2642
2642
|
multiplyPrice = Precise["default"].stringDiv('1', price);
|
|
2643
2643
|
}
|
|
@@ -2880,12 +2880,12 @@ class Exchange {
|
|
|
2880
2880
|
}
|
|
2881
2881
|
convertTradingViewToOHLCV(ohlcvs, timestamp = 't', open = 'o', high = 'h', low = 'l', close = 'c', volume = 'v', ms = false) {
|
|
2882
2882
|
const result = [];
|
|
2883
|
-
const timestamps = this.
|
|
2884
|
-
const opens = this.
|
|
2885
|
-
const highs = this.
|
|
2886
|
-
const lows = this.
|
|
2887
|
-
const closes = this.
|
|
2888
|
-
const volumes = this.
|
|
2883
|
+
const timestamps = this.safeList(ohlcvs, timestamp, []);
|
|
2884
|
+
const opens = this.safeList(ohlcvs, open, []);
|
|
2885
|
+
const highs = this.safeList(ohlcvs, high, []);
|
|
2886
|
+
const lows = this.safeList(ohlcvs, low, []);
|
|
2887
|
+
const closes = this.safeList(ohlcvs, close, []);
|
|
2888
|
+
const volumes = this.safeList(ohlcvs, volume, []);
|
|
2889
2889
|
for (let i = 0; i < timestamps.length; i++) {
|
|
2890
2890
|
result.push([
|
|
2891
2891
|
ms ? this.safeInteger(timestamps, i) : this.safeTimestamp(timestamps, i),
|
|
@@ -2920,10 +2920,10 @@ class Exchange {
|
|
|
2920
2920
|
async fetchWebEndpoint(method, endpointMethod, returnAsJson, startRegex = undefined, endRegex = undefined) {
|
|
2921
2921
|
let errorMessage = '';
|
|
2922
2922
|
const options = this.safeValue(this.options, method, {});
|
|
2923
|
-
const muteOnFailure = this.
|
|
2923
|
+
const muteOnFailure = this.safeBool(options, 'webApiMuteFailure', true);
|
|
2924
2924
|
try {
|
|
2925
2925
|
// if it was not explicitly disabled, then don't fetch
|
|
2926
|
-
if (this.
|
|
2926
|
+
if (this.safeBool(options, 'webApiEnable', true) !== true) {
|
|
2927
2927
|
return undefined;
|
|
2928
2928
|
}
|
|
2929
2929
|
const maxRetries = this.safeValue(options, 'webApiRetries', 10);
|
|
@@ -3134,7 +3134,7 @@ class Exchange {
|
|
|
3134
3134
|
if (currencyCode !== undefined) {
|
|
3135
3135
|
const defaultNetworkCodeReplacements = this.safeValue(this.options, 'defaultNetworkCodeReplacements', {});
|
|
3136
3136
|
if (currencyCode in defaultNetworkCodeReplacements) {
|
|
3137
|
-
const replacementObject = this.
|
|
3137
|
+
const replacementObject = this.safeDict(defaultNetworkCodeReplacements, currencyCode, {});
|
|
3138
3138
|
networkCode = this.safeString(replacementObject, networkCode, networkCode);
|
|
3139
3139
|
}
|
|
3140
3140
|
}
|
|
@@ -3236,7 +3236,7 @@ class Exchange {
|
|
|
3236
3236
|
const id = this.safeString(item, marketIdKey);
|
|
3237
3237
|
const market = this.safeMarket(id, undefined, undefined, 'swap');
|
|
3238
3238
|
const symbol = market['symbol'];
|
|
3239
|
-
const contract = this.
|
|
3239
|
+
const contract = this.safeBool(market, 'contract', false);
|
|
3240
3240
|
if (contract && ((symbols === undefined) || this.inArray(symbol, symbols))) {
|
|
3241
3241
|
tiers[symbol] = this.parseMarketLeverageTiers(item, market);
|
|
3242
3242
|
}
|
|
@@ -4407,8 +4407,8 @@ class Exchange {
|
|
|
4407
4407
|
const currency = this.currencies[code];
|
|
4408
4408
|
let precision = this.safeValue(currency, 'precision');
|
|
4409
4409
|
if (networkCode !== undefined) {
|
|
4410
|
-
const networks = this.
|
|
4411
|
-
const networkItem = this.
|
|
4410
|
+
const networks = this.safeDict(currency, 'networks', {});
|
|
4411
|
+
const networkItem = this.safeDict(networks, networkCode, {});
|
|
4412
4412
|
precision = this.safeValue(networkItem, 'precision', precision);
|
|
4413
4413
|
}
|
|
4414
4414
|
if (precision === undefined) {
|
|
@@ -4710,7 +4710,7 @@ class Exchange {
|
|
|
4710
4710
|
* @returns {Array}
|
|
4711
4711
|
*/
|
|
4712
4712
|
const timeInForce = this.safeStringUpper(params, 'timeInForce');
|
|
4713
|
-
let postOnly = this.
|
|
4713
|
+
let postOnly = this.safeBool(params, 'postOnly', false);
|
|
4714
4714
|
const ioc = timeInForce === 'IOC';
|
|
4715
4715
|
const fok = timeInForce === 'FOK';
|
|
4716
4716
|
const po = timeInForce === 'PO';
|
|
@@ -88,7 +88,7 @@ class BadRequest extends ExchangeError {
|
|
|
88
88
|
this.name = 'BadRequest';
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
class OperationRejected extends
|
|
91
|
+
class OperationRejected extends ExchangeError {
|
|
92
92
|
constructor(message) {
|
|
93
93
|
super(message);
|
|
94
94
|
this.name = 'OperationRejected';
|
|
@@ -100,7 +100,7 @@ class BadSymbol extends BadRequest {
|
|
|
100
100
|
this.name = 'BadSymbol';
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
class NoChange extends
|
|
103
|
+
class NoChange extends OperationRejected {
|
|
104
104
|
constructor(message) {
|
|
105
105
|
super(message);
|
|
106
106
|
this.name = 'NoChange';
|
|
@@ -221,7 +221,7 @@ class DDoSProtection extends NetworkError {
|
|
|
221
221
|
this.name = 'DDoSProtection';
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
class RateLimitExceeded extends
|
|
224
|
+
class RateLimitExceeded extends NetworkError {
|
|
225
225
|
constructor(message) {
|
|
226
226
|
super(message);
|
|
227
227
|
this.name = 'RateLimitExceeded';
|
|
@@ -96,6 +96,9 @@ const safeFloatN = (o, k, $default) => {
|
|
|
96
96
|
return isNumber(n) ? n : $default;
|
|
97
97
|
};
|
|
98
98
|
const safeIntegerN = (o, k, $default) => {
|
|
99
|
+
if (o === undefined) {
|
|
100
|
+
return $default;
|
|
101
|
+
}
|
|
99
102
|
const n = asInteger(getValueFromKeysInArray(o, k));
|
|
100
103
|
return isNumber(n) ? n : $default;
|
|
101
104
|
};
|
|
@@ -108,14 +111,23 @@ const safeTimestampN = (o, k, $default) => {
|
|
|
108
111
|
return isNumber(n) ? parseInt(n * 1000) : $default;
|
|
109
112
|
};
|
|
110
113
|
const safeValueN = (o, k, $default) => {
|
|
114
|
+
if (o === undefined) {
|
|
115
|
+
return $default;
|
|
116
|
+
}
|
|
111
117
|
const x = getValueFromKeysInArray(o, k);
|
|
112
118
|
return hasProps(x) ? x : $default;
|
|
113
119
|
};
|
|
114
120
|
const safeStringN = (o, k, $default) => {
|
|
121
|
+
if (o === undefined) {
|
|
122
|
+
return $default;
|
|
123
|
+
}
|
|
115
124
|
const x = getValueFromKeysInArray(o, k);
|
|
116
125
|
return isStringCoercible(x) ? String(x) : $default;
|
|
117
126
|
};
|
|
118
127
|
const safeStringLowerN = (o, k, $default) => {
|
|
128
|
+
if (o === undefined) {
|
|
129
|
+
return $default;
|
|
130
|
+
}
|
|
119
131
|
const x = getValueFromKeysInArray(o, k);
|
|
120
132
|
return isStringCoercible(x) ? String(x).toLowerCase() : $default;
|
|
121
133
|
};
|
package/dist/cjs/src/bigone.js
CHANGED
|
@@ -1469,7 +1469,7 @@ class bigone extends bigone$1 {
|
|
|
1469
1469
|
const requestSide = isBuy ? 'BID' : 'ASK';
|
|
1470
1470
|
let uppercaseType = type.toUpperCase();
|
|
1471
1471
|
const isLimit = uppercaseType === 'LIMIT';
|
|
1472
|
-
const exchangeSpecificParam = this.
|
|
1472
|
+
const exchangeSpecificParam = this.safeBool(params, 'post_only', false);
|
|
1473
1473
|
let postOnly = undefined;
|
|
1474
1474
|
[postOnly, params] = this.handlePostOnly((uppercaseType === 'MARKET'), exchangeSpecificParam, params);
|
|
1475
1475
|
const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPrice', 'stop_price']);
|
|
@@ -2101,7 +2101,7 @@ class bigone extends bigone$1 {
|
|
|
2101
2101
|
//
|
|
2102
2102
|
const transfer = this.parseTransfer(response, currency);
|
|
2103
2103
|
const transferOptions = this.safeValue(this.options, 'transfer', {});
|
|
2104
|
-
const fillResponseFromRequest = this.
|
|
2104
|
+
const fillResponseFromRequest = this.safeBool(transferOptions, 'fillResponseFromRequest', true);
|
|
2105
2105
|
if (fillResponseFromRequest) {
|
|
2106
2106
|
transfer['fromAccount'] = fromAccount;
|
|
2107
2107
|
transfer['toAccount'] = toAccount;
|