ccxt 4.1.51 → 4.1.52
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 +110 -113
- package/dist/ccxt.browser.js +1361 -2933
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +1 -7
- package/dist/cjs/src/alpaca.js +62 -64
- package/dist/cjs/src/ascendex.js +3 -1
- package/dist/cjs/src/base/Exchange.js +10 -0
- package/dist/cjs/src/bigone.js +60 -77
- package/dist/cjs/src/binance.js +1 -0
- package/dist/cjs/src/bingx.js +4 -11
- package/dist/cjs/src/bitbank.js +58 -59
- package/dist/cjs/src/bitbns.js +1 -0
- package/dist/cjs/src/bitfinex.js +1 -0
- package/dist/cjs/src/bitfinex2.js +1 -0
- package/dist/cjs/src/bitflyer.js +1 -0
- package/dist/cjs/src/bitget.js +3 -8
- package/dist/cjs/src/bithumb.js +1 -0
- package/dist/cjs/src/bitmart.js +10 -1
- package/dist/cjs/src/bitmex.js +114 -119
- package/dist/cjs/src/bitopro.js +63 -65
- package/dist/cjs/src/bitpanda.js +60 -60
- package/dist/cjs/src/bitrue.js +67 -71
- package/dist/cjs/src/bitso.js +1 -0
- package/dist/cjs/src/bitstamp.js +1 -0
- package/dist/cjs/src/bittrex.js +57 -57
- package/dist/cjs/src/bitvavo.js +10 -2
- package/dist/cjs/src/blockchaincom.js +2 -2
- package/dist/cjs/src/btcalpha.js +59 -60
- package/dist/cjs/src/btcmarkets.js +68 -69
- package/dist/cjs/src/btcturk.js +72 -74
- package/dist/cjs/src/bybit.js +3 -1
- package/dist/cjs/src/coinbase.js +7 -2
- package/dist/cjs/src/coinbasepro.js +1 -0
- package/dist/cjs/src/coincheck.js +1 -0
- package/dist/cjs/src/coinex.js +4 -0
- package/dist/cjs/src/coinlist.js +60 -60
- package/dist/cjs/src/coinmate.js +1 -0
- package/dist/cjs/src/coinsph.js +2 -4
- package/dist/cjs/src/cryptocom.js +1 -0
- package/dist/cjs/src/currencycom.js +2 -2
- package/dist/cjs/src/deribit.js +2 -0
- package/dist/cjs/src/digifinex.js +5 -2
- package/dist/cjs/src/exmo.js +1 -0
- package/dist/cjs/src/gate.js +2 -0
- package/dist/cjs/src/gemini.js +2 -0
- package/dist/cjs/src/hitbtc.js +4 -0
- package/dist/cjs/src/hollaex.js +2 -0
- package/dist/cjs/src/htx.js +4 -0
- package/dist/cjs/src/huobijp.js +2 -0
- package/dist/cjs/src/idex.js +2 -0
- package/dist/cjs/src/indodax.js +1 -0
- package/dist/cjs/src/kraken.js +3 -3
- package/dist/cjs/src/kucoin.js +6 -5
- package/dist/cjs/src/kuna.js +3 -1
- package/dist/cjs/src/latoken.js +1 -0
- package/dist/cjs/src/lbank.js +1 -0
- package/dist/cjs/src/lykke.js +2 -0
- package/dist/cjs/src/mercado.js +1 -0
- package/dist/cjs/src/mexc.js +2 -0
- package/dist/cjs/src/ndax.js +2 -0
- package/dist/cjs/src/novadax.js +1 -0
- package/dist/cjs/src/okcoin.js +2 -0
- package/dist/cjs/src/okx.js +2 -0
- package/dist/cjs/src/phemex.js +2 -0
- package/dist/cjs/src/poloniex.js +1 -0
- package/dist/cjs/src/pro/binance.js +5 -3
- package/dist/cjs/src/pro/coinbase.js +12 -3
- package/dist/cjs/src/pro/cryptocom.js +17 -17
- package/dist/cjs/src/pro/krakenfutures.js +15 -15
- package/dist/cjs/src/probit.js +4 -2
- package/dist/cjs/src/tidex.js +1 -0
- package/dist/cjs/src/timex.js +2 -0
- package/dist/cjs/src/upbit.js +2 -0
- package/dist/cjs/src/wavesexchange.js +2 -1
- package/dist/cjs/src/whitebit.js +1 -0
- package/dist/cjs/src/woo.js +1 -0
- package/dist/cjs/src/zaif.js +1 -0
- package/dist/cjs/src/zonda.js +1 -0
- package/js/ccxt.d.ts +2 -8
- package/js/ccxt.js +2 -6
- package/js/src/alpaca.d.ts +3 -2
- package/js/src/alpaca.js +62 -64
- package/js/src/ascendex.js +3 -1
- package/js/src/base/Exchange.d.ts +2 -0
- package/js/src/base/Exchange.js +10 -0
- package/js/src/base/types.d.ts +6 -3
- package/js/src/bigone.d.ts +3 -3
- package/js/src/bigone.js +60 -77
- package/js/src/binance.js +1 -0
- package/js/src/bingx.d.ts +2 -2
- package/js/src/bingx.js +4 -11
- package/js/src/bitbank.d.ts +3 -2
- package/js/src/bitbank.js +58 -59
- package/js/src/bitbns.js +1 -0
- package/js/src/bitfinex.js +1 -0
- package/js/src/bitfinex2.js +1 -0
- package/js/src/bitflyer.js +1 -0
- package/js/src/bitget.d.ts +1 -2
- package/js/src/bitget.js +3 -8
- package/js/src/bithumb.js +1 -0
- package/js/src/bitmart.js +10 -1
- package/js/src/bitmex.d.ts +3 -2
- package/js/src/bitmex.js +114 -119
- package/js/src/bitopro.d.ts +3 -2
- package/js/src/bitopro.js +63 -65
- package/js/src/bitpanda.d.ts +3 -2
- package/js/src/bitpanda.js +60 -60
- package/js/src/bitrue.d.ts +3 -2
- package/js/src/bitrue.js +67 -71
- package/js/src/bitso.js +1 -0
- package/js/src/bitstamp.js +1 -0
- package/js/src/bittrex.d.ts +3 -2
- package/js/src/bittrex.js +57 -57
- package/js/src/bitvavo.js +10 -2
- package/js/src/blockchaincom.js +2 -2
- package/js/src/btcalpha.d.ts +3 -2
- package/js/src/btcalpha.js +59 -60
- package/js/src/btcmarkets.d.ts +3 -2
- package/js/src/btcmarkets.js +68 -69
- package/js/src/btcturk.d.ts +3 -2
- package/js/src/btcturk.js +72 -74
- package/js/src/bybit.js +3 -1
- package/js/src/coinbase.js +7 -2
- package/js/src/coinbasepro.js +1 -0
- package/js/src/coincheck.js +1 -0
- package/js/src/coinex.js +4 -0
- package/js/src/coinlist.d.ts +3 -2
- package/js/src/coinlist.js +60 -60
- package/js/src/coinmate.js +1 -0
- package/js/src/coinsph.js +2 -4
- package/js/src/cryptocom.js +1 -0
- package/js/src/currencycom.js +2 -2
- package/js/src/deribit.js +2 -0
- package/js/src/digifinex.js +5 -2
- package/js/src/exmo.js +1 -0
- package/js/src/gate.js +2 -0
- package/js/src/gemini.js +2 -0
- package/js/src/hitbtc.js +4 -0
- package/js/src/hollaex.js +2 -0
- package/js/src/htx.js +4 -0
- package/js/src/huobijp.js +2 -0
- package/js/src/idex.js +2 -0
- package/js/src/indodax.js +1 -0
- package/js/src/kraken.js +3 -3
- package/js/src/kucoin.js +6 -5
- package/js/src/kuna.js +3 -1
- package/js/src/latoken.js +1 -0
- package/js/src/lbank.js +1 -0
- package/js/src/lykke.js +2 -0
- package/js/src/mercado.js +1 -0
- package/js/src/mexc.js +2 -0
- package/js/src/ndax.js +2 -0
- package/js/src/novadax.js +1 -0
- package/js/src/okcoin.js +2 -0
- package/js/src/okx.js +2 -0
- package/js/src/phemex.js +2 -0
- package/js/src/poloniex.js +1 -0
- package/js/src/pro/binance.js +5 -3
- package/js/src/pro/coinbase.js +12 -3
- package/js/src/pro/cryptocom.js +17 -17
- package/js/src/pro/krakenfutures.js +15 -15
- package/js/src/probit.js +4 -2
- package/js/src/tidex.js +1 -0
- package/js/src/timex.js +2 -0
- package/js/src/upbit.js +2 -0
- package/js/src/wavesexchange.js +2 -1
- package/js/src/whitebit.js +1 -0
- package/js/src/woo.js +1 -0
- package/js/src/zaif.js +1 -0
- package/js/src/zonda.js +1 -0
- package/package.json +1 -1
- package/skip-tests.json +2 -3
- package/dist/cjs/src/btctradeua.js +0 -571
- package/dist/cjs/src/coinfalcon.js +0 -1012
- package/js/src/abstract/btctradeua.d.ts +0 -20
- package/js/src/abstract/btctradeua.js +0 -11
- package/js/src/abstract/coinfalcon.d.ts +0 -26
- package/js/src/abstract/coinfalcon.js +0 -11
- package/js/src/btctradeua.d.ts +0 -30
- package/js/src/btctradeua.js +0 -572
- package/js/src/coinfalcon.d.ts +0 -53
- package/js/src/coinfalcon.js +0 -1013
package/js/src/bitvavo.js
CHANGED
|
@@ -23,7 +23,7 @@ export default class bitvavo extends Exchange {
|
|
|
23
23
|
'countries': ['NL'],
|
|
24
24
|
'rateLimit': 60,
|
|
25
25
|
'version': 'v2',
|
|
26
|
-
'certified':
|
|
26
|
+
'certified': false,
|
|
27
27
|
'pro': true,
|
|
28
28
|
'has': {
|
|
29
29
|
'CORS': undefined,
|
|
@@ -315,7 +315,10 @@ export default class bitvavo extends Exchange {
|
|
|
315
315
|
* @returns {object[]} an array of objects representing market data
|
|
316
316
|
*/
|
|
317
317
|
const response = await this.publicGetMarkets(params);
|
|
318
|
-
|
|
318
|
+
let currencies = this.currencies;
|
|
319
|
+
if (this.currencies === undefined) {
|
|
320
|
+
currencies = await this.fetchCurrencies();
|
|
321
|
+
}
|
|
319
322
|
const currenciesById = this.indexBy(currencies, 'id');
|
|
320
323
|
//
|
|
321
324
|
// [
|
|
@@ -332,6 +335,7 @@ export default class bitvavo extends Exchange {
|
|
|
332
335
|
// ]
|
|
333
336
|
//
|
|
334
337
|
const result = [];
|
|
338
|
+
const fees = this.fees;
|
|
335
339
|
for (let i = 0; i < response.length; i++) {
|
|
336
340
|
const market = response[i];
|
|
337
341
|
const id = this.safeString(market, 'market');
|
|
@@ -366,6 +370,8 @@ export default class bitvavo extends Exchange {
|
|
|
366
370
|
'expiryDatetime': undefined,
|
|
367
371
|
'strike': undefined,
|
|
368
372
|
'optionType': undefined,
|
|
373
|
+
'taker': fees['trading']['taker'],
|
|
374
|
+
'maker': fees['trading']['maker'],
|
|
369
375
|
'precision': {
|
|
370
376
|
'amount': this.safeInteger(baseCurrency, 'decimals', basePrecision),
|
|
371
377
|
'price': this.safeInteger(market, 'pricePrecision'),
|
|
@@ -1772,6 +1778,8 @@ export default class bitvavo extends Exchange {
|
|
|
1772
1778
|
'updated': undefined,
|
|
1773
1779
|
'fee': fee,
|
|
1774
1780
|
'network': undefined,
|
|
1781
|
+
'comment': undefined,
|
|
1782
|
+
'internal': undefined,
|
|
1775
1783
|
};
|
|
1776
1784
|
}
|
|
1777
1785
|
parseDepositWithdrawFee(fee, currency = undefined) {
|
package/js/src/blockchaincom.js
CHANGED
|
@@ -886,7 +886,7 @@ export default class blockchaincom extends Exchange {
|
|
|
886
886
|
}
|
|
887
887
|
const address = this.safeString(transaction, 'address');
|
|
888
888
|
const txid = this.safeString(transaction, 'txhash');
|
|
889
|
-
|
|
889
|
+
return {
|
|
890
890
|
'info': transaction,
|
|
891
891
|
'id': id,
|
|
892
892
|
'txid': txid,
|
|
@@ -905,9 +905,9 @@ export default class blockchaincom extends Exchange {
|
|
|
905
905
|
'status': this.parseTransactionState(state),
|
|
906
906
|
'updated': undefined,
|
|
907
907
|
'comment': undefined,
|
|
908
|
+
'internal': undefined,
|
|
908
909
|
'fee': fee,
|
|
909
910
|
};
|
|
910
|
-
return result;
|
|
911
911
|
}
|
|
912
912
|
async fetchWithdrawalWhitelist(params = {}) {
|
|
913
913
|
/**
|
package/js/src/btcalpha.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import Exchange from './abstract/btcalpha.js';
|
|
2
|
-
import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
2
|
+
import { Balances, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class btcalpha
|
|
5
5
|
* @extends Exchange
|
|
6
6
|
*/
|
|
7
7
|
export default class btcalpha extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
|
-
fetchMarkets(params?: {}): Promise<
|
|
9
|
+
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
10
|
+
parseMarket(market: any): Market;
|
|
10
11
|
fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
|
|
11
12
|
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
12
13
|
parseTicker(ticker: any, market?: any): Ticker;
|
package/js/src/btcalpha.js
CHANGED
|
@@ -172,68 +172,66 @@ export default class btcalpha extends Exchange {
|
|
|
172
172
|
// },
|
|
173
173
|
// ]
|
|
174
174
|
//
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
175
|
+
return this.parseMarkets(response);
|
|
176
|
+
}
|
|
177
|
+
parseMarket(market) {
|
|
178
|
+
const id = this.safeString(market, 'name');
|
|
179
|
+
const baseId = this.safeString(market, 'currency1');
|
|
180
|
+
const quoteId = this.safeString(market, 'currency2');
|
|
181
|
+
const base = this.safeCurrencyCode(baseId);
|
|
182
|
+
const quote = this.safeCurrencyCode(quoteId);
|
|
183
|
+
const pricePrecision = this.safeString(market, 'price_precision');
|
|
184
|
+
const priceLimit = this.parsePrecision(pricePrecision);
|
|
185
|
+
const amountLimit = this.safeString(market, 'minimum_order_size');
|
|
186
|
+
return {
|
|
187
|
+
'id': id,
|
|
188
|
+
'symbol': base + '/' + quote,
|
|
189
|
+
'base': base,
|
|
190
|
+
'quote': quote,
|
|
191
|
+
'settle': undefined,
|
|
192
|
+
'baseId': baseId,
|
|
193
|
+
'quoteId': quoteId,
|
|
194
|
+
'settleId': undefined,
|
|
195
|
+
'type': 'spot',
|
|
196
|
+
'spot': true,
|
|
197
|
+
'margin': false,
|
|
198
|
+
'swap': false,
|
|
199
|
+
'future': false,
|
|
200
|
+
'option': false,
|
|
201
|
+
'active': true,
|
|
202
|
+
'contract': false,
|
|
203
|
+
'linear': undefined,
|
|
204
|
+
'inverse': undefined,
|
|
205
|
+
'contractSize': undefined,
|
|
206
|
+
'expiry': undefined,
|
|
207
|
+
'expiryDatetime': undefined,
|
|
208
|
+
'strike': undefined,
|
|
209
|
+
'optionType': undefined,
|
|
210
|
+
'precision': {
|
|
211
|
+
'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amount_precision'))),
|
|
212
|
+
'price': this.parseNumber(this.parsePrecision((pricePrecision))),
|
|
213
|
+
},
|
|
214
|
+
'limits': {
|
|
215
|
+
'leverage': {
|
|
216
|
+
'min': undefined,
|
|
217
|
+
'max': undefined,
|
|
213
218
|
},
|
|
214
|
-
'
|
|
215
|
-
'
|
|
216
|
-
|
|
217
|
-
'max': undefined,
|
|
218
|
-
},
|
|
219
|
-
'amount': {
|
|
220
|
-
'min': this.parseNumber(amountLimit),
|
|
221
|
-
'max': this.safeNumber(market, 'maximum_order_size'),
|
|
222
|
-
},
|
|
223
|
-
'price': {
|
|
224
|
-
'min': this.parseNumber(priceLimit),
|
|
225
|
-
'max': undefined,
|
|
226
|
-
},
|
|
227
|
-
'cost': {
|
|
228
|
-
'min': this.parseNumber(Precise.stringMul(priceLimit, amountLimit)),
|
|
229
|
-
'max': undefined,
|
|
230
|
-
},
|
|
219
|
+
'amount': {
|
|
220
|
+
'min': this.parseNumber(amountLimit),
|
|
221
|
+
'max': this.safeNumber(market, 'maximum_order_size'),
|
|
231
222
|
},
|
|
232
|
-
'
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
223
|
+
'price': {
|
|
224
|
+
'min': this.parseNumber(priceLimit),
|
|
225
|
+
'max': undefined,
|
|
226
|
+
},
|
|
227
|
+
'cost': {
|
|
228
|
+
'min': this.parseNumber(Precise.stringMul(priceLimit, amountLimit)),
|
|
229
|
+
'max': undefined,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
'created': undefined,
|
|
233
|
+
'info': market,
|
|
234
|
+
};
|
|
237
235
|
}
|
|
238
236
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
239
237
|
/**
|
|
@@ -545,6 +543,7 @@ export default class btcalpha extends Exchange {
|
|
|
545
543
|
'type': undefined,
|
|
546
544
|
'status': this.parseTransactionStatus(statusId),
|
|
547
545
|
'comment': undefined,
|
|
546
|
+
'internal': undefined,
|
|
548
547
|
'fee': undefined,
|
|
549
548
|
'updated': undefined,
|
|
550
549
|
};
|
package/js/src/btcmarkets.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/btcmarkets.js';
|
|
2
|
-
import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
|
|
2
|
+
import { Balances, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class btcmarkets
|
|
5
5
|
* @extends Exchange
|
|
@@ -13,7 +13,8 @@ export default class btcmarkets extends Exchange {
|
|
|
13
13
|
parseTransactionStatus(status: any): string;
|
|
14
14
|
parseTransactionType(type: any): string;
|
|
15
15
|
parseTransaction(transaction: any, currency?: any): Transaction;
|
|
16
|
-
fetchMarkets(params?: {}): Promise<
|
|
16
|
+
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
17
|
+
parseMarket(market: any): Market;
|
|
17
18
|
fetchTime(params?: {}): Promise<number>;
|
|
18
19
|
parseBalance(response: any): Balances;
|
|
19
20
|
fetchBalance(params?: {}): Promise<Balances>;
|
package/js/src/btcmarkets.js
CHANGED
|
@@ -338,7 +338,8 @@ export default class btcmarkets extends Exchange {
|
|
|
338
338
|
'currency': code,
|
|
339
339
|
'status': status,
|
|
340
340
|
'updated': lastUpdate,
|
|
341
|
-
'comment':
|
|
341
|
+
'comment': this.safeString(transaction, 'description'),
|
|
342
|
+
'internal': undefined,
|
|
342
343
|
'fee': {
|
|
343
344
|
'currency': code,
|
|
344
345
|
'cost': this.parseNumber(fee),
|
|
@@ -369,76 +370,74 @@ export default class btcmarkets extends Exchange {
|
|
|
369
370
|
// }
|
|
370
371
|
// ]
|
|
371
372
|
//
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
373
|
+
return this.parseMarkets(response);
|
|
374
|
+
}
|
|
375
|
+
parseMarket(market) {
|
|
376
|
+
const baseId = this.safeString(market, 'baseAssetName');
|
|
377
|
+
const quoteId = this.safeString(market, 'quoteAssetName');
|
|
378
|
+
const id = this.safeString(market, 'marketId');
|
|
379
|
+
const base = this.safeCurrencyCode(baseId);
|
|
380
|
+
const quote = this.safeCurrencyCode(quoteId);
|
|
381
|
+
const symbol = base + '/' + quote;
|
|
382
|
+
const fees = this.safeValue(this.safeValue(this.options, 'fees', {}), quote, this.fees);
|
|
383
|
+
const pricePrecision = this.parseNumber(this.parsePrecision(this.safeString(market, 'priceDecimals')));
|
|
384
|
+
const minAmount = this.safeNumber(market, 'minOrderAmount');
|
|
385
|
+
const maxAmount = this.safeNumber(market, 'maxOrderAmount');
|
|
386
|
+
let minPrice = undefined;
|
|
387
|
+
if (quote === 'AUD') {
|
|
388
|
+
minPrice = pricePrecision;
|
|
389
|
+
}
|
|
390
|
+
return {
|
|
391
|
+
'id': id,
|
|
392
|
+
'symbol': symbol,
|
|
393
|
+
'base': base,
|
|
394
|
+
'quote': quote,
|
|
395
|
+
'settle': undefined,
|
|
396
|
+
'baseId': baseId,
|
|
397
|
+
'quoteId': quoteId,
|
|
398
|
+
'settleId': undefined,
|
|
399
|
+
'type': 'spot',
|
|
400
|
+
'spot': true,
|
|
401
|
+
'margin': false,
|
|
402
|
+
'swap': false,
|
|
403
|
+
'future': false,
|
|
404
|
+
'option': false,
|
|
405
|
+
'active': undefined,
|
|
406
|
+
'contract': false,
|
|
407
|
+
'linear': undefined,
|
|
408
|
+
'inverse': undefined,
|
|
409
|
+
'taker': fees['taker'],
|
|
410
|
+
'maker': fees['maker'],
|
|
411
|
+
'contractSize': undefined,
|
|
412
|
+
'expiry': undefined,
|
|
413
|
+
'expiryDatetime': undefined,
|
|
414
|
+
'strike': undefined,
|
|
415
|
+
'optionType': undefined,
|
|
416
|
+
'precision': {
|
|
417
|
+
'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amountDecimals'))),
|
|
418
|
+
'price': pricePrecision,
|
|
419
|
+
},
|
|
420
|
+
'limits': {
|
|
421
|
+
'leverage': {
|
|
422
|
+
'min': undefined,
|
|
423
|
+
'max': undefined,
|
|
418
424
|
},
|
|
419
|
-
'
|
|
420
|
-
'
|
|
421
|
-
|
|
422
|
-
'max': undefined,
|
|
423
|
-
},
|
|
424
|
-
'amount': {
|
|
425
|
-
'min': minAmount,
|
|
426
|
-
'max': maxAmount,
|
|
427
|
-
},
|
|
428
|
-
'price': {
|
|
429
|
-
'min': minPrice,
|
|
430
|
-
'max': undefined,
|
|
431
|
-
},
|
|
432
|
-
'cost': {
|
|
433
|
-
'min': undefined,
|
|
434
|
-
'max': undefined,
|
|
435
|
-
},
|
|
425
|
+
'amount': {
|
|
426
|
+
'min': minAmount,
|
|
427
|
+
'max': maxAmount,
|
|
436
428
|
},
|
|
437
|
-
'
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
429
|
+
'price': {
|
|
430
|
+
'min': minPrice,
|
|
431
|
+
'max': undefined,
|
|
432
|
+
},
|
|
433
|
+
'cost': {
|
|
434
|
+
'min': undefined,
|
|
435
|
+
'max': undefined,
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
'created': undefined,
|
|
439
|
+
'info': market,
|
|
440
|
+
};
|
|
442
441
|
}
|
|
443
442
|
async fetchTime(params = {}) {
|
|
444
443
|
/**
|
package/js/src/btcturk.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import Exchange from './abstract/btcturk.js';
|
|
2
|
-
import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade } from './base/types.js';
|
|
2
|
+
import { Balances, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class btcturk
|
|
5
5
|
* @extends Exchange
|
|
6
6
|
*/
|
|
7
7
|
export default class btcturk extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
|
-
fetchMarkets(params?: {}): Promise<
|
|
9
|
+
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
10
|
+
parseMarket(entry: any): Market;
|
|
10
11
|
parseBalance(response: any): Balances;
|
|
11
12
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
12
13
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
package/js/src/btcturk.js
CHANGED
|
@@ -193,83 +193,81 @@ export default class btcturk extends Exchange {
|
|
|
193
193
|
//
|
|
194
194
|
const data = this.safeValue(response, 'data');
|
|
195
195
|
const markets = this.safeValue(data, 'symbols', []);
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
196
|
+
return this.parseMarkets(markets);
|
|
197
|
+
}
|
|
198
|
+
parseMarket(entry) {
|
|
199
|
+
const id = this.safeString(entry, 'name');
|
|
200
|
+
const baseId = this.safeString(entry, 'numerator');
|
|
201
|
+
const quoteId = this.safeString(entry, 'denominator');
|
|
202
|
+
const base = this.safeCurrencyCode(baseId);
|
|
203
|
+
const quote = this.safeCurrencyCode(quoteId);
|
|
204
|
+
const filters = this.safeValue(entry, 'filters', []);
|
|
205
|
+
let minPrice = undefined;
|
|
206
|
+
let maxPrice = undefined;
|
|
207
|
+
let minAmount = undefined;
|
|
208
|
+
let maxAmount = undefined;
|
|
209
|
+
let minCost = undefined;
|
|
210
|
+
for (let j = 0; j < filters.length; j++) {
|
|
211
|
+
const filter = filters[j];
|
|
212
|
+
const filterType = this.safeString(filter, 'filterType');
|
|
213
|
+
if (filterType === 'PRICE_FILTER') {
|
|
214
|
+
minPrice = this.safeNumber(filter, 'minPrice');
|
|
215
|
+
maxPrice = this.safeNumber(filter, 'maxPrice');
|
|
216
|
+
minAmount = this.safeNumber(filter, 'minAmount');
|
|
217
|
+
maxAmount = this.safeNumber(filter, 'maxAmount');
|
|
218
|
+
minCost = this.safeNumber(filter, 'minExchangeValue');
|
|
220
219
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
220
|
+
}
|
|
221
|
+
const status = this.safeString(entry, 'status');
|
|
222
|
+
return {
|
|
223
|
+
'id': id,
|
|
224
|
+
'symbol': base + '/' + quote,
|
|
225
|
+
'base': base,
|
|
226
|
+
'quote': quote,
|
|
227
|
+
'settle': undefined,
|
|
228
|
+
'baseId': baseId,
|
|
229
|
+
'quoteId': quoteId,
|
|
230
|
+
'settleId': undefined,
|
|
231
|
+
'type': 'spot',
|
|
232
|
+
'spot': true,
|
|
233
|
+
'margin': false,
|
|
234
|
+
'swap': false,
|
|
235
|
+
'future': false,
|
|
236
|
+
'option': false,
|
|
237
|
+
'active': (status === 'TRADING'),
|
|
238
|
+
'contract': false,
|
|
239
|
+
'linear': undefined,
|
|
240
|
+
'inverse': undefined,
|
|
241
|
+
'contractSize': undefined,
|
|
242
|
+
'expiry': undefined,
|
|
243
|
+
'expiryDatetime': undefined,
|
|
244
|
+
'strike': undefined,
|
|
245
|
+
'optionType': undefined,
|
|
246
|
+
'precision': {
|
|
247
|
+
'amount': this.parseNumber(this.parsePrecision(this.safeString(entry, 'numeratorScale'))),
|
|
248
|
+
'price': this.parseNumber(this.parsePrecision(this.safeString(entry, 'denominatorScale'))),
|
|
249
|
+
},
|
|
250
|
+
'limits': {
|
|
251
|
+
'leverage': {
|
|
252
|
+
'min': undefined,
|
|
253
|
+
'max': undefined,
|
|
249
254
|
},
|
|
250
|
-
'
|
|
251
|
-
'
|
|
252
|
-
|
|
253
|
-
'max': undefined,
|
|
254
|
-
},
|
|
255
|
-
'amount': {
|
|
256
|
-
'min': minAmount,
|
|
257
|
-
'max': maxAmount,
|
|
258
|
-
},
|
|
259
|
-
'price': {
|
|
260
|
-
'min': minPrice,
|
|
261
|
-
'max': maxPrice,
|
|
262
|
-
},
|
|
263
|
-
'cost': {
|
|
264
|
-
'min': minCost,
|
|
265
|
-
'max': undefined,
|
|
266
|
-
},
|
|
255
|
+
'amount': {
|
|
256
|
+
'min': minAmount,
|
|
257
|
+
'max': maxAmount,
|
|
267
258
|
},
|
|
268
|
-
'
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
259
|
+
'price': {
|
|
260
|
+
'min': minPrice,
|
|
261
|
+
'max': maxPrice,
|
|
262
|
+
},
|
|
263
|
+
'cost': {
|
|
264
|
+
'min': minCost,
|
|
265
|
+
'max': undefined,
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
'created': undefined,
|
|
269
|
+
'info': entry,
|
|
270
|
+
};
|
|
273
271
|
}
|
|
274
272
|
parseBalance(response) {
|
|
275
273
|
const data = this.safeValue(response, 'data', []);
|
package/js/src/bybit.js
CHANGED
|
@@ -3595,7 +3595,7 @@ export default class bybit extends Exchange {
|
|
|
3595
3595
|
request['triggerPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
3596
3596
|
request['reduceOnly'] = true;
|
|
3597
3597
|
}
|
|
3598
|
-
|
|
3598
|
+
if (isStopLoss || isTakeProfit) {
|
|
3599
3599
|
if (isStopLoss) {
|
|
3600
3600
|
const slTriggerPrice = this.safeValue2(stopLoss, 'triggerPrice', 'stopPrice', stopLoss);
|
|
3601
3601
|
request['stopLoss'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
@@ -5193,6 +5193,8 @@ export default class bybit extends Exchange {
|
|
|
5193
5193
|
'status': status,
|
|
5194
5194
|
'updated': updated,
|
|
5195
5195
|
'fee': fee,
|
|
5196
|
+
'internal': undefined,
|
|
5197
|
+
'comment': undefined,
|
|
5196
5198
|
};
|
|
5197
5199
|
}
|
|
5198
5200
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
package/js/src/coinbase.js
CHANGED
|
@@ -861,8 +861,13 @@ export default class coinbase extends Exchange {
|
|
|
861
861
|
}
|
|
862
862
|
const sizeInQuote = this.safeValue(trade, 'size_in_quote');
|
|
863
863
|
const v3Price = this.safeString(trade, 'price');
|
|
864
|
-
|
|
865
|
-
|
|
864
|
+
let v3Cost = undefined;
|
|
865
|
+
let v3Amount = this.safeString(trade, 'size');
|
|
866
|
+
if (sizeInQuote) {
|
|
867
|
+
// calculate base size
|
|
868
|
+
v3Cost = v3Amount;
|
|
869
|
+
v3Amount = Precise.stringDiv(v3Amount, v3Price);
|
|
870
|
+
}
|
|
866
871
|
const v3FeeCost = this.safeString(trade, 'commission');
|
|
867
872
|
const amountString = this.safeString(amountObject, 'amount', v3Amount);
|
|
868
873
|
const costString = this.safeString(subtotalObject, 'amount', v3Cost);
|
package/js/src/coinbasepro.js
CHANGED
package/js/src/coincheck.js
CHANGED
package/js/src/coinex.js
CHANGED
|
@@ -4019,6 +4019,8 @@ export default class coinex extends Exchange {
|
|
|
4019
4019
|
const networkId = this.safeString(transaction, 'smart_contract_name');
|
|
4020
4020
|
const amount = this.safeNumber(transaction, 'actual_amount');
|
|
4021
4021
|
let feeCost = this.safeString(transaction, 'tx_fee');
|
|
4022
|
+
const transferMethod = this.safeString(transaction, 'transfer_method');
|
|
4023
|
+
const internal = transferMethod === 'local';
|
|
4022
4024
|
let addressTo = undefined;
|
|
4023
4025
|
let addressFrom = undefined;
|
|
4024
4026
|
if (type === 'deposit') {
|
|
@@ -4051,6 +4053,8 @@ export default class coinex extends Exchange {
|
|
|
4051
4053
|
'status': status,
|
|
4052
4054
|
'updated': undefined,
|
|
4053
4055
|
'fee': fee,
|
|
4056
|
+
'comment': undefined,
|
|
4057
|
+
'internal': internal,
|
|
4054
4058
|
};
|
|
4055
4059
|
}
|
|
4056
4060
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|