Module endpoints

Source
Expand description

§Endpoint Management Module

This module provides centralized endpoint definitions and rate limiting configuration for all KiteConnect API endpoints. It ensures consistent URL construction, proper HTTP methods, and compliance with API rate limits.

§Architecture

The endpoint system is built around three core components:

  1. KiteEndpoint - Enum defining all available API endpoints
  2. RateLimitCategory - Categorizes endpoints by their rate limits
  3. HttpMethod - Defines HTTP methods used by endpoints

§Rate Limiting

KiteConnect API enforces different rate limits based on endpoint functionality:

  • Quote data: 1 request/second (most restrictive)
  • Historical data: 3 requests/second
  • Order operations: 10 requests/second
  • Standard operations: 3 requests/second

§URL Construction

Each endpoint knows how to construct its URL path and determine its HTTP method:

use kiteconnect_async_wasm::connect::endpoints::{KiteEndpoint, HttpMethod};

let endpoint = KiteEndpoint::Quote;
assert_eq!(endpoint.path(), "/quote");
assert_eq!(endpoint.method(), HttpMethod::GET);

§Thread Safety

All types in this module are Send + Sync and can be safely used across multiple threads without synchronization.

Structs§

Endpoint
Endpoint configuration containing method, path, and rate limit info

Enums§

HttpMethod
HTTP method types for API requests
KiteEndpoint
Comprehensive enum of all KiteConnect API endpoints
RateLimitCategory
Rate limit categories based on official KiteConnect API documentation