UNPKG

ccxt

Version:

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges

67 lines (66 loc) 3.96 kB
import bittradeRest from '../bittrade.js'; import type { Int, OrderBook, Trade, Ticker, OHLCV } from '../base/types.js'; import Client from '../base/ws/Client.js'; export default class bittrade extends bittradeRest { describe(): any; requestId(): any; /** * @method * @name bittrade#watchTicker * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market * @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?: {}): Promise<Ticker>; handleTicker(client: Client, message: any): any; /** * @method * @name bittrade#watchTrades * @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?: {}): Promise<Trade[]>; handleTrades(client: Client, message: any): any; /** * @method * @name bittrade#watchOHLCV * @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?: {}): Promise<OHLCV[]>; handleOHLCV(client: Client, message: any): void; /** * @method * @name bittrade#watchOrderBook * @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 * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols */ watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>; handleOrderBookSnapshot(client: Client, message: any, subscription: any): void; watchOrderBookSnapshot(client: any, message: any, subscription: any): Promise<any>; handleDelta(bookside: any, delta: any): void; handleDeltas(bookside: any, deltas: any): void; handleOrderBookMessage(client: Client, message: any, orderbook: any): any; handleOrderBook(client: Client, message: any): void; handleOrderBookSubscription(client: Client, message: any, subscription: any): void; handleSubscriptionStatus(client: Client, message: any): any; handleSystemStatus(client: Client, message: any): any; handleSubject(client: Client, message: any): void; pong(client: any, message: any): Promise<void>; handlePing(client: Client, message: any): void; handleErrorMessage(client: Client, message: any): any; handleMessage(client: Client, message: any): void; }