wrangle.win
wrangle.win

Market Delivery

Learn how wrangle.win delivers prediction markets to your platform. market.published payload format, fields, translations, answers, sources, HTTP responses, retries and idempotent processing.

API В· Market Delivery

Receive prediction markets from wrangle.win.

wrangle.win delivers structured prediction markets directly to the Market URL configured in your merchant account.

Your Market URL belongs to your own platform. It can be any HTTPS endpoint in your backend that is able to receive POST requests from wrangle.win.

When a market is delivered, your platform receives a market.published event containing the market content, available outcomes, translations, sources and classification data.

Market Delivery
market.published

When a prediction market is ready for delivery, wrangle.win sends a POST request to the Market URL configured for your merchant account.

Sender
wrangle.win

wrangle.win initiates the market delivery request.

Receiver
Your Platform

Your backend receives and processes the market.

Example Merchant Endpoint
POST https://merchant.example.com/api/markets

This is only an example. You can use any HTTPS route supported by your backend.

Delivery Flow

wrangle.win pushes markets to your backend.

Market delivery is initiated by wrangle.win. Your platform does not need to continuously poll wrangle.win for new content.

wrangle.win
Prediction market is ready for delivery
↓
POST market.published
Market content is sent to your configured Market URL
↓
Merchant Backend
Receive в†’ Validate в†’ Store
↓
Your platform decides whether to publish the market
Payload

market.published payload

The request body contains the event type and the prediction market object.

The values below are illustrative. The JSON structure represents the market delivery format used by wrangle.win.

Example JSON
{
  "event": "market.published",
  "market": {
    "id": 572,
    "status": "published",
    "source_locale": "en",
    "finish_at": "2026-10-15T18:00:00+00:00",
    "published_at": "2026-09-30T10:00:00+00:00",
    "resolved_at": null,
    "winning_answer_id": null,

    "translations": [
      {
        "locale": "en",
        "title": "Will Bitcoin be above $120,000 on October 15?",
        "description": "This market resolves according to the defined resolution conditions."
      },
      {
        "locale": "es",
        "title": "ВїBitcoin estarГЎ por encima de $120,000 el 15 de octubre?",
        "description": "Este mercado se resolverГЎ segГєn las condiciones de resoluciГіn definidas."
      }
    ],

    "answers": [
      {
        "id": 1141,
        "sort_order": 1,
        "translations": [
          {
            "locale": "en",
            "title": "Yes"
          },
          {
            "locale": "es",
            "title": "SГ­"
          }
        ]
      },
      {
        "id": 1142,
        "sort_order": 2,
        "translations": [
          {
            "locale": "en",
            "title": "No"
          },
          {
            "locale": "es",
            "title": "No"
          }
        ]
      }
    ],

    "sources": [
      {
        "url": "https://example.com/source",
        "sort_order": 1
      }
    ],

    "categories": [
      {
        "id": 3,
        "name": "Crypto",
        "slug": "crypto"
      }
    ],

    "countries": [],

    "country_groups": [
      {
        "id": 1,
        "name": "Global",
        "slug": "global"
      }
    ]
  }
}
Top-Level Fields

Request structure

Field Type Description
event string Event type. Initial market delivery uses market.published.
market object Prediction market data delivered to your platform.
Market Object

Core market fields

Field Type Description
id integer Unique wrangle.win market identifier.
status string Current lifecycle status of the market.
source_locale string / null Original language or locale of the market.
finish_at ISO 8601 / null Scheduled market finish time.
published_at ISO 8601 / null Time the market was published by wrangle.win.
resolved_at ISO 8601 / null Resolution time. Normally null during initial delivery.
winning_answer_id integer / null Winning answer identifier. Normally null until the market is resolved.
Translations

Localized market content

A market can contain multiple translations so your platform can display the same prediction market in different languages.

"translations": [
  {
    "locale": "en",
    "title": "Will Bitcoin be above $120,000 on October 15?",
    "description": "This market resolves according to the defined resolution conditions."
  }
]
locale

Language or locale identifier.

title

Localized prediction market title.

description

Localized description and market information.

Answers

Available market outcomes

Each possible outcome has a stable wrangle.win answer ID, display order and localized titles.

"answers": [
  {
    "id": 1141,
    "sort_order": 1,
    "translations": [
      {
        "locale": "en",
        "title": "Yes"
      }
    ]
  },
  {
    "id": 1142,
    "sort_order": 2,
    "translations": [
      {
        "locale": "en",
        "title": "No"
      }
    ]
  }
]
Preserve answer IDs.

Store each answers[].id value together with your own internal outcome identifier. The answer IDs are reused by later lifecycle callbacks so your platform can match the final wrangle.win result to the same internal outcomes.

Sources

Market sources

Source URLs associated with the market can be included in the delivery payload.

"sources": [
  {
    "url": "https://example.com/source",
    "sort_order": 1
  }
]
Classification

Categories and geography

Classification data can be used by your platform to automatically filter, organize and route incoming markets.

categories[]
  • id
  • name
  • slug
countries[]
  • id
  • code
  • name
country_groups[]
  • id
  • name
  • slug
Market Mapping

Keep your IDs. Store ours.

You do not need to change the internal identifiers already used by your platform.

Store wrangle.win market and answer IDs as external references. These identifiers connect the original market delivery with future lifecycle events.

Market
market.id

Map this value to your internal market record.

wrangle_market_id в†’ internal_market_id
Outcomes
answers[].id

Map each wrangle.win answer ID to your internal outcome record.

wrangle_answer_id в†’ internal_outcome_id
Recommended Processing

Receive each delivery safely.

Your Market URL should process deliveries idempotently. Receiving the same market more than once must not create duplicate markets or duplicate business actions.

01
Validate

Validate the event and required market fields.

02
Find

Search for an existing market using the wrangle.win market ID.

03
Persist

Store or update the market and its external identifiers.

04
Return 2xx

Return a successful response after accepting the delivery.

Example Implementation

Laravel receiver example

The following example demonstrates one possible way to receive a market. Your implementation can use any framework or internal data structure.

routes/api.php
Route::post('/markets', [MarketController::class, 'receive']);
MarketController.php
public function receive(Request $request)
{
    $payload = $request->validate([
        'event' => ['required', 'string'],
        'market' => ['required', 'array'],
        'market.id' => ['required', 'integer'],
    ]);

    if ($payload['event'] !== 'market.published') {
        return response()->json([
            'message' => 'Unsupported event',
        ], 422);
    }

    $market = $payload['market'];

    $localMarket = Market::updateOrCreate(
        [
            'wrangle_market_id' => $market['id'],
        ],
        [
            'status' => $market['status'],
            'source_locale' => $market['source_locale'] ?? null,
            'finish_at' => $market['finish_at'] ?? null,
            'published_at' => $market['published_at'] ?? null,
        ]
    );

    ProcessMarket::dispatch(
        $localMarket->id,
        $market
    );

    return response()->json([
        'accepted' => true,
    ]);
}

This example does not define a required database schema. The only important requirement is that your platform can reliably associate the wrangle.win market ID with the corresponding market in your own system.

HTTP Response

Confirm that the market was accepted.

wrangle.win treats a successful HTTP response as confirmation that your platform accepted the delivery.

Successful
HTTP 2xx
{
  "accepted": true
}

Any successful 2xx response indicates that the delivery was accepted by your platform.

Failed
Non-2xx

A non-successful HTTP response is treated as a failed delivery attempt.

Your endpoint should therefore return a successful response only after the incoming market has been safely accepted.

Response Time

Accept quickly. Process asynchronously.

wrangle.win waits up to 20 seconds for the Market URL request to complete.

For production integrations, we recommend validating and persisting the incoming event quickly, returning a successful HTTP response and performing expensive internal processing through your own queue or background workers.

Publication Control

Receiving a market does not require you to publish it.

wrangle.win delivers prediction market content to your backend. Your platform remains in control of what becomes available to your users.

Select

Choose which delivered markets to use.

Schedule

Decide when a market becomes visible.

Display

Control placement and presentation.

Commercialize

Apply your own participation and commercial model.

What Happens Next

Market delivery starts the lifecycle.

After a market has been delivered, wrangle.win continues tracking its lifecycle. Subsequent lifecycle notifications are sent to the separate Callback URL configured for your merchant account.

market.resolving

Outcome determination has started. This event is non-terminal: do not infer a winner or settle the market yet.

market.resolved

The final winner has been confirmed. Use the supplied result with your platform's existing settlement workflow.

market.cancelled

The market has been cancelled without a winner. Apply your platform's existing cancellation or void rules.

Example Merchant Callback Endpoint
POST https://merchant.example.com/api/wrangle/callback

The Callback URL receives market.resolving, market.resolved and market.cancelled.

Lifecycle Callbacks в†’