> ## 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.

# Graylayer

> Market data APIs for prediction markets and crypto exchanges

Graylayer provides two APIs for accessing prediction market and crypto data:

* **Market Proxy** (`gateway.graylayer.tech`) — a unified REST and WebSocket gateway for Polymarket, Kalshi, Gemini, Coinbase, and Forecastex. One API key, all platforms.
* **Orderbook History API** (`data.graylayer.tech`) — historical orderbook snapshots and deltas from Kalshi, Gemini, and Polymarket US.

## Getting a key

API keys are issued via Discord. Join the server, go to the **Community** tab, and post a request in **#api-key-request**.

<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>

## Market Proxy

All requests go to `http://gateway.graylayer.tech/api/v1/{platform}/{resource}`. The proxy validates your `X-API-Key`, forwards the request to the upstream platform, injects any required credentials (e.g. Kalshi RSA-PSS signatures), and returns the upstream response unchanged.

<Columns cols={2}>
  <Card title="Polymarket" icon="chart-line" href="/platforms/polymarket">
    Markets, events, order books, prices, profiles, and trades.
  </Card>

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

  <Card title="Gemini" icon="gem" href="/platforms/gemini">
    Prediction market categories, events, and market data.
  </Card>

  <Card title="Forecastex" icon="file-contract" href="/platforms/forecastex">
    IBKR event contract data with open interest (read-only).
  </Card>

  <Card title="Coinbase" icon="bitcoin-sign" href="/platforms/coinbase">
    Spot exchange market data. US-friendly. Public endpoints, no auth needed.
  </Card>
</Columns>

## Orderbook History API

`http://data.graylayer.tech` — query historical snapshots and deltas for any ticker across exchanges.

<Columns cols={2}>
  <Card title="Overview & auth" icon="database" href="/orderbook-api/overview">
    Authentication, rate limits, anonymous access, and admin API.
  </Card>

  <Card title="Endpoints" icon="brackets-curly" href="/orderbook-api/endpoints">
    Tickers, snapshots, deltas — with full query parameter reference and examples.
  </Card>
</Columns>
