TA-Lib (Core C Library) https://ta-lib.org/
  • C 72.1%
  • Rust 22%
  • Python 2.7%
  • C# 1.4%
  • Java 1.4%
  • Other 0.2%
Find a file
mario4tier 1da0e86bb6 docs(spec): explain how an Auto level works and what a proof covers
The tolerance rule named E and W before rZ1 defined them and spoke of an
internal threshold a caller never compares against. The page now says how
a level discards bars and sizes a proof count, that the caller's tolerance
is the level's digits, and which outputs carry the proof's bound and which
reach the digits by measurement.
2026-10-18 22:01:28 -04:00
.claude/skills test(regtest): a compiled test group with no DO_TEST row fails check-source-lists (#542) 2026-10-11 18:08:47 -04:00
.github perf: lower the instruction-count baseline 2026-10-15 09:32:43 +00:00
.vscode chore(vscode): raise jdt.ls heap to 4G for the Java backend sources 2026-08-03 20:17:29 -04:00
bin Clean bin/ from git — only keep HOLDER 2026-03-18 18:50:10 -04:00
cmake fix(i386): the .deb computes with SSE2, not x87 (#443) 2026-09-24 18:50:51 -04:00
dist/digests Update dist package (from ubuntu-latest) 2026-10-15 09:54:29 +00:00
docs docs(ema-seeding): the zero-start compensator beats the SMA seed on prices only at its first output 2026-10-15 14:38:32 -04:00
include perf(kvo): no load in the stream update spans two stores (#484) 2026-10-15 01:23:05 -04:00
lib
m4
scripts feat(csharp): the NuGet package id is TA-Lib; a pack no longer follows the checkout's line endings (#444 B1, B3, F2) 2026-10-13 20:34:31 -04:00
src perf(kvo): no load in the stream update spans two stores (#484) 2026-10-15 01:23:05 -04:00
ta_codegen perf(kvo): no load in the stream update spans two stores (#484) 2026-10-15 01:23:05 -04:00
ta_ref perf(adosc): the EMA coefficients of #505, with the divide's register kept (#507) 2026-10-06 15:10:18 -04:00
website docs(spec): explain how an Auto level works and what a proof covers 2026-10-18 22:01:28 -04:00
.editorconfig refactor(csharp): rename Core.MaxIndex to IndexMax and arm CA1708 (#444 C1) 2026-09-25 04:59:57 -04:00
.gitattributes feat(csharp): the NuGet package id is TA-Lib; a pack no longer follows the checkout's line endings (#444 B1, B3, F2) 2026-10-13 20:34:31 -04:00
.gitignore build(java): the consumer check's compiled class leaves the index 2026-09-19 20:27:10 -04:00
ABI.manifest chore: sources digest after merging dev 2026-10-12 20:53:25 +08:00
ABI.released feat(abi): derive the shared library version from the last published release (#421) 2026-09-15 15:49:12 -04:00
AGENTS.md chore: GitHub stats skip generated bindings; SECURITY uses private reporting; add AGENTS.md 2026-10-04 13:43:48 -04:00
autogen.sh build(autogen): autogen.sh runs autoreconf (#518) 2026-10-07 23:27:36 -04:00
CHANGELOG.md docs(changelog): KVO (#484) 2026-10-15 01:23:23 -04:00
CITATION.cff docs: README gains install, links and license; add CONTRIBUTING and CITATION 2026-10-04 12:17:51 -04:00
CLAUDE.md docs: source builds run autoreconf; the tarball comment names no downstream (#518) 2026-10-07 21:44:44 -04:00
CMakeLists.txt Merge remote-tracking branch 'origin/dev' into feat-kvo 2026-10-13 06:52:12 +08:00
conanfile.py chore(release): the next release is 0.8.3; 0.8.2 is skipped 2026-10-12 18:51:15 -04:00
configure.ac build(autotools): default to -O3 when CFLAGS is not set (#515) 2026-10-06 23:45:28 -04:00
CONTRIBUTING.md docs: README gains install, links and license; add CONTRIBUTING and CITATION 2026-10-04 12:17:51 -04:00
global.json build(csharp): pin the SDK with rollForward "patch", which prefers the pin (#444) 2026-09-24 22:15:19 -04:00
LICENSE chore: bump BSD license copyright year to 2026 2026-07-20 15:18:40 -04:00
Makefile.am docs: source builds run autoreconf; the tarball comment names no downstream (#518) 2026-10-07 21:44:44 -04:00
README-DEVS.md build(csharp): pin the SDK with rollForward "patch", which prefers the pin (#444) 2026-09-24 22:15:19 -04:00
README.md docs(readme): feature cards on the homepage and a feature table in the README, under one opening sentence 2026-10-10 00:19:11 -04:00
rust-toolchain.toml ci: pin the Rust toolchain to 1.97.0 (rust-toolchain.toml) 2026-07-15 22:37:07 -04:00
SECURITY.md chore: GitHub stats skip generated bindings; SECURITY uses private reporting; add AGENTS.md 2026-10-04 13:43:48 -04:00
ta-lib.dpkg.in
ta-lib.pc.in fix(cmake,build): link libm so libta-lib is self-contained (#77) 2026-07-06 16:19:01 -04:00
ta-lib.spec.in chore(release): the next release is 0.8.3; 0.8.2 is skipped 2026-10-12 18:51:15 -04:00
ta_func_api.xml Merge remote-tracking branch 'origin/dev' into feat-kvo 2026-10-12 20:52:53 +08:00
ta_func_list.txt Merge remote-tracking branch 'origin/dev' into feat-kvo 2026-10-12 20:52:53 +08:00
VERSION chore(release): the next release is 0.8.3; 0.8.2 is skipped 2026-10-12 18:51:15 -04:00

TA-Lib

TA-Lib implements the standard technical analysis algorithms used across the industry since 2001, and is often the reference other libraries test their results against.

release license main nightly tests dev nightly tests Discord chat

Features

200+ indicators
ADX, MACD, RSI, Stochastic, Bollinger Bands and more, plus candlestick pattern recognition. See the complete list.

Batch and streaming
Compute a whole array, or update one bar at a time without recomputing the history. Streaming API.

Native in four languages
C/C++, Java, C# and Rust. Wrappers for Python, R, and more.

Made for integration
Glue-code friendly. Function metadata drives your UI, parameter range, automation and generated bindings. Abstract API.

  • No third-party dependencies.
  • All native implementations are generated from one source and tested against the C reference.

Example

A 30-bar simple moving average, over an array and then on a live feed.

C/C++
#include <ta_libc.h>

TA_Initialize();

/* Batch: out[0] is the value at bar outBegIdx. */
int outBegIdx, outNBElement;
TA_SMA( 0, n - 1, close, 30, &outBegIdx, &outNBElement, out );

/* Streaming: open on history, then one call per bar. */
TA_SMA_Stream *s;
double sma;
TA_SMA_Open( &s, close, n, 30, &sma );
TA_SMA_Update( s, newClose, &sma );     /* a bar closed */
TA_SMA_Peek( s, formingClose, &sma );   /* bar still forming; state unchanged */
TA_SMA_Close( s );

API · Streaming

Rust
use ta_lib::Core;

let core = Core::new();

// Batch: out[0] is the value at bar range.beg_idx.
let mut out = vec![0.0; close.len()];
let range = core.sma(0, close.len() - 1, &close, 30, &mut out)?;

// Streaming: open on history, then one call per bar.
let (mut s, last) = core.sma_open(&close, 30)?;
let v = s.update(new_close)?;        // a bar closed
let p = s.peek(forming_close)?;      // bar still forming; state unchanged

API · Streaming

Java
import io.github.talib.Core;
import io.github.talib.OutRange;

Core core = Core.DEFAULT;

// Batch: out[0] is the value at bar r.begIdx().
double[] out = new double[close.length];
OutRange r = core.sma(0, close.length - 1, close, 30, out);

// Streaming: open on history, then one call per bar.
Core.SmaStream s = core.smaOpen(close, 30);
double v = s.update(newClose);       // a bar closed
double p = s.peek(formingClose);     // bar still forming; state unchanged

API · Streaming

C#
using TALib;

var core = Core.Default;

// Batch: outReal[0] is the value at bar r.BegIdx.
var outReal = new double[close.Length];
OutRange r = core.Sma(0, close.Length - 1, close, 30, outReal);

// Streaming: open on history, then one call per bar.
Core.SmaStream s = core.SmaOpen(close, 30);
double v = s.Update(newClose);       // a bar closed
double p = s.Peek(formingClose);     // bar still forming; state unchanged

API · Streaming

Install

Language
C/C++ brew install ta-lib, vcpkg install talib, or installers and packages
Java Maven Central
C# Instructions
Rust Instructions
Python pip install TA-Lib (ta-lib-python, a wrapper of this library)
Others R, Go, Ruby, PHP and more

License

BSD 3-Clause: free for open-source and commercial use. See LICENSE.

Star Count

Give a ⭐: backtests show a 100% correlation with maintainer happiness.

TA-Lib/ta-lib GitHub star history