# Whitelist subgraph

The whitelist stores trusted data providers, their individual data feeds and the collateral tokens that have to be used in order to be eligible for the oracle services:

The whitelist subgraph can be accessed here:&#x20;

* Ropsten (deprecated): <https://thegraph.com/hosted-service/subgraph/divaprotocol/diva-whitelist-ropsten>
* Goerli: <https://thegraph.com/hosted-service/subgraph/divaprotocol/diva-whitelist-goerli>

## Data providers

Data providers can be and their offered data feeds can be queried as follows (here querying the first two data providers in the whitelist):

```
{
  dataProviders(first: 2) {
    id
    name
    publicTrigger
    dataFeeds {
      id
      referenceAsset
      referenceAssetUnified
      active
    }
  }
}
```

Sample output of above query:

```
{
  "data": {
    "dataProviders": [
      {
        "id": "0x9adefeb576dcf52f5220709c1b267d89d5208d78",
        "name": "Individual 1",
        "publicTrigger": false,
        "dataFeeds": [
          {
            "id": "0x9adefeb576dcf52f5220709c1b267d89d5208d78-0",
            "referenceAsset": "DIVA/USD",
            "referenceAssetUnified": "DIVA/USD",
            "active": true
          },
          {
            "id": "0x9adefeb576dcf52f5220709c1b267d89d5208d78-1",
            "referenceAsset": "BTC/USD",
            "referenceAssetUnified": "BTC/USD",
            "active": true
          }
        ]
      },
      {
        "id": "0xed6d661645a11c45f4b82274db677867a7d32675",
        "name": "Tellor",
        "publicTrigger": true,
        "dataFeeds": [
          {
            "id": "0xed6d661645a11c45f4b82274db677867a7d32675-0",
            "referenceAsset": "ETH/USD",
            "referenceAssetUnified": "ETH/USD",
            "active": true
          },
          {
            "id": "0xed6d661645a11c45f4b82274db677867a7d32675-1",
            "referenceAsset": "BTC/USD",
            "referenceAssetUnified": "BTC/USD",
            "active": true
          }
        ]
      }
    ]
  }
}
```

## Data feeds

The following query shows all data providers that can provide a given data feed (here ETH/USD):

```
{
  dataFeeds(where:{referenceAssetUnified:"ETH/USD", active:true}) {
    id
    referenceAsset
    referenceAssetUnified
    dataProvider {
      id
      name
      publicTrigger
    }
    active
  }
}

```

Sample output of above query:

```
{
  "data": {
    "dataFeeds": [
      {
        "id": "0xed6d661645a11c45f4b82274db677867a7d32675-0",
        "referenceAsset": "ETH/USD",
        "referenceAssetUnified": "ETH/USD",
        "dataProvider": {
          "id": "0xed6d661645a11c45f4b82274db677867a7d32675",
          "name": "Tellor",
          "publicTrigger": true
        },
        "active": true
      }
    ]
  }
}
```

## Collateral tokens

The following query returns all collateral tokens that are supported by whitelisted data providers:

```
{
  collateralTokens(first:2){
    id
    name
    symbol
    decimals
  }
}

```

Sample output of above query:

```
{
  "data": {
    "collateralTokens": [
      {
        "id": "0x384a78a65189c696a009681b20880cd9af01bc16",
        "name": "WAGMI20",
        "symbol": "WAGMI20",
        "decimals": 20
      },
      {
        "id": "0x867e53fede91d27101e062bf7002143ebaea3e30",
        "name": "WAGMI18",
        "symbol": "WAGMI18",
        "decimals": 18
      }
    ]
  }
}
```


---

# 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.divaprotocol.io/for-developers/thegraph/whitelist-subgraph.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.
