# Sample Subgraph Queries

The following queries can be swapped into the `query` variable in the [Subgraph Query in Python](/developer-guides/carbon-defi-subgraph/subgraph-query-in-python.md) example to fetch the indicated data.

### Strategies Sample Query

```python
# The Graph query
query = """

{
  strategies(first: 10) {
    id
    order0 {
      A
      B
      y
      z
      inputToken {
        symbol
      }
      outputToken {
        symbol
      }
    }
    token0 {
      id
    }
    token1 {
      id
    }
    order1 {
      A
      B
      y
      z
      inputToken {
        symbol
      }
      outputToken {
        symbol
      }
    }
    owner {
        id
      }
  }
}
"""
```

### Pairs Sample Query

```
# The Graph query
query = """
{
  pairs {
    token0 {
      symbol
    }
    token1 {
      symbol
    }
  }
}
"""
```

### Trades Sample Query

```
# The Graph query
query = """
{
  trades {
    sourceAmount
    targetAmount
    sourceToken {
      symbol
    }
    targetToken {
      symbol
    }
    tradingFeeAmount
    transactionHash
    blockNumber
  }
}
"""
```


---

# 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.carbondefi.xyz/developer-guides/carbon-defi-subgraph/sample-subgraph-queries.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.
