# Prediction Markets and Derivatives — Get open and historical positions for a wallet address

Get Blockrun Get open and historical positions for a wallet address data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by BlockRun, pass parameters such as limit, and retrieve structured data including continuation flag, reported count, result limit, returned pagination key field, and returned current field for market reference and account inspection, and integration reference.

Documentation: https://openany.si/blockrun/blockrun-prediction-markets-and-derivatives-get-open-and-historical-positions-for-a-wallet-addre/f55963ec-87b1-4ad1-aad7-a443b799095e/
API ID: f55963ec-87b1-4ad1-aad7-a443b799095e
Provider: blockrun
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockrun/v1/pm/polymarket/wallet/positions/{wallet}
Page update time: 2026-12-03T02:49:55.473Z
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.0075 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:54.625Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "7500",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Blockrun Get open and historical positions for a wallet address API

Retrieve open and historical positions for a wallet address with the BlockRun API. Provide wallet in path. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.

## What You Can Build

- **Market reference and account inspection**: Keep market, asset and account identities distinct when interpreting records.
- **Integration reference**: Use the selected request format and keep source identifiers with the returned result.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `pagination.has_more` | Continuation flag |
| `pagination.count` | Reported count |
| `pagination.limit` | Result limit |
| `pagination.pagination_key` | Returned pagination key field |
| `positions[].current` | Returned current field |
| `positions[].market` | Returned market field |
| `positions[].pnl` | Returned pnl field |
| `positions[].position` | Returned position field |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Prediction Markets and Derivatives — Get open and historical positions for a wallet address 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": {
        "wallet": {
          "type": "string",
          "description": "Wallet address whose public data is queried."
        }
      },
      "required": [
        "wallet"
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "condition_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter to a specific market by condition ID"
        },
        "include_closed": {
          "type": "boolean",
          "description": "Include zero-balance (closed) positions"
        },
        "limit": {
          "type": "integer",
          "description": "Maximum number of positions to return (1-200)",
          "minimum": 1,
          "maximum": 200
        },
        "market_slug": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by market slug"
        },
        "min_shares": {
          "type": "number",
          "description": "Minimum number of shares to include",
          "minimum": 0
        },
        "order": {
          "type": "string",
          "description": "Sort order: asc or desc",
          "enum": [
            "asc",
            "desc"
          ]
        },
        "pagination_key": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cursor for pagination"
        },
        "sort_by": {
          "type": "string",
          "description": "Field to sort by",
          "enum": [
            "value",
            "unrealized_pnl",
            "realized_pnl",
            "cost",
            "avg_price",
            "current_price",
            "entry_date"
          ]
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "pagination": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "has_more": {
          "type": "boolean"
        },
        "limit": {
          "type": "integer"
        },
        "pagination_key": {
          "type": "string"
        }
      }
    },
    "positions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "current": {
            "type": "object",
            "properties": {
              "price": {
                "type": "number"
              },
              "value_usd": {
                "type": "number"
              }
            }
          },
          "market": {
            "type": "object",
            "properties": {
              "condition_id": {
                "type": "string"
              },
              "market_slug": {
                "type": "string"
              },
              "side": {
                "type": "string"
              },
              "side_label": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "token_id": {
                "type": "string"
              }
            }
          },
          "pnl": {
            "type": "object",
            "properties": {
              "realized_usd": {
                "type": "integer"
              },
              "unrealized_pct": {
                "type": "number"
              },
              "unrealized_usd": {
                "type": "number"
              }
            }
          },
          "position": {
            "type": "object",
            "properties": {
              "avg_entry_price": {
                "type": "number"
              },
              "net_fees_usd": {
                "type": "integer"
              },
              "shares": {
                "type": "number"
              },
              "total_bought_usd": {
                "type": "number"
              },
              "total_cost_usd": {
                "type": "number"
              },
              "total_shares_bought": {
                "type": "number"
              }
            }
          }
        }
      }
    },
    "summary": {
      "type": "object",
      "properties": {
        "fees_paid": {
          "type": "number"
        },
        "fees_refunded": {
          "type": "integer"
        },
        "losing_positions": {
          "type": "integer"
        },
        "total_cost_usd": {
          "type": "number"
        },
        "total_positions": {
          "type": "integer"
        },
        "total_realized_pnl_usd": {
          "type": "number"
        },
        "total_unrealized_pnl_usd": {
          "type": "number"
        },
        "total_value_usd": {
          "type": "number"
        },
        "win_rate": {
          "type": "number"
        },
        "winning_positions": {
          "type": "integer"
        }
      }
    },
    "wallet_address": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Documentation example (source abbreviated)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/blockrun/v1/pm/polymarket/wallet/positions/0x2c335066fe58fe9237c3d3dc7b275c2a034a0563?limit=1' \
  -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
{
  "pagination": {
    "count": 1,
    "has_more": true,
    "limit": 1,
    "pagination_key": "eyJzdiI6MTMyNjc4LjI4OTQ4Nzk5OTQ2LCJ0aWQiOiI1NDUzMzU2OTUyODkyNzA4MjQzMDEzMzA0NzU1Njg0OTYwMDUxMTk4NTE5MTE1ODkyNzQ3NzUzMzEyNDYzMDMwMTkzNDQ4OTQ5ODUzMCIsInNjb3BlIjp7ImluY2x1ZGVfY2xvc2VkIjpmYWxzZSwibWluX3NoYXJlcyI6MC4wLCJjb25kaXRpb25faWQiOm51bGwsInNvcnRfYnkiOiJ2YWx1ZSIsIm9yZGVyIjoiZGVzYyJ9fQ=="
  },
  "positions": [
    {
      "current": {
        "price": 0.5766993234822859,
        "value_usd": 132678.28948799946
      },
      "market": {
        "condition_id": "0x7586a96520578acaaaa4ea84a2582f197f84255da1f3392a7aa300386c187b37",
        "market_slug": "will-benjamin-netanyahu-be-the-next-prime-minister-of-israel",
        "side": "NO",
        "side_label": "No",
        "status": "open",
        "title": "Will Benjamin Netanyahu be the next Prime Minister of Israel?",
        "token_id": "54533569528927082430133047556849600511985191158927477533124630301934489498530"
      },
      "pnl": {
        "realized_usd": 0,
        "unrealized_pct": -15.066873909095403,
        "unrealized_usd": -23536.718241720548
      },
      "position": {
        "avg_entry_price": 0.679004,
        "net_fees_usd": 0,
        "shares": 230064.93,
        "total_bought_usd": 156215.1557,
        "total_cost_usd": 156215.00772972,
        "total_shares_bought": 230065.14792254538
      }
    }
  ],
  "summary": {
    "fees_paid": 2685107.875564,
    "fees_refunded": 0,
    "losing_positions": 8245,
    "total_cost_usd": 4021065.007139276,
    "total_positions": 413,
    "total_realized_pnl_usd": -3517125.383922001,
    "total_unrealized_pnl_usd": -3542163.433746994,
    "total_value_usd": 478901.57339228224,
    "win_rate": 0.5425036067029186,
    "winning_positions": 9777
  },
  "wallet_address": "0x2c335066fe58fe9237c3d3dc7b275c2a034a0563"
}
```

## 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
### Which inputs identify this request?
Provide wallet in path (string). Keep identifiers and URLs in the formats documented for this implementation.

### Which pagination or result-size inputs are exposed?
limit is integer with minimum 1 and maximum 200. Use only the exposed inputs and the continuation metadata returned by this endpoint; a size limit is not automatically a page or cursor.

### Which values can I use for order?
The selected schema accepts asc, desc. Keep the documented string type and exact spelling for this input.

### Where do URL parameters belong?
Use the documented path and query inputs. This GET implementation does not use a JSON request body; keep path values and URL query values in their declared locations.

### 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 API implementation. Follow its billing unit, quantity and any request-dependent rules before sending the request.

## Available implementations
- blockrun: https://openany.si/blockrun/blockrun-prediction-markets-and-derivatives-get-open-and-historical-positions-for-a-wallet-addre/f55963ec-87b1-4ad1-aad7-a443b799095e/

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