> ## Documentation Index
> Fetch the complete documentation index at: https://octo-98895abd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get the publishable key, make your first request, and read the response — in under a minute.

### 1. Set the key

<Warning>
  This publishable key is **shared** by everyone reading these docs. It identifies the project, not you.
</Warning>

```bash theme={null}
export SILO_URL="https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1"
export SILO_ANON_KEY="sb_publishable__yfFQsykAglrvc9GS6_PYw_B24ex437"
```

* Send it on `apikey` only. It is **not** a JWT: as `Authorization: Bearer` it returns `Invalid JWT`.
* `Authorization` is only for a **user** session. The JS client (`createClient(url, publishableKey)`) sets `apikey` for you.
* **Sign in for a bigger ceiling:** [the sign-in page](https://silo-bz-deloslabs.vercel.app/signin.html) (GitHub) hands you a user JWT to send as `Authorization: Bearer <token>` alongside `apikey`. Tiers: [Conventions & limits](/api-docs/conventions#authentication). Never invent or mint a key.
* Ignore **Secret** (`sb_secret_…`) and legacy `service_role`: they bypass every boundary. Landing tables are unreachable with the publishable key; `Accept-Profile: public` answers 401.

### 2. First call

`coverage` takes no arguments and says what the warehouse holds:

<CodeGroup>
  ```bash curl theme={null}
  curl -s -X POST "$SILO_URL/rpc/coverage" \
    -H "apikey: $SILO_ANON_KEY" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```

  ```python Python theme={null}
  import os, requests

  URL = "https://zcjbtpxuhdekpwcxmepn.supabase.co/rest/v1"  # no trailing slash
  KEY = os.environ.get("SILO_ANON_KEY", "sb_publishable__yfFQsykAglrvc9GS6_PYw_B24ex437")
  H = {"apikey": KEY}

  print(requests.post(f"{URL}/rpc/coverage", headers=H, json={}).json())
  ```

  ```javascript JavaScript theme={null}
  import { createClient } from '@supabase/supabase-js'

  const supabase = createClient(
    'https://zcjbtpxuhdekpwcxmepn.supabase.co',
    process.env.SILO_ANON_KEY || 'sb_publishable__yfFQsykAglrvc9GS6_PYw_B24ex437',
    { db: { schema: 'api' } },
  )

  const { data, error } = await supabase.rpc('coverage')
  console.log(data)
  ```
</CodeGroup>

The response is a plain JSON array, with no envelope:

```json theme={null}
[
  { "dataset": "quotes",   "as_of": "2026-08-26", "source": "b3_cotahist" },
  { "dataset": "funds",    "as_of": "2026-06-30", "source": "cvm" },
  { "dataset": "fund_nav", "as_of": "2026-06-01", "source": "cvm" }
]
```

### 3. Read a view (`GET`)

<CodeGroup>
  ```bash curl theme={null}
  curl -s -G "$SILO_URL/quotes" \
    -H "apikey: $SILO_ANON_KEY" \
    --data-urlencode "select=ticker,trade_date,close,volume" \
    --data-urlencode "ticker=eq.PETR4" \
    --data-urlencode "board=eq.02" \
    --data-urlencode "order=trade_date.desc" \
    --data-urlencode "limit=5"
  ```

  ```python Python theme={null}
  params = {
      "select": "ticker,trade_date,close,volume",
      "ticker": "eq.PETR4",
      "board": "eq.02",
      "order": "trade_date.desc",
      "limit": 5,
  }
  rows = requests.get(f"{URL}/quotes", headers=H, params=params).json()
  ```

  ```javascript JavaScript theme={null}
  const { data } = await supabase
    .from('quotes')
    .select('ticker, trade_date, close, volume')
    .eq('ticker', 'PETR4')
    .eq('board', '02')
    .order('trade_date', { ascending: false })
    .limit(5)
  ```
</CodeGroup>

### 4. Call a function (`POST`)

Named arguments in a JSON body to `POST /rpc/<name>`. Names are the SQL parameter names and all start with `p_`; omit one to take its default.

<CodeGroup>
  ```bash curl theme={null}
  curl -s -X POST "$SILO_URL/rpc/panel" \
    -H "apikey: $SILO_ANON_KEY" \
    -H "Content-Type: application/json" \
    -d '{
          "p_ids": ["PETR4", "VALE3"],
          "p_metrics": ["close_return"],
          "p_from": "2025-01-01",
          "p_to": "2026-06-30",
          "p_freq": "month"
        }'
  ```

  ```python Python theme={null}
  body = {
      "p_ids": ["PETR4", "VALE3"],
      "p_metrics": ["close_return"],
      "p_from": "2025-01-01",
      "p_to": "2026-06-30",
      "p_freq": "month",
  }
  rows = requests.post(f"{URL}/rpc/panel", headers=H, json=body).json()
  ```

  ```javascript JavaScript theme={null}
  const { data } = await supabase.rpc('panel', {
    p_ids: ['PETR4', 'VALE3'],
    p_metrics: ['close_return'],
    p_from: '2025-01-01',
    p_to: '2026-06-30',
    p_freq: 'month',
  })
  ```
</CodeGroup>

```json theme={null}
[
  { "id": "PETR4", "id_type": "ticker", "asset_class": "equity",
    "date": "2025-02-01", "metric": "close_return", "value": 0.0341, "source": "b3_cotahist" },
  { "id": "VALE3", "id_type": "ticker", "asset_class": "equity",
    "date": "2025-02-01", "metric": "close_return", "value": -0.0118, "source": "b3_cotahist" }
]
```

That is the whole API shape: views you `GET`, functions you `POST`.

### Next

<CardGroup cols={2}>
  <Card title="Conventions & limits" icon="ruler" href="/api-docs/conventions">
    Filter syntax, row caps, nulls, and error codes.
  </Card>

  <Card title="Python SDK" icon="python" href="/api-docs/sdk">
    One method per endpoint; a capped response raises; views page.
  </Card>

  <Card title="Panel" icon="table" href="/api-docs/panel">
    The researcher endpoint: mixed ids, mixed metrics, one grain.
  </Card>

  <Card title="Quotes" icon="chart-line" href="/api-docs/quotes">
    B3 cash prices, unadjusted, by ticker and session.
  </Card>

  <Card title="Funds" icon="building-columns" href="/api-docs/funds">
    Registry, profile, and monthly NAV by CNPJ.
  </Card>
</CardGroup>

### Notes

* Sample values in these docs are illustrative shapes, not live prints. Call `coverage` for what is loaded.
* If the project exposes several schemas and `api` is not first, send `Accept-Profile: api` on `GET` and `Content-Profile: api` on `POST` (including `/rpc/`). In `supabase-js`: `{ db: { schema: 'api' } }` or `supabase.schema('api')`.
* `PGRST106` means the schema is not exposed: Supabase Dashboard, Settings, API, **Exposed schemas**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.