Skip to content

API Reference

dgbit provides multiple interfaces for interacting with the platform.

Available APIs

  • REST API


    HTTP endpoints for backtesting, data, and execution

    REST API Reference

  • :material-websocket:{ .lg .middle } WebSocket


    Real-time event streaming and updates

    WebSocket Reference

  • Python SDK


    Direct Python interface to dgbit components

    Python SDK

Quick Reference

Base URL

http://localhost:8000/api

Authentication

Currently, dgbit doesn't require authentication for local deployment. For production, implement authentication via reverse proxy or custom middleware.

Response Format

All API responses are JSON:

{
    "status": "ok",
    "data": { ... }
}

Error responses:

{
    "detail": "Error message",
    "status_code": 400
}

Common Endpoints

Endpoint Method Description
/api/health GET Service health check
/api/backtests POST Schedule backtest job
/api/jobs GET List all jobs
/api/strategies GET List available strategies
/api/data/klines GET Fetch OHLCV data