Skip to main content

Subgraph

juicebox.money uses The Graph to load data from Juicebox protocol contracts without directly querying the blockchain.

Multiple subgraphs are maintained by Peel in a Graph Studio owned by the Peel Gnosis safe. Only the primary Juicebox subgraph has been published to the Graph Network; others are available to use for free with rate-limited queries.

NameURLDescription
juiceboxView on Graph explorerThe primary mainnet subgraph used by juicebox.money.
mainnet-devQueries: https://api.studio.thegraph.com/query/30654/mainnet-dev/0.3.0Indexes mainnet Juicebox protocol contracts.
rinkeby-devQueries: https://api.studio.thegraph.com/query/30654/rinkeby-dev/0.3.0Indexes rinkeby Juicebox protocol contracts.

Querying the subgraph

The Juicebox subgraph schema is the same on all networks, and can be found on the following page. For information on structuring Graph queries, read the Graph docs. You can also reference the tools used for juicebox.money.

Avoid Rate-Limiting

To use the mainnet Juicebox subgraph without being rate-limited:

  1. Create your API key on Subgraph Studio API Keys.
  2. Fund your billing balance on Subgraph Studio Billing.
  3. Query the mainnet Juicebox subgraph using https://gateway.thegraph.com/api/<your-api-key>/subgraphs/id/FVmuv3TndQDNd2BWARV8Y27yuKKukryKXPzvAS5E7htC.

You can also follow the Video Tutorial.

For more info on Graph query billing, visit Billing on the Subgraph Studio - The Graph Docs and Managing your API Key & Setting your indexer preferences.