Skip to main content

Local-first security scanner and egress proxy for trading bots and AI agents.

Project description

Quant Tape

The Last Line Before The Market.

Quant Tape is a local security scanner for trading bots and algorithmic trading code. It finds exposed broker keys, embedded credentials, and risky execution patterns before they hit production.

  • Local-first - scans your files, repos, and optional git history without uploading code
  • Trading-aware - built for broker wrappers, sizing logic, execution flows, and bot loops
  • CI-ready - outputs findings as Console, JSON, and SARIF

What The SDK Does Today

Quant Tape currently ships with a scanner built for trading codebases.

  • Detects 33 built-in rules across credentials, broker secrets, and trading-code risk patterns
  • Suppresses obvious false positives in common trading-bot structures
  • Scans single files, full directories, and optional git history
  • Fits local development, pre-commit checks, and CI pipelines
  • Exports findings as Console, JSON, or SARIF

What It Looks For

  • Hardcoded broker/API secrets
  • Embedded credentials and webhook URLs
  • Unsafe market-order usage
  • Full-account position sizing without caps
  • Busy loops and risky blocking sleeps
  • Hardcoded trading symbols and other reusable-bot mistakes

Supported broker and market-data patterns include:

  • Alpaca
  • Binance
  • Coinbase
  • Interactive Brokers
  • Kraken
  • TD Ameritrade / Schwab
  • Tradier
  • Polygon.io

Quick Start

CLI

pip install quanttape
quanttape scan my_bot.py
quanttape scan ./my_project/ --output json
quanttape scan ./my_project/ --git-history

Default behavior is trading-aware scanning. If you want generic raw scanning behavior instead:

quanttape scan my_bot.py --generic-mode

Python SDK

from quanttape import SecretScanner

scanner = SecretScanner()

# Scan a single file
findings = scanner.scan_file("my_bot.py")

# Scan an entire directory
findings = scanner.scan_directory("./trading_bots/")

# Check results
for f in findings:
    print(f"{f.severity} | {f.secret_type} | {f.file}:{f.line}")

With custom rules or generic mode:

from quanttape import SecretScanner

scanner = SecretScanner(
    config_path="my_rules.yaml",    # custom rules file
    trading_bot_mode=False,          # generic scanning (no AST suppression)
)
findings = scanner.scan_directory("./src/")

Output Formats

from quanttape import SecretScanner
from quanttape.output import format_results

findings = SecretScanner().scan_directory("./bots/")

# Rich console output (prints directly)
format_results(findings, "console")

# JSON string
json_output = format_results(findings, "json")

# SARIF string (for GitHub Code Scanning, VS Code, CI)
sarif_output = format_results(findings, "sarif")

Finding Object

Each finding has these attributes:

Attribute Type Description
file str Path to the file
line int Line number
secret_type str Rule that matched (e.g. "Alpaca API Key")
severity str CRITICAL, HIGH, MEDIUM, or LOW
match_preview str Partially redacted preview of the match

Coming Soon

  • Guard SDK - runtime trade validation, kill-switch, drawdown controls
  • Zero-Knowledge Vault - encrypted local-first credential storage

Join the waitlist: quanttape.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quanttape-0.0.20.tar.gz (45.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quanttape-0.0.20-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file quanttape-0.0.20.tar.gz.

File metadata

  • Download URL: quanttape-0.0.20.tar.gz
  • Upload date:
  • Size: 45.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quanttape-0.0.20.tar.gz
Algorithm Hash digest
SHA256 386b8a188758363a95db539b35efebd8be287d8ff0b85bae381c1e15a624193a
MD5 a268bc89557cdcb84d869d581ba80819
BLAKE2b-256 c9a3b76161c21c260adb1850f7b67ded2c32a28c6bd3524880db3d4fd7468a0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for quanttape-0.0.20.tar.gz:

Publisher: publish.yml on quanttape/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quanttape-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: quanttape-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quanttape-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 fee27b3c787bd43ecd63d335dd822c003fad65c2ee626ef5083bb782baaddc9c
MD5 53004ebb7c5748b9179ec4b59e147d6f
BLAKE2b-256 ae01c8545daed18155f647be893141c9055a5fc4af4244ecfddb96cecc65e447

See more details on using hashes here.

Provenance

The following attestation bundles were made for quanttape-0.0.20-py3-none-any.whl:

Publisher: publish.yml on quanttape/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page