wrangle.win
wrangle.win

API Reference

wrangle.win Prediction Market API documentation. Learn how to authenticate, receive prediction markets, process verified resolution callbacks and integrate wrangle.win with your platform.

{{-- Hero --}}
API Reference

wrangle.win Prediction Market API

Integrate prediction markets directly into your platform through server-to-server event delivery.

wrangle.win delivers new markets and subsequent lifecycle events directly to your backend. Your integration does not need to poll wrangle.win for newly published markets.

The integration works alongside your existing casino, sportsbook or gaming infrastructure without requiring access to your users, wallets, balances, deposits, withdrawals or payout systems.

{{-- Architecture --}}
Event-Driven Architecture

One market. A complete lifecycle.

After a market has been delivered to your platform, wrangle.win can notify your backend as that market progresses from publication through outcome determination to a final resolution or cancellation.

{{-- Published --}}
Market Available
market.published

A prediction market has been delivered and is available for integration into your platform.

wrangle.win в†’ Your Backend
{{-- Resolving --}}
Outcome Pending
market.resolving

The market has reached the resolution stage and determination of the official outcome is in progress.

Await final outcome
{{-- Resolved --}}
Final Outcome
market.resolved

The official winning outcome has been confirmed and delivered to your platform.

Final result available
{{-- Cancelled --}}
Terminal Event
market.cancelled

The market has been cancelled and will not proceed through the normal final-resolution path.

Apply your cancellation rules
{{-- Event table --}}
Lifecycle Events

Know exactly what each event means.

Treat the wrangle.win market ID as the stable external identifier throughout the complete lifecycle.

Event Meaning Final Recommended Action
market.published New market delivered No Store, map and process the market
market.resolving Outcome determination is in progress No Stop normal market activity as appropriate and await a terminal event
market.resolved Official winning outcome confirmed Yes Apply the final result through your settlement logic
market.cancelled Market cancelled Yes Apply your platform's cancellation or void rules
{{-- Integration Model --}}
Integration Model

Server-to-server and event-driven.

wrangle.win communicates directly with your backend. Integration credentials and event-processing logic should never be exposed to end users or browser-side applications.

wrangle.win
Prediction Market Infrastructure
↓
market.published
Market delivered to your backend
↓
Your Platform
Store в†’ Map в†’ Select в†’ Publish
Underlying event completes
market.resolving
Outcome determination started
↓
Monitoring в†’ Analysis в†’ Verification в†’ Final Confirmation
↓
market.resolved
Confirmed winning outcome
↓
Your Settlement System
Your users. Your balances. Your payouts.
Alternative Terminal Path
market.published в†’ market.cancelled

A cancelled market does not continue through the normal resolution path. Your platform should apply its own cancellation or void rules and must not treat cancellation as a confirmed winning outcome.

{{-- Delivery model --}}
Market Delivery

Markets are pushed to your backend.

Your platform does not need to request each new market. When a market is selected for delivery to your merchant account, wrangle.win sends the market to your configured endpoint.

Event
market.published

The initial delivery contains the information required to identify and process the prediction market.

Example Merchant Endpoint
POST https://your-platform.com/api/wrangle/markets

Configure an HTTPS endpoint capable of accepting incoming server-to-server requests from wrangle.win.

Market Identity

Use the wrangle.win market identifier as a stable external reference.

Market Content

Receive structured prediction-market information for processing by your platform.

Answers

Possible market outcomes are delivered as structured answer records.

Translations

Localized content can accompany supported markets.

Sources

Relevant source information can accompany market content.

Classification

Categories, countries and geographic groups support content selection and organization.

{{-- Delivery Channels --}}
Delivery Channels

Market delivery and lifecycle callbacks use separate endpoints.

wrangle.win separates initial market delivery from subsequent lifecycle notifications. Configure both endpoints in your merchant integration.

{{-- Market URL --}}
Market URL

Initial market delivery

POST https://your-platform.com/api/wrangle/markets
Event
market.published

New prediction markets are pushed to your Market URL. This endpoint receives the initial market content that your platform can store, map and publish.

{{-- Callback URL --}}
Callback URL

Market lifecycle updates

POST https://your-platform.com/api/wrangle/callback
Events
market.resolving
market.resolved
market.cancelled

After the initial market has been delivered, subsequent lifecycle events are sent to your Callback URL. Your handler can determine the event type from the top-level event field.

market.published в†’ Market URL | market.resolving / market.resolved / market.cancelled в†’ Callback URL
{{-- Mapping --}}
Market Mapping

Keep your IDs. Store ours as an external reference.

You do not need to replace your existing market identifiers. Store the wrangle.win market ID alongside your own internal market ID and preserve that mapping throughout the lifecycle.

wrangle.win
Your Platform
market.id
external_market_id

Important: use the same mapping when processing market.resolving, market.resolved and market.cancelled events.

{{-- Resolution --}}
Outcome Determination

Resolution is a process, not a single moment.

When a market reaches the resolution stage, wrangle.win determines and verifies the official outcome before delivering the final result.

01
Resolving
02
Monitor
03
Analyze
04
Verify
05
Confirm
06
Resolved
market.resolving

Outcome determination has started

This is not a final result. Your platform should preserve the market mapping, prevent further normal market activity as appropriate, and wait for a terminal lifecycle event.

market.resolved

Official winner confirmed

The final result can now be applied through your existing business and financial-settlement logic.

{{-- Responsibility boundary --}}
Responsibility Boundary

Market outcomes are not financial settlement.

wrangle.win determines and communicates the lifecycle and official outcome of the prediction market.

Your platform determines what those events mean for individual users, positions, balances, winnings, losses and payouts.

wrangle.win

Market Lifecycle

  • Deliver prediction markets
  • Track market lifecycle
  • Monitor underlying events
  • Perform AI-assisted analysis where applicable
  • Perform human verification
  • Confirm the official winning outcome
  • Deliver lifecycle callbacks
Your Platform

User & Financial Settlement

  • Select which delivered markets to publish
  • Manage participating users
  • Manage positions or bets
  • Apply resolved or cancelled outcomes
  • Calculate winnings and losses
  • Update balances and process payouts
  • Maintain financial records
{{-- Authentication --}}
Authentication

Keep integration credentials private.

Merchant credentials are intended for server-to-server communication and must be stored securely by your backend.

Backend Only

Keep credentials in server-side configuration.

Never Commit Secrets

Do not place credentials in public repositories.

Never Expose to Browsers

Credentials must not be embedded in frontend code.

Authentication Guide в†’
{{-- HTTP --}}
HTTP Processing

Acknowledge incoming events using standard HTTP semantics.

Your receiving endpoint should return an appropriate HTTP response after accepting or rejecting an incoming event.

2xx
Accepted

The event has been successfully accepted by your platform.

4xx
Request Rejected

The request could not be accepted because of validation, authentication or other request-related problems.

5xx
Temporary Failure

Your service encountered a server-side problem while processing the event.

{{-- Idempotency --}}
Idempotency

Process every lifecycle event idempotently.

Network failures can make it impossible to determine whether an earlier request was successfully processed. Your handlers should therefore safely accept repeated delivery without creating duplicate markets or settling user positions twice.

Unique Market Mapping

Do not create another internal market when the same wrangle.win market is delivered again.

Terminal Event Protection

Repeated resolved or cancelled events must not execute terminal business logic more than once.

Persist Before Processing

Persist important incoming events before starting expensive asynchronous processing.

{{-- Security --}}
Security

Treat the integration as production infrastructure.

HTTPS

Use HTTPS for production delivery and callback endpoints.

Secrets

Keep integration credentials in secure server-side configuration.

Validation

Validate incoming payloads before changing application state.

Logging

Log integration events without recording secret credentials.

{{-- Documentation --}} {{-- Footer navigation --}}