{
  "openapi": "3.0.3",
  "info": {
    "title": "Feelcoin Public API",
    "version": "1.0.0",
    "description": "Open-source read-only blockchain and mining pool statistics. This is NOT a trading API or a wallet RPC proxy. Fields named issued supply do not establish independently verified circulation."
  },
  "servers": [
    {
      "url": "https://api.feelcoin.org",
      "description": "Production URL once DNS, HTTPS and deployment are verified"
    }
  ],
  "tags": [
    {
      "name": "Network"
    },
    {
      "name": "Mining"
    },
    {
      "name": "Blocks"
    },
    {
      "name": "Integrations"
    },
    {
      "name": "Status"
    }
  ],
  "paths": {
    "/v1/health": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "Upstream source health",
        "description": "Returns HTTP 503 when either required local source is unavailable.",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "ok or degraded",
                      "enum": [
                        "ok",
                        "degraded"
                      ]
                    },
                    "sources": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "source_age_seconds": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer",
                        "nullable": true
                      }
                    },
                    "as_of": {
                      "type": "string",
                      "description": "Check time",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/v1/network": {
      "get": {
        "tags": [
          "Network"
        ],
        "summary": "Network summary",
        "description": "Network summary",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Network"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/v1/supply": {
      "get": {
        "tags": [
          "Network"
        ],
        "summary": "Protocol-issued FEEL supply",
        "description": "Protocol-issued FEEL supply",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Supply"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/v1/mining/stats": {
      "get": {
        "tags": [
          "Mining"
        ],
        "summary": "Official Feelcoin Pool statistics",
        "description": "Official Feelcoin Pool statistics",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Mining"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/v1/mining/pools": {
      "get": {
        "tags": [
          "Mining"
        ],
        "summary": "Official mining pool endpoints",
        "description": "Official mining pool endpoints",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticker": {
                      "type": "string",
                      "description": "FEEL"
                    },
                    "pools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "as_of": {
                      "type": "string",
                      "description": "Snapshot timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/v1/blocks/latest": {
      "get": {
        "tags": [
          "Blocks"
        ],
        "summary": "Latest public block headers",
        "description": "Latest public block headers",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticker": {
                      "type": "string",
                      "description": "FEEL"
                    },
                    "blocks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Block"
                      }
                    },
                    "as_of": {
                      "type": "string",
                      "description": "Snapshot timestamp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/v1/blocks/{height}": {
      "get": {
        "tags": [
          "Blocks"
        ],
        "summary": "Lookup block by index",
        "description": "Lookup block by index",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Block"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        },
        "parameters": [
          {
            "name": "height",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Block index, not chain height"
          }
        ]
      }
    },
    "/v1/integrations/summary": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Flat integration-ready network and pool snapshot",
        "description": "Flat fields for simple integrations; it is NOT a Fathom-specific or any exchange's required schema. Platforms may need explicit field mapping.",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticker": {
                      "type": "string",
                      "description": "FEEL"
                    },
                    "algorithm": {
                      "type": "string",
                      "description": "RandomX"
                    },
                    "network": {
                      "type": "string",
                      "description": "mainnet"
                    },
                    "block_height": {
                      "type": "integer",
                      "description": "Chain block count"
                    },
                    "difficulty": {
                      "type": "string",
                      "description": "Exact difficulty integer"
                    },
                    "network_hashrate_hps": {
                      "type": "number",
                      "description": "Network estimated H/s"
                    },
                    "pool_hashrate_hps": {
                      "type": "integer",
                      "description": "Official pool H/s"
                    },
                    "pool_miners_connected": {
                      "type": "integer",
                      "description": "Pool miners only"
                    },
                    "pool_fee_percent": {
                      "type": "string",
                      "description": "Percent string"
                    },
                    "issued_supply_feel": {
                      "type": "string",
                      "description": "Protocol-issued supply"
                    },
                    "circulating_supply_feel": {
                      "type": "string",
                      "nullable": true
                    },
                    "price_usdt": {
                      "type": "number",
                      "nullable": true
                    },
                    "as_of_network": {
                      "type": "string",
                      "description": "Network snapshot UTC"
                    },
                    "as_of_pool": {
                      "type": "string",
                      "description": "Pool snapshot UTC"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "API endpoint directory",
        "description": "API endpoint directory",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/v1": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "API endpoint directory",
        "description": "API endpoint directory",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "Machine-readable OpenAPI contract",
        "description": "Machine-readable OpenAPI contract",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/v1/openapi.json": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "Machine-readable OpenAPI contract",
        "description": "Machine-readable OpenAPI contract",
        "responses": {
          "200": {
            "description": "Successful JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Unknown endpoint or block"
          },
          "503": {
            "description": "Local data source unavailable or health degraded"
          }
        }
      }
    },
    "/docs": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "Human-readable developer reference",
        "responses": {
          "200": {
            "description": "HTML documentation",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/docs": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "Human-readable developer reference",
        "responses": {
          "200": {
            "description": "HTML documentation",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Network": {
        "type": "object",
        "required": [
          "ticker",
          "network",
          "algorithm",
          "chain_height",
          "tip_height",
          "difficulty",
          "estimated_network_hashrate_hps",
          "as_of"
        ],
        "properties": {
          "ticker": {
            "type": "string",
            "description": "FEEL ticker",
            "example": "FEEL"
          },
          "network": {
            "type": "string",
            "description": "Blockchain network",
            "example": "mainnet"
          },
          "algorithm": {
            "type": "string",
            "description": "Proof-of-work algorithm",
            "example": "RandomX"
          },
          "block_target_seconds": {
            "type": "integer",
            "description": "Target block interval in seconds",
            "example": 120
          },
          "chain_height": {
            "type": "integer",
            "description": "Number of blocks; not last index"
          },
          "tip_height": {
            "type": "integer",
            "description": "Last block index"
          },
          "difficulty": {
            "type": "string",
            "description": "Exact integer difficulty encoded as string"
          },
          "estimated_network_hashrate_hps": {
            "type": "number",
            "description": "Estimated H/s = difficulty divided by block target"
          },
          "transaction_count": {
            "type": "integer",
            "description": "Daemon total transaction count"
          },
          "mempool_transactions": {
            "type": "integer",
            "description": "Mempool transaction count"
          },
          "peers": {
            "type": "object",
            "properties": {
              "incoming": {
                "type": "integer"
              },
              "outgoing": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            }
          },
          "as_of": {
            "type": "string",
            "description": "Timestamp when upstream snapshot was fetched",
            "format": "date-time"
          },
          "data_age_seconds": {
            "type": "integer",
            "description": "Age of cached upstream snapshot at response time"
          },
          "source": {
            "type": "string",
            "description": "Public origin of metrics"
          }
        }
      },
      "Supply": {
        "type": "object",
        "required": [
          "ticker",
          "emitted_supply_atomic",
          "emitted_supply_feel",
          "source_height"
        ],
        "properties": {
          "ticker": {
            "type": "string",
            "description": "FEEL"
          },
          "network": {
            "type": "string",
            "description": "mainnet"
          },
          "decimals": {
            "type": "integer",
            "description": "FEEL decimal precision",
            "example": 12
          },
          "emitted_supply_atomic": {
            "type": "string",
            "description": "Full precision integer issued amount"
          },
          "emitted_supply_feel": {
            "type": "string",
            "description": "Exact decimal issued FEEL"
          },
          "circulating_supply_feel": {
            "type": "string",
            "nullable": true,
            "description": "Null until separately verified circulation methodology exists"
          },
          "max_supply_feel": {
            "type": "string",
            "nullable": true,
            "description": "Null for unlimited supply"
          },
          "source_height": {
            "type": "integer",
            "description": "Chain height used for emission total"
          },
          "as_of": {
            "type": "string",
            "description": "Snapshot timestamp",
            "format": "date-time"
          },
          "note": {
            "type": "string",
            "description": "Supply interpretation"
          }
        }
      },
      "Mining": {
        "type": "object",
        "required": [
          "pool_hashrate_hps",
          "network_hashrate_hps",
          "miners_connected",
          "pool_fee_percent"
        ],
        "properties": {
          "ticker": {
            "type": "string",
            "description": "FEEL"
          },
          "network": {
            "type": "string",
            "description": "mainnet"
          },
          "name": {
            "type": "string",
            "description": "Pool display name"
          },
          "pool_url": {
            "type": "string",
            "description": "Public pool website",
            "format": "uri"
          },
          "pool_hashrate_hps": {
            "type": "integer",
            "description": "Official pool hash rate in H/s"
          },
          "network_hashrate_hps": {
            "type": "integer",
            "description": "Pool-reported network H/s"
          },
          "network_height": {
            "type": "integer",
            "description": "Pool source chain height, may differ from Explorer snapshot"
          },
          "network_difficulty": {
            "type": "string",
            "description": "Exact integer difficulty as string"
          },
          "miners_connected": {
            "type": "integer",
            "description": "Connected pool miners, not total network miners"
          },
          "pool_blocks_found": {
            "type": "integer",
            "description": "Historical pool blocks found"
          },
          "pool_fee_percent": {
            "type": "string",
            "description": "Fee in percent, e.g. 0.500 for half a percent"
          },
          "minimum_payout_feel": {
            "type": "string",
            "description": "Minimum payout in FEEL"
          },
          "last_block_found_timestamp": {
            "type": "integer",
            "nullable": true,
            "description": "Pool last found block Unix timestamp"
          },
          "as_of": {
            "type": "string",
            "description": "Snapshot timestamp",
            "format": "date-time"
          },
          "data_age_seconds": {
            "type": "integer",
            "description": "Cached snapshot age in seconds"
          }
        }
      },
      "Block": {
        "type": "object",
        "required": [
          "ticker",
          "height",
          "reward_atomic",
          "reward_feel"
        ],
        "properties": {
          "ticker": {
            "type": "string",
            "description": "FEEL"
          },
          "height": {
            "type": "integer",
            "description": "Block index"
          },
          "hash": {
            "type": "string",
            "description": "Block hash"
          },
          "prev_hash": {
            "type": "string",
            "description": "Previous block hash"
          },
          "timestamp": {
            "type": "integer",
            "description": "Unix block timestamp"
          },
          "difficulty": {
            "type": "string",
            "description": "Exact integer difficulty"
          },
          "transactions": {
            "type": "integer",
            "description": "Reported count of transactions"
          },
          "reward_atomic": {
            "type": "string",
            "description": "Total coinbase reward in atomic FEEL units"
          },
          "reward_feel": {
            "type": "string",
            "description": "Total coinbase reward in FEEL"
          },
          "miner_reward_atomic": {
            "type": "string",
            "nullable": true
          },
          "treasury_reward_atomic": {
            "type": "string",
            "nullable": true
          },
          "explorer": {
            "type": "string",
            "description": "Link to the official block explorer",
            "format": "uri"
          },
          "as_of": {
            "type": "string",
            "description": "Snapshot timestamp",
            "format": "date-time"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Machine-readable error code"
          }
        }
      }
    }
  }
}
