> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Polymarket Get Market

Fetches Polymarket markets by condition ID, event/market slug, or event URL. Always returns a `markets[]` array (length 1 for single markets, length N for multi-market events), plus optional event metadata (eventId, title, slug, description) when the input resolves to an event. Each market includes question, outcomes, prices, CLOB token IDs, volume, and liquidity. Ideal for: market research, due diligence, price discovery, automated market monitoring, multi-market event routing.

![Polymarket Get Market logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png)
Catalog action Utility

Fetches Polymarket markets by condition ID, event/market slug, or event URL. Always returns a `markets[]` array (length 1 for single markets, length N for multi-market events), plus optional event metadata (eventId, title, slug, description) when the input resolves to an event. Each market includes question, outcomes, prices, CLOB token IDs, volume, and liquidity. Ideal for: market research, due diligence, price discovery, automated market monitoring, multi-market event routing.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `polymarket-get-market` |
| Category | Utility |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `polymarket`, `market-data`, `read` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conditionId` | `string` | No | The condition ID of the market. Provide one of conditionId, slug, or marketUrl. |
| `slug` | `string` | No | An event slug \(multi-market\) or market slug \(single market\), e.g. 'bitcoin-above-100k-on-june-30'. Provide one of conditionId, slug, or marketUrl. |
| `marketUrl` | `string` | No | A Polymarket event URL \(e.g. https://polymarket.com/event/&lt;slug&gt;\). The slug is extracted automatically. Provide one of conditionId, slug, or marketUrl. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `markets` | `array` | Yes | Always-present list of markets. Length 1 for single-market lookups \(conditionId or market-slug\) and for single-market events; length N for multi-market events. Downstream references should use 'markets\[i\].&lt;field&gt;'. |
| `marketCount` | `number` | Yes | Number of entries in 'markets\[\]' |
| `eventId` | `string` | No | Polymarket event ID \(multi-market events only\) |
| `title` | `string` | No | Event title \(multi-market events only\) |
| `slug` | `string` | No | Event slug \(multi-market events only\) |
| `description` | `string` | No | Event or market description |
| `conditionId` | `string` | No | DEPRECATED — use 'markets\[0\].conditionId'. Populated only for single-market responses. |
| `question` | `string` | No | DEPRECATED — use 'markets\[0\].question'. Populated only for single-market responses. |
| `outcomes` | `array` | No | DEPRECATED — use 'markets\[0\].outcomes'. Populated only for single-market responses. |
| `outcomePrices` | `array` | No | DEPRECATED — use 'markets\[0\].outcomePrices'. Populated only for single-market responses. |
| `tokenIds` | `array` | No | DEPRECATED — use 'markets\[0\].tokenIds'. Populated only for single-market responses. |
| `active` | `boolean` | No | DEPRECATED — use 'markets\[0\].active'. Populated only for single-market responses. |
| `closed` | `boolean` | No | DEPRECATED — use 'markets\[0\].closed'. Populated only for single-market responses. |
| `acceptingOrders` | `boolean` | No | DEPRECATED — use 'markets\[0\].acceptingOrders'. Populated only for single-market responses. |
| `negRisk` | `boolean` | No | DEPRECATED — use 'markets\[0\].negRisk'. Populated only for single-market responses. |
| `volume` | `number` | No | DEPRECATED — use 'markets\[0\].volume'. Populated only for single-market responses. |
| `liquidity` | `number` | No | DEPRECATED — use 'markets\[0\].liquidity'. Populated only for single-market responses. |
| `startDate` | `string` | No | DEPRECATED — use 'markets\[0\].startDate'. Populated only for single-market responses. |
| `endDate` | `string` | No | DEPRECATED — use 'markets\[0\].endDate'. Populated only for single-market responses. |

## Examples

**Workflow node**

```json
{
  "type": "polymarket-get-market",
  "payload": {
    "conditionId": "example-conditionId",
    "slug": "example-slug",
    "marketUrl": "https://example.com/webhook"
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/polymarket-get-market/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "conditionId": "example-conditionId",
    "slug": "example-slug",
    "marketUrl": "https://example.com/webhook"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.