> ## Documentation Index
> Fetch the complete documentation index at: https://docs.davidhf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Authenticate, choose a scenario, and pull your first synthetic market data.

This guide takes you from zero to your first David response. You'll authenticate, find a scenario, and query prices, fundamentals, and news for a ticker inside that scenario.

<Tip>
  Working in Python? The [official SDK](/sdk/python) wraps every endpoint: `pip install david-data`.
</Tip>

## Prerequisites

* An API key. Get one from the [dashboard](https://data.davidhf.com), and pass it in the `X-API-KEY` header on every request.
* The base URL for all requests is `https://api.davidhf.com`.

<Info>
  Every data endpoint requires a `scenario_id`. A scenario is a self-contained synthetic market world. See [Scenarios](/concepts/scenarios) for the full model.
</Info>

## Get started

<Steps>
  <Step title="Authenticate">
    Send your key in the `X-API-KEY` header. A quick health check confirms the connection:

    ```bash theme={null}
    curl -s https://api.davidhf.com/health \
      -H "X-API-KEY: YOUR_API_KEY"
    ```

    ```json theme={null}
    { "status": "ok", "environment": "production" }
    ```
  </Step>

  <Step title="Find a scenario">
    David ships with a library of ready-made scenarios. List them to grab a `scenario_id`:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -s "https://api.davidhf.com/scenarios?limit=3" \
        -H "X-API-KEY: YOUR_API_KEY"
      ```

      ```python Python theme={null}
      dd.scenarios.list(limit=3)
      ```
    </CodeGroup>

    ```json theme={null}
    {
      "scenarios": [
        {
          "id": "6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0",
          "status": "ready",
          "name": "War-driven energy shock: shipping-lane escalation ...",
          "start_date": "1993-05-28",
          "end_date": "2023-05-08",
          "public_summary": { "scenario_theme": "geopolitical_war_energy_shock", "...": "..." }
        }
      ]
    }
    ```

    Copy an `id`. You'll use it as `scenario_id` in every query below.
  </Step>

  <Step title="See what's inside">
    Inspect a scenario to see its date range and available tickers:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -s "https://api.davidhf.com/scenarios/6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0" \
        -H "X-API-KEY: YOUR_API_KEY"
      ```

      ```python Python theme={null}
      dd.scenarios.get("6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0")
      ```
    </CodeGroup>

    The response includes `available_tickers` (e.g. `AAPL`, `MSFT`, `NVDA`) and a `public_summary` describing the market world.
  </Step>

  <Step title="Pull prices">
    Query daily OHLCV for a ticker in that scenario:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -s "https://api.davidhf.com/prices?scenario_id=6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0&ticker=AAPL&interval=day&limit=5" \
        -H "X-API-KEY: YOUR_API_KEY"
      ```

      ```python Python theme={null}
      dd.prices.get("AAPL", scenario_id="6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0", interval="day", limit=5)
      ```
    </CodeGroup>

    ```json theme={null}
    {
      "ticker": "AAPL",
      "prices": [
        { "ticker": "AAPL", "open": 182.4, "high": 184.1, "low": 181.2, "close": 183.6, "volume": 51200000, "time": "2026-01-02" }
      ]
    }
    ```
  </Step>

  <Step title="Pull fundamentals and news">
    Same `scenario_id`, different endpoint:

    <CodeGroup>
      ```bash cURL theme={null}
      # Quarterly income statements
      curl -s "https://api.davidhf.com/financials/income-statements?scenario_id=6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0&ticker=AAPL&period=quarterly&limit=4" \
        -H "X-API-KEY: YOUR_API_KEY"

      # Latest news visible as of a date
      curl -s "https://api.davidhf.com/news?scenario_id=6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0&ticker=AAPL&as_of=2026-03-20" \
        -H "X-API-KEY: YOUR_API_KEY"
      ```

      ```python Python theme={null}
      # Quarterly income statements
      dd.financials.income_statements("AAPL", scenario_id="6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0", period="quarterly", limit=4)

      # Latest news visible as of a date
      dd.news.list(ticker="AAPL", scenario_id="6724c7d1-1b34-5da4-bc69-5ab0ef99c3c0", as_of="2026-03-20")
      ```
    </CodeGroup>
  </Step>
</Steps>

## Browse more scenarios

David curates the full scenario library, you don't generate worlds, you choose from them. Filter the library to assemble the sets you need:

<CodeGroup>
  ```bash cURL theme={null}
  # Future-branch scenarios that passed validation
  curl -s "https://api.davidhf.com/scenarios?path_mode=future_branch&healthy_only=true&limit=10" \
    -H "X-API-KEY: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  # Future-branch scenarios that passed validation
  dd.scenarios.list(path_mode="future_branch", healthy_only=True, limit=10)
  ```
</CodeGroup>

Need a world with characteristics the library doesn't cover? Reach out at [founders@davidhf.com](mailto:founders@davidhf.com) and we'll generate it.

## Next steps

<CardGroup cols={2}>
  <Card title="Scenarios" icon="layer-group" href="/concepts/scenarios">
    How worlds are scoped, validated, and replayed.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Keys, accounts, plans, and rate limits.
  </Card>

  <Card title="Point-in-time agents" icon="clock" href="/guides/point-in-time-agents">
    Build a leakage-free backtest loop.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/overview">
    Every endpoint in detail.
  </Card>
</CardGroup>

<Tip>
  Need help? Reach out at [founders@davidhf.com](mailto:founders@davidhf.com).
</Tip>
