當使用的運行環境沒有現成 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-TW/event-contracts/apis","slug":"/zh-TW/event-contracts/apis","pageMetadata":{"title":"API 接入說明","sidebarTitle":"接入說明","description":"瞭解何時直接使用事件合約 REST API 與 WebSocket。","href":"/zh-TW/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-TW/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-TW/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":1},"en":{"href":"/en/event-contracts/apis","matchLevel":1},"zh-TW":{"href":"/zh-TW/event-contracts/apis","matchLevel":0}}},"lastModified":"2026-09-18T08:07:37.514Z","originalFileLocation":"zh-TW/event-contracts/apis.mdx","locale":"zh-TW"},"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-TW/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%B4%84+API\u0026amp;title=API+%E6%8E%A5%E5%85%A5%E8%AA%AA%E6%98%8E\u0026amp;description=%E7%9E%AD%E8%A7%A3%E4%BD%95%E6%99%82%E7%9B%B4%E6%8E%A5%E4%BD%BF%E7%94%A8%E4%BA%8B%E4%BB%B6%E5%90%88%E7%B4%84+REST+API+%E8%88%87+WebSocket%E3%80%82\u0026amp;theme=44c035c47b9053b237304c28\u0026amp;signature=f2eac4e82af0efbd92d329a593a849c42f127b1da4bad9136964d5f89fd41ef1\">\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%B4%84+API\u0026amp;title=API+%E6%8E%A5%E5%85%A5%E8%AA%AA%E6%98%8E\u0026amp;description=%E7%9E%AD%E8%A7%A3%E4%BD%95%E6%99%82%E7%9B%B4%E6%8E%A5%E4%BD%BF%E7%94%A8%E4%BA%8B%E4%BB%B6%E5%90%88%E7%B4%84+REST+API+%E8%88%87+WebSocket%E3%80%82\u0026amp;theme=44c035c47b9053b237304c28\u0026amp;signature=f2eac4e82af0efbd92d329a593a849c42f127b1da4bad9136964d5f89fd41ef1\">\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-TW/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-TW/event-contracts/apis.md\">\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=\"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=\"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-TW/event-contracts/apis#webpage\",\"url\":\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/apis\",\"name\":\"API 接入說明\",\"description\":\"瞭解何時直接使用事件合約 REST API 與 WebSocket。\",\"dateModified\":\"2026-09-18T08:07:37.514Z\",\"isPartOf\":{\"@id\":\"https://dexbuilder.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/apis#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/apis#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"事件合約 API\",\"item\":\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/api/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API 接入說明\",\"item\":\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/apis\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/apis#article\",\"headline\":\"API 接入說明\",\"name\":\"API 接入說明\",\"description\":\"瞭解何時直接使用事件合約 REST API 與 WebSocket。\",\"url\":\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/apis\",\"mainEntityOfPage\":{\"@id\":\"https://dexbuilder.mintlify.app/zh-TW/event-contracts/apis#webpage\"},\"dateModified\":\"2026-09-18T08:07:37.514Z\",\"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-TW/event-contracts/apis.md","siteName":"DexBuilder Docs","nav":{"global":null,"languages":[{"language":"zh","pages":[{"title":"zh","href":"/zh/event-contracts/apis"}]},{"language":"en","pages":[{"title":"en","href":"/en/event-contracts/apis"}]},{"language":"zh-TW","tabs":[{"tab":"介紹","pages":[{"title":"介紹","href":"/zh-TW/getting-started/what-is-dexbuilder"}]},{"tab":"在 DexBuilder 上構建","pages":[{"title":"在 DexBuilder 上構建","href":"/zh-TW/builder/architecture"}]},{"tab":"API Reference","menu":[{"item":"接入與通用規則","pages":[{"title":"接入與通用規則","href":"/zh-TW/api-reference/common/overview"}]},{"item":"DexBuilder 平台 API","pages":[{"title":"DexBuilder 平台 API","href":"/zh-TW/api-reference/dexbuilder/overview"}]},{"item":"PerpDEX","pages":[{"title":"PerpDEX","href":"/zh-TW/api-reference/perpdex/overview"}]},{"item":"事件市場","pages":[{"title":"事件市場","href":"/zh-TW/event-markets/api/overview"}]},{"item":"事件合約","pages":[{"group":"事件合約 API","pages":[{"title":"API 概覽","sidebarTitle":"API 概覽","description":"事件合約 API 的基礎位址、存取模型、分頁、時間與錯誤約定。","href":"/zh-TW/event-contracts/api/overview"},{"title":"API 接入說明","sidebarTitle":"接入說明","href":"/zh-TW/event-contracts/apis"},{"title":"錯誤碼","sidebarTitle":"錯誤碼","description":"事件合約 API 常見 HTTP 錯誤、原因及處理建議。","href":"/zh-TW/event-contracts/error-codes"},{"group":"REST API","pages":[{"title":"查詢事件清單","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/events","href":"/zh-TW/event-contracts/rest/query-events"},{"title":"查詢事件詳情","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/events/{event_id}","href":"/zh-TW/event-contracts/rest/query-event"},{"title":"按 Slug 查詢事件","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/events/slug/{slug}","href":"/zh-TW/event-contracts/rest/query-event-by-slug"},{"title":"查詢市場清單","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/markets","href":"/zh-TW/event-contracts/rest/query-markets"},{"title":"查詢市場詳情","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/markets/{market_id}","href":"/zh-TW/event-contracts/rest/query-market"},{"title":"按 Slug 查詢市場","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/markets/slug/{slug}","href":"/zh-TW/event-contracts/rest/query-market-by-slug"},{"title":"查詢市場成交記錄","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/markets/{market_id}/trades","href":"/zh-TW/event-contracts/rest/query-market-trades"},{"title":"查詢 Token 對應市場","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/tokens/{token_id}/market","href":"/zh-TW/event-contracts/rest/query-token-market"},{"title":"查詢 Token 最新價格","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/tokens/{token_id}/price","href":"/zh-TW/event-contracts/rest/query-token-price"},{"title":"查詢 Token Ticker","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/tokens/{token_id}/ticker","href":"/zh-TW/event-contracts/rest/query-token-ticker"},{"title":"查詢訂單簿","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/tokens/{token_id}/order_book","href":"/zh-TW/event-contracts/rest/query-order-book"},{"title":"查詢價格歷史","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/tokens/{token_id}/price_history","href":"/zh-TW/event-contracts/rest/query-price-history"},{"title":"批量查詢 Token 價格","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/tokens/prices","href":"/zh-TW/event-contracts/rest/query-token-prices"},{"title":"查詢加密貨幣 K 線","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/crypto/candlesticks","href":"/zh-TW/event-contracts/rest/query-candlesticks"},{"title":"提交訂單","openapi":"openapi/event-contracts-zh-TW.yaml POST /api/v4/broker/event_contracts/orders","href":"/zh-TW/event-contracts/rest/place-order"},{"title":"查詢訂單清單","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/orders","href":"/zh-TW/event-contracts/rest/query-orders"},{"title":"查詢單個訂單","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/orders/{order_id}","href":"/zh-TW/event-contracts/rest/query-order"},{"title":"取消單個訂單","openapi":"openapi/event-contracts-zh-TW.yaml DELETE /api/v4/broker/event_contracts/orders/{order_id}","href":"/zh-TW/event-contracts/rest/cancel-order"},{"title":"按市場條件批量撤單","openapi":"openapi/event-contracts-zh-TW.yaml DELETE /api/v4/broker/event_contracts/orders","href":"/zh-TW/event-contracts/rest/cancel-orders-by-condition"},{"title":"查詢持倉清單","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/positions","href":"/zh-TW/event-contracts/rest/query-positions"},{"title":"查詢事件視窗目標價與最終價","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/events/price_to_beat_final_price/{slug}","href":"/zh-TW/event-contracts/rest/query-event-reference-price"},{"title":"查詢已結算持倉","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/positions/settled","href":"/zh-TW/event-contracts/rest/query-settled-positions"},{"title":"查詢帳戶餘額","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/balance","href":"/zh-TW/event-contracts/rest/query-balance"},{"title":"查詢事件合約資金流水","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/fund_flows","href":"/zh-TW/event-contracts/rest/query-fund-flows"},{"title":"事件合約轉帳","openapi":"openapi/event-contracts-zh-TW.yaml POST /api/v4/broker/event_contracts/transfer","href":"/zh-TW/event-contracts/rest/transfer"},{"title":"查詢個人成交","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/usertrades","href":"/zh-TW/event-contracts/rest/query-user-trades"},{"title":"查詢帳戶資產","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/assets","href":"/zh-TW/event-contracts/rest/query-assets"},{"title":"查詢資金流水","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/account_book","href":"/zh-TW/event-contracts/rest/query-account-book"},{"title":"查詢手續費","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/broker/event_contracts/fee/current","href":"/zh-TW/event-contracts/rest/query-fee"},{"title":"查詢標籤","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/tags","href":"/zh-TW/event-contracts/rest/query-tags"},{"title":"查詢伺服器時間","openapi":"openapi/event-contracts-zh-TW.yaml GET /api/v4/event_contracts/time","href":"/zh-TW/event-contracts/rest/query-server-time"}]},{"group":"WebSocket","pages":[{"title":"WebSocket 概覽","sidebarTitle":"概覽","href":"/zh-TW/event-contracts/websocket/overview"},{"title":"消息協議","sidebarTitle":"消息協議","href":"/zh-TW/event-contracts/websocket/protocol"},{"title":"公共頻道","sidebarTitle":"公共頻道","href":"/zh-TW/event-contracts/websocket/public-channels"},{"title":"私有頻道","sidebarTitle":"私有頻道","href":"/zh-TW/event-contracts/websocket/private-channels"},{"title":"Broker WebSocket 認證","sidebarTitle":"認證","href":"/zh-TW/event-contracts/websocket/authentication"}]}]}]}]},{"tab":"更新日誌","pages":[{"title":"更新日誌","href":"/zh-TW/changelog/event-markets"}]}]}]},"basePath":"","title":"API 接入說明 - DexBuilder Docs","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":[],"chunks":[]}