ccxt
Version:
127 lines (126 loc) • 7.51 kB
TypeScript
import extendedRest from '../extended.js';
import type { Balances, Bool, FundingRate, Int, Market, NullableDict, OHLCV, Order, OrderBook, Position, Str, Strings, Ticker, Trade } from '../base/types.js';
import Client from '../base/ws/Client.js';
export default class extended extends extendedRest {
describe(): any;
/**
* @method
* @name extended#watchOrderBook
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
* @see https://api.docs.extended.exchange/#order-book-stream
* @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.depth] set to '1' to receive best bid and ask snapshots only
* @returns {object} an [order book structure]{@link https://docs.ccxt.com/?id=order-book-structure}
*/
watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
handleOrderBook(client: Client, message: any): void;
handleDelta(bookside: any, delta: any): void;
handleDeltas(bookside: any, deltas: any): void;
watchPrivate(messageHash: string, subscription?: NullableDict): Promise<any>;
/**
* @method
* @name extended#watchOrders
* @description watches information on multiple orders made by the user
* @see https://api.docs.extended.exchange/#account-updates-stream
* @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
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
*/
watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
/**
* @method
* @name extended#watchBalance
* @description watches balance updates
* @see https://api.docs.extended.exchange/#account-updates-stream
* @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?: {}): Promise<Balances>;
handleBalance(client: Client, message: any): void;
/**
* @method
* @name extended#watchMyTrades
* @description watches information on multiple trades made by the user
* @see https://api.docs.extended.exchange/#account-updates-stream
* @param {string} [symbol] unified market symbol of the trades
* @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?: {}): Promise<Trade[]>;
handleMyTrades(client: Client, message: any): void;
/**
* @method
* @name extended#watchPositions
* @description watches information on multiple positions
* @see https://api.docs.extended.exchange/#account-updates-stream
* @param {string[]} [symbols] unified market symbols
* @param {int} [since] the earliest time in ms to fetch positions for
* @param {int} [limit] the maximum number of position structures to retrieve
* @param {object} [params] extra parameters specific to the exchange API endpoint
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/?id=position-structure}
*/
watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
handlePositions(client: Client, message: any): void;
handleOrders(client: Client, message: any): void;
/**
* @method
* @name extended#watchFundingRate
* @description watch the current funding rate
* @see https://api.docs.extended.exchange/#funding-rates-stream
* @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?: {}): Promise<FundingRate>;
handleFundingRate(client: Client, message: any): void;
parseWsFundingRate(fundingRate: any, market?: Market, message?: any): FundingRate;
/**
* @method
* @name extended#watchMarkPrice
* @description watches a mark price for a specific market
* @see https://api.docs.extended.exchange/#mark-price-stream
* @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}
*/
watchMarkPrice(symbol: string, params?: {}): Promise<Ticker>;
handleMarkPrice(client: Client, message: any): void;
/**
* @method
* @name extended#watchTrades
* @description get the list of most recent trades for a particular symbol
* @see https://api.docs.extended.exchange/#trades-stream
* @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?: {}): Promise<Trade[]>;
handleTrades(client: Client, message: any): void;
/**
* @method
* @name extended#watchOHLCV
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
* @see https://api.docs.extended.exchange/#candles-stream
* @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
* @param {string} [params.candleType] candle type: 'trades' (default), 'mark-prices', or 'index-prices'
* @param {string} [params.price] *ignored if params.candleType is set* 'mark' or 'index' for mark price and index price candles
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
*/
watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
handleOHLCV(client: Client, message: any): void;
findSubscription(client: Client, name: string): import("../base/types.js").Dictionary<any> | undefined;
handleErrorMessage(client: Client, message: any): Bool;
handleMessage(client: Client, message: any): void;
}