# Polymarketanalytics — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Track any trader's performance on Polymarket by retrieving their wallet positions, trade history, profit/loss records, category breakdowns, and deposit/withdrawal activity. Monitor trading strategies and market exposure across multiple prediction markets in real-time.

**Category:** Finance & Markets | **Website:** [polymarketanalytics.com/traders/0x29bc82f761749e67fa00d62896bc6855097b683c#positions](https://polymarketanalytics.com/traders/0x29bc82f761749e67fa00d62896bc6855097b683c#positions) | **Docs:** [parse.bot/marketplace/072d5174-5f41-407a-9036-1e4c045c1baf/polymarketanalytics-com-api](https://parse.bot/marketplace/072d5174-5f41-407a-9036-1e4c045c1baf/polymarketanalytics-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-polymarketanalytics-com-api-072d5174/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_trader_categories

Get category/tag performance breakdown showing win rate, PnL, and rank per market category. Returns an array of category performance records. The backend indexes a curated set of traders; untracked wallets return empty categories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `trader_id` | string | Yes | Ethereum wallet address of a tracked trader (42-character hex string starting with 0x) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-polymarketanalytics-com-api-072d5174/get_trader_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"trader_id":"<string>"}'
```

### get_trader_dashboard

Fetch a single trader's overview dashboard: rank, PnL stats, win rate, and position counts. Returns the overall performance summary for the specified wallet. The backend indexes a curated set of traders; untracked wallets return an empty result.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `trader_id` | string | Yes | Ethereum wallet address of a tracked trader (42-character hex string starting with 0x) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-polymarketanalytics-com-api-072d5174/get_trader_dashboard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"trader_id":"<string>"}'
```

### get_trader_pnl_history

Get historical daily cumulative PnL data for charting trader performance over time. Returns an array of daily PnL records ordered chronologically. The backend indexes a curated set of traders; untracked wallets return empty records.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `trader_id` | string | Yes | Ethereum wallet address of a tracked trader (42-character hex string starting with 0x) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-polymarketanalytics-com-api-072d5174/get_trader_pnl_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"trader_id":"<string>"}'
```

### get_trader_positions

Get positions for a trader including current value, invested amount, and PnL per market. Returns up to `limit` positions. For traders with very large position counts (>30k), the upstream response may be truncated; the `truncated` field indicates this.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of positions to return |
| `trader_id` | string | Yes | Ethereum wallet address of a tracked trader (42-character hex string starting with 0x) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-polymarketanalytics-com-api-072d5174/get_trader_positions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","trader_id":"<string>"}'
```

### get_trader_trades

Get paginated trade history for a trader. Returns trades in reverse chronological order. Supports server-side pagination via limit and offset. Each trade includes timestamp, side, amount, price, market info, and outcome. Note: sort_by and sort_desc are accepted but the upstream API currently returns results sorted by trade time descending regardless.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of trades to return per page |
| `offset` | integer | No | Pagination offset (number of trades to skip) |
| `sort_by` | string | No | Field to sort by (note: upstream currently ignores this and returns trades by trade time descending) |
| `sort_desc` | string | No | Sort direction: 'true' for descending, 'false' for ascending (note: upstream currently ignores this) |
| `trader_id` | string | Yes | Ethereum wallet address of a tracked trader (42-character hex string starting with 0x) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-polymarketanalytics-com-api-072d5174/get_trader_trades \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","sort_by":"<string>","sort_desc":"<string>","trader_id":"<string>"}'
```

### get_trader_transfers

Get deposit and withdrawal transaction history for a trader. Returns transfers sorted by the specified field. Each transfer includes the transaction hash, type (deposit/withdrawal), timestamp, and USD amount.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `sort_by` | string | No | Field to sort by |
| `sort_desc` | string | No | Sort direction: 'true' for descending, 'false' for ascending |
| `trader_id` | string | Yes | Ethereum wallet address of a tracked trader (42-character hex string starting with 0x) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-polymarketanalytics-com-api-072d5174/get_trader_transfers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sort_by":"<string>","sort_desc":"<string>","trader_id":"<string>"}'
```
