@itick/browser-sdk
Version:
Official iTick API SDK for browser. Real-time & historical data for global Stocks, Forex, Crypto, Indices, Futures, Funds, Precious Metals. REST (OHLCV/K-line) + low-latency WebSocket. Promise-based, TypeScript-ready. For quant trading & fintech
53 lines • 2.39 kB
TypeScript
/**
* Base Data Module
* Provides access interfaces for basic data such as symbol lists and holidays
*/
import { Client, ClientOptions } from '../../utils/client';
import { APIResponse, SymbolInfo, MarketHoliday } from '../../types';
/**
* Base Data SDK Client
* Specialized for basic data access
*/
export declare class BaseClient extends Client {
constructor(token: string, options?: ClientOptions);
/**
* Get Product List
* @description Returns corresponding symbol information list based on product type, market code and optional code filter
* @param params - Query parameters object
* @param params.type - Asset type, supports stock/crypto/forex/indices/future/fund
* @param params.region - Market code (e.g., GB, BA, CN, US, HK, JP etc. {@link https://docs.itick.org/rest-api/basics/symbol-list iTick Official Documentation})
* @param params.code - Optional, symbol code keyword for fuzzy matching filter
* @returns Returns Promise, on success returns standardized API response, data is {@link SymbolInfo} array
* @example
* ```typescript
* // Get US stock list
* getSymbolList({ type: 'stock', region: 'US' }).then(response => {
* console.log(response.data); // Output US stock symbol list
* }).catch(error => {
* console.error('Error fetching symbol list:', error);
* });
* ```
*/
getSymbolList(params: {
type: 'stock' | 'crypto' | 'forex' | 'indices' | 'future' | 'fund';
region: string;
code?: string;
}): Promise<APIResponse<SymbolInfo[]>>;
/**
* Get Country/Region Holiday List
* @description Returns corresponding market holiday list based on country/region code
* @param code Country/region code {@link https://docs.itick.org/rest-api/basics/symbol-holidays iTick Official Documentation}
* @returns Returns Promise, on success returns standardized API response, data is {@link MarketHoliday} array
* @example
* ```typescript
* // Get US holiday list
* getSymbolHolidays('US').then(response => {
* console.log(response.data); // Output US holiday list
* }).catch(error => {
* console.error('Error fetching symbol holidays:', error);
* });
* ```
*/
getSymbolHolidays(code: string): Promise<APIResponse<MarketHoliday[]>>;
}
//# sourceMappingURL=index.d.ts.map