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.1.0.tar.gz (28.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.1.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bitsentry-0.1.0.tar.gz
  • Upload date:
  • Size: 28.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.1.0.tar.gz
Algorithm Hash digest
SHA256 b8b499e3876ce5ee999e30d7d95b9919a854d46c33f311910ca4d1d3c9dab4ce
MD5 9a7773def9af335e63efa48bfab8f63b
BLAKE2b-256 f48a63e23a1f78aabedcf8e94bb7b037c17c6c04914fb1b83a087adbad25fae4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bitsentry-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0d69a494b0d6957a3f60d2151f353737347e09cac84a2544525c9bfc3138720
MD5 6b3e87dfaf7dbddfa0c8e840eedd4049
BLAKE2b-256 46a07065102c4315759b0f1f9363b420ab7c56517b8e785b9785a588a6f16580

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