UNPKG

client-twelve-rapid

Version:

Complete TypeScript library for Twelve Data API with 154 endpoints, technical indicators, and intelligent rate limiting

31 lines (30 loc) 769 B
import type { TwelveDataConfig, ApiResponse } from '../types/index.js'; /** * HTTP Client for Twelve Data API with built-in rate limiting */ export declare class HttpClient { private config; private rateLimiter; private baseUrl; constructor(config: TwelveDataConfig); /** * Build query string from parameters */ private buildQueryString; /** * Make a GET request to the API */ get<T = any>(endpoint: string, params?: Record<string, any>): Promise<ApiResponse<T>>; /** * Get rate limiter status */ getRateLimiterStatus(): { tokens: number; queueLength: number; }; /** * Reset rate limiter */ resetRateLimiter(): void; updateApiKey(apiKey: string): void; }