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

# API Reference

> Complete reference for the VecTrade REST API, generated from the canonical OpenAPI contract.

# API Reference

The VecTrade API is organized around REST. All requests use `https://api.vectrade.io/v1` as the base URL and return JSON responses.

## Base URL

```
https://api.vectrade.io/v1
```

## Authentication

All endpoints require an API key via the `X-API-Key` header:

```bash theme={null}
X-API-Key: vq_your_key_here
```

Get your key at [vectrade.io/vtrade/developer](https://vectrade.io/vtrade/developer). See the [Authentication Guide](/guides/authentication) for key management best practices.

## Endpoint Groups

<CardGroup cols={2}>
  <Card title="Market Data" icon="chart-candlestick" href="/api-reference/quotes/get-quote">
    Real-time quotes, fundamentals, technicals, news, historical prices, and ETF data.
  </Card>

  <Card title="Research & Analysis" icon="brain" href="/api-reference/analyst/consensus">
    Analyst ratings, price targets, earnings, insider trades, sentiment, and company profiles.
  </Card>

  <Card title="Options" icon="bell" href="/api-reference/options/chain">
    Full options chains with Greeks and expiration data.
  </Card>

  <Card title="Portfolio Intelligence" icon="key" href="/api-reference/fundamentals/get-fundamentals">
    Financial statements, balance sheets, and key ratios for fundamental analysis.
  </Card>
</CardGroup>

## Quick Summary

Use the endpoint pages in this section as the primary reference. Each page binds to an OpenAPI operation via its `openapi` frontmatter key, so the method/path mapping is validated against the checked-in spec.

## SDKs

Don't want to work with raw HTTP? Use our official SDKs:

<CardGroup cols={3}>
  <Card title="Python" icon="python" href="/sdks/python">
    `pip install vectrade`
  </Card>

  <Card title="TypeScript" icon="js" href="/sdks/typescript">
    `npm install @vectrade/sdk`
  </Card>

  <Card title="Go CLI" icon="terminal" href="/sdks/cli">
    `brew install VecTrade-io/vectrade/vectrade`
  </Card>

  <Card title="FinKit" icon="calculator" href="/sdks/finkit">
    `pip install vectrade-finkit`
  </Card>

  <Card title="MCP Server" icon="plug" href="/sdks/mcp">
    AI IDE integration
  </Card>

  <Card title="AI Provider" icon="wand-magic-sparkles" href="/sdks/ai-provider">
    Vercel AI SDK
  </Card>
</CardGroup>

## Rate Limits

| Plan       | Requests/min | Requests/day |
| ---------- | ------------ | ------------ |
| Free       | 30           | 1,000        |
| Pro        | 300          | 50,000       |
| Enterprise | Custom       | Custom       |

See [Rate Limits Guide](/guides/rate-limits) for optimization strategies.

## Errors

All errors return a consistent JSON structure:

```json theme={null}
{
  "error": {
    "type": "rate_limit_error",
    "message": "Rate limit exceeded",
    "request_id": "req_abc123",
    "retry_after": 2
  }
}
```

See [Error Handling Guide](/guides/error-handling) for the full error taxonomy and retry strategies.
