ccxt
Version:
109 lines (108 loc) • 6.6 kB
TypeScript
import bullishRest from '../bullish.js';
import type { Balances, Int, Order, OrderBook, Position, Str, Strings, Ticker, Trade } from '../base/types.js';
import Client from '../base/ws/Client.js';
export default class bullish extends bullishRest {
describe(): any;
requestId(): any;
ping(client: Client): {
jsonrpc: string;
type: string;
method: string;
params: {};
id: any;
};
handlePong(client: Client, message: any): any;
watchPublic(url: string, messageHash: string, request?: {}, params?: {}): Promise<any>;
watchPrivate(messageHash: string, subscribeHash: string, request?: {}, params?: {}): Promise<any>;
/**
* @method
* @name bullish#watchTrades
* @description get the list of most recent trades for a particular symbol
* @see https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--unified-anonymous-trades-websocket-unauthenticated
* @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 bullish#watchTicker
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
* @see https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--anonymous-market-data-price-tick-unauthenticated
* @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;
/**
* @method
* @name bullish#watchOrderBook
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
* @see https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--multi-orderbook-websocket-unauthenticated
* @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;
separateBidsOrAsks(entry: any): any[];
/**
* @method
* @name bullish#watchOrders
* @description watches information on multiple orders made by the user
* @see https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--private-data-websocket-authenticated
* @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} [params.tradingAccountId] the trading account id to fetch entries for
* @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[]>;
handleOrders(client: Client, message: any): void;
/**
* @method
* @name bullish#watchMyTrades
* @description watches information on multiple trades made by the user
* @see https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--private-data-websocket-authenticated
* @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
* @param {string} [params.tradingAccountId] the trading account id to fetch entries for
* @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 bullish#watchBalance
* @description watch balance and get the amount of funds available for trading or funds locked in orders
* @see https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--private-data-websocket-authenticated
* @param {object} [params] extra parameters specific to the exchange API endpoint
* @param {string} [params.tradingAccountId] the trading account id to fetch entries for
* @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 bullish#watchPositions
* @see https://api.exchange.bullish.com/docs/api/rest/trading-api/v2/#overview--private-data-websocket-authenticated
* @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: Client, message: any): void;
handleErrorMessage(client: Client, message: any): void;
handleMessage(client: Client, message: any): void;
}