API Reference
Comprehensive documentation for the OrbitYield API, enabling developers to integrate our cross-chain yield aggregator into their applications.
API Overview
RESTful API for yield optimization
Our API provides programmatic access to OrbitYield's cross-chain yield aggregator, allowing developers to integrate our platform into their applications.
RESTful Endpoints
Our API follows RESTful principles, making it easy to integrate with any programming language or framework.
Authentication
Secure your API requests with API keys and JWT tokens for authenticated access to our platform.
Rate Limits
Understand our rate limits and how to optimize your API usage for the best performance.
API Endpoints
Key endpoints
Explore the main endpoints available in the OrbitYield API.
/v1/opportunities
Retrieve all available yield opportunities across supported blockchains.
/v1/opportunities/{id}
Get detailed information about a specific yield opportunity.
Code Examples
API in action
See how to use the OrbitYield API with code examples in various programming languages.
// Example: Fetching yield opportunities
const axios = require('axios');
async function getYieldOpportunities() {
try {
const response = await axios.get('https://api.orbityield.cc/v1/opportunities', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
params: {
chains: ['ethereum', 'binance-smart-chain', 'polygon'],
minApy: 5.0,
maxRiskScore: 3,
limit: 10
}
});
console.log(`Found ${response.data.length} yield opportunities`);
// Sort by APY (highest first)
response.data.sort((a, b) => b.apy - a.apy);
// Display the top 5 opportunities
response.data.slice(0, 5).forEach(opportunity => {
console.log(`${opportunity.protocol} on ${opportunity.chain}: ${opportunity.apy.toFixed(2)}% APY`);
});
} catch (error) {
console.error('Error fetching yield opportunities:', error.response ? error.response.data : error.message);
}
}
getYieldOpportunities();
SDKs & Libraries
Simplified integration
Use our official SDKs to simplify integration with the OrbitYield API.
Ready to integrate?
Get your API keys and start building with OrbitYield today.