{
  "openapi": "3.1.0",
  "info": {
    "title": "$PEAR public API",
    "version": "1.0.0",
    "description": "Read every coin launched on $PEAR, the prediction market outcome each coin backs, live open questions, and every $PEAR buyback and burn. No key, no sign-up."
  },
  "servers": [
    {
      "url": "https://pearit.now"
    }
  ],
  "paths": {
    "/api/public/v1": {
      "get": {
        "summary": "Overview",
        "description": "Lists every endpoint. No key, no sign-up, no wallet. Every answer is { ok: true, data } or { ok: false, error }.",
        "operationId": "api-overview",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {}
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/coins": {
      "get": {
        "summary": "All coins",
        "description": "Every coin launched here with its live price, market cap, 24h change and volume.",
        "operationId": "api-coins",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "newest (default), volume or marketcap",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "name, ticker or full address",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200, default 50",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {}
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/coins/{mint}": {
      "get": {
        "summary": "One coin",
        "description": "A single coin by address, plus the question it is paired with: the side it backs, the live chance, when it closes and whether it won or lost.",
        "operationId": "api-coin",
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "description": "The coin's mint address.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {}
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/markets": {
      "get": {
        "summary": "Open questions",
        "description": "Live yes/no questions from Polymarket and Kalshi — the same list the launch form searches.",
        "operationId": "api-markets",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "words to look for",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "volume (default) or closing",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–100, default 30",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {}
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/buybacks": {
      "get": {
        "summary": "Buybacks and burns",
        "description": "Every $PEAR buy-and-burn with the SOL spent, the $PEAR burned and both transaction signatures.",
        "operationId": "api-buybacks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200, default 50",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {}
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}