BitSentry
Safety, audit, and intelligence layer for Bitget trading agents and traders.
Structure
bitsentry/bgc_client.py— Bitget API clientbitsentry/audit_engine.py— Trade audit and loggingbitsentry/risk_guardian.py— Pre-trade risk enforcementbitsentry/position_monitor.py— Real-time position trackingbitsentry/strategy_evaluator.py— Strategy scoring and auditingbitsentry/api/server.py— FastAPI REST server (11 endpoints)config/risk_rules.yaml— Configurable risk parametersrun.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)
| File | Size | Uploaded | |
|---|---|---|---|
| bitsentry-0.2.0.tar.gz | 31.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|