Skip to main content

Join the Graylayer Discord

Request an API key in #api-key-request under the Community tab.
Platform key: forecastex · Path-based routing to forecastex.com and IBKR Client Portal Gateway. Forecastex provides Interactive Brokers event contract data. The integration is read-only—no trading endpoints.

forecastex.com paths

Upstream: https://forecastex.com/api
MethodPathDescription
GET/contractsList event contracts

Query parameters for /contracts

ParameterTypeDescription
pageintegerPage number (1-indexed)
pageSizeintegerResults per page
sortBystringField to sort by (e.g. open_interest, volume)
sortOrderstringasc or desc
curl -H "X-API-Key: your_key" \
  "http://gateway.graylayer.tech/api/v1/forecastex/contracts?page=1&pageSize=100&sortBy=open_interest&sortOrder=desc"

IBKR Gateway paths

Upstream: https://localhost:5000/v1/api or https://api.ibkr.com/v1/api Requires IBKR Client Portal Gateway running locally. Set FORECASTEX_IBKR_BASE_URL in .env. Tickle runs every 60s to keep the session alive.
MethodPathDescription
GET/trsrv/event/category-treeEvent contract category tree
GET/tickleKeep session alive
GET/iserver/secdef/searchSearch underlying index (query: symbol)
GET/iserver/secdef/strikesStrike values
GET/iserver/secdef/infoContract info
GET/forecast/category/treeCategory tree
GET/forecast/contract/detailsContract details (query: conid)
GET/forecast/contract/marketContracts for market (query: underlyingConid)
GET/forecast/contract/rulesContract rules (query: conid)
GET/forecast/contract/schedulesTrading schedules (query: conid)
curl -H "X-API-Key: your_key" \
  "http://gateway.graylayer.tech/api/v1/forecastex/trsrv/event/category-tree"