kucoin-api
Version:
Complete & robust Node.js SDK for Kucoin's REST APIs and WebSockets, with TypeScript & strong end to end tests.
105 lines • 3.32 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnifiedAPIClient = void 0;
const BaseRestClient_js_1 = require("./lib/BaseRestClient.js");
const requestUtils_js_1 = require("./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.
*/
class UnifiedAPIClient extends BaseRestClient_js_1.BaseRestClient {
constructor(restClientOptions = {}, requestOptions = {}) {
super(restClientOptions, requestOptions);
return this;
}
getClientType() {
return requestUtils_js_1.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);
}
}
exports.UnifiedAPIClient = UnifiedAPIClient;
//# sourceMappingURL=UnifiedAPIClient.js.map