ccxt
Version:
134 lines (133 loc) • 8.03 kB
TypeScript
import coinbaseexchangeRest from '../coinbaseexchange.js';
import type { Tickers, Int, Ticker, Str, Strings, OrderBook, Trade, Order } from '../base/types.js';
import Client from '../base/ws/Client.js';
export default class coinbaseexchange extends coinbaseexchangeRest {
describe(): any;
authenticate(): {
timestamp: number;
key: string;
signature: any;
passphrase: string;
};
subscribe(name: any, symbol?: any, messageHashStart?: any, params?: {}): Promise<any>;
subscribeMultiple(name: any, symbols?: any[], messageHashStart?: any, params?: {}): Promise<any>;
/**
* @method
* @name coinbaseexchange#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>;
/**
* @method
* @name coinbaseexchange#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
* @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
* @param {object} [params] extra parameters specific to the exchange API endpoint
* @param {string} [params.channel] the channel to subscribe to, tickers by default. Can be tickers, sprd-tickers, index-tickers, block-tickers
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
*/
watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
/**
* @method
* @name coinbaseexchange#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[]>;
/**
* @method
* @name coinbase#watchTradesForSymbols
* @description get the list of most recent trades for a particular symbol
* @param {string[]} symbols 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}
*/
watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
/**
* @method
* @name coinbaseexchange#watchMyTrades
* @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?: {}): Promise<Trade[]>;
/**
* @method
* @name coinbaseexchange#watchMyTradesForSymbols
* @description watches information on multiple trades made by the user
* @param {string[]} symbols unified symbol of the market to fetch trades for
* @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}
*/
watchMyTradesForSymbols(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
/**
* @method
* @name coinbaseexchange#watchOrdersForSymbols
* @description watches information on multiple orders made by the user
* @param {string[]} symbols unified symbol of the market to fetch orders for
* @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 [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
*/
watchOrdersForSymbols(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
/**
* @method
* @name coinbaseexchange#watchOrders
* @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
* @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 coinbaseexchange#watchOrderBookForSymbols
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
* @param {string[]} symbols unified array of symbols
* @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
*/
watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
/**
* @method
* @name coinbaseexchange#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>;
handleTrade(client: Client, message: any): any;
handleMyTrade(client: Client, message: any): any;
parseWsTrade(trade: any, market?: any): Trade;
parseWsOrderStatus(status: any): string;
handleOrder(client: Client, message: any): void;
parseWsOrder(order: any, market?: any): Order;
handleTicker(client: Client, message: any): any;
parseTicker(ticker: any, market?: any): Ticker;
handleDelta(bookside: any, delta: any): void;
handleDeltas(bookside: any, deltas: any): void;
handleOrderBook(client: Client, message: any): void;
handleSubscriptionStatus(client: Client, message: any): any;
handleErrorMessage(client: Client, message: any): boolean;
handleMessage(client: Client, message: any): void;
}