{
  "openapi": "3.1.0",
  "info": {
    "title": "OyaPicks Prediction Market Data",
    "version": "1.0.0",
    "description": "Pay-per-request prediction market data for AI agents. Normalized live markets from Polymarket and Alpha Arcade: prices, volume, movers, arbitrage gaps, resolutions, and price history. Backed by a public verifiable betting track record at https://oyapicks.app/track.",
    "x-guidance": "All endpoints are GET and return JSON, priced $0.01-$0.25 in USDC on Base (eip155:8453) via x402. Start with GET /api/x402/single-market?q=<keyword> - the cheapest primitive, returning the one highest-volume live market matching a keyword. Use /api/x402/search?q= for a full result list, /api/x402/probability-history?q= for one market's price over time, and the no-parameter endpoints (movers, volume-spikes, closing-soon, new-markets, resolutions, arbitrage, analyze) for market-wide scans. Venue values are 'polymarket' or 'alpha_arcade'. Prices are implied probability 0..1, also given as whole percent.",
    "contact": {
      "email": "oyapicks@gmail.com"
    }
  },
  "servers": [
    {
      "url": "https://oyapicks.app"
    }
  ],
  "paths": {
    "/api/x402/analyze": {
      "get": {
        "operationId": "topMarkets",
        "summary": "Top markets - highest 24h volume across venues",
        "description": "OyaPicks: top 3 prediction markets by 24h volume, with prices",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.250000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "markets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "market": {
                            "type": "string",
                            "description": "The market question"
                          },
                          "venue": {
                            "type": "string",
                            "description": "polymarket or alpha_arcade"
                          },
                          "impliedProbability": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "YES price, 0..1"
                          },
                          "impliedProbabilityPct": {
                            "type": "integer",
                            "description": "YES price as whole percent"
                          },
                          "volume24hUsd": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "24h traded volume in USD"
                          },
                          "endDate": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 8601 resolution date"
                          },
                          "read": {
                            "type": "string",
                            "description": "Plain-language summary of the price"
                          }
                        },
                        "required": [
                          "market",
                          "venue",
                          "impliedProbability",
                          "impliedProbabilityPct"
                        ]
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "count",
                    "markets"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/api/x402/arbitrage": {
      "get": {
        "operationId": "arbitrage",
        "summary": "Arbitrage - same outcome priced differently across venues",
        "description": "OyaPicks: live prediction-market data across Polymarket and Alpha Arcade, including cross-venue arbitrage gaps where the same outcome is priced differently.",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "note": {
                      "type": "string",
                      "description": "Present when no signals were found"
                    },
                    "signals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "event": {
                            "type": "string"
                          },
                          "polymarket": {
                            "type": "object",
                            "properties": {
                              "question": {
                                "type": "string"
                              },
                              "price": {
                                "type": "number"
                              }
                            }
                          },
                          "alphaArcade": {
                            "type": "object",
                            "properties": {
                              "question": {
                                "type": "string"
                              },
                              "price": {
                                "type": "number"
                              }
                            }
                          },
                          "gap": {
                            "type": "number",
                            "description": "Absolute price difference, 0..1"
                          },
                          "gapPct": {
                            "type": "number",
                            "description": "Gap in percentage points"
                          },
                          "cheaperYesOn": {
                            "type": "string",
                            "enum": [
                              "polymarket",
                              "alpha_arcade"
                            ]
                          }
                        }
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "count",
                    "signals"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/api/x402/closing-soon": {
      "get": {
        "operationId": "closingSoon",
        "summary": "Closing soon - markets resolving in the next 48 hours",
        "description": "OyaPicks: prediction markets resolving in the next 48 hours",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "windowHours": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "markets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "market": {
                            "type": "string",
                            "description": "The market question"
                          },
                          "venue": {
                            "type": "string",
                            "description": "polymarket or alpha_arcade"
                          },
                          "impliedProbability": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "YES price, 0..1"
                          },
                          "impliedProbabilityPct": {
                            "type": "integer",
                            "description": "YES price as whole percent"
                          },
                          "volume24hUsd": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "24h traded volume in USD"
                          },
                          "endDate": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 8601 resolution date"
                          }
                        },
                        "required": [
                          "market",
                          "venue",
                          "impliedProbability",
                          "impliedProbabilityPct"
                        ]
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "windowHours",
                    "count",
                    "markets"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/api/x402/movers": {
      "get": {
        "operationId": "movers",
        "summary": "Movers - biggest probability swings between snapshots",
        "description": "OyaPicks: biggest prediction-market probability swings (movers)",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.030000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "movers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "venue": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string"
                          },
                          "oldPrice": {
                            "type": "number"
                          },
                          "newPrice": {
                            "type": "number"
                          },
                          "change": {
                            "type": "number",
                            "description": "Signed, in probability 0..1"
                          },
                          "changePct": {
                            "type": "number",
                            "description": "Signed, in percentage points"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "up",
                              "down"
                            ]
                          }
                        }
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "count",
                    "movers"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/api/x402/new-markets": {
      "get": {
        "operationId": "newMarkets",
        "summary": "New markets - listed since the previous snapshot",
        "description": "OyaPicks: prediction markets newly listed since the last snapshot",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.030000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "note": {
                      "type": "string",
                      "description": "Present when there are no new markets"
                    },
                    "markets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "market": {
                            "type": "string",
                            "description": "The market question"
                          },
                          "venue": {
                            "type": "string",
                            "description": "polymarket or alpha_arcade"
                          },
                          "impliedProbability": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "YES price, 0..1"
                          },
                          "impliedProbabilityPct": {
                            "type": "integer",
                            "description": "YES price as whole percent"
                          },
                          "volume24hUsd": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "24h traded volume in USD"
                          },
                          "endDate": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 8601 resolution date"
                          }
                        },
                        "required": [
                          "market",
                          "venue",
                          "impliedProbability",
                          "impliedProbabilityPct"
                        ]
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "count",
                    "markets"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/api/x402/probability-history": {
      "get": {
        "operationId": "probabilityHistory",
        "summary": "Probability history - one market's price over time",
        "description": "OyaPicks: a prediction market's probability (price) over time",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.030000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "query": {
                      "type": "string"
                    },
                    "market": {
                      "type": "string"
                    },
                    "venue": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "points": {
                      "type": "array",
                      "description": "Chronological, oldest first",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "string",
                            "description": "ISO 8601 timestamp"
                          },
                          "price": {
                            "type": "number",
                            "description": "0..1"
                          },
                          "pricePct": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "query",
                    "market",
                    "venue",
                    "count",
                    "points"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Keyword(s) identifying the market",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "world cup"
          }
        ]
      }
    },
    "/api/x402/resolutions": {
      "get": {
        "operationId": "resolutions",
        "summary": "Resolutions - recently resolved markets and winning outcomes",
        "description": "OyaPicks: recently resolved prediction markets and their winning outcome",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.030000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "resolutions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "venue": {
                            "type": "string"
                          },
                          "market": {
                            "type": "string"
                          },
                          "winningOutcome": {
                            "type": "string"
                          },
                          "resolvedAt": {
                            "type": "string",
                            "description": "ISO 8601 timestamp"
                          },
                          "volumeUsd": {
                            "type": [
                              "number",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "count",
                    "resolutions"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/api/x402/search": {
      "get": {
        "operationId": "search",
        "summary": "Search - keyword search of live markets with prices",
        "description": "OyaPicks: keyword search of live prediction markets with prices",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "query": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "market": {
                            "type": "string",
                            "description": "The market question"
                          },
                          "venue": {
                            "type": "string",
                            "description": "polymarket or alpha_arcade"
                          },
                          "impliedProbability": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "YES price, 0..1"
                          },
                          "impliedProbabilityPct": {
                            "type": "integer",
                            "description": "YES price as whole percent"
                          },
                          "volume24hUsd": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "24h traded volume in USD"
                          },
                          "endDate": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 8601 resolution date"
                          }
                        },
                        "required": [
                          "market",
                          "venue",
                          "impliedProbability",
                          "impliedProbabilityPct"
                        ]
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "query",
                    "count",
                    "results"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Keyword(s) identifying the market",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "world cup"
          }
        ]
      }
    },
    "/api/x402/single-market": {
      "get": {
        "operationId": "singleMarket",
        "summary": "Single market - the one highest-volume match for a keyword",
        "description": "One prediction market by keyword: the single highest-volume live match, with venue, implied probability, 24h USD volume, and end date. Pass ?q=.",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "query": {
                      "type": "string"
                    },
                    "found": {
                      "type": "boolean"
                    },
                    "market": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "question": {
                          "type": "string"
                        },
                        "venue": {
                          "type": "string"
                        },
                        "impliedProbability": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "impliedProbabilityPct": {
                          "type": "integer"
                        },
                        "volume24hUsd": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "endDate": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "query",
                    "found",
                    "market"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Keyword(s) identifying the market",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "world cup"
          }
        ]
      }
    },
    "/api/x402/volume-spikes": {
      "get": {
        "operationId": "volumeSpikes",
        "summary": "Volume spikes - biggest 24h trading-volume jumps",
        "description": "OyaPicks: prediction markets with the biggest 24h trading-volume spikes",
        "tags": [
          "Prediction Markets"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.030000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "spikes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "venue": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string"
                          },
                          "oldVolume24h": {
                            "type": "number"
                          },
                          "newVolume24h": {
                            "type": "number"
                          },
                          "multiple": {
                            "type": "number",
                            "description": "newVolume / oldVolume"
                          },
                          "changePct": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "disclaimer": {
                      "type": "string",
                      "description": "Informational only. Not financial advice."
                    }
                  },
                  "required": [
                    "product",
                    "count",
                    "spikes"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    }
  }
}
