subgraphs > 计费

计费

Reading time: 13 min

Subgraph Billing Plans

链到本节

There are two plans to use when querying subgraphs on The Graph Network.

  • Free Plan: The Free Plan includes 100,000 free monthly queries with full access to the Subgraph Studio testing environment. This plan is designed for hobbyists, hackathoners, and those with side projects to try out The Graph before scaling their dapp.

  • Growth Plan: The Growth Plan includes everything in the Free Plan with all queries after 100,000 monthly queries requiring payments with GRT or credit card. The Growth Plan is flexible enough to cover teams that have established dapps across a variety of use cases.

Query Payments with credit card

链到本节
  • To set up billing with credit/debit cards, users should access Subgraph Studio (https://thegraph.com/studio/)
    1. Go to the Subgraph Studio Billing page.
    2. 单击页面右上角的“Connect Wallet”(连接钱包)按钮。您将被重定向到钱包选择页面。选择您的钱包,然后单击“Connect”(连接)。
    3. Choose “Upgrade plan” if you are upgrading from the Free Plan or choose “Manage Plan” if you have already added GRT to your billing balance in the past. Next, you can estimate the number of queries to get a pricing estimate, but this is not a required step.
    4. To choose a credit card payment, choose “Credit card” as the payment method and fill out your credit card information. Those who have used Stripe before can use the Link feature to autofill their details.
  • Invoices will be processed at the end of each month and require an active credit card on file for all queries beyond the free plan quota.

Query Payments with GRT

链到本节

Subgraph users can use The Graph Token (or GRT) to pay for queries on The Graph Network. With GRT, invoices will be processed at the end of each month and require a sufficient balance of GRT to make queries beyond the Free Plan quota of 100,000 monthly queries. You'll be required to pay fees generated from your API keys. Using the billing contract, you'll be able to:

  • 从您的账户余额中添加和提取GRT。
  • 根据您的账户添加的GRT数量、移除的数量和发票,跟踪您的余额。
  • 只要您的账单余额中有足够的GRT,就可以根据生成的查询费用自动支付发票。

GRT on Arbitrum or Ethereum

链到本节

The Graph’s billing system accepts GRT on Arbitrum, and users will need ETH on Arbitrum to pay their gas. While The Graph protocol started on Ethereum Mainnet, all activity, including the billing contracts, is now on Arbitrum One.

To pay for queries, you need GRT on Arbitrum. Here are a few different ways to achieve this:

  • If you already have GRT on Ethereum, you can bridge it to Arbitrum. You can do this via the GRT bridging option provided in Subgraph Studio or by using one of the following bridges:

  • The Arbitrum Bridge

  • 转移到

  • If you already have assets on Arbitrum, you can swap them for GRT via a swapping protocol like Uniswap.

  • Alternatively, you acquire GRT directly on Arbitrum through a decentralized exchange.

This section is written assuming you already have GRT in your wallet, and you're on Arbitrum. If you don't have GRT, you can learn how to get GRT here.

Once you bridge GRT, you can add it to your billing balance.

Adding GRT using a wallet

链到本节
  1. Go to the Subgraph Studio Billing page.
  2. 单击页面右上角的“Connect Wallet”(连接钱包)按钮。您将被重定向到钱包选择页面。选择您的钱包,然后单击“Connect”(连接)。
  3. Select the "Manage" button near the top right corner. First time users will see an option to "Upgrade to Growth plan" while returning users will click "Deposit from wallet".
  4. Use the slider to estimate the number of queries you expect to make on a monthly basis.
    • For suggestions on the number of queries you may use, see our Frequently Asked Questions page.
  5. Choose "Cryptocurrency". GRT is currently the only cryptocurrency accepted on The Graph Network.
  6. Select the number of months you would like to prepay.
    • Paying in advance does not commit you to future usage. You will only be charged for what you use and you can withdraw your balance at any time.
  7. Pick the network from which you are depositing your GRT. GRT on Arbitrum or Ethereum are both acceptable.
  8. Click "Allow GRT Access" and then specify the amount of GRT that can be taken from you wallet.
    • If you are prepaying for multiple months, you must allow access to the amount that corresponds with that amount. This interaction will not cost any gas.
  9. Lastly, click on "Add GRT to Billing Balance". This transaction will require ETH on Arbitrum to cover the gas costs.
  • Note that GRT deposited from Arbitrum will process within a few moments while GRT deposited from Ethereum will take approximately 15-20 minutes to process. Once the transaction is confirmed, you'll see the GRT added to your account balance.

Withdrawing GRT using a wallet

链到本节
  1. Go to the Subgraph Studio Billing page.
  2. Click on the "Connect Wallet" button on the top right corner of the page. Select your wallet and click on "Connect".
  3. Click the "Manage" button at the top right corner of the page. Select "Withdraw GRT". A side panel will appear.
  4. Enter the amount of GRT you would like to withdraw.
  5. Click 'Withdraw GRT' to withdraw the GRT from your account balance. Sign the associated transaction in your wallet. This will cost gas. The GRT will be sent to your Arbitrum wallet.
  6. Once the transaction is confirmed, you'll see the GRT withdrawn from your account balance in your Arbitrum wallet.

使用多签钱包添加GRT

链到本节
  1. Go to the Subgraph Studio Billing page.
  2. Click on the "Connect Wallet" button on the top right corner of the page. Select your wallet and click on "Connect". If you're using Gnosis-Safe, you'll be able to connect your multisig as well as your signing wallet. Then, sign the associated message. This will not cost any gas.
  3. Select the "Manage" button near the top right corner. First time users will see an option to "Upgrade to Growth plan" while returning users will click "Deposit from wallet".
  4. Use the slider to estimate the number of queries you expect to make on a monthly basis.
    • For suggestions on the number of queries you may use, see our Frequently Asked Questions page.
  5. Choose "Cryptocurrency". GRT is currently the only cryptocurrency accepted on The Graph Network.
  6. Select the number of months you would like to prepay.
    • Paying in advance does not commit you to future usage. You will only be charged for what you use and you can withdraw your balance at any time.
  7. Pick the network from which you are depositing your GRT. GRT on Arbitrum or Ethereum are both acceptable. 8. Click "Allow GRT Access" and then specify the amount of GRT that can be taken from you wallet.
    • If you are prepaying for multiple months, you must allow access to the amount that corresponds with that amount. This interaction will not cost any gas.
  8. Lastly, click on "Add GRT to Billing Balance". This transaction will require ETH on Arbitrum to cover the gas costs.
  • Note that GRT deposited from Arbitrum will process within a few moments while GRT deposited from Ethereum will take approximately 15-20 minutes to process. Once the transaction is confirmed, you'll see the GRT added to your account balance.

Getting GRT

链到本节

This section will show you how to get GRT to pay for query fees.

Coinbase

链到本节

This will be a step by step guide for purchasing GRT on Coinbase.

  1. Go to Coinbase and create an account.
  2. Once you have created an account, you will need to verify your identity through a process known as KYC (or Know Your Customer). This is a standard procedure for all centralized or custodial crypto exchanges.
  3. Once you have verified your identity, you can purchase GRT. You can do this by clicking on the "Buy/Sell" button on the top right of the page.
  4. Select the currency you want to purchase. Select GRT.
  5. Select the payment method. Select your preferred payment method.
  6. Select the amount of GRT you want to purchase.
  7. Review your purchase. Review your purchase and click "Buy GRT".
  8. Confirm your purchase. Confirm your purchase and you will have successfully purchased GRT.
  9. You can transfer the GRT from your account to your wallet such as MetaMask.
    • To transfer the GRT to your wallet, click on the "Accounts" button on the top right of the page.
    • Click on the "Send" button next to the GRT account.
    • Enter the amount of GRT you want to send and the wallet address you want to send it to.
    • Click "Continue" and confirm your transaction. -Please note that for larger purchase amounts, Coinbase may require you to wait 7-10 days before transferring the full amount to a wallet.

You can learn more about getting GRT on Coinbase here.

Binance

链到本节

This will be a step by step guide for purchasing GRT on Binance.

  1. Go to Binance and create an account.
  2. Once you have created an account, you will need to verify your identity through a process known as KYC (or Know Your Customer). This is a standard procedure for all centralized or custodial crypto exchanges.
  3. Once you have verified your identity, you can purchase GRT. You can do this by clicking on the "Buy Now" button on the homepage banner.
  4. You will be taken to a page where you can select the currency you want to purchase. Select GRT.
  5. Select your preferred payment method. You'll be able to pay with different fiat currencies such as Euros, US Dollars, and more.
  6. Select the amount of GRT you want to purchase.
  7. Review your purchase and click "Buy GRT".
  8. Confirm your purchase and you will be able to see your GRT in your Binance Spot Wallet.
  9. You can withdraw the GRT from your account to your wallet such as MetaMask.
    • To withdraw the GRT to your wallet, add your wallet's address to the withdrawal whitelist.
    • Click on the "wallet" button, click withdraw, and select GRT.
    • Enter the amount of GRT you want to send and the whitelisted wallet address you want to send it to.
    • Click "Continue" and confirm your transaction.

You can learn more about getting GRT on Binance here.

Uniswap

链到本节

This is how you can purchase GRT on Uniswap.

  1. Go to Uniswap and connect your wallet.
  2. Select the token you want to swap from. Select ETH.
  3. Select the token you want to swap to. Select GRT.
  4. Enter the amount of ETH you want to swap.
  5. Click "Swap".
  6. Confirm the transaction in your wallet and you wait for the transaction to process.

You can learn more about getting GRT on Uniswap here.

Getting Ether

链到本节

This section will show you how to get Ether (ETH) to pay for transaction fees or gas costs. ETH is necessary to execute operations on the Ethereum network such as transferring tokens or interacting with contracts.

Coinbase

链到本节

This will be a step by step guide for purchasing ETH on Coinbase.

  1. Go to Coinbase and create an account.
  2. Once you have created an account, verify your identity through a process known as KYC (or Know Your Customer). This is a standard procedure for all centralized or custodial crypto exchanges.
  3. Once you have verified your identity, purchase ETH by clicking on the "Buy/Sell" button on the top right of the page.
  4. Select the currency you want to purchase. Select ETH.
  5. Select your preferred payment method.
  6. Enter the amount of ETH you want to purchase.
  7. Review your purchase and click "Buy ETH".
  8. Confirm your purchase and you will have successfully purchased ETH.
  9. You can transfer the ETH from your Coinbase account to your wallet such as MetaMask.
    • To transfer the ETH to your wallet, click on the "Accounts" button on the top right of the page.
    • Click on the "Send" button next to the ETH account.
    • Enter the amount of ETH you want to send and the wallet address you want to send it to.
    • Ensure that you are sending to your Ethereum wallet address on Arbitrum One.
    • Click "Continue" and confirm your transaction.

You can learn more about getting ETH on Coinbase here.

Binance

链到本节

This will be a step by step guide for purchasing ETH on Binance.

  1. Go to Binance and create an account.
  2. Once you have created an account, verify your identity through a process known as KYC (or Know Your Customer). This is a standard procedure for all centralized or custodial crypto exchanges.
  3. 一旦您完成了身份验证,您可以通过在首页横幅上点击“立即购买”按钮来购买ETH。
  4. Select the currency you want to purchase. Select ETH.
  5. Select your preferred payment method.
  6. Enter the amount of ETH you want to purchase.
  7. Review your purchase and click "Buy ETH".
  8. 确认您的购买,您将能够在Binance现货钱包中看到您的ETH。
  9. You can withdraw the ETH from your account to your wallet such as MetaMask.
    • To withdraw the ETH to your wallet, add your wallet's address to the withdrawal whitelist.
    • 单击“钱包”按钮,单击提取,然后选择ETH。
    • 输入您要发送的ETH金额和您要发送到的白名单钱包地址。
    • Ensure that you are sending to your Ethereum wallet address on Arbitrum One.
    • Click "Continue" and confirm your transaction.

You can learn more about getting ETH on Binance here.

Billing FAQs

链到本节

How many queries will I need?

链到本节

You don't need to know how many queries you'll need in advance. You will only be charged for what you use and you can withdraw GRT from your account at any time.

We recommend you overestimate the number of queries you will need so that you don’t have to top up your balance frequently. A good estimate for small to medium sized applications is to start with 1M-2M queries per month and monitor usage closely in the first weeks. For larger apps, a good estimate is to use the number of daily visits your site gets multiplied by the number of queries your most active page makes upon opening.

Of course, both new and existing users can reach out to Edge & Node's BD team for a consult to learn more about anticipated usage.

Can I withdraw GRT from my billing balance?

链到本节

Yes, you can always withdraw GRT that has not already been used for queries from your billing balance. The billing contract is only designed to bridge GRT from Ethereum mainnet to the Arbitrum network. If you'd like to transfer your GRT from Arbitrum back to Ethereum mainnet, you'll need to use the Arbitrum Bridge.

What happens when my billing balance runs out? Will I get a warning?

链到本节

You will receive several email notifications before your billing balance runs out.

编辑

上页
FAQ
下页
使用分叉快速轻松地调试子图
编辑