{
  "openapi": "3.0.3",
  "info": {
    "title": "StonkAPI",
    "version": "0.1.0",
    "description": "Fast JSON API for quote-paired token markets on Solana. Every /v1 route needs an API key, sent as Authorization: Bearer sa_... or X-StonkAPI-Key. Get one at /signup. Browser requests must come from an allowlisted Origin (stonkapi.xyz is always allowed). Server-side calls need no Origin. Key changes (revoke, rotate, domains) can take up to 60 seconds to apply. Only GET, HEAD and OPTIONS are supported; other methods return 405 with an Allow header. Unknown /v1 paths return a JSON 404. Market data comes live from stonkfun.xyz's public API. Responses are cached in memory and at the Cloudflare edge for 10 seconds to 10 minutes per route. A once-a-minute cron refreshes the busiest lists so the first request after a cache expires stays fast. If upstream is slow or fails, the last good copy is served with X-Cache: STALE-ERROR and the real X-Data-Age. If there is no copy, the route returns JSON {ok:false, error:'Upstream busy, retry shortly.'} with 503 (when upstream is rate-limited) or 502 (other upstream errors) and a Retry-After header, never an empty-body 500. X-Cache is MEM, EDGE, MISS, SWR, STALE or STALE-ERROR. X-Data-Age is the age of that copy in milliseconds. All StonkAPI traffic shares stonkfun's 60 requests a minute. API keys, admin pair categories, the curated projects list, and history for community, rewards, dex and verified still come from StonkAPI's own store. List routes accept optional page (1-based) and pageSize. Omit both for the default list. On /v1/tokens and /v1/pairs/{mint}, paging goes upstream: default pageSize 25, max 100, and total is the full upstream count. Unpaged /v1/tokens returns 200 rows and no total; unpaged /v1/pairs/{mint} returns up to 200 rows and still includes total and pair. Other lists are sliced from the cached result: default pageSize 50, max 200, and total is the length of that list. Paged responses add page, pageSize and total. TypeScript client: one zero-dependency file, typed for every /v1 route, with paging params, the {ok, generatedAt, count, data} envelope, typed errors and an apiKey option. Download /sdk/stonkapi.ts (or /sdk/stonkapi.mjs for plain JavaScript) and import it. Works on Node 18+, Bun, Deno, Cloudflare Workers and browsers (allowlist the browser origin on your key). Package source: packages/stonkapi-client, name stonkapi, not yet published to npm.",
    "contact": {
      "url": "https://stonkapi.xyz/contact"
    }
  },
  "servers": [
    {
      "url": "https://stonkapi.xyz"
    }
  ],
  "externalDocs": {
    "description": "StonkAPI docs",
    "url": "https://stonkapi.xyz/docs"
  },
  "x-sdk": {
    "language": "typescript",
    "name": "stonkapi",
    "source": "https://stonkapi.xyz/sdk/stonkapi.ts",
    "javascript": "https://stonkapi.xyz/sdk/stonkapi.mjs",
    "docs": "https://stonkapi.xyz/docs#client"
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Trending"
    },
    {
      "name": "Leaders"
    },
    {
      "name": "Pairs"
    },
    {
      "name": "Pair tape"
    },
    {
      "name": "Tokens"
    },
    {
      "name": "Token"
    },
    {
      "name": "Runners"
    },
    {
      "name": "Verified"
    },
    {
      "name": "Stocks"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Community"
    },
    {
      "name": "Rewards"
    },
    {
      "name": "Dex"
    },
    {
      "name": "Health"
    }
  ],
  "paths": {
    "/v1/trending": {
      "get": {
        "operationId": "get_v1_trending",
        "summary": "Trending",
        "description": "Jupiter 1h trending, hydrated with stonkfun token data. Listing stonks only. Key required. Thin if Jupiter has few listing hits.",
        "tags": [
          "Trending"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.trending.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "trending": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "name": "Example Stonk",
                        "symbol": "EXMPL",
                        "imageUrl": "https://stonkapi.xyz/icon.png",
                        "createdAt": "2026-11-27T21:14:09.000Z",
                        "quote": {
                          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "symbol": "USDC",
                          "name": "USD Coin",
                          "category": "currency"
                        },
                        "mode": "standard",
                        "communityMode": null,
                        "mcap": 1284500,
                        "priceUsd": 0.0128,
                        "transferFeeBps": 0,
                        "volume24hUsd": 18250,
                        "priceChange24h": 4.2,
                        "status": "active",
                        "isVerified": false,
                        "organicScore": 42,
                        "priceChange1h": 12.4,
                        "rank": 3,
                        "usdPrice": 0.0128
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/leaders": {
      "get": {
        "operationId": "get_v1_leaders",
        "summary": "Leaders",
        "description": "Current leader per quote pair: highest market cap among the top 500 stonkfun tokens. count is null (stonkfun has no per-pair counts). Key required.",
        "tags": [
          "Leaders"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.leaders.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "leaders": [
                      {
                        "pairMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "pairCa": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "pairSymbol": "USDC",
                        "pairName": "USD Coin",
                        "pairCategory": "currency",
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "symbol": "EXMPL",
                        "name": "Example Stonk",
                        "mcap": 1284500,
                        "priceUsd": 0.0128,
                        "count": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/pairs": {
      "get": {
        "operationId": "get_v1_pairs",
        "summary": "Pairs",
        "description": "Quote catalog, live from stonkfun /pairs. Category is crypto, stock, stablecoin, meme, etf, or lst. etf is assigned in /admin (may be empty). Sector optional. count is null; use /v1/pairs/{mint} total for a pair's token count.",
        "tags": [
          "Pairs"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.pairs.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "pairs": [
                      {
                        "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "symbol": "USDC",
                        "name": "USD Coin",
                        "category": "stablecoin",
                        "categoryLabel": "Currency",
                        "listingCategory": "currency",
                        "sector": "",
                        "status": "live",
                        "decimals": 6,
                        "communityMode": false,
                        "count": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/pairs/{mint}": {
      "get": {
        "operationId": "get_v1_pairs_mint",
        "summary": "Pair tape",
        "description": "Tokens on one quote, live from stonkfun. Newest first, 200 rows by default, with total (the full upstream count) and pair. page/pageSize (default 25, max 100) page upstream. Unknown pair = 404.",
        "tags": [
          "Pair tape"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "description": "Quote (pair) mint (base58 CA).",
            "schema": {
              "type": "string",
              "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the default 200-row list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 25, max 100. Paging is upstream; total is the full count.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.tokens.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "total": 42,
                  "pair": {
                    "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                    "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                    "symbol": "USDC",
                    "name": "USD Coin",
                    "category": "stablecoin",
                    "categoryLabel": "Currency"
                  },
                  "data": {
                    "tokens": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "name": "Example Stonk",
                        "symbol": "EXMPL",
                        "imageUrl": "https://stonkapi.xyz/icon.png",
                        "createdAt": "2026-11-27T21:14:09.000Z",
                        "quote": {
                          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "symbol": "USDC",
                          "name": "USD Coin",
                          "category": "currency"
                        },
                        "mode": "standard",
                        "communityMode": null,
                        "mcap": 1284500,
                        "priceUsd": 0.0128,
                        "transferFeeBps": 0,
                        "volume24hUsd": 18250,
                        "priceChange24h": 4.2,
                        "status": "active"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "404": {
            "description": "Unknown pair mint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Pair not found.",
                  "generatedAt": 1796000000000,
                  "count": 0,
                  "data": {
                    "tokens": []
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens": {
      "get": {
        "operationId": "get_v1_tokens",
        "summary": "Tokens",
        "description": "Newest listing stonks, live from stonkfun. 200 rows by default, with no total. page/pageSize (default 25, max 100) page through all tokens; total is then included.",
        "tags": [
          "Tokens"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the default 200-row list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 25, max 100. Paging is upstream; total is the full count.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.tokens.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "tokens": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "name": "Example Stonk",
                        "symbol": "EXMPL",
                        "imageUrl": "https://stonkapi.xyz/icon.png",
                        "createdAt": "2026-11-27T21:14:09.000Z",
                        "quote": {
                          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "symbol": "USDC",
                          "name": "USD Coin",
                          "category": "currency"
                        },
                        "mode": "standard",
                        "communityMode": null,
                        "mcap": 1284500,
                        "priceUsd": 0.0128,
                        "transferFeeBps": 0,
                        "volume24hUsd": 18250,
                        "priceChange24h": 4.2,
                        "status": "active"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens/{mint}": {
      "get": {
        "operationId": "get_v1_tokens_mint",
        "summary": "Token",
        "description": "One listing stonk by CA, live from stonkfun. Unknown or unlisted mint = 404.",
        "tags": [
          "Token"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "description": "Token mint (base58 CA).",
            "schema": {
              "type": "string",
              "example": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.tokens.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "tokens": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "name": "Example Stonk",
                        "symbol": "EXMPL",
                        "imageUrl": "https://stonkapi.xyz/icon.png",
                        "createdAt": "2026-11-27T21:14:09.000Z",
                        "quote": {
                          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "symbol": "USDC",
                          "name": "USD Coin",
                          "category": "currency"
                        },
                        "mode": "standard",
                        "communityMode": null,
                        "mcap": 1284500,
                        "priceUsd": 0.0128,
                        "transferFeeBps": 0,
                        "volume24hUsd": 18250,
                        "priceChange24h": 4.2,
                        "status": "active"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "404": {
            "description": "Unknown or unlisted mint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Token not found.",
                  "generatedAt": 1796000000000,
                  "count": 0,
                  "data": {
                    "tokens": []
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/runners": {
      "get": {
        "operationId": "get_v1_runners",
        "summary": "Runners",
        "description": "1h runner score per quote mint. Missing or invalid quote = 400. Empty if liq under 2 thousand USD or under 20 trades. sort=score or volume.",
        "tags": [
          "Runners"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "quote",
            "in": "query",
            "required": true,
            "description": "Quote mint to rank runners against.",
            "schema": {
              "type": "string",
              "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "score (default) or volume.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.runners.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "quote": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                  "window": "1h",
                  "sort": "score",
                  "data": {
                    "runners": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "symbol": "EXMPL",
                        "name": "Example Stonk",
                        "quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "quoteSymbol": "USDC",
                        "score": 87.4,
                        "score5m": 64.1,
                        "trend": 1.3,
                        "volumeUsd": 215400,
                        "liquidityUsd": 48200,
                        "volumeLiq": 4.47,
                        "buys": 612,
                        "sells": 388,
                        "buyShare": 0.61,
                        "priceChange": 18.6,
                        "trades": 1000,
                        "window": "1h",
                        "pairUrl": "https://dexscreener.com/solana/example"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid quote mint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "generatedAt": 1796000000000,
                  "count": 0,
                  "error": "quote mint required",
                  "data": {
                    "runners": []
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/verified": {
      "get": {
        "operationId": "get_v1_verified",
        "summary": "Verified",
        "description": "Jupiter verified list, merged with StonkAPI history. Listing stonks only. dashboard is a Jupiter URL. Market fields are present when the row is hydrated from stonkfun.",
        "tags": [
          "Verified"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.verified.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "verified": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "name": "Example Stonk",
                        "symbol": "EXMPL",
                        "imageUrl": "https://stonkapi.xyz/icon.png",
                        "quote": {
                          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "symbol": "USDC"
                        },
                        "status": "verified",
                        "tier": "premium",
                        "verifiedAt": "2026-11-20 14:00:08.2045+00",
                        "likes": 120,
                        "smartLikes": 8,
                        "dashboard": "https://verified.jup.ag/dashboard/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/stocks": {
      "get": {
        "operationId": "get_v1_stocks",
        "summary": "Stocks",
        "description": "Stock quote assets (xStock, PreStock, Sunrise, Backpack). No per-pair count field; use /v1/pairs/{mint} total.",
        "tags": [
          "Stocks"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.stocks.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "stocks": [
                      {
                        "mint": "XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB",
                        "ca": "XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB",
                        "symbol": "TSLAx",
                        "name": "Tesla xStock",
                        "category": "xstock",
                        "categoryLabel": "xStock",
                        "decimals": 8,
                        "communityMode": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "get_v1_projects",
        "summary": "Projects",
        "description": "Curated project pairs (StonkAPI list). Count is live tokens on that pair from stonkfun.",
        "tags": [
          "Projects"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.projects.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "projects": [
                      {
                        "mint": "So11111111111111111111111111111111111111112",
                        "ca": "So11111111111111111111111111111111111111112",
                        "symbol": "EXPRJ",
                        "name": "Example Project",
                        "category": "Projects",
                        "count": 3,
                        "kind": "quote"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/community": {
      "get": {
        "operationId": "get_v1_community",
        "summary": "Community",
        "description": "Community Mode launches: live scan of recent, top-volume and top-cap stonkfun tokens, merged with StonkAPI history.",
        "tags": [
          "Community"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.community.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "community": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "name": "Example Stonk",
                        "symbol": "EXMPL",
                        "imageUrl": "https://stonkapi.xyz/icon.png",
                        "createdAt": "2026-11-27T21:14:09.000Z",
                        "quote": {
                          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "symbol": "USDC",
                          "name": "USD Coin",
                          "category": "currency"
                        },
                        "mode": "community",
                        "communityMode": {
                          "shareBps": 100
                        },
                        "shareBps": 100
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/rewards": {
      "get": {
        "operationId": "get_v1_rewards",
        "summary": "Rewards",
        "description": "Reward 1 (100 bps) and Reward 3 (300 bps) plus distributed total, from stonkfun reward launches merged with StonkAPI history. mode is reward; reward is Reward 1 or Reward 3.",
        "tags": [
          "Rewards"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.rewards.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "rewards": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "name": "Example Stonk",
                        "symbol": "EXMPL",
                        "imageUrl": "https://stonkapi.xyz/icon.png",
                        "createdAt": "2026-11-27T21:14:09.000Z",
                        "quote": {
                          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "symbol": "USDC",
                          "name": "USD Coin",
                          "category": "currency"
                        },
                        "mode": "reward",
                        "communityMode": {
                          "shareBps": 100
                        },
                        "mcap": 1284500,
                        "priceUsd": 0.0128,
                        "transferFeeBps": 0,
                        "volume24hUsd": 18250,
                        "priceChange24h": 4.2,
                        "status": "active",
                        "reward": "Reward 3",
                        "distributedTokens": 125000,
                        "holderCount": 840,
                        "payoutCount": 12,
                        "lastPayoutAt": "2026-11-27T20:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/dex": {
      "get": {
        "operationId": "get_v1_dex",
        "summary": "Dex",
        "description": "Paid profiles and boosts, merged with StonkAPI history. Ads excluded. kinds are Boost and/or Paid. Newest listing first.",
        "tags": [
          "Dex"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Optional 1-based page. Omit with pageSize for the full cached list.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Envelope with data.dex.",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "count": 1,
                  "data": {
                    "dex": [
                      {
                        "mint": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "ca": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
                        "name": "Example Stonk",
                        "symbol": "EXMPL",
                        "imageUrl": "https://stonkapi.xyz/icon.png",
                        "createdAt": "2026-11-27T21:14:09.000Z",
                        "quote": {
                          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "ca": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                          "symbol": "USDC",
                          "name": "USD Coin",
                          "category": "currency"
                        },
                        "dexUrl": "https://dexscreener.com/solana/example",
                        "kinds": [
                          "Boost"
                        ],
                        "boost": 30,
                        "boostTotal": 30
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "403": {
            "description": "Browser Origin is not allowlisted for this key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Domain not allowlisted for this key."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "get_v1_health",
        "summary": "Health",
        "description": "Upstream freshness from stonkfun.xyz: pair and token counts, upstream generatedAt and age, newest token launch time, cache time, and the last upstream error. No count field. Key required.",
        "tags": [
          "Health"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "Health payload (no count field).",
            "headers": {
              "X-Cache": {
                "description": "Cache hit type: MEM, EDGE, MISS, SWR, STALE or STALE-ERROR (last good copy served after an upstream failure).",
                "schema": {
                  "type": "string",
                  "enum": [
                    "MEM",
                    "EDGE",
                    "MISS",
                    "SWR",
                    "STALE",
                    "STALE-ERROR"
                  ]
                }
              },
              "X-Data-Age": {
                "description": "Age of the cached copy, in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                },
                "example": {
                  "ok": true,
                  "generatedAt": 1796000000000,
                  "data": {
                    "health": {
                      "source": "stonkfun.xyz",
                      "upstreamOk": true,
                      "pairs": 634,
                      "tokens": 205575,
                      "pairsAt": 1795999990000,
                      "ageMs": 10000,
                      "upstreamAt": 1795999990000,
                      "newestTokenAt": 1795999700000,
                      "newestTokenAgeMs": 300000,
                      "cachedAt": 1795999995000,
                      "lastUpstreamError": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "API key required. Get one at /signup."
                }
              }
            }
          },
          "502": {
            "description": "Upstream error and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          },
          "503": {
            "description": "Upstream rate-limited and no cached copy. Retry-After is set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "ok": false,
                  "error": "Upstream busy, retry shortly.",
                  "generatedAt": 1796000000000
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer sa_..."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-StonkAPI-Key"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "Envelope": {
        "type": "object",
        "required": [
          "ok",
          "generatedAt",
          "count",
          "data"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "generatedAt": {
            "type": "integer",
            "description": "Unix ms."
          },
          "count": {
            "type": "integer",
            "description": "Number of rows in this response."
          },
          "page": {
            "type": "integer",
            "description": "Present when page or pageSize was sent."
          },
          "pageSize": {
            "type": "integer",
            "description": "Present when page or pageSize was sent."
          },
          "total": {
            "type": "integer",
            "description": "Present on paged lists, and on unpaged /v1/pairs/{mint}."
          },
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "additionalProperties": true
      },
      "Health": {
        "type": "object",
        "required": [
          "ok",
          "generatedAt",
          "data"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "generatedAt": {
            "type": "integer"
          },
          "data": {
            "type": "object",
            "properties": {
              "health": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "description": "Always stonkfun.xyz."
                  },
                  "upstreamOk": {
                    "type": "boolean"
                  },
                  "pairs": {
                    "type": "integer"
                  },
                  "tokens": {
                    "type": "integer"
                  },
                  "pairsAt": {
                    "type": "integer",
                    "nullable": true
                  },
                  "ageMs": {
                    "type": "integer",
                    "nullable": true,
                    "description": "now minus upstream generatedAt."
                  },
                  "upstreamAt": {
                    "type": "integer",
                    "nullable": true
                  },
                  "newestTokenAt": {
                    "type": "integer",
                    "nullable": true
                  },
                  "newestTokenAgeMs": {
                    "type": "integer",
                    "nullable": true
                  },
                  "cachedAt": {
                    "type": "integer"
                  },
                  "lastUpstreamError": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}