Connect to the Anchorage Digital WebSocket API for real-time market data.
The Anchorage Digital WebSocket API supports the WebSocket protocol for real-time market data.Endpoint:wss://api.anchorage.com/ws/v2/trading
Protocol
This WebSocket API uses a bidirectional protocol that encodes all messages as JSON objects. Each message includes a messageType attribute for handling message types appropriately.
Subscribe
Send a subscribe message with the appropriate messageType to specify which channel you want to receive.
Customer-specific market data
Subscribes to market data scoped to a specific account or subaccount by passing either the optional accountId or subaccountId field.By account:
Messages include a sequence number: an incrementing integer starting at 1. Each message is exactly one greater than the previous.
Supported channels
Channel
Description
MarketDataSnapshotRequest
Market depth updates
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Anchorage Digital","colors":{"primary":"#5580F6","light":"#5580F6","dark":"#5580F6"},"logo":{"light":"https://mintcdn.com/deployment-4/ikVMLMsizDmk_7Sw/knowledge-base/images/logo-lockup-dark.svg?fit=max\u0026auto=format\u0026n=ikVMLMsizDmk_7Sw\u0026q=85\u0026s=87028c6755f355e278de66991913b91c","dark":"https://mintcdn.com/deployment-4/ikVMLMsizDmk_7Sw/knowledge-base/images/logo-lockup-light.svg?fit=max\u0026auto=format\u0026n=ikVMLMsizDmk_7Sw\u0026q=85\u0026s=1b56e9a2511c5c765bb60eb80f10491d","href":"/"},"favicon":{"light":"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026auto=format\u0026n=GSah06OFrRxxO1iB\u0026q=85\u0026s=dbc56a4b9970aa0cc3b83e27e2063715","dark":"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026auto=format\u0026n=GSah06OFrRxxO1iB\u0026q=85\u0026s=dbc56a4b9970aa0cc3b83e27e2063715"},"api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript"]}},"appearance":{"default":"system"},"background":{"color":{"light":"#F4F5F5","dark":"#000"}},"navbar":{"links":[{"href":"/knowledge-base/login","label":"Log in"},{"href":"https://www.anchorage.com","label":"Anchorage.com"},{"href":"https://www.anchorage.com/get-in-touch","label":"Contact"}]},"footer":{"socials":{"x":"https://x.com/Anchorage","linkedin":"https://www.linkedin.com/company/anchorage","youtube":"https://www.youtube.com/c/AnchorageDigital"}},"styling":{"eyebrows":"breadcrumbs","latex":true},"errors":{"404":{"redirect":true,"title":"Oops, something went wrong","description":"The content you're looking for is missing. Contact Anchorage Digital for support."}},"contextual":{"options":["claude","mcp","add-mcp","copy","view","assistant","chatgpt","perplexity","grok","aistudio","devin","windsurf","cursor","vscode","devin-mcp"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"deployment-4","hasAudioNarration":false,"actualSubdomain":"deployment-4","customDomains":["docs.anchorage.com"],"gitSource":{"_id":"6ad7fa92692c7c940ff17a2f","type":"github","owner":"anchorlabsinc","repo":"knowledge-base","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"knowledge-base","label":""},"feedback":{"agentFeedback":true,"contextualFeedback":{"allowEmail":true},"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0a0698689ff78185fa5268","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"Anchorage Digital","count":397},{"language":"default","tag":"API reference","count":349},{"language":"default","tag":"v2","count":267},{"language":"default","tag":"Porto","count":254},{"language":"default","tag":"User guides","count":169},{"language":"default","tag":"Developer guides","count":123},{"language":"default","tag":"Move money","count":94},{"language":"default","tag":"Trading","count":85},{"language":"default","tag":"Platform","count":79},{"language":"default","tag":"v4","count":61}],"searchSettings":{"isFiltersEnabled":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"site-roles","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":"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":"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":"turbopuffer-dual-write","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":"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},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"knowledge-base/custom.css","href":"/_mintlify/custom/deployment-4/3851477207c6fc6b/knowledge-base/custom.css"}]}
{"page":{"pagePath":"knowledge-base/platform/developers/trading/websocket-getting-started","slug":"/knowledge-base/platform/developers/trading/websocket-getting-started","pageMetadata":{"title":"Getting started","description":"Connect to the Anchorage Digital WebSocket API for real-time market data.","href":"/knowledge-base/platform/developers/trading/websocket-getting-started"},"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: \"Connect to the Anchorage Digital WebSocket API for real-time market data.\"\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];const Check=()=>{const{Icon}=_provideComponents()||{};if(!Icon)_missingMdxReference(`Icon`,true);return _jsx(Icon,{icon:`check`,color:`#049159`})};const Cross=()=>{const{Icon}=_provideComponents()||{};if(!Icon)_missingMdxReference(`Icon`,true);return _jsx(Icon,{icon:`x`,color:`#dd0000`})};function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Table,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The Anchorage Digital WebSocket API supports the WebSocket protocol for real-time market data.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`wss://api.anchorage.com/ws/v2/trading`})]}),`\n`,_jsx(Heading,{level:`2`,id:`protocol`,children:`Protocol`}),`\n`,_jsxs(_components.p,{children:[`This WebSocket API uses a bidirectional protocol that encodes all messages as JSON objects. Each message includes a `,_jsx(_components.code,{children:`messageType`}),` attribute for handling message types appropriately.`]}),`\n`,_jsx(Heading,{level:`2`,id:`subscribe`,children:`Subscribe`}),`\n`,_jsxs(_components.p,{children:[`Send a subscribe message with the appropriate `,_jsx(_components.code,{children:`messageType`}),` to specify which channel you want to receive.`]}),`\n`,_jsx(Heading,{level:`3`,id:`customer-specific-market-data`,children:`Customer-specific market data`}),`\n`,_jsxs(_components.p,{children:[`Subscribes to market data scoped to a specific account or subaccount by passing either the optional `,_jsx(_components.code,{children:`accountId`}),` or `,_jsx(_components.code,{children:`subaccountId`}),` field.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`By account:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MarketDataSnapshotRequest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2023-01-24T08:22:18.598364\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BTC-USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reqId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0d921bca-6599-4841-95ee-7b6984e2486f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"f7823b57-aeb2-11f0-a565-3ecdccd5480d\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`By subaccount:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MarketDataSnapshotRequest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2023-01-24T08:22:18.598364\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BTC-USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reqId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0d921bca-6599-4841-95ee-7b6984e2486f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subaccountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5db3bae2-c3c6-4d7d-97af-47c923135661\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`symbol`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`Check`,children:_jsx(Check,{})})}),_jsxs(_components.td,{children:[`Trading pair, e.g. `,_jsx(_components.code,{children:`BTC-USD`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reqId`})}),_jsx(_components.td,{children:`string (UUID)`}),_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`Check`,children:_jsx(Check,{})})}),_jsx(_components.td,{children:`Unique request ID for this subscription`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accountId`})}),_jsx(_components.td,{children:`string (UUID)`}),_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`Cross`,children:_jsx(Cross,{})})}),_jsxs(_components.td,{children:[`Scopes the feed to a specific account. Use either `,_jsx(_components.code,{children:`accountId`}),` or `,_jsx(_components.code,{children:`subaccountId`}),`, not both.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`subaccountId`})}),_jsx(_components.td,{children:`string (UUID)`}),_jsx(_components.td,{children:_jsx(_MdxComponentBoundary,{name:`Cross`,children:_jsx(Cross,{})})}),_jsxs(_components.td,{children:[`Scopes the feed to a specific subaccount. Use either `,_jsx(_components.code,{children:`accountId`}),` or `,_jsx(_components.code,{children:`subaccountId`}),`, not both.`]})]})]})]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`subaccountId`}),` applies to RIA customers only.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`global-market-data`,children:`Global market data`}),`\n`,_jsx(_components.p,{children:`Subscribes to market data without any account filter. All participants receive the same feed.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MarketDataSnapshotRequest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2023-01-24T08:22:18.598364\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BTC-USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reqId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0d921bca-6599-4841-95ee-7b6984e2486f\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`unsubscribe`,children:`Unsubscribe`}),`\n`,_jsxs(_components.p,{children:[`To unsubscribe from a channel, send an unsubscribe message with the same `,_jsx(_components.code,{children:`symbol`}),`. The `,_jsx(_components.code,{children:`reqId`}),` does not need to match the original subscription request.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MarketDataSnapshotRequest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2023-01-24T09:04:57.146353\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unsubscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BTC-USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reqId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"88f401f3-f0d1-4f1d-85cc-3d0b377e8c9a\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`sequence-numbers`,children:`Sequence numbers`}),`\n`,_jsxs(_components.p,{children:[`Messages include a sequence number: an incrementing integer starting at `,_jsx(_components.code,{children:`1`}),`. Each message is exactly one greater than the previous.`]}),`\n`,_jsx(Heading,{level:`2`,id:`supported-channels`,children:`Supported channels`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Channel`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`MarketDataSnapshotRequest`}),_jsx(_components.td,{children:`Market depth updates`})]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{Check,Cross,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":"Getting started","description":"Connect to the Anchorage Digital WebSocket API for real-time market data.","href":"/knowledge-base/platform/developers/trading/websocket-getting-started"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[144,290,"null;const Cross=()="]]},"mdxExtracts":{"tableOfContents":[{"title":"Protocol","slug":"protocol","depth":2,"children":[]},{"title":"Subscribe","slug":"subscribe","depth":2,"children":[{"title":"Customer-specific market data","slug":"customer-specific-market-data","depth":3,"children":[]},{"title":"Global market data","slug":"global-market-data","depth":3,"children":[]}]},{"title":"Unsubscribe","slug":"unsubscribe","depth":2,"children":[]},{"title":"Sequence numbers","slug":"sequence-numbers","depth":2,"children":[]},{"title":"Supported channels","slug":"supported-channels","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"deployment-4","siteName":"Anchorage Digital","title":"Getting started - Anchorage Digital","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{},"searchTabScopes":[{"product":"Anchorage Digital","tab":"User guides"},{"product":"Anchorage Digital","tab":"Developer guides"},{"product":"Anchorage Digital","tab":"API reference"},{"product":"Anchorage Digital","tab":"Build with AI"},{"product":"Porto","tab":"User guides"},{"product":"Porto","tab":"Developer guides"},{"product":"Porto","tab":"API reference"},{"product":"Porto","tab":"Build with AI"},{"product":"Agentic Banking","tab":"Guides"},{"product":"Agentic Banking","tab":"Changelog"}]},"lastModified":"2026-11-12T18:16:37.659Z","originalFileLocation":"knowledge-base/platform/developers/trading/websocket-getting-started.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=\"Connect to the Anchorage Digital WebSocket API for real-time market data.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Anchorage Digital\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/svg+xml\" sizes=\"180x180\" href=\"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026amp;auto=format\u0026amp;n=GSah06OFrRxxO1iB\u0026amp;q=85\u0026amp;s=dbc56a4b9970aa0cc3b83e27e2063715\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026amp;auto=format\u0026amp;n=GSah06OFrRxxO1iB\u0026amp;q=85\u0026amp;s=dbc56a4b9970aa0cc3b83e27e2063715\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026amp;auto=format\u0026amp;n=GSah06OFrRxxO1iB\u0026amp;q=85\u0026amp;s=dbc56a4b9970aa0cc3b83e27e2063715\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026amp;auto=format\u0026amp;n=GSah06OFrRxxO1iB\u0026amp;q=85\u0026amp;s=dbc56a4b9970aa0cc3b83e27e2063715\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026amp;auto=format\u0026amp;n=GSah06OFrRxxO1iB\u0026amp;q=85\u0026amp;s=dbc56a4b9970aa0cc3b83e27e2063715\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026amp;auto=format\u0026amp;n=GSah06OFrRxxO1iB\u0026amp;q=85\u0026amp;s=dbc56a4b9970aa0cc3b83e27e2063715\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/deployment-4/GSah06OFrRxxO1iB/knowledge-base/favicon-symbol.svg?fit=max\u0026amp;auto=format\u0026amp;n=GSah06OFrRxxO1iB\u0026amp;q=85\u0026amp;s=dbc56a4b9970aa0cc3b83e27e2063715\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Getting started - Anchorage Digital\">\u003cmeta data-mint-head property=\"og:description\" content=\"Connect to the Anchorage Digital WebSocket API for real-time market data.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Anchorage Digital\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://deployment-4.mintlify.site/_mintlify/api/og/v2?division=WebSocket+API\u0026amp;title=Getting+started\u0026amp;description=Connect+to+the+Anchorage+Digital+WebSocket+API+for+real-time+market+data.\u0026amp;theme=813001ef3ccb97d387d13daf\u0026amp;signature=1e5191363d49b49bce124bf7f252c00e1cde7eb7d1553bff7b92a107e2d4d76c\">\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=\"Getting started - Anchorage Digital\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Connect to the Anchorage Digital WebSocket API for real-time market data.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://deployment-4.mintlify.site/_mintlify/api/og/v2?division=WebSocket+API\u0026amp;title=Getting+started\u0026amp;description=Connect+to+the+Anchorage+Digital+WebSocket+API+for+real-time+market+data.\u0026amp;theme=813001ef3ccb97d387d13daf\u0026amp;signature=1e5191363d49b49bce124bf7f252c00e1cde7eb7d1553bff7b92a107e2d4d76c\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/deployment-4/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Anchorage Digital\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5580F6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/knowledge-base/platform/developers/trading/websocket-getting-started.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.anchorage.com/#organization\",\"name\":\"Anchorage Digital\",\"url\":\"https://docs.anchorage.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/deployment-4/ikVMLMsizDmk_7Sw/knowledge-base/images/logo-lockup-dark.svg?fit=max\u0026auto=format\u0026n=ikVMLMsizDmk_7Sw\u0026q=85\u0026s=87028c6755f355e278de66991913b91c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.anchorage.com#website\",\"name\":\"Anchorage Digital\",\"url\":\"https://docs.anchorage.com\",\"publisher\":{\"@id\":\"https://docs.anchorage.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started#webpage\",\"url\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started\",\"name\":\"Getting started\",\"description\":\"Connect to the Anchorage Digital WebSocket API for real-time market data.\",\"dateModified\":\"2026-11-12T18:16:37.659Z\",\"isPartOf\":{\"@id\":\"https://docs.anchorage.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform\",\"item\":\"https://docs.anchorage.com/knowledge-base/platform/developers/permission-groups\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Trading\",\"item\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Getting started\",\"item\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started#article\",\"headline\":\"Getting started\",\"name\":\"Getting started\",\"description\":\"Connect to the Anchorage Digital WebSocket API for real-time market data.\",\"url\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started\",\"mainEntityOfPage\":{\"@id\":\"https://docs.anchorage.com/knowledge-base/platform/developers/trading/websocket-getting-started#webpage\"},\"dateModified\":\"2026-11-12T18:16:37.659Z\",\"publisher\":{\"@id\":\"https://docs.anchorage.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.anchorage.com#website\"}}]}\u003c/script>","agentPointerHref":"/knowledge-base/platform/developers/trading/websocket-getting-started.md","siteName":"Anchorage Digital","nav":{"global":null,"products":[{"product":"Home","icon":"house","pages":[{"title":"Home","href":"/knowledge-base"}]},{"product":"Anchorage Digital","icon":"https://mintlify.s3.us-west-1.amazonaws.com/deployment-4/knowledge-base/images/icons/anchorage.svg","tabs":[{"tab":"User guides","pages":[{"title":"User guides","href":"/knowledge-base/platform/users/overview"}]},{"tab":"Developer guides","groups":[{"group":"Platform","pages":[{"group":"Getting started","public":true,"icon":"rocket","pages":[{"group":"Setting up","root":{"title":"Setting up","href":"/knowledge-base/platform/developers/setting-up"},"pages":[{"title":"Permission groups","href":"/knowledge-base/platform/developers/permission-groups"},{"title":"API keys","href":"/knowledge-base/platform/developers/api-keys"},{"title":"Signing requests","href":"/knowledge-base/platform/developers/request-signing"}]},{"group":"Sandbox","root":{"title":"Sandbox overview","href":"/knowledge-base/platform/developers/sandbox/sandbox-overview"},"pages":[{"title":"Sandbox onboarding","href":"/knowledge-base/platform/developers/sandbox/sandbox-onboarding"},{"title":"Sandbox testing guide","href":"/knowledge-base/platform/developers/sandbox/sandbox-testing-guide"}]},{"title":"FAQs","href":"/knowledge-base/platform/developers/faqs"}]},{"group":"Account structure","public":true,"icon":"code-branch","pages":[{"title":"Account hierarchy","href":"/knowledge-base/platform/developers/account-hierarchy"},{"title":"Mapping wallets to on-chain addresses","href":"/knowledge-base/platform/developers/wallet-address-model"},{"title":"Exploring account structures","mode":"custom","href":"/knowledge-base/platform/developers/account-structure-explorer"},{"title":"B2B2X accounts","href":"/knowledge-base/platform/developers/b2b2x"}]},{"group":"Move money","public":true,"icon":"hand-holding-dollar","pages":[{"group":"Overview","root":{"title":"Overview","href":"/knowledge-base/platform/developers/move-money/overview"},"expanded":false,"pages":[{"title":"Permission groups and API keys","href":"/knowledge-base/platform/developers/move-money/setup/permission-groups"},{"title":"Authentication and request signing","href":"/knowledge-base/platform/developers/move-money/setup/authentication"}]},{"group":"Transfers and withdrawals","root":{"title":"Transfers and withdrawals","href":"/knowledge-base/platform/developers/move-money/transfers-vs-withdrawals"},"expanded":false,"pages":[{"group":"Destination setup","expanded":false,"pages":[{"group":"Any destination","expanded":false,"pages":[{"title":"Any destination bank transfers","sidebarTitle":"Bank account","tag":"BETA","href":"/knowledge-base/platform/developers/move-money/setup/any-destination-bank-account"}]},{"group":"Trusted destination","root":{"title":"Trusted destinations","href":"/knowledge-base/platform/developers/move-money/setup/trusted-destinations"},"expanded":false,"pages":[{"title":"Crypto trusted destinations","sidebarTitle":"Crypto","href":"/knowledge-base/platform/developers/move-money/setup/trusted-destinations-crypto"},{"title":"USD trusted destinations","sidebarTitle":"Bank account","href":"/knowledge-base/platform/developers/move-money/setup/trusted-destinations-bank-account"}]}]},{"title":"AML questionnaire","href":"/knowledge-base/platform/developers/move-money/setup/aml-questionnaire"},{"group":"Transfer","expanded":false,"pages":[{"group":"Crypto transfer","root":{"title":"Internal transfer","href":"/knowledge-base/platform/developers/move-money/transfer/crypto/internal"},"expanded":false,"pages":[{"title":"Internal transfer","href":"/knowledge-base/platform/developers/move-money/transfer/crypto/internal"},{"title":"External transfer","href":"/knowledge-base/platform/developers/move-money/transfer/crypto/external"}]},{"group":"USD transfer","root":{"title":"Internal transfer","href":"/knowledge-base/platform/developers/move-money/transfer/usd/internal"},"expanded":false,"pages":[{"title":"Internal transfer","href":"/knowledge-base/platform/developers/move-money/transfer/usd/internal"},{"group":"Wire transfers","root":{"title":"Domestic wire transfer","href":"/knowledge-base/platform/developers/move-money/transfer/usd/wire/domestic"},"expanded":false,"pages":[{"title":"Domestic wire transfer","href":"/knowledge-base/platform/developers/move-money/transfer/usd/wire/domestic"},{"title":"International wire transfer","href":"/knowledge-base/platform/developers/move-money/transfer/usd/wire/international"}]},{"group":"ACH transfers","root":{"title":"ACH credit transfer","sidebarTitle":"Credit (push) ","tag":"In development","href":"/knowledge-base/platform/developers/move-money/transfer/usd/ach/credit"},"expanded":false,"pages":[{"title":"ACH credit transfer","sidebarTitle":"Credit (push) ","tag":"In development","href":"/knowledge-base/platform/developers/move-money/transfer/usd/ach/credit"},{"title":"ACH debit transfer","sidebarTitle":"Debit (pull) ","tag":"In development","href":"/knowledge-base/platform/developers/move-money/transfer/usd/ach/debit"}]}]}]},{"group":"Withdraw","expanded":false,"pages":[{"title":"Crypto withdrawal","href":"/knowledge-base/platform/developers/move-money/withdraw/crypto"},{"group":"USD withdrawal","root":{"title":"Internal withdrawals","href":"/knowledge-base/platform/developers/move-money/withdraw/usd/internal"},"expanded":false,"pages":[{"title":"Internal withdrawals","href":"/knowledge-base/platform/developers/move-money/withdraw/usd/internal"},{"group":"Wire withdrawals","root":{"title":"Domestic wire withdrawal","href":"/knowledge-base/platform/developers/move-money/withdraw/usd/wire/domestic"},"expanded":false,"pages":[{"title":"Domestic wire withdrawal","href":"/knowledge-base/platform/developers/move-money/withdraw/usd/wire/domestic"},{"title":"International wire withdrawal","href":"/knowledge-base/platform/developers/move-money/withdraw/usd/wire/international"}]},{"group":"ACH withdrawals","root":{"title":"ACH credit withdrawal","sidebarTitle":"Credit (push) ","tag":"In development","href":"/knowledge-base/platform/developers/move-money/withdraw/usd/ach/credit"},"expanded":false,"pages":[{"title":"ACH credit withdrawal","sidebarTitle":"Credit (push) ","tag":"In development","href":"/knowledge-base/platform/developers/move-money/withdraw/usd/ach/credit"},{"title":"ACH debit withdrawal","sidebarTitle":"Debit (pull) ","tag":"In development","href":"/knowledge-base/platform/developers/move-money/withdraw/usd/ach/debit"}]}]}]}]},{"group":"Deposit","root":{"title":"Deposit","href":"/knowledge-base/platform/developers/move-money/deposit"},"expanded":false,"pages":[{"title":"Crypto deposit","href":"/knowledge-base/platform/developers/move-money/deposit/crypto"},{"group":"USD deposit","root":{"title":"Domestic deposit","href":"/knowledge-base/platform/developers/move-money/deposit/wire/domestic"},"expanded":false,"pages":[{"group":"Wire deposit","root":{"title":"Domestic deposit","href":"/knowledge-base/platform/developers/move-money/deposit/wire/domestic"},"expanded":false,"pages":[{"title":"Domestic deposit","href":"/knowledge-base/platform/developers/move-money/deposit/wire/domestic"},{"title":"International deposit","href":"/knowledge-base/platform/developers/move-money/deposit/wire/international"}]},{"group":"ACH deposit","root":{"title":"Credit (push)","tag":"In development","href":"/knowledge-base/platform/developers/move-money/deposit/ach/credit"},"expanded":false,"pages":[{"title":"Credit (push)","tag":"In development","href":"/knowledge-base/platform/developers/move-money/deposit/ach/credit"},{"title":"Debit (pull)","tag":"In development","href":"/knowledge-base/platform/developers/move-money/deposit/ach/debit"}]}]},{"title":"USD interest","href":"/knowledge-base/platform/developers/move-money/deposit/usd-interest"}]},{"group":"Operate","root":{"title":"Operate","href":"/knowledge-base/platform/developers/move-money/operate"},"expanded":false,"pages":[{"title":"Track movement status","href":"/knowledge-base/platform/developers/move-money/operate/track-status"},{"title":"Network \u0026 gas fees","href":"/knowledge-base/platform/developers/network-gas-fees"},{"title":"Clearing a wallet","href":"/knowledge-base/platform/developers/move-money/operate/full-balance-sends"},{"title":"Use gas station with the API","href":"/knowledge-base/platform/developers/gas-station-api"},{"title":"Bitcoin address types","href":"/knowledge-base/platform/developers/bitcoin-address-types"}]}]},{"group":"Stablecoins","public":true,"icon":"coins","pages":[{"group":"Overview","root":{"title":"Overview","href":"/knowledge-base/platform/developers/stablecoins/overview"},"expanded":false,"pages":[{"title":"Set up","href":"/knowledge-base/platform/developers/stablecoins/setup"}]},{"group":"Convert stablecoins","root":{"title":"Convert stablecoins","href":"/knowledge-base/platform/developers/stablecoins/convert"},"expanded":false,"pages":[{"title":"Mint","href":"/knowledge-base/platform/developers/stablecoins/convert/mint"},{"title":"Redeem (burn)","href":"/knowledge-base/platform/developers/stablecoins/convert/redeem"},{"title":"Bridge across chains","href":"/knowledge-base/platform/developers/stablecoins/convert/bridge"}]},{"group":"Operate","root":{"title":"Operate","href":"/knowledge-base/platform/developers/stablecoins/operate"},"expanded":false,"pages":[{"title":"Track conversion status","href":"/knowledge-base/platform/developers/stablecoins/operate/track-status"}]}]},{"group":"Staking","public":true,"icon":"percent","pages":[{"title":"Overview","href":"/knowledge-base/platform/developers/staking/staking-overview"},{"group":"Staking via API","expanded":false,"pages":[{"group":"ETH","pages":[{"title":"Pre-Pectra staking","href":"/knowledge-base/platform/developers/staking/eth-staking"},{"title":"Pectra staking","href":"/knowledge-base/platform/developers/staking/eth-pectra-staking"}]},{"title":"SOL","deprecated":false,"hidden":false,"href":"/knowledge-base/platform/developers/staking/sol-staking"}]},{"title":"Building staking reporting","href":"/knowledge-base/platform/developers/staking/staking-reporting"}]},{"group":"Atlas","public":true,"icon":"network-wired","pages":[{"title":"Settlement API integration guide","href":"/knowledge-base/platform/developers/atlas/atlas-settlement-api"},{"title":"Exploring settlement workflows","mode":"custom","href":"/knowledge-base/platform/developers/atlas/atlas-settlement-explorer"},{"title":"Atlas collateral management","href":"/knowledge-base/platform/developers/atlas/atlas-collateral-management"}]},{"group":"Trading","public":true,"icon":"chart-line","pages":[{"title":"Overview","href":"/knowledge-base/platform/developers/trading/overview"},{"title":"Quickstart","href":"/knowledge-base/platform/developers/trading/quickstart"},{"group":"Trading API","expanded":false,"pages":[{"title":"Getting trading data","href":"/knowledge-base/platform/developers/trading/read-apis"},{"title":"Quote \u0026 placing orders","href":"/knowledge-base/platform/developers/trading/rfq-orders"},{"title":"Settlement process","description":"How trades settle at Anchorage Digital, including pre-funded and credit limit settlement flows.","href":"/knowledge-base/platform/developers/trading/settlement"}]},{"group":"WebSocket API","expanded":false,"pages":[{"title":"Getting started","href":"/knowledge-base/platform/developers/trading/websocket-getting-started"},{"title":"Authentication","description":"Authenticate WebSocket connections using API keys and Ed25519 signatures.","href":"/knowledge-base/platform/developers/trading/websocket-authentication"},{"title":"Submitting orders","href":"/knowledge-base/platform/developers/trading/websocket-submit-order"},{"title":"Market data","href":"/knowledge-base/platform/developers/trading/websocket-market-data"}]}]},{"group":"Webhooks","public":true,"icon":"webhook","pages":[{"title":"Overview","href":"/knowledge-base/platform/developers/webhooks/webhooks-overview"},{"title":"Configure webhooks","href":"/knowledge-base/platform/developers/webhooks/webhooks-configure"},{"title":"Delivery and reliability","href":"/knowledge-base/platform/developers/webhooks/webhooks-delivery"},{"title":"Webhook testing","href":"/knowledge-base/platform/developers/webhooks/webhooks-sandbox"}]},{"group":"Tax","public":true,"icon":"receipt","pages":[{"title":"Cost basis via API","href":"/knowledge-base/platform/developers/tax/cost-basis"}]},{"group":"Reporting","public":true,"icon":"chart-column","pages":[{"title":"Reporting overview","href":"/knowledge-base/platform/developers/reporting/overview"},{"title":"Audit trail via API","tag":"In development","href":"/knowledge-base/platform/developers/reporting/audit-trail"}]}]},{"group":"Crypto as a Service","tag":"BETA","pages":[{"group":"Get started","public":true,"icon":"rocket","pages":[{"title":"Overview","href":"/knowledge-base/platform/developers/caas/caas-overview"},{"title":"Getting started","href":"/knowledge-base/platform/developers/caas/caas-getting-started"}]},{"group":"Accounts","public":true,"icon":"building","pages":[{"title":"Accounts","href":"/knowledge-base/platform/developers/caas/caas-accounts"}]},{"group":"Money movement","public":true,"icon":"money-bill-transfer","pages":[{"title":"Crypto deposits","href":"/knowledge-base/platform/developers/caas/caas-deposits-crypto"},{"title":"USD deposits","href":"/knowledge-base/platform/developers/caas/caas-deposits-usd"},{"title":"Trusted destinations","href":"/knowledge-base/platform/developers/caas/caas-trusted-destinations"},{"title":"Withdrawals","href":"/knowledge-base/platform/developers/caas/caas-withdrawals"}]},{"group":"Trading and reporting","public":true,"icon":"chart-line","pages":[{"title":"Orders","href":"/knowledge-base/platform/developers/caas/caas-orders"},{"title":"Balances","href":"/knowledge-base/platform/developers/caas/caas-balances"},{"title":"Transactions","href":"/knowledge-base/platform/developers/caas/caas-transactions"},{"title":"Reconciliation files","href":"/knowledge-base/platform/developers/caas/caas-reconciliation-files"},{"title":"Assets","href":"/knowledge-base/platform/developers/caas/caas-assets"}]},{"group":"Governance","public":true,"icon":"key","pages":[{"title":"Policies and approvals","href":"/knowledge-base/platform/developers/caas/caas-policies"}]}]},{"group":"Solutions","pages":[{"group":"Wealth management","public":true,"icon":"money-bill-trend-up","hidden":true,"pages":[{"title":"Overview","icon":"book-open","href":"/knowledge-base/platform/developers/wealth/wealth-management-overview"},{"group":"Onboarding","icon":"user-plus","expanded":false,"pages":[{"title":"Onboard individuals","href":"/knowledge-base/platform/developers/wealth/wealth-management-onboarding-individuals"},{"title":"Onboard businesses","href":"/knowledge-base/platform/developers/wealth/wealth-management-onboarding-institutions"},{"title":"Onboarding examples","href":"/knowledge-base/platform/developers/wealth/wealth-management-onboarding-examples"}]},{"group":"Money movement","icon":"money-bill-transfer","expanded":false,"pages":[{"title":"Fiat deposits and withdrawals","href":"/knowledge-base/platform/developers/wealth/wealth-management-fiat-deposits-withdrawals"},{"title":"Crypto deposits and withdrawals","href":"/knowledge-base/platform/developers/wealth/wealth-management-crypto-deposits-withdrawals"}]},{"group":"Trading","icon":"chart-line","expanded":false,"pages":[{"title":"Trading","href":"/knowledge-base/platform/developers/wealth/wealth-management-trading"},{"title":"Tax optimization","href":"/knowledge-base/platform/developers/wealth/wealth-management-tax-optimization"}]},{"title":"Asset-backed loans","icon":"sack-dollar","href":"/knowledge-base/platform/developers/wealth/wealth-management-asset-backed-loans"},{"group":"Reporting and billing","icon":"file-invoice-dollar","expanded":false,"pages":[{"title":"Statements","href":"/knowledge-base/platform/developers/wealth/wealth-management-statements"},{"title":"Tax","href":"/knowledge-base/platform/developers/wealth/wealth-management-tax"},{"title":"Billing and fees","href":"/knowledge-base/platform/developers/wealth/wealth-management-subaccounts"}]},{"group":"Get started","icon":"rocket","expanded":false,"pages":[{"title":"Configure sandbox","href":"/knowledge-base/platform/developers/wealth/wealth-management-api-config"},{"title":"Terms and conditions","icon":"file-signature","href":"/knowledge-base/platform/developers/wealth/wealth-management-onboarding-terms-types"}]}]},{"group":"ETF","public":true,"icon":"chart-pie","pages":[{"title":"Overview","icon":"book-open","href":"/knowledge-base/platform/developers/etf/etf-overview"},{"title":"Report on ETF balances and transactions","icon":"file-chart-column","href":"/knowledge-base/platform/developers/etf/etf-subledger-reporting"}]},{"group":"Named Virtual Accounts","public":true,"icon":"layer-group","pages":[{"title":"Overview","icon":"book-open","href":"/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-overview"},{"title":"Create customers","icon":"user-plus","href":"/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-create-customers"},{"title":"Create virtual accounts","icon":"building-columns","href":"/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-create-virtual-accounts"},{"group":"Move money","icon":"money-bill-transfer","expanded":false,"pages":[{"title":"Deposit","href":"/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-deposit"},{"title":"Withdraw","href":"/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-withdraw"}]}]}]}]},{"tab":"API reference","menu":[{"item":"v2","pages":[{"title":"v2","href":"/knowledge-base/api-reference/introduction"}]},{"item":"v3","hidden":true,"pages":[{"title":"v3","href":"/knowledge-base/api-reference/v3/introduction"}]},{"item":"v4","pages":[{"title":"v4","href":"/knowledge-base/api-reference/v4/introduction"}]}],"pages":[{"title":"API reference","href":"/knowledge-base/api-reference/introduction"}]},{"tab":"Build with AI","pages":[{"title":"Build with AI","href":"/knowledge-base/build-with-ai/overview"}]}]},{"product":"Porto","icon":"https://mintlify.s3.us-west-1.amazonaws.com/deployment-4/knowledge-base/images/icons/porto.svg","color":{"light":"#ac96ff","dark":"#ac96ff"},"pages":[{"title":"Porto","href":"/knowledge-base/porto/overview"}]},{"product":"Anchorage Digital Wealth (For Advisors)","icon":"building-columns","color":{"light":"#C9A227","dark":"#C9A227"},"hidden":true,"pages":[{"title":"Anchorage Digital Wealth (For Advisors)","href":"/knowledge-base/adw/overview"}]},{"product":"Trading","icon":"chart-line","hidden":true,"pages":[{"title":"Trading","href":"/knowledge-base/a1-trading/developer-guide/overview"}]},{"product":"Agentic Banking","icon":"robot","pages":[{"title":"Agentic Banking","href":"/agentic-banking/overview"}]}]},"basePath":"","title":"Getting started - Anchorage Digital","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":[],"chunks":[]}