# API Overview

This section explains the WhiteSwap Subgraph and how to interact with it. The WhiteSwap subgraph indexes data from the WhiteSwap contracts over time. It organizes data about pairs, tokens, WhiteSwap as a whole, and more. The subgraph updates any time a transaction is made on WhiteSwap. The subgraph runs on [The Graph](https://thegraph.com/) protocol’s hosted service and can be openly queried.

### Resources <a href="#resources" id="resources"></a>

[Subgraph Explorer](https://thegraph.com/explorer/subgraph/whiteswapfi/whiteswap) - sandbox for querying data and endpoints for developers.

WhiteSwap [Subgraph](https://github.com/WhiteSwap/whiteswap-subgraph) - source code for deployed subgraph.

### Usage <a href="#usage" id="usage"></a>

The subgraph provides a snapshot of the current state of WhiteSwap and also tracks historical data. It is currently used to power [info.ws.exchange](https://info.ws.exchange/). **It is not intended to be used as a data source for structuring transactions (contracts should be referenced directly for the most reliable live data).**

### Making Queries <a href="#making-queries" id="making-queries"></a>

To learn more about querying a subgraph refer to [The Graph’s documentation](https://thegraph.com/docs/introduction).


---

# 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.ws.exchange/reference/api/api-overview.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.
