API Reference

TechKit provides multiple APIs for different use cases:

API Layers

        graph TB
    A[Python API] --> E[C++ Core]
    B[Node.js Native] --> E
    C[WebAssembly] --> E
    D[C API] --> E
    
    subgraph "High-Level APIs"
        A
        B
        C
    end
    
    subgraph "Low-Level APIs"
        D
        E
    end
    

Choose Your API

API

Best For

Performance

Ease of Use

Python

Data analysis, backtesting

⭐⭐⭐⭐

⭐⭐⭐⭐⭐

Node.js

Server-side, real-time

⭐⭐⭐⭐

⭐⭐⭐⭐

Browser/WASM

Web apps, charts

⭐⭐⭐

⭐⭐⭐⭐

C++

Native apps, max performance

⭐⭐⭐⭐⭐

⭐⭐⭐

C ABI

Language bindings, embedding

⭐⭐⭐⭐⭐

⭐⭐

Common Patterns

All APIs share these concepts:

Result Types

# Single value
class Result:
    value: float  # Calculated value
    valid: bool   # True if warmup complete

# Multi-output (MACD, BBands, etc.)
class MACDResult:
    macd: float
    signal: float
    histogram: float
    valid: bool

Lifecycle

  1. Create - Instantiate with parameters

  2. Update - Feed data incrementally, or

  3. Calculate - Process batch data

  4. Reset - Clear state for reuse

  5. Destroy - Automatic (Python/C++) or explicit (C)