# StonkAPI docs

Fast JSON API for quote-paired token markets on Solana. Market data comes live from stonkfun.xyz.

- HTML docs: https://stonkapi.xyz/docs
- OpenAPI: https://stonkapi.xyz/openapi.json
- llms.txt: https://stonkapi.xyz/llms.txt
- Full text for agents: https://stonkapi.xyz/llms-full.txt
- Agent guide: https://stonkapi.xyz/AGENTS.md
- TypeScript client: https://stonkapi.xyz/sdk/stonkapi.ts and https://stonkapi.xyz/sdk/stonkapi.mjs
- Signup: https://stonkapi.xyz/signup
- Contact: https://stonkapi.xyz/contact

## Auth

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, OPTIONS are supported. Other methods return a JSON 405 with `Allow: GET, HEAD, OPTIONS`. Unknown /v1 paths return a JSON 404.

```bash
curl https://stonkapi.xyz/v1/leaders \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

## Data and cache

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.

## Paging

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.

## Errors

```
401 missing  {"ok":false,"error":"API key required. Get one at /signup."}
401 invalid  {"ok":false,"error":"Invalid API key."}
403  {"ok":false,"error":"Domain not allowlisted for this key."}
404 path  {"ok":false,"error":"Not found. See /docs or /openapi.json."}
404 token  {"ok":false,"error":"Token not found.","generatedAt":1796000000000,"count":0,"data":{"tokens":[]}}
404 pair  {"ok":false,"error":"Pair not found.","generatedAt":1796000000000,"count":0,"data":{"tokens":[]}}
400 runners  {"ok":false,"generatedAt":1796000000000,"count":0,"error":"quote mint required","data":{"runners":[]}}
405  {"ok":false,"error":"Method POST not allowed. Use GET, HEAD or OPTIONS."}
502  {"ok":false,"error":"Upstream busy, retry shortly.","generatedAt":1796000000000}
503  {"ok":false,"error":"Upstream busy, retry shortly.","generatedAt":1796000000000}
```

## TypeScript client

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.

```typescript
import { StonkAPI, StonkAPIError } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })

try {
  const { data, count, generatedAt } = await stonk.tokens({ page: 1, pageSize: 25 })
  console.log(count, new Date(generatedAt), data.tokens[0].symbol)
} catch (e) {
  if (e instanceof StonkAPIError) console.error(e.status, e.kind, e.message)
  else throw e
}
```

Paging:

```typescript
// one page
const page = await stonk.tokens({ page: 2, pageSize: 50 }) // page.total is the full count

// or walk every token lazily
for await (const token of stonk.paginateTokens({ pageSize: 100, maxPages: 5 })) {
  console.log(token.symbol)
}
```

## FAQ

### What is StonkAPI?

StonkAPI is a JSON API for quote-paired token markets on Solana. It serves pairs, tokens, leaders, runners, Dex paid profiles and Jupiter verification from the edge, and the same surfaces are shown as HTML tables on the site.

### Where does the data come from?

Market data comes live from stonkfun.xyz's public API. API keys, admin pair settings, the curated projects list, and history for community, rewards, dex and verified still come from StonkAPI's own store.

### How fresh is the data?

Responses are cached in memory and at the Cloudflare edge for 10 seconds to 10 minutes, depending on the route. A once-a-minute job refreshes the busiest lists. The X-Cache and X-Data-Age headers, and GET /v1/health, show the age of the copy you received.

### How do I get an API key?

Sign up with email at https://stonkapi.xyz/signup. We email a 6-digit code, then generate a key. Add the domain you will call from, and send the key as Authorization: Bearer sa_... or X-StonkAPI-Key. Every /v1 route requires a key.

### Is StonkAPI free?

Yes. An API key is free to request at /signup. There is no paid plan or usage fee in the product today. A key is access, not a contract for uptime.

### What are the rate limits?

StonkAPI does not publish a per-key rate limit. All StonkAPI traffic shares stonkfun.xyz's 60 requests a minute, so prefer cached responses and avoid tight polling. Key changes can take up to 60 seconds to apply.

### Which endpoints are supported?

GET, HEAD and OPTIONS on /v1/tokens, /v1/tokens/{mint}, /v1/pairs, /v1/pairs/{mint}, /v1/runners, /v1/trending, /v1/leaders, /v1/stocks, /v1/projects, /v1/verified, /v1/community, /v1/rewards, /v1/dex and /v1/health. The machine-readable list is at /openapi.json.

### Is there a TypeScript client?

Yes. Download a zero-dependency client from https://stonkapi.xyz/sdk/stonkapi.ts (or /sdk/stonkapi.mjs for JavaScript). It covers every /v1 route, with paging helpers, typed errors and retries. The package name stonkapi is not on npm yet.

### How is StonkAPI different from stonkfun.xyz?

stonkfun.xyz is the live market and the upstream data source. StonkAPI is a keyed JSON API on top of that data: a stable envelope, edge caching, HTML tables, a TypeScript client, and StonkAPI-specific lists such as curated projects and history for community, rewards, dex and verified.

## Routes

- [GET /v1/trending](#get-v1trending)
- [GET /v1/leaders](#get-v1leaders)
- [GET /v1/pairs](#get-v1pairs)
- [GET /v1/pairs/{mint}](#get-v1pairsmint)
- [GET /v1/tokens](#get-v1tokens)
- [GET /v1/tokens/{mint}](#get-v1tokensmint)
- [GET /v1/runners?quote={quote_mint}](#get-v1runners)
- [GET /v1/verified](#get-v1verified)
- [GET /v1/stocks](#get-v1stocks)
- [GET /v1/projects](#get-v1projects)
- [GET /v1/community](#get-v1community)
- [GET /v1/rewards](#get-v1rewards)
- [GET /v1/dex](#get-v1dex)
- [GET /v1/health](#get-v1health)

### GET /v1/trending

Jupiter 1h trending, hydrated with stonkfun token data. Listing stonks only. Key required. Thin if Jupiter has few listing hits.

HTML: https://stonkapi.xyz/trending

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/trending?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/trending?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.trending[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.trending({ page: 1, pageSize: 25 })
console.log(data.trending[0])
```

Example response:

```json
{
  "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
      }
    ]
  }
}
```

### GET /v1/leaders

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.

HTML: https://stonkapi.xyz/leaders

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/leaders?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/leaders?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.leaders[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.leaders({ page: 1, pageSize: 25 })
console.log(data.leaders[0])
```

Example response:

```json
{
  "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
      }
    ]
  }
}
```

### GET /v1/pairs

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.

HTML: https://stonkapi.xyz/pairs

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/pairs?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/pairs?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.pairs[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.pairs({ page: 1, pageSize: 25 })
console.log(data.pairs[0])
```

Example response:

```json
{
  "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
      }
    ]
  }
}
```

### GET /v1/pairs/{mint}

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.

HTML: https://stonkapi.xyz/pairs/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

Parameters:

- `mint` (path, required) Quote (pair) mint (base58 CA).
- `page` (query, optional) Optional 1-based page. Omit with pageSize for the default 200-row list.
- `pageSize` (query, optional) Optional page size. Default 25, max 100. Paging is upstream; total is the full count.

curl:

```bash
curl "https://stonkapi.xyz/v1/pairs/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/pairs/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.tokens[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.pair("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", { page: 1, pageSize: 25 })
console.log(data.tokens[0])
```

Example response:

```json
{
  "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"
      }
    ]
  }
}
```

### GET /v1/tokens

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.

HTML: https://stonkapi.xyz/tokens

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the default 200-row list.
- `pageSize` (query, optional) Optional page size. Default 25, max 100. Paging is upstream; total is the full count.

curl:

```bash
curl "https://stonkapi.xyz/v1/tokens?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/tokens?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.tokens[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.tokens({ page: 1, pageSize: 25 })
console.log(data.tokens[0])
```

Example response:

```json
{
  "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"
      }
    ]
  }
}
```

### GET /v1/tokens/{mint}

One listing stonk by CA, live from stonkfun. Unknown or unlisted mint = 404.

HTML: https://stonkapi.xyz/tokens/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU

Parameters:

- `mint` (path, required) Token mint (base58 CA).

curl:

```bash
curl "https://stonkapi.xyz/v1/tokens/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/tokens/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.tokens[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.token("7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU")
console.log(data.tokens[0])
```

Example response:

```json
{
  "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"
      }
    ]
  }
}
```

### GET /v1/runners?quote={quote_mint}

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.

HTML: https://stonkapi.xyz/runners

Parameters:

- `quote` (query, required) Quote mint to rank runners against.
- `sort` (query, optional) score (default) or volume.
- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/runners?quote=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/runners?quote=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.runners[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.runners({ quote: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", page: 1, pageSize: 25 })
console.log(data.runners[0])
```

Example response:

```json
{
  "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"
      }
    ]
  }
}
```

### GET /v1/verified

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.

HTML: https://stonkapi.xyz/verified

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/verified?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/verified?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.verified[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.verified({ page: 1, pageSize: 25 })
console.log(data.verified[0])
```

Example response:

```json
{
  "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"
      }
    ]
  }
}
```

### GET /v1/stocks

Stock quote assets (xStock, PreStock, Sunrise, Backpack). No per-pair count field; use /v1/pairs/{mint} total.

HTML: https://stonkapi.xyz/stocks

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/stocks?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/stocks?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.stocks[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.stocks({ page: 1, pageSize: 25 })
console.log(data.stocks[0])
```

Example response:

```json
{
  "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
      }
    ]
  }
}
```

### GET /v1/projects

Curated project pairs (StonkAPI list). Count is live tokens on that pair from stonkfun.

HTML: https://stonkapi.xyz/projects

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/projects?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/projects?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.projects[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.projects({ page: 1, pageSize: 25 })
console.log(data.projects[0])
```

Example response:

```json
{
  "ok": true,
  "generatedAt": 1796000000000,
  "count": 1,
  "data": {
    "projects": [
      {
        "mint": "So11111111111111111111111111111111111111112",
        "ca": "So11111111111111111111111111111111111111112",
        "symbol": "EXPRJ",
        "name": "Example Project",
        "category": "Projects",
        "count": 3,
        "kind": "quote"
      }
    ]
  }
}
```

### GET /v1/community

Community Mode launches: live scan of recent, top-volume and top-cap stonkfun tokens, merged with StonkAPI history.

HTML: https://stonkapi.xyz/community

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/community?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/community?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.community[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.community({ page: 1, pageSize: 25 })
console.log(data.community[0])
```

Example response:

```json
{
  "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
      }
    ]
  }
}
```

### GET /v1/rewards

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.

HTML: https://stonkapi.xyz/rewards

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/rewards?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/rewards?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.rewards[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.rewards({ page: 1, pageSize: 25 })
console.log(data.rewards[0])
```

Example response:

```json
{
  "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"
      }
    ]
  }
}
```

### GET /v1/dex

Paid profiles and boosts, merged with StonkAPI history. Ads excluded. kinds are Boost and/or Paid. Newest listing first.

HTML: https://stonkapi.xyz/dex

Parameters:

- `page` (query, optional) Optional 1-based page. Omit with pageSize for the full cached list.
- `pageSize` (query, optional) Optional page size. Default 50, max 200. Slices the cached list; total is that list's length.

curl:

```bash
curl "https://stonkapi.xyz/v1/dex?page=1&pageSize=25" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/dex?page=1&pageSize=25", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.dex[0])
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.dex({ page: 1, pageSize: 25 })
console.log(data.dex[0])
```

Example response:

```json
{
  "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
      }
    ]
  }
}
```

### GET /v1/health

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.

curl:

```bash
curl "https://stonkapi.xyz/v1/health" \
  -H "Authorization: Bearer sa_YOUR_KEY"
```

JavaScript:

```javascript
const res = await fetch("https://stonkapi.xyz/v1/health", {
  headers: { Authorization: "Bearer sa_YOUR_KEY" },
})
const body = await res.json()
if (!res.ok) throw new Error(`${res.status} ${body.error}`)
console.log(body.data.health)
```

TypeScript client:

```typescript
import { StonkAPI } from "./stonkapi"

const stonk = new StonkAPI({ apiKey: process.env.STONKAPI_KEY! })
const { data } = await stonk.health()
console.log(data.health)
```

Example response:

```json
{
  "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
    }
  }
}
```
