API Reference
Use our OpenAI-compatible API to access any native or hosted MCP tool in your applications.
Our API offers a seamless way to integrate AurraCloud's powerful MCP tools into your applications using the familiar OpenAI API format. This compatibility allows developers to leverage blockchain and crypto data analysis capabilities with minimal changes to existing code.
Key Features
- • OpenAI-compatible API endpoints
- • Access to all MCP tools via a single interface
- • Simple integration with existing applications
- • Support for multiple LLM models
- • Comprehensive blockchain and crypto data access
Base URL
All API requests should be made to:
https://api-v1.aurracloud.com/
Authentication is performed using API keys. You can obtain your API key from your AurraCloud dashboard.
Using Your API Key
Include your API key in the request header:
Authorization: Bearer your-aurra-api-key
Security Warning
Keep your API key secure and never expose it in client-side code. Use environment variables to store your API key in production applications.
Install the OpenAI package:
npm install openai
Example usage:
// Access blockchain data with one API call
import { OpenAI } from "openai";
const openai = new OpenAI({
baseURL: "https://api-v1.aurracloud.com/",
apiKey: "your-aurra-api-key", // Use environment variables in production
});
// Example: Get ETH balance for a specific address
async function getETHBalance() {
const response = await openai.chat.completions.create({
model: "openai/gpt-4o-mini", // Use any supported model
messages: [{ role: "user", content: "Get ETH balance for vitalik.eth" }],
tools: [
{ type: "mcp", slug: "evm-mainnet" }, // Access EVM mainnet data
{ type: "mcp", slug: "ens" } // Resolve ENS names
]
});
console.log(response.choices[0].message.content);
}
getETHBalance();
Chat Completions
Generate responses using LLMs with MCP tool access
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
model | string | Yes | Model ID to use (e.g., "aurra-gpt-4o", "openai/gpt-4o-mini") |
messages | array | Yes | Array of message objects in the conversation |
tools | array | No | Array of MCP tools to make available to the model |
temperature | number | No | Controls randomness (0-1, default: 0.7) |
max_tokens | integer | No | Maximum number of tokens to generate |
MCP Tool Format
MCP tools are specified in the following format:
{
"type": "mcp", // Required: Specifies this is an MCP tool
"slug": "tool-name" // Required: The MCP tool identifier to use
}
Available MCP Tools
Here are some of the most commonly used MCP tools you can access through our API:
Category | Tool Identifier | Description |
---|---|---|
Blockchain | evm-mainnet | Access Ethereum and other EVM data (balances, transactions, contracts) |
ens | Resolve Ethereum Name Service domains | |
gas-tracker | Track gas prices across EVM chains | |
svm-mainnet | Access Solana blockchain data (balances, transactions, tokens) | |
bevor-toolkit | Smart contract security auditing and analysis | |
Price Data | chainlink-toolkit | Access Chainlink price feeds and oracle data |
dexscreener | DEX trading pair data and token information | |
fed-toolkit | Federal Reserve economic data and metrics | |
DeFi | defi-llama | DeFi TVL, protocol, and stablecoin data |
h1dr4-toolkit | Liquidity data analysis and advanced trading metrics | |
allez-toolkit | On-chain position management and tracking | |
Research | discourse-toolkit | Access crypto governance forums and discussions |
rag-toolkit | Search and retrieve blockchain documentation and research |
For a full list of available MCP tools and their detailed parameters, see the MCP Catalog.
Tool Usage Examples
Blockchain Data Query
// Check ETH balance and recent transactions for an address
import { OpenAI } from "openai";
const openai = new OpenAI({
baseURL: "https://api-v1.aurracloud.com/",
apiKey: process.env.AURRA_API_KEY,
});
const response = await openai.chat.completions.create({
model: "aurra-gpt-4o",
messages: [
{ role: "user", content: "Get the ETH balance and last 3 transactions for vitalik.eth" }
],
tools: [
{ type: "mcp", slug: "evm-mainnet" },
{ type: "mcp", slug: "ens" }
]
});
Price Data Analysis
// Compare prices from different sources
import { OpenAI } from "openai";
const openai = new OpenAI({
baseURL: "https://api-v1.aurracloud.com/",
apiKey: process.env.AURRA_API_KEY,
});
const response = await openai.chat.completions.create({
model: "aurra-gpt-4o",
messages: [
{ role: "user", content: "Compare the BTC/USD price on Binance vs Coinbase, and explain any price differences" }
],
tools: [
{ type: "mcp", slug: "chainlink-toolkit" },
{ type: "mcp", slug: "dexscreener" }
]
});
DeFi Protocol Analysis
// Analyze a DeFi protocol's metrics
import { OpenAI } from "openai";
const openai = new OpenAI({
baseURL: "https://api-v1.aurracloud.com/",
apiKey: process.env.AURRA_API_KEY,
});
const response = await openai.chat.completions.create({
model: "aurra-gpt-4o",
messages: [
{ role: "user", content: "Analyze Uniswap's TVL trend over the last 30 days and compare it to Aave" }
],
tools: [
{ type: "mcp", slug: "defi-llama" },
{ type: "mcp", slug: "evm-mainnet" }
]
});
Smart Contract Security Audit
// Run a security audit on a smart contract
import { OpenAI } from "openai";
const openai = new OpenAI({
baseURL: "https://api-v1.aurracloud.com/",
apiKey: process.env.AURRA_API_KEY,
});
const response = await openai.chat.completions.create({
model: "aurra-gpt-4o",
messages: [
{ role: "user", content: "Audit this smart contract for security vulnerabilities: 0x1234abcd..." }
],
tools: [
{ type: "mcp", slug: "bevor-toolkit" },
{ type: "mcp", slug: "evm-mainnet" }
]
});
Economic Data Analysis
// Analyze market correlation with economic indicators
import { OpenAI } from "openai";
const openai = new OpenAI({
baseURL: "https://api-v1.aurracloud.com/",
apiKey: process.env.AURRA_API_KEY,
});
const response = await openai.chat.completions.create({
model: "aurra-gpt-4o",
messages: [
{ role: "user", content: "Analyze the correlation between Fed interest rates and Bitcoin price over the last year" }
],
tools: [
{ type: "mcp", slug: "fed-toolkit" },
{ type: "mcp", slug: "chainlink-toolkit" }
]
});
Comprehensive Market Research
// Comprehensive research combining multiple data sources
import { OpenAI } from "openai";
const openai = new OpenAI({
baseURL: "https://api-v1.aurracloud.com/",
apiKey: process.env.AURRA_API_KEY,
});
const response = await openai.chat.completions.create({
model: "aurra-gpt-4o",
messages: [
{
role: "user",
content: `Create a comprehensive analysis for Ethereum including:
1. Current price and 24h price change
2. Gas prices and network activity
3. Top DeFi protocols by TVL on Ethereum
4. Recent governance proposals from Ethereum forums
5. Price correlation with BTC and major stock indices
6. Summary of on-chain metrics and recommendation`
}
],
tools: [
{ type: "mcp", slug: "evm-mainnet" },
{ type: "mcp", slug: "chainlink-toolkit" },
{ type: "mcp", slug: "defi-llama" },
{ type: "mcp", slug: "discourse-toolkit" },
{ type: "mcp", slug: "fed-toolkit" },
{ type: "mcp", slug: "gas-tracker" }
],
temperature: 0.2,
max_tokens: 2000
});
// The response will contain a comprehensive market research report
console.log(response.choices[0].message.content);
Responses follow the standard OpenAI API format:
{
"id": "response-id",
"object": "chat.completion",
"created": 1700000000,
"model": "aurra-gpt-4o",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The current ETH balance for vitalik.eth is 1,050.45 ETH."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 15,
"total_tokens": 40
}
}
Rate Limits
Rate limits vary by subscription plan. Contact us for details about your specific limits.
- • Free tier: 10 requests per minute
- • Standard tier: 60 requests per minute
- • Enterprise tier: Custom limits
Error Codes
- • 400: Bad request
- • 401: Unauthorized (invalid API key)
- • 404: Resource not found
- • 429: Rate limit exceeded
- • 500: Server error
Error Response Example
{
"error": {
"message": "Rate limit exceeded. Please try again in 60 seconds.",
"type": "rate_limit_error",
"param": null,
"code": "rate_limit_exceeded"
}
}
AurraCloud - a Monemetrics Product