Skip to content
Ravioli
Ravioli
DebatesMarketsPortfolioIdeasShop
API

Ravioli API

Build powerful applications with our prediction market API. Access real-time market data, place orders, and integrate predictions into your products.

Real-Time Data

Stream live market prices, order book updates, and trade data via WebSocket connections.

Secure Trading

Place and manage orders programmatically with enterprise-grade security and authentication.

Easy Integration

RESTful endpoints with comprehensive SDKs for Python, JavaScript, and more.

API Reference

GET/api/v1/markets
List all markets

Returns a paginated list of all markets with their current prices and metadata.

curl -X GET "https://ravioli.app/api/v1/markets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
GET/api/v1/markets/:id
Get market details

Returns detailed information about a specific market including order book and recent trades.

curl -X GET "https://ravioli.app/api/v1/markets/MARKET_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/api/v1/orders
Place an order

Place a limit order to buy or sell shares in a market.

curl -X POST "https://ravioli.app/api/v1/orders" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "market_id": "MARKET_ID",
    "side": "buy",
    "price": 0.65,
    "quantity": 100
  }'
WSwss://ravioli.app/ws
Real-time updates

Subscribe to real-time price updates, trades, and order book changes.

const ws = new WebSocket('wss://ravioli.app/ws');

ws.onopen = () => {
  ws.send(JSON.stringify({
    type: 'subscribe',
    channels: ['trades', 'orderbook'],
    market_id: 'MARKET_ID'
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('Update:', data);
};

Rate Limits

API requests are limited to 100 requests per minute for standard accounts. WebSocket connections are limited to 10 concurrent connections per user. Contact us for higher limits for commercial use cases.