Start with the schema and actual market identifiers
GET /v1/schema lists the public tables, column names, and types. It does not require an API key. Check it before writing a query: names and types are more reliable than guessing from a chart label or exchange URL.
In the Outcome SQL playground, run the following discovery query. Copy venue and ticker from the row you want to study. Keeping both avoids accidentally combining distinct markets, and inspecting actual values avoids silent empty results from mismatched spelling or case.
SELECT
venue,
ticker,
title,
yes_price,
volume_24h,
close_time,
rules_primary
FROM markets
WHERE is_deleted = 0
ORDER BY volume_24h DESC
LIMIT 20Read a bounded slice of trade history
Replace the two placeholders with a venue and ticker from your discovery query, then choose dates within that market's history. This query reads individual transactions in time order. yes_price is a price on the 0–1 scale and count is the number of contracts in the trade.
The LIMIT makes the result manageable; it does not mean the entire window was returned. If you receive 1,000 rows, narrow the interval or use an export before describing the result as a complete history. An output limit also does not necessarily bound the bytes the database scans.
SELECT trade_id, created_time, yes_price, no_price, count
FROM trades
WHERE venue = 'YOUR_VENUE'
AND ticker = 'YOUR_TICKER'
AND is_deleted = 0
AND created_time >= toDateTime('2026-10-01 00:00:00', 'UTC')
AND created_time < toDateTime('2026-10-02 00:00:00', 'UTC')
ORDER BY created_time, trade_id
LIMIT 1000Send SQL to the API from your own tools
Create an API key in Outcome and store it in the OUTCOME_API_KEY environment variable. Send a JSON body with a query field to POST /v1/execute and authenticate with a Bearer token. The endpoint returns query rows as JSON. Run this example in a terminal or on a server; do not embed your key in browser code or a public notebook.
The example below is a small market-discovery request. Once it works, replace the query string with your own SQL. Check HTTP errors before processing results, and consult the response's usage headers when estimating the cost of repeated queries.
curl --fail-with-body https://api.outcome.sh/v1/execute \
-H "Authorization: Bearer $OUTCOME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"SELECT venue, ticker, title, yes_price FROM markets WHERE is_deleted = 0 ORDER BY volume_24h DESC LIMIT 5"}'Compare contracts only after checking their meaning
Shared SQL columns make it easier to work with multiple venues, but a shared subject does not make two contracts equivalent. Read the YES definition, resolution source, cutoff time, and any exceptional settlement rules. Record the mapping you chose instead of joining markets by similar titles.
For a historical comparison, align observation times and report how stale each price is. Comparing a recent trade on one venue with a day-old trade on another can make a timing difference look like disagreement. Keep the original venue and ticker in your result so the comparison remains auditable.