# Polymarket 成交记录 API (polymarket.trades)

- Canonical page: https://everyinfra.com/polymarket-api/trades
- Endpoint: POST /api/v1/social with {"platform": "polymarket", "action": "trades", "params": {...}}
- Price: $0.006806 per call ($6.81 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 50, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=polymarket&action=trades

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| market | not declared | yes | not declared | 要看成交的市场：slug、condition_id 或市场链接，取自 markets 返回行；按成交时间从新到旧，一次最多 100 笔。 |
| limit | integer (1–100) | no | 50 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| tx_hash | 成交所在的链上交易哈希（trades）。 |
| order_hash | 成交对应的订单哈希（trades）。 |
| side | BUY 或 SELL（trades，挂单方视角）。 |
| outcome | 这笔成交买卖的是哪一边（trades），如 Yes 或球队名。 |
| price | 成交价，0–1（trades）。 |
| shares | 成交份数（trades）。 |
| amount_usd | 成交金额，美元（trades）。 |
| fee_usd | 手续费，美元（trades）。 |
| traded_at | 成交时间，ISO 8601 UTC（trades）。 |
| market_slug | 成交所在市场的 slug（trades）。 |
| condition_id | 市场在链上的 condition ID（0x 开头）；可作为 trades 的 market。 |
| token_id | 成交的结果代币 ID（trades）。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| maker_wallet | 挂单方钱包地址（链上公开）（trades）。 |
| taker_wallet | 吃单方钱包地址（链上公开）（trades）。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "polymarket",
  "action": "trades",
  "params": {
    "market": "will-bitcoin-reach-110000-by-december-31-2026-658-339-969"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "polymarket",
        "action": "trades",
        "params": {
            "market": "will-bitcoin-reach-110000-by-december-31-2026-658-339-969",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "polymarket",
  "action": "trades",
  "results": [
    {
      "tx_hash": …,
      "order_hash": …,
      "side": …,
      "outcome": …,
      "price": …,
      "shares": …,
      "amount_usd": …,
      "fee_usd": …,
      "traded_at": …,
      "market_slug": …,
      "condition_id": …,
      "token_id": …,
      "title": …,
      "maker_wallet": …,
      "taker_wallet": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=polymarket
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
