PMWallets Push API
Live fill subscriptions, webhook health and fill replay.
Live fill subscriptions, webhook health and fill replay.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/pmwallets-com:pmwallets-com-push-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PMWallets Push API
version: 1.0.0
summary: Polymarket wallet leaderboard, address unlocks, live fill subscriptions and trade-history exports.
description: 'PMWallets tracks every Polymarket fill on Polygon, groups wallets that belong together into **entities**, and ranks them by forward-only PnL over published windows (`30d`, `7d`; each recomputed about once a day). It sells three things: the **address** behind an entity, a **live stream of its fills** (billed per hour), and **per-wallet daily trade-history files**.
**Handles vs addresses.** An entity whose address you have not bought is named by a 12-character **handle** in `entityId` (Crockford base32, e.g. `7KQ2MF9X4B1C`) with a masked address in `label` (`0x4b96…984e`). After you unlock it (`POST /v1/account/reveals`), follow it, or unlock it from a plan, `entityId` and `label` are the full 0x address. Send handles back to every endpoint that takes an entity; a raw address is only accepted from a caller who already holds it. A masked label is never accepted.
**Money.** Prices are integer US cents. Charges come from the prepaid account balance (top-ups happen on https://pmwallets.com). Every charging call takes a ceiling (`maxPriceCents` / `maxCents`) and answers 409 instead of charging more. 402 means not enough balance; nothing was charged.
**Quotas.** A signed-in board read spends rows from a 20,000-row daily allowance (UTC day). Opening an entity page as a subscriber, unlocking, subscribing and exporting each spend one unit of a daily *distinct-entity* budget (50 by default, raised by plans); touching the same entity again that day is free. Over-limit answers are 403. Heavy reads are rate limited per account and per IP (429).
**Auth.** Send an API key `pmw__` in `x-api-key` (`Authorization: Bearer ` also works). Create keys at https://pmwallets.com/keys. A key can spend the balance but cannot manage keys, add/remove webhooks or change a card plan (session-only, not in this document). Without a key: the 20-row board sample, periods, plans, rate card, markets, latency and readiness.
**Live fills are not in this document.** They arrive over the WebSocket `wss://api.pmwallets.com/v1/ws` (send the key in `x-api-key`; one API connection per account, `?clientId=&takeover=1` replaces another) or as signed webhooks (see `webhooks.fill`; the endpoint is registered on the website). An agent without a long-running process can poll `GET /v1/account/fills` with the `next` cursor instead: same fills, same `eventId`, scoped to active subscriptions, retained 60 days.
**Units.** In fills, `usdc`, `shares` and `fee` are integer strings in 1e-6 units (`"1824000000"` = $1,824); `price` is a decimal string; `ts` is UTC `YYYY-MM-DD HH:MM:SS`. Board and entity figures (`realizedPnl`, `grossBuyUsdc`, …) are dollars as numbers.'
contact:
name: PMWallets
url: https://pmwallets.com
email: support@pmwallets.com
servers:
- url: https://api.pmwallets.com
description: Production
security:
- ApiKeyAuth: []
tags:
- name: Push
description: Live fill subscriptions, webhook health and fill replay.
paths:
/v1/account/subscriptions:
get:
operationId: listSubscriptions
tags:
- Push
summary: Your push subscriptions
security:
- ApiKeyAuth: []
description: Active and paused subscriptions, newest first, each with its entity's top categories and last fill. Canceled ones are not listed.
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Subscription'
'401':
$ref: '#/components/responses/Unauthorized'
post:
operationId: createSubscription
tags:
- Push
summary: Follow an entity (live fills)
security:
- ApiKeyAuth: []
description: Pushes the entity's fills to your WebSocket/webhook. Unlock its address first (402 address_not_unlocked). CHARGES 1 cent now for the first hour, then hourly until canceled (free within plan push slots). Spends 1 daily distinct-entity unit. Starts ~96 s (65 blocks) behind the head.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- entityId
properties:
entityId:
type: string
description: A 12-character entity handle (Crockford base32, e.g. 7KQ2MF9X4B1C) or a full 0x address (40 hex).
channels:
type: array
items:
type: string
enum:
- ws
- webhook
default:
- ws
description: Where to deliver. Default ["ws"].
acceptInactive:
type: boolean
description: Subscribe even if the entity has had no fill for 7 days (otherwise 409).
example:
entityId: '0x9d84ce0306f8551e02efef1680475fc0f1dc1344'
channels:
- ws
- webhook
responses:
'201':
description: Subscribed, first hour paid (HTTP 201). Hours with no feed are not charged; pauses when the balance runs out. At most 200 active.
content:
application/json:
schema:
$ref: '#/components/schemas/Subscription'
'400':
description: Bad entityId/channels, or 200 active subscriptions already.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
description: '`error: address_not_unlocked` (unlock it first), or not enough balance for the first hour (priceCentsPerHour, balanceCents). Nothing charged.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 402
message: insufficient balance for the first hour
priceCentsPerHour: 1
balanceCents: 0
'403':
description: Daily distinct-entity limit reached.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Entity is not in any published window.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: 'Dormant entity (resend with acceptInactive: true), already subscribed, a concurrent create, or the only channel is a missing/switched-off webhook. Nothing charged.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
description: Fill feed or chain head unavailable; nothing charged.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-requires-human-confirmation: true
/v1/account/subscriptions/{id}:
delete:
operationId: cancelSubscription
tags:
- Push
summary: Cancel a subscription
security:
- ApiKeyAuth: []
description: 'Stops delivery and hourly charging now. The hour already paid is not refunded. Final: subscribe again for a new one.'
parameters:
- name: id
in: path
required: true
description: Subscription id.
schema:
type: string
responses:
'200':
description: The subscription, status canceled.
content:
application/json:
schema:
$ref: '#/components/schemas/Subscription'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/v1/account/subscriptions/{id}/resume:
post:
operationId: resumeSubscription
tags:
- Push
summary: Resume a paused subscription
security:
- ApiKeyAuth: []
description: CHARGES THE BALANCE one hour at the subscription's own price and restarts delivery 65 blocks behind the head; the paused span is not backfilled. Idempotent under lock (a retry does not charge twice).
parameters:
- name: id
in: path
required: true
description: Subscription id.
schema:
type: string
responses:
'201':
description: Active again (HTTP 201).
content:
application/json:
schema:
$ref: '#/components/schemas/Subscription'
'400':
description: 200 active subscriptions already.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
description: 'Not enough balance for the hour, or `error: address_not_unlocked` (the address came from a plan that ended).'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: Canceled (subscribe again instead) or the only channel is a missing/switched-off webhook.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'503':
$ref: '#/components/responses/Unavailable'
x-requires-human-confirmation: true
/v1/account/webhooks:
get:
operationId: listWebhooks
tags:
- Push
summary: Your webhook endpoint and its health
security:
- ApiKeyAuth: []
description: The active webhook endpoint (at most one) with delivery health. With an API key the URL is reduced to its origin. Adding or removing endpoints is session-only (website).
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Webhook'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/account/webhooks/{id}/reactivate:
post:
operationId: reactivateWebhook
tags:
- Push
summary: Turn a switched-off webhook back on
security:
- ApiKeyAuth: []
description: Re-enables an endpoint switched off for failing, then resumes the subscriptions that were paused for it; each resumed one CHARGES ITS FIRST HOUR again. Safe to retry (no double charge). Fills missed while off are not re-sent.
parameters:
- name: id
in: path
required: true
description: Webhook endpoint id.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
reactivated:
type: boolean
description: false = it was already on.
resumed:
type: array
items:
type: string
notResumed:
type: array
items:
type: object
properties:
id:
type: string
reason:
type: string
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'503':
$ref: '#/components/responses/Unavailable'
x-requires-human-confirmation: true
/v1/account/deliveries:
get:
operationId: listDeliveries
tags:
- Push
summary: Your push deliveries, paged
security:
- ApiKeyAuth: []
description: Each fill pushed to you per channel, newest first, with status and timing.
parameters:
- name: limit
in: query
required: false
description: 1-200, default 30.
schema:
type: integer
minimum: 1
maximum: 200
default: 30
- name: cursor
in: query
required: false
description: '`next` from the previous page.'
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
entries:
type: array
items:
$ref: '#/components/schemas/Delivery'
next:
type:
- string
- 'null'
'400':
description: Bad cursor.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/account/delivery-stats:
get:
operationId: getDeliveryStats
tags:
- Push
summary: Your push latency and failures
security:
- ApiKeyAuth: []
description: 'Your own pushes over the window: count, failures, entities, detect→push p50/p95 seconds.'
parameters:
- name: hours
in: query
required: false
description: 1-720 (clamped), default 24.
schema:
type: integer
minimum: 1
maximum: 720
default: 24
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
hours:
type: integer
pushed:
type: integer
failed:
type: integer
entities:
type: integer
detectToPushSecP50:
type:
- number
- 'null'
detectToPushSecP95:
type:
- number
- 'null'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/account/fills:
get:
operationId: listFills
tags:
- Push
summary: Fills of followed entities after a cursor
security:
- ApiKeyAuth: []
description: 'Polling alternative to the WebSocket: fills of your active subscriptions after the cursor, oldest first. Start without a cursor, pass `next` back until null, store the last one. Free. Kept 60 days (truncated = part of the range is gone).'
parameters:
- name: sinceBlock
in: query
required: false
description: Cursor block (exclusive with sinceLogIndex). Default 0.
schema:
type: integer
minimum: 0
maximum: 4294967295
default: 0
- name: sinceLogIndex
in: query
required: false
description: Cursor log index. Default 0.
schema:
type: integer
minimum: 0
maximum: 4294967295
default: 0
- name: limit
in: query
required: false
description: 1-2000, default 500. Out of range → 400.
schema:
type: integer
minimum: 1
maximum: 2000
default: 500
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
rows:
type: array
items:
$ref: '#/components/schemas/Fill'
next:
type:
- object
- 'null'
properties:
sinceBlock:
type: integer
sinceLogIndex:
type: integer
description: Pass back as query params; null = caught up.
subscriptions:
type: integer
description: Active subscriptions in scope (0 = nothing to replay).
retainedFrom:
type: integer
description: Oldest block still kept (absent when subscriptions is 0).
truncated:
type: boolean
description: Part of the asked range is older than retention.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
webhooks:
fill:
post:
operationId: fillWebhook
tags:
- Push
summary: A fill of an entity you follow (sent to your endpoint)
description: 'We POST each fill of a subscription with the webhook channel to your registered endpoint. Verify `x-pmw-signature` = hex HMAC-SHA256(endpoint secret, raw body) before parsing. Answer 2xx only after storing it; anything else (or no answer within 5 s) is retried, 3 attempts in total. At-least-once: deduplicate on `data.eventId`.'
security: []
parameters:
- name: x-pmw-signature
in: header
required: true
description: Hex HMAC-SHA256 of the raw body with your endpoint secret.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- type
- data
properties:
type:
type: string
const: fill
data:
$ref: '#/components/schemas/PushedFill'
responses:
'200':
description: Stored; no retry.
components:
responses:
NotFound:
description: Not found (or not yours).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: No valid API key (missing, malformed, unknown or revoked).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 401
message: Unauthorized
BadRequest:
description: Invalid parameter or body; `message` names what was expected.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unavailable:
description: Temporarily unavailable; nothing was charged. Retry shortly.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
description: Error body. `message` is always present; machine-readable refusals add `error` (unlock, export, subscription paths) or `code` (plan paths) plus the figures the caller needs.
properties:
statusCode:
type: integer
message:
description: Human-readable reason (English).
oneOf:
- type: string
- type: array
items:
type: string
error:
type: string
description: Machine code, e.g. insufficient_balance, price_changed, not_unlocked, address_not_unlocked, entity_budget, not_sellable, plan_exhausted, no_plan.
code:
type: string
description: Machine code on plan endpoints, e.g. insufficient_balance, price_changed, card_active, already_queued, request_conflict.
required:
- message
additionalProperties: true
Fill:
type: object
description: One fill of an entity you subscribe to, as GET /v1/account/fills returns it (and the stream carries it).
properties:
eventId:
type: string
description: '`chain:block:blockHash:txHash:logIndex`; stable across retries and replays. Deduplicate on it.'
chain:
type: integer
description: 137 (Polygon).
entityId:
type: string
description: The subscribed entity (0x address).
wallet:
type: string
description: The address inside the entity that traded (0x).
ts:
type: string
description: Block time, UTC, `YYYY-MM-DD HH:MM:SS`.
block:
type: integer
blockHash:
type: string
txHash:
type: string
logIndex:
type: integer
exchange:
type: string
description: Which exchange contract matched it, e.g. pm_ctf_v2.
side:
type: string
enum:
- BUY
- SELL
role:
type: string
enum:
- maker
- taker
tokenId:
type: string
description: Polymarket outcome token id (uint256 as a decimal string).
price:
type: string
description: Decimal string, e.g. "0.570000".
shares:
type: string
description: Integer string, 1e-6 share units ("3200000000" = 3,200 shares).
usdc:
type: string
description: Integer string, 1e-6 USDC units ("1824000000" = $1,824).
fee:
type: string
description: Integer string, 1e-6 USDC units.
required:
- eventId
- chain
- entityId
- wallet
- ts
- block
- blockHash
- txHash
- logIndex
- exchange
- side
- role
- tokenId
- price
- shares
- usdc
- fee
Delivery:
type: object
properties:
id:
type: string
subscriptionId:
type: string
chain:
type: integer
block:
type: integer
blockHash:
type: string
txHash:
type: string
logIndex:
type: integer
channel:
type: string
enum:
- webhook
- ws
tBlock:
type: string
format: date-time
tDetect:
type: string
format: date-time
tPush:
type: string
format: date-time
tDelivered:
type:
- string
- 'null'
format: date-time
status:
type: string
enum:
- pending
- attempted
- sent
- delivered
- skipped
- failed
- dead
attempts:
type: integer
error:
type:
- string
- 'null'
Webhook:
type: object
properties:
id:
type: string
url:
type: string
description: With an API key only the origin is returned (`https://host/…`).
active:
type: boolean
createdAt:
type: string
format: date-time
lastOkAt:
type:
- string
- 'null'
format: date-time
lastError:
type:
- string
- 'null'
failingSince:
type:
- string
- 'null'
format: date-time
consecutiveFailures:
type: integer
disabledAt:
type:
- string
- 'null'
format: date-time
description: Set when switched off after failing >=24h and >=20 times; reactivate to resume.
disabledReason:
type:
- string
- 'null'
PushedFill:
description: 'A fill as pushed (WebSocket frame `data`, webhook body `data`): the Fill fields plus our timestamps and, when known, the market.'
allOf:
- $ref: '#/components/schemas/Fill'
- type: object
properties:
tDetect:
type: string
format: date-time
description: When we saw the fill.
tPush:
type: string
format: date-time
description: When we sent it.
marketTitle:
type: string
description: Market question; absent when not yet known.
conditionId:
type: string
description: Market condition id; absent when not yet known.
required:
- tDetect
- tPush
Subscription:
type: object
properties:
id:
type: string
userId:
type: string
chain:
type: integer
entityId:
type: string
description: The 0x address once paid for and still held; a handle otherwise (never-charged or plan-locked rows).
label:
type: string
channels:
type: array
items:
type: string
enum:
- ws
- webhook
status:
type: string
enum:
- active
- paused
- canceled
pausedReason:
type:
- string
- 'null'
description: e.g. insufficient_balance, webhook_disabled, no_webhook, plan_ended, plan_limit, address_locked.
fromBlock:
type: integer
description: Fills strictly after this block are delivered.
syncedBlock:
type: integer
tier:
type: string
priceCents:
type: integer
description: Hourly price frozen on the subscription.
billedThrough:
type:
- string
- 'null'
format: date-time
description: Prepaid up to here.
planCovered:
type: boolean
description: The last billed hour was covered by a plan push slot (free).
activations:
type: integer
createdAt:
type: string
format: date-time
canceledAt:
type:
- string
- 'null'
format: date-time
followedAt:
type:
- string
- 'null'
format: date-time
categories:
type: array
description: List endpoint only.
items:
type: object
properties:
category:
type: string
share:
type: number
lastFillTs:
type:
- string
- 'null'
description: List endpoint only.
fills24h:
type:
- integer
- 'null'
description: List endpoint only.
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: 'API key `pmw_<12 hex>_<64 hex>` from https://pmwallets.com/keys. `Authorization: Bearer <key>` is accepted too.'