ccxt 4.1.84 → 4.1.86
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 +5 -4
- package/dist/ccxt.browser.js +1939 -806
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -1
- package/dist/cjs/src/alpaca.js +2 -2
- package/dist/cjs/src/ascendex.js +2 -2
- package/dist/cjs/src/base/Exchange.js +53 -20
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +2 -2
- package/dist/cjs/src/bingx.js +11 -9
- package/dist/cjs/src/bit2c.js +1 -1
- package/dist/cjs/src/bitbank.js +1 -1
- package/dist/cjs/src/bitbns.js +1 -1
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +1 -1
- package/dist/cjs/src/bitflyer.js +1 -1
- package/dist/cjs/src/bitforex.js +1 -1
- package/dist/cjs/src/bitget.js +2 -3
- package/dist/cjs/src/bithumb.js +3 -3
- package/dist/cjs/src/bitmart.js +91 -74
- package/dist/cjs/src/bitmex.js +2 -2
- package/dist/cjs/src/bitopro.js +3 -3
- package/dist/cjs/src/bitpanda.js +1 -1
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitstamp.js +1 -1
- package/dist/cjs/src/bittrex.js +1 -1
- package/dist/cjs/src/bitvavo.js +1 -1
- package/dist/cjs/src/bl3p.js +1 -1
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/btcalpha.js +1 -1
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/btcmarkets.js +1 -1
- package/dist/cjs/src/btcturk.js +1 -1
- package/dist/cjs/src/bybit.js +3 -5
- package/dist/cjs/src/cex.js +1 -1
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinbasepro.js +1 -1
- package/dist/cjs/src/coincheck.js +1 -1
- package/dist/cjs/src/coinex.js +3 -2
- package/dist/cjs/src/coinlist.js +1 -1
- package/dist/cjs/src/coinmate.js +1 -1
- package/dist/cjs/src/coinone.js +1 -1
- package/dist/cjs/src/coinsph.js +1 -1
- package/dist/cjs/src/coinspot.js +1 -1
- package/dist/cjs/src/cryptocom.js +3 -3
- package/dist/cjs/src/currencycom.js +1 -1
- package/dist/cjs/src/delta.js +1 -1
- package/dist/cjs/src/deribit.js +1 -1
- package/dist/cjs/src/digifinex.js +160 -112
- package/dist/cjs/src/exmo.js +1 -1
- package/dist/cjs/src/gate.js +1 -1
- package/dist/cjs/src/gemini.js +1 -1
- package/dist/cjs/src/hitbtc.js +2 -2
- package/dist/cjs/src/hitbtc3.js +1 -1
- package/dist/cjs/src/hollaex.js +1 -1
- package/dist/cjs/src/htx.js +2 -2
- package/dist/cjs/src/huobijp.js +1 -1
- package/dist/cjs/src/idex.js +1 -1
- package/dist/cjs/src/independentreserve.js +1 -1
- package/dist/cjs/src/indodax.js +1 -1
- package/dist/cjs/src/kraken.js +2 -2
- package/dist/cjs/src/krakenfutures.js +3 -3
- package/dist/cjs/src/kucoin.js +2 -6
- package/dist/cjs/src/kucoinfutures.js +0 -3
- package/dist/cjs/src/kuna.js +1 -1
- package/dist/cjs/src/latoken.js +2 -2
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/luno.js +1 -1
- package/dist/cjs/src/lykke.js +1 -1
- package/dist/cjs/src/mercado.js +1 -1
- package/dist/cjs/src/mexc.js +102 -53
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/novadax.js +1 -1
- package/dist/cjs/src/oceanex.js +1 -1
- package/dist/cjs/src/okcoin.js +1 -1
- package/dist/cjs/src/okx.js +4 -4
- package/dist/cjs/src/p2b.js +1 -3
- package/dist/cjs/src/paymium.js +1 -1
- package/dist/cjs/src/phemex.js +1 -1
- package/dist/cjs/src/poloniex.js +51 -51
- package/dist/cjs/src/poloniexfutures.js +1 -1
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +1026 -250
- package/dist/cjs/src/pro/bitmex.js +206 -0
- package/dist/cjs/src/pro/krakenfutures.js +6 -6
- package/dist/cjs/src/pro/mexc.js +1 -1
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/poloniexfutures.js +3 -3
- package/dist/cjs/src/probit.js +27 -19
- package/dist/cjs/src/static_dependencies/jsencrypt/JSEncrypt.js +1 -1
- package/dist/cjs/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +3 -3
- package/dist/cjs/src/timex.js +1 -1
- package/dist/cjs/src/tokocrypto.js +8 -4
- package/dist/cjs/src/upbit.js +1 -1
- package/dist/cjs/src/wavesexchange.js +1 -1
- package/dist/cjs/src/wazirx.js +1 -1
- package/dist/cjs/src/whitebit.js +1 -1
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/yobit.js +1 -1
- package/dist/cjs/src/zaif.js +1 -1
- package/dist/cjs/src/zonda.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +1 -1
- package/js/src/ace.js +1 -1
- package/js/src/alpaca.d.ts +1 -1
- package/js/src/alpaca.js +2 -2
- package/js/src/ascendex.d.ts +1 -1
- package/js/src/ascendex.js +2 -2
- package/js/src/base/Exchange.d.ts +5 -0
- package/js/src/base/Exchange.js +53 -20
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +1 -1
- package/js/src/bigone.js +1 -1
- package/js/src/binance.d.ts +1 -1
- package/js/src/binance.js +2 -2
- package/js/src/bingx.js +11 -9
- package/js/src/bit2c.d.ts +1 -1
- package/js/src/bit2c.js +1 -1
- package/js/src/bitbank.d.ts +1 -1
- package/js/src/bitbank.js +1 -1
- package/js/src/bitbns.d.ts +1 -1
- package/js/src/bitbns.js +1 -1
- package/js/src/bitfinex.d.ts +1 -1
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.d.ts +1 -1
- package/js/src/bitfinex2.js +1 -1
- package/js/src/bitflyer.d.ts +1 -1
- package/js/src/bitflyer.js +1 -1
- package/js/src/bitforex.d.ts +1 -1
- package/js/src/bitforex.js +1 -1
- package/js/src/bitget.d.ts +1 -1
- package/js/src/bitget.js +2 -3
- package/js/src/bithumb.d.ts +1 -1
- package/js/src/bithumb.js +3 -3
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +91 -74
- package/js/src/bitmex.d.ts +1 -1
- package/js/src/bitmex.js +2 -2
- package/js/src/bitopro.d.ts +1 -1
- package/js/src/bitopro.js +3 -3
- package/js/src/bitpanda.d.ts +1 -1
- package/js/src/bitpanda.js +1 -1
- package/js/src/bitrue.d.ts +1 -1
- 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/bitstamp.d.ts +1 -1
- package/js/src/bitstamp.js +1 -1
- package/js/src/bittrex.d.ts +1 -1
- package/js/src/bittrex.js +1 -1
- package/js/src/bitvavo.d.ts +1 -1
- package/js/src/bitvavo.js +1 -1
- package/js/src/bl3p.d.ts +1 -1
- package/js/src/bl3p.js +1 -1
- package/js/src/blockchaincom.d.ts +1 -1
- package/js/src/blockchaincom.js +1 -1
- package/js/src/btcalpha.d.ts +1 -1
- package/js/src/btcalpha.js +1 -1
- package/js/src/btcbox.d.ts +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/btcmarkets.d.ts +1 -1
- package/js/src/btcmarkets.js +1 -1
- package/js/src/btcturk.d.ts +1 -1
- package/js/src/btcturk.js +1 -1
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +3 -5
- package/js/src/cex.d.ts +1 -1
- package/js/src/cex.js +1 -1
- package/js/src/coinbase.d.ts +1 -1
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbasepro.d.ts +1 -1
- package/js/src/coinbasepro.js +1 -1
- package/js/src/coincheck.d.ts +1 -1
- package/js/src/coincheck.js +1 -1
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +3 -2
- package/js/src/coinlist.d.ts +1 -1
- package/js/src/coinlist.js +1 -1
- package/js/src/coinmate.d.ts +1 -1
- package/js/src/coinmate.js +1 -1
- package/js/src/coinone.d.ts +1 -1
- package/js/src/coinone.js +1 -1
- package/js/src/coinsph.d.ts +1 -1
- package/js/src/coinsph.js +1 -1
- package/js/src/coinspot.d.ts +1 -1
- package/js/src/coinspot.js +1 -1
- package/js/src/cryptocom.d.ts +1 -1
- package/js/src/cryptocom.js +3 -3
- package/js/src/currencycom.d.ts +1 -1
- package/js/src/currencycom.js +1 -1
- package/js/src/delta.d.ts +1 -1
- package/js/src/delta.js +1 -1
- package/js/src/deribit.d.ts +1 -1
- package/js/src/deribit.js +1 -1
- package/js/src/digifinex.d.ts +1 -1
- package/js/src/digifinex.js +160 -112
- package/js/src/exmo.d.ts +1 -1
- package/js/src/exmo.js +1 -1
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +1 -1
- package/js/src/gemini.d.ts +1 -1
- package/js/src/gemini.js +1 -1
- package/js/src/hitbtc.d.ts +1 -1
- package/js/src/hitbtc.js +2 -2
- package/js/src/hitbtc3.d.ts +1 -1
- package/js/src/hitbtc3.js +1 -1
- package/js/src/hollaex.d.ts +1 -1
- package/js/src/hollaex.js +1 -1
- package/js/src/htx.d.ts +1 -1
- package/js/src/htx.js +2 -2
- package/js/src/huobijp.d.ts +1 -1
- package/js/src/huobijp.js +1 -1
- package/js/src/idex.d.ts +1 -1
- package/js/src/idex.js +1 -1
- package/js/src/independentreserve.d.ts +1 -1
- package/js/src/independentreserve.js +1 -1
- package/js/src/indodax.d.ts +1 -1
- package/js/src/indodax.js +1 -1
- package/js/src/kraken.d.ts +1 -1
- package/js/src/kraken.js +2 -2
- package/js/src/krakenfutures.d.ts +1 -1
- package/js/src/krakenfutures.js +3 -3
- package/js/src/kucoin.d.ts +1 -1
- package/js/src/kucoin.js +2 -6
- package/js/src/kucoinfutures.d.ts +0 -1
- package/js/src/kucoinfutures.js +0 -3
- package/js/src/kuna.d.ts +1 -1
- package/js/src/kuna.js +1 -1
- package/js/src/latoken.d.ts +1 -1
- package/js/src/latoken.js +2 -2
- package/js/src/lbank.d.ts +1 -1
- package/js/src/lbank.js +1 -1
- package/js/src/luno.d.ts +1 -1
- package/js/src/luno.js +1 -1
- package/js/src/lykke.d.ts +1 -1
- package/js/src/lykke.js +1 -1
- package/js/src/mercado.d.ts +1 -1
- package/js/src/mercado.js +1 -1
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +102 -53
- package/js/src/ndax.d.ts +1 -1
- package/js/src/ndax.js +1 -1
- package/js/src/novadax.d.ts +1 -1
- package/js/src/novadax.js +1 -1
- package/js/src/oceanex.d.ts +1 -1
- package/js/src/oceanex.js +1 -1
- package/js/src/okcoin.d.ts +1 -1
- package/js/src/okcoin.js +1 -1
- package/js/src/okx.d.ts +1 -1
- package/js/src/okx.js +4 -4
- package/js/src/p2b.d.ts +1 -1
- package/js/src/p2b.js +1 -3
- package/js/src/paymium.d.ts +1 -1
- package/js/src/paymium.js +1 -1
- package/js/src/phemex.d.ts +1 -1
- package/js/src/phemex.js +1 -1
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +51 -51
- package/js/src/poloniexfutures.d.ts +1 -1
- package/js/src/poloniexfutures.js +1 -1
- package/js/src/pro/bitget.d.ts +1 -1
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bitmart.d.ts +17 -6
- package/js/src/pro/bitmart.js +1028 -252
- package/js/src/pro/bitmex.d.ts +3 -1
- package/js/src/pro/bitmex.js +207 -1
- package/js/src/pro/krakenfutures.js +6 -6
- package/js/src/pro/mexc.js +1 -1
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/poloniexfutures.js +3 -3
- package/js/src/probit.d.ts +1 -1
- package/js/src/probit.js +27 -19
- package/js/src/static_dependencies/jsencrypt/JSEncrypt.d.ts +1 -1
- package/js/src/static_dependencies/jsencrypt/JSEncrypt.js +1 -1
- package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.d.ts +3 -3
- package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +3 -3
- package/js/src/timex.d.ts +1 -1
- package/js/src/timex.js +1 -1
- package/js/src/tokocrypto.d.ts +1 -1
- package/js/src/tokocrypto.js +8 -4
- package/js/src/upbit.d.ts +1 -1
- package/js/src/upbit.js +1 -1
- package/js/src/wavesexchange.d.ts +1 -1
- package/js/src/wavesexchange.js +1 -1
- package/js/src/wazirx.d.ts +1 -1
- package/js/src/wazirx.js +1 -1
- package/js/src/whitebit.d.ts +1 -1
- package/js/src/whitebit.js +1 -1
- package/js/src/woo.d.ts +1 -1
- package/js/src/woo.js +1 -1
- package/js/src/yobit.d.ts +1 -1
- package/js/src/yobit.js +1 -1
- package/js/src/zaif.d.ts +1 -1
- package/js/src/zaif.js +1 -1
- package/js/src/zonda.d.ts +1 -1
- package/js/src/zonda.js +1 -1
- package/package.json +4 -3
- package/skip-tests.json +4 -0
package/js/src/pro/bitmex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import bitmexRest from '../bitmex.js';
|
|
2
|
-
import { Int, Str } from '../base/types.js';
|
|
2
|
+
import { Int, Str, Strings } from '../base/types.js';
|
|
3
3
|
import Client from '../base/ws/Client.js';
|
|
4
4
|
export default class bitmex extends bitmexRest {
|
|
5
5
|
describe(): any;
|
|
@@ -11,6 +11,8 @@ export default class bitmex extends bitmexRest {
|
|
|
11
11
|
watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
12
12
|
authenticate(params?: {}): Promise<any>;
|
|
13
13
|
handleAuthenticationMessage(client: Client, message: any): void;
|
|
14
|
+
watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
15
|
+
handlePositions(client: any, message: any): void;
|
|
14
16
|
watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
15
17
|
handleOrders(client: Client, message: any): void;
|
|
16
18
|
watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
package/js/src/pro/bitmex.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import bitmexRest from '../bitmex.js';
|
|
9
9
|
import { AuthenticationError, ExchangeError, RateLimitExceeded } from '../base/errors.js';
|
|
10
|
-
import { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById } from '../base/ws/Cache.js';
|
|
10
|
+
import { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide } from '../base/ws/Cache.js';
|
|
11
11
|
import { sha256 } from '../static_dependencies/noble-hashes/sha256.js';
|
|
12
12
|
// ---------------------------------------------------------------------------
|
|
13
13
|
export default class bitmex extends bitmexRest {
|
|
@@ -21,6 +21,7 @@ export default class bitmex extends bitmexRest {
|
|
|
21
21
|
'watchOrderBook': true,
|
|
22
22
|
'watchOrderBookForSymbols': true,
|
|
23
23
|
'watchOrders': true,
|
|
24
|
+
'watchPostions': true,
|
|
24
25
|
'watchTicker': true,
|
|
25
26
|
'watchTickers': false,
|
|
26
27
|
'watchTrades': true,
|
|
@@ -594,6 +595,210 @@ export default class bitmex extends bitmexRest {
|
|
|
594
595
|
}
|
|
595
596
|
}
|
|
596
597
|
}
|
|
598
|
+
async watchPositions(symbols = undefined, since = undefined, limit = undefined, params = {}) {
|
|
599
|
+
/**
|
|
600
|
+
* @method
|
|
601
|
+
* @name bitmex#watchPositions
|
|
602
|
+
* @see https://www.bitmex.com/app/wsAPI
|
|
603
|
+
* @description watch all open positions
|
|
604
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
605
|
+
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
606
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
|
|
607
|
+
*/
|
|
608
|
+
await this.loadMarkets();
|
|
609
|
+
await this.authenticate();
|
|
610
|
+
const subscriptionHash = 'position';
|
|
611
|
+
let messageHash = 'positions';
|
|
612
|
+
if (!this.isEmpty(symbols)) {
|
|
613
|
+
messageHash = '::' + symbols.join(',');
|
|
614
|
+
}
|
|
615
|
+
const url = this.urls['api']['ws'];
|
|
616
|
+
const request = {
|
|
617
|
+
'op': 'subscribe',
|
|
618
|
+
'args': [
|
|
619
|
+
subscriptionHash,
|
|
620
|
+
],
|
|
621
|
+
};
|
|
622
|
+
const newPositions = await this.watch(url, messageHash, request, subscriptionHash);
|
|
623
|
+
if (this.newUpdates) {
|
|
624
|
+
return newPositions;
|
|
625
|
+
}
|
|
626
|
+
return this.filterBySymbolsSinceLimit(this.positions, symbols, since, limit, true);
|
|
627
|
+
}
|
|
628
|
+
handlePositions(client, message) {
|
|
629
|
+
//
|
|
630
|
+
// partial
|
|
631
|
+
// {
|
|
632
|
+
// table: 'position',
|
|
633
|
+
// action: 'partial',
|
|
634
|
+
// keys: [ 'account', 'symbol' ],
|
|
635
|
+
// types: {
|
|
636
|
+
// account: 'long',
|
|
637
|
+
// symbol: 'symbol',
|
|
638
|
+
// currency: 'symbol',
|
|
639
|
+
// underlying: 'symbol',
|
|
640
|
+
// quoteCurrency: 'symbol',
|
|
641
|
+
// commission: 'float',
|
|
642
|
+
// initMarginReq: 'float',
|
|
643
|
+
// maintMarginReq: 'float',
|
|
644
|
+
// riskLimit: 'long',
|
|
645
|
+
// leverage: 'float',
|
|
646
|
+
// crossMargin: 'boolean',
|
|
647
|
+
// deleveragePercentile: 'float',
|
|
648
|
+
// rebalancedPnl: 'long',
|
|
649
|
+
// prevRealisedPnl: 'long',
|
|
650
|
+
// prevUnrealisedPnl: 'long',
|
|
651
|
+
// openingQty: 'long',
|
|
652
|
+
// openOrderBuyQty: 'long',
|
|
653
|
+
// openOrderBuyCost: 'long',
|
|
654
|
+
// openOrderBuyPremium: 'long',
|
|
655
|
+
// openOrderSellQty: 'long',
|
|
656
|
+
// openOrderSellCost: 'long',
|
|
657
|
+
// openOrderSellPremium: 'long',
|
|
658
|
+
// currentQty: 'long',
|
|
659
|
+
// currentCost: 'long',
|
|
660
|
+
// currentComm: 'long',
|
|
661
|
+
// realisedCost: 'long',
|
|
662
|
+
// unrealisedCost: 'long',
|
|
663
|
+
// grossOpenPremium: 'long',
|
|
664
|
+
// isOpen: 'boolean',
|
|
665
|
+
// markPrice: 'float',
|
|
666
|
+
// markValue: 'long',
|
|
667
|
+
// riskValue: 'long',
|
|
668
|
+
// homeNotional: 'float',
|
|
669
|
+
// foreignNotional: 'float',
|
|
670
|
+
// posState: 'symbol',
|
|
671
|
+
// posCost: 'long',
|
|
672
|
+
// posCross: 'long',
|
|
673
|
+
// posComm: 'long',
|
|
674
|
+
// posLoss: 'long',
|
|
675
|
+
// posMargin: 'long',
|
|
676
|
+
// posMaint: 'long',
|
|
677
|
+
// initMargin: 'long',
|
|
678
|
+
// maintMargin: 'long',
|
|
679
|
+
// realisedPnl: 'long',
|
|
680
|
+
// unrealisedPnl: 'long',
|
|
681
|
+
// unrealisedPnlPcnt: 'float',
|
|
682
|
+
// unrealisedRoePcnt: 'float',
|
|
683
|
+
// avgCostPrice: 'float',
|
|
684
|
+
// avgEntryPrice: 'float',
|
|
685
|
+
// breakEvenPrice: 'float',
|
|
686
|
+
// marginCallPrice: 'float',
|
|
687
|
+
// liquidationPrice: 'float',
|
|
688
|
+
// bankruptPrice: 'float',
|
|
689
|
+
// timestamp: 'timestamp'
|
|
690
|
+
// },
|
|
691
|
+
// filter: { account: 412475 },
|
|
692
|
+
// data: [
|
|
693
|
+
// {
|
|
694
|
+
// account: 412475,
|
|
695
|
+
// symbol: 'XBTUSD',
|
|
696
|
+
// currency: 'XBt',
|
|
697
|
+
// underlying: 'XBT',
|
|
698
|
+
// quoteCurrency: 'USD',
|
|
699
|
+
// commission: 0.00075,
|
|
700
|
+
// initMarginReq: 0.01,
|
|
701
|
+
// maintMarginReq: 0.0035,
|
|
702
|
+
// riskLimit: 20000000000,
|
|
703
|
+
// leverage: 100,
|
|
704
|
+
// crossMargin: true,
|
|
705
|
+
// deleveragePercentile: 1,
|
|
706
|
+
// rebalancedPnl: 0,
|
|
707
|
+
// prevRealisedPnl: 0,
|
|
708
|
+
// prevUnrealisedPnl: 0,
|
|
709
|
+
// openingQty: 400,
|
|
710
|
+
// openOrderBuyQty: 0,
|
|
711
|
+
// openOrderBuyCost: 0,
|
|
712
|
+
// openOrderBuyPremium: 0,
|
|
713
|
+
// openOrderSellQty: 0,
|
|
714
|
+
// openOrderSellCost: 0,
|
|
715
|
+
// openOrderSellPremium: 0,
|
|
716
|
+
// currentQty: 400,
|
|
717
|
+
// currentCost: -912269,
|
|
718
|
+
// currentComm: 684,
|
|
719
|
+
// realisedCost: 0,
|
|
720
|
+
// unrealisedCost: -912269,
|
|
721
|
+
// grossOpenPremium: 0,
|
|
722
|
+
// isOpen: true,
|
|
723
|
+
// markPrice: 43772,
|
|
724
|
+
// markValue: -913828,
|
|
725
|
+
// riskValue: 913828,
|
|
726
|
+
// homeNotional: 0.00913828,
|
|
727
|
+
// foreignNotional: -400,
|
|
728
|
+
// posCost: -912269,
|
|
729
|
+
// posCross: 1559,
|
|
730
|
+
// posComm: 694,
|
|
731
|
+
// posLoss: 0,
|
|
732
|
+
// posMargin: 11376,
|
|
733
|
+
// posMaint: 3887,
|
|
734
|
+
// initMargin: 0,
|
|
735
|
+
// maintMargin: 9817,
|
|
736
|
+
// realisedPnl: -684,
|
|
737
|
+
// unrealisedPnl: -1559,
|
|
738
|
+
// unrealisedPnlPcnt: -0.0017,
|
|
739
|
+
// unrealisedRoePcnt: -0.1709,
|
|
740
|
+
// avgCostPrice: 43846.7643,
|
|
741
|
+
// avgEntryPrice: 43846.7643,
|
|
742
|
+
// breakEvenPrice: 43880,
|
|
743
|
+
// marginCallPrice: 20976,
|
|
744
|
+
// liquidationPrice: 20976,
|
|
745
|
+
// bankruptPrice: 20941,
|
|
746
|
+
// timestamp: '2023-12-07T00:09:00.709Z'
|
|
747
|
+
// }
|
|
748
|
+
// ]
|
|
749
|
+
// }
|
|
750
|
+
// update
|
|
751
|
+
// {
|
|
752
|
+
// table: 'position',
|
|
753
|
+
// action: 'update',
|
|
754
|
+
// data: [
|
|
755
|
+
// {
|
|
756
|
+
// account: 412475,
|
|
757
|
+
// symbol: 'XBTUSD',
|
|
758
|
+
// currency: 'XBt',
|
|
759
|
+
// currentQty: 400,
|
|
760
|
+
// markPrice: 43772.75,
|
|
761
|
+
// markValue: -913812,
|
|
762
|
+
// riskValue: 913812,
|
|
763
|
+
// homeNotional: 0.00913812,
|
|
764
|
+
// posCross: 1543,
|
|
765
|
+
// posComm: 693,
|
|
766
|
+
// posMargin: 11359,
|
|
767
|
+
// posMaint: 3886,
|
|
768
|
+
// maintMargin: 9816,
|
|
769
|
+
// unrealisedPnl: -1543,
|
|
770
|
+
// unrealisedRoePcnt: -0.1691,
|
|
771
|
+
// liquidationPrice: 20976,
|
|
772
|
+
// timestamp: '2023-12-07T00:09:10.760Z'
|
|
773
|
+
// }
|
|
774
|
+
// ]
|
|
775
|
+
// }
|
|
776
|
+
//
|
|
777
|
+
if (this.positions === undefined) {
|
|
778
|
+
this.positions = new ArrayCacheBySymbolBySide();
|
|
779
|
+
}
|
|
780
|
+
const cache = this.positions;
|
|
781
|
+
const rawPositions = this.safeValue(message, 'data', []);
|
|
782
|
+
const newPositions = [];
|
|
783
|
+
for (let i = 0; i < rawPositions.length; i++) {
|
|
784
|
+
const rawPosition = rawPositions[i];
|
|
785
|
+
const position = this.parsePosition(rawPosition);
|
|
786
|
+
newPositions.push(position);
|
|
787
|
+
cache.append(position);
|
|
788
|
+
}
|
|
789
|
+
const messageHashes = this.findMessageHashes(client, 'positions::');
|
|
790
|
+
for (let i = 0; i < messageHashes.length; i++) {
|
|
791
|
+
const messageHash = messageHashes[i];
|
|
792
|
+
const parts = messageHash.split('::');
|
|
793
|
+
const symbolsString = parts[1];
|
|
794
|
+
const symbols = symbolsString.split(',');
|
|
795
|
+
const positions = this.filterByArray(newPositions, 'symbol', symbols, false);
|
|
796
|
+
if (!this.isEmpty(positions)) {
|
|
797
|
+
client.resolve(positions, messageHash);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
client.resolve(newPositions, 'positions');
|
|
801
|
+
}
|
|
597
802
|
async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
598
803
|
/**
|
|
599
804
|
* @method
|
|
@@ -1376,6 +1581,7 @@ export default class bitmex extends bitmexRest {
|
|
|
1376
1581
|
'order': this.handleOrders,
|
|
1377
1582
|
'execution': this.handleMyTrades,
|
|
1378
1583
|
'margin': this.handleBalance,
|
|
1584
|
+
'position': this.handlePositions,
|
|
1379
1585
|
};
|
|
1380
1586
|
const method = this.safeValue(methods, table);
|
|
1381
1587
|
if (method === undefined) {
|
|
@@ -99,10 +99,10 @@ export default class krakenfutures extends krakenfuturesRest {
|
|
|
99
99
|
* @ignore
|
|
100
100
|
* @method
|
|
101
101
|
* @description Connects to a websocket channel
|
|
102
|
-
* @param {
|
|
102
|
+
* @param {string} name name of the channel
|
|
103
103
|
* @param {string[]} symbols CCXT market symbols
|
|
104
|
-
* @param {
|
|
105
|
-
* @returns {
|
|
104
|
+
* @param {object} [params] extra parameters specific to the krakenfutures api
|
|
105
|
+
* @returns {object} data from the websocket stream
|
|
106
106
|
*/
|
|
107
107
|
await this.loadMarkets();
|
|
108
108
|
const url = this.urls['api']['ws'];
|
|
@@ -133,10 +133,10 @@ export default class krakenfutures extends krakenfuturesRest {
|
|
|
133
133
|
* @ignore
|
|
134
134
|
* @method
|
|
135
135
|
* @description Connects to a websocket channel
|
|
136
|
-
* @param {
|
|
136
|
+
* @param {string} name name of the channel
|
|
137
137
|
* @param {string[]} symbols CCXT market symbols
|
|
138
|
-
* @param {
|
|
139
|
-
* @returns {
|
|
138
|
+
* @param {object} [params] extra parameters specific to the krakenfutures api
|
|
139
|
+
* @returns {object} data from the websocket stream
|
|
140
140
|
*/
|
|
141
141
|
await this.loadMarkets();
|
|
142
142
|
await this.authenticate();
|
package/js/src/pro/mexc.js
CHANGED
|
@@ -742,7 +742,7 @@ export default class mexc extends mexcRest {
|
|
|
742
742
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
743
743
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
744
744
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
745
|
-
* @
|
|
745
|
+
* @param {string|undefined} params.type the type of orders to retrieve, can be 'spot' or 'margin'
|
|
746
746
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
747
747
|
*/
|
|
748
748
|
await this.loadMarkets();
|
package/js/src/pro/poloniex.js
CHANGED
|
@@ -204,7 +204,7 @@ export default class poloniex extends poloniexRest {
|
|
|
204
204
|
* @param {string} [params.stpMode] self-trade prevention, defaults to expire_taker, none: enable self-trade; expire_taker: taker order will be canceled when self-trade happens
|
|
205
205
|
* @param {string} [params.slippageTolerance] used to control the maximum slippage ratio, the value range is greater than 0 and less than 1
|
|
206
206
|
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
207
|
-
|
|
207
|
+
*/
|
|
208
208
|
await this.loadMarkets();
|
|
209
209
|
await this.authenticate();
|
|
210
210
|
const market = this.market(symbol);
|
|
@@ -131,9 +131,9 @@ export default class poloniexfutures extends poloniexfuturesRest {
|
|
|
131
131
|
* @param {string} name name of the channel and suscriptionHash
|
|
132
132
|
* @param {bool} isPrivate true for the authenticated url, false for the public url
|
|
133
133
|
* @param {string} symbol is required for all public channels, not required for private channels (except position)
|
|
134
|
-
* @param {
|
|
135
|
-
* @param {
|
|
136
|
-
* @returns {
|
|
134
|
+
* @param {object} subscription subscription parameters
|
|
135
|
+
* @param {object} [params] extra parameters specific to the poloniex api
|
|
136
|
+
* @returns {object} data from the websocket stream
|
|
137
137
|
*/
|
|
138
138
|
const url = await this.negotiate(isPrivate);
|
|
139
139
|
if (symbol !== undefined) {
|
package/js/src/probit.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import Exchange from './abstract/probit.js';
|
|
|
2
2
|
import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class probit
|
|
5
|
-
* @
|
|
5
|
+
* @augments Exchange
|
|
6
6
|
*/
|
|
7
7
|
export default class probit extends Exchange {
|
|
8
8
|
describe(): any;
|
package/js/src/probit.js
CHANGED
|
@@ -12,7 +12,7 @@ import { TRUNCATE, TICK_SIZE } from './base/functions/number.js';
|
|
|
12
12
|
// ---------------------------------------------------------------------------
|
|
13
13
|
/**
|
|
14
14
|
* @class probit
|
|
15
|
-
* @
|
|
15
|
+
* @augments Exchange
|
|
16
16
|
*/
|
|
17
17
|
export default class probit extends Exchange {
|
|
18
18
|
describe() {
|
|
@@ -31,7 +31,10 @@ export default class probit extends Exchange {
|
|
|
31
31
|
'option': false,
|
|
32
32
|
'addMargin': false,
|
|
33
33
|
'cancelOrder': true,
|
|
34
|
+
'createMarketBuyOrderWithCost': true,
|
|
34
35
|
'createMarketOrder': true,
|
|
36
|
+
'createMarketOrderWithCost': false,
|
|
37
|
+
'createMarketSellOrderWithCost': false,
|
|
35
38
|
'createOrder': true,
|
|
36
39
|
'createReduceOnlyOrder': false,
|
|
37
40
|
'createStopLimitOrder': false,
|
|
@@ -318,6 +321,7 @@ export default class probit extends Exchange {
|
|
|
318
321
|
'precision': {
|
|
319
322
|
'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'quantity_precision'))),
|
|
320
323
|
'price': this.safeNumber(market, 'price_increment'),
|
|
324
|
+
'cost': this.parseNumber(this.parsePrecision(this.safeString(market, 'cost_precision'))),
|
|
321
325
|
},
|
|
322
326
|
'limits': {
|
|
323
327
|
'leverage': {
|
|
@@ -1190,14 +1194,15 @@ export default class probit extends Exchange {
|
|
|
1190
1194
|
/**
|
|
1191
1195
|
* @method
|
|
1192
1196
|
* @name probit#createOrder
|
|
1193
|
-
* @see https://docs-en.probit.com/reference/order-1
|
|
1194
1197
|
* @description create a trade order
|
|
1198
|
+
* @see https://docs-en.probit.com/reference/order-1
|
|
1195
1199
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
1196
1200
|
* @param {string} type 'market' or 'limit'
|
|
1197
1201
|
* @param {string} side 'buy' or 'sell'
|
|
1198
|
-
* @param {float} amount how much
|
|
1202
|
+
* @param {float} amount how much you want to trade in units of the base currency
|
|
1199
1203
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1200
1204
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1205
|
+
* @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount for market buy orders
|
|
1201
1206
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1202
1207
|
*/
|
|
1203
1208
|
await this.loadMarkets();
|
|
@@ -1215,7 +1220,7 @@ export default class probit extends Exchange {
|
|
|
1215
1220
|
if (clientOrderId !== undefined) {
|
|
1216
1221
|
request['client_order_id'] = clientOrderId;
|
|
1217
1222
|
}
|
|
1218
|
-
let
|
|
1223
|
+
let quoteAmount = undefined;
|
|
1219
1224
|
if (type === 'limit') {
|
|
1220
1225
|
request['limit_price'] = this.priceToPrecision(symbol, price);
|
|
1221
1226
|
request['quantity'] = this.amountToPrecision(symbol, amount);
|
|
@@ -1223,25 +1228,28 @@ export default class probit extends Exchange {
|
|
|
1223
1228
|
else if (type === 'market') {
|
|
1224
1229
|
// for market buy it requires the amount of quote currency to spend
|
|
1225
1230
|
if (side === 'buy') {
|
|
1226
|
-
let
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1231
|
+
let createMarketBuyOrderRequiresPrice = true;
|
|
1232
|
+
[createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
|
|
1233
|
+
const cost = this.safeString(params, 'cost');
|
|
1234
|
+
params = this.omit(params, 'cost');
|
|
1235
|
+
if (cost !== undefined) {
|
|
1236
|
+
quoteAmount = this.costToPrecision(symbol, cost);
|
|
1237
|
+
}
|
|
1238
|
+
else if (createMarketBuyOrderRequiresPrice) {
|
|
1239
|
+
if (price === undefined) {
|
|
1240
|
+
throw new InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument');
|
|
1235
1241
|
}
|
|
1236
|
-
else
|
|
1237
|
-
|
|
1242
|
+
else {
|
|
1243
|
+
const amountString = this.numberToString(amount);
|
|
1244
|
+
const priceString = this.numberToString(price);
|
|
1245
|
+
const costRequest = Precise.stringMul(amountString, priceString);
|
|
1246
|
+
quoteAmount = this.costToPrecision(symbol, costRequest);
|
|
1238
1247
|
}
|
|
1239
1248
|
}
|
|
1240
1249
|
else {
|
|
1241
|
-
|
|
1250
|
+
quoteAmount = this.costToPrecision(symbol, amount);
|
|
1242
1251
|
}
|
|
1243
|
-
|
|
1244
|
-
request['cost'] = costToPrecision;
|
|
1252
|
+
request['cost'] = quoteAmount;
|
|
1245
1253
|
}
|
|
1246
1254
|
else {
|
|
1247
1255
|
request['quantity'] = this.amountToPrecision(symbol, amount);
|
|
@@ -1276,7 +1284,7 @@ export default class probit extends Exchange {
|
|
|
1276
1284
|
// returned by the exchange on market buys
|
|
1277
1285
|
if ((type === 'market') && (side === 'buy')) {
|
|
1278
1286
|
order['amount'] = undefined;
|
|
1279
|
-
order['cost'] = this.parseNumber(
|
|
1287
|
+
order['cost'] = this.parseNumber(quoteAmount);
|
|
1280
1288
|
order['remaining'] = undefined;
|
|
1281
1289
|
}
|
|
1282
1290
|
return order;
|
|
@@ -6,7 +6,7 @@ export interface IJSEncryptOptions {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
|
-
* @param {
|
|
9
|
+
* @param {object} [options = {}] - An object to customize JSEncrypt behaviour
|
|
10
10
|
* possible parameters are:
|
|
11
11
|
* - default_key_size {number} default: 1024 the key size in bit
|
|
12
12
|
* - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
|
|
@@ -11,7 +11,7 @@ const version = typeof process !== 'undefined'
|
|
|
11
11
|
: undefined;
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
|
-
* @param {
|
|
14
|
+
* @param {object} [options = {}] - An object to customize JSEncrypt behaviour
|
|
15
15
|
* possible parameters are:
|
|
16
16
|
* - default_key_size {number} default: 1024 the key size in bit
|
|
17
17
|
* - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
|
|
@@ -113,7 +113,7 @@ export declare class JSEncryptRSAKey extends RSAKey {
|
|
|
113
113
|
/**
|
|
114
114
|
* Check if the object contains the necessary parameters to populate the rsa modulus
|
|
115
115
|
* and public exponent parameters.
|
|
116
|
-
* @param {
|
|
116
|
+
* @param {object} [obj={}] - An object that may contain the two public key
|
|
117
117
|
* parameters
|
|
118
118
|
* @returns {boolean} true if the object contains both the modulus and the public exponent
|
|
119
119
|
* properties (n and e)
|
|
@@ -124,7 +124,7 @@ export declare class JSEncryptRSAKey extends RSAKey {
|
|
|
124
124
|
static hasPublicKeyProperty(obj: object): boolean;
|
|
125
125
|
/**
|
|
126
126
|
* Check if the object contains ALL the parameters of an RSA key.
|
|
127
|
-
* @param {
|
|
127
|
+
* @param {object} [obj={}] - An object that may contain nine rsa key
|
|
128
128
|
* parameters
|
|
129
129
|
* @returns {boolean} true if the object contains all the parameters needed
|
|
130
130
|
* @todo check for types of the parameters all the parameters but the public exponent
|
|
@@ -135,7 +135,7 @@ export declare class JSEncryptRSAKey extends RSAKey {
|
|
|
135
135
|
/**
|
|
136
136
|
* Parse the properties of obj in the current rsa object. Obj should AT LEAST
|
|
137
137
|
* include the modulus and public exponent (n, e) parameters.
|
|
138
|
-
* @param {
|
|
138
|
+
* @param {object} obj - the object containing rsa parameters
|
|
139
139
|
* @private
|
|
140
140
|
*/
|
|
141
141
|
parsePropertiesFrom(obj: any): void;
|
|
@@ -254,7 +254,7 @@ export class JSEncryptRSAKey extends RSAKey {
|
|
|
254
254
|
/**
|
|
255
255
|
* Check if the object contains the necessary parameters to populate the rsa modulus
|
|
256
256
|
* and public exponent parameters.
|
|
257
|
-
* @param {
|
|
257
|
+
* @param {object} [obj={}] - An object that may contain the two public key
|
|
258
258
|
* parameters
|
|
259
259
|
* @returns {boolean} true if the object contains both the modulus and the public exponent
|
|
260
260
|
* properties (n and e)
|
|
@@ -268,7 +268,7 @@ export class JSEncryptRSAKey extends RSAKey {
|
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* Check if the object contains ALL the parameters of an RSA key.
|
|
271
|
-
* @param {
|
|
271
|
+
* @param {object} [obj={}] - An object that may contain nine rsa key
|
|
272
272
|
* parameters
|
|
273
273
|
* @returns {boolean} true if the object contains all the parameters needed
|
|
274
274
|
* @todo check for types of the parameters all the parameters but the public exponent
|
|
@@ -289,7 +289,7 @@ export class JSEncryptRSAKey extends RSAKey {
|
|
|
289
289
|
/**
|
|
290
290
|
* Parse the properties of obj in the current rsa object. Obj should AT LEAST
|
|
291
291
|
* include the modulus and public exponent (n, e) parameters.
|
|
292
|
-
* @param {
|
|
292
|
+
* @param {object} obj - the object containing rsa parameters
|
|
293
293
|
* @private
|
|
294
294
|
*/
|
|
295
295
|
parsePropertiesFrom(obj) {
|
package/js/src/timex.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import Exchange from './abstract/timex.js';
|
|
|
2
2
|
import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class timex
|
|
5
|
-
* @
|
|
5
|
+
* @augments Exchange
|
|
6
6
|
*/
|
|
7
7
|
export default class timex extends Exchange {
|
|
8
8
|
describe(): any;
|
package/js/src/timex.js
CHANGED
package/js/src/tokocrypto.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import Exchange from './abstract/tokocrypto.js';
|
|
|
2
2
|
import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class tokocrypto
|
|
5
|
-
* @
|
|
5
|
+
* @augments Exchange
|
|
6
6
|
*/
|
|
7
7
|
export default class tokocrypto extends Exchange {
|
|
8
8
|
describe(): any;
|
package/js/src/tokocrypto.js
CHANGED
|
@@ -13,7 +13,7 @@ import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
/**
|
|
15
15
|
* @class tokocrypto
|
|
16
|
-
* @
|
|
16
|
+
* @augments Exchange
|
|
17
17
|
*/
|
|
18
18
|
export default class tokocrypto extends Exchange {
|
|
19
19
|
describe() {
|
|
@@ -1018,16 +1018,21 @@ export default class tokocrypto extends Exchange {
|
|
|
1018
1018
|
const data = this.safeValue(responseInner, 'data', {});
|
|
1019
1019
|
return this.parseTrades(data, market, since, limit);
|
|
1020
1020
|
}
|
|
1021
|
+
if (limit !== undefined) {
|
|
1022
|
+
request['limit'] = limit; // default = 500, maximum = 1000
|
|
1023
|
+
}
|
|
1021
1024
|
const defaultMethod = 'binanceGetTrades';
|
|
1022
1025
|
const method = this.safeString(this.options, 'fetchTradesMethod', defaultMethod);
|
|
1026
|
+
let response = undefined;
|
|
1023
1027
|
if ((method === 'binanceGetAggTrades') && (since !== undefined)) {
|
|
1024
1028
|
request['startTime'] = since;
|
|
1025
1029
|
// https://github.com/ccxt/ccxt/issues/6400
|
|
1026
1030
|
// https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#compressedaggregate-trades-list
|
|
1027
1031
|
request['endTime'] = this.sum(since, 3600000);
|
|
1032
|
+
response = await this.binanceGetAggTrades(this.extend(request, params));
|
|
1028
1033
|
}
|
|
1029
|
-
|
|
1030
|
-
|
|
1034
|
+
else {
|
|
1035
|
+
response = await this.binanceGetTrades(this.extend(request, params));
|
|
1031
1036
|
}
|
|
1032
1037
|
//
|
|
1033
1038
|
// Caveats:
|
|
@@ -1038,7 +1043,6 @@ export default class tokocrypto extends Exchange {
|
|
|
1038
1043
|
// - 'tradeId' accepted and returned by this method is "aggregate" trade id
|
|
1039
1044
|
// which is different from actual trade id
|
|
1040
1045
|
// - setting both fromId and time window results in error
|
|
1041
|
-
const response = await this[method](this.extend(request, params));
|
|
1042
1046
|
//
|
|
1043
1047
|
// aggregate trades
|
|
1044
1048
|
//
|
package/js/src/upbit.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import Exchange from './abstract/upbit.js';
|
|
|
2
2
|
import { Balances, Currency, Dictionary, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class upbit
|
|
5
|
-
* @
|
|
5
|
+
* @augments Exchange
|
|
6
6
|
*/
|
|
7
7
|
export default class upbit extends Exchange {
|
|
8
8
|
describe(): any;
|
package/js/src/upbit.js
CHANGED
|
@@ -15,7 +15,7 @@ import { jwt } from './base/functions/rsa.js';
|
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
16
16
|
/**
|
|
17
17
|
* @class upbit
|
|
18
|
-
* @
|
|
18
|
+
* @augments Exchange
|
|
19
19
|
*/
|
|
20
20
|
export default class upbit extends Exchange {
|
|
21
21
|
describe() {
|
|
@@ -3,7 +3,7 @@ import { Precise } from './base/Precise.js';
|
|
|
3
3
|
import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
4
4
|
/**
|
|
5
5
|
* @class wavesexchange
|
|
6
|
-
* @
|
|
6
|
+
* @augments Exchange
|
|
7
7
|
*/
|
|
8
8
|
export default class wavesexchange extends Exchange {
|
|
9
9
|
describe(): any;
|
package/js/src/wavesexchange.js
CHANGED
|
@@ -13,7 +13,7 @@ import { DECIMAL_PLACES } from './base/functions/number.js';
|
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
/**
|
|
15
15
|
* @class wavesexchange
|
|
16
|
-
* @
|
|
16
|
+
* @augments Exchange
|
|
17
17
|
*/
|
|
18
18
|
export default class wavesexchange extends Exchange {
|
|
19
19
|
describe() {
|
package/js/src/wazirx.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import Exchange from './abstract/wazirx.js';
|
|
|
2
2
|
import { Balances, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class wazirx
|
|
5
|
-
* @
|
|
5
|
+
* @augments Exchange
|
|
6
6
|
*/
|
|
7
7
|
export default class wazirx extends Exchange {
|
|
8
8
|
describe(): any;
|
package/js/src/wazirx.js
CHANGED
|
@@ -11,7 +11,7 @@ import { TICK_SIZE } from './base/functions/number.js';
|
|
|
11
11
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
12
12
|
/**
|
|
13
13
|
* @class wazirx
|
|
14
|
-
* @
|
|
14
|
+
* @augments Exchange
|
|
15
15
|
*/
|
|
16
16
|
export default class wazirx extends Exchange {
|
|
17
17
|
describe() {
|