# Prediction Markets and Derivatives — Filter wallets by market trades with AND/OR logic

Get Blockrun Filter wallets by market trades with AND/OR logic data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by BlockRun, pass parameters such as limit, markets, window, and retrieve structured data including continuation flag, reported count, result limit, returned pagination key field, and returned entry edge value for market reference and account inspection, and integration reference.

Documentation: https://openany.si/blockrun/blockrun-prediction-markets-and-derivatives-filter-wallets-by-market-trades-with-and-or-logic/336cc142-92a5-4650-9071-6b25e9e2f32d/
API ID: 336cc142-92a5-4650-9071-6b25e9e2f32d
Provider: blockrun
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockrun/v1/pm/polymarket/wallets/filter
Page update time: 2026-12-03T02:49:53.475Z
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:52.613Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "7500",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Blockrun Filter wallets by market trades with AND/OR logic API

Filter wallets by market trades with AND/OR logic with the BlockRun API. Provide markets in query. 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 |
| `entries[].entry_edge` | Returned entry edge value (nullable in the reference) |
| `entries[].markets_matched` | Returned markets matched field |
| `entries[].metrics` | Returned metrics field |
| `entries[].rank` | Returned rank field |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Prediction Markets and Derivatives — Filter wallets by market trades with AND/OR logic 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": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "Results per page",
          "minimum": 1,
          "maximum": 100
        },
        "market_logic": {
          "type": "string",
          "description": "AND = traded ALL markets, OR = traded ANY market",
          "enum": [
            "and",
            "or"
          ]
        },
        "markets": {
          "type": "string",
          "description": "Comma-separated market condition IDs (1-10 markets)"
        },
        "max_avg_buy_price": {
          "type": [
            "number",
            "null"
          ],
          "description": "Maximum combined avg buy price (0-1)",
          "minimum": 0,
          "maximum": 1
        },
        "max_avg_sell_price": {
          "type": [
            "number",
            "null"
          ],
          "description": "Maximum combined avg sell price (0-1)",
          "minimum": 0,
          "maximum": 1
        },
        "max_entry_edge": {
          "type": [
            "number",
            "null"
          ],
          "description": "Maximum combined entry edge",
          "minimum": -1,
          "maximum": 1
        },
        "max_realized_pnl": {
          "type": [
            "number",
            "null"
          ],
          "description": "Maximum combined realized PnL across specified markets (USD)"
        },
        "max_total_pnl": {
          "type": [
            "number",
            "null"
          ],
          "description": "Maximum combined total PnL across specified markets (USD, net of fees)"
        },
        "min_avg_buy_price": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined avg buy price (0-1)",
          "minimum": 0,
          "maximum": 1
        },
        "min_avg_sell_price": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined avg sell price (0-1)",
          "minimum": 0,
          "maximum": 1
        },
        "min_entry_edge": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined entry edge",
          "minimum": -1,
          "maximum": 1
        },
        "min_profit_factor": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined profit factor",
          "minimum": 0
        },
        "min_realized_pnl": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined realized PnL across specified markets (USD)"
        },
        "min_roi": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined ROI across specified markets (decimal)"
        },
        "min_total_pnl": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined total PnL across specified markets (USD, net of fees)"
        },
        "min_trades": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Minimum combined trade count across specified markets",
          "minimum": 1
        },
        "min_volume": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined volume across specified markets (USD)",
          "minimum": 0
        },
        "min_win_rate": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum combined win rate (decimal)",
          "minimum": 0,
          "maximum": 1
        },
        "order": {
          "type": "string",
          "description": "Sort order",
          "enum": [
            "asc",
            "desc"
          ]
        },
        "pagination_key": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cursor for pagination"
        },
        "sort_by": {
          "type": "string",
          "description": "Sort field (based on combined metrics)",
          "enum": [
            "realized_pnl",
            "total_pnl",
            "volume",
            "roi",
            "profit_factor",
            "win_rate",
            "trades"
          ]
        },
        "window": {
          "type": "string",
          "description": "Time window for metrics",
          "enum": [
            "1d",
            "7d",
            "30d",
            "all_time"
          ]
        }
      },
      "required": [
        "markets"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "entry_edge": {
            "type": "null"
          },
          "markets_matched": {
            "type": "integer"
          },
          "metrics": {
            "type": "object",
            "properties": {
              "losses": {
                "type": "integer"
              },
              "positions_closed": {
                "type": "integer"
              },
              "profit_factor": {
                "type": "integer"
              },
              "realized_pnl": {
                "type": "integer"
              },
              "roi": {
                "type": "integer"
              },
              "total_pnl": {
                "type": "number"
              },
              "trades": {
                "type": "integer"
              },
              "volume": {
                "type": "integer"
              },
              "win_rate": {
                "type": "integer"
              },
              "wins": {
                "type": "integer"
              }
            }
          },
          "rank": {
            "type": "integer"
          },
          "user": {
            "type": "string"
          }
        }
      }
    },
    "market_logic": {
      "type": "string"
    },
    "markets": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "pagination": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "has_more": {
          "type": "boolean"
        },
        "limit": {
          "type": "integer"
        },
        "pagination_key": {
          "type": "string"
        }
      }
    },
    "sort_by": {
      "type": "string"
    },
    "window": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Documentation example (source abbreviated)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/blockrun/v1/pm/polymarket/wallets/filter?limit=1&markets=0x89318e31453b84f24b5c14ea7aa3524c6eb91b92af4665c766af734c8de7890f&window=1d' \
  -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
{
  "entries": [
    {
      "entry_edge": null,
      "markets_matched": 1,
      "metrics": {
        "losses": 0,
        "positions_closed": 0,
        "profit_factor": 0,
        "realized_pnl": 0,
        "roi": 0,
        "total_pnl": 203.68935998662585,
        "trades": 0,
        "volume": 0,
        "win_rate": 0,
        "wins": 0
      },
      "rank": 1,
      "user": "0xd67026079332e6f9d34f4585de2e6a0e1d8ab24e"
    }
  ],
  "market_logic": "and",
  "markets": [
    "0x89318e31453b84f24b5c14ea7aa3524c6eb91b92af4665c766af734c8de7890f"
  ],
  "pagination": {
    "count": 1,
    "has_more": true,
    "limit": 1,
    "pagination_key": "eyJzdiI6MjAzLjY4OTM1OTk4NjYyNTg1LCJ1IjoiMHhkNjcwMjYwNzkzMzJlNmY5ZDM0ZjQ1ODVkZTJlNmEwZTFkOGFiMjRlIiwicm8iOjEsInNjb3BlIjp7Im1hcmtldHMiOiIweDg5MzE4ZTMxNDUzYjg0ZjI0YjVjMTRlYTdhYTM1MjRjNmViOTFiOTJhZjQ2NjVjNzY2YWY3MzRjOGRlNzg5MGYiLCJtYXJrZXRfbG9naWMiOiJhbmQiLCJ3aW5kb3ciOiIxZCIsInNvcnRfYnkiOiJ0b3RhbF9wbmwiLCJvcmRlciI6ImRlc2MiLCJtaW5fcmVhbGl6ZWRfcG5sIjpudWxsLCJtYXhfcmVhbGl6ZWRfcG5sIjpudWxsLCJtaW5fdG90YWxfcG5sIjpudWxsLCJtYXhfdG90YWxfcG5sIjpudWxsLCJtaW5fdm9sdW1lIjpudWxsLCJtaW5fdHJhZGVzIjpudWxsLCJtaW5fcm9pIjpudWxsLCJtaW5fcHJvZml0X2ZhY3RvciI6bnVsbCwibWluX3dpbl9yYXRlIjpudWxsLCJtaW5fYXZnX2J1eV9wcmljZSI6bnVsbCwibWF4X2F2Z19idXlfcHJpY2UiOm51bGwsIm1pbl9hdmdfc2VsbF9wcmljZSI6bnVsbCwibWF4X2F2Z19zZWxsX3ByaWNlIjpudWxsLCJtaW5fZW50cnlfZWRnZSI6bnVsbCwibWF4X2VudHJ5X2VkZ2UiOm51bGx9fQ=="
  },
  "sort_by": "total_pnl",
  "window": "1d"
}
```

## 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 markets in query (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 100. 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 market_logic?
The selected schema accepts and, or. 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-filter-wallets-by-market-trades-with-and-or-logic/336cc142-92a5-4650-9071-6b25e9e2f32d/

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