Skip to main content

BitSentry

Safety, audit, and intelligence layer for Bitget trading agents and traders.

Structure

  • bitsentry/bgc_client.py — Bitget API client
  • bitsentry/audit_engine.py — Trade audit and logging
  • bitsentry/risk_guardian.py — Pre-trade risk enforcement
  • bitsentry/position_monitor.py — Real-time position tracking
  • bitsentry/strategy_evaluator.py — Strategy scoring and auditing
  • bitsentry/api/server.py — FastAPI REST server (11 endpoints)
  • config/risk_rules.yaml — Configurable risk parameters
  • run.py — Server launcher with startup banner

Setup

make install   # pip install -e .
make run       # start server on http://127.0.0.1:8000
make validate  # generate audit report + HTML
make verify    # verify SHA-256 integrity hash

API Endpoints

Method Path Description
GET /health Server health + mode
GET /positions Open positions with safety ratings
GET /positions/summary GREEN/YELLOW/RED counts
GET /positions/safe-to-trade Pre-trade exposure check
POST /risk/check 5-layer risk middleware
GET /strategy/leaderboard Strategies ranked by profit factor
GET /strategy/{tag} Strategy health verdict
POST /strategy/record Record a trade result
GET /audit/report Full audit + SHA-256 hash
GET /audit/verify Verify integrity hash
GET /docs Swagger UI

Stack

Python 3.10+, FastAPI, SQLite, bgc CLI, Pydantic v2

Metadata

Release files for bitsentry 0.2.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 bitsentry 0.2.0
File Size Uploaded
bitsentry-0.2.0.tar.gz 31.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bitsentry 0.2.0
File Interpreter ABI Platform
bitsentry-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 59.6 kB

Release files / bitsentry-0.2.0.tar.gz

Download URL bitsentry-0.2.0.tar.gz
Size 31.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a53a229307a24bebc4be35d021f7a855c78c5e5a729ce8f51b4c7b6ebca65afc
BLAKE2b-256 checksum
How to use checksums
c904ff1c9d6674ecf04d3463ab7aaecf987b7ae7a3a0179ec067981476137240
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / bitsentry-0.2.0-py3-none-any.whl

Download URL bitsentry-0.2.0-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37201446880c34eae84f74bc0c53d252e48ee104bcc45862e2726df2ede42736
BLAKE2b-256 checksum
How to use checksums
a1a3c782bb6c8ada147299937fca4f74ba101fee936914b0c69b89ac17d74e34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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