Skip to content

Commit

Permalink
Merge pull request #114 from balancer/update-subgraphs
Browse files Browse the repository at this point in the history
update subgraphs endpoints
  • Loading branch information
mikemcdonald committed Jun 28, 2023
2 parents 58a4171 + fec0564 commit be8c444
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions docs/reference/subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ title: Overview

The Balancer Subgraph indexes data on the Balancer smart contracts with a GraphQL interface. It updates data in response to function calls and contract events to maintain data on the `Vault`, `Pools`, `AssetManagers` etc, to power front-end apps and integrations.

| Network | Subgraph URL |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ethereum Mainnet | [https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-v2](https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-v2) |
| Polygon | [https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-polygon-v2](https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-polygon-v2) |
| Arbitrum | [https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-arbitrum-v2](https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-arbitrum-v2) |
| Goerli | [https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-goerli-v2](https://thegraph.com/legacy-explorer/subgraph/balancer-labs/balancer-goerli-v2) |
| Network | Subgraph URL |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ethereum Mainnet | [https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2](https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2) |
| Polygon | [https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2](https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2) |
| Polygon zkEVM | [https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest](https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest) |
| Arbitrum | [https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2](https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2) |
| Optimism | [https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-optimism-v2](https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-optimism-v2) |
| Gnosis Chain | [https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2](https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2) |
| Avalanche | [https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2](https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2) |
| Goerli | [https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2](https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2) |
| Sepolia | [https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest](https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest) |

### GraphQL Schema

Expand Down Expand Up @@ -94,9 +99,18 @@ Fetch historical metrics for a given pool
```

Find pools that have specific tokens in them (WETH and BAL in this example)

```graphql
{
pools(first: 100, where:{tokensList_contains: ["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0xba100000625a3754423978a60c9317c58a424e3D"]}) {
pools(
first: 100
where: {
tokensList_contains: [
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
"0xba100000625a3754423978a60c9317c58a424e3D"
]
}
) {
id
poolType
poolTypeVersion
Expand Down

1 comment on commit be8c444

@vercel
Copy link

@vercel vercel bot commented on be8c444 Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.