> For the complete documentation index, see [llms.txt](https://documentation.kodiak.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.kodiak.finance/developers/dex/pricing-with-subgraph.md).

# Pricing with Subgraph

{% hint style="danger" %}
For current prices, subgraph pricing is deprecated. Please use [api pricing](/developers/backend-api.md)
{% endhint %}

As of May 2026, Kodiak provides a single combined subgraph endpoint for both V2, V3, and Kodiak Islands.  The V2 endpoint follows similar pattern to Uniswap V2 subgraph, and V3 endpoint follows similar pattern to Uniswap V3 subgraph.&#x20;

#### Endpoint:

```
https://api.subgraph.ormilabs.com/api/public/d7eed6cc-ad4a-4862-8017-89893c4095d3/subgraphs/kodiak-v3/latest/gn
```

1. **Understand the Basics of Subgraphs**:
   * Subgraphs index blockchain data and expose it through GraphQL endpoints.
   * Each subgraph has entities (e.g., `token`, `pool`, `transaction`) that define the structure of the data you can query.
2. **Read the Subgraph Documentation**:\
   Learn how subgraph works\
   [The Graph Doucmentation](https://thegraph.com/docs/en/querying/querying-the-graph/)
3. **Set Up a GraphQL Client**:
   * Use tools like Postman, Insomnia, or GraphQL playgrounds to send queries.
   * In your application, you can use libraries like `graphql-request` or Apollo Client.
4. **Know the Key Entities**:
   * **`token`**: Represents individual tokens, their metadata, and derived pricing.
   * **`bundle`**: Contains aggregate data like the current price of ETH in USD.

#### Query examples

1. Fetching a Specific Token’s Price in ETH and USD<br>

   ```graphql
   {
     token(id: "TOKEN_ADDRESS") {
       id
       symbol
       name
       derivedETH
     }
     bundle(id: "1") {
       ethPriceUSD
     }
   }
   ```

   * **Replace `TOKEN_ADDRESS`** with the contract address of the token you’re querying.
   * Use thie formula to calculate USD price:&#x20;
     * `Token Price (USD) = derivedETH * ethPrice`
2. Listing All Tokens with Derived Prices

   ```graphql
   {
     tokens(first: 10) {
       id
       symbol
       name
       derivedETH
     }
     bundle(id: "1") {
       ethPrice
     }
   }
   ```

   \
   **Example response:**

   ```graphql
   {
     "data": {
       "tokens": [
         { "id": "0x...123", "symbol": "USDT", "name": "Tether", "derivedETH": "0.0005" },
         { "id": "0x...456", "symbol": "USDC", "name": "USD Coin", "derivedETH": "0.0005" }
       ],
       "bundle": {
         "ethPrice": "2000"
       }
     }
   }
   ```

\ <br>
