> For the complete documentation index, see [llms.txt](https://docs.uma.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uma.xyz/polymarket-v2-migration/ancillary-data-json-specification.md).

# Ancillary Data JSON Specification

### JSON fields

Encode requests as UTF-8 JSON objects. All fields below are required except integration.

* `type`: integer - 1 for binary markets; 2 for atomic neg-risk.
* `title`: string - market or event title.
* `description`: string - resolution rules, evidence sources, timing and exceptional cases.
* `market_id`: string - external market identifier, treated as an opaque string.
* `res_data`: array of value (string) and outcome (nonempty string). Array position has no meaning; never infer a value or code from ordering.
* `product_spec`: string - supplementary product specification or reference; use "" when absent.
* `integration`: - "polymarket" or other

Both arrays use entries with Numeric value strings encode unscaled decimal values. Convert exactly to the signed on-chain integer by multiplying by 10^18, without floating-point arithmetic. The Type 1 sentinel "minInt256" encodes −2^255 directly and is never scaled.

### Type 1: binary market

```
{
  "type": 1, // new json schemas for this type will increment to 1.1 
  "title": "Did it rain in Central Park?",
  "description": "full market rules or description optionally with a provided product_spec",
  "integration_id": "4805182", // marketId for Polymarket
  "res_data": [
    {"value": "0", "outcome": "No"}, // or Lakers, Under
    {"value": "1", "outcome": "Yes"}, // or Celtics, Over
    {"value": "0.5", "outcome": "Cancelled"} // do not include for incremental neg-risk events
  ],
  "product_spec": "", // url rule template
  "integration": “polymarket”
}
```

Notes: “Res\_data” must include "0" and "1" values exactly once. Value “0.5” is optional. Other values may not be used. Outcome labels describe the market-specific meaning of those values. A "0.5" settlement is valid only when permitted by the resolution rules and supported by the settlement contract; its presence in res\_data does not authorize that result. Too early is an oracle voting action and is not included in res\_data. Use market\_id to tie requests to the integrator’s APIs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uma.xyz/polymarket-v2-migration/ancillary-data-json-specification.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
