UNPKG

kucoin-api

Version:

Complete & robust Node.js SDK for Kucoin's REST APIs and WebSockets, with TypeScript & strong end to end tests.

101 lines 3.13 kB
import { BaseRestClient } from './lib/BaseRestClient.js'; import { REST_CLIENT_TYPE_ENUM, } from './lib/requestUtils.js'; /** * Unified Trading Account Client * * This client provides access to the Unified Trading Account API endpoints * that unify market data access across Spot, Futures, and Margin trading. */ export class UnifiedAPIClient extends BaseRestClient { constructor(restClientOptions = {}, requestOptions = {}) { super(restClientOptions, requestOptions); return this; } getClientType() { return REST_CLIENT_TYPE_ENUM.unifiedTradingAccount; } /** * * REST - Unified Trading Account - Market Data * */ /** * Get Announcements * This interface can obtain the latest news announcements, and the default * page search is for announcements within a month. */ getAnnouncements(params) { return this.get('api/ua/v1/market/announcement', params); } /** * Get Currency * Request the currency details of a specified currency via this endpoint. */ getCurrency(params) { return this.get('api/ua/v1/market/currency', params); } /** * Get Symbol * Request a list of available currency pairs for trading via this endpoint. */ getSymbols(params) { return this.get('api/ua/v1/market/instrument', params); } /** * Get Ticker * Request market tickers for the trading pairs in the market (including 24h volume). */ getTickers(params) { return this.get('api/ua/v1/market/ticker', params); } /** * Get Trades * Request via this endpoint to get the latest 100 public trades of the specified symbol. */ getTrades(params) { return this.get('api/ua/v1/market/trade', params); } /** * Get OrderBook * Query order book depth information (aggregated by price). */ getOrderBook(params) { return this.get('api/ua/v1/market/orderbook', params); } /** * Get Klines * Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. */ getKlines(params) { return this.get('api/ua/v1/market/kline', params); } /** * Get Current Funding Rate * Get current Futures funding fee rate. */ getCurrentFundingRate(params) { return this.get('api/ua/v1/market/funding-rate', params); } /** * Get History Funding Rate * Query the Futures funding rate at each settlement time point within a certain time range. */ getHistoryFundingRate(params) { return this.get('api/ua/v1/market/funding-rate-history', params); } /** * Get Cross Margin Config * Request the configure info of the 'spot cross margin' via this endpoint. */ getCrossMarginConfig() { return this.get('api/ua/v1/market/cross-config'); } /** * Get Service Status * Get the service status. */ getServiceStatus(params) { return this.get('api/ua/v1/server/status', params); } } //# sourceMappingURL=UnifiedAPIClient.js.map