{
  "openapi": "3.1.0",
  "info": {
    "title": "Norynta Agent API",
    "version": "2026-07-15",
    "description": "Machine-readable contract for bot, agent, and trading-facing endpoints."
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "paths": {
    "/api/events": {
      "get": {
        "operationId": "get_api_events",
        "summary": "List events with volume-sorted defaults and cursor pagination.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeEmptyV2",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeStale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "staleDays",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ]
      }
    },
    "/api/events/health": {
      "get": {
        "operationId": "get_api_events_health",
        "summary": "Health metrics for bots: volume, open orders, last trade time, tradability, and market quality.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeStale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "staleDays",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minVolumeUsd",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minOpenOrders",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/snapshots": {
      "post": {
        "operationId": "post_api_events_snapshots",
        "summary": "Bulk snapshots for many events.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_api_events_snapshots",
        "summary": "Bulk snapshots for many events via query params.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "slugs",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "eventPubkeys",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/bot-snapshot": {
      "post": {
        "operationId": "post_api_events_botsnapshot",
        "summary": "Bulk snapshots with ranking for bots.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/events/top": {
      "get": {
        "operationId": "get_api_events_top",
        "summary": "Ranked top markets for ops dashboards with tradability and market quality signals.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/{slug}/history": {
      "get": {
        "operationId": "get_api_events_slug_history",
        "summary": "Public probability history with period summary and largest observed moves for an event outcome.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeIndex",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sportsMarket",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "timeframe",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/markets/{id}/history": {
      "get": {
        "operationId": "get_api_markets_id_history",
        "summary": "Public legacy-market probability history with period summary and largest observed moves.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "timeframe",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/intelligence/arbitrage": {
      "get": {
        "operationId": "get_api_intelligence_arbitrage",
        "summary": "Conservatively matched public Polymarket and Kalshi snapshots with indicative prices and settlement-term comparison.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minSimilarity",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "upstreamLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/intelligence/catalysts": {
      "get": {
        "operationId": "get_api_intelligence_catalysts",
        "summary": "Recent related coverage for a market query, explicitly labeled as context rather than proven price causation.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/intelligence/widget/{slug}": {
      "get": {
        "operationId": "get_api_intelligence_widget_slug",
        "summary": "Public cacheable market outcome and probability data for Norynta embed widgets.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeIndex",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/data/market-intelligence": {
      "get": {
        "operationId": "get_api_data_marketintelligence",
        "summary": "Ranked aggregated market intelligence for partners, quants, and analytics consumers.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "competitive",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minVolumeUsd",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, or invalid agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated agent credential lacks endpoint entitlement",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer insufficient-scope challenge metadata",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/data/signals": {
      "get": {
        "operationId": "get_api_data_signals",
        "summary": "Premium derived trading signals built from Norynta liquidity, activity, and outcome-conviction analytics.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minVolumeUsd",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "signalType",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, or invalid agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated agent credential lacks endpoint entitlement",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer insufficient-scope challenge metadata",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/data/market-intelligence/history": {
      "get": {
        "operationId": "get_api_data_marketintelligence_history",
        "summary": "Premium historical time-series for a market outcome.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "slug",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeIndex",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "timeframe",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "metric",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, or invalid agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated agent credential lacks endpoint entitlement",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer insufficient-scope challenge metadata",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/data/trades": {
      "get": {
        "operationId": "get_api_data_trades",
        "summary": "Normalized historical trade export by market or public wallet address.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "user",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "market",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, or invalid agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated agent credential lacks endpoint entitlement",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer insufficient-scope challenge metadata",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/data/positions": {
      "get": {
        "operationId": "get_api_data_positions",
        "summary": "Normalized public wallet position export computed from public trade history.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "user",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tradeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed, or invalid agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated agent credential lacks endpoint entitlement",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer insufficient-scope challenge metadata",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/bot/config": {
      "get": {
        "operationId": "get_api_bot_config",
        "summary": "Recommended bot polling and guardrails.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotConfigResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/international/access": {
      "get": {
        "operationId": "get_api_international_access",
        "summary": "Return detected country source, read-only availability, real-money access booleans, and English-only language policy.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternationalAccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sports/catalog": {
      "get": {
        "operationId": "get_api_sports_catalog",
        "summary": "Canonical sports and league catalog with resolution metadata for bots and agents.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sports/feed": {
      "get": {
        "operationId": "get_api_sports_feed",
        "summary": "Normalized sports status/results with optional odds and line-history points.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "league",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sport",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeStale",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ]
      }
    },
    "/api/sports/lines/history": {
      "get": {
        "operationId": "get_api_sports_lines_history",
        "summary": "Line/odds history points for graphing and bot analysis.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "sourceEventId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "market",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sports/metrics": {
      "get": {
        "operationId": "get_api_sports_metrics",
        "summary": "Aggregate sports data quality metrics (stale, confidence, review-required, outliers).",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sport",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "league",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/bot/strategies": {
      "get": {
        "operationId": "get_api_bot_strategies",
        "summary": "Strategy presets and ranked recommendations for target events.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "slugs",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "eventPubkeys",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_api_bot_strategies",
        "summary": "Strategy presets and ranked recommendations for target events.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/agent/access": {
      "get": {
        "operationId": "get_api_agent_access",
        "summary": "Authenticate agent API key and return discovery metadata.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentAccessResponse"
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ]
      }
    },
    "/api/agent/card": {
      "get": {
        "operationId": "get_api_agent_card",
        "summary": "A2A-compatible agent card with capabilities and operation map.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent.json": {
      "get": {
        "operationId": "get_wellknown_agentjson",
        "summary": "Well-known A2A card endpoint for agent discovery.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "operationId": "get_api_search",
        "summary": "Machine-friendly keyword lookup for events.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ]
      }
    },
    "/api/users/{id}/deposit-address": {
      "get": {
        "operationId": "get_api_users_id_depositaddress",
        "summary": "Resolve deterministic user deposit vault address.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{id}/deposits": {
      "get": {
        "operationId": "get_api_users_id_deposits",
        "summary": "List authenticated user's tracked deposits.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{id}/withdrawals": {
      "get": {
        "operationId": "get_api_users_id_withdrawals",
        "summary": "List authenticated user's tracked withdrawals.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_api_users_id_withdrawals",
        "summary": "Track an authenticated user withdrawal transaction.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/users/{id}/trades": {
      "get": {
        "operationId": "get_api_users_id_trades",
        "summary": "List authenticated user's trade history.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{id}/positions": {
      "get": {
        "operationId": "get_api_users_id_positions",
        "summary": "List authenticated user's open and resolved positions.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/balance": {
      "get": {
        "operationId": "get_api_account_balance",
        "summary": "Read signed account cash balance summary for a public key.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "publicKey",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "nonce",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "domain",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cluster",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expiresAt",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/transactions": {
      "get": {
        "operationId": "get_api_account_transactions",
        "summary": "Read signed account transaction feed for a public key.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "publicKey",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "nonce",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "domain",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cluster",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expiresAt",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/bridge/supported-assets": {
      "get": {
        "operationId": "get_api_bridge_supportedassets",
        "summary": "List allowed bridge assets and destination routing metadata.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "originChainId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "destinationChainId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/bridge/users/{id}/deposit-address": {
      "get": {
        "operationId": "get_api_bridge_users_id_depositaddress",
        "summary": "Get bridge deposit address and quote steps for a user.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "chain",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "asset",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tokenAddress",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/bridge/users/{id}/withdraw-address": {
      "get": {
        "operationId": "get_api_bridge_users_id_withdrawaddress",
        "summary": "Get bridge withdraw execution address for a user.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "chain",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "asset",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "recipient",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tokenAddress",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/moonpay/signed-url": {
      "get": {
        "operationId": "get_api_moonpay_signedurl",
        "summary": "Create signed third-party onramp URL.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "walletAddress",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "baseCurrencyCode",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "baseCurrencyAmount",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "externalTransactionId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/deposit-options": {
      "get": {
        "operationId": "get_api_depositoptions",
        "summary": "List fiat onramp and transfer deposit options for user locale.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/health-snapshots": {
      "post": {
        "operationId": "post_api_events_healthsnapshots",
        "summary": "Combined health + snapshots for bots.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "healthLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minVolumeUsd",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minOpenOrders",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_api_events_healthsnapshots",
        "summary": "Combined health + snapshots for bots (cacheable).",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "slugs",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "eventPubkeys",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "healthLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minVolumeUsd",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "minOpenOrders",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/{slug}/activity": {
      "get": {
        "operationId": "get_api_events_slug_activity",
        "summary": "Recent trades for an event.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/{slug}/health": {
      "get": {
        "operationId": "get_api_events_slug_health",
        "summary": "Health metrics for a single event, including tradability and market quality.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeStale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "staleDays",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/{slug}/stream": {
      "get": {
        "operationId": "get_api_events_slug_stream",
        "summary": "SSE stream of trades and optional orderbook top-of-book.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "intervalMs",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeOrderbook",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeIndex",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/{slug}/snapshot": {
      "get": {
        "operationId": "get_api_events_slug_snapshot",
        "summary": "Unified bot snapshot with health, best bid/ask for outcomes, tradability, and market quality.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lookbackHours",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeResolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeLimit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/{slug}/orderbook/stream": {
      "get": {
        "operationId": "get_api_events_slug_orderbook_stream",
        "summary": "SSE stream with full orderbook snapshots and deltas for one outcome.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeIndex",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "intervalMs",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "snapshotEvery",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/orderbook": {
      "get": {
        "operationId": "get_api_clob_v2_orderbook",
        "summary": "Top-of-book for a specific event outcome.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "eventPubkey",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeIndex",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "depth",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/orders": {
      "post": {
        "operationId": "post_api_clob_v2_orders",
        "summary": "Submit signed limit orders.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_api_clob_v2_orders",
        "summary": "Cancel one or many signed orders by id.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/orders/batch": {
      "post": {
        "operationId": "post_api_clob_v2_orders_batch",
        "summary": "Submit many signed limit orders in one request.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/cancel": {
      "post": {
        "operationId": "post_api_clob_v2_cancel",
        "summary": "Cancel one signed order.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/cancel-all": {
      "post": {
        "operationId": "post_api_clob_v2_cancelall",
        "summary": "Set per-user min nonce and cancel older open orders.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_api_clob_v2_cancelall",
        "summary": "Cancel all currently open signed orders for a user.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/cancel-market-orders": {
      "delete": {
        "operationId": "delete_api_clob_v2_cancelmarketorders",
        "summary": "Cancel open signed orders for a market or market outcome.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/rfq/quote": {
      "post": {
        "operationId": "post_api_clob_v2_rfq_quote",
        "summary": "Request a signed maker quote for immediate execution.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/rfq/accept": {
      "post": {
        "operationId": "post_api_clob_v2_rfq_accept",
        "summary": "Accept a signed RFQ quote and place maker/taker orders.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/simulate": {
      "post": {
        "operationId": "post_api_clob_v2_simulate",
        "summary": "Disabled order simulation endpoint. Returns 410 SIMULATION_DISABLED.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/my-orders": {
      "post": {
        "operationId": "post_api_clob_v2_myorders",
        "summary": "List authenticated user's open signed orders.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Malformed or invalid optional agent credential",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer authentication challenge. Prefer Authorization: Bearer <token>; x-api-key remains supported for backward compatibility.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/data/orders": {
      "get": {
        "operationId": "get_api_clob_v2_data_orders",
        "summary": "Query order records by id, market, or owner filters.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "market",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "owner",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "asset_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcomeIndex",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "outcome_index",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/order-scoring": {
      "get": {
        "operationId": "get_api_clob_v2_orderscoring",
        "summary": "Get scoring data for one order.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "order_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "orderId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/clob/v2/orders-scoring": {
      "post": {
        "operationId": "post_api_clob_v2_ordersscoring",
        "summary": "Get scoring data for many orders.",
        "tags": [
          "Agent API"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/admin/ledger/by-source": {
      "get": {
        "operationId": "get_api_admin_ledger_bysource",
        "summary": "Admin ledger drilldown by sourceType/sourceId.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "sourceType",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sourceId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/ledger/failures": {
      "get": {
        "operationId": "get_api_admin_ledger_failures",
        "summary": "Admin ledger posting failure feed with optional filters.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sourceType",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sourceId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "component",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "unresolved",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/reconciliation/banking": {
      "get": {
        "operationId": "get_api_admin_reconciliation_banking",
        "summary": "Admin banking reconciliation mismatch summary.",
        "tags": [
          "Agent API"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "opaque-or-jwt",
        "description": "Preferred agent authentication. Use Authorization: Bearer <token>."
      },
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Legacy/backward-compatible agent credential header."
      }
    },
    "schemas": {
      "AgentApiKeyAuth": {
        "type": "object",
        "required": [
          "enabled",
          "keyId",
          "header",
          "bearerSupported"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "keyId": {
            "type": [
              "string",
              "null"
            ]
          },
          "header": {
            "type": "string"
          },
          "bearerSupported": {
            "type": "boolean"
          },
          "preferredAuthorizationScheme": {
            "type": "string"
          },
          "hashingSupported": {
            "type": "boolean"
          },
          "hashedKeyCount": {
            "type": [
              "number",
              "null"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "AgentProfile": {
        "type": "object",
        "properties": {
          "operatorName": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategyType": {
            "type": [
              "string",
              "null"
            ]
          },
          "riskTier": {
            "type": [
              "string",
              "null"
            ]
          },
          "feeTier": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "AgentQuotaProfile": {
        "type": "object",
        "properties": {
          "readsPerMinute": {
            "type": [
              "number",
              "null"
            ]
          },
          "writesPerMinute": {
            "type": [
              "number",
              "null"
            ]
          },
          "burst": {
            "type": [
              "number",
              "null"
            ]
          },
          "windowSeconds": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "AgentPolicy": {
        "type": "object",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedEndpoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedProducts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "quotaProfile": {
            "$ref": "#/components/schemas/AgentQuotaProfile"
          }
        },
        "additionalProperties": true
      },
      "AgentMetadata": {
        "type": "object",
        "required": [
          "keyId",
          "customerId",
          "plan",
          "rateTier",
          "delaySeconds",
          "profile",
          "policy"
        ],
        "properties": {
          "keyId": {
            "type": [
              "string",
              "null"
            ]
          },
          "customerId": {
            "type": [
              "string",
              "null"
            ]
          },
          "plan": {
            "type": [
              "string",
              "null"
            ]
          },
          "rateTier": {
            "type": [
              "string",
              "null"
            ]
          },
          "delaySeconds": {
            "type": "number"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "profile": {
            "$ref": "#/components/schemas/AgentProfile"
          },
          "policy": {
            "$ref": "#/components/schemas/AgentPolicy"
          }
        },
        "additionalProperties": true
      },
      "AgentAccessResponse": {
        "type": "object",
        "required": [
          "ok",
          "authenticated",
          "apiKey"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "authenticated": {
            "type": "boolean"
          },
          "apiKey": {
            "$ref": "#/components/schemas/AgentApiKeyAuth"
          },
          "agent": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "sdk": {
            "type": "object",
            "additionalProperties": true
          },
          "mcp": {
            "type": [
              "array",
              "object"
            ],
            "items": {
              "type": "string"
            },
            "additionalProperties": true
          },
          "mcpServers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "endpoints": {
            "type": "object",
            "additionalProperties": true
          },
          "discovery": {
            "type": "object",
            "additionalProperties": true
          },
          "protocols": {
            "type": "object",
            "additionalProperties": true
          },
          "execution": {
            "type": "object",
            "additionalProperties": true
          },
          "payments": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "BotConfigAuthApiKey": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "requiredWhenEnabled": {
            "type": "boolean"
          },
          "header": {
            "type": "string"
          },
          "bearerSupported": {
            "type": "boolean"
          },
          "preferredAuthorizationScheme": {
            "type": "string"
          },
          "hashingSupported": {
            "type": "boolean"
          },
          "hashedKeyCount": {
            "type": "number"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "profileFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "policyFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "BotConfigAgentIdentity": {
        "type": "object",
        "properties": {
          "supported": {
            "type": "boolean"
          },
          "profile": {
            "type": "object",
            "properties": {
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "knownStrategyTypes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "knownRiskTiers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "knownFeeTiers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": true
          },
          "policy": {
            "type": "object",
            "properties": {
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "knownScopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "knownFeatures": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "quotaProfile": {
                "type": "object",
                "properties": {
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "BotConfigDocument": {
        "type": "object",
        "properties": {
          "auth": {
            "type": "object",
            "properties": {
              "apiKey": {
                "$ref": "#/components/schemas/BotConfigAuthApiKey"
              }
            },
            "additionalProperties": true
          },
          "agentIdentity": {
            "$ref": "#/components/schemas/BotConfigAgentIdentity"
          }
        },
        "additionalProperties": true
      },
      "BotConfigResponse": {
        "type": "object",
        "required": [
          "ok",
          "config",
          "signature",
          "signedAt",
          "signatureVersion"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "config": {
            "$ref": "#/components/schemas/BotConfigDocument"
          },
          "signature": {
            "type": [
              "string",
              "null"
            ]
          },
          "signedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "signatureVersion": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "ApiError": {
        "type": "object",
        "required": [
          "ok",
          "error",
          "message",
          "code",
          "retryable"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "hint": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      }
    }
  }
}
