Stop a market's order-book recording

Remove your order-book recording subscription.

DELETE /subscriptions/{id}

Remove your subscription when you no longer need future snapshots. This ends your recording window. Snapshots captured during that window remain readable within retention. Other customers' subscriptions can keep the recorder running, but do not extend your access window.

Authentication

Send your key in the X-API-Key header. Keep the key out of URLs and shared logs.

Parameters

NameLocationTypeRequiredDetails
idpathstringYes minLength: 1. maxLength: 160. pattern: ^[A-Za-z0-9_.-]+$.

Example request

curl --fail-with-body -X DELETE \
  "https://polymarket.omray.dev/subscriptions/YOUR_WALLET_OR_MARKET_ID" \
  -H "X-API-Key: $PM_API_KEY"

Responses

StatusMeaning
200Successful Response
422Validation Error

Authenticated requests can return 401 for an invalid key or 429 when a plan limit is reached. Upstream failures may return a server error; do not treat an error as an empty dataset.

OpenAPI operation schema
{
  "tags": [
    "Subscriptions"
  ],
  "summary": "Stop recording a subscribed market",
  "operationId": "unsubscribe_book",
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 160,
        "pattern": "^[A-Za-z0-9_.-]+$",
        "title": "Id"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Subscription"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  }
}