Subgraphs on Amoy
Forkast publishes a collection of read-only subgraphs on Polygon Amoy so builders can analyze activity without running archival nodes. Each endpoint is hosted on The Graph Studio and is updated every few blocks, mirroring the same data our internal analytics team uses.You can query any subgraph with GraphQL over HTTPS. Set the
content-type: application/json header and post a JSON payload containing a query field plus optional variables.Available endpoints
| Env var | URL | Purpose |
|---|---|---|
PNL_SUBGRAPH_URL | https://api.studio.thegraph.com/query/113376/forkast-pnl/version/latest | Unrealized/realized PnL per wallet and per condition. |
ORDERBOOK_SUBGRAPH_URL | https://api.studio.thegraph.com/query/113376/forkast-orderbook/version/latest | Level-2 quotes, resting orders, and fill aggregates. |
ACTIVITY_SUBGRAPH_URL | https://api.studio.thegraph.com/query/113376/forkast-activity/version/latest | Splits, merges, redeems, transfers, and rewards history. |
OPEN_INTEREST_SUBGRAPH_URL | https://api.studio.thegraph.com/query/116566/forkast-oi/version/latest | Outstanding collateral per market and event. |
WALLET_SUBGRAPH_URL | https://api.studio.thegraph.com/query/116566/forkast-wallet/version/latest | Wallet-scoped balances, events, and net exposure snapshots. |
FPMM_SUBGRAPH_URL | https://api.studio.thegraph.com/query/116566/forkast-fpmm/version/latest | Fixed-product market maker (FPMM) pools that backstop liquidity. |
.env file so scripts can swap between staging and production more easily. Although Amoy is our default development network, the structure mirrors mainnet, making it simple to promote the same queries later on.
Example query
first/skip, and reusable fragments.
Monitoring and pagination tips
- Most Forkast subgraphs expose
meta { block { number } }. Poll this to ensure your backend is ingesting a sufficiently fresh block height. - When syncing historical data, paginate by deterministic fields such as
timestamporblockNumber. This avoids skipping data if the indexer reorders IDs. - Use field-level filters (e.g.,
where: { condition_in: [...] }) to stay within the default 100-item limit and reduce response latency.