Skip to main content

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

Project description

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

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

bitsentry-0.2.0.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

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

bitsentry-0.2.0-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file bitsentry-0.2.0.tar.gz.

File metadata

  • Download URL: bitsentry-0.2.0.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for bitsentry-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a53a229307a24bebc4be35d021f7a855c78c5e5a729ce8f51b4c7b6ebca65afc
MD5 e6d7eb764162407cfb3de5e4750dbd14
BLAKE2b-256 c904ff1c9d6674ecf04d3463ab7aaecf987b7ae7a3a0179ec067981476137240

See more details on using hashes here.

File details

Details for the file bitsentry-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bitsentry-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for bitsentry-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37201446880c34eae84f74bc0c53d252e48ee104bcc45862e2726df2ede42736
MD5 a6ca6bec3ff0009b7a5191d37775ee97
BLAKE2b-256 a1a3c782bb6c8ada147299937fca4f74ba101fee936914b0c69b89ac17d74e34

See more details on using hashes here.

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