How zeroam/kispy works
Main Components
a) Client Layer:
• It to KisAuth component for authentication handling
• Rate limiter component (from rate_limit.py)
• Domestic Stock Services
• Overseas Stock Services
c) Core Infrastructure:
• Authentication System
• Rate Limiting System
• Error Handling System
Detailed Component Breakdown
a) For Each Stock Service Domain (Domestic/Overseas):
• Account Management
• Order Processing
• Quote/Price Information
• Real-time Data Handling
b) Shared Components:
• Models Layer
• Response Handlers
• Utility Functions
[Client Applications]
• ↓
• [KisClient]
• ↓
[Authentication Layer] ← → [Rate Limiter]
• ↓
┌─────────┴─────────┐
[Domestic Stock] [Overseas Stock]
• → Account ├→ Account
• → Order ├→ Order
• → Quote ├→ Quote
• → Realtime ├→ Realtime
• → Analysis └→ Market Data
Important Elements to Highlight
a) Data Flow:
• How requests flow from client through authentication
• Rate limiting checks
• Error handling paths
b) Key Interactions:
• Token refresh flows
• Real-time data streams
• API call patterns
Technical Details
• Rate limit annotation (19 calls/second)
• Authentication token management
• Error code handling
• Model transformations
Implementation Notes
• Clear separation between domestic and overseas stock operations
• Centralized authentication and rate limiting
• Model-driven design pattern
• Error handling and response processing