# Subgraphs

All the core smart contracts emit various Blockchain Events which are recorded and collated/aggregated within the subgraphs, developed using The Graph framework. This allows for off-chain access of market and governance data using the GraphQL syntax.

{% hint style="info" %}
The subgraphs are namespaced using the convention `OptSwapDAO*`, where `*` is the name of the blockchain network that this particular graph is indexing.
{% endhint %}

### Subgraph Latencies

Note that subgraphs may have a slight latency associated with indexing the blockchain events before they are queryable. The latencies are caused by various factors, including RPC endpoint response delays, event data processing time, database writing & indexing time and subgraph query processing and response time.

{% hint style="warning" %}
Latencies may range from a few milliseconds to several seconds depending on network conditions, server load and availability. Clients must always validate the freshness of the response data by comparing the timestamps or block numbers of any data they are querying against the latest timestamp or block number from an independent node or RPC endpoint.
{% endhint %}

{% hint style="success" %}
To reduce latency, consider deploying your own OptSwap subgraph locally, using your own local nodes and local RPC endpoints for the networks you are interested in.\
\
TODO -- deploying your own OptSwap subgraph node
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.optswap.org/technical-reference/subgraphs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
