{
  "openapi": "3.1.0",
  "info": {
    "title": "BTCB2 Pools API",
    "version": "1.0.0-preview",
    "description": "Versioned public, authenticated, and seller-agent API contract. Financial writes are not enabled."
  },
  "servers": [
    {
      "url": "https://btcb2pools.com/api/v1"
    }
  ],
  "tags": [
    {
      "name": "Public"
    },
    {
      "name": "Authenticated"
    },
    {
      "name": "Seller agent"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "API health",
        "responses": {
          "200": {
            "description": "Health state"
          }
        }
      }
    },
    "/status": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Component status; unknown services are never reported healthy",
        "responses": {
          "200": {
            "description": "Status"
          }
        }
      }
    },
    "/platform/stats": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Verified live platform metrics or explicit unavailable state",
        "responses": {
          "200": {
            "description": "Platform statistics"
          }
        }
      }
    },
    "/chains": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Configured chains",
        "responses": {
          "200": {
            "description": "Chains"
          }
        }
      }
    },
    "/coins": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Configured coins",
        "responses": {
          "200": {
            "description": "Coins"
          }
        }
      }
    },
    "/algorithms": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Configured algorithms",
        "responses": {
          "200": {
            "description": "Algorithms"
          }
        }
      }
    },
    "/pools": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Pools and verified endpoint status",
        "responses": {
          "200": {
            "description": "Pools"
          }
        }
      }
    },
    "/market/stats": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Market statistics by algorithm",
        "responses": {
          "200": {
            "description": "Market stats"
          }
        }
      }
    },
    "/market/listings": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Public verified listings",
        "responses": {
          "200": {
            "description": "Listings"
          }
        }
      }
    },
    "/market/orders": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Public buyer order book",
        "responses": {
          "200": {
            "description": "Orders"
          }
        }
      }
    },
    "/market/rentals": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Privacy-preserving completed rental summaries",
        "responses": {
          "200": {
            "description": "Rentals"
          }
        }
      }
    },
    "/blocks": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Pool block records",
        "responses": {
          "200": {
            "description": "Blocks"
          }
        }
      }
    },
    "/fees": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Versioned fee schedules",
        "responses": {
          "200": {
            "description": "Fees"
          }
        }
      }
    },
    "/miners/{address}": {
      "get": {
        "tags": [
          "Public"
        ],
        "summary": "Public address-based mining dashboard",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Miner"
          },
          "404": {
            "description": "No data"
          }
        }
      }
    },
    "/account": {
      "get": {
        "tags": [
          "Authenticated"
        ],
        "summary": "Authenticated account",
        "responses": {
          "501": {
            "description": "Preview only"
          }
        }
      }
    },
    "/orders": {
      "post": {
        "tags": [
          "Authenticated"
        ],
        "summary": "Create idempotent buyer order",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "501": {
            "description": "Financial writes disabled"
          }
        }
      }
    },
    "/agent/telemetry": {
      "post": {
        "tags": [
          "Seller agent"
        ],
        "summary": "Submit signed rig telemetry",
        "responses": {
          "501": {
            "description": "Agent API disabled"
          }
        }
      }
    }
  }
}