ccxt 4.2.31 → 4.2.35
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/.gitattributes +1 -0
- package/CONTRIBUTING.md +20 -1
- package/README.md +8 -7
- package/build.sh +9 -2
- package/cleanup.sh +3 -0
- package/dist/ccxt.browser.js +741 -501
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +3 -2
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/base/Exchange.js +62 -20
- package/dist/cjs/src/bigone.js +21 -1
- package/dist/cjs/src/binance.js +59 -15
- package/dist/cjs/src/bingx.js +4 -3
- package/dist/cjs/src/bit2c.js +12 -0
- package/dist/cjs/src/bitfinex2.js +12 -1
- package/dist/cjs/src/bitget.js +3 -3
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitrue.js +3 -3
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/bybit.js +1 -1
- package/dist/cjs/src/coinbase.js +2 -2
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/cryptocom.js +10 -10
- package/dist/cjs/src/gate.js +34 -29
- package/dist/cjs/src/kraken.js +39 -0
- package/dist/cjs/src/krakenfutures.js +25 -3
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/mexc.js +2 -1
- package/dist/cjs/src/okx.js +4 -3
- package/dist/cjs/src/phemex.js +8 -8
- package/dist/cjs/src/pro/alpaca.js +8 -4
- package/dist/cjs/src/pro/ascendex.js +1 -2
- package/dist/cjs/src/pro/binance.js +17 -13
- package/dist/cjs/src/pro/bingx.js +1 -1
- package/dist/cjs/src/pro/bitfinex.js +21 -24
- package/dist/cjs/src/pro/bitfinex2.js +13 -17
- package/dist/cjs/src/pro/bitget.js +3 -1
- package/dist/cjs/src/pro/bitmart.js +3 -8
- package/dist/cjs/src/pro/bitmex.js +4 -7
- package/dist/cjs/src/pro/bitopro.js +2 -5
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +2 -3
- package/dist/cjs/src/pro/bitvavo.js +12 -5
- package/dist/cjs/src/pro/blockchaincom.js +22 -23
- package/dist/cjs/src/pro/bybit.js +5 -5
- package/dist/cjs/src/pro/cex.js +7 -7
- package/dist/cjs/src/pro/coinbase.js +3 -2
- package/dist/cjs/src/pro/coinbasepro.js +1 -1
- package/dist/cjs/src/pro/coinex.js +15 -13
- package/dist/cjs/src/pro/currencycom.js +5 -7
- package/dist/cjs/src/pro/deribit.js +4 -4
- package/dist/cjs/src/pro/exmo.js +15 -13
- package/dist/cjs/src/pro/gate.js +1 -1
- package/dist/cjs/src/pro/gemini.js +4 -2
- package/dist/cjs/src/pro/hitbtc.js +9 -8
- package/dist/cjs/src/pro/hollaex.js +2 -2
- package/dist/cjs/src/pro/htx.js +6 -7
- package/dist/cjs/src/pro/huobijp.js +3 -5
- package/dist/cjs/src/pro/idex.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +14 -13
- package/dist/cjs/src/pro/kraken.js +10 -16
- package/dist/cjs/src/pro/krakenfutures.js +10 -6
- package/dist/cjs/src/pro/kucoin.js +10 -11
- package/dist/cjs/src/pro/kucoinfutures.js +12 -11
- package/dist/cjs/src/pro/lbank.js +10 -10
- package/dist/cjs/src/pro/luno.js +12 -14
- package/dist/cjs/src/pro/mexc.js +3 -2
- package/dist/cjs/src/pro/ndax.js +7 -13
- package/dist/cjs/src/pro/okcoin.js +7 -12
- package/dist/cjs/src/pro/okx.js +6 -11
- package/dist/cjs/src/pro/onetrading.js +16 -15
- package/dist/cjs/src/pro/p2b.js +5 -3
- package/dist/cjs/src/pro/phemex.js +16 -11
- package/dist/cjs/src/pro/poloniex.js +6 -4
- package/dist/cjs/src/pro/poloniexfutures.js +14 -9
- package/dist/cjs/src/pro/probit.js +15 -11
- package/dist/cjs/src/pro/upbit.js +8 -8
- package/dist/cjs/src/pro/wazirx.js +6 -3
- package/dist/cjs/src/pro/woo.js +8 -6
- package/dist/cjs/src/probit.js +3 -3
- package/dist/cjs/src/tokocrypto.js +2 -2
- package/dist/cjs/src/wavesexchange.js +2 -1
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/yobit.js +39 -0
- 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 +3 -2
- package/js/src/alpaca.d.ts +1 -1
- package/js/src/ascendex.d.ts +5 -15
- package/js/src/ascendex.js +1 -1
- package/js/src/base/Exchange.d.ts +86 -78
- package/js/src/base/Exchange.js +62 -20
- package/js/src/base/types.d.ts +90 -6
- package/js/src/bigone.d.ts +5 -15
- package/js/src/bigone.js +21 -1
- package/js/src/binance.d.ts +13 -23
- package/js/src/binance.js +59 -15
- package/js/src/bingx.d.ts +6 -16
- package/js/src/bingx.js +4 -3
- package/js/src/bit2c.d.ts +1 -1
- package/js/src/bit2c.js +12 -0
- package/js/src/bitbank.d.ts +2 -2
- package/js/src/bitbns.d.ts +1 -1
- package/js/src/bitfinex.d.ts +5 -5
- package/js/src/bitfinex2.d.ts +7 -17
- package/js/src/bitfinex2.js +12 -1
- package/js/src/bitflyer.d.ts +5 -5
- package/js/src/bitforex.d.ts +1 -1
- package/js/src/bitget.d.ts +8 -38
- package/js/src/bitget.js +3 -3
- package/js/src/bithumb.d.ts +2 -2
- package/js/src/bitmart.d.ts +10 -21
- package/js/src/bitmart.js +1 -1
- package/js/src/bitmex.d.ts +3 -3
- package/js/src/bitopro.d.ts +2 -2
- package/js/src/bitrue.d.ts +5 -15
- package/js/src/bitrue.js +3 -3
- package/js/src/bitso.d.ts +4 -4
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitteam.d.ts +1 -1
- package/js/src/bitvavo.d.ts +3 -3
- package/js/src/bl3p.d.ts +1 -1
- package/js/src/blockchaincom.d.ts +2 -2
- package/js/src/blockchaincom.js +1 -1
- package/js/src/btcalpha.d.ts +1 -1
- package/js/src/btcbox.d.ts +1 -1
- package/js/src/btcmarkets.d.ts +3 -3
- package/js/src/btcturk.d.ts +1 -1
- package/js/src/bybit.d.ts +8 -8
- package/js/src/bybit.js +1 -1
- package/js/src/cex.d.ts +1 -1
- package/js/src/coinbase.d.ts +6 -50
- package/js/src/coinbase.js +2 -2
- package/js/src/coinbasepro.d.ts +2 -2
- package/js/src/coincheck.d.ts +1 -1
- package/js/src/coinex.d.ts +8 -8
- package/js/src/coinex.js +1 -1
- package/js/src/coinlist.d.ts +4 -14
- package/js/src/coinmate.d.ts +2 -2
- package/js/src/coinmetro.d.ts +2 -2
- package/js/src/coinone.d.ts +1 -1
- package/js/src/coinsph.d.ts +2 -2
- package/js/src/coinspot.d.ts +1 -1
- package/js/src/cryptocom.d.ts +4 -4
- package/js/src/cryptocom.js +10 -10
- package/js/src/currencycom.d.ts +2 -2
- package/js/src/delta.d.ts +2 -2
- package/js/src/deribit.d.ts +4 -14
- package/js/src/digifinex.d.ts +10 -38
- package/js/src/exmo.d.ts +2 -2
- package/js/src/gate.d.ts +8 -18
- package/js/src/gate.js +34 -29
- package/js/src/gemini.d.ts +2 -2
- package/js/src/hitbtc.d.ts +6 -16
- package/js/src/hollaex.d.ts +2 -2
- package/js/src/htx.d.ts +11 -21
- package/js/src/huobijp.d.ts +4 -4
- package/js/src/idex.d.ts +3 -3
- package/js/src/independentreserve.d.ts +2 -2
- package/js/src/indodax.d.ts +2 -2
- package/js/src/kraken.d.ts +5 -5
- package/js/src/kraken.js +39 -0
- package/js/src/krakenfutures.d.ts +7 -7
- package/js/src/krakenfutures.js +25 -3
- package/js/src/kucoin.d.ts +8 -29
- package/js/src/kucoin.js +1 -1
- package/js/src/kucoinfutures.d.ts +4 -4
- package/js/src/kuna.d.ts +2 -2
- package/js/src/latoken.d.ts +4 -14
- package/js/src/lbank.d.ts +2 -5
- package/js/src/luno.d.ts +1 -1
- package/js/src/lykke.d.ts +2 -2
- package/js/src/mercado.d.ts +2 -2
- package/js/src/mexc.d.ts +6 -6
- package/js/src/mexc.js +2 -1
- package/js/src/ndax.d.ts +2 -2
- package/js/src/novadax.d.ts +4 -15
- package/js/src/oceanex.d.ts +1 -1
- package/js/src/okcoin.d.ts +5 -15
- package/js/src/okx.d.ts +8 -18
- package/js/src/okx.js +4 -3
- package/js/src/onetrading.d.ts +2 -2
- package/js/src/p2b.d.ts +1 -1
- package/js/src/paymium.d.ts +3 -13
- package/js/src/phemex.d.ts +5 -5
- package/js/src/phemex.js +8 -8
- package/js/src/poloniex.d.ts +4 -14
- package/js/src/poloniexfutures.d.ts +1 -1
- package/js/src/pro/alpaca.d.ts +2 -2
- package/js/src/pro/alpaca.js +8 -4
- package/js/src/pro/ascendex.d.ts +2 -2
- package/js/src/pro/ascendex.js +1 -2
- package/js/src/pro/binance.d.ts +3 -3
- package/js/src/pro/binance.js +17 -13
- package/js/src/pro/bingx.d.ts +1 -1
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/bitfinex.d.ts +2 -2
- package/js/src/pro/bitfinex.js +21 -24
- package/js/src/pro/bitfinex2.d.ts +2 -2
- package/js/src/pro/bitfinex2.js +13 -17
- package/js/src/pro/bitget.js +3 -1
- package/js/src/pro/bitmart.d.ts +3 -3
- package/js/src/pro/bitmart.js +3 -8
- package/js/src/pro/bitmex.d.ts +1 -1
- package/js/src/pro/bitmex.js +4 -7
- package/js/src/pro/bitopro.d.ts +1 -1
- package/js/src/pro/bitopro.js +2 -5
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.d.ts +1 -1
- package/js/src/pro/bitstamp.js +2 -3
- package/js/src/pro/bitvavo.d.ts +3 -3
- package/js/src/pro/bitvavo.js +12 -5
- package/js/src/pro/blockchaincom.d.ts +8 -8
- package/js/src/pro/blockchaincom.js +22 -23
- package/js/src/pro/bybit.d.ts +2 -2
- package/js/src/pro/bybit.js +5 -5
- package/js/src/pro/cex.d.ts +1 -1
- package/js/src/pro/cex.js +7 -7
- package/js/src/pro/coinbase.d.ts +1 -1
- package/js/src/pro/coinbase.js +3 -2
- package/js/src/pro/coinbasepro.d.ts +1 -1
- package/js/src/pro/coinbasepro.js +1 -1
- package/js/src/pro/coinex.d.ts +2 -2
- package/js/src/pro/coinex.js +15 -13
- package/js/src/pro/currencycom.d.ts +1 -1
- package/js/src/pro/currencycom.js +5 -7
- package/js/src/pro/deribit.d.ts +2 -2
- package/js/src/pro/deribit.js +4 -4
- package/js/src/pro/exmo.d.ts +2 -2
- package/js/src/pro/exmo.js +15 -13
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/gemini.d.ts +1 -1
- package/js/src/pro/gemini.js +4 -2
- package/js/src/pro/hitbtc.d.ts +2 -2
- package/js/src/pro/hitbtc.js +9 -8
- package/js/src/pro/hollaex.d.ts +2 -2
- package/js/src/pro/hollaex.js +2 -2
- package/js/src/pro/htx.d.ts +2 -2
- package/js/src/pro/htx.js +6 -7
- package/js/src/pro/huobijp.d.ts +1 -1
- package/js/src/pro/huobijp.js +3 -5
- package/js/src/pro/idex.js +1 -1
- package/js/src/pro/independentreserve.d.ts +1 -1
- package/js/src/pro/independentreserve.js +14 -13
- package/js/src/pro/kraken.d.ts +2 -2
- package/js/src/pro/kraken.js +10 -16
- package/js/src/pro/krakenfutures.d.ts +1 -1
- package/js/src/pro/krakenfutures.js +10 -6
- package/js/src/pro/kucoin.d.ts +3 -3
- package/js/src/pro/kucoin.js +10 -11
- package/js/src/pro/kucoinfutures.d.ts +3 -3
- package/js/src/pro/kucoinfutures.js +12 -11
- package/js/src/pro/lbank.d.ts +1 -1
- package/js/src/pro/lbank.js +10 -10
- package/js/src/pro/luno.d.ts +2 -2
- package/js/src/pro/luno.js +12 -14
- package/js/src/pro/mexc.d.ts +2 -2
- package/js/src/pro/mexc.js +3 -2
- package/js/src/pro/ndax.d.ts +3 -3
- package/js/src/pro/ndax.js +7 -13
- package/js/src/pro/okcoin.d.ts +1 -1
- package/js/src/pro/okcoin.js +7 -12
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +6 -11
- package/js/src/pro/onetrading.d.ts +1 -1
- package/js/src/pro/onetrading.js +16 -15
- package/js/src/pro/p2b.d.ts +1 -1
- package/js/src/pro/p2b.js +5 -3
- package/js/src/pro/phemex.d.ts +3 -3
- package/js/src/pro/phemex.js +16 -11
- package/js/src/pro/poloniex.d.ts +1 -1
- package/js/src/pro/poloniex.js +6 -4
- package/js/src/pro/poloniexfutures.d.ts +4 -4
- package/js/src/pro/poloniexfutures.js +13 -10
- package/js/src/pro/probit.d.ts +1 -1
- package/js/src/pro/probit.js +14 -12
- package/js/src/pro/upbit.js +8 -8
- package/js/src/pro/wazirx.d.ts +1 -1
- package/js/src/pro/wazirx.js +6 -3
- package/js/src/pro/woo.d.ts +3 -3
- package/js/src/pro/woo.js +8 -6
- package/js/src/probit.d.ts +3 -3
- package/js/src/probit.js +3 -3
- package/js/src/timex.d.ts +1 -1
- package/js/src/tokocrypto.d.ts +3 -3
- package/js/src/tokocrypto.js +2 -2
- package/js/src/upbit.d.ts +2 -2
- package/js/src/wavesexchange.d.ts +3 -4
- package/js/src/wavesexchange.js +2 -1
- package/js/src/wazirx.d.ts +1 -1
- package/js/src/whitebit.d.ts +5 -15
- package/js/src/woo.d.ts +5 -15
- package/js/src/woo.js +1 -1
- package/js/src/yobit.d.ts +21 -6
- package/js/src/yobit.js +39 -0
- package/js/src/zaif.d.ts +2 -2
- package/js/src/zonda.d.ts +4 -14
- package/package.json +22 -8
- package/skip-tests.json +9 -1
- package/tests-manager.sh +1 -2
package/js/src/coinsph.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export default class coinsph extends Exchange {
|
|
|
28
28
|
parseTrade(trade: any, market?: Market): Trade;
|
|
29
29
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
30
30
|
parseBalance(response: any): Balances;
|
|
31
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
31
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
32
32
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
33
33
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
34
34
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
@@ -54,7 +54,7 @@ export default class coinsph extends Exchange {
|
|
|
54
54
|
maker: number;
|
|
55
55
|
taker: number;
|
|
56
56
|
};
|
|
57
|
-
withdraw(code: string, amount:
|
|
57
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
58
58
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
59
59
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
60
60
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
package/js/src/coinspot.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export default class coinspot extends Exchange {
|
|
|
15
15
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
16
16
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
17
17
|
parseTrade(trade: any, market?: Market): Trade;
|
|
18
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
18
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<any>;
|
|
19
19
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
|
|
20
20
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
21
21
|
url: string;
|
package/js/src/cryptocom.d.ts
CHANGED
|
@@ -16,17 +16,17 @@ export default class cryptocom extends Exchange {
|
|
|
16
16
|
parseBalance(response: any): Balances;
|
|
17
17
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
18
18
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
19
|
-
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
20
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
19
|
+
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): any;
|
|
20
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
21
21
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
22
|
-
createAdvancedOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
22
|
+
createAdvancedOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): any;
|
|
23
23
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
|
|
24
24
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
25
25
|
cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<Order[]>;
|
|
26
26
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
27
27
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
28
28
|
parseAddress(addressString: any): any[];
|
|
29
|
-
withdraw(code: string, amount:
|
|
29
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
30
30
|
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
|
|
31
31
|
fetchDepositAddress(code: string, params?: {}): Promise<any>;
|
|
32
32
|
safeNetwork(networkId: any): string;
|
package/js/src/cryptocom.js
CHANGED
|
@@ -1070,10 +1070,10 @@ export default class cryptocom extends Exchange {
|
|
|
1070
1070
|
const isTakeProfitTrigger = (takeProfitPrice !== undefined);
|
|
1071
1071
|
if (isTrigger) {
|
|
1072
1072
|
request['ref_price'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1073
|
-
|
|
1073
|
+
const priceString = this.numberToString(price);
|
|
1074
1074
|
if ((uppercaseType === 'LIMIT') || (uppercaseType === 'STOP_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) {
|
|
1075
1075
|
if (side === 'buy') {
|
|
1076
|
-
if (Precise.stringLt(
|
|
1076
|
+
if (Precise.stringLt(priceString, triggerPrice)) {
|
|
1077
1077
|
request['type'] = 'TAKE_PROFIT_LIMIT';
|
|
1078
1078
|
}
|
|
1079
1079
|
else {
|
|
@@ -1081,7 +1081,7 @@ export default class cryptocom extends Exchange {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
else {
|
|
1084
|
-
if (Precise.stringLt(
|
|
1084
|
+
if (Precise.stringLt(priceString, triggerPrice)) {
|
|
1085
1085
|
request['type'] = 'STOP_LIMIT';
|
|
1086
1086
|
}
|
|
1087
1087
|
else {
|
|
@@ -1091,7 +1091,7 @@ export default class cryptocom extends Exchange {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
else {
|
|
1093
1093
|
if (side === 'buy') {
|
|
1094
|
-
if (Precise.stringLt(
|
|
1094
|
+
if (Precise.stringLt(priceString, triggerPrice)) {
|
|
1095
1095
|
request['type'] = 'TAKE_PROFIT';
|
|
1096
1096
|
}
|
|
1097
1097
|
else {
|
|
@@ -1099,7 +1099,7 @@ export default class cryptocom extends Exchange {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
1101
|
else {
|
|
1102
|
-
if (Precise.stringLt(
|
|
1102
|
+
if (Precise.stringLt(priceString, triggerPrice)) {
|
|
1103
1103
|
request['type'] = 'STOP_LOSS';
|
|
1104
1104
|
}
|
|
1105
1105
|
else {
|
|
@@ -1290,10 +1290,10 @@ export default class cryptocom extends Exchange {
|
|
|
1290
1290
|
const isStopLossTrigger = (stopLossPrice !== undefined);
|
|
1291
1291
|
const isTakeProfitTrigger = (takeProfitPrice !== undefined);
|
|
1292
1292
|
if (isTrigger) {
|
|
1293
|
-
|
|
1293
|
+
const priceString = this.numberToString(price);
|
|
1294
1294
|
if ((uppercaseType === 'LIMIT') || (uppercaseType === 'STOP_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) {
|
|
1295
1295
|
if (side === 'buy') {
|
|
1296
|
-
if (Precise.stringLt(
|
|
1296
|
+
if (Precise.stringLt(priceString, triggerPrice)) {
|
|
1297
1297
|
request['type'] = 'TAKE_PROFIT_LIMIT';
|
|
1298
1298
|
}
|
|
1299
1299
|
else {
|
|
@@ -1301,7 +1301,7 @@ export default class cryptocom extends Exchange {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
1303
|
else {
|
|
1304
|
-
if (Precise.stringLt(
|
|
1304
|
+
if (Precise.stringLt(priceString, triggerPrice)) {
|
|
1305
1305
|
request['type'] = 'STOP_LIMIT';
|
|
1306
1306
|
}
|
|
1307
1307
|
else {
|
|
@@ -1311,7 +1311,7 @@ export default class cryptocom extends Exchange {
|
|
|
1311
1311
|
}
|
|
1312
1312
|
else {
|
|
1313
1313
|
if (side === 'buy') {
|
|
1314
|
-
if (Precise.stringLt(
|
|
1314
|
+
if (Precise.stringLt(priceString, triggerPrice)) {
|
|
1315
1315
|
request['type'] = 'TAKE_PROFIT';
|
|
1316
1316
|
}
|
|
1317
1317
|
else {
|
|
@@ -1319,7 +1319,7 @@ export default class cryptocom extends Exchange {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
1321
|
else {
|
|
1322
|
-
if (Precise.stringLt(
|
|
1322
|
+
if (Precise.stringLt(priceString, triggerPrice)) {
|
|
1323
1323
|
request['type'] = 'STOP_LOSS';
|
|
1324
1324
|
}
|
|
1325
1325
|
else {
|
package/js/src/currencycom.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export default class currencycom extends Exchange {
|
|
|
27
27
|
parseOrderType(status: any): string;
|
|
28
28
|
parseOrderTimeInForce(status: any): string;
|
|
29
29
|
parseOrderSide(status: any): string;
|
|
30
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
30
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
31
31
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
32
32
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
33
33
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
@@ -35,7 +35,7 @@ export default class currencycom extends Exchange {
|
|
|
35
35
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
36
36
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
37
37
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
38
|
-
fetchTransactionsByMethod(method: any, code?: Str, since?: Int, limit?: Int, params?: {}): Promise<
|
|
38
|
+
fetchTransactionsByMethod(method: any, code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
39
39
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
40
40
|
parseTransactionStatus(status: any): string;
|
|
41
41
|
parseTransactionType(type: any): string;
|
package/js/src/delta.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export default class delta extends Exchange {
|
|
|
35
35
|
parsePosition(position: any, market?: Market): Position;
|
|
36
36
|
parseOrderStatus(status: any): string;
|
|
37
37
|
parseOrder(order: any, market?: Market): Order;
|
|
38
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
38
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
39
39
|
editOrder(id: string, symbol: any, type: any, side: any, amount?: any, price?: any, params?: {}): Promise<Order>;
|
|
40
40
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
41
41
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
|
|
@@ -154,7 +154,7 @@ export default class delta extends Exchange {
|
|
|
154
154
|
fetchOpenInterest(symbol: string, params?: {}): Promise<import("./base/types.js").OpenInterest>;
|
|
155
155
|
parseOpenInterest(interest: any, market?: Market): import("./base/types.js").OpenInterest;
|
|
156
156
|
fetchLeverage(symbol: string, params?: {}): Promise<any>;
|
|
157
|
-
setLeverage(leverage:
|
|
157
|
+
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
158
158
|
fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
159
159
|
parseSettlement(settlement: any, market: any): {
|
|
160
160
|
info: any;
|
package/js/src/deribit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/deribit.js';
|
|
2
|
-
import type { Balances, Currency, FundingRateHistory, Greeks, Int, Liquidation, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, MarketInterface } from './base/types.js';
|
|
2
|
+
import type { Balances, Currency, FundingRateHistory, Greeks, Int, Liquidation, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry, MarketInterface } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class deribit
|
|
5
5
|
* @augments Exchange
|
|
@@ -57,7 +57,7 @@ export default class deribit extends Exchange {
|
|
|
57
57
|
parseOrderType(orderType: any): string;
|
|
58
58
|
parseOrder(order: any, market?: Market): Order;
|
|
59
59
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
60
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
60
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
61
61
|
editOrder(id: string, symbol: any, type: any, side: any, amount?: any, price?: any, params?: {}): Promise<Order>;
|
|
62
62
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
63
63
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
|
|
@@ -75,17 +75,7 @@ export default class deribit extends Exchange {
|
|
|
75
75
|
fetchVolatilityHistory(code: string, params?: {}): Promise<any[]>;
|
|
76
76
|
parseVolatilityHistory(volatility: any): any[];
|
|
77
77
|
fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
78
|
-
transfer(code: string, amount:
|
|
79
|
-
info: any;
|
|
80
|
-
id: string;
|
|
81
|
-
status: string;
|
|
82
|
-
amount: number;
|
|
83
|
-
code: string;
|
|
84
|
-
fromAccount: string;
|
|
85
|
-
toAccount: string;
|
|
86
|
-
timestamp: number;
|
|
87
|
-
datetime: string;
|
|
88
|
-
}>;
|
|
78
|
+
transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
|
|
89
79
|
parseTransfer(transfer: any, currency?: Currency): {
|
|
90
80
|
info: any;
|
|
91
81
|
id: string;
|
|
@@ -98,7 +88,7 @@ export default class deribit extends Exchange {
|
|
|
98
88
|
datetime: string;
|
|
99
89
|
};
|
|
100
90
|
parseTransferStatus(status: any): string;
|
|
101
|
-
withdraw(code: string, amount:
|
|
91
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
102
92
|
parseDepositWithdrawFee(fee: any, currency?: Currency): {
|
|
103
93
|
info: any;
|
|
104
94
|
withdraw: {
|
package/js/src/digifinex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/digifinex.js';
|
|
2
|
-
import type { FundingRateHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Trade, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency } from './base/types.js';
|
|
2
|
+
import type { FundingRateHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Trade, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency, TransferEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class digifinex
|
|
5
5
|
* @augments Exchange
|
|
@@ -28,9 +28,9 @@ export default class digifinex extends Exchange {
|
|
|
28
28
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
29
29
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
30
30
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
31
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
31
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
32
32
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
33
|
-
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
33
|
+
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): any;
|
|
34
34
|
createMarketBuyOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
|
|
35
35
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
|
|
36
36
|
cancelOrders(ids: any, symbol?: Str, params?: {}): Promise<any>;
|
|
@@ -67,7 +67,7 @@ export default class digifinex extends Exchange {
|
|
|
67
67
|
network: any;
|
|
68
68
|
};
|
|
69
69
|
fetchDepositAddress(code: string, params?: {}): Promise<any>;
|
|
70
|
-
fetchTransactionsByType(type: any, code?: Str, since?: Int, limit?: Int, params?: {}): Promise<
|
|
70
|
+
fetchTransactionsByType(type: any, code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
71
71
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
72
72
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
73
73
|
parseTransactionStatus(status: any): string;
|
|
@@ -84,18 +84,8 @@ export default class digifinex extends Exchange {
|
|
|
84
84
|
toAccount: any;
|
|
85
85
|
status: string;
|
|
86
86
|
};
|
|
87
|
-
transfer(code: string, amount:
|
|
88
|
-
|
|
89
|
-
id: string;
|
|
90
|
-
timestamp: number;
|
|
91
|
-
datetime: string;
|
|
92
|
-
currency: string;
|
|
93
|
-
amount: number;
|
|
94
|
-
fromAccount: any;
|
|
95
|
-
toAccount: any;
|
|
96
|
-
status: string;
|
|
97
|
-
}>;
|
|
98
|
-
withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
87
|
+
transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
|
|
88
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
99
89
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
100
90
|
parseBorrowInterest(info: any, market?: Market): {
|
|
101
91
|
account: string;
|
|
@@ -116,7 +106,7 @@ export default class digifinex extends Exchange {
|
|
|
116
106
|
datetime: string;
|
|
117
107
|
info: any;
|
|
118
108
|
}>;
|
|
119
|
-
fetchCrossBorrowRates(params?: {}): Promise<
|
|
109
|
+
fetchCrossBorrowRates(params?: {}): Promise<any>;
|
|
120
110
|
parseBorrowRate(info: any, currency?: Currency): {
|
|
121
111
|
currency: string;
|
|
122
112
|
rate: number;
|
|
@@ -125,26 +115,8 @@ export default class digifinex extends Exchange {
|
|
|
125
115
|
datetime: string;
|
|
126
116
|
info: any;
|
|
127
117
|
};
|
|
128
|
-
parseBorrowRates(info: any, codeKey: any):
|
|
129
|
-
fetchFundingRate(symbol: string, params?: {}): Promise<
|
|
130
|
-
info: any;
|
|
131
|
-
symbol: string;
|
|
132
|
-
markPrice: any;
|
|
133
|
-
indexPrice: any;
|
|
134
|
-
interestRate: any;
|
|
135
|
-
estimatedSettlePrice: any;
|
|
136
|
-
timestamp: any;
|
|
137
|
-
datetime: any;
|
|
138
|
-
fundingRate: number;
|
|
139
|
-
fundingTimestamp: number;
|
|
140
|
-
fundingDatetime: string;
|
|
141
|
-
nextFundingRate: string;
|
|
142
|
-
nextFundingTimestamp: number;
|
|
143
|
-
nextFundingDatetime: string;
|
|
144
|
-
previousFundingRate: any;
|
|
145
|
-
previousFundingTimestamp: any;
|
|
146
|
-
previousFundingDatetime: any;
|
|
147
|
-
}>;
|
|
118
|
+
parseBorrowRates(info: any, codeKey: any): any;
|
|
119
|
+
fetchFundingRate(symbol: string, params?: {}): Promise<any>;
|
|
148
120
|
parseFundingRate(contract: any, market?: Market): {
|
|
149
121
|
info: any;
|
|
150
122
|
symbol: string;
|
|
@@ -180,7 +152,7 @@ export default class digifinex extends Exchange {
|
|
|
180
152
|
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
181
153
|
fetchPosition(symbol: string, params?: {}): Promise<import("./base/types.js").Position>;
|
|
182
154
|
parsePosition(position: any, market?: Market): import("./base/types.js").Position;
|
|
183
|
-
setLeverage(leverage:
|
|
155
|
+
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
184
156
|
fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
185
157
|
fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<{}>;
|
|
186
158
|
parseLeverageTiers(response: any, symbols?: Strings, marketIdKey?: any): {};
|
package/js/src/exmo.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export default class exmo extends Exchange {
|
|
|
63
63
|
parseTrade(trade: any, market?: Market): Trade;
|
|
64
64
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
65
65
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
66
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
66
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
67
67
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
68
68
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
69
69
|
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
@@ -81,7 +81,7 @@ export default class exmo extends Exchange {
|
|
|
81
81
|
info: any;
|
|
82
82
|
}>;
|
|
83
83
|
getMarketFromTrades(trades: any): any;
|
|
84
|
-
withdraw(code: string, amount:
|
|
84
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
85
85
|
parseTransactionStatus(status: any): string;
|
|
86
86
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
87
87
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
package/js/src/gate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/gate.js';
|
|
2
|
-
import type { Int, OrderSide, OrderType, OHLCV, Trade, FundingRateHistory, OpenInterest, Order, Balances, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Tickers, Greeks, Strings, Market, Currency, MarketInterface } from './base/types.js';
|
|
2
|
+
import type { Int, OrderSide, OrderType, OHLCV, Trade, FundingRateHistory, OpenInterest, Order, Balances, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Tickers, Greeks, Strings, Market, Currency, MarketInterface, TransferEntry } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class gate
|
|
5
5
|
* @augments Exchange
|
|
@@ -175,13 +175,13 @@ export default class gate extends Exchange {
|
|
|
175
175
|
parseTrade(trade: any, market?: Market): Trade;
|
|
176
176
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
177
177
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
178
|
-
withdraw(code: string, amount:
|
|
178
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
179
179
|
parseTransactionStatus(status: any): string;
|
|
180
180
|
parseTransactionType(type: any): string;
|
|
181
181
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
182
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
182
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
183
183
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
184
|
-
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
184
|
+
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): any;
|
|
185
185
|
createMarketBuyOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
|
|
186
186
|
editOrder(id: string, symbol: any, type: any, side: any, amount?: any, price?: any, params?: {}): Promise<Order>;
|
|
187
187
|
parseOrderStatus(status: any): string;
|
|
@@ -192,17 +192,7 @@ export default class gate extends Exchange {
|
|
|
192
192
|
fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
193
193
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
194
194
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
195
|
-
transfer(code: string, amount:
|
|
196
|
-
id: string;
|
|
197
|
-
timestamp: any;
|
|
198
|
-
datetime: any;
|
|
199
|
-
currency: string;
|
|
200
|
-
amount: any;
|
|
201
|
-
fromAccount: any;
|
|
202
|
-
toAccount: any;
|
|
203
|
-
status: any;
|
|
204
|
-
info: any;
|
|
205
|
-
}>;
|
|
195
|
+
transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
|
|
206
196
|
parseTransfer(transfer: any, currency?: Currency): {
|
|
207
197
|
id: string;
|
|
208
198
|
timestamp: any;
|
|
@@ -214,7 +204,7 @@ export default class gate extends Exchange {
|
|
|
214
204
|
status: any;
|
|
215
205
|
info: any;
|
|
216
206
|
};
|
|
217
|
-
setLeverage(leverage:
|
|
207
|
+
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
218
208
|
parsePosition(position: any, market?: Market): import("./base/types.js").Position;
|
|
219
209
|
fetchPosition(symbol: string, params?: {}): Promise<import("./base/types.js").Position>;
|
|
220
210
|
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
@@ -240,7 +230,7 @@ export default class gate extends Exchange {
|
|
|
240
230
|
datetime: string;
|
|
241
231
|
info: any;
|
|
242
232
|
}>;
|
|
243
|
-
borrowIsolatedMargin(symbol: string, code: string, amount:
|
|
233
|
+
borrowIsolatedMargin(symbol: string, code: string, amount: number, params?: {}): Promise<{
|
|
244
234
|
id: number;
|
|
245
235
|
currency: string;
|
|
246
236
|
amount: number;
|
|
@@ -249,7 +239,7 @@ export default class gate extends Exchange {
|
|
|
249
239
|
datetime: string;
|
|
250
240
|
info: any;
|
|
251
241
|
}>;
|
|
252
|
-
borrowCrossMargin(code: string, amount:
|
|
242
|
+
borrowCrossMargin(code: string, amount: number, params?: {}): Promise<{
|
|
253
243
|
id: number;
|
|
254
244
|
currency: string;
|
|
255
245
|
amount: number;
|
package/js/src/gate.js
CHANGED
|
@@ -1621,32 +1621,34 @@ export default class gate extends Exchange {
|
|
|
1621
1621
|
let withdrawAvailable = this.safeValue(result[code], 'withdraw');
|
|
1622
1622
|
withdrawAvailable = (withdrawEnabled) ? withdrawEnabled : withdrawAvailable;
|
|
1623
1623
|
const networks = this.safeValue(result[code], 'networks', {});
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
'
|
|
1637
|
-
'
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
'
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
'
|
|
1646
|
-
|
|
1624
|
+
if (networkCode !== undefined) {
|
|
1625
|
+
networks[networkCode] = {
|
|
1626
|
+
'info': entry,
|
|
1627
|
+
'id': networkId,
|
|
1628
|
+
'network': networkCode,
|
|
1629
|
+
'currencyId': currencyId,
|
|
1630
|
+
'lowerCaseCurrencyId': currencyIdLower,
|
|
1631
|
+
'deposit': depositEnabled,
|
|
1632
|
+
'withdraw': withdrawEnabled,
|
|
1633
|
+
'active': active,
|
|
1634
|
+
'fee': undefined,
|
|
1635
|
+
'precision': this.parseNumber('1e-4'),
|
|
1636
|
+
'limits': {
|
|
1637
|
+
'amount': {
|
|
1638
|
+
'min': undefined,
|
|
1639
|
+
'max': undefined,
|
|
1640
|
+
},
|
|
1641
|
+
'withdraw': {
|
|
1642
|
+
'min': undefined,
|
|
1643
|
+
'max': undefined,
|
|
1644
|
+
},
|
|
1645
|
+
'deposit': {
|
|
1646
|
+
'min': undefined,
|
|
1647
|
+
'max': undefined,
|
|
1648
|
+
},
|
|
1647
1649
|
},
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1650
1652
|
result[code]['networks'] = networks;
|
|
1651
1653
|
const info = this.safeValue(result[code], 'info', []);
|
|
1652
1654
|
info.push(entry);
|
|
@@ -2602,6 +2604,7 @@ export default class gate extends Exchange {
|
|
|
2602
2604
|
const [type, query] = this.handleMarketTypeAndParams('fetchTickers', market, params);
|
|
2603
2605
|
const [request, requestParams] = this.prepareRequest(undefined, type, query);
|
|
2604
2606
|
let response = undefined;
|
|
2607
|
+
request['timezone'] = 'utc0'; // default to utc
|
|
2605
2608
|
if (type === 'spot' || type === 'margin') {
|
|
2606
2609
|
response = await this.publicSpotGetTickers(this.extend(request, requestParams));
|
|
2607
2610
|
}
|
|
@@ -2619,7 +2622,7 @@ export default class gate extends Exchange {
|
|
|
2619
2622
|
response = await this.publicOptionsGetTickers(this.extend(request, requestParams));
|
|
2620
2623
|
}
|
|
2621
2624
|
else {
|
|
2622
|
-
throw new NotSupported(this.id + ' fetchTickers() not support this market type');
|
|
2625
|
+
throw new NotSupported(this.id + ' fetchTickers() not support this market type, provide symbols or set params["defaultType"] to one from spot/margin/swap/future/option');
|
|
2623
2626
|
}
|
|
2624
2627
|
return this.parseTickers(response, symbols);
|
|
2625
2628
|
}
|
|
@@ -5190,16 +5193,17 @@ export default class gate extends Exchange {
|
|
|
5190
5193
|
const defaultMarginMode = this.safeString2(this.options, 'marginMode', 'defaultMarginMode');
|
|
5191
5194
|
const crossLeverageLimit = this.safeString(query, 'cross_leverage_limit');
|
|
5192
5195
|
let marginMode = this.safeString(query, 'marginMode', defaultMarginMode);
|
|
5196
|
+
let stringifiedMargin = this.numberToString(leverage);
|
|
5193
5197
|
if (crossLeverageLimit !== undefined) {
|
|
5194
5198
|
marginMode = 'cross';
|
|
5195
|
-
|
|
5199
|
+
stringifiedMargin = crossLeverageLimit;
|
|
5196
5200
|
}
|
|
5197
5201
|
if (marginMode === 'cross' || marginMode === 'cross_margin') {
|
|
5198
|
-
request['cross_leverage_limit'] =
|
|
5202
|
+
request['cross_leverage_limit'] = stringifiedMargin;
|
|
5199
5203
|
request['leverage'] = '0';
|
|
5200
5204
|
}
|
|
5201
5205
|
else {
|
|
5202
|
-
request['leverage'] =
|
|
5206
|
+
request['leverage'] = stringifiedMargin;
|
|
5203
5207
|
}
|
|
5204
5208
|
let response = undefined;
|
|
5205
5209
|
if (market['swap']) {
|
|
@@ -6934,6 +6938,7 @@ export default class gate extends Exchange {
|
|
|
6934
6938
|
return this.parseGreeks(entry, market);
|
|
6935
6939
|
}
|
|
6936
6940
|
}
|
|
6941
|
+
return undefined;
|
|
6937
6942
|
}
|
|
6938
6943
|
parseGreeks(greeks, market = undefined) {
|
|
6939
6944
|
//
|
package/js/src/gemini.d.ts
CHANGED
|
@@ -29,10 +29,10 @@ export default class gemini extends Exchange {
|
|
|
29
29
|
parseOrder(order: any, market?: Market): Order;
|
|
30
30
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
31
31
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
32
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
32
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
33
33
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
34
34
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
35
|
-
withdraw(code: string, amount:
|
|
35
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
36
36
|
nonce(): number;
|
|
37
37
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
38
38
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
package/js/src/hitbtc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/hitbtc.js';
|
|
2
|
-
import type { Int, OrderSide, OrderType, FundingRateHistory, OHLCV, Ticker, Order, OrderBook, Dictionary, Position, Str, Trade, Balances, Transaction, MarginMode, Tickers, Strings, Market, Currency } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, OrderType, FundingRateHistory, OHLCV, Ticker, Order, OrderBook, Dictionary, Position, Str, Trade, Balances, Transaction, MarginMode, Tickers, Strings, Market, Currency } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class hitbtc
|
|
5
5
|
* @augments Exchange
|
|
@@ -33,7 +33,7 @@ export default class hitbtc extends Exchange {
|
|
|
33
33
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
34
34
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
35
35
|
parseTrade(trade: any, market?: Market): Trade;
|
|
36
|
-
fetchTransactionsHelper(types: any, code: any, since: any, limit: any, params: any): Promise<
|
|
36
|
+
fetchTransactionsHelper(types: any, code: any, since: any, limit: any, params: any): Promise<Transaction[]>;
|
|
37
37
|
parseTransactionStatus(status: any): string;
|
|
38
38
|
parseTransactionType(type: any): string;
|
|
39
39
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
@@ -65,22 +65,12 @@ export default class hitbtc extends Exchange {
|
|
|
65
65
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
66
66
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
67
67
|
editOrder(id: string, symbol: any, type: any, side: any, amount?: any, price?: any, params?: {}): Promise<Order>;
|
|
68
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
68
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
69
69
|
createOrderRequest(market: object, marketType: string, type: OrderType, side: OrderSide, amount: any, price?: any, marginMode?: Str, params?: {}): {}[];
|
|
70
70
|
parseOrderStatus(status: any): string;
|
|
71
71
|
parseOrder(order: any, market?: Market): Order;
|
|
72
72
|
fetchMarginMode(symbol?: Str, params?: {}): Promise<MarginMode>;
|
|
73
|
-
transfer(code: string, amount:
|
|
74
|
-
id: string;
|
|
75
|
-
timestamp: any;
|
|
76
|
-
datetime: any;
|
|
77
|
-
currency: string;
|
|
78
|
-
amount: any;
|
|
79
|
-
fromAccount: any;
|
|
80
|
-
toAccount: any;
|
|
81
|
-
status: any;
|
|
82
|
-
info: any;
|
|
83
|
-
}>;
|
|
73
|
+
transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
|
|
84
74
|
parseTransfer(transfer: any, currency?: Currency): {
|
|
85
75
|
id: string;
|
|
86
76
|
timestamp: any;
|
|
@@ -95,7 +85,7 @@ export default class hitbtc extends Exchange {
|
|
|
95
85
|
convertCurrencyNetwork(code: string, amount: any, fromNetwork: any, toNetwork: any, params: any): Promise<{
|
|
96
86
|
info: any;
|
|
97
87
|
}>;
|
|
98
|
-
withdraw(code: string, amount:
|
|
88
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
99
89
|
fetchFundingRates(symbols?: Strings, params?: {}): Promise<any>;
|
|
100
90
|
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
|
|
101
91
|
fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
|
|
@@ -153,7 +143,7 @@ export default class hitbtc extends Exchange {
|
|
|
153
143
|
reduceMargin(symbol: string, amount: any, params?: {}): Promise<any>;
|
|
154
144
|
addMargin(symbol: string, amount: any, params?: {}): Promise<any>;
|
|
155
145
|
fetchLeverage(symbol: string, params?: {}): Promise<number>;
|
|
156
|
-
setLeverage(leverage:
|
|
146
|
+
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
157
147
|
fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
|
|
158
148
|
parseDepositWithdrawFee(fee: any, currency?: Currency): any;
|
|
159
149
|
closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
|
package/js/src/hollaex.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export default class hollaex extends Exchange {
|
|
|
28
28
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
29
29
|
parseOrderStatus(status: any): string;
|
|
30
30
|
parseOrder(order: any, market?: Market): Order;
|
|
31
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount:
|
|
31
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
|
|
32
32
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
33
33
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
34
34
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
@@ -44,7 +44,7 @@ export default class hollaex extends Exchange {
|
|
|
44
44
|
fetchWithdrawal(id: string, code?: Str, params?: {}): Promise<Transaction>;
|
|
45
45
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
46
46
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
47
|
-
withdraw(code: string, amount:
|
|
47
|
+
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
48
48
|
parseDepositWithdrawFee(fee: any, currency?: Currency): {
|
|
49
49
|
info: any;
|
|
50
50
|
withdraw: {
|