For the complete documentation index, see llms.txt. This page is also available as Markdown.

outcomeTemplates

Returns the live list of registered outcome templates.

A template defines the name and description text for a market, the placeholder keywords that must be filled in, and the role the template plays (standalone market, question, or an outcome under a question). Use it to construct a valid registerOutcome action.

This is the raw node view of the template registry, exactly as the chain reports it.

Field
Type
Description

type

string

Must be "outcomeTemplates"

Request

curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "outcomeTemplates"
  }'
import requests
import os
import json

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'outcomeTemplates'
    },
    headers={
        'Authorization': f'Bearer {os.environ["HYDROMANCER_API_KEY"]}',
        'Content-Type': 'application/json'
    }
)
print(json.dumps(response.json(), indent=2))

Response Fields

Returns an array of template objects.

Field
Type
Description

id

string

Template identifier (e.g. "binaryPrice"), referenced when registering an outcome

role

string | object

The role the template plays — see Template roles

name

string

Market title, with {keyword} placeholders

description

string

Full resolution criteria, with {keyword} placeholders. May carry a trailing metadata=… segment holding category, subCategory, and semanticRestriction

keywords

array

List of [name, type] pairs, one per placeholder. Types include hlPerp, string, uInt, uDecimal, and dateTime

Template roles

role takes one of three shapes:

Shape
Meaning

{ "standaloneOutcome": { "sideNames": [...] } }

A self-contained market. sideNames lists the side labels, which may themselves be placeholders (e.g. ["Yes", "No"] or ["{shortNameA}", "{shortNameB}"])

"question"

A question grouping several outcomes. Note this is a bare string, not an object

{ "questionOutcome": { "parent": "<templateId>" } }

One outcome under a question template; parent names the question template it belongs to

Response

Last updated