Prediction APIs.
Pay per call.
On-chain prediction markets that charge per request in USDC. AI agents can create markets, trade, and resolve — no API keys, no subscriptions. Just pay and predict.
// Create a prediction market via x402
const response = await fetch("https://api.oyrade.com/api/v1/markets/create", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
question: "Will ETH reach $4000 by EOY 2026?",
market_name: "ETH $4K EOY 2026",
slug: "eth-4k-eoy-2026",
category: "crypto",
token_mint: "DfnxGQ...",
end_date: 1798761600,
}),
});
console.log(response.data.market_id);
// Cost: ~$0.50 USDCBuilt for the next era of agents.
Equip your AI with deterministic precision. Create, trade, and resolve on-chain with single API calls.
AI Trading Agent
Let your agent predict on market outcomes autonomously.
Market Analytics Bot
Programmatically create and monitor prediction markets.
Automated Resolution
Auto-resolve markets when oracle conditions are met.
Start Using X402 APIs in 3 Steps.
Set Up a Wallet
Create a Solana wallet with USDC. That's your payment method — no signups needed.
Install SDK or Use REST
Install the TypeScript SDK, or call the REST API directly with any HTTP client.
Start Calling Endpoints
Payment is built into every request. No API keys, no subscriptions — just pay.
Open Access
On-chain Markets
<1s
Solana Finality
Pay/Call
No Subscriptions
15
API Endpoints
Core Capabilities.
Production-ready tools for comprehensive crypto trading operations.
Market Creation
Create on-chain prediction markets with oracle integration.
Trading
Programmatic predicting with single-call execution.
Position Management
Sell positions and claim winnings from resolved markets.
Resolution
Oracle-based automatic market resolution.
Market Data
Free access to market listings, details, and price history.
Seamless Integration.
RESTful API with Micropayments
Call our hosted APIs with X402 micropayment protocol. Pay with USDC on Solana for each request. Perfect for web applications, mobile apps, and backend integrations.
curl -X POST https://api.oyrade.com/api/v1/markets/create \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <signed-usdc-payment>" \
-d '{
"question": "Will BTC hit $200K?",
"market_name": "BTC 200K",
"slug": "btc-200k",
"category": "crypto",
"token_mint": "DfnxGQ...",
"end_date": 1798761600
}'- → Pay-per-use with X402 protocol
- → Client-side signing for security
- → Dry-run mode enabled by default
TypeScript SDK Integration
Use @x402/fetch with a Solana signer for seamless micropayments. The SDK handles payment headers automatically so you can focus on building.
import { wrapFetch } from "@x402/fetch";
import { createSvmSigner } from "@x402/svm";
import { Keypair } from "@solana/web3.js";
const keypair = Keypair.fromSecretKey(/* ... */);
const signer = createSvmSigner(keypair);
const x402Fetch = wrapFetch(fetch, signer);
// Create a market ($0.50 USDC)
const res = await x402Fetch(
"https://api.oyrade.com/api/v1/markets/create",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
question: "Will ETH flip BTC by 2027?",
market_name: "ETH Flip BTC",
slug: "eth-flip-btc-2027",
category: "crypto",
token_mint: "DfnxGQ...",
end_date: 1798761600,
}),
}
);- → Automatic X402 payment handling
- → Solana wallet signing built-in
- → Works with any AI agent framework
Transparent Pricing.
Pure pay-per-use with USDC on Solana. No subscriptions, no upfront costs.
Safety & Reliability First.
Predictable Execution
Trades follow deterministic market rules with transparent pricing.
Operational Resilience
Built-in safeguards for network hiccups and retries.
Fee Transparency
Clear fee visibility before confirming any trade.
Client-Side Commitments
Commitment hashes are computed locally before hitting the network.