UNPKG

ccxt

Version:

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

109 lines (108 loc) 5.97 kB
import Exchange from './abstract/coinspot.js'; import type { Balances, Dict, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade } from './base/types.js'; /** * @class coinspot * @augments Exchange */ export default class coinspot extends Exchange { describe(): any; parseBalance(response: any): Balances; /** * @method * @name coinspot#fetchBalance * @description query for balance and get the amount of funds available for trading or funds locked in orders * @see https://www.coinspot.com.au/api#listmybalance * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure} */ fetchBalance(params?: {}): Promise<Balances>; /** * @method * @name coinspot#fetchOrderBook * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data * @see https://www.coinspot.com.au/api#listopenorders * @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 */ fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>; parseTicker(ticker: Dict, market?: Market): Ticker; /** * @method * @name coinspot#fetchTicker * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market * @see https://www.coinspot.com.au/api#latestprices * @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} */ fetchTicker(symbol: string, params?: {}): Promise<Ticker>; /** * @method * @name coinspot#fetchTickers * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market * @see https://www.coinspot.com.au/api#latestprices * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure} */ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>; /** * @method * @name coinspot#fetchTrades * @description get the list of most recent trades for a particular symbol * @see https://www.coinspot.com.au/api#orderhistory * @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 {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades} */ fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>; /** * @method * @name coinspot#fetchMyTrades * @description fetch all trades made by the user * @see https://www.coinspot.com.au/api#rotransaction * @param {string} symbol unified market symbol * @param {int} [since] the earliest time in ms to fetch trades for * @param {int} [limit] the maximum number of trades structures to retrieve * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure} */ fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>; parseTrade(trade: Dict, market?: Market): Trade; /** * @method * @name coinspot#createOrder * @description create a trade order * @see https://www.coinspot.com.au/api#placebuyorder * @param {string} symbol unified symbol of the market to create an order in * @param {string} type must be 'limit' * @param {string} side 'buy' or 'sell' * @param {float} amount how much of currency you want to trade in units of base currency * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure} */ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<any>; /** * @method * @name coinspot#cancelOrder * @description cancels an open order * @see https://www.coinspot.com.au/api#cancelbuyorder * @see https://www.coinspot.com.au/api#cancelsellorder * @param {string} id order id * @param {string} symbol not used by coinspot cancelOrder () * @param {object} [params] extra parameters specific to the exchange API endpoint * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure} */ cancelOrder(id: string, symbol?: Str, params?: {}): Promise<import("./base/types.js").Order>; sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): { url: string; method: string; body: any; headers: any; }; }