Faster with an API key — With a PMXT API key this endpoint is served from an indexed catalog (~10 ms) instead of proxying to the venue (~500 ms). No code changes required — same request, same response, just faster. Learn more.
Structured error envelope returned inside BaseResponse.error and ErrorResponse.error. Hosted-mode endpoints populate code, retryable, and optionally exchange / detail; legacy local-mode endpoints may still return only message.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"PMXT","colors":{"primary":"#0B0B0B","light":"#FAFAFA","dark":"#0B0B0B"},"logo":{"light":"https://mintcdn.com/pmxt/yNKlhpZ-Vdlsto1c/logo-light.png?fit=max\u0026auto=format\u0026n=yNKlhpZ-Vdlsto1c\u0026q=85\u0026s=ec1c43df58167b9e9f00e0ba0ce97498","dark":"https://mintcdn.com/pmxt/yNKlhpZ-Vdlsto1c/logo-dark.png?fit=max\u0026auto=format\u0026n=yNKlhpZ-Vdlsto1c\u0026q=85\u0026s=0bcdd0403b4bb8e639c527a689c72345"},"favicon":"https://mintcdn.com/pmxt/_TNRmPqxeVjK8ViK/favicon.png?fit=max\u0026auto=format\u0026n=_TNRmPqxeVjK8ViK\u0026q=85\u0026s=55658b8f181f181a21afc0eb9590dfc5","api":{"examples":{"languages":["python","javascript","curl","go","java"]}},"navbar":{"links":[{"href":"https://pmxt.dev/dashboard","label":"Dashboard"}],"primary":{"type":"button","label":"Get API Key","href":"https://pmxt.dev/dashboard"}},"footer":{"socials":{"github":"https://github.com/pmxt-dev/pmxt"}},"contextual":{"options":["copy","claude","chatgpt","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pmxt","hasAudioNarration":false,"actualSubdomain":"pmxt","customDomains":["pmxt.dev"],"gitSource":{"type":"github","owner":"pmxt-dev","repo":"pmxt","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae954a663c5420c1493c745:success","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":49},{"language":"default","tag":"Documentation","count":18},{"language":"default","tag":"Data Feeds","count":10},{"language":"default","tag":"Get Started","count":7},{"language":"default","tag":"Events \u0026 Markets","count":6},{"language":"default","tag":"Order Book \u0026 Trades","count":6},{"language":"default","tag":"Other","count":6},{"language":"default","tag":"Realtime","count":5},{"language":"default","tag":"Concepts","count":5},{"language":"default","tag":"Router","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/fetch-markets","slug":"/api-reference/fetch-markets","pageMetadata":{"title":"Fetch Markets","openapi":"GET /api/{exchange}/fetchMarkets","description":"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.","href":"/api-reference/fetch-markets"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Info}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);return _jsxs(_Fragment,{children:[_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Faster with an API key`}),` — With a PMXT API key this endpoint is served from an indexed catalog (~10 ms) instead of proxying to the venue (~500 ms). No code changes required — same request, same response, just faster. `,_jsx(_components.a,{href:`/concepts/unified-schema`,children:`Learn more`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`use-cases`,children:`Use cases`}),`\n`,_jsx(Heading,{level:`3`,id:`search-by-keyword`,children:`Search by keyword`}),`\n`,_jsx(_components.p,{children:`Find all markets mentioning “bitcoin” on Polymarket:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pmxt`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Optional: pass pmxt_api_key for ~100x faster catalog-backed lookups`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`api `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pmxt.Polymarket()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`markets `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` api.fetch_markets(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`query`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bitcoin\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`limit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` market `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` markets:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(market.title, market.yes.price)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Polymarket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pmxtjs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Optional: pass pmxtApiKey for ~100x faster catalog-backed lookups`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` api`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Polymarket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` markets`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetchMarkets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bitcoin\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`limit:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`markets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`forEach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`yes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.pmxt.dev/api/polymarket/fetchMarkets?query=bitcoin\u0026limit=5\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PMXT_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`filter-by-category`,children:`Filter by category`}),`\n`,_jsx(_components.p,{children:`Get all sports markets on Kalshi:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pmxt`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`api `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pmxt.Kalshi()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`markets `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` api.fetch_markets(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`category`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sports\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`limit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`4`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Kalshi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pmxtjs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` api`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Kalshi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` markets`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetchMarkets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`category:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Sports\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`limit:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.pmxt.dev/api/kalshi/fetchMarkets?category=Sports\u0026limit=5\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PMXT_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`filter-by-tags`,children:`Filter by tags`}),`\n`,_jsx(_components.p,{children:`Get markets tagged with elections and Trump:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pmxt`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`api `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pmxt.Polymarket()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`markets `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` api.fetch_markets(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`tags`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Elections\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Trump\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`limit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Polymarket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pmxtjs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` api`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Polymarket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` markets`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetchMarkets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tags:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Elections\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Trump\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` limit:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.pmxt.dev/api/polymarket/fetchMarkets?tags=Elections\u0026tags=Trump\u0026limit=5\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PMXT_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`filter-by-status`,children:`Filter by status`}),`\n`,_jsx(_components.p,{children:`Find active markets on Limitless:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pmxt`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`api `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pmxt.Limitless()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`markets `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` api.fetch_markets(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` limit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Limitless`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pmxtjs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` api`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Limitless`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` markets`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetchMarkets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` status:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` limit:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.pmxt.dev/api/limitless/fetchMarkets?status=active\u0026limit=5\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PMXT_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Fetch Markets","openapi":"GET /api/{exchange}/fetchMarkets","description":"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.","href":"/api-reference/fetch-markets"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Use cases","slug":"use-cases","depth":2,"children":[{"title":"Search by keyword","slug":"search-by-keyword","depth":3,"children":[]},{"title":"Filter by category","slug":"filter-by-category","depth":3,"children":[]},{"title":"Filter by tags","slug":"filter-by-tags","depth":3,"children":[]},{"title":"Filter by status","slug":"filter-by-status","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/pmxt/85e8314434873745/mcp-override.js"],"openApiReferenceData":{"operation":{"summary":"Fetch Markets","operationId":"fetchMarkets","parameters":["80e51e76-69b3-49a7-b023-952ace9fd2e3","27018e03-9b7f-4b05-a0f8-7b1e55553325","c62ee9b3-be8c-4148-8621-49c24e257b68","fda1ddb9-9186-41be-b050-b712f9a733bd","84494ab1-a0cc-4cac-9421-d4ffe950523c","60cb7e30-0e3b-4447-a522-d330f9e10db6","e2cc170a-06fe-416b-acc5-6f69a76e4b24","b2c4538e-7847-410a-a640-ce38db59cf7b","e878c4c1-1015-4f7f-8a60-9d9012750935","460f8ced-2782-4f6d-92e1-acde275a2621","f9b5f269-c588-4dbe-80fc-ee490e539118","c3b1c097-db7d-419c-ae61-98e02921f7db","61a7a8c5-ffed-42b2-98a4-e46b56167275","195e49c9-c35f-4c21-a081-de8d24e1be83","dab8317e-71f8-4827-9e67-85157192e14b"],"responses":{"200":"50e2666a-c8f5-407c-9c8a-9d8ed6e0bc39"},"description":"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.","security":[],"x-mint":{"content":"\u003cInfo>\n**Faster with an API key** — With a PMXT API key this endpoint is served from an indexed catalog (~10 ms) instead of proxying to the venue (~500 ms). No code changes required — same request, same response, just faster. [Learn more](/concepts/catalog-vs-live).\n\u003c/Info>"},"x-codeSamples":[{"lang":"python","label":"Polymarket","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Polymarket(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Limitless","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Limitless(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Kalshi","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Kalshi(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"KalshiDemo","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.KalshiDemo(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Probable","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Probable(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Baozi","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Baozi(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Myriad","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Myriad(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Opinion","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Opinion(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Metaculus","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Metaculus(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Smarkets","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Smarkets(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"PolymarketUS","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.PolymarketUS(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Hyperliquid","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Hyperliquid(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"GeminiTitan","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.GeminiTitan(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"SuiBets","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.SuiBets(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Rain","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Rain(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Hunch","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Hunch(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"python","label":"Router","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Router(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"lang":"javascript","label":"Polymarket","source":"import { Polymarket } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Polymarket({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Limitless","source":"import { Limitless } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Limitless({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Kalshi","source":"import { Kalshi } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Kalshi({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"KalshiDemo","source":"import { KalshiDemo } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new KalshiDemo({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Probable","source":"import { Probable } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Probable({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Baozi","source":"import { Baozi } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Baozi({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Myriad","source":"import { Myriad } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Myriad({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Opinion","source":"import { Opinion } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Opinion({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Metaculus","source":"import { Metaculus } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Metaculus({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Smarkets","source":"import { Smarkets } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Smarkets({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"PolymarketUS","source":"import { PolymarketUS } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new PolymarketUS({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Hyperliquid","source":"import { Hyperliquid } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Hyperliquid({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"GeminiTitan","source":"import { GeminiTitan } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new GeminiTitan({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"SuiBets","source":"import { SuiBets } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new SuiBets({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Rain","source":"import { Rain } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Rain({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Hunch","source":"import { Hunch } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Hunch({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"lang":"javascript","label":"Router","source":"import { Router } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Router({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"}],"method":"get","type":"path","servers":["3ebdf33a-141b-469f-a624-0bbe573308e4"],"path":"/api/{exchange}/fetchMarkets","baseUrlOptions":["https://api.pmxt.dev"],"title":"Fetch Markets","codeSamples":[{"label":"Polymarket","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Polymarket(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Limitless","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Limitless(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Kalshi","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Kalshi(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"KalshiDemo","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.KalshiDemo(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Probable","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Probable(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Baozi","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Baozi(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Myriad","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Myriad(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Opinion","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Opinion(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Metaculus","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Metaculus(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Smarkets","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Smarkets(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"PolymarketUS","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.PolymarketUS(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Hyperliquid","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Hyperliquid(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"GeminiTitan","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.GeminiTitan(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"SuiBets","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.SuiBets(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Rain","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Rain(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Hunch","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Hunch(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Router","lang":"python","source":"import pmxt\n\n# API key optional — enables faster catalog-backed lookups\nexchange = pmxt.Router(\n pmxt_api_key=\"YOUR_PMXT_API_KEY\",\n)\nresult = exchange.fetch_markets(\n query=\"election\",\n limit=10,\n status=\"active\",\n)"},{"label":"Polymarket","lang":"javascript","source":"import { Polymarket } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Polymarket({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Limitless","lang":"javascript","source":"import { Limitless } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Limitless({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Kalshi","lang":"javascript","source":"import { Kalshi } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Kalshi({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"KalshiDemo","lang":"javascript","source":"import { KalshiDemo } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new KalshiDemo({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Probable","lang":"javascript","source":"import { Probable } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Probable({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Baozi","lang":"javascript","source":"import { Baozi } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Baozi({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Myriad","lang":"javascript","source":"import { Myriad } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Myriad({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Opinion","lang":"javascript","source":"import { Opinion } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Opinion({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Metaculus","lang":"javascript","source":"import { Metaculus } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Metaculus({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Smarkets","lang":"javascript","source":"import { Smarkets } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Smarkets({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"PolymarketUS","lang":"javascript","source":"import { PolymarketUS } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new PolymarketUS({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Hyperliquid","lang":"javascript","source":"import { Hyperliquid } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Hyperliquid({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"GeminiTitan","lang":"javascript","source":"import { GeminiTitan } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new GeminiTitan({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"SuiBets","lang":"javascript","source":"import { SuiBets } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new SuiBets({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Rain","lang":"javascript","source":"import { Rain } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Rain({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Hunch","lang":"javascript","source":"import { Hunch } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Hunch({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"},{"label":"Router","lang":"javascript","source":"import { Router } from \"pmxtjs\";\n\n// API key optional — enables faster catalog-backed lookups\nconst exchange = new Router({\n pmxtApiKey: \"YOUR_PMXT_API_KEY\",\n});\nconst result = await exchange.fetchMarkets({\n query: \"election\",\n limit: 10,\n status: \"active\",\n});"}],"requestExampleLanguages":["python","javascript","bash","go","java"],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"80e51e76-69b3-49a7-b023-952ace9fd2e3":{"in":"path","name":"exchange","schema":{"type":"string","enum":["polymarket","kalshi","kalshi-demo","limitless","probable","baozi","myriad","opinion","metaculus","smarkets","polymarket_us","gemini-titan","hyperliquid","suibets","rain","hunch","router"],"isRequired":true,"description":"The prediction market exchange to target.","uniqueKey":"","typeLabel":"enum\u003cstring>"},"required":true,"description":"The prediction market exchange to target."},"27018e03-9b7f-4b05-a0f8-7b1e55553325":{"in":"query","name":"limit","required":false,"schema":{"type":"number","isRequired":false,"description":"Maximum number of results to return","uniqueKey":"","typeLabel":"number"},"description":"Maximum number of results to return"},"c62ee9b3-be8c-4148-8621-49c24e257b68":{"in":"query","name":"offset","required":false,"schema":{"type":"number","isRequired":false,"description":"Pagination offset — number of results to skip","uniqueKey":"","typeLabel":"number"},"description":"Pagination offset — number of results to skip"},"fda1ddb9-9186-41be-b050-b712f9a733bd":{"in":"query","name":"sort","required":false,"schema":{"type":"string","enum":["volume","liquidity","newest"],"isRequired":false,"description":"Sort order for results","uniqueKey":"","typeLabel":"enum\u003cstring>"},"description":"Sort order for results"},"84494ab1-a0cc-4cac-9421-d4ffe950523c":{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["active","inactive","closed","all"],"isRequired":false,"description":"Filter by market status (default: 'active', 'inactive' and 'closed' are interchangeable)","uniqueKey":"","typeLabel":"enum\u003cstring>"},"description":"Filter by market status (default: 'active', 'inactive' and 'closed' are interchangeable)"},"60cb7e30-0e3b-4447-a522-d330f9e10db6":{"in":"query","name":"searchIn","required":false,"schema":{"type":"string","enum":["title","description","both"],"isRequired":false,"description":"Where to search (default: 'title')","uniqueKey":"","typeLabel":"enum\u003cstring>"},"description":"Where to search (default: 'title')"},"e2cc170a-06fe-416b-acc5-6f69a76e4b24":{"in":"query","name":"query","required":false,"schema":{"type":"string","isRequired":false,"description":"For keyword search","uniqueKey":"","typeLabel":"string"},"description":"For keyword search"},"b2c4538e-7847-410a-a640-ce38db59cf7b":{"in":"query","name":"slug","required":false,"schema":{"type":"string","isRequired":false,"description":"For slug/ticker lookup","uniqueKey":"","typeLabel":"string"},"description":"For slug/ticker lookup"},"e878c4c1-1015-4f7f-8a60-9d9012750935":{"in":"query","name":"marketId","required":false,"schema":{"type":"string","isRequired":false,"description":"Direct lookup by market ID","uniqueKey":"","typeLabel":"string"},"description":"Direct lookup by market ID"},"460f8ced-2782-4f6d-92e1-acde275a2621":{"in":"query","name":"outcomeId","required":false,"schema":{"type":"string","isRequired":false,"description":"Reverse lookup -- find market containing this outcome","uniqueKey":"","typeLabel":"string"},"description":"Reverse lookup -- find market containing this outcome"},"f9b5f269-c588-4dbe-80fc-ee490e539118":{"in":"query","name":"eventId","required":false,"schema":{"type":"string","isRequired":false,"description":"Find markets belonging to an event","uniqueKey":"","typeLabel":"string"},"description":"Find markets belonging to an event"},"c3b1c097-db7d-419c-ae61-98e02921f7db":{"in":"query","name":"page","required":false,"schema":{"type":"number","isRequired":false,"description":"For pagination (used by Limitless)","uniqueKey":"","typeLabel":"number"},"description":"For pagination (used by Limitless)"},"61a7a8c5-ffed-42b2-98a4-e46b56167275":{"in":"query","name":"similarityThreshold","required":false,"schema":{"type":"number","isRequired":false,"description":"For semantic search (used by Limitless)","uniqueKey":"","typeLabel":"number"},"description":"For semantic search (used by Limitless)"},"195e49c9-c35f-4c21-a081-de8d24e1be83":{"in":"query","name":"sourceExchange","required":false,"schema":{"type":"string","isRequired":false,"description":"Filter by source venue (e.g. 'polymarket', 'kalshi', 'myriad'). `exchange` is an alias.","uniqueKey":"","typeLabel":"string"},"description":"Filter by source venue (e.g. 'polymarket', 'kalshi', 'myriad'). `exchange` is an alias."},"dab8317e-71f8-4827-9e67-85157192e14b":{"in":"query","name":"exchange","required":false,"schema":{"type":"string","isRequired":false,"description":"Alias for `sourceExchange`.","uniqueKey":"","typeLabel":"string"},"description":"Alias for `sourceExchange`."}},"responses":{"50e2666a-c8f5-407c-9c8a-9d8ed6e0bc39":{"description":"Fetch Markets response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","description":"Structured error envelope returned inside `BaseResponse.error` and `ErrorResponse.error`. Hosted-mode endpoints populate `code`, `retryable`, and optionally `exchange` / `detail`; legacy local-mode endpoints may still return only `message`.","properties":{"message":{"type":"string","description":"Human-readable error message.","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code. Hosted-mode errors use the `HostedTradingError` family (e.g. `INSUFFICIENT_ESCROW_BALANCE`, `BUILT_ORDER_EXPIRED`); pre-hosted local errors use the legacy family (e.g. `BAD_REQUEST`, `NOT_FOUND`).","enum":["HOSTED_TRADING_ERROR","INSUFFICIENT_ESCROW_BALANCE","ORDER_SIZE_TOO_SMALL","INVALID_API_KEY","OUTCOME_NOT_FOUND","CATALOG_UNAVAILABLE","BUILT_ORDER_EXPIRED","INVALID_SIGNATURE","NO_LIQUIDITY","MISSING_WALLET_ADDRESS","BAD_REQUEST","AUTHENTICATION_ERROR","PERMISSION_DENIED","NOT_FOUND","ORDER_NOT_FOUND","MARKET_NOT_FOUND","EVENT_NOT_FOUND","RATE_LIMIT_EXCEEDED","INVALID_ORDER","INSUFFICIENT_FUNDS","VALIDATION_ERROR","NETWORK_ERROR","EXCHANGE_NOT_AVAILABLE","NOT_SUPPORTED"],"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"retryable":{"type":"boolean","description":"Hint for clients: when `true`, the same request may succeed on retry (e.g. transient network or rate-limit conditions); when `false`, the caller should not retry without modifying the request.","uniqueKey":"error.retryable","typeLabel":"boolean"},"exchange":{"oneOf":[{"type":"string","description":"Venue the error originated from, when known (e.g. 'polymarket', 'kalshi').","uniqueKey":"error.exchange.oneOf.0","typeLabel":"string"},{"type":"null","description":"Venue the error originated from, when known (e.g. 'polymarket', 'kalshi').","uniqueKey":"error.exchange.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.exchange","typeLabel":"string | null"},"detail":{"oneOf":[{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.detail.oneOf.0.additionalProperties","typeLabel":"any"},"description":"Free-form hosted-mode detail blob. Shape depends on `code` — e.g. for `INSUFFICIENT_ESCROW_BALANCE` it may include `{ requested, available }`; for `ORDER_SIZE_TOO_SMALL` it may include `{ min }`; for `BUILT_ORDER_EXPIRED` it may include `{ expiry }`.","uniqueKey":"error.detail.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.detail.oneOf.1.additionalProperties","typeLabel":"any"},"description":"Free-form hosted-mode detail blob. Shape depends on `code` — e.g. for `INSUFFICIENT_ESCROW_BALANCE` it may include `{ requested, available }`; for `ORDER_SIZE_TOO_SMALL` it may include `{ min }`; for `BUILT_ORDER_EXPIRED` it may include `{ expiry }`.","uniqueKey":"error.detail.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.detail","typeLabel":"object | null"}},"uniqueKey":"error","typeLabel":"object"},"data":{"type":"array","items":{"type":"object","properties":{"marketId":{"type":"string","description":"The unique identifier for this market","isRequired":true,"uniqueKey":"data.items.[INDEX].marketId","typeLabel":"string"},"title":{"type":"string","description":"The market title (e.g., \"Will BTC close above $100k on Dec 31?\").","isRequired":true,"uniqueKey":"data.items.[INDEX].title","typeLabel":"string"},"description":{"type":"string","description":"Long-form market description or resolution criteria.","isRequired":true,"uniqueKey":"data.items.[INDEX].description","typeLabel":"string"},"outcomes":{"type":"array","items":{"type":"object","properties":{"outcomeId":{"type":"string","description":"Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)","isRequired":true,"uniqueKey":"data.items.[INDEX].outcomes.items.[INDEX].outcomeId","typeLabel":"string"},"label":{"type":"string","description":"Human-readable outcome label (e.g., \"Yes\", \"No\", candidate name).","isRequired":true,"uniqueKey":"data.items.[INDEX].outcomes.items.[INDEX].label","typeLabel":"string"},"price":{"type":"number","description":"Probability between 0.0 and 1.0.","isRequired":true,"uniqueKey":"data.items.[INDEX].outcomes.items.[INDEX].price","typeLabel":"number"},"marketId":{"type":"string","description":"The market this outcome belongs to (set automatically when outcomes are built)","uniqueKey":"data.items.[INDEX].outcomes.items.[INDEX].marketId","typeLabel":"string"},"priceChange24h":{"type":"number","description":"Change in price over the past 24 hours, as an absolute probability delta.","uniqueKey":"data.items.[INDEX].outcomes.items.[INDEX].priceChange24h","typeLabel":"number"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.items.[INDEX].outcomes.items.[INDEX].metadata.additionalProperties","typeLabel":"any"},"description":"Exchange-specific metadata (e.g., clobTokenId for Polymarket)","uniqueKey":"data.items.[INDEX].outcomes.items.[INDEX].metadata","typeLabel":"object"}},"required":["outcomeId","label","price"],"uniqueKey":"data.items.[INDEX].outcomes.items.[INDEX]","typeLabel":"object"},"description":"The possible outcomes for this market.","isRequired":true,"uniqueKey":"data.items.[INDEX].outcomes","typeLabel":"object[]"},"volume24h":{"type":"number","description":"Trading volume over the past 24 hours (USD).","isRequired":true,"uniqueKey":"data.items.[INDEX].volume24h","typeLabel":"number"},"liquidity":{"type":"number","description":"Current market liquidity (USD).","isRequired":true,"uniqueKey":"data.items.[INDEX].liquidity","typeLabel":"number"},"url":{"type":"string","description":"Canonical URL to view the market on the venue.","isRequired":true,"uniqueKey":"data.items.[INDEX].url","typeLabel":"string"},"eventId":{"type":"string","description":"Link to parent event","uniqueKey":"data.items.[INDEX].eventId","typeLabel":"string"},"slug":{"type":"string","description":"URL-friendly slug for the market.","uniqueKey":"data.items.[INDEX].slug","typeLabel":"string"},"resolutionDate":{"type":"string","format":"date-time","description":"When the market is scheduled to resolve. Optional because some venues do not publish a cutoff for every market (e.g. Opinion categorical children) — emit `undefined` rather than coercing to epoch.","uniqueKey":"data.items.[INDEX].resolutionDate","typeLabel":"string\u003cdate-time>"},"volume":{"type":"number","description":"Total / Lifetime volume","uniqueKey":"data.items.[INDEX].volume","typeLabel":"number"},"openInterest":{"type":"number","description":"Total value of outstanding contracts (USD).","uniqueKey":"data.items.[INDEX].openInterest","typeLabel":"number"},"image":{"type":"string","description":"Optional image URL for the market.","uniqueKey":"data.items.[INDEX].image","typeLabel":"string"},"category":{"type":"string","description":"Optional category label. Venue-defined — common values include \"Sports\", \"Politics\", \"Crypto\", \"Economics\", \"Science\", \"Culture\". Polymarket uses finer-grained categories like \"Bitcoin\", \"Soccer\", \"Economic Policy\"; Kalshi uses broader ones like \"Sports\" or \"Mentions\".","uniqueKey":"data.items.[INDEX].category","typeLabel":"string"},"tags":{"type":"array","items":{"type":"string","uniqueKey":"data.items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"description":"Optional list of tags. More granular than category — e.g. [\"Crypto\", \"Crypto Prices\", \"Bitcoin\"] or [\"Politics\", \"Elections\", \"Trump\"]. Tags vary by venue: Polymarket markets carry several, Kalshi typically one.","uniqueKey":"data.items.[INDEX].tags","typeLabel":"string[]"},"tickSize":{"type":"number","description":"Minimum price increment (e.g., 0.01, 0.001)","uniqueKey":"data.items.[INDEX].tickSize","typeLabel":"number"},"status":{"type":"string","description":"Venue-native lifecycle status (e.g. 'active', 'closed', 'archived').","uniqueKey":"data.items.[INDEX].status","typeLabel":"string"},"contractAddress":{"type":"string","description":"On-chain contract / condition identifier where applicable (Polymarket conditionId, etc.).","uniqueKey":"data.items.[INDEX].contractAddress","typeLabel":"string"},"sourceMetadata":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.items.[INDEX].sourceMetadata.additionalProperties","typeLabel":"any"},"description":"Raw venue-specific metadata not captured by first-class fields (e.g. Kalshi series_ticker / series_title from the parent event, Polymarket series). Passed through verbatim so downstream consumers can recover anything the unified shape omits. Each venue populates what it has.","uniqueKey":"data.items.[INDEX].sourceMetadata","typeLabel":"object"},"sourceExchange":{"type":"string","description":"The exchange/venue this market originates from (e.g. 'polymarket', 'kalshi'). Populated by the Router.","uniqueKey":"data.items.[INDEX].sourceExchange","typeLabel":"string"},"yes":{"type":"object","description":"Convenience accessor for the YES outcome on a binary market.","required":["outcomeId","label","price"],"properties":{"outcomeId":{"type":"string","description":"Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)","isRequired":true,"uniqueKey":"data.items.[INDEX].yes.outcomeId","typeLabel":"string"},"label":{"type":"string","description":"Human-readable outcome label (e.g., \"Yes\", \"No\", candidate name).","isRequired":true,"uniqueKey":"data.items.[INDEX].yes.label","typeLabel":"string"},"price":{"type":"number","description":"Probability between 0.0 and 1.0.","isRequired":true,"uniqueKey":"data.items.[INDEX].yes.price","typeLabel":"number"},"marketId":{"type":"string","description":"The market this outcome belongs to (set automatically when outcomes are built)","uniqueKey":"data.items.[INDEX].yes.marketId","typeLabel":"string"},"priceChange24h":{"type":"number","description":"Change in price over the past 24 hours, as an absolute probability delta.","uniqueKey":"data.items.[INDEX].yes.priceChange24h","typeLabel":"number"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.items.[INDEX].yes.metadata.additionalProperties","typeLabel":"any"},"description":"Exchange-specific metadata (e.g., clobTokenId for Polymarket)","uniqueKey":"data.items.[INDEX].yes.metadata","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX].yes","typeLabel":"object"},"no":{"type":"object","description":"Convenience accessor for the NO outcome on a binary market.","required":["outcomeId","label","price"],"properties":{"outcomeId":{"type":"string","description":"Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)","isRequired":true,"uniqueKey":"data.items.[INDEX].no.outcomeId","typeLabel":"string"},"label":{"type":"string","description":"Human-readable outcome label (e.g., \"Yes\", \"No\", candidate name).","isRequired":true,"uniqueKey":"data.items.[INDEX].no.label","typeLabel":"string"},"price":{"type":"number","description":"Probability between 0.0 and 1.0.","isRequired":true,"uniqueKey":"data.items.[INDEX].no.price","typeLabel":"number"},"marketId":{"type":"string","description":"The market this outcome belongs to (set automatically when outcomes are built)","uniqueKey":"data.items.[INDEX].no.marketId","typeLabel":"string"},"priceChange24h":{"type":"number","description":"Change in price over the past 24 hours, as an absolute probability delta.","uniqueKey":"data.items.[INDEX].no.priceChange24h","typeLabel":"number"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.items.[INDEX].no.metadata.additionalProperties","typeLabel":"any"},"description":"Exchange-specific metadata (e.g., clobTokenId for Polymarket)","uniqueKey":"data.items.[INDEX].no.metadata","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX].no","typeLabel":"object"},"up":{"type":"object","description":"Convenience accessor for the UP outcome on a binary market.","required":["outcomeId","label","price"],"properties":{"outcomeId":{"type":"string","description":"Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)","isRequired":true,"uniqueKey":"data.items.[INDEX].up.outcomeId","typeLabel":"string"},"label":{"type":"string","description":"Human-readable outcome label (e.g., \"Yes\", \"No\", candidate name).","isRequired":true,"uniqueKey":"data.items.[INDEX].up.label","typeLabel":"string"},"price":{"type":"number","description":"Probability between 0.0 and 1.0.","isRequired":true,"uniqueKey":"data.items.[INDEX].up.price","typeLabel":"number"},"marketId":{"type":"string","description":"The market this outcome belongs to (set automatically when outcomes are built)","uniqueKey":"data.items.[INDEX].up.marketId","typeLabel":"string"},"priceChange24h":{"type":"number","description":"Change in price over the past 24 hours, as an absolute probability delta.","uniqueKey":"data.items.[INDEX].up.priceChange24h","typeLabel":"number"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.items.[INDEX].up.metadata.additionalProperties","typeLabel":"any"},"description":"Exchange-specific metadata (e.g., clobTokenId for Polymarket)","uniqueKey":"data.items.[INDEX].up.metadata","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX].up","typeLabel":"object"},"down":{"type":"object","description":"Convenience accessor for the DOWN outcome on a binary market.","required":["outcomeId","label","price"],"properties":{"outcomeId":{"type":"string","description":"Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)","isRequired":true,"uniqueKey":"data.items.[INDEX].down.outcomeId","typeLabel":"string"},"label":{"type":"string","description":"Human-readable outcome label (e.g., \"Yes\", \"No\", candidate name).","isRequired":true,"uniqueKey":"data.items.[INDEX].down.label","typeLabel":"string"},"price":{"type":"number","description":"Probability between 0.0 and 1.0.","isRequired":true,"uniqueKey":"data.items.[INDEX].down.price","typeLabel":"number"},"marketId":{"type":"string","description":"The market this outcome belongs to (set automatically when outcomes are built)","uniqueKey":"data.items.[INDEX].down.marketId","typeLabel":"string"},"priceChange24h":{"type":"number","description":"Change in price over the past 24 hours, as an absolute probability delta.","uniqueKey":"data.items.[INDEX].down.priceChange24h","typeLabel":"number"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.items.[INDEX].down.metadata.additionalProperties","typeLabel":"any"},"description":"Exchange-specific metadata (e.g., clobTokenId for Polymarket)","uniqueKey":"data.items.[INDEX].down.metadata","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX].down","typeLabel":"object"}},"required":["marketId","title","description","outcomes","volume24h","liquidity","url"],"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"error":{"message":"\u003cstring>","code":"HOSTED_TRADING_ERROR","retryable":true,"exchange":"\u003cstring>","detail":{}},"data":[{"marketId":"\u003cstring>","title":"\u003cstring>","description":"\u003cstring>","outcomes":[{"outcomeId":"\u003cstring>","label":"\u003cstring>","price":123,"marketId":"\u003cstring>","priceChange24h":123,"metadata":{}}],"volume24h":123,"liquidity":123,"url":"\u003cstring>","eventId":"\u003cstring>","slug":"\u003cstring>","resolutionDate":"2023-11-07T05:31:56Z","volume":123,"openInterest":123,"image":"\u003cstring>","category":"\u003cstring>","tags":["\u003cstring>"],"tickSize":123,"status":"\u003cstring>","contractAddress":"\u003cstring>","sourceMetadata":{},"sourceExchange":"\u003cstring>","yes":{"outcomeId":"\u003cstring>","label":"\u003cstring>","price":123,"marketId":"\u003cstring>","priceChange24h":123,"metadata":{}},"no":{"outcomeId":"\u003cstring>","label":"\u003cstring>","price":123,"marketId":"\u003cstring>","priceChange24h":123,"metadata":{}},"up":{"outcomeId":"\u003cstring>","label":"\u003cstring>","price":123,"marketId":"\u003cstring>","priceChange24h":123,"metadata":{}},"down":{"outcomeId":"\u003cstring>","label":"\u003cstring>","price":123,"marketId":"\u003cstring>","priceChange24h":123,"metadata":{}}}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"3ebdf33a-141b-469f-a624-0bbe573308e4":{"url":"https://api.pmxt.dev","description":"Hosted PMXT (production)"}}},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"pmxt","siteName":"PMXT","title":"Fetch Markets - PMXT","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-18T12:30:39.642Z","originalFileLocation":"api-reference/fetch-markets.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.\">\u003cmeta data-mint-head name=\"application-name\" content=\"PMXT\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Fetch Markets - PMXT\">\u003cmeta data-mint-head property=\"og:description\" content=\"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PMXT\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://pmxt.dev/docs/api-reference/fetch-markets\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pmxt.mintlify.site/docs/_mintlify/api/og/v2?division=Events+%26+Markets\u0026amp;title=Fetch+Markets\u0026amp;description=Fetch+markets+with+optional+filtering%2C+search%2C+or+slug+lookup.+Always+hits+the+exchange+API+%E2%80%94+results+reflect+the+live+state+at+the+time+of+the+call.\u0026amp;theme=9d0a33f37283fe0c0c33a8ab\u0026amp;signature=4ce40ef754947cbd86fd3c17a22be8056b10af9808dc3972543bbbca5d1680cb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Fetch Markets - PMXT\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pmxt.mintlify.site/docs/_mintlify/api/og/v2?division=Events+%26+Markets\u0026amp;title=Fetch+Markets\u0026amp;description=Fetch+markets+with+optional+filtering%2C+search%2C+or+slug+lookup.+Always+hits+the+exchange+API+%E2%80%94+results+reflect+the+live+state+at+the+time+of+the+call.\u0026amp;theme=9d0a33f37283fe0c0c33a8ab\u0026amp;signature=4ce40ef754947cbd86fd3c17a22be8056b10af9808dc3972543bbbca5d1680cb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/pmxt/nI6ZNH5zN6ncgA0S/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PMXT\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0B0B0B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://pmxt.dev/docs/api-reference/fetch-markets\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/fetch-markets.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://pmxt.dev/#organization\",\"name\":\"PMXT\",\"url\":\"https://pmxt.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pmxt/yNKlhpZ-Vdlsto1c/logo-light.png?fit=max\u0026auto=format\u0026n=yNKlhpZ-Vdlsto1c\u0026q=85\u0026s=ec1c43df58167b9e9f00e0ba0ce97498\"}},{\"@type\":\"WebSite\",\"@id\":\"https://pmxt.dev/docs#website\",\"name\":\"PMXT\",\"url\":\"https://pmxt.dev/docs\",\"publisher\":{\"@id\":\"https://pmxt.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://pmxt.dev/docs/api-reference/fetch-markets#webpage\",\"url\":\"https://pmxt.dev/docs/api-reference/fetch-markets\",\"name\":\"Fetch Markets\",\"description\":\"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.\",\"dateModified\":\"2026-06-18T12:30:39.642Z\",\"isPartOf\":{\"@id\":\"https://pmxt.dev/docs#website\"},\"breadcrumb\":{\"@id\":\"https://pmxt.dev/docs/api-reference/fetch-markets#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://pmxt.dev/docs/api-reference/fetch-markets#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Events \u0026 Markets\",\"item\":\"https://pmxt.dev/docs/api-reference/fetch-events\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fetch Markets\",\"item\":\"https://pmxt.dev/docs/api-reference/fetch-markets\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://pmxt.dev/docs/api-reference/fetch-markets#apireference\",\"headline\":\"Fetch Markets\",\"name\":\"Fetch Markets\",\"description\":\"Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect the live state at the time of the call.\",\"url\":\"https://pmxt.dev/docs/api-reference/fetch-markets\",\"mainEntityOfPage\":{\"@id\":\"https://pmxt.dev/docs/api-reference/fetch-markets#webpage\"},\"dateModified\":\"2026-06-18T12:30:39.642Z\",\"publisher\":{\"@id\":\"https://pmxt.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://pmxt.dev/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PMXT\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"PMXT\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/fetch-markets.md","siteName":"PMXT","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"Router","pages":[{"title":"Router","href":"/router/overview"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"Overview","href":"/api-reference/overview"}]},{"group":"System","pages":[{"title":"Server Health Check","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /health","href":"/api-reference/server-health-check"},{"title":"Load Markets","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/loadMarkets","href":"/api-reference/load-markets"},{"title":"Close","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/close","href":"/api-reference/close"}]},{"group":"Events \u0026 Markets","pages":[{"title":"Fetch Events","openapi":"GET /api/{exchange}/fetchEvents","href":"/api-reference/fetch-events"},{"title":"Fetch Events Paginated","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/{exchange}/fetchEventsPaginated","href":"/api-reference/fetch-events-paginated"},{"title":"Fetch Event","openapi":"GET /api/{exchange}/fetchEvent","description":"Fetch a single event by lookup parameters. Convenience wrapper around fetchEvents() that returns a single result or throws EventNotFound.","href":"/api-reference/fetch-event"},{"title":"Fetch Markets","openapi":"GET /api/{exchange}/fetchMarkets","href":"/api-reference/fetch-markets"},{"title":"Fetch Markets Paginated","description":"Fetch markets with cursor-based pagination backed by a stable in-memory snapshot. On the first call (or when no cursor is supplied), fetches all markets once and caches them. Subsequent calls with a cursor returned from a previous call slice directly from the cached snapshot — no additional API calls are made. The snapshot is invalidated after `snapshotTTL` ms (configured via `ExchangeOptions` in the constructor). A request using a cursor from an expired snapshot throws `'Cursor has expired'`.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/{exchange}/fetchMarketsPaginated","href":"/api-reference/fetch-markets-paginated"},{"title":"Fetch Market","openapi":"GET /api/{exchange}/fetchMarket","href":"/api-reference/fetch-market"}]},{"group":"Trading","pages":[{"title":"Create Order","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json post /v0/trade/create-order","href":"/api-reference/trading/create-order"},{"title":"Build Order","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json post /v0/trade/build-order","href":"/api-reference/trading/build-order"},{"title":"Submit Order","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json post /v0/trade/submit-order","href":"/api-reference/trading/submit-order"},{"title":"Cancel Order","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json post /v0/orders/cancel/build","href":"/api-reference/trading/cancel-order"}]},{"group":"Orders \u0026 Positions","pages":[{"title":"Fetch Order","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json get /v0/orders/{order_id}","href":"/api-reference/orders-\u0026-positions/fetch-order"},{"title":"Fetch Open Orders","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json get /v0/orders/open","href":"/api-reference/orders-\u0026-positions/fetch-open-orders"},{"title":"Fetch My Trades","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json get /v0/user/{address}/trades","href":"/api-reference/orders-\u0026-positions/fetch-my-trades"},{"title":"Fetch Positions","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json get /v0/user/{address}/positions","href":"/api-reference/orders-\u0026-positions/fetch-positions"},{"title":"Fetch Balance","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted-trading.json get /v0/user/{address}/balances","href":"/api-reference/orders-\u0026-positions/fetch-balance"}]},{"group":"Cross Exchange","pages":[{"title":"Fetch matched event clusters","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted.json get /v0/matched-event-clusters","href":"/api-reference/matchedmarkets/fetch-matched-event-clusters"},{"title":"Fetch matched market clusters","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted.json get /v0/matched-market-clusters","href":"/api-reference/matchedmarkets/fetch-matched-market-clusters"}]},{"group":"Order Book \u0026 Trades","pages":[{"title":"Fetch OHLCV","openapi":"GET /api/{exchange}/fetchOHLCV","href":"/api-reference/fetch-ohlcv"},{"title":"Fetch Order Book","openapi":"GET /api/{exchange}/fetchOrderBook","href":"/api-reference/fetch-order-book"},{"title":"Fetch Order Books","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/fetchOrderBooks","href":"/api-reference/fetch-order-books"},{"title":"Fetch Trades","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/{exchange}/fetchTrades","href":"/api-reference/fetch-trades"},{"title":"Get Execution Price","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/getExecutionPrice","href":"/api-reference/get-execution-price"},{"title":"Get Execution Price Detailed","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/getExecutionPriceDetailed","href":"/api-reference/get-execution-price-detailed"}]},{"group":"Realtime","pages":[{"title":"WebSocket Overview","href":"/api-reference/websocket"},{"title":"watchAllOrderBooks","href":"/api-reference/watch-all-order-books"},{"title":"watchOrderBook","href":"/api-reference/watch-order-book"},{"title":"watchOrderBooks","href":"/api-reference/watch-order-books"},{"title":"watchTrades","href":"/api-reference/watch-trades"}]},{"group":"Data Feeds","pages":[{"title":"List Available Feeds","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds","href":"/api-reference/data-feeds/list-available-feeds"},{"title":"Load Feed Markets","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/loadMarkets","href":"/api-reference/data-feeds/load-feed-markets"},{"title":"Fetch Ticker","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/fetchTicker","href":"/api-reference/data-feeds/fetch-ticker"},{"title":"Fetch Tickers","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/fetchTickers","href":"/api-reference/data-feeds/fetch-tickers"},{"title":"Fetch OHLCV","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/fetchOHLCV","href":"/api-reference/data-feeds/fetch-ohlcv"},{"title":"Fetch Order Book","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/fetchOrderBook","href":"/api-reference/data-feeds/fetch-order-book"},{"title":"Watch Ticker (WebSocket)","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/watchTicker","href":"/api-reference/data-feeds/watch-ticker-websocket"},{"title":"Fetch Oracle Round","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/fetchOracleRound","href":"/api-reference/data-feeds/fetch-oracle-round"},{"title":"Fetch Oracle History","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/fetchOracleHistory","href":"/api-reference/data-feeds/fetch-oracle-history"},{"title":"Fetch Historical Prices","deprecated":null,"version":null,"tag":"Data Feeds","openapi":"/api-reference/openapi.json get /api/feeds/{feed}/fetchHistoricalPrices","href":"/api-reference/data-feeds/fetch-historical-prices"}]},{"group":"Other","pages":[{"title":"Get Auth Nonce","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/getAuthNonce","href":"/api-reference/get-auth-nonce"},{"title":"Login With Signature","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/loginWithSignature","href":"/api-reference/login-with-signature"},{"title":"Logout","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/logout","href":"/api-reference/logout"},{"title":"Is Session Active","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/{exchange}/isSessionActive","href":"/api-reference/is-session-active"},{"title":"Fetch Series","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/{exchange}/fetchSeries","href":"/api-reference/fetch-series"},{"title":"Fetch Event Metadata","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/{exchange}/fetchEventMetadata","href":"/api-reference/fetch-event-metadata"}]},{"group":"Enterprise","pages":[{"title":"Execute a read-only SQL query against ClickHouse","deprecated":null,"version":null,"openapi":"/api-reference/openapi-hosted.json post /v0/sql","href":"/api-reference/sql/execute-a-read-only-sql-query-against-clickhouse"}]}]}]},"basePath":"","title":"Fetch Markets - PMXT","buildId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","deploymentId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-EBSrFTg1.js","utils-Y_7TcRh4.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D1wvvkPH.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-aT0ty6oN.js","snippetPresets-DoNRuyJc.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-CXRajFpn.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BAyOsINj.js","shallow-CIcHqV1v.js","getApiPlaygroundDisplay-C5igZwEf.js","CodeSnippet-BFWnQLNh.js","CodeSnippets-Cx2mFgZW.js","Page-DCFaZE46.js","getPastedJson-BOy09PZp.js","icon-BwmYtB6R.js","MethodPill-DAIhq-iu.js","DuplicateIcon-DFM8Q3ph.js","createIcon-0UdvzB4Z.js","DynamicMarkdown-DYYZTGpa.js","SectionHeading-BFCDRUuH.js","axios-vUo_bRtp.js","Markdown-C6TcKjiR.js","clsx-Y_UC780V.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-PCbBHBTv.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-D4q_oRML.js"]}