> For the complete documentation index, see [llms.txt](https://ottodata.gitbook.io/ottodata-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ottodata.gitbook.io/ottodata-docs/getting-started/quickstart.md).

# Quickstart

## Quickstart

Everything below works with zero setup — no API key, no account.

Base URL: **`https://api.ottodata.app`**

### 1. Get the live basis snapshot

```bash
curl https://api.ottodata.app/v1/basis/snapshot
```

```json
{
  "count": 32,
  "ticks": [
    {
      "ts": 1784189981,
      "ticker": "AAPL",
      "chainlink_px": 328.24995,
      "ref_last": 327.5,
      "basis_bps": 22.9,
      "overnight_bps": 22.9,
      "oracle_paused": 0
    }
  ]
}
```

`basis_bps` of +22.9 means the on-chain AAPL token trades 0.229% above the NASDAQ reference right now.

### 2. Find the biggest overnight movers

```bash
curl "https://api.ottodata.app/v1/gaps/live"
```

During NASDAQ off-hours this returns every ticker ranked by how far the on-chain price has moved since the last close. When markets are open it returns `{"session": "regular"}`.

### 3. Watch whale transfers

```bash
curl "https://api.ottodata.app/v1/flows?min_usd=50000&hours=24"
```

Large stock-token and USDG transfers, with mints and burns flagged separately (mint/burn = tokenized stock supply changing).

### 4. Stream basis over WebSocket

```python
import websockets, asyncio, json

async def main():
    uri = "wss://api.ottodata.app/v1/stream/basis?tickers=NVDA,TSLA&interval=15"
    async with websockets.connect(uri) as ws:
        while True:
            print(json.loads(await ws.recv()))

asyncio.run(main())
```

### 5. Point your AI agent at the MCP server

Add to Cursor (`~/.cursor/mcp.json`) or any MCP client:

```json
{ "mcpServers": { "otto-data": { "url": "https://api.ottodata.app/mcp" } } }
```

Then ask: *"Which Hood token has the biggest overnight premium right now?"* — the agent calls the tools itself. See [MCP for AI agents](https://ottodata.gitbook.io/ottodata-docs/mcp-for-ai-agents/overview).

### Where to go next

* [Concepts → Basis](https://ottodata.gitbook.io/ottodata-docs/concepts/basis-on-chain-vs-nasdaq) — understand what the numbers mean
* [API reference → Overview](https://ottodata.gitbook.io/ottodata-docs/api-reference/overview) — every endpoint, with parameters
* Interactive Swagger UI: [api.ottodata.app/docs](https://api.ottodata.app/docs)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ottodata.gitbook.io/ottodata-docs/getting-started/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
