Skip to main content

Join the Graylayer Discord

Request an API key in #api-key-request under the Community tab.
The proxy supports WebSocket connections to all major platforms. Connect to the proxy WebSocket endpoint and it forwards messages to and from the upstream platform.

Connection pattern

wss://gateway.graylayer.tech/ws/{platform}/{channel}?api_key=YOUR_KEY
Because browsers cannot set custom headers on WebSocket connections, authentication uses the api_key query parameter instead of the X-API-Key header.

Available connections

PlatformPathUpstream
Polymarket market/ws/polymarket/marketwss://ws-subscriptions-clob.polymarket.com/ws/market
Polymarket user/ws/polymarket/userwss://ws-subscriptions-clob.polymarket.com/ws/user
Polymarket sports/ws/polymarket/sportswss://sports-api.polymarket.com/ws
Kalshi/ws/kalshiwss://api.elections.kalshi.com/trade-api/ws/v2
Coinbase/ws/coinbasewss://ws-feed.exchange.coinbase.com
Gemini/ws/geminiwss://wsapi.fast.gemini.com

Testing with wscat

npm install -g wscat
wscat -c "wss://gateway.graylayer.tech/ws/polymarket/market?api_key=your_key"

Platform-specific details

Polymarket

Market, user, and sports channels. Requires subscription messages.

Kalshi

Full Kalshi WebSocket with RSA-PSS auth handled by the proxy.

Coinbase

Ticker, level2, and heartbeat channels for crypto pairs.

Gemini

Market data and prediction market streams.