# Polymarket Get positions for a market API

> Returns positions for a market, optionally filtered to a single user.

Source: https://www.sandbase.ai/model/polymarket/market-positions
API reference: https://www.sandbase.ai/model/polymarket/market-positions/docs

## Facts

- Provider: Polymarket
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/polymarket/market-positions`
- Price: $0.02 per call
- Capabilities: api, polymarket, prediction markets
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/polymarket/market-positions` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `market` | string | yes |  |
| `limit` | integer | no |  |
| `offset` | integer | no |  |
| `sortBy` | string | no | TOKENS, CASH_PNL, REALIZED_PNL, TOTAL_PNL |
| `sortDirection` | string | no | ASC, DESC |
| `status` | string | no | OPEN, CLOSED, ALL |
| `user` | string | no |  |

## FAQ

### How do I use the Polymarket Get positions for a market API?

Send a POST request to https://api.sandbase.ai/v1/api/polymarket/market-positions with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Polymarket Get positions for a market API cost?

$0.02 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

### What parameters does the Polymarket Get positions for a market API accept?

Required: market (string). Optional: limit (integer), offset (integer), sortBy (one of TOKENS, CASH_PNL, REALIZED_PNL, TOTAL_PNL), sortDirection (one of ASC, DESC), status (one of OPEN, CLOSED, ALL) and user (string). The Parameters table and the Playground on this page list every field.

### What does the Polymarket Get positions for a market API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a Polymarket developer account or API key?

No. Polymarket Get positions for a market runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Polymarket API access separately.

## README

### Polymarket Get positions for a market API

Returns positions for a market, optionally filtered to a single user.

The response is the official Polymarket API response, unchanged.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "polymarket/market-positions", "market": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | No | Max number of positions to return per outcome token |
| `market` | string | Yes | The condition ID of the market to query positions for |
| `offset` | integer | No | Pagination offset per outcome token |
| `sortBy` | string | No | Sort positions by: - `TOKENS` — Position size (number of tokens) - `CASH_PNL` — Unrealized cash PnL - `REALIZED_PNL` — Realized PnL - `TOTAL_PNL` — Total PnL (c |
| `sortDirection` | string | No | sortDirection |
| `status` | string | No | Filter positions by status. - `OPEN` — Only positions with size > 0.01 - `CLOSED` — Only positions with size <= 0.01 - `ALL` — All positions regardless of size |
| `user` | string | No | Filter to a single user by proxy wallet address |

#### Pricing

Flat price per call. Failed calls are not charged.
