Skip to main content

fahali-guard — 3-Line Pre-Trade Execution Guard (FRCT v1) for Python AI Agents

Zero-dependency fail-closed risk clearance guard for autonomous AI trading agents across CCXT, Hyperliquid Python SDK, Alpaca, LangGraph, and CrewAI.

Install

pip install fahali-guard

Zero-Signup Quickstart (< 10 Seconds)

import ccxt
from fahali_guard import FahaliGuard, guard_ccxt

trial = FahaliGuard.mint_sandbox_key("my-autonomous-bot")
guard = FahaliGuard(api_key=trial["apiKey"], auto_resize_parameter_breaches=True)
exchange = guard_ccxt(ccxt.binance(), guard)

# Automatically checks Fahali FRCT before any order packet leaves your process:
# - CLEAR -> attaches clientOrderId receipt tag and executes
# - CLEAR_WITH_CONSTRAINTS -> scales size down (e.g. 50% stress haircut) & enforces TWAP_ONLY
# - BLOCK_ESCALATE -> raises FahaliClearanceBlockedError BEFORE hitting the exchange
exchange.create_order("SOL/USDT", "limit", "buy", 50, 180.0)

Hyperliquid Perpetuals Wrapper

from fahali_guard import FahaliGuard, guard_hyperliquid

guard = FahaliGuard(api_key="sk_live_...", auto_resize_parameter_breaches=True)
hl = guard_hyperliquid(hl_exchange, guard)
hl.order("SOL", True, 100.0, 180.0, {"limit": {"tif": "Gtc"}})

Observation and pre-trade attestation only — Fahali holds zero custody and routes no orders.

Metadata

Release files for fahali-guard 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fahali-guard 1.0.0
File Size Uploaded Provenance Actions
fahali_guard-1.0.0.tar.gz 7.1 kB With provenance Details for fahali_guard-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fahali-guard 1.0.0
File Interpreter ABI Platform Actions
fahali_guard-1.0.0-py3-none-any.whl Python 3 none any Details for fahali_guard-1.0.0-py3-none-any.whl

Total release size: 13.5 kB

Release files / fahali_guard-1.0.0.tar.gz

Download URL fahali_guard-1.0.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
84ed8622a873e6836580e3e97590e472c764ab4755f66aa131bd4726d0fc55bb
BLAKE2b-256 checksum
How to use checksums
671feecb9d8bd869d9af46fd2fef569e4dffd6f3f6afaae49fbde9b9395a88a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / fahali_guard-1.0.0-py3-none-any.whl

Download URL fahali_guard-1.0.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d83a98aa4f47a8d3b22b328fbe5b689bceba8c17159130078b71c50ec48bede
BLAKE2b-256 checksum
How to use checksums
cec721ca52dbab75809b7f73c66795b0f7d40a84479d5f6558a0a586913199a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for fahali-guard 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fahali_guard-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page