当使用的运行环境没有现成 SDK,或业务需要对请求、签名、分页和实时订阅进行更细粒度控制时,可以直接使用 API 接入。REST API 返回原始 JSON 数据,并按业务提供独立接口。私有接口的认证和签名需要由接入方实现;不同接口的分页规则以具体页面说明为准。对于实时数据,需要连接相应的 WebSocket 服务并订阅所需频道。
API
直接接入事件合约 REST API 与 WebSocket 实时数据流。
⌘I
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"DexBuilder Docs","description":"Build perpetual trading applications and branded DEXs on DexBuilder.","colors":{"primary":"#00A833","light":"#16D96A","dark":"#007A29"},"logo":{"light":"https://mintcdn.com/dexbuilder/BzQtjr1enl1hZ8Nk/images/drak.svg?fit=max\u0026auto=format\u0026n=BzQtjr1enl1hZ8Nk\u0026q=85\u0026s=09a6ac37c3ff6a16f907a30ce4740901","dark":"https://mintcdn.com/dexbuilder/UT2TFWbYfRFfVZhj/images/light.svg?fit=max\u0026auto=format\u0026n=UT2TFWbYfRFfVZhj\u0026q=85\u0026s=6683c4732d99eae83e0263a08fcd4378","href":"https://www.dexbuilder.com/"},"favicon":{"light":"https://mintcdn.com/dexbuilder/BzQtjr1enl1hZ8Nk/images/fav.svg?fit=max\u0026auto=format\u0026n=BzQtjr1enl1hZ8Nk\u0026q=85\u0026s=be0cfbb79f3fe5c8adba978f2930e509","dark":"https://mintcdn.com/dexbuilder/BzQtjr1enl1hZ8Nk/images/favdark.svg?fit=max\u0026auto=format\u0026n=BzQtjr1enl1hZ8Nk\u0026q=85\u0026s=0ec2ef403363a86d60f2123fb9d3b2ab"},"api":{"playground":{"display":"simple"},"examples":{"languages":["curl","","python"]}},"appearance":{"default":"dark"},"footer":{"socials":{"website":"https://www.dexbuilder.com/"}},"contextual":{"options":["copy","view","chatgpt"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"zh","href":"getting-started/what-is-dexbuilder"},{"language":"en","href":"en/getting-started/what-is-dexbuilder"},{"language":"zh-TW","href":"zh-TW/getting-started/what-is-dexbuilder"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dexbuilder","hasAudioNarration":false,"actualSubdomain":"dexbuilder","customDomains":[],"gitSource":{"type":"github","owner":"gateplatforms","repo":"dexbuilder-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6aedef94556a44a2a47f2d61","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"zh","tag":"API Reference","count":180},{"language":"en","tag":"API Reference","count":177},{"language":"zh-TW","tag":"API Reference","count":177},{"language":"zh","tag":"REST API","count":109},{"language":"en","tag":"REST API","count":109},{"language":"zh-TW","tag":"REST API","count":109},{"language":"zh","tag":"PerpDEX","count":89},{"language":"en","tag":"PerpDEX","count":86},{"language":"zh-TW","tag":"PerpDEX","count":86},{"language":"zh","tag":"PerpDEX API","count":78},{"language":"en","tag":"PerpDEX API","count":75},{"language":"zh-TW","tag":"PerpDEX API","count":75},{"language":"zh","tag":"事件市场","count":62},{"language":"zh","tag":"事件合约","count":61},{"language":"en","tag":"Event Contracts","count":61},{"language":"en","tag":"Prediction Markets","count":61},{"language":"zh-TW","tag":"事件合約","count":61},{"language":"zh","tag":"介绍","count":58},{"language":"en","tag":"Introduction","count":58},{"language":"zh-TW","tag":"介紹","count":58},{"language":"zh-TW","tag":"事件市場","count":41},{"language":"zh","tag":"事件市场 API","count":40},{"language":"en","tag":"Prediction Markets API","count":40},{"language":"zh-TW","tag":"事件市場 API","count":40},{"language":"zh","tag":"事件合约 API","count":39},{"language":"en","tag":"Event Contracts API","count":39},{"language":"zh-TW","tag":"事件合約 API","count":39},{"language":"zh","tag":"DexBuilder 平台 API","count":21},{"language":"en","tag":"DexBuilder Platform API","count":21},{"language":"zh-TW","tag":"DexBuilder 平台 API","count":21}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"sidebar-links.css","content":"#sidebar-content{padding-bottom:108px!important;scroll-padding-bottom:108px}#dexbuilder-sidebar-links{position:fixed;left:0;bottom:44px;width:20rem;box-sizing:border-box;z-index:40;padding:14px 28px 12px;border-top:1px solid rgba(127, 127, 127, 0.22);background:var(--background, #0b0f0d)}#dexbuilder-sidebar-links a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;color:inherit;opacity:0.72;font-size:14px;line-height:1.45;text-decoration:none}#dexbuilder-sidebar-links a:hover{opacity:1}#dexbuilder-sidebar-links a::after{content:\"↗\";flex:0 0 auto;font-size:16px;line-height:1;opacity:0.8}@media (max-width: 1023px){#dexbuilder-sidebar-links{display:none}}"}],"page":{"pagePath":"zh/event-contracts/apis","slug":"/zh/event-contracts/apis","pageMetadata":{"title":"API 接入说明","sidebarTitle":"接入说明","description":"了解何时直接使用事件合约 REST API 与 WebSocket。","href":"/zh/event-contracts/apis"},"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: \"了解何时直接使用事件合约 REST API 与 WebSocket。\"\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={p:`p`,..._provideComponents(),...props.components},{Card}=_components;if(!Card)_missingMdxReference(`Card`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`当使用的运行环境没有现成 SDK,或业务需要对请求、签名、分页和实时订阅进行更细粒度控制时,可以直接使用 API 接入。`}),`\n`,_jsx(_components.p,{children:`REST API 返回原始 JSON 数据,并按业务提供独立接口。私有接口的认证和签名需要由接入方实现;不同接口的分页规则以具体页面说明为准。对于实时数据,需要连接相应的 WebSocket 服务并订阅所需频道。`}),`\n`,_jsx(Card,{title:`API`,icon:`sparkles`,href:`/zh/event-contracts/api/overview`,children:_jsx(_components.p,{children:`直接接入事件合约 REST API 与 WebSocket 实时数据流。`})})]})}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":"API 接入说明","sidebarTitle":"接入说明","description":"了解何时直接使用事件合约 REST API 与 WebSocket。","href":"/zh/event-contracts/apis"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/dexbuilder/be526c07a007ff39/sidebar-links.js"],"subdomain":"dexbuilder","siteName":"DexBuilder Docs","title":"API 接入说明 - DexBuilder Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"zh":{"href":"/zh/event-contracts/apis","matchLevel":0},"en":{"href":"/en/event-contracts/apis","matchLevel":1},"zh-TW":{"href":"/zh-TW/event-contracts/apis","matchLevel":1}}},"lastModified":"2026-09-18T02:03:01.180Z","originalFileLocation":"zh/event-contracts/apis.mdx","locale":"zh"},"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=\"dark\"}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=\"了解何时直接使用事件合约 REST API 与 WebSocket。\">\u003cmeta data-mint-head name=\"application-name\" content=\"DexBuilder Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_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=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"API 接入说明 - DexBuilder Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"了解何时直接使用事件合约 REST API 与 WebSocket。\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DexBuilder Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://dexbuilder.mintlify.app/zh/event-contracts/apis\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dexbuilder.mintlify.site/_mintlify/api/og/v2?division=%E4%BA%8B%E4%BB%B6%E5%90%88%E7%BA%A6+API\u0026amp;title=API+%E6%8E%A5%E5%85%A5%E8%AF%B4%E6%98%8E\u0026amp;description=%E4%BA%86%E8%A7%A3%E4%BD%95%E6%97%B6%E7%9B%B4%E6%8E%A5%E4%BD%BF%E7%94%A8%E4%BA%8B%E4%BB%B6%E5%90%88%E7%BA%A6+REST+API+%E4%B8%8E+WebSocket%E3%80%82\u0026amp;theme=44c035c47b9053b237304c28\u0026amp;signature=4c16f009b023db6677f3fa216ec63bb931987bd8069f65e687517af9123f1fd6\">\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=\"API 接入说明 - DexBuilder Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"了解何时直接使用事件合约 REST API 与 WebSocket。\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dexbuilder.mintlify.site/_mintlify/api/og/v2?division=%E4%BA%8B%E4%BB%B6%E5%90%88%E7%BA%A6+API\u0026amp;title=API+%E6%8E%A5%E5%85%A5%E8%AF%B4%E6%98%8E\u0026amp;description=%E4%BA%86%E8%A7%A3%E4%BD%95%E6%97%B6%E7%9B%B4%E6%8E%A5%E4%BD%BF%E7%94%A8%E4%BA%8B%E4%BB%B6%E5%90%88%E7%BA%A6+REST+API+%E4%B8%8E+WebSocket%E3%80%82\u0026amp;theme=44c035c47b9053b237304c28\u0026amp;signature=4c16f009b023db6677f3fa216ec63bb931987bd8069f65e687517af9123f1fd6\">\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=\"/mintlify-assets/_mintlify/favicons/dexbuilder/rl0FN8FdQqeo9dld/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DexBuilder Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00A833\">\u003clink data-mint-head rel=\"canonical\" href=\"https://dexbuilder.mintlify.app/zh/event-contracts/apis\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/zh/event-contracts/apis.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://dexbuilder.mintlify.app/zh/event-contracts/apis\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://dexbuilder.mintlify.app/en/event-contracts/apis\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-TW\" href=\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/apis\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://dexbuilder.mintlify.app/zh/event-contracts/apis\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://dexbuilder.mintlify.app/#organization\",\"name\":\"DexBuilder Docs\",\"url\":\"https://dexbuilder.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dexbuilder/BzQtjr1enl1hZ8Nk/images/drak.svg?fit=max\u0026auto=format\u0026n=BzQtjr1enl1hZ8Nk\u0026q=85\u0026s=09a6ac37c3ff6a16f907a30ce4740901\"}},{\"@type\":\"WebSite\",\"@id\":\"https://dexbuilder.mintlify.app#website\",\"name\":\"DexBuilder Docs\",\"url\":\"https://dexbuilder.mintlify.app\",\"publisher\":{\"@id\":\"https://dexbuilder.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://dexbuilder.mintlify.app/zh/event-contracts/apis#webpage\",\"url\":\"https://dexbuilder.mintlify.app/zh/event-contracts/apis\",\"name\":\"API 接入说明\",\"description\":\"了解何时直接使用事件合约 REST API 与 WebSocket。\",\"dateModified\":\"2026-09-18T02:03:01.180Z\",\"isPartOf\":{\"@id\":\"https://dexbuilder.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://dexbuilder.mintlify.app/zh/event-contracts/apis#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://dexbuilder.mintlify.app/zh/event-contracts/apis#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"事件合约 API\",\"item\":\"https://dexbuilder.mintlify.app/zh/event-contracts/api/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API 接入说明\",\"item\":\"https://dexbuilder.mintlify.app/zh/event-contracts/apis\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://dexbuilder.mintlify.app/zh/event-contracts/apis#article\",\"headline\":\"API 接入说明\",\"name\":\"API 接入说明\",\"description\":\"了解何时直接使用事件合约 REST API 与 WebSocket。\",\"url\":\"https://dexbuilder.mintlify.app/zh/event-contracts/apis\",\"mainEntityOfPage\":{\"@id\":\"https://dexbuilder.mintlify.app/zh/event-contracts/apis#webpage\"},\"dateModified\":\"2026-09-18T02:03:01.180Z\",\"publisher\":{\"@id\":\"https://dexbuilder.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://dexbuilder.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DexBuilder Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"DexBuilder Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/zh/event-contracts/apis.md","siteName":"DexBuilder Docs","nav":{"global":null,"languages":[{"language":"zh","tabs":[{"tab":"介绍","pages":[{"title":"介绍","href":"/getting-started/what-is-dexbuilder"}]},{"tab":"在 DexBuilder 上构建","pages":[{"title":"在 DexBuilder 上构建","href":"/builder/architecture"}]},{"tab":"API Reference","menu":[{"item":"接入与通用规则","pages":[{"title":"接入与通用规则","href":"/api-reference/common/overview"}]},{"item":"DexBuilder 平台 API","pages":[{"title":"DexBuilder 平台 API","href":"/api-reference/dexbuilder/overview"}]},{"item":"PerpDEX","pages":[{"title":"PerpDEX","href":"/api-reference/perpdex/overview"}]},{"item":"事件市场","pages":[{"title":"事件市场","href":"/zh/event-markets/api/overview"}]},{"item":"事件合约","pages":[{"group":"事件合约 API","pages":[{"title":"API 概览","sidebarTitle":"API 概览","description":"事件合约 API 的基础地址、访问模型、分页、时间与错误约定。","href":"/zh/event-contracts/api/overview"},{"title":"API 接入说明","sidebarTitle":"接入说明","href":"/zh/event-contracts/apis"},{"title":"错误码","sidebarTitle":"错误码","description":"事件合约 API 常见 HTTP 错误、原因及处理建议。","href":"/zh/event-contracts/error-codes"},{"group":"REST API","pages":[{"title":"查询事件列表","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/events","href":"/zh/event-contracts/rest/query-events"},{"title":"查询事件详情","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/events/{event_id}","href":"/zh/event-contracts/rest/query-event"},{"title":"按 Slug 查询事件","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/events/slug/{slug}","href":"/zh/event-contracts/rest/query-event-by-slug"},{"title":"查询市场列表","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/markets","href":"/zh/event-contracts/rest/query-markets"},{"title":"查询市场详情","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/markets/{market_id}","href":"/zh/event-contracts/rest/query-market"},{"title":"按 Slug 查询市场","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/markets/slug/{slug}","href":"/zh/event-contracts/rest/query-market-by-slug"},{"title":"查询市场成交记录","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/markets/{market_id}/trades","href":"/zh/event-contracts/rest/query-market-trades"},{"title":"查询 Token 对应市场","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/tokens/{token_id}/market","href":"/zh/event-contracts/rest/query-token-market"},{"title":"查询 Token 最新价格","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/tokens/{token_id}/price","href":"/zh/event-contracts/rest/query-token-price"},{"title":"查询 Token Ticker","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/tokens/{token_id}/ticker","href":"/zh/event-contracts/rest/query-token-ticker"},{"title":"查询订单簿","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/tokens/{token_id}/order_book","href":"/zh/event-contracts/rest/query-order-book"},{"title":"查询价格历史","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/tokens/{token_id}/price_history","href":"/zh/event-contracts/rest/query-price-history"},{"title":"批量查询 Token 价格","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/tokens/prices","href":"/zh/event-contracts/rest/query-token-prices"},{"title":"查询加密货币 K 线","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/crypto/candlesticks","href":"/zh/event-contracts/rest/query-candlesticks"},{"title":"提交订单","openapi":"openapi/event-contracts.yaml POST /api/v4/broker/event_contracts/orders","href":"/zh/event-contracts/rest/place-order"},{"title":"查询订单列表","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/orders","href":"/zh/event-contracts/rest/query-orders"},{"title":"查询单个订单","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/orders/{order_id}","href":"/zh/event-contracts/rest/query-order"},{"title":"取消单个订单","openapi":"openapi/event-contracts.yaml DELETE /api/v4/broker/event_contracts/orders/{order_id}","href":"/zh/event-contracts/rest/cancel-order"},{"title":"按市场条件批量撤单","openapi":"openapi/event-contracts.yaml DELETE /api/v4/broker/event_contracts/orders","href":"/zh/event-contracts/rest/cancel-orders-by-condition"},{"title":"查询持仓列表","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/positions","href":"/zh/event-contracts/rest/query-positions"},{"title":"查询事件窗口目标价与最终价","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/events/price_to_beat_final_price/{slug}","href":"/zh/event-contracts/rest/query-event-reference-price"},{"title":"查询已结算持仓","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/positions/settled","href":"/zh/event-contracts/rest/query-settled-positions"},{"title":"查询账户余额","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/balance","href":"/zh/event-contracts/rest/query-balance"},{"title":"查询事件合约资金流水","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/fund_flows","href":"/zh/event-contracts/rest/query-fund-flows"},{"title":"事件合约转账","openapi":"openapi/event-contracts.yaml POST /api/v4/broker/event_contracts/transfer","href":"/zh/event-contracts/rest/transfer"},{"title":"查询个人成交","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/usertrades","href":"/zh/event-contracts/rest/query-user-trades"},{"title":"查询账户资产","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/assets","href":"/zh/event-contracts/rest/query-assets"},{"title":"查询资金流水","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/account_book","href":"/zh/event-contracts/rest/query-account-book"},{"title":"查询手续费","openapi":"openapi/event-contracts.yaml GET /api/v4/broker/event_contracts/fee/current","href":"/zh/event-contracts/rest/query-fee"},{"title":"查询标签","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/tags","href":"/zh/event-contracts/rest/query-tags"},{"title":"查询服务器时间","openapi":"openapi/event-contracts.yaml GET /api/v4/event_contracts/time","href":"/zh/event-contracts/rest/query-server-time"}]},{"group":"WebSocket","pages":[{"title":"WebSocket 概览","sidebarTitle":"概览","href":"/zh/event-contracts/websocket/overview"},{"title":"消息协议","sidebarTitle":"消息协议","href":"/zh/event-contracts/websocket/protocol"},{"title":"公共频道","sidebarTitle":"公共频道","href":"/zh/event-contracts/websocket/public-channels"},{"title":"私有频道","sidebarTitle":"私有频道","href":"/zh/event-contracts/websocket/private-channels"},{"title":"Broker WebSocket 认证","sidebarTitle":"认证","href":"/zh/event-contracts/websocket/authentication"}]}]}]}]},{"tab":"更新日志","pages":[{"title":"更新日志","href":"/changelog/event-markets"}]}]},{"language":"en","pages":[{"title":"en","href":"/en/event-contracts/apis"}]},{"language":"zh-TW","pages":[{"title":"zh-TW","href":"/zh-TW/event-contracts/apis"}]}]},"basePath":"","title":"API 接入说明 - DexBuilder Docs","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":[],"chunks":[]}