UNPKG

ccxt

Version:

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

106 lines (105 loc) 6.16 kB
import arkhamRest from '../arkham.js'; import type { Int, OHLCV, Str, Strings, OrderBook, Order, Trade, Balances, Ticker, Dict, Position, Bool } from '../base/types.js'; import Client from '../base/ws/Client.js'; export default class arkham extends arkhamRest { describe(): any; handleMessage(client: Client, message: any): void; subscribe(messageHash: string, rawChannel: string, params: Dict): Promise<any>; /** * @method * @name arkham#watchTicker * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market * @see https://arkm.com/docs#stream/ticker * @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): void; parseWsTicker(message: any, market?: any): Ticker; /** * @method * @name arkham#watchOHLCV * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market * @see https://arkm.com/docs#stream/candles * @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): any; parseWsOHLCV(ohlcv: any, market?: any): OHLCV; /** * @method * @name arkham#watchOrderBook * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data * @see https://arkm.com/docs#stream/l2_updates * @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>; handleOrderBook(client: Client, message: any): void; handleDelta(bookside: any, delta: any): void; /** * @method * @name arkham#watchTrades * @description watches information on multiple trades made in a market * @see https://arkm.com/docs#stream/trades * @param {string} symbol unified market symbol of the market trades were made in * @param {int} [since] the earliest time in ms to fetch orders 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} */ watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>; handleTrades(client: Client, message: any): void; parseWsTrade(trade: any, market?: any): Trade; authenticate(params?: {}): Promise<void>; /** * @method * @name arkham#watchBalance * @description watch balance and get the amount of funds available for trading or funds locked in orders * @see https://arkm.com/docs#stream/balances * @param {object} [params] extra parameters specific to the exchange API endpoint * @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure} */ watchBalance(params?: {}): Promise<Balances>; handleBalance(client: Client, message: any): void; parseWsBalance(balance: any): Balances; /** * @method * @name arkham#watchPositions * @see https://arkm.com/docs#stream/positions * @description watch all open positions * @param {string[]} [symbols] list of unified market symbols * @param {int} [since] the earliest time in ms to fetch positions for * @param {int} [limit] the maximum number of positions to retrieve * @param {object} params extra parameters specific to the exchange API endpoint * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure} */ watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>; handlePositions(client: any, message: any): void; parseWsPositions(positions: any[], symbols?: string[], params?: {}): Position[]; parseWsPosition(position: any, market?: any): Position; /** * @method * @name arkham#watchOrders * @description watches information on multiple orders made by the user * @see https://arkm.com/docs#stream/order_statuses * @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[]>; handleOrder(client: Client, message: any): void; parseWsOrder(order: any, market?: any): Order; handleErrorMessage(client: Client, response: any): Bool; }