|
3 | 3 | "info": { |
4 | 4 | "title": "PMXT Hosted Router API", |
5 | 5 | "description": "Hosted-only endpoints for cross-venue search, matching, arbitrage, and SQL.", |
6 | | - "version": "9389e99" |
| 6 | + "version": "04d3400" |
7 | 7 | }, |
8 | 8 | "servers": [ |
9 | 9 | { |
|
51 | 51 | }, |
52 | 52 | { |
53 | 53 | "in": "query", |
54 | | - "name": "relations", |
| 54 | + "name": "query", |
55 | 55 | "schema": { |
56 | 56 | "type": "string" |
57 | 57 | }, |
58 | | - "description": "Comma-separated relation filter.", |
59 | | - "example": "identity,overlap" |
| 58 | + "description": "Text search across cluster titles.", |
| 59 | + "example": "Satoshi" |
60 | 60 | }, |
61 | 61 | { |
62 | 62 | "in": "query", |
63 | | - "name": "relation", |
| 63 | + "name": "category", |
64 | 64 | "schema": { |
65 | 65 | "type": "string" |
66 | 66 | }, |
67 | | - "description": "Single relation filter. Alias for relations." |
| 67 | + "description": "Filter both sides of matched edges by event category.", |
| 68 | + "example": "Crypto" |
| 69 | + }, |
| 70 | + { |
| 71 | + "in": "query", |
| 72 | + "name": "relations", |
| 73 | + "schema": { |
| 74 | + "type": "string", |
| 75 | + "default": "identity" |
| 76 | + }, |
| 77 | + "description": "Comma-separated relation filter. Valid values: identity (same resolution), subset (A yes implies B yes), superset (B yes implies A yes), overlap (some shared scenarios), and disjoint (mutually exclusive). Defaults to identity. For subset and superset, direction follows the pairwise edge direction returned in rawMatches when includeRawMatches=true.\n", |
| 78 | + "example": "identity" |
| 79 | + }, |
| 80 | + { |
| 81 | + "in": "query", |
| 82 | + "name": "relation", |
| 83 | + "schema": { |
| 84 | + "type": "string", |
| 85 | + "enum": [ |
| 86 | + "identity", |
| 87 | + "subset", |
| 88 | + "superset", |
| 89 | + "overlap", |
| 90 | + "disjoint" |
| 91 | + ], |
| 92 | + "default": "identity" |
| 93 | + }, |
| 94 | + "description": "Single relation filter. Alias for relations.", |
| 95 | + "example": "identity" |
68 | 96 | }, |
69 | 97 | { |
70 | 98 | "in": "query", |
|
175 | 203 | "description": "Matched event clusters." |
176 | 204 | } |
177 | 205 | }, |
| 206 | + "x-codeSamples": [ |
| 207 | + { |
| 208 | + "lang": "python", |
| 209 | + "label": "Python", |
| 210 | + "source": "import pmxt\n\nrouter = pmxt.Router(pmxt_api_key=\"YOUR_PMXT_API_KEY\")\nclusters = router.fetch_matched_event_clusters(\n query=\"Satoshi\",\n relation=\"identity\",\n min_venues=2,\n include_raw_matches=True,\n limit=5,\n)\n\nfor cluster in clusters:\n venues = [event.source_exchange for event in cluster.events]\n print(cluster.canonical_title, venues)\n" |
| 211 | + }, |
| 212 | + { |
| 213 | + "lang": "javascript", |
| 214 | + "label": "TypeScript", |
| 215 | + "source": "import { Router } from \"pmxtjs\";\n\nconst router = new Router({ pmxtApiKey: \"YOUR_PMXT_API_KEY\" });\n\nasync function main() {\n const clusters = await router.fetchMatchedEventClusters({\n query: \"Satoshi\",\n relation: \"identity\",\n minVenues: 2,\n includeRawMatches: true,\n limit: 5,\n });\n\n for (const cluster of clusters) {\n console.log(\n cluster.canonicalTitle,\n cluster.events.map((event) => event.sourceExchange),\n );\n }\n}\n\nmain();\n" |
| 216 | + }, |
| 217 | + { |
| 218 | + "lang": "bash", |
| 219 | + "label": "curl", |
| 220 | + "source": "curl -G \"https://api.pmxt.dev/v0/matched-event-clusters\" \\\n -H \"Authorization: Bearer $PMXT_API_KEY\" \\\n --data-urlencode \"query=Satoshi\" \\\n --data-urlencode \"relation=identity\" \\\n --data-urlencode \"minVenues=2\" \\\n --data-urlencode \"includeRawMatches=true\" \\\n --data-urlencode \"limit=5\"\n" |
| 221 | + } |
| 222 | + ], |
178 | 223 | "operationId": "getV0Matched-event-clusters" |
179 | 224 | } |
180 | 225 | }, |
|
212 | 257 | }, |
213 | 258 | { |
214 | 259 | "in": "query", |
215 | | - "name": "relations", |
| 260 | + "name": "query", |
216 | 261 | "schema": { |
217 | 262 | "type": "string" |
218 | 263 | }, |
219 | | - "description": "Comma-separated relation filter.", |
220 | | - "example": "identity,overlap" |
| 264 | + "description": "Text search across cluster titles.", |
| 265 | + "example": "Satoshi" |
221 | 266 | }, |
222 | 267 | { |
223 | 268 | "in": "query", |
224 | | - "name": "relation", |
| 269 | + "name": "category", |
225 | 270 | "schema": { |
226 | 271 | "type": "string" |
227 | 272 | }, |
228 | | - "description": "Single relation filter. Alias for relations." |
| 273 | + "description": "Filter both sides of matched edges by market category.", |
| 274 | + "example": "Crypto" |
| 275 | + }, |
| 276 | + { |
| 277 | + "in": "query", |
| 278 | + "name": "relations", |
| 279 | + "schema": { |
| 280 | + "type": "string", |
| 281 | + "default": "identity" |
| 282 | + }, |
| 283 | + "description": "Comma-separated relation filter. Valid values: identity (same resolution), subset (A yes implies B yes), superset (B yes implies A yes), overlap (some shared scenarios), and disjoint (mutually exclusive). Defaults to identity. For subset and superset, direction follows the pairwise edge direction returned in rawMatches when includeRawMatches=true.\n", |
| 284 | + "example": "identity" |
| 285 | + }, |
| 286 | + { |
| 287 | + "in": "query", |
| 288 | + "name": "relation", |
| 289 | + "schema": { |
| 290 | + "type": "string", |
| 291 | + "enum": [ |
| 292 | + "identity", |
| 293 | + "subset", |
| 294 | + "superset", |
| 295 | + "overlap", |
| 296 | + "disjoint" |
| 297 | + ], |
| 298 | + "default": "identity" |
| 299 | + }, |
| 300 | + "description": "Single relation filter. Alias for relations.", |
| 301 | + "example": "identity" |
229 | 302 | }, |
230 | 303 | { |
231 | 304 | "in": "query", |
|
336 | 409 | "description": "Matched market clusters." |
337 | 410 | } |
338 | 411 | }, |
| 412 | + "x-codeSamples": [ |
| 413 | + { |
| 414 | + "lang": "python", |
| 415 | + "label": "Python", |
| 416 | + "source": "import pmxt\n\nrouter = pmxt.Router(pmxt_api_key=\"YOUR_PMXT_API_KEY\")\nclusters = router.fetch_matched_market_clusters(\n query=\"Satoshi\",\n relation=\"identity\",\n min_venues=2,\n include_raw_matches=True,\n limit=5,\n)\n\nfor cluster in clusters:\n venues = [market.source_exchange for market in cluster.markets]\n print(cluster.canonical_title, venues)\n" |
| 417 | + }, |
| 418 | + { |
| 419 | + "lang": "javascript", |
| 420 | + "label": "TypeScript", |
| 421 | + "source": "import { Router } from \"pmxtjs\";\n\nconst router = new Router({ pmxtApiKey: \"YOUR_PMXT_API_KEY\" });\n\nasync function main() {\n const clusters = await router.fetchMatchedMarketClusters({\n query: \"Satoshi\",\n relation: \"identity\",\n minVenues: 2,\n includeRawMatches: true,\n limit: 5,\n });\n\n for (const cluster of clusters) {\n console.log(\n cluster.canonicalTitle,\n cluster.markets.map((market) => market.sourceExchange),\n );\n }\n}\n\nmain();\n" |
| 422 | + }, |
| 423 | + { |
| 424 | + "lang": "bash", |
| 425 | + "label": "curl", |
| 426 | + "source": "curl -G \"https://api.pmxt.dev/v0/matched-market-clusters\" \\\n -H \"Authorization: Bearer $PMXT_API_KEY\" \\\n --data-urlencode \"query=Satoshi\" \\\n --data-urlencode \"relation=identity\" \\\n --data-urlencode \"minVenues=2\" \\\n --data-urlencode \"includeRawMatches=true\" \\\n --data-urlencode \"limit=5\"\n" |
| 427 | + } |
| 428 | + ], |
339 | 429 | "operationId": "getV0Matched-market-clusters" |
340 | 430 | } |
341 | 431 | }, |
|
0 commit comments