ccxt 4.3.30 → 4.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +14 -0
- package/dist/cjs/src/binance.js +14 -1
- package/dist/cjs/src/bitfinex2.js +100 -58
- package/dist/cjs/src/bitmart.js +3 -3
- package/dist/cjs/src/bitmex.js +1 -1
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinex.js +153 -126
- package/dist/cjs/src/gate.js +3 -3
- package/dist/cjs/src/hyperliquid.js +1 -1
- package/dist/cjs/src/kraken.js +2 -7
- package/dist/cjs/src/mexc.js +5 -5
- package/dist/cjs/src/poloniexfutures.js +8 -3
- package/dist/cjs/src/pro/bingx.js +1 -1
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/coinbase.js +31 -0
- package/dist/cjs/src/pro/mexc.js +7 -7
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +2 -0
- package/js/src/abstract/binancecoinm.d.ts +2 -0
- package/js/src/abstract/binanceus.d.ts +2 -0
- package/js/src/abstract/binanceusdm.d.ts +2 -0
- package/js/src/ace.d.ts +3 -3
- package/js/src/alpaca.d.ts +5 -5
- package/js/src/ascendex.d.ts +12 -23
- package/js/src/base/Exchange.d.ts +39 -37
- package/js/src/base/Exchange.js +14 -0
- package/js/src/base/functions/type.d.ts +9 -9
- package/js/src/base/types.d.ts +2 -0
- package/js/src/bigone.d.ts +4 -4
- package/js/src/binance.d.ts +20 -23
- package/js/src/binance.js +14 -1
- package/js/src/bingx.d.ts +8 -19
- package/js/src/bit2c.d.ts +2 -2
- package/js/src/bitbank.d.ts +4 -4
- package/js/src/bitbns.d.ts +3 -3
- package/js/src/bitfinex.d.ts +4 -4
- package/js/src/bitfinex2.d.ts +8 -8
- package/js/src/bitfinex2.js +100 -58
- package/js/src/bitflyer.d.ts +4 -4
- package/js/src/bitget.d.ts +14 -25
- package/js/src/bithumb.d.ts +4 -4
- package/js/src/bitmart.d.ts +8 -8
- package/js/src/bitmart.js +3 -3
- package/js/src/bitmex.d.ts +10 -21
- package/js/src/bitmex.js +1 -1
- package/js/src/bitopro.d.ts +4 -4
- package/js/src/bitrue.d.ts +5 -16
- package/js/src/bitso.d.ts +8 -8
- package/js/src/bitstamp.d.ts +11 -13
- package/js/src/bitteam.d.ts +4 -4
- package/js/src/bitvavo.d.ts +8 -19
- package/js/src/bl3p.d.ts +1 -1
- package/js/src/blockchaincom.d.ts +4 -6
- package/js/src/blofin.d.ts +11 -11
- package/js/src/btcalpha.d.ts +4 -4
- package/js/src/btcbox.d.ts +3 -3
- package/js/src/btcmarkets.d.ts +4 -4
- package/js/src/btcturk.d.ts +3 -3
- package/js/src/bybit.d.ts +19 -33
- package/js/src/cex.d.ts +3 -3
- package/js/src/coinbase.d.ts +11 -13
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbaseexchange.d.ts +6 -6
- package/js/src/coinbaseinternational.d.ts +10 -10
- package/js/src/coincheck.d.ts +3 -3
- package/js/src/coinex.d.ts +14 -14
- package/js/src/coinex.js +153 -126
- package/js/src/coinlist.d.ts +6 -6
- package/js/src/coinmate.d.ts +5 -5
- package/js/src/coinmetro.d.ts +5 -11
- package/js/src/coinone.d.ts +4 -4
- package/js/src/coinsph.d.ts +5 -5
- package/js/src/coinspot.d.ts +1 -1
- package/js/src/cryptocom.d.ts +10 -21
- package/js/src/currencycom.d.ts +6 -22
- package/js/src/delta.d.ts +8 -8
- package/js/src/deribit.d.ts +6 -6
- package/js/src/digifinex.d.ts +16 -16
- package/js/src/exmo.d.ts +6 -6
- package/js/src/gate.d.ts +17 -28
- package/js/src/gate.js +3 -3
- package/js/src/gemini.d.ts +4 -4
- package/js/src/hitbtc.d.ts +8 -8
- package/js/src/hollaex.d.ts +6 -17
- package/js/src/htx.d.ts +15 -15
- package/js/src/huobijp.d.ts +5 -5
- package/js/src/hyperliquid.d.ts +4 -4
- package/js/src/hyperliquid.js +1 -1
- package/js/src/idex.d.ts +4 -4
- package/js/src/independentreserve.d.ts +3 -3
- package/js/src/indodax.d.ts +5 -7
- package/js/src/kraken.d.ts +7 -7
- package/js/src/kraken.js +2 -7
- package/js/src/krakenfutures.d.ts +9 -9
- package/js/src/kucoin.d.ts +11 -22
- package/js/src/kucoinfutures.d.ts +6 -6
- package/js/src/kuna.d.ts +7 -7
- package/js/src/latoken.d.ts +5 -5
- package/js/src/lbank.d.ts +10 -10
- package/js/src/luno.d.ts +3 -3
- package/js/src/lykke.d.ts +4 -4
- package/js/src/mercado.d.ts +4 -4
- package/js/src/mexc.d.ts +12 -12
- package/js/src/mexc.js +5 -5
- package/js/src/ndax.d.ts +6 -6
- package/js/src/novadax.d.ts +4 -4
- package/js/src/oceanex.d.ts +4 -4
- package/js/src/okcoin.d.ts +6 -6
- package/js/src/okx.d.ts +18 -24
- package/js/src/onetrading.d.ts +7 -7
- package/js/src/p2b.d.ts +3 -3
- package/js/src/paymium.d.ts +3 -3
- package/js/src/phemex.d.ts +11 -11
- package/js/src/poloniex.d.ts +6 -6
- package/js/src/poloniexfutures.d.ts +4 -4
- package/js/src/poloniexfutures.js +8 -3
- package/js/src/pro/bingx.js +1 -1
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coinbase.d.ts +2 -2
- package/js/src/pro/coinbase.js +31 -0
- package/js/src/pro/mexc.js +7 -7
- package/js/src/pro/phemex.d.ts +3 -45
- package/js/src/probit.d.ts +5 -5
- package/js/src/timex.d.ts +6 -6
- package/js/src/tokocrypto.d.ts +4 -4
- package/js/src/tradeogre.d.ts +3 -3
- package/js/src/upbit.d.ts +5 -5
- package/js/src/wavesexchange.d.ts +4 -4
- package/js/src/wazirx.d.ts +4 -4
- package/js/src/whitebit.d.ts +11 -11
- package/js/src/woo.d.ts +8 -8
- package/js/src/woofipro.d.ts +10 -10
- package/js/src/yobit.d.ts +3 -3
- package/js/src/zaif.d.ts +3 -3
- package/js/src/zonda.d.ts +6 -6
- package/package.json +1 -1
|
@@ -518,6 +518,7 @@ interface binance {
|
|
|
518
518
|
fapiPrivateGetOrderAsynId(params?: {}): Promise<implicitReturnType>;
|
|
519
519
|
fapiPrivateGetTradeAsyn(params?: {}): Promise<implicitReturnType>;
|
|
520
520
|
fapiPrivateGetTradeAsynId(params?: {}): Promise<implicitReturnType>;
|
|
521
|
+
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
521
522
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
522
523
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
523
524
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -529,6 +530,7 @@ interface binance {
|
|
|
529
530
|
fapiPrivatePostMultiAssetsMargin(params?: {}): Promise<implicitReturnType>;
|
|
530
531
|
fapiPrivatePostApiReferralCustomization(params?: {}): Promise<implicitReturnType>;
|
|
531
532
|
fapiPrivatePostApiReferralUserCustomization(params?: {}): Promise<implicitReturnType>;
|
|
533
|
+
fapiPrivatePostFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
532
534
|
fapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
533
535
|
fapiPrivatePutOrder(params?: {}): Promise<implicitReturnType>;
|
|
534
536
|
fapiPrivatePutBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -570,6 +570,7 @@ interface binance {
|
|
|
570
570
|
fapiPrivateGetOrderAsynId(params?: {}): Promise<implicitReturnType>;
|
|
571
571
|
fapiPrivateGetTradeAsyn(params?: {}): Promise<implicitReturnType>;
|
|
572
572
|
fapiPrivateGetTradeAsynId(params?: {}): Promise<implicitReturnType>;
|
|
573
|
+
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
573
574
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
574
575
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
575
576
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -581,6 +582,7 @@ interface binance {
|
|
|
581
582
|
fapiPrivatePostMultiAssetsMargin(params?: {}): Promise<implicitReturnType>;
|
|
582
583
|
fapiPrivatePostApiReferralCustomization(params?: {}): Promise<implicitReturnType>;
|
|
583
584
|
fapiPrivatePostApiReferralUserCustomization(params?: {}): Promise<implicitReturnType>;
|
|
585
|
+
fapiPrivatePostFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
584
586
|
fapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
585
587
|
fapiPrivatePutOrder(params?: {}): Promise<implicitReturnType>;
|
|
586
588
|
fapiPrivatePutBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -518,6 +518,7 @@ interface binance {
|
|
|
518
518
|
fapiPrivateGetOrderAsynId(params?: {}): Promise<implicitReturnType>;
|
|
519
519
|
fapiPrivateGetTradeAsyn(params?: {}): Promise<implicitReturnType>;
|
|
520
520
|
fapiPrivateGetTradeAsynId(params?: {}): Promise<implicitReturnType>;
|
|
521
|
+
fapiPrivateGetFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
521
522
|
fapiPrivatePostBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
522
523
|
fapiPrivatePostPositionSideDual(params?: {}): Promise<implicitReturnType>;
|
|
523
524
|
fapiPrivatePostPositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
@@ -529,6 +530,7 @@ interface binance {
|
|
|
529
530
|
fapiPrivatePostMultiAssetsMargin(params?: {}): Promise<implicitReturnType>;
|
|
530
531
|
fapiPrivatePostApiReferralCustomization(params?: {}): Promise<implicitReturnType>;
|
|
531
532
|
fapiPrivatePostApiReferralUserCustomization(params?: {}): Promise<implicitReturnType>;
|
|
533
|
+
fapiPrivatePostFeeBurn(params?: {}): Promise<implicitReturnType>;
|
|
532
534
|
fapiPrivatePutListenKey(params?: {}): Promise<implicitReturnType>;
|
|
533
535
|
fapiPrivatePutOrder(params?: {}): Promise<implicitReturnType>;
|
|
534
536
|
fapiPrivatePutBatchOrders(params?: {}): Promise<implicitReturnType>;
|
package/js/src/ace.d.ts
CHANGED
|
@@ -14,13 +14,13 @@ export default class ace extends Exchange {
|
|
|
14
14
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
15
15
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
16
16
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
17
|
-
parseOrderStatus(status:
|
|
18
|
-
parseOrder(order:
|
|
17
|
+
parseOrderStatus(status: Str): string;
|
|
18
|
+
parseOrder(order: Dict, market?: Market): Order;
|
|
19
19
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
20
20
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
|
|
21
21
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
22
22
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
23
|
-
parseTrade(trade:
|
|
23
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
24
24
|
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
25
25
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
26
26
|
parseBalance(response: any): Balances;
|
package/js/src/alpaca.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/alpaca.js';
|
|
2
|
-
import type { Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Trade } from './base/types.js';
|
|
2
|
+
import type { Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Trade } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class alpaca
|
|
5
5
|
* @augments Exchange
|
|
@@ -20,10 +20,10 @@ export default class alpaca extends Exchange {
|
|
|
20
20
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
21
21
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
22
22
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
23
|
-
parseOrder(order:
|
|
24
|
-
parseOrderStatus(status:
|
|
25
|
-
parseTimeInForce(timeInForce:
|
|
26
|
-
parseTrade(trade:
|
|
23
|
+
parseOrder(order: Dict, market?: Market): Order;
|
|
24
|
+
parseOrderStatus(status: Str): string;
|
|
25
|
+
parseTimeInForce(timeInForce: Str): string;
|
|
26
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
27
27
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
28
28
|
url: string;
|
|
29
29
|
method: string;
|
package/js/src/ascendex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/ascendex.js';
|
|
2
|
-
import type { TransferEntry, FundingHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Strings, Num, Currency, Market, Leverage, Leverages, Account, MarginModes, MarginMode, MarginModification, Currencies, TradingFees, Dict } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, FundingHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Strings, Num, Currency, Market, Leverage, Leverages, Account, MarginModes, MarginMode, MarginModification, Currencies, TradingFees, Dict, LeverageTier, LeverageTiers } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class ascendex
|
|
5
5
|
* @augments Exchange
|
|
@@ -21,10 +21,10 @@ export default class ascendex extends Exchange {
|
|
|
21
21
|
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
22
22
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
23
23
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
24
|
-
parseTrade(trade:
|
|
24
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
25
25
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
26
|
-
parseOrderStatus(status:
|
|
27
|
-
parseOrder(order:
|
|
26
|
+
parseOrderStatus(status: Str): string;
|
|
27
|
+
parseOrder(order: Dict, market?: Market): Order;
|
|
28
28
|
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
29
29
|
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
|
|
30
30
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
@@ -47,9 +47,9 @@ export default class ascendex extends Exchange {
|
|
|
47
47
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
48
48
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
49
49
|
parseTransactionStatus(status: any): string;
|
|
50
|
-
parseTransaction(transaction:
|
|
50
|
+
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
51
51
|
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
52
|
-
parsePosition(position:
|
|
52
|
+
parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
|
|
53
53
|
parseFundingRate(contract: any, market?: Market): {
|
|
54
54
|
info: any;
|
|
55
55
|
symbol: string;
|
|
@@ -76,20 +76,9 @@ export default class ascendex extends Exchange {
|
|
|
76
76
|
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
77
77
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
78
78
|
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
|
|
79
|
-
fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<
|
|
80
|
-
parseMarketLeverageTiers(info: any, market?: Market):
|
|
81
|
-
parseDepositWithdrawFee(fee: any, currency?: Currency):
|
|
82
|
-
info: any;
|
|
83
|
-
withdraw: {
|
|
84
|
-
fee: any;
|
|
85
|
-
percentage: any;
|
|
86
|
-
};
|
|
87
|
-
deposit: {
|
|
88
|
-
fee: any;
|
|
89
|
-
percentage: any;
|
|
90
|
-
};
|
|
91
|
-
networks: {};
|
|
92
|
-
};
|
|
79
|
+
fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<LeverageTiers>;
|
|
80
|
+
parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
|
|
81
|
+
parseDepositWithdrawFee(fee: any, currency?: Currency): Dict;
|
|
93
82
|
fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
|
|
94
83
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
95
84
|
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
|
@@ -104,9 +93,9 @@ export default class ascendex extends Exchange {
|
|
|
104
93
|
id: any;
|
|
105
94
|
amount: number;
|
|
106
95
|
};
|
|
107
|
-
fetchMarginModes(symbols?:
|
|
108
|
-
parseMarginMode(marginMode:
|
|
109
|
-
fetchLeverages(symbols?:
|
|
96
|
+
fetchMarginModes(symbols?: Strings, params?: {}): Promise<MarginModes>;
|
|
97
|
+
parseMarginMode(marginMode: Dict, market?: any): MarginMode;
|
|
98
|
+
fetchLeverages(symbols?: Strings, params?: {}): Promise<Leverages>;
|
|
110
99
|
parseLeverage(leverage: Dict, market?: Market): Leverage;
|
|
111
100
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
112
101
|
url: string;
|
|
@@ -3,8 +3,8 @@ import { // eslint-disable-line object-curly-newline
|
|
|
3
3
|
ExchangeError, AuthenticationError, DDoSProtection, RequestTimeout, ExchangeNotAvailable, RateLimitExceeded } from "./errors.js";
|
|
4
4
|
import WsClient from './ws/WsClient.js';
|
|
5
5
|
import { OrderBook as WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ws/OrderBook.js';
|
|
6
|
-
import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CancellationRequest, IsolatedBorrowRate, IsolatedBorrowRates, CrossBorrowRates, CrossBorrowRate, Dict, TransferEntries, FundingRates } from './types.js';
|
|
7
|
-
export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, Conversion } from './types.js';
|
|
6
|
+
import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CancellationRequest, IsolatedBorrowRate, IsolatedBorrowRates, CrossBorrowRates, CrossBorrowRate, Dict, TransferEntries, FundingRates, LeverageTiers, Bool } from './types.js';
|
|
7
|
+
export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, Bool, OrderType, OrderSide, Position, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, Conversion } from './types.js';
|
|
8
8
|
import { ArrayCache, ArrayCacheByTimestamp } from './ws/Cache.js';
|
|
9
9
|
import { OrderBook as Ob } from './ws/OrderBook.js';
|
|
10
10
|
/**
|
|
@@ -250,7 +250,7 @@ export default class Exchange {
|
|
|
250
250
|
binaryToBase58: (data: Uint8Array) => string;
|
|
251
251
|
base58ToBinary: (str: string) => Uint8Array;
|
|
252
252
|
base64ToBinary: (str: string) => Uint8Array;
|
|
253
|
-
safeTimestamp2: (o: any, k1: IndexType, k2: IndexType, $default?:
|
|
253
|
+
safeTimestamp2: (o: any, k1: IndexType, k2: IndexType, $default?: number) => number;
|
|
254
254
|
rawencode: (object: object) => string;
|
|
255
255
|
keysort: (x: Dictionary<any>, out?: Dictionary<any>) => Dictionary<any>;
|
|
256
256
|
inArray: (needle: any, haystack: any[]) => boolean;
|
|
@@ -695,37 +695,37 @@ export default class Exchange {
|
|
|
695
695
|
watchOrdersForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
696
696
|
watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: {}): Promise<Dictionary<Dictionary<OHLCV[]>>>;
|
|
697
697
|
watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
|
|
698
|
-
fetchDepositAddresses(codes?:
|
|
698
|
+
fetchDepositAddresses(codes?: Strings, params?: {}): Promise<{}>;
|
|
699
699
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
700
700
|
fetchMarginMode(symbol: string, params?: {}): Promise<MarginMode>;
|
|
701
|
-
fetchMarginModes(symbols?:
|
|
701
|
+
fetchMarginModes(symbols?: Strings, params?: {}): Promise<MarginModes>;
|
|
702
702
|
fetchRestOrderBookSafe(symbol: any, limit?: any, params?: {}): Promise<OrderBook>;
|
|
703
703
|
watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
704
704
|
fetchTime(params?: {}): Promise<Int>;
|
|
705
|
-
fetchTradingLimits(symbols?:
|
|
705
|
+
fetchTradingLimits(symbols?: Strings, params?: {}): Promise<{}>;
|
|
706
706
|
parseMarket(market: any): Market;
|
|
707
707
|
parseMarkets(markets: any): Market[];
|
|
708
708
|
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
709
709
|
parseDepositAddress(depositAddress: any, currency?: Currency): object;
|
|
710
|
-
parseTrade(trade:
|
|
711
|
-
parseTransaction(transaction:
|
|
710
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
711
|
+
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
712
712
|
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
|
713
713
|
parseAccount(account: any): Account;
|
|
714
|
-
parseLedgerEntry(item:
|
|
715
|
-
parseOrder(order:
|
|
714
|
+
parseLedgerEntry(item: Dict, currency?: Currency): object;
|
|
715
|
+
parseOrder(order: Dict, market?: Market): Order;
|
|
716
716
|
fetchCrossBorrowRates(params?: {}): Promise<CrossBorrowRates>;
|
|
717
717
|
fetchIsolatedBorrowRates(params?: {}): Promise<IsolatedBorrowRates>;
|
|
718
|
-
parseMarketLeverageTiers(info: any, market?: Market):
|
|
719
|
-
fetchLeverageTiers(symbols?:
|
|
720
|
-
parsePosition(position:
|
|
718
|
+
parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
|
|
719
|
+
fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<LeverageTiers>;
|
|
720
|
+
parsePosition(position: Dict, market?: Market): Position;
|
|
721
721
|
parseFundingRateHistory(info: any, market?: Market): FundingRateHistory;
|
|
722
|
-
parseBorrowInterest(info:
|
|
722
|
+
parseBorrowInterest(info: Dict, market?: Market): BorrowInterest;
|
|
723
723
|
parseIsolatedBorrowRate(info: any, market?: Market): IsolatedBorrowRate;
|
|
724
724
|
parseWsTrade(trade: any, market?: Market): Trade;
|
|
725
725
|
parseWsOrder(order: any, market?: Market): Order;
|
|
726
726
|
parseWsOrderTrade(trade: any, market?: Market): Trade;
|
|
727
727
|
parseWsOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
728
|
-
fetchFundingRates(symbols?:
|
|
728
|
+
fetchFundingRates(symbols?: Strings, params?: {}): Promise<{}>;
|
|
729
729
|
watchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
|
|
730
730
|
watchFundingRates(symbols: string[], params?: {}): Promise<FundingRates>;
|
|
731
731
|
watchFundingRatesForSymbols(symbols: string[], params?: {}): Promise<{}>;
|
|
@@ -734,7 +734,7 @@ export default class Exchange {
|
|
|
734
734
|
createDepositAddress(code: string, params?: {}): Promise<DepositAddressResponse>;
|
|
735
735
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<{}>;
|
|
736
736
|
fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
|
|
737
|
-
fetchLeverages(symbols?:
|
|
737
|
+
fetchLeverages(symbols?: Strings, params?: {}): Promise<Leverages>;
|
|
738
738
|
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<{}>;
|
|
739
739
|
addMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
740
740
|
reduceMargin(symbol: string, amount: number, params?: {}): Promise<MarginModification>;
|
|
@@ -831,8 +831,8 @@ export default class Exchange {
|
|
|
831
831
|
safeNumber2(dictionary: object, key1: IndexType, key2: IndexType, d?: any): number;
|
|
832
832
|
parseOrderBook(orderbook: object, symbol: string, timestamp?: Int, bidsKey?: string, asksKey?: string, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): OrderBook;
|
|
833
833
|
parseOHLCVs(ohlcvs: object[], market?: any, timeframe?: string, since?: Int, limit?: Int): OHLCV[];
|
|
834
|
-
parseLeverageTiers(response: any, symbols?: string[], marketIdKey?: any):
|
|
835
|
-
loadTradingLimits(symbols?:
|
|
834
|
+
parseLeverageTiers(response: any, symbols?: string[], marketIdKey?: any): LeverageTiers;
|
|
835
|
+
loadTradingLimits(symbols?: Strings, reload?: boolean, params?: {}): Promise<Dictionary<any>>;
|
|
836
836
|
safePosition(position: any): Position;
|
|
837
837
|
parsePositions(positions: any[], symbols?: string[], params?: {}): Position[];
|
|
838
838
|
parseAccounts(accounts: any[], params?: {}): Account[];
|
|
@@ -848,6 +848,8 @@ export default class Exchange {
|
|
|
848
848
|
handleParamString2(params: object, paramName1: string, paramName2: string, defaultValue?: Str): [string, object];
|
|
849
849
|
handleParamInteger(params: object, paramName: string, defaultValue?: Int): [Int, object];
|
|
850
850
|
handleParamInteger2(params: object, paramName1: string, paramName2: string, defaultValue?: Int): [Int, object];
|
|
851
|
+
handleParamBool(params: object, paramName: string, defaultValue?: Bool): [Bool, object];
|
|
852
|
+
handleParamBool2(params: object, paramName1: string, paramName2: string, defaultValue?: Bool): [Bool, object];
|
|
851
853
|
resolvePath(path: any, params: any): any[];
|
|
852
854
|
getListFromObjectValues(objects: any, key: IndexType): any[];
|
|
853
855
|
getSymbolsForMarketType(marketType?: Str, subType?: Str, symbolWithActiveStatus?: boolean, symbolWithUnknownStatus?: boolean): any[];
|
|
@@ -866,13 +868,13 @@ export default class Exchange {
|
|
|
866
868
|
fetchPosition(symbol: string, params?: {}): Promise<Position>;
|
|
867
869
|
fetchPositionWs(symbol: string, params?: {}): Promise<Position[]>;
|
|
868
870
|
watchPosition(symbol?: Str, params?: {}): Promise<Position>;
|
|
869
|
-
watchPositions(symbols?:
|
|
870
|
-
watchPositionForSymbols(symbols?:
|
|
871
|
+
watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
872
|
+
watchPositionForSymbols(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
871
873
|
fetchPositionsForSymbol(symbol: string, params?: {}): Promise<Position[]>;
|
|
872
874
|
fetchPositionsForSymbolWs(symbol: string, params?: {}): Promise<Position[]>;
|
|
873
|
-
fetchPositions(symbols?:
|
|
874
|
-
fetchPositionsWs(symbols?:
|
|
875
|
-
fetchPositionsRisk(symbols?:
|
|
875
|
+
fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
|
|
876
|
+
fetchPositionsWs(symbols?: Strings, params?: {}): Promise<Position[]>;
|
|
877
|
+
fetchPositionsRisk(symbols?: Strings, params?: {}): Promise<Position[]>;
|
|
876
878
|
fetchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
877
879
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<BorrowInterest[]>;
|
|
878
880
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
@@ -892,8 +894,8 @@ export default class Exchange {
|
|
|
892
894
|
fetchTotalBalance(params?: {}): Promise<Balance>;
|
|
893
895
|
fetchStatus(params?: {}): Promise<any>;
|
|
894
896
|
fetchTransactionFee(code: string, params?: {}): Promise<{}>;
|
|
895
|
-
fetchTransactionFees(codes?:
|
|
896
|
-
fetchDepositWithdrawFees(codes?:
|
|
897
|
+
fetchTransactionFees(codes?: Strings, params?: {}): Promise<{}>;
|
|
898
|
+
fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<Dictionary<DepositWithdrawFeeNetwork>>;
|
|
897
899
|
fetchDepositWithdrawFee(code: string, params?: {}): Promise<DepositWithdrawFeeNetwork>;
|
|
898
900
|
getSupportedMapping(key: any, mapping?: {}): any;
|
|
899
901
|
fetchCrossBorrowRate(code: string, params?: {}): Promise<CrossBorrowRate>;
|
|
@@ -912,11 +914,11 @@ export default class Exchange {
|
|
|
912
914
|
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
913
915
|
fetchTickerWs(symbol: string, params?: {}): Promise<Ticker>;
|
|
914
916
|
watchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
915
|
-
fetchTickers(symbols?:
|
|
916
|
-
fetchTickersWs(symbols?:
|
|
917
|
-
fetchOrderBooks(symbols?:
|
|
917
|
+
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
918
|
+
fetchTickersWs(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
919
|
+
fetchOrderBooks(symbols?: Strings, limit?: Int, params?: {}): Promise<Dictionary<OrderBook>>;
|
|
918
920
|
watchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
919
|
-
watchTickers(symbols?:
|
|
921
|
+
watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
920
922
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
921
923
|
fetchOrderWs(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
922
924
|
fetchOrderStatus(id: string, symbol?: Str, params?: {}): Promise<string>;
|
|
@@ -1006,13 +1008,13 @@ export default class Exchange {
|
|
|
1006
1008
|
isTickPrecision(): boolean;
|
|
1007
1009
|
isDecimalPrecision(): boolean;
|
|
1008
1010
|
isSignificantPrecision(): boolean;
|
|
1009
|
-
safeNumber(obj:
|
|
1011
|
+
safeNumber(obj: any, key: IndexType, defaultNumber?: Num): Num;
|
|
1010
1012
|
safeNumberN(obj: object, arr: IndexType[], defaultNumber?: Num): Num;
|
|
1011
1013
|
parsePrecision(precision?: string): string;
|
|
1012
1014
|
integerPrecisionToAmount(precision: Str): string;
|
|
1013
1015
|
loadTimeDifference(params?: {}): Promise<any>;
|
|
1014
1016
|
implodeHostname(url: string): string;
|
|
1015
|
-
fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<
|
|
1017
|
+
fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<LeverageTier[]>;
|
|
1016
1018
|
createPostOnlyOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
1017
1019
|
createPostOnlyOrderWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
1018
1020
|
createReduceOnlyOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
@@ -1029,7 +1031,7 @@ export default class Exchange {
|
|
|
1029
1031
|
filterBySymbolsSinceLimit(array: any, symbols?: string[], since?: Int, limit?: Int, tail?: boolean): any;
|
|
1030
1032
|
parseLastPrices(pricesData: any, symbols?: string[], params?: {}): LastPrices;
|
|
1031
1033
|
parseTickers(tickers: any, symbols?: Strings, params?: {}): Tickers;
|
|
1032
|
-
parseDepositAddresses(addresses: any, codes?:
|
|
1034
|
+
parseDepositAddresses(addresses: any, codes?: Strings, indexed?: boolean, params?: {}): Dictionary<any>;
|
|
1033
1035
|
parseBorrowInterests(response: any, market?: Market): any[];
|
|
1034
1036
|
parseIsolatedBorrowRates(info: any): IsolatedBorrowRates;
|
|
1035
1037
|
parseFundingRateHistories(response: any, market?: any, since?: Int, limit?: Int): FundingRateHistory[];
|
|
@@ -1040,7 +1042,7 @@ export default class Exchange {
|
|
|
1040
1042
|
isTriggerOrder(params: any): any[];
|
|
1041
1043
|
isPostOnly(isMarketOrder: boolean, exchangeSpecificParam: any, params?: {}): boolean;
|
|
1042
1044
|
handlePostOnly(isMarketOrder: boolean, exchangeSpecificPostOnlyOption: boolean, params?: any): any[];
|
|
1043
|
-
fetchLastPrices(symbols?:
|
|
1045
|
+
fetchLastPrices(symbols?: Strings, params?: {}): Promise<LastPrices>;
|
|
1044
1046
|
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
1045
1047
|
fetchTradingFeesWs(params?: {}): Promise<TradingFees>;
|
|
1046
1048
|
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
@@ -1055,13 +1057,13 @@ export default class Exchange {
|
|
|
1055
1057
|
convertTypeToAccount(account: any): any;
|
|
1056
1058
|
checkRequiredArgument(methodName: string, argument: any, argumentName: any, options?: any[]): void;
|
|
1057
1059
|
checkRequiredMarginArgument(methodName: string, symbol: Str, marginMode: string): void;
|
|
1058
|
-
parseDepositWithdrawFees(response: any, codes?:
|
|
1060
|
+
parseDepositWithdrawFees(response: any, codes?: Strings, currencyIdKey?: any): any;
|
|
1059
1061
|
parseDepositWithdrawFee(fee: any, currency?: Currency): any;
|
|
1060
1062
|
depositWithdrawFee(info: any): any;
|
|
1061
1063
|
assignDefaultDepositWithdrawFees(fee: any, currency?: any): any;
|
|
1062
1064
|
parseIncome(info: any, market?: Market): object;
|
|
1063
1065
|
parseIncomes(incomes: any, market?: any, since?: Int, limit?: Int): FundingHistory[];
|
|
1064
|
-
getMarketFromSymbols(symbols?:
|
|
1066
|
+
getMarketFromSymbols(symbols?: Strings): MarketInterface;
|
|
1065
1067
|
parseWsOHLCVs(ohlcvs: object[], market?: any, timeframe?: string, since?: Int, limit?: Int): any[];
|
|
1066
1068
|
fetchTransactions(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
1067
1069
|
filterByArrayPositions(objects: any, key: IndexType, values?: any, indexed?: boolean): Position[];
|
|
@@ -1078,12 +1080,12 @@ export default class Exchange {
|
|
|
1078
1080
|
handleUntilOption(key: string, request: any, params: any, multiplier?: number): any[];
|
|
1079
1081
|
safeOpenInterest(interest: any, market?: Market): OpenInterest;
|
|
1080
1082
|
parseLiquidation(liquidation: any, market?: Market): Liquidation;
|
|
1081
|
-
parseLiquidations(liquidations:
|
|
1083
|
+
parseLiquidations(liquidations: Dict[], market?: Market, since?: Int, limit?: Int): Liquidation[];
|
|
1082
1084
|
parseGreeks(greeks: Dict, market?: Market): Greeks;
|
|
1083
1085
|
parseOption(chain: Dict, currency?: Currency, market?: Market): Option;
|
|
1084
1086
|
parseOptionChain(response: object[], currencyKey?: Str, symbolKey?: Str): OptionChain;
|
|
1085
1087
|
parseMarginModes(response: object[], symbols?: string[], symbolKey?: Str, marketType?: MarketType): MarginModes;
|
|
1086
|
-
parseMarginMode(marginMode:
|
|
1088
|
+
parseMarginMode(marginMode: Dict, market?: Market): MarginMode;
|
|
1087
1089
|
parseLeverages(response: object[], symbols?: string[], symbolKey?: Str, marketType?: MarketType): Leverages;
|
|
1088
1090
|
parseLeverage(leverage: Dict, market?: Market): Leverage;
|
|
1089
1091
|
parseConversions(conversions: any[], code?: Str, fromCurrencyKey?: Str, toCurrencyKey?: Str, since?: Int, limit?: Int, params?: {}): Conversion[];
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -3683,6 +3683,20 @@ export default class Exchange {
|
|
|
3683
3683
|
}
|
|
3684
3684
|
return [value, params];
|
|
3685
3685
|
}
|
|
3686
|
+
handleParamBool(params, paramName, defaultValue = undefined) {
|
|
3687
|
+
const value = this.safeBool(params, paramName, defaultValue);
|
|
3688
|
+
if (value !== undefined) {
|
|
3689
|
+
params = this.omit(params, paramName);
|
|
3690
|
+
}
|
|
3691
|
+
return [value, params];
|
|
3692
|
+
}
|
|
3693
|
+
handleParamBool2(params, paramName1, paramName2, defaultValue = undefined) {
|
|
3694
|
+
const value = this.safeBool2(params, paramName1, paramName2, defaultValue);
|
|
3695
|
+
if (value !== undefined) {
|
|
3696
|
+
params = this.omit(params, [paramName1, paramName2]);
|
|
3697
|
+
}
|
|
3698
|
+
return [value, params];
|
|
3699
|
+
}
|
|
3686
3700
|
resolvePath(path, params) {
|
|
3687
3701
|
return [
|
|
3688
3702
|
this.implodeParams(path, params),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { implicitReturnType, Int, Str, IndexType } from '../types.js';
|
|
1
|
+
import { implicitReturnType, Int, Str, IndexType, Num } from '../types.js';
|
|
2
2
|
declare const isNumber: (number: unknown) => boolean;
|
|
3
3
|
declare const isInteger: (number: unknown) => boolean;
|
|
4
4
|
declare const isArray: (arg: any) => arg is any[];
|
|
@@ -7,26 +7,26 @@ declare const isString: (s: any) => boolean;
|
|
|
7
7
|
declare const isObject: (o: any) => boolean;
|
|
8
8
|
declare const isDictionary: (o: any) => boolean;
|
|
9
9
|
declare const isStringCoercible: (x: any) => any;
|
|
10
|
-
declare const prop: (o: any, k:
|
|
11
|
-
declare const asFloat: (x: any) => number;
|
|
12
|
-
declare const asInteger: (x: any) => number;
|
|
13
|
-
declare const safeFloat: (o: implicitReturnType, k: IndexType, $default?: number) =>
|
|
10
|
+
declare const prop: (o: any, k: IndexType) => any;
|
|
11
|
+
declare const asFloat: (x: any) => number | typeof NaN;
|
|
12
|
+
declare const asInteger: (x: any) => number | typeof NaN;
|
|
13
|
+
declare const safeFloat: (o: implicitReturnType, k: IndexType, $default?: number) => Num;
|
|
14
14
|
declare const safeInteger: (o: implicitReturnType, k: IndexType, $default?: number) => Int;
|
|
15
15
|
declare const safeIntegerProduct: (o: implicitReturnType, k: IndexType, $factor: number, $default?: number) => Int;
|
|
16
|
-
declare const safeTimestamp: (o: implicitReturnType, k: IndexType, $default?: number) =>
|
|
16
|
+
declare const safeTimestamp: (o: implicitReturnType, k: IndexType, $default?: number) => Int;
|
|
17
17
|
declare const safeValue: (o: implicitReturnType, k: IndexType, $default?: any) => any;
|
|
18
18
|
declare const safeString: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
|
|
19
19
|
declare const safeStringLower: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
|
|
20
20
|
declare const safeStringUpper: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
|
|
21
|
-
declare const safeFloat2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: number) =>
|
|
21
|
+
declare const safeFloat2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: number) => Num;
|
|
22
22
|
declare const safeInteger2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: number) => Int;
|
|
23
23
|
declare const safeIntegerProduct2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $factor: number, $default?: number) => Int;
|
|
24
|
-
declare const safeTimestamp2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?:
|
|
24
|
+
declare const safeTimestamp2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: Int) => Int;
|
|
25
25
|
declare const safeValue2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: any) => any;
|
|
26
26
|
declare const safeString2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
|
|
27
27
|
declare const safeStringLower2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
|
|
28
28
|
declare const safeStringUpper2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
|
|
29
|
-
declare const safeFloatN: (o: implicitReturnType, k: (IndexType)[], $default?: number) =>
|
|
29
|
+
declare const safeFloatN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => Num;
|
|
30
30
|
declare const safeIntegerN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => Int;
|
|
31
31
|
declare const safeIntegerProductN: (o: implicitReturnType, k: (IndexType)[], $factor: number, $default?: number) => Int;
|
|
32
32
|
declare const safeTimestampN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => Int;
|
package/js/src/base/types.d.ts
CHANGED
|
@@ -524,6 +524,8 @@ export interface CrossBorrowRates extends Dictionary<CrossBorrowRates> {
|
|
|
524
524
|
}
|
|
525
525
|
export interface TransferEntries extends Dictionary<TransferEntry> {
|
|
526
526
|
}
|
|
527
|
+
export interface LeverageTiers extends Dictionary<LeverageTier[]> {
|
|
528
|
+
}
|
|
527
529
|
/** [ timestamp, open, high, low, close, volume ] */
|
|
528
530
|
export declare type OHLCV = [Num, Num, Num, Num, Num, Num];
|
|
529
531
|
/** [ timestamp, open, high, low, close, volume, count ] */
|
package/js/src/bigone.d.ts
CHANGED
|
@@ -15,14 +15,14 @@ export default class bigone extends Exchange {
|
|
|
15
15
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
16
16
|
parseContractBidsAsks(bidsAsks: any): any[];
|
|
17
17
|
parseContractOrderBook(orderbook: object, symbol: string, limit?: Int): OrderBook;
|
|
18
|
-
parseTrade(trade:
|
|
18
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
19
19
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
20
20
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
21
21
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
22
22
|
parseBalance(response: any): Balances;
|
|
23
23
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
24
24
|
parseType(type: string): string;
|
|
25
|
-
parseOrder(order:
|
|
25
|
+
parseOrder(order: Dict, market?: Market): Order;
|
|
26
26
|
createMarketBuyOrderWithCost(symbol: string, cost: number, params?: {}): Promise<Order>;
|
|
27
27
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
28
28
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
@@ -30,7 +30,7 @@ export default class bigone extends Exchange {
|
|
|
30
30
|
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
31
31
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
32
32
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
33
|
-
parseOrderStatus(status:
|
|
33
|
+
parseOrderStatus(status: Str): string;
|
|
34
34
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
35
35
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
36
36
|
nonce(): any;
|
|
@@ -48,7 +48,7 @@ export default class bigone extends Exchange {
|
|
|
48
48
|
info: any;
|
|
49
49
|
}>;
|
|
50
50
|
parseTransactionStatus(status: any): string;
|
|
51
|
-
parseTransaction(transaction:
|
|
51
|
+
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
52
52
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
53
53
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
54
54
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
package/js/src/binance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/binance.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface, MarginMode, MarginModes, Leverage, Leverages, Num, Option, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRates, IsolatedBorrowRate, Dict, TransferEntries } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface, MarginMode, MarginModes, Leverage, Leverages, Num, Option, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRates, IsolatedBorrowRate, Dict, TransferEntries, LeverageTier, LeverageTiers } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class binance
|
|
5
5
|
* @augments Exchange
|
|
@@ -45,18 +45,15 @@ export default class binance extends Exchange {
|
|
|
45
45
|
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
46
46
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
47
47
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
48
|
-
parseTrade(trade:
|
|
48
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
49
49
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
50
50
|
editSpotOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
51
51
|
editSpotOrderRequest(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
|
|
52
|
-
editContractOrderRequest(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}):
|
|
53
|
-
symbol: string;
|
|
54
|
-
side: string;
|
|
55
|
-
};
|
|
52
|
+
editContractOrderRequest(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Dict;
|
|
56
53
|
editContractOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
57
54
|
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|
|
58
|
-
parseOrderStatus(status:
|
|
59
|
-
parseOrder(order:
|
|
55
|
+
parseOrderStatus(status: Str): string;
|
|
56
|
+
parseOrder(order: Dict, market?: Market): Order;
|
|
60
57
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
61
58
|
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
62
59
|
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
|
|
@@ -97,7 +94,7 @@ export default class binance extends Exchange {
|
|
|
97
94
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
98
95
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
99
96
|
parseTransactionStatusByType(status: any, type?: any): string;
|
|
100
|
-
parseTransaction(transaction:
|
|
97
|
+
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
101
98
|
parseTransferStatus(status: Str): Str;
|
|
102
99
|
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
|
103
100
|
parseIncome(income: any, market?: Market): {
|
|
@@ -118,15 +115,15 @@ export default class binance extends Exchange {
|
|
|
118
115
|
network: any;
|
|
119
116
|
info: any;
|
|
120
117
|
}>;
|
|
121
|
-
fetchTransactionFees(codes?:
|
|
122
|
-
withdraw:
|
|
118
|
+
fetchTransactionFees(codes?: Strings, params?: {}): Promise<{
|
|
119
|
+
withdraw: Dict;
|
|
123
120
|
deposit: {};
|
|
124
121
|
info: any;
|
|
125
122
|
}>;
|
|
126
123
|
fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
|
|
127
124
|
parseDepositWithdrawFee(fee: any, currency?: Currency): any;
|
|
128
125
|
withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
|
|
129
|
-
parseTradingFee(fee:
|
|
126
|
+
parseTradingFee(fee: Dict, market?: Market): TradingFeeInterface;
|
|
130
127
|
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
131
128
|
fetchTradingFees(params?: {}): Promise<TradingFees>;
|
|
132
129
|
futuresTransfer(code: string, amount: any, type: any, params?: {}): Promise<TransferEntry>;
|
|
@@ -225,11 +222,11 @@ export default class binance extends Exchange {
|
|
|
225
222
|
takeProfitPrice: any;
|
|
226
223
|
};
|
|
227
224
|
loadLeverageBrackets(reload?: boolean, params?: {}): Promise<any>;
|
|
228
|
-
fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<
|
|
229
|
-
parseMarketLeverageTiers(info: any, market?: Market):
|
|
225
|
+
fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<LeverageTiers>;
|
|
226
|
+
parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
|
|
230
227
|
fetchPosition(symbol: string, params?: {}): Promise<import("./base/types.js").Position>;
|
|
231
228
|
fetchOptionPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
232
|
-
parsePosition(position:
|
|
229
|
+
parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
|
|
233
230
|
fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
234
231
|
fetchAccountPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
235
232
|
fetchPositionsRisk(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
|
|
@@ -237,7 +234,7 @@ export default class binance extends Exchange {
|
|
|
237
234
|
setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
|
|
238
235
|
setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
|
|
239
236
|
setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
|
|
240
|
-
fetchLeverages(symbols?:
|
|
237
|
+
fetchLeverages(symbols?: Strings, params?: {}): Promise<Leverages>;
|
|
241
238
|
parseLeverage(leverage: Dict, market?: Market): Leverage;
|
|
242
239
|
fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
243
240
|
fetchMySettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
@@ -251,7 +248,7 @@ export default class binance extends Exchange {
|
|
|
251
248
|
parseSettlements(settlements: any, market: any): any[];
|
|
252
249
|
fetchLedgerEntry(id: string, code?: Str, params?: {}): Promise<any>;
|
|
253
250
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
254
|
-
parseLedgerEntry(item:
|
|
251
|
+
parseLedgerEntry(item: Dict, currency?: Currency): {
|
|
255
252
|
id: string;
|
|
256
253
|
direction: any;
|
|
257
254
|
account: any;
|
|
@@ -266,7 +263,7 @@ export default class binance extends Exchange {
|
|
|
266
263
|
after: any;
|
|
267
264
|
status: any;
|
|
268
265
|
fee: any;
|
|
269
|
-
info:
|
|
266
|
+
info: Dict;
|
|
270
267
|
};
|
|
271
268
|
parseLedgerEntryType(type: any): string;
|
|
272
269
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
@@ -317,7 +314,7 @@ export default class binance extends Exchange {
|
|
|
317
314
|
redeemGiftCode(giftcardCode: any, params?: {}): Promise<any>;
|
|
318
315
|
verifyGiftCode(id: string, params?: {}): Promise<any>;
|
|
319
316
|
fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
320
|
-
parseBorrowInterest(info:
|
|
317
|
+
parseBorrowInterest(info: Dict, market?: Market): {
|
|
321
318
|
account: string;
|
|
322
319
|
symbol: string;
|
|
323
320
|
marginMode: string;
|
|
@@ -327,7 +324,7 @@ export default class binance extends Exchange {
|
|
|
327
324
|
amountBorrowed: number;
|
|
328
325
|
timestamp: number;
|
|
329
326
|
datetime: string;
|
|
330
|
-
info:
|
|
327
|
+
info: Dict;
|
|
331
328
|
};
|
|
332
329
|
repayCrossMargin(code: string, amount: any, params?: {}): Promise<{
|
|
333
330
|
id: number;
|
|
@@ -381,13 +378,13 @@ export default class binance extends Exchange {
|
|
|
381
378
|
parseLiquidation(liquidation: any, market?: Market): Liquidation;
|
|
382
379
|
fetchGreeks(symbol: string, params?: {}): Promise<Greeks>;
|
|
383
380
|
parseGreeks(greeks: Dict, market?: Market): Greeks;
|
|
384
|
-
fetchTradingLimits(symbols?: Strings, params?: {}): Promise<
|
|
381
|
+
fetchTradingLimits(symbols?: Strings, params?: {}): Promise<Dict>;
|
|
385
382
|
fetchPositionMode(symbol?: Str, params?: {}): Promise<{
|
|
386
383
|
info: any;
|
|
387
384
|
hedged: boolean;
|
|
388
385
|
}>;
|
|
389
|
-
fetchMarginModes(symbols?:
|
|
390
|
-
parseMarginMode(marginMode:
|
|
386
|
+
fetchMarginModes(symbols?: Strings, params?: {}): Promise<MarginModes>;
|
|
387
|
+
parseMarginMode(marginMode: Dict, market?: any): MarginMode;
|
|
391
388
|
fetchOption(symbol: string, params?: {}): Promise<Option>;
|
|
392
389
|
parseOption(chain: Dict, currency?: Currency, market?: Market): Option;
|
|
393
390
|
fetchMarginAdjustmentHistory(symbol?: Str, type?: Str, since?: Num, limit?: Num, params?: {}): Promise<MarginModification[]>;
|