# Polymarket — Get market by token

Get Polymarket Market by Token data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Polymarket, pass parameters such as Set, and retrieve structured data including parent market condition identifier, primary outcome token identifier, and secondary outcome token identifier for identity joins, and outcome navigation, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/polymarket/polymarket-get-market-by-token/0a34bbfc-c4d4-41b1-a6b6-caf429135bd7/
API ID: 0a34bbfc-c4d4-41b1-a6b6-caf429135bd7
Provider: Polymarket
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/polymarket/markets-by-token/{token_id}
Page update time: 2026-12-03T02:49:27.819Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:27.389Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Polymarket Market by Token API

The token\_id path parameter accepts an outcome token identifier as a string. The returned object includes condition\_id, primary\_token\_id and secondary\_token\_id. Keep all three identifiers attached when joining this lookup with market or price records.

## What You Can Build

- **Identity joins**: Connect a token-based quote with its market condition.
- **Outcome navigation**: Retain the paired token identifiers for subsequent lookups.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `condition_id` | Parent market condition identifier |
| `primary_token_id` | Primary outcome token identifier |
| `secondary_token_id` | Secondary outcome token identifier |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Polymarket — Get market by token request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "token_id": {
          "type": "string",
          "description": "The token ID to look up the parent market for"
        }
      },
      "required": [
        "token_id"
      ]
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "condition_id": {
      "type": "string"
    },
    "primary_token_id": {
      "type": "string"
    },
    "secondary_token_id": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/polymarket/markets-by-token/20006732765674855733524007935991362439352594042415161039767275461950712817548' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "condition_id": "0x7586a96520578acaaaa4ea84a2582f197f84255da1f3392a7aa300386c187b37",
  "primary_token_id": "20006732765674855733524007935991362439352594042415161039767275461950712817548",
  "secondary_token_id": "54533569528927082430133047556849600511985191158927477533124630301934489498530"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Is token_id a condition ID?
No. It is an outcome token ID. The response provides the parent condition_id separately.

### Should token IDs be parsed as numbers?
Keep token IDs as strings. Their long integer-like representation can exceed the exact range of common numeric types.

### Does primary_token_id always mean Yes?
Do not infer an outcome label from primary or secondary ordering alone. Obtain outcome labels from the corresponding market metadata.

### Does this lookup include the current token price?
The documented object provides condition and paired token identifiers. Read current prices through a dedicated price interface.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected implementation. Follow its billing unit and any request-dependent rules before sending the request.

## Available implementations
- Polymarket: https://openany.si/polymarket/polymarket-get-market-by-token/0a34bbfc-c4d4-41b1-a6b6-caf429135bd7/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
