-
Notifications
You must be signed in to change notification settings - Fork 157
Adding Guide #1050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+130
−1
Merged
Adding Guide #1050
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "gpt": "Create Custom GPTS", | ||
| "upgrade-to-v1": "" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export default { | ||
| gpt: '', | ||
| 'upgrade-to-v1': '', | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| --- | ||
| title: How the Token API Powers Custom GPTs | ||
| sidebarTitle: Create Custom GPTs | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| The Token API is a pre-indexed blockchain data service that provides real-time access to token balances, metadata, prices, liquidity, and volume across multiple chains. Developers use its REST endpoints to build wallets, trading dashboards, DeFi analytics, and AI systems without maintaining their own indexing stack. Custom GPTs can connect directly to the Token API's OpenAPI schema. | ||
|
|
||
| The Token API enables developers to build **Custom GPTs** to reason over live blockchain data inside ChatGPT that can reason over and respond with live blockchain data directly inside ChatGPT. | ||
|
|
||
| ## What the Token API Enables in Custom GPTs | ||
|
|
||
| When a Custom GPT is wired to the Token API, it gains access to a machine-readable schema and authenticated endpoints. Developers can use this to: | ||
|
|
||
| - **Query real-time onchain data**: Balances, token prices, liquidity, and transaction history. | ||
| - **Automate domain-specific tasks**: Portfolio tracking, accounting, reconciliation, and market analysis. | ||
| - **Power AI agents with verifiable blockchain context**: Use the same data sources dapps rely on. | ||
|
|
||
| Because the Token API provides a machine-readable schema and authenticated requests, it serves as a structured data layer that enables GPT-5 agents to combine natural language reasoning with live onchain data from The Graph. | ||
|
|
||
| ## When to Use the Token API for Custom GPTs | ||
|
|
||
| Use the Token API when your GPT needs repeatable, domain-specific behavior grounded in blockchain data. This is most effective when the GPT performs the same type of task frequently or enforces a workflow you define. For one-off or exploratory questions, standard ChatGPT prompts are sufficient. | ||
|
|
||
| ## Choosing a Use Case | ||
|
|
||
| Start with a clear, narrow objective, then expand as needed. Common patterns include: | ||
|
|
||
| - **Accounting GPT**: Onchain accounting, tax tagging, and portfolio reconciliation. | ||
| - **Trading GPT**: Liquidity, pricing, and volume analysis for trading strategies. | ||
| - **Protocol Tracking GPT**: Real-time monitoring of transaction activity and liquidity pools. | ||
|
|
||
| A focused initial goal such as “Retrieve token balances and prices for a wallet” makes it easier to configure reliable behavior before adding complex workflows. | ||
|
|
||
| ## Requirements | ||
|
|
||
| | Requirement | Description | | ||
| | ---------------------- | -------------------------------------------------------- | | ||
| | ChatGPT 5 | Custom GPT creation requires GPT-5 tier or Pro. | | ||
| | Token API Subscription | Sign up at [The Graph Market](https://thegraph.market./) | | ||
| | Token API Key | Available in your dashboard as the Authentication JWT. | | ||
|
|
||
| ## Setting Up a Custom GPT | ||
|
|
||
| Below is an explanatory outline of what happens during setup. This section provides conceptual understanding. | ||
|
|
||
| ### Create Custom GPT | ||
|
|
||
| 1. Visit chat.openai.com/gpts in your browser. 2, Click Create (top right). | ||
| 2. Under Configure (in the top left panel), set up your GPT's personality and scope. | ||
|
|
||
| ### Configure Your GPT | ||
|
|
||
| You define the GPT's role, scope, and metadata so it knows what it is designed to do. This includes: | ||
|
|
||
| - **Name and Description**: Helps users discover your GPT. | ||
| - For example: **Name**: Token Tracker GPT **Description**: An onchain analytics assistant that retrieves live token balances, prices, and liquidity data using The Graph's Token API. | ||
| - **Instructions**: Tells the GPT what tasks it should perform using the Token API. | ||
| - For example: You are a blockchain data assistant retrieving onchain token data from The Graph's Token API. Use endpoints to fetch balances, liquidity, and price history across EVM chains. Present results in tables with token symbols, prices, and USD values. | ||
| - **Knowledge**: Optional context files such as wallet references, accounting rules, or code snippets. | ||
| - **New Action**: At the bottom, click “Create new action” to connect your GPT to the Token API. | ||
|
|
||
| ### Connect the Token API | ||
|
|
||
| To enable live blockchain queries inside ChatGPT, you connect the GPT to the Token API through: | ||
|
|
||
| #### Authentication | ||
|
|
||
| 1. Set Authentication to API Key → Bearer. | ||
| 2. Open [The Graph Market](https://thegraph.market./) and copy your Authentication JWT from your dashboard. | ||
| 3. Paste the token into the ChatGPT prompt where the field shows [HIDDEN]. | ||
|
|
||
| #### Schema | ||
|
|
||
| 1. Above the Schema box, click Import from URL. | ||
| 2. Paste: https://token-api.thegraph.com/openapi | ||
| 3. Click Import. You'll now see endpoints like: | ||
| - `getV1EvmTokens` | ||
| - `getV1EvmDexes` | ||
| - `getV1EvmBalances` | ||
| 4. Click Test on one (for example `getV1EvmDexes`) to verify connection. | ||
|
|
||
| ##### Privacy | ||
|
|
||
| 1. At the bottom, under Privacy, paste: https://pinax.network/en/legal/privacy | ||
|
|
||
| ### Privacy | ||
|
|
||
| You can attach a privacy policy URL such as: https://pinax.network/en/legal/privacy | ||
|
|
||
| ## Example Prompt Patterns | ||
|
|
||
| These examples help illustrate how a GPT reasons over Token API data. | ||
|
|
||
| ### Wallet and Portfolio | ||
|
|
||
| Get the total USD balance for a wallet across multiple chains, returning token name, symbol, balance, and price. | ||
|
|
||
| ### Trading Analysis | ||
|
|
||
| Compare USDC and DAI liquidity across Uniswap and Curve. Return the top 5 pools by TVL. | ||
|
|
||
| ### Accounting | ||
|
|
||
| List all ERC-20 transfers for this address in the last 30 days. Group by token and total incoming/outgoing volume. | ||
|
|
||
| ## Best Practices | ||
|
|
||
| | Tip | Why It Matters | | ||
| | --------------------------------- | ---------------------------------------------------------------------- | | ||
| | Scope your GPT narrowly first | Simplifies debugging and validates schema integration. | | ||
| | Use clear role instructions | Helps the GPT choose the right endpoints and avoid assumptions. | | ||
| | Name endpoints explicitly | Improves routing accuracy when fetching balances, prices, or DEX data. | | ||
| | Combine with code | Enables custom parsing or logic for complex workflows. | | ||
| | Add Subgraph or Substream context | Provides richer analytics when combined with Token API data. | | ||
|
|
||
| ## FAQs & Resources | ||
|
|
||
| - Builders Office Hours (October 23, 2025) | ||
| - Watch the full session: https://x.com/i/broadcasts/1mrGmBzBarNJy |
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the name of the file should be
gpt.mdx