> ## 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 Price

Get current price data for a Polymarket token including midpoint, best bid/ask, spread, and last trade price. Supports single token (tokenId) or batch mode (tokenIds array) for multiple tokens in one call. Fetches multiple price points in parallel for comprehensive market view. Ideal for: price monitoring, trading signals, arbitrage detection, portfolio valuation.

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

Get current price data for a Polymarket token including midpoint, best bid/ask, spread, and last trade price. Supports single token (tokenId) or batch mode (tokenIds array) for multiple tokens in one call. Fetches multiple price points in parallel for comprehensive market view. Ideal for: price monitoring, trading signals, arbitrage detection, portfolio valuation.


## At a Glance

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

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tokenId` | `string` | No | The token ID to get price data for \(single token mode\) |
| `tokenIds` | `array` | No | Array of token IDs for batch price fetch |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tokenId` | `string` | No | The token ID queried |
| `midpoint` | `number \| null` | No | Midpoint price between best bid and ask |
| `bestBid` | `number \| null` | No | Best \(highest\) bid price |
| `bestAsk` | `number \| null` | No | Best \(lowest\) ask price |
| `spread` | `number \| null` | No | Spread between best bid and ask |
| `lastTradePrice` | `number \| null` | No | Price of the last trade |
| `prices` | `array` | No | Array of price data for each token \(batch mode\) |

## Examples

**Workflow node**

```json
{
  "type": "polymarket-get-market-price",
  "payload": {
    "tokenId": "1",
    "tokenIds": [
      "1"
    ]
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/polymarket-get-market-price/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "tokenId": "1",
    "tokenIds": [
      "1"
    ]
  }
}'
```

**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.