Installation
Get started with VectorTA in your Rust, Python, or JavaScript projects
Rust
Add VectorTA to your Cargo.toml dependencies:
[dependencies]
vectorta = "0.1.0" Then use it in your code:
use vectorta::indicators::*;
fn main() {
let prices = vec![100.0, 102.0, 101.0, 103.0, 102.0];
let sma = sma(&prices, 3);
println!("SMA: {:?}", sma);
} Python
Install using pip:
pip install vectorta Import and use:
import vectorta as ta
prices = [100.0, 102.0, 101.0, 103.0, 102.0]
sma = ta.sma(prices, period=3)
print(f"SMA: {sma}") JavaScript/TypeScript
Install via npm:
npm install @vectorta/core Use in your project:
import { sma } from '@vectorta/core';
const prices = [100.0, 102.0, 101.0, 103.0, 102.0];
const result = sma(prices, 3);
console.log('SMA:', result); WebAssembly
For browser-based applications, use the WebAssembly build:
<script type="module">
import init, { sma } from './vectorta_wasm.js';
await init();
const prices = [100.0, 102.0, 101.0, 103.0, 102.0];
const result = sma(prices, 3);
console.log('SMA:', result);
</script> Requirements
- • Rust: 1.70.0 or higher
- • Python: 3.8 or higher
- • Node.js: 16.0 or higher
- • Browsers: Any modern browser with WebAssembly support
Features
High Performance
SIMD-optimized implementations for maximum speed
300+ Indicators
Comprehensive collection of technical analysis tools
Memory Safe
Rust's ownership system prevents crashes and data races
Cross-Platform
Works on desktop, server, mobile, and web browsers