from finance_dev import FinanceDev, models
with FinanceDev() as fd_client:
res = fd_client.predictions.markets.search(type_=models.SearchType.CONTRACTS, q="unemployment june", state="ACTIVE", base_event_id="UNR", event_id="UNR_0822", category="Elections > United States House", page=1, per_page=20)
while res is not None:
# Handle items
res = res.next()curl --request GET \
--url https://api.aries.com/v1/predictions/searchconst options = {method: 'GET'};
fetch('https://api.aries.com/v1/predictions/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aries.com/v1/predictions/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aries.com/v1/predictions/search"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aries.com/v1/predictions/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/predictions/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"type": "contracts",
"hits": [
{
"symbol": "HORC_1126_Republican",
"eventId": "HORC_1126",
"baseEventId": "HORC",
"question": "Will the Republican Party win a majority in the United States House of Representatives in the 2026 general election?",
"strikeValue": "Republican",
"evaluationType": "==",
"symbolSubTypes": [
"YES",
"NO"
],
"startDate": "2025-04-02T00:00:00Z",
"lastTradeDate": "2027-01-04T00:00:00Z",
"expirationDate": "2027-01-04T00:00:00Z",
"state": "ACTIVE",
"tradable": true,
"tickSize": "0.01",
"eventDisplayName": "US House of Representatives Control November 2026",
"eventQuestion": "Will the Republican Party win a majority in the United States House of Representatives in the 2026 general election?",
"timeSpecifier": "2026.11",
"underlyingSpec": "The underlying is the political party whose members control at least 218 seats in the US House of Representatives on January 3rd of the year following a Congressional election. The list of US Representatives at the convening of each Congress is published January 4th on Congress.gov.",
"openInterest": 1309471
}
],
"found": 35000,
"page": 1,
"perPage": 1
}
}Search Prediction Market
Full-text search over prediction-market contracts, returning hits as contracts, events, or base events. Filters always apply at the contract level.
Use Case: Discover symbols, event IDs, and base event IDs, and list the most-held contracts of each event, before pulling reference data, live prices, or historical ticks.
from finance_dev import FinanceDev, models
with FinanceDev() as fd_client:
res = fd_client.predictions.markets.search(type_=models.SearchType.CONTRACTS, q="unemployment june", state="ACTIVE", base_event_id="UNR", event_id="UNR_0822", category="Elections > United States House", page=1, per_page=20)
while res is not None:
# Handle items
res = res.next()curl --request GET \
--url https://api.aries.com/v1/predictions/searchconst options = {method: 'GET'};
fetch('https://api.aries.com/v1/predictions/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aries.com/v1/predictions/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aries.com/v1/predictions/search"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aries.com/v1/predictions/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/predictions/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"type": "contracts",
"hits": [
{
"symbol": "HORC_1126_Republican",
"eventId": "HORC_1126",
"baseEventId": "HORC",
"question": "Will the Republican Party win a majority in the United States House of Representatives in the 2026 general election?",
"strikeValue": "Republican",
"evaluationType": "==",
"symbolSubTypes": [
"YES",
"NO"
],
"startDate": "2025-04-02T00:00:00Z",
"lastTradeDate": "2027-01-04T00:00:00Z",
"expirationDate": "2027-01-04T00:00:00Z",
"state": "ACTIVE",
"tradable": true,
"tickSize": "0.01",
"eventDisplayName": "US House of Representatives Control November 2026",
"eventQuestion": "Will the Republican Party win a majority in the United States House of Representatives in the 2026 general election?",
"timeSpecifier": "2026.11",
"underlyingSpec": "The underlying is the political party whose members control at least 218 seats in the US House of Representatives on January 3rd of the year following a Congressional election. The list of US Representatives at the convening of each Congress is published January 4th on Congress.gov.",
"openInterest": 1309471
}
],
"found": 35000,
"page": 1,
"perPage": 1
}
}Overview
Search runs over a single index of event contracts. Thetype parameter picks the level hits come back at, and the response echoes it in data.type so a client can branch on the shape it actually received.
type | Hit shape | Notes |
|---|---|---|
contracts (default) | One hit per matching contract | Each hit carries its event’s and base event’s text flattened in. |
events | One hit per event | Carries the event’s own fields, its total openInterest, contractsFound, and contracts: its matching contracts with the most open interest. |
base-events | One hit per base event | Same, one level up. The index carries no display name — read it from Get Base Event. |
Filters apply to contracts
This matters whentype is events or base-events: an event or base event is only found through its matching contracts. One whose contracts are all filtered out — for example an event holding only DELETED contracts under the default state — is not returned at all, even if its own text matches the query.
found, page, and perPage count whatever type returns, not the underlying contracts. contractsFound on each events or base-events hit is the count of every matching contract under it, and contracts holds the first contractsPerHit of them (2 by default, at most 10). To list the rest, search again with type=contracts and the hit’s eventId or baseEventId.
Ordering by open interest
Results are ordered by open interest, from the venue’s last daily prices file. Eachtype ranks by its own level:
type | Ranked by |
|---|---|
contracts | The contract’s own openInterest |
events | The event’s total openInterest, the sum over all of its active contracts, matching or not |
base-events | The base event’s total openInterest, the sum over all of its active contracts |
contracts on a hit come in order of their own open interest, highest first. Ties are broken by symbol, so pages are stable. With q, relevance comes first and open interest breaks ties.
The file is published once a day, after the close, so open interest is end of day, not live. A contract the file did not name has no openInterest field and comes last; 0 is a real value. A hit’s openInterest is absent when the file named none of its contracts.
snapshot per contract has each outcome’s last, and contract.settlement when nothing has traded yet.Query syntax
q searches symbols, contract questions, event names, and base-event specifications. Symbols are split on _, -, and ., so a partial query finds the full symbol:
GET /v1/predictions/search?q=BPM 0822 → matches BPM_0822_1750
GET /v1/predictions/search?q=unemployment june
q entirely to browse the catalogue, ordered by open interest.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
type | string | contracts | contracts, events, or base-events. Echoed in data.type. |
q | string | — | Full-text query. Omit to browse. |
state | string | ACTIVE | Contract state. Use * to match every state, including DELETED. |
baseEventId | string | — | Restrict to contracts under this base event. |
eventId | string | — | Restrict to contracts under this event. |
category | string | — | Restrict to contracts in this category or any category under it. Takes a path from List Categories. |
tradable | boolean | — | Restrict to tradable (true) or non-tradable (false) contracts. |
page | integer | 1 | 1-based page number. 0 or omitted means 1. |
perPage | integer | 20 | Hits per page. 0 or omitted means 20; values above 100 are clamped to 100. |
contractsPerHit | integer | 2 | With type=events or base-events, how many of each hit’s matching contracts to return in contracts. 0 or omitted means 2; values above 10 are clamped to 10. Ignored by type=contracts. |
Filter by category
category takes a category’s whole path, such as Elections > United States House, from List Categories. It matches that category and everything under it, so Elections also finds every House and Senate race. A bare level name such as United States matches nothing, because level names repeat under different parents. URL-encode the path, since it contains spaces and >.
Search results trail the catalogue
The index is updated from the catalogue and lags it by seconds. Treat a hit’ssymbol as the key into Get Event Contracts and read anything that must be current — state, tradable — from there. Do not act on a hit’s own tradable field.
Response
{
"success": true,
"data": {
"type": "events",
"found": 3986,
"page": 1,
"perPage": 20,
"hits": [
{
"eventId": "HORC_1126",
"baseEventId": "HORC",
"eventDisplayName": "US House of Representatives Control November 2026",
"openInterest": 2514201,
"contractsFound": 2,
"contracts": [
{
"symbol": "HORC_1126_Republican",
"eventId": "HORC_1126",
"baseEventId": "HORC",
"symbolSubTypes": ["YES", "NO"],
"state": "ACTIVE",
"tradable": true,
"tickSize": "0.01",
"openInterest": 1309471
},
{
"symbol": "HORC_1126_Democratic",
"eventId": "HORC_1126",
"baseEventId": "HORC",
"symbolSubTypes": ["YES", "NO"],
"state": "ACTIVE",
"tradable": true,
"tickSize": "0.01",
"openInterest": 1204730
}
]
}
]
}
}
Examples
Find contracts by text
curl -X GET "https://api.aries.com/v1/predictions/search?q=unemployment%20june"
Group hits by event
curl -X GET "https://api.aries.com/v1/predictions/search?type=events&q=unemployment"
Return the top 3 contracts of each event
curl -X GET "https://api.aries.com/v1/predictions/search?type=events&contractsPerHit=3"
List the matching contracts under one event hit
curl -X GET "https://api.aries.com/v1/predictions/search?type=contracts&q=unemployment&eventId=UNR_0822"
Browse a single base event, tradable only
curl -X GET "https://api.aries.com/v1/predictions/search?baseEventId=UNR&tradable=true&perPage=50"
Search one category
curl -G "https://api.aries.com/v1/predictions/search" \
--data-urlencode "category=Elections > United States House" \
-d type=base-events
Include deleted contracts
curl -X GET "https://api.aries.com/v1/predictions/search?q=unemployment&state=*"
Errors
400— an unknowntype, a parameter that failed validation (such asINVALID_CONTRACTS_PER_HITfor a negative or non-integercontractsPerHit), or acategorycontaining a backtick502— the search index was unavailable
Query Parameters
Level hits come back at. contracts (default) returns matching contracts; events returns one hit per event and base-events one per base event, each with its own fields, a count of matching contracts and the contractsPerHit of them with the most open interest. Echoed in the response.
contracts, events, base-events Full-text query over symbols, questions, event names and base-event specifications. Symbols split on _, - and . so BPM 0822 finds BPM_0822_1750. Omit to browse, soonest last-trade date first.
"unemployment june"
Contract state. Omitted means ACTIVE; * matches every state, including DELETED.
"ACTIVE"
Only contracts under this base event.
"UNR"
Only contracts under this event.
"UNR_0822"
Only contracts in this category or any category under it. Takes a path from List Categories, URL-encoded. A bare level name such as United States matches nothing, because level names repeat under different parents.
"Elections > United States House"
Only tradable (true) or non-tradable (false) contracts.
1-based page number; 0 or omitted means 1.
x >= 01
Hits per page, counting whatever type returns; 0 or omitted means 20, values above 100 are clamped to 100.
0 <= x <= 10020
With type=events or type=base-events, how many of each hit's matching contracts to return in contracts, those with the most open interest first. 0 or omitted means 2; values above 10 are clamped to 10. A negative or non-integer value returns 400 INVALID_CONTRACTS_PER_HIT. Ignored by type=contracts.
0 <= x <= 102
Was this page helpful?