{
    "openapi": "3.0.3",
    "info": {
        "title": "BitTools Developer API",
        "version": "1.0.0",
        "description": "Key-authenticated market API. Accelerator endpoint requires a connected backend and explicit permission."
    },
    "servers": [
        {
            "url": "https://www.bittools.net/api/v1"
        }
    ],
    "security": [
        {
            "BearerAuth": []
        },
        {
            "ApiKeyHeader": []
        }
    ],
    "paths": {
        "/": {
            "get": {
                "summary": "API directory",
                "description": "API identity and available endpoint URLs.",
                "operationId": "directory",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Directory"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/status": {
            "get": {
                "summary": "Service status",
                "description": "Data platform readiness, coin and exchange counts, and latest market update.",
                "operationId": "status",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Status"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/global": {
            "get": {
                "summary": "Global market",
                "description": "Market capitalization, 24h volume, dominance and active cryptocurrency counts.",
                "operationId": "global",
                "parameters": [
                    {
                        "name": "fiat",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Configured fiat currency, e.g. USD. Unsupported values fall back to the configured default."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Global"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/coins": {
            "get": {
                "summary": "Coin market list",
                "description": "Paginated locally stored market data. Meta includes page, limit and has_more.",
                "operationId": "coinlist",
                "parameters": [
                    {
                        "name": "fiat",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Configured fiat currency, e.g. USD. Unsupported values fall back to the configured default."
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        },
                        "description": "One-based page number; default 1."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250,
                            "default": 100
                        },
                        "description": "Items per page, default 100; values are clamped to 1\u2013250."
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Search the stored coin names and symbols."
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "market_cap_desc",
                                "market_cap_asc",
                                "volume_desc",
                                "price_desc",
                                "price_asc",
                                "change_desc",
                                "change_asc"
                            ]
                        },
                        "description": "Sort order; default market_cap_desc."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/CoinList"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/coins/{id}": {
            "get": {
                "summary": "Coin details",
                "description": "Identity, categories, description, market metrics, supply, highs/lows and links. Returns 404 when no stored coin exists.",
                "operationId": "coindetail",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Coin ID, for example bitcoin."
                    },
                    {
                        "name": "fiat",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Configured fiat currency, e.g. USD. Unsupported values fall back to the configured default."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/CoinDetail"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/coins/{id}/history": {
            "get": {
                "summary": "Coin price history",
                "description": "Cached market_chart data. If the requested range is missing, the stored 365-day payload may be returned. Meta.days echoes the requested range, not a guarantee of the stored data span.",
                "operationId": "history",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Coin ID, for example bitcoin."
                    },
                    {
                        "name": "fiat",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Configured fiat currency, e.g. USD. Unsupported values fall back to the configured default."
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "enum": [
                                1,
                                7,
                                14,
                                30,
                                90,
                                180,
                                365
                            ],
                            "default": 365
                        },
                        "description": "Requested history range; default 365."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/History"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/prices": {
            "get": {
                "summary": "Selected prices",
                "description": "Map keyed by coin ID. Unknown or uncached IDs are omitted; a missing price is not fabricated. Accepts up to 100 comma-separated IDs.",
                "operationId": "prices",
                "parameters": [
                    {
                        "name": "fiat",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Configured fiat currency, e.g. USD. Unsupported values fall back to the configured default."
                    },
                    {
                        "name": "ids",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Comma-separated coin IDs, e.g. bitcoin,ethereum."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Prices"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/exchanges": {
            "get": {
                "summary": "Exchange list",
                "description": "Paginated locally stored exchange data.",
                "operationId": "exchangelist",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        },
                        "description": "One-based page number; default 1."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250,
                            "default": 100
                        },
                        "description": "Items per page, default 100; values are clamped to 1\u2013250."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/ExchangeList"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/exchanges/{id}": {
            "get": {
                "summary": "Exchange details",
                "description": "Stored exchange identity, description, public notice and up to 100 markets.",
                "operationId": "exchangedetail",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Exchange ID, for example binance."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/ExchangeDetail"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/accelerator": {
            "post": {
                "summary": "Submit Bitcoin transaction",
                "description": "Not available until the accelerator backend is connected. Requires accelerator permission. Accepted submission is not confirmation.",
                "operationId": "accelerator",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "txid"
                                ],
                                "properties": {
                                    "txid": {
                                        "type": "string",
                                        "pattern": "^[a-fA-F0-9]{64}$",
                                        "description": "Bitcoin transaction ID."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Transaction submission accepted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "txid": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "enum": [
                                                        "submitted"
                                                    ]
                                                }
                                            }
                                        },
                                        "meta": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "413": {
                        "description": "Request body exceeds 2 KB"
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Disabled account or feature permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Data not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Unsupported method",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Service unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer"
            },
            "ApiKeyHeader": {
                "type": "apiKey",
                "in": "header",
                "name": "X-BT-API-Key"
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "required": [
                    "success",
                    "data",
                    "error"
                ],
                "properties": {
                    "success": {
                        "type": "boolean",
                        "enum": [
                            false
                        ]
                    },
                    "data": {
                        "nullable": true
                    },
                    "error": {
                        "type": "object",
                        "properties": {
                            "message": {
                                "type": "string"
                            },
                            "status": {
                                "type": "integer"
                            }
                        }
                    },
                    "meta": {
                        "type": "object"
                    }
                }
            },
            "Directory": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "nullable": true
                    },
                    "version": {
                        "type": "string",
                        "nullable": true
                    },
                    "endpoints": {
                        "type": "object",
                        "nullable": true
                    }
                }
            },
            "Status": {
                "type": "object",
                "properties": {
                    "service": {
                        "type": "string",
                        "nullable": true
                    },
                    "database_ready": {
                        "type": "boolean",
                        "nullable": true
                    },
                    "coins": {
                        "type": "integer",
                        "nullable": true
                    },
                    "exchanges": {
                        "type": "integer",
                        "nullable": true
                    },
                    "latest_market_update": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "Global": {
                "type": "object",
                "properties": {
                    "active_cryptocurrencies": {
                        "type": "integer",
                        "nullable": true
                    },
                    "markets": {
                        "type": "integer",
                        "nullable": true
                    },
                    "market_cap": {
                        "type": "number",
                        "nullable": true
                    },
                    "volume_24h": {
                        "type": "number",
                        "nullable": true
                    },
                    "dominance": {
                        "type": "object",
                        "nullable": true
                    },
                    "market_cap_change_24h": {
                        "type": "number",
                        "nullable": true
                    },
                    "last_updated": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "Coin": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "nullable": true
                    },
                    "symbol": {
                        "type": "string",
                        "nullable": true
                    },
                    "name": {
                        "type": "string",
                        "nullable": true
                    },
                    "icon": {
                        "type": "string",
                        "nullable": true
                    },
                    "last_updated": {
                        "type": "string",
                        "nullable": true
                    },
                    "rank": {
                        "type": "integer",
                        "nullable": true
                    },
                    "price": {
                        "type": "number",
                        "nullable": true
                    },
                    "market_cap": {
                        "type": "number",
                        "nullable": true
                    },
                    "fully_diluted_market_cap": {
                        "type": "number",
                        "nullable": true
                    },
                    "volume_24h": {
                        "type": "number",
                        "nullable": true
                    },
                    "high_24h": {
                        "type": "number",
                        "nullable": true
                    },
                    "low_24h": {
                        "type": "number",
                        "nullable": true
                    },
                    "change_1h": {
                        "type": "number",
                        "nullable": true
                    },
                    "change_24h": {
                        "type": "number",
                        "nullable": true
                    },
                    "change_7d": {
                        "type": "number",
                        "nullable": true
                    },
                    "change_30d": {
                        "type": "number",
                        "nullable": true
                    },
                    "circulating_supply": {
                        "type": "number",
                        "nullable": true
                    },
                    "total_supply": {
                        "type": "number",
                        "nullable": true
                    },
                    "max_supply": {
                        "type": "number",
                        "nullable": true
                    },
                    "all_time_high": {
                        "$ref": "#/components/schemas/HighLow"
                    },
                    "all_time_low": {
                        "$ref": "#/components/schemas/HighLow"
                    }
                }
            },
            "CoinList": {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/Coin"
                }
            },
            "CoinDetail": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "nullable": true
                    },
                    "symbol": {
                        "type": "string",
                        "nullable": true
                    },
                    "name": {
                        "type": "string",
                        "nullable": true
                    },
                    "rank": {
                        "type": "integer",
                        "nullable": true
                    },
                    "description": {
                        "type": "string",
                        "nullable": true
                    },
                    "icon": {
                        "type": "string",
                        "nullable": true
                    },
                    "market": {
                        "type": "object",
                        "properties": {
                            "fiat": {
                                "type": "string",
                                "nullable": true
                            },
                            "price": {
                                "type": "number",
                                "nullable": true
                            },
                            "market_cap": {
                                "type": "number",
                                "nullable": true
                            },
                            "fully_diluted_market_cap": {
                                "type": "number",
                                "nullable": true
                            },
                            "volume_24h": {
                                "type": "number",
                                "nullable": true
                            },
                            "high_24h": {
                                "type": "number",
                                "nullable": true
                            },
                            "low_24h": {
                                "type": "number",
                                "nullable": true
                            },
                            "change_1h": {
                                "type": "number",
                                "nullable": true
                            },
                            "change_24h": {
                                "type": "number",
                                "nullable": true
                            },
                            "change_7d": {
                                "type": "number",
                                "nullable": true
                            },
                            "change_14d": {
                                "type": "number",
                                "nullable": true
                            },
                            "change_30d": {
                                "type": "number",
                                "nullable": true
                            },
                            "change_200d": {
                                "type": "number",
                                "nullable": true
                            },
                            "change_1y": {
                                "type": "number",
                                "nullable": true
                            }
                        }
                    },
                    "supply": {
                        "type": "object",
                        "properties": {
                            "circulating": {
                                "type": "number",
                                "nullable": true
                            },
                            "total": {
                                "type": "number",
                                "nullable": true
                            },
                            "maximum": {
                                "type": "number",
                                "nullable": true
                            }
                        }
                    },
                    "all_time_high": {
                        "$ref": "#/components/schemas/HighLow"
                    },
                    "all_time_low": {
                        "$ref": "#/components/schemas/HighLow"
                    },
                    "links": {
                        "type": "object",
                        "properties": {
                            "website": {
                                "type": "string",
                                "nullable": true
                            },
                            "twitter": {
                                "type": "string",
                                "nullable": true
                            },
                            "facebook": {
                                "type": "string",
                                "nullable": true
                            },
                            "reddit": {
                                "type": "string",
                                "nullable": true
                            },
                            "telegram": {
                                "type": "string",
                                "nullable": true
                            },
                            "explorers": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "forums": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "repositories": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "last_updated": {
                        "type": "string",
                        "nullable": true
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "History": {
                "type": "object",
                "additionalProperties": true,
                "description": "Stored market_chart payload. Usually prices, market_caps, total_volumes arrays of [Unix milliseconds, value]."
            },
            "Prices": {
                "type": "object",
                "additionalProperties": {
                    "type": "object",
                    "properties": {
                        "price": {
                            "type": "number",
                            "nullable": true
                        },
                        "change_24h": {
                            "type": "number",
                            "nullable": true
                        },
                        "market_cap": {
                            "type": "number",
                            "nullable": true
                        },
                        "last_updated": {
                            "type": "string",
                            "nullable": true
                        }
                    }
                }
            },
            "Exchange": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "nullable": true
                    },
                    "name": {
                        "type": "string",
                        "nullable": true
                    },
                    "country": {
                        "type": "string",
                        "nullable": true
                    },
                    "year_established": {
                        "type": "integer",
                        "nullable": true
                    },
                    "website": {
                        "type": "string",
                        "nullable": true
                    },
                    "icon": {
                        "type": "string",
                        "nullable": true
                    },
                    "trust_score": {
                        "type": "number",
                        "nullable": true
                    },
                    "trust_score_rank": {
                        "type": "integer",
                        "nullable": true
                    },
                    "volume_24h_btc": {
                        "type": "number",
                        "nullable": true
                    }
                }
            },
            "ExchangeList": {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/Exchange"
                }
            },
            "ExchangeDetail": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Exchange"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "description": {
                                "type": "string"
                            },
                            "notice": {
                                "type": "string",
                                "nullable": true
                            },
                            "markets": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "base": {
                                            "type": "string",
                                            "nullable": true
                                        },
                                        "target": {
                                            "type": "string",
                                            "nullable": true
                                        },
                                        "last": {
                                            "type": "number",
                                            "nullable": true
                                        },
                                        "volume": {
                                            "type": "number",
                                            "nullable": true
                                        },
                                        "spread_percentage": {
                                            "type": "number",
                                            "nullable": true
                                        },
                                        "trust": {
                                            "type": "string",
                                            "nullable": true
                                        },
                                        "trade_url": {
                                            "type": "string",
                                            "nullable": true
                                        },
                                        "last_traded_at": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                ]
            },
            "HighLow": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "number",
                        "nullable": true
                    },
                    "change_percentage": {
                        "type": "number",
                        "nullable": true
                    },
                    "date": {
                        "type": "string",
                        "nullable": true
                    }
                }
            }
        }
    }
}