Dashboard API Keys

Itô Markets API Documentation

Build prediction market trading applications with our REST API. All endpoints require API key authentication.

Quick Start

Get started in 3 steps:

  1. Get your API key from the Developer Portal
  2. Add the API key to your request headers: Authorization: Bearer YOUR_API_KEY
  3. Make your first API call to /api/v1/baskets

Your API Key

Enter your API key to test endpoints interactively:

Don't have an API key? Create one here

Base URL

http://localhost:5085/api/v1

Authentication

All API requests require an API key passed in the Authorization header:

Authorization: Bearer bkt_live_your_api_key_here

Get your API key from the Developer Portal.

Code Examples

import requests

BASE_URL = "http://localhost:5085/api/v1"
API_KEY = "bkt_live_your_api_key_here"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# Make a request
response = requests.get(f"{BASE_URL}/baskets", headers=headers)
data = response.json()
print(data)
const BASE_URL = 'http://localhost:5085/api/v1';
const API_KEY = 'bkt_live_your_api_key_here';

// Using fetch
const response = await fetch(`${BASE_URL}/baskets`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);
curl -X GET "http://localhost:5085/api/v1/baskets" \
  -H "Authorization: Bearer bkt_live_your_api_key_here" \
  -H "Content-Type: application/json"

Response Format

All responses are JSON. Success responses:

{
  "success": true,
  "message": "Success",
  "data": { /* response data */ }
}

Error responses:

{
  "success": false,
  "message": "Error message",
  "errors": { /* error details */ }
}

Example Responses

Success Response (List Baskets):

{
  "success": true,
  "message": "Success",
  "data": [
    {
      "id": "election-hedge-2024",
      "name": "Election Hedge 2024",
      "description": "Hedge against election outcomes",
      "current_price": 0.65,
      "stats": {
        "current_price": 0.65,
        "change_1d": 2.5,
        "underlyers_count": 3
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 5,
    "pages": 1
  }
}

Error Response (Unauthorized):

{
  "success": false,
  "message": "Invalid API key"
}

Error Response (Not Found):

{
  "success": false,
  "message": "Basket not found"
}

List Baskets

List all baskets with current prices and statistics. Returns paginated results.

GET /api/v1/baskets

Parameters

page (integer, optional) - Page number (default: 1)
per_page (integer, optional) - Items per page (default: 20, max: 100)
import requests

BASE_URL = "http://localhost:5085/api/v1"
API_KEY = "bkt_live_your_api_key_here"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# List baskets with pagination
response = requests.get(
    f"{BASE_URL}/baskets",
    params={"page": 1, "per_page": 20},
    headers=headers
)
data = response.json()
print(data)
const BASE_URL = 'http://localhost:5085/api/v1';
const API_KEY = 'bkt_live_your_api_key_here';

const response = await fetch(`${BASE_URL}/baskets?page=1&per_page=20`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);
curl -X GET "http://localhost:5085/api/v1/baskets?page=1&per_page=20" \
  -H "Authorization: Bearer bkt_live_your_api_key_here" \
  -H "Content-Type: application/json"
▶ Try it out

Get Basket

Get detailed information about a specific basket including current price and statistics.

GET /api/v1/baskets/{basket_id}

Parameters

basket_id (string, required) - Basket identifier

Code Examples

import requests

BASE_URL = "http://localhost:5085/api/v1"
API_KEY = "bkt_live_your_api_key_here"
BASKET_ID = "election-hedge-2024"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.get(
    f"{BASE_URL}/baskets/{BASKET_ID}",
    headers=headers
)
data = response.json()
print(data)
const BASE_URL = 'http://localhost:5085/api/v1';
const API_KEY = 'bkt_live_your_api_key_here';
const basketId = 'election-hedge-2024';

const response = await fetch(`${BASE_URL}/baskets/${basketId}`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);
curl -X GET "http://localhost:5085/api/v1/baskets/election-hedge-2024" \
  -H "Authorization: Bearer bkt_live_your_api_key_here" \
  -H "Content-Type: application/json"
▶ Try it out

Get Basket Price

Get current price for a basket including last update timestamp and individual underlyer prices.

GET /api/v1/baskets/{basket_id}/price

Parameters

basket_id (string, required) - Basket identifier

Code Examples

import requests

BASE_URL = "http://localhost:5085/api/v1"
API_KEY = "bkt_live_your_api_key_here"
BASKET_ID = "election-hedge-2024"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.get(
    f"{BASE_URL}/baskets/{BASKET_ID}/price",
    headers=headers
)
data = response.json()
print(data)
const BASE_URL = 'http://localhost:5085/api/v1';
const API_KEY = 'bkt_live_your_api_key_here';
const basketId = 'election-hedge-2024';

const response = await fetch(`${BASE_URL}/baskets/${basketId}/price`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);
curl -X GET "http://localhost:5085/api/v1/baskets/election-hedge-2024/price" \
  -H "Authorization: Bearer bkt_live_your_api_key_here" \
  -H "Content-Type: application/json"
▶ Try it out

Search Markets

Search markets across Polymarket and Kalshi. Markets are sorted by volume (highest first).

GET /api/v1/markets/search

Parameters

platform (string, optional) - 'all', 'polymarket', or 'kalshi' (default: 'all')
category (string, optional) - Filter by category
expiration (string, optional) - Filter by expiration (YYYY-MM or YYYY)
limit (integer, optional) - Max results (default: 100, max: 500)
import requests

BASE_URL = "http://localhost:5085/api/v1"
API_KEY = "bkt_live_your_api_key_here"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# Search markets
response = requests.get(
    f"{BASE_URL}/markets/search",
    params={
        "platform": "all",
        "category": "politics",
        "expiration": "2024",
        "limit": 100
    },
    headers=headers
)
data = response.json()
print(data)
const BASE_URL = 'http://localhost:5085/api/v1';
const API_KEY = 'bkt_live_your_api_key_here';

const params = new URLSearchParams({
    platform: 'all',
    category: 'politics',
    expiration: '2024',
    limit: '100'
});

const response = await fetch(`${BASE_URL}/markets/search?${params}`, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);
curl -X GET "http://localhost:5085/api/v1/markets/search?platform=all&category=politics&expiration=2024&limit=100" \
  -H "Authorization: Bearer bkt_live_your_api_key_here" \
  -H "Content-Type: application/json"
▶ Try it out

Rate Limits

  • Free tier: 1,000 requests/hour
  • Pro tier: 10,000 requests/hour
  • Enterprise: Custom limits

Try it out