openapi: 3.2.0 info: title: MoltGuard Prediction Markets API version: 1.5.0 description: 'Trust & Integrity Service for the x402 Agent Economy. Sub-API of MolTrust Trust Registry (api.moltrust.ch). See also: https://api.moltrust.ch/openapi.json (parent service).' contact: name: CryptoKRI GmbH url: https://moltrust.ch license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0 servers: - url: https://api.moltrust.ch/guard description: Production security: [] tags: - name: prediction-markets description: Wallet-link + leaderboard + PredictionTrackCredential paths: /prediction/integrity/{market_id}: get: tags: - prediction-markets summary: Prediction-market integrity check (paid) description: Polymarket/Kalshi market integrity — outcome anomalies, oracle drift, statistical irregularities. Prefix-matched in x402-prices. operationId: getPredictionIntegrity security: - x402: [] x-moltrust-pricing: amount: '0.10' currency: USDC chain: eip155:8453 parameters: - name: market_id in: path required: true schema: type: string responses: '200': description: Integrity result content: application/json: schema: $ref: '#/components/schemas/PredictionIntegrity' '402': description: x402 payment required content: application/json: schema: $ref: '#/components/schemas/PaymentRequired' /prediction/leaderboard: get: tags: - prediction-markets summary: Prediction track leaderboard (free) operationId: getPredictionLeaderboard responses: '200': description: Leaderboard content: application/json: schema: $ref: '#/components/schemas/PredictionLeaderboard' /prediction/wallet-link: post: tags: - prediction-markets summary: Link an EVM wallet to a DID for prediction-track attribution operationId: linkPredictionWallet requestBody: required: true content: application/json: schema: type: object additionalProperties: true responses: '200': description: Linked content: application/json: schema: $ref: '#/components/schemas/PredictionWalletLink' /prediction/wallet/{address}: get: tags: - prediction-markets summary: Look up wallet → DID linkage operationId: getPredictionWallet parameters: - name: address in: path required: true schema: type: string pattern: ^0x[a-fA-F0-9]{40}$ responses: '200': description: Wallet info content: application/json: schema: $ref: '#/components/schemas/PredictionWalletInfo' /radar/clusters: get: tags: - prediction-markets summary: Single-operator prediction-market clusters (signed) description: 'MoltRadar: prediction markets where the ERC-8004-identified wallets (the identity-carrying subset, NOT total holders) resolve to a single on-chain operator. Fields: identifiedWallets, distinctOperators, netDirection/netSize, concentration. EdDSA-JWS signed — verify against did:web:moltrust.ch#moltguard-key-1 (JWKS at /.well-known/jwks.json). Free (in X402_FREE_PATHS).' operationId: getRadarClusters parameters: - name: limit in: query schema: type: integer default: 20 maximum: 100 - name: min_wallets in: query schema: type: integer default: 5 - name: sort in: query schema: type: string enum: - wallets - net - value default: wallets - name: open_only in: query schema: type: boolean default: true responses: '200': description: Signed operator-cluster feed content: application/json: schema: type: object /radar/operators: get: tags: - prediction-markets summary: Operator ranking (signed) description: 'MoltRadar: on-chain operators ranked by number of prediction markets and identified-wallet count. Same EdDSA-JWS signing as /radar/clusters (key did:web:moltrust.ch#moltguard-key-1). Free.' operationId: getRadarOperators responses: '200': description: Operator ranking content: application/json: schema: type: object /radar/market/{id}: get: tags: - prediction-markets summary: Full operator decomposition for one market (paid) description: 'MoltRadar: every ERC-8004-identified wallet on one market, its resolved on-chain operator, plus the dominant operator and its net side/size.' operationId: getRadarMarketPaid security: - x402: [] x-moltrust-pricing: amount: '0.05' currency: USDC chain: eip155:8453 parameters: - name: id in: path required: true schema: type: string responses: '200': description: Operator decomposition content: application/json: schema: type: object '402': description: x402 payment required content: application/json: schema: $ref: '#/components/schemas/PaymentRequired' /vc/prediction/issue: post: tags: - prediction-markets summary: Issue a PredictionTrackCredential (paid) operationId: issuePredictionVC security: - x402: [] x-moltrust-pricing: amount: '5.00' currency: USDC chain: eip155:8453 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VCIssueRequestBase' responses: '200': description: Issued VC content: application/json: schema: $ref: '#/components/schemas/PredictionTrackCredential' '402': description: x402 payment required content: application/json: schema: $ref: '#/components/schemas/PaymentRequired' components: schemas: PredictionLeaderboard: type: array items: type: object additionalProperties: true properties: did: type: string score: type: number rank: type: integer PredictionWalletLink: type: object additionalProperties: true properties: ok: type: boolean did: type: string address: type: string PredictionWalletInfo: type: object additionalProperties: true properties: address: type: string linkedDid: type: - string - 'null' PredictionIntegrity: type: object additionalProperties: true properties: marketId: type: string integrityScore: type: integer flags: type: array items: type: string VCIssueRequestBase: type: object description: Base body for a VC issuance request. Specific VC types extend with type-specific fields. additionalProperties: true PaymentRequired: type: object description: x402 v2 challenge body. Returned with HTTP 402 when X-PAYMENT header is missing or invalid. properties: x402: type: object properties: version: type: integer example: 2 accepts: type: array items: type: object properties: scheme: type: string example: exact network: type: string example: base maxAmountRequired: type: object properties: asset: type: string example: USDC amount: type: string description: USDC base units (6 decimals) payTo: type: string PredictionTrackCredential: type: object additionalProperties: true description: Issued PredictionTrackCredential (W3C VC) — wallet-DID bridge with on-chain track record. securitySchemes: x402: type: apiKey in: header name: X-PAYMENT description: 'x402 v2 payment receipt header. Format: "x402 ". See https://x402.org/writing/x402-v2-launch.'