Skip to main content

Documentation Index

Fetch the complete documentation index at: https://yieldxyz.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Cursor is an AI-powered IDE that makes it easy to write code while integrating with Yield.xyz APIs. Here’s how to set up Cursor to build with our documentation. This will let you interact with our docs directly and get the most accurate answers to your questions.

Quick Setup

1

Open Cursor Settings

Go to Cursor SettingsFeaturesDocs and click ”+ Add new doc”
2

Add Yield.xyz Docs

Paste this URL:
https://docs.yield.xyz
3

Configure the Doc

  • Change the name to Yield.xyz
  • Leave everything else the same
4

Wait for Indexing

Wait until the docs have been fully indexed. You can check the progress in Cursor Settings.
5

Reference in Prompts

Now you can reference the Yield.xyz docs in your prompt using @Yield.xyz

Adding the OpenAPI Spec

For even better API understanding, add the OpenAPI spec:
1

Add OpenAPI Spec

In Cursor Settings → Docs, add another doc with URL:
https://api.yield.xyz/docs.yaml
2

Name it

Name it Yield.xyz API to distinguish from the main docs

Example Usage

Once set up, you can reference Yield.xyz docs in your prompts:

Generate API Calls

@Yield.xyz Create a function to enter a Lido staking position 
for a given address and amount using the v2 API

Understand Responses

@Yield.xyz Explain the balance types returned by the 
/v1/yields/balances endpoint

Fix Errors

I'm getting this error from Yield.xyz API:
{"error": "Bad Request", "message": "Validation failed"}

@Yield.xyz How do I fix this for the enter action?

Build Complete Flows

@Yield.xyz Create a complete React hook that:
1. Fetches available yields for a network
2. Allows user to enter a yield
3. Tracks transaction status
4. Shows user balances

Discovery

@Yield.xyz How do I list all staking yields on Ethereum 
with APY above 5%?

Enter Flow

@Yield.xyz Walk me through the complete flow to stake ETH 
with Lido using the API, including transaction signing.

Balance Tracking

@Yield.xyz How do I get all positions for a user across 
multiple networks? Show me the request and response format.

Manage Actions

@Yield.xyz How do I claim rewards for a Cosmos staking 
position? What's the passthrough field for?

Best Practices

Be Specific

Reference specific endpoints or concepts from the docs

Share Context

Include error messages and your current code

Reference Docs

Always use @Yield.xyz to ground the AI in accurate information

Verify Code

Always test generated code against the actual API

Troubleshooting

Check that the URL is correct and accessible. Try refreshing Cursor settings.
Make sure to reference @Yield.xyz in your prompt to use the indexed docs rather than training data.
Verify your API key is correct and you’re using the right endpoint format. Check our API Reference.

Next Steps

Prompting Patterns

Effective prompts for Yield.xyz

Guardrails

AI safety best practices