WritersLogic Verifiable AI Agent Hub Predict Market API
The Predict Market API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for predict market.
The Predict Market API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for predict market.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/writerslogic-com:writerslogic-com-predict-market-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: WritersLogic Verifiable AI Agent Hub Predict Market API
version: 2.0.0
description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
contact:
name: WritersLogic
url: https://writerslogic.com/agents
email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Predict Market
paths:
/api/v1/predict-market:
post:
operationId: market_predictor
summary: Prediction Market Analyzer
description: 'Independent probability that a Polymarket or Kalshi market resolves Yes, checked against the live book. Pass a market (slug, URL, conditionId or Kalshi ticker) and/or news text: the agent reads the rules, end date and best asks, estimates 0-100 with live web search (falling back to model knowledge if search is slow), and returns verdict.action BUY_YES / BUY_NO / NO_TRADE with edge in bps after taker fees, a confidence gate, quarter-Kelly size and sourced factors for and against. Resolved markets return their outcome without a model call. Not financial advice.
Price: 0.10 USDC on Base (x402).'
x-x402-price-usdc: '0.10'
x-x402-amount: '100000'
x-payment-info:
protocols:
- x402
price:
mode: fixed
currency: USD
amount: '0.10'
x-audience: crypto
x-sample-url: https://agents.writerslogic.com/api/v1/samples/market-predictor
security:
- x402: []
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
text:
type: string
minLength: 1
maxLength: 20000
description: News excerpt or event description. Required unless market is given; with market, extra evidence you want weighed.
question:
type: string
maxLength: 500
description: Exact market question; inferred when omitted (read from the market when market is given).
market:
type: string
minLength: 3
maxLength: 500
description: Polymarket slug, market URL or conditionId, or a Kalshi ticker or URL. Reads the question, rules, end date and live best asks; marketPriceYes then defaults to the book mid. A resolved market returns its outcome without a model call.
minEdgePct:
type: number
minimum: 0
maximum: 100
description: Minimum edge after taker fees, in percentage points, before verdict.action is BUY_YES or BUY_NO (default 5). A low-confidence estimate never produces a BUY.
bankrollUsd:
type: number
minimum: 0
maximum: 1000000000000
description: Converts the quarter-Kelly fraction into verdict.size_usd.
marketPriceYes:
type: number
minimum: 0
maximum: 100
description: Current implied Yes probability, used to compute edge. Percent (0-100) by default; a value strictly between 0 and 1 is read as a 0-1 market price (Polymarket/Kalshi style) unless marketPriceScale says otherwise.
marketPriceScale:
type: string
enum:
- percent
- fraction
description: 'Force the unit of marketPriceYes: percent (35 = 35%) or fraction (0.35 = 35%).'
example:
market: will-jd-vance-win-the-2028-us-presidential-election
minEdgePct: 5
bankrollUsd: 10000
responses:
'200':
description: Paid result with provenance
content:
application/json:
schema:
type: object
properties:
data:
type: object
additionalProperties: false
required:
- market_question
- probability_yes
- confidence
- sentiment
- factors_for_yes
- factors_for_no
- information_gaps
- rationale
- probability_no
- analyzed_at
- verdict
- disclaimer
- used_web_search
- sources
- trade
properties:
market_question:
type: string
description: The binary Yes/No question being forecast, stated precisely.
probability_yes:
type: integer
description: Probability (0-100) that the event resolves Yes.
confidence:
type: string
enum:
- low
- medium
- high
sentiment:
type: object
additionalProperties: false
required:
- label
- score
properties:
label:
type: string
enum:
- positive
- negative
- neutral
- mixed
description: Derived from score and the factor lists, never model-reported.
score:
type: number
factors_for_yes:
type: array
items:
type: string
factors_for_no:
type: array
items:
type: string
information_gaps:
type: array
items:
type: string
rationale:
type: string
probability_no:
type: integer
market_price_yes_pct:
type: number
description: marketPriceYes normalized to percent; present only when a price was given.
market_price_interpretation:
type: string
enum:
- percent
- fraction
description: How marketPriceYes was read.
edge_vs_market:
type: number
description: probability_yes minus the normalized market price; present only when a price was given.
analyzed_at:
type: string
verdict:
type: object
description: Machine-readable call, computed in code. Leads the answer; detail follows in the other fields.
properties:
action:
type: string
enum:
- BUY_YES
- BUY_NO
- NO_TRADE
reason_code:
type: string
description: Stable code for why this action was returned.
confidence:
anyOf:
- type: number
- type: 'null'
description: 0-1; null when no judgment was made.
confidence_label:
type: string
enum:
- low
- medium
- high
edge_bps:
anyOf:
- type: number
- type: 'null'
description: Expected edge in bps of cost; null when not priced.
edge_usd:
anyOf:
- type: number
- type: 'null'
description: 'Expected edge in USD (cover-claim: cover-asset units); null when not priced.'
size_usd:
anyOf:
- type: number
- type: 'null'
description: Suggested stake in USD; null when not sized.
headline:
type: string
drivers:
type: array
items:
type: string
next_step:
type: string
partial:
type: boolean
description: True when part of the analysis could not run; see missing.
missing:
type: array
items:
type: string
disclaimer:
type: string
description: Not financial advice.
used_web_search:
type: boolean
description: True when the estimate used live web search.
sources:
type: array
items:
type: object
description: Pages the search cited, when used.
market:
type: object
description: 'Present when market was given: venue, id, end date, closed, resolved outcome and best asks.'
trade:
anyOf:
- type: object
- type: 'null'
description: 'Better side after taker fees: side, all_in_cost and edge_after_fees_pct; null when no price was available.'
_provenance:
type: object
description: C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance
required:
- data
- _provenance
'400':
description: Invalid request (no payment consumed)
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'401':
description: Invalid X-API-KEY
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'402':
description: Payment required or invalid
content:
application/json:
schema:
type: object
description: x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)
properties:
x402Version:
type: integer
error:
type: string
code:
type: string
resource:
type: object
accepts:
type: array
items:
type: object
extensions:
type: object
'502':
description: Upstream failure; the payment is released or not settled
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
tags:
- Predict Market
components:
securitySchemes:
x402:
type: apiKey
in: header
name: PAYMENT-SIGNATURE
description: x402 v2 payment payload (base64) sent after a 402 challenge
apiKey:
type: apiKey
in: header
name: X-API-KEY