import mexcRest from '../mexc.js'; import type { Int, OHLCV, Str, OrderBook, Order, Trade, Ticker, Balances, Dict, Tickers, Strings, FundingRate, Market } from '../base/types.js'; import type { WsOrderBook } from '../base/ws/OrderBook.js'; import Client from '../base/ws/Client.js'; export default class mexc extends mexcRest { describe(): any; /** * @method * @name mexc#watchTicker * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market * @see https://www.mexc.com/api-docs/spot-v3/websocket-market-streams/individual-symbol-book-ticker-streams // spot * @see https://www.mexc.com/api-docs/futures/websocket-api/get-a-single-ticker // swap * @param {string} symbol unified symbol of the market to fetch the ticker for * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure} */ watchTicker(symbol: string, params?: Dict): Promise; handleTicker(client: Client, message: Dict): void; /** * @method * @name mexc#watchTickers * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list * @see https://www.mexc.com/api-docs/futures/websocket-api/tickers * @param {string[]} symbols unified symbol of the market to fetch the ticker for * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure} */ watchTickers(symbols?: Strings, params?: Dict): Promise; handleTickers(client: Client, message: Dict): void; parseWsTicker(ticker: Dict, market?: Market): Ticker; /** * @method * @name mexc#watchBidsAsks * @see https://www.mexc.com/api-docs/spot-v3/websocket-market-streams/individual-symbol-book-ticker-streams * @description watches best bid & ask for symbols * @param {string[]} symbols unified symbol of the market to fetch the ticker for * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure} */ watchBidsAsks(symbols?: Strings, params?: Dict): Promise; handleBidAsk(client: Client, message: Dict): void; parseWsBidAsk(ticker: Dict, market?: Market): Ticker; watchSpotPublic(channel: string, messageHash: string, params?: Dict): Promise; watchSpotPrivate(channel: string, messageHash: string, params?: Dict): Promise; watchSwapPublic(channel: string, messageHash: string, requestParams: Dict, params?: Dict): Promise; watchSwapPrivate(messageHash: string, params?: Dict): Promise; /** * @method * @name mexc#watchOHLCV * @see https://www.mexc.com/api-docs/spot-v3/websocket-market-streams/k-line-streams // spot * @see https://www.mexc.com/api-docs/futures/websocket-api/k-line-data // swap * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market * @param {string} symbol unified symbol of the market to fetch OHLCV data for * @param {string} timeframe the length of time each candle represents * @param {int} [since] timestamp in ms of the earliest candle to fetch * @param {int} [limit] the maximum amount of candles to fetch * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume */ watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: Dict): Promise; handleOHLCV(client: Client, message: Dict): void; parseWsOHLCV(ohlcv: any, market?: Market): OHLCV; /** * @method * @name mexc#watchOrderBook * @see https://www.mexc.com/api-docs/spot-v3/websocket-market-streams/diffdepth-stream // spot * @see https://www.mexc.com/api-docs/futures/websocket-api/order-book-depth // swap * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data * @param {string} symbol unified symbol of the market to fetch the order book for * @param {int} [limit] the maximum amount of order book entries to return * @param {object} [params] extra parameters specific to the exchange API endpoint * @param {string} [params.frequency] the frequency of the order book updates, default is '10ms', can be '100ms' or '10ms * @returns {object} an [order book structure]{@link https://docs.ccxt.com/?id=order-book-structure} */ watchOrderBook(symbol: string, limit?: Int, params?: Dict): Promise; handleOrderBookSubscription(client: Client, message: Dict): void; getCacheIndex(orderbook: any, cache: any): number; handleOrderBook(client: Client, message: Dict): void; handleBooksideDelta(bookside: any, bidasks: any[]): void; handleBookDelta(orderbook: WsOrderBook, delta: any): void; /** * @method * @name mexc#watchTrades * @see https://www.mexc.com/api-docs/spot-v3/websocket-market-streams/trade-streams // spot * @see https://www.mexc.com/api-docs/futures/websocket-api/deal // swap * @description get the list of most recent trades for a particular symbol * @param {string} symbol unified symbol of the market to fetch trades for * @param {int} [since] timestamp in ms of the earliest trade to fetch * @param {int} [limit] the maximum amount of trades to fetch * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades} */ watchTrades(symbol: string, since?: Int, limit?: Int, params?: Dict): Promise; handleTrades(client: Client, message: Dict): void; /** * @method * @name mexc#watchMyTrades * @see https://www.mexc.com/api-docs/spot-v3/websocket-user-data-streams/spot-account-deals // spot * @see https://www.mexc.com/api-docs/futures/websocket-api/fill-details // swap * @description watches information on multiple trades made by the user * @param {string} symbol unified market symbol of the market trades were made in * @param {int} [since] the earliest time in ms to fetch trades for * @param {int} [limit] the maximum number of trade structures to retrieve * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure} */ watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise; handleMyTrade(client: Client, message: Dict, subscription?: Dict | undefined): void; parseWsTrade(trade: any, market?: Market): Trade; /** * @method * @name mexc#watchOrders * @see https://www.mexc.com/api-docs/spot-v3/websocket-user-data-streams/spot-account-orders // spot * @see https://www.mexc.com/api-docs/futures/websocket-api/order // swap * @description watches information on multiple orders made by the user * @param {string} symbol unified market symbol of the market orders were made in * @param {int} [since] the earliest time in ms to fetch orders for * @param {int} [limit] the maximum number of order structures to retrieve * @param {object} [params] extra parameters specific to the exchange API endpoint * @param {string|undefined} params.type the type of orders to retrieve, can be 'spot' or 'swap' * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure} */ watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise; handleOrder(client: Client, message: Dict): void; parseWsOrder(order: any, market?: Market): Order; parseWsOrderStatus(status: Str, market?: Market): Str; parseWsOrderType(type: Str): Str; parseWsTimeInForce(timeInForce: Str): Str; /** * @method * @name mexc#watchBalance * @see https://www.mexc.com/api-docs/spot-v3/websocket-user-data-streams/spot-account-update // spot * @see https://www.mexc.com/api-docs/futures/websocket-api/assets // swap * @description watch balance and get the amount of funds available for trading or funds locked in orders * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure} */ watchBalance(params?: Dict): Promise; handleBalance(client: Client, message: Dict): void; /** * @method * @name mexc#watchFundingRate * @description watch the current funding rate * @see https://www.mexc.com/api-docs/futures/websocket-api/funding-rate * @param {string} symbol unified market symbol * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure} */ watchFundingRate(symbol: string, params?: Dict): Promise; /** * @method * @name mexc#unWatchFundingRate * @description unWatches the current funding rate for a symbol * @see https://www.mexc.com/api-docs/futures/websocket-api/funding-rate * @param {string} symbol unified symbol of the market * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure} */ unWatchFundingRate(symbol: string, params?: Dict): Promise; handleFundingRate(client: Client, message: Dict): void; /** * @method * @name mexc#unWatchTicker * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list * @param {string} symbol unified symbol of the market to fetch the ticker for * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure} */ unWatchTicker(symbol: string, params?: Dict): Promise; /** * @method * @name mexc#unWatchTickers * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list * @param {string[]} symbols unified symbol of the market to fetch the ticker for * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure} */ unWatchTickers(symbols?: Strings, params?: Dict): Promise; /** * @method * @name mexc#unWatchBidsAsks * @description unWatches best bid & ask for symbols * @param {string[]} symbols unified symbol of the market to fetch the ticker for * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure} */ unWatchBidsAsks(symbols?: Strings, params?: Dict): Promise; /** * @method * @name mexc#unWatchOHLCV * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market * @param {string} symbol unified symbol of the market to fetch OHLCV data for * @param {string} timeframe the length of time each candle represents * @param {object} [params] extra parameters specific to the exchange API endpoint * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00' * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume */ unWatchOHLCV(symbol: string, timeframe?: string, params?: Dict): Promise; /** * @method * @name mexc#unWatchOrderBook * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data * @param {string} symbol unified array of symbols * @param {object} [params] extra parameters specific to the exchange API endpoint * @param {string} [params.frequency] the frequency of the order book updates, default is '10ms', can be '100ms' or '10ms * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} */ unWatchOrderBook(symbol: string, params?: Dict): Promise; /** * @method * @name mexc#unWatchTrades * @description unsubscribes from the trades channel * @param {string} symbol unified symbol of the market to fetch trades for * @param {object} [params] extra parameters specific to the exchange API endpoint * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade' * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades} */ unWatchTrades(symbol: string, params?: Dict): Promise; handleUnsubscriptions(client: Client, messageHashes: string[]): void; authenticate(subscriptionHash: Str, params?: Dict): Promise; keepAliveListenKey(listenKey: Str, params?: Dict): Promise; handlePong(client: Client, message: Dict): Dict; handleSubscriptionStatus(client: Client, message: Dict): void; handleProtobufMessage(client: Client, message: Dict): boolean; handleMessage(client: Client, message: any): void; ping(client: Client): { method: string; }; }