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

# Market Proxy Reference

> Complete endpoint reference for the Graylayer market proxy

## Base URL

```
http://gateway.graylayer.tech
```

API endpoints follow the pattern:

```
/api/v1/{platform}/{resource}
```

| Segment    | Values                                                                        |
| ---------- | ----------------------------------------------------------------------------- |
| `platform` | `polymarket`, `polymarket-clob`, `kalshi`, `gemini`, `coinbase`, `forecastex` |
| `resource` | Platform-specific path forwarded to the upstream API                          |

## Getting a key

<Card title="Join the Graylayer Discord" icon="discord" href="https://discord.gg/UxGa5C4C2A" horizontal>
  Request an API key in **#api-key-request** under the Community tab.
</Card>

## Authentication

All endpoints except `/health` require:

```
X-API-Key: your_key
```

## Health check

```bash theme={null}
curl http://gateway.graylayer.tech/health
```

```json theme={null}
{ "status": "ok" }
```

No authentication required.

## Error responses

| Status | Meaning                           |
| ------ | --------------------------------- |
| `401`  | Missing or invalid `X-API-Key`    |
| `429`  | Rate limit exceeded               |
| `502`  | Upstream API error or unreachable |
| `503`  | Upstream returned an error        |

Proxy errors return JSON:

```json theme={null}
{ "error": "unauthorized", "message": "Invalid API key" }
```

Upstream errors are passed through with the upstream status code and body.

## Endpoint reference

Browse the sidebar for detailed documentation of each platform's endpoints, or use the pages below for a quick reference.

<Columns cols={2}>
  <Card title="Polymarket Gamma" href="/platforms/polymarket-gamma" icon="chart-line">
    Markets, events, tags, series, search
  </Card>

  <Card title="Polymarket CLOB" href="/platforms/polymarket-clob" icon="book-open">
    Order book, prices, spreads, profiles
  </Card>

  <Card title="Kalshi" href="/platforms/kalshi" icon="building-columns">
    Markets, events, order books, portfolio
  </Card>

  <Card title="Gemini" href="/platforms/gemini" icon="gem">
    Prediction markets, market data
  </Card>

  <Card title="Forecastex" href="/platforms/forecastex" icon="file-contract">
    IBKR event contracts
  </Card>

  <Card title="Coinbase" href="/platforms/coinbase" icon="bitcoin-sign">
    Products, tickers, order books, candles
  </Card>
</Columns>
