The emitOptionsPositions request returns a snapshot via optionsPositions. Once subscribed, optionsPositionsDelta messages carry changed positions in the same shape. A delta has no clientRequestId — that is what distinguishes the live push from a snapshot response. The snapshot reaches you only while you hold optionsPositions with a filter covering the request’s market.
When a position is closed, the delta reports it with sideflat and qty0. This is the only message that tells you the position is gone.
Handle flat explicitly: remove the position from your book when you receive it. A client that only switches on long and short will ignore the message and keep showing a position it no longer holds — no further delta and no snapshot will ever correct it, because the snapshot omits closed positions entirely.
flat only ever appears on a delta. The emitOptionsPositions snapshot returns open positions only, so a closed position is simply absent from it.See Position Metrics for how value, notionalValue, unrealizedPnl, and breakEvenPrice are derived.
Contract expiration, e.g. 24JUN26. Requires market; omit to match every expiration.
strike
type:string
required
Strike price, e.g. 62000. Requires expiration; omit to match every strike.
type
type:string
required
C (call) or P (put). Requires strike; omit to match both.
Sec-WebSocket-Protocol
type:httpApiKey
Supply as authorization#<JWT> during the WebSocket handshake.
Emit Options Positions
type:object
Positions Snapshot
type:object
Response to emitOptionsPositions.
Position Delta
type:object
Pushed whenever your positions change; carries changed positions in the same shape as the snapshot. A delta has no clientRequestId — that is what distinguishes the live push from a snapshot response. A closed position arrives with sideflat and qty0; this is the only message that tells you the position is gone.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rails Trading Developer API Documentation","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/railsxyz/XTasO28fw_2bd6Tp/logo/light.svg?fit=max\u0026auto=format\u0026n=XTasO28fw_2bd6Tp\u0026q=85\u0026s=562d1517f28bb695fb280b18dd4310a4","dark":"https://mintcdn.com/railsxyz/XTasO28fw_2bd6Tp/logo/dark.svg?fit=max\u0026auto=format\u0026n=XTasO28fw_2bd6Tp\u0026q=85\u0026s=2dc52a8a93c85cb2edae7edc4f009831"},"favicon":"https://mintcdn.com/railsxyz/XTasO28fw_2bd6Tp/favicon.svg?fit=max\u0026auto=format\u0026n=XTasO28fw_2bd6Tp\u0026q=85\u0026s=508a9eb467ddd29d6d1034598ada1654","api":{"openapi":["latest/openapi/auth.json","latest/perps/openapi/account.json","latest/perps/openapi/order.json","latest/perps/openapi/market.json","latest/options/openapi/options.json","latest/options/openapi/matching.json"],"asyncapi":["latest/perps/asyncapi/perps-ws.yaml","latest/perps/asyncapi/test-public-stream.yaml","latest/perps/asyncapi/test-authenticated-stream.yaml","latest/options/asyncapi/options-ws.yaml"]},"navbar":{"links":[{"href":"https://help.rails.xyz/","label":"Support"}]},"footer":{"socials":{"website":"https://rails.xyz/","twitter":"https://twitter.com/rails_xyz","linkedin":"https://www.linkedin.com/company/railsxyz"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"railsxyz","hasAudioNarration":false,"actualSubdomain":"railsxyz","customDomains":["docs.rails.xyz"],"gitSource":{"type":"github","owner":"rails-xyz","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aea549f2e37211236f3db90","collectionId":"05092de5-fa9b-44af-8f36-f8874c5a6aa2","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aea549f2e37211236f3db90"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aea549f2e37211236f3db90","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Options","count":44},{"language":"default","tag":"Perpetuals","count":42},{"language":"default","tag":"HTTP API Reference","count":29},{"language":"default","tag":"Get Started","count":25},{"language":"default","tag":"Guides","count":24},{"language":"default","tag":"WebSocket API Reference","count":18},{"language":"default","tag":"User Account","count":10},{"language":"default","tag":"Go SDK","count":9},{"language":"default","tag":"Formulas","count":9},{"language":"default","tag":"Market Data","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":".flex.flex-col.gap-8:not(.isolate)+#pagination{margin-top:3.5rem}.bindings-schema [title=\"expiration\"] [data-component-part=\"field-required-pill\"],.bindings-schema [title=\"strike\"] [data-component-part=\"field-required-pill\"],.bindings-schema [title=\"type\"] [data-component-part=\"field-required-pill\"],.bindings-schema [title=\"sessionId\"] [data-component-part=\"field-required-pill\"]{display:none!important}[data-testid=\"api-playground-modal\"] [title=\"expiration\"] [data-component-part=\"field-required-pill\"],[data-testid=\"api-playground-modal\"] [title=\"strike\"] [data-component-part=\"field-required-pill\"],[data-testid=\"api-playground-modal\"] [title=\"type\"] [data-component-part=\"field-required-pill\"],[data-testid=\"api-playground-modal\"] [title=\"sessionId\"] [data-component-part=\"field-required-pill\"]{display:none!important}@media (prefers-color-scheme: dark){[data-main-title]{color:#f0f0f0!important}[data-subtitle]{color:#d0d0d0!important}[data-quickstart-title]{color:#f0f0f0!important}[data-card]{background:#1f1f1f!important;border-color:#3f3f3f!important;color:#f0f0f0!important}[data-card]:hover{border-color:#0D9373!important;box-shadow:0 4px 16px rgba(13,147,115,0.3)!important}[data-card-title]{color:#f0f0f0!important}[data-card-desc]{color:#d0d0d0!important}[data-card-icon]{background:#1f1f1f!important}}.dark [data-main-title]{color:#f0f0f0!important}.dark [data-subtitle]{color:#d0d0d0!important}.dark [data-quickstart-title]{color:#f0f0f0!important}.dark [data-card]{background:#1f1f1f!important;border-color:#3f3f3f!important;color:#f0f0f0!important}.dark [data-card]:hover{border-color:#0D9373!important;box-shadow:0 4px 16px rgba(13,147,115,0.3)!important}.dark [data-card-title]{color:#f0f0f0!important}.dark [data-card-desc]{color:#d0d0d0!important}.dark [data-card-icon]{background:#1f1f1f!important}.dark [data-install]{background:#1f1f1f!important;border-color:#3f3f3f!important;color:#f0f0f0!important}.dark [data-install-copy]{background:#2a2a2a!important;border-color:#3f3f3f!important;color:#f0f0f0!important}.dark [data-install] a{color:#07C983!important}"}],"page":{"pagePath":"latest/options/websocket-api/positions-stream","slug":"/latest/options/websocket-api/positions-stream","pageMetadata":{"title":"Positions Stream","description":"Open positions with mark price, margin, and PnL.","asyncapi":"latest/options/asyncapi/options-ws.yaml positionsStream","href":"/latest/options/websocket-api/positions-stream"},"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: \"Open positions with mark price, margin, and PnL.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Heading,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This stream is available on the `,_jsx(_components.code,{children:`optionsPositions`}),` subscription. It provides your open option positions with mark price, margin, and PnL.`]}),`\n`,_jsx(Heading,{level:`4`,id:`snapshot-vs-delta`,children:`Snapshot vs. Delta`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`emitOptionsPositions`}),` request returns a snapshot via `,_jsx(_components.code,{children:`optionsPositions`}),`. Once subscribed, `,_jsx(_components.code,{children:`optionsPositionsDelta`}),` messages carry changed positions in the same shape. A delta has no `,_jsx(_components.code,{children:`clientRequestId`}),` — that is what distinguishes the live push from a snapshot response. The snapshot reaches you only while you hold `,_jsx(_components.code,{children:`optionsPositions`}),` with a filter covering the request’s `,_jsx(_components.code,{children:`market`}),`.`]}),`\n`,_jsxs(Heading,{level:`4`,id:`closed-positions-arrive-as-flat`,children:[`Closed Positions Arrive as `,_jsx(_components.code,{children:`flat`})]}),`\n`,_jsxs(_components.p,{children:[`When a position is closed, the delta reports it with `,_jsx(_components.code,{children:`side`}),` `,_jsx(_components.code,{children:`flat`}),` and `,_jsx(_components.code,{children:`qty`}),` `,_jsx(_components.code,{children:`0`}),`. This is the only message that tells you the position is gone.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Handle `,_jsx(_components.code,{children:`flat`}),` explicitly: `,_jsx(_components.strong,{children:`remove`}),` the position from your book when you receive it. A client that only switches on `,_jsx(_components.code,{children:`long`}),` and `,_jsx(_components.code,{children:`short`}),` will ignore the message and keep showing a position it no longer holds — no further delta and no snapshot will ever correct it, because the snapshot omits closed positions entirely.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`flat`}),` only ever appears on a delta. The `,_jsx(_components.code,{children:`emitOptionsPositions`}),` snapshot returns open positions only, so a closed position is simply absent from it.`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/latest/options/formulas/position-metrics`,children:`Position Metrics`}),` for how `,_jsx(_components.code,{children:`value`}),`, `,_jsx(_components.code,{children:`notionalValue`}),`, `,_jsx(_components.code,{children:`unrealizedPnl`}),`, and `,_jsx(_components.code,{children:`breakEvenPrice`}),` are derived.`]})]})}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":"Positions Stream","description":"Open positions with mark price, margin, and PnL.","asyncapi":"latest/options/asyncapi/options-ws.yaml positionsStream","href":"/latest/options/websocket-api/positions-stream"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Snapshot vs. Delta","slug":"snapshot-vs-delta","depth":4,"children":[]},{"title":"Closed Positions Arrive as flat","slug":"closed-positions-arrive-as-flat","depth":4,"children":[]}],"codeExamples":{}},"jsLinks":[],"apiReferenceData":{"channel":{"id":"positionsStream","title":"Positions Stream","description":"Available on the `optionsPositions` subscription. Your open option positions with mark price, margin, and PnL.\n","servers":[{"id":"sandbox","protocol":"wss","host":"ws.sandbox.rails.xyz","bindings":[],"variables":[]}],"address":"?product=options\u0026market={market}\u0026expiration={expiration}\u0026strike={strike}\u0026type={type}\u0026subscriptions=optionsPositions","parameters":[{"id":"market","jsonSchema":{"type":"string","description":"A specific market (e.g. `BTC-USDT`) or `ALL`.","default":"BTC-USDT"},"description":"A specific market (e.g. `BTC-USDT`) or `ALL`.","type":"string","required":true,"deprecated":false},{"id":"expiration","jsonSchema":{"type":"string","description":"Contract expiration, e.g. `24JUN26`. Requires `market`; omit to match every expiration.","default":"24JUN26"},"description":"Contract expiration, e.g. `24JUN26`. Requires `market`; omit to match every expiration.","type":"string","required":true,"deprecated":false},{"id":"strike","jsonSchema":{"type":"string","description":"Strike price, e.g. `62000`. Requires `expiration`; omit to match every strike.","default":"62000"},"description":"Strike price, e.g. `62000`. Requires `expiration`; omit to match every strike.","type":"string","required":true,"deprecated":false},{"id":"type","jsonSchema":{"type":"string","description":"`C` (call) or `P` (put). Requires `strike`; omit to match both.","default":"C"},"description":"`C` (call) or `P` (put). Requires `strike`; omit to match both.","type":"string","required":true,"deprecated":false}],"bindings":[],"operations":[{"id":"emitOptionsPositions","title":"Emit options positions","description":"Request a snapshot of your open positions. Requires the `optionsPositions` subscription, with a filter covering the request, for the response to reach you.","type":"receive","messages":[{"id":"emitOptionsPositionsRequest","contentType":"application/json","payload":[{"name":"Emit Options Positions","type":"object","properties":[{"name":"message","type":"string","description":"Always `emitOptionsPositions`.","required":true},{"name":"content","type":"object","required":false,"properties":[{"name":"clientRequestId","type":"string","description":"Client-generated UUID for correlation","required":false},{"name":"market","type":"string","description":"A contract name to filter, or `ALL` for every position. Defaults to `ALL`","required":false},{"name":"pageSize","type":"integer","description":"Page size, `1`–`200`. Omit it to receive every position in one message","required":false},{"name":"pageToken","type":"string","description":"The previous response's `nextPageToken`. Requires `pageSize`","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"message":{"type":"string","description":"Always `emitOptionsPositions`.","x-parser-schema-id":"\u003canonymous-schema-398>"},"content":{"type":"object","properties":{"clientRequestId":{"type":"string","format":"uuid","description":"Client-generated UUID for correlation","x-parser-schema-id":"\u003canonymous-schema-400>"},"market":{"type":"string","description":"A contract name to filter, or `ALL` for every position. Defaults to `ALL`","x-parser-schema-id":"\u003canonymous-schema-401>"},"pageSize":{"type":"integer","minimum":1,"maximum":200,"description":"Page size, `1`–`200`. Omit it to receive every position in one message","x-parser-schema-id":"\u003canonymous-schema-402>"},"pageToken":{"type":"string","description":"The previous response's `nextPageToken`. Requires `pageSize`","x-parser-schema-id":"\u003canonymous-schema-403>"}},"x-parser-schema-id":"\u003canonymous-schema-399>"}},"required":["message"],"x-parser-schema-id":"\u003canonymous-schema-397>"},"title":"Emit Options Positions","example":"{\n \"message\": \"emitOptionsPositions\",\n \"content\": {\n \"clientRequestId\": \"b8c56794-c7f8-467d-b331-be8c765a5378\",\n \"market\": \"BTC-10JUL26-55000-C\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"emitOptionsPositionsRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionsStream"}]},{"id":"optionsPositionsSnapshot","title":"Options positions snapshot","description":"Response to `emitOptionsPositions`.","type":"send","messages":[{"id":"optionsPositionsResponse","contentType":"application/json","payload":[{"name":"Positions Snapshot","description":"Response to `emitOptionsPositions`.","type":"object","properties":[{"name":"resultType","type":"string","description":"Always `optionsPositions`.","required":true},{"name":"market","type":"string","description":"Contract name, or `ALL`","required":true},{"name":"data","type":"object","required":true,"properties":[{"name":"positions","type":"array","description":"Your open positions","required":true,"properties":[{"name":"contract","type":"string","description":"Contract name","required":true},{"name":"side","type":"string","description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","enumValues":["long","short","flat"],"required":true},{"name":"optionType","type":"string","description":"Option type — `C` (call) or `P` (put), matching the contract name","enumValues":["C","P"],"required":true},{"name":"qty","type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","required":true},{"name":"value","type":"string","description":"Position value at entry, signed (negative for a short)\n","required":true},{"name":"fees","type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","required":true},{"name":"entryPrice","type":"string","description":"Average entry price","required":true},{"name":"markPrice","type":"string","description":"Current mark price","required":true},{"name":"markIV","type":"string","description":"Mark implied volatility","required":true},{"name":"underlyingPrice","type":"string","description":"Underlying index price","required":true},{"name":"breakEvenPrice","type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","required":true},{"name":"initialMargin","type":"string","description":"Initial margin (short positions; `0` for long)","required":true},{"name":"realizedPnl","type":"string","description":"Realized PnL","required":true},{"name":"unrealizedPnl","type":"string","description":"Unrealized PnL","required":true},{"name":"notionalValue","type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","required":true},{"name":"updatedAt","type":"integer","description":"Last update (ms since epoch)","required":true}]},{"name":"statusCode","type":"integer","description":"Always `200`.","required":true},{"name":"clientRequestId","type":"string","description":"Client-generated UUID for correlation","required":false},{"name":"nextPageToken","type":"string","description":"Cursor for the next page; absent on the last page, and absent entirely when you emit without `pageSize`\n","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"resultType":{"type":"string","description":"Always `optionsPositions`.","x-parser-schema-id":"\u003canonymous-schema-405>"},"market":{"type":"string","description":"Contract name, or `ALL`","x-parser-schema-id":"\u003canonymous-schema-406>"},"data":{"type":"object","properties":{"positions":{"type":"array","description":"Your open positions","items":{"type":"object","properties":{"contract":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-409>"},"side":{"type":"string","enum":["long","short","flat"],"description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","x-parser-schema-id":"\u003canonymous-schema-410>"},"optionType":{"type":"string","enum":["C","P"],"description":"Option type — `C` (call) or `P` (put), matching the contract name","x-parser-schema-id":"\u003canonymous-schema-411>"},"qty":{"type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","x-parser-schema-id":"\u003canonymous-schema-412>"},"value":{"type":"string","description":"Position value at entry, signed (negative for a short)\n","x-parser-schema-id":"\u003canonymous-schema-413>"},"fees":{"type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","x-parser-schema-id":"\u003canonymous-schema-414>"},"entryPrice":{"type":"string","description":"Average entry price","x-parser-schema-id":"\u003canonymous-schema-415>"},"markPrice":{"type":"string","description":"Current mark price","x-parser-schema-id":"\u003canonymous-schema-416>"},"markIV":{"type":"string","description":"Mark implied volatility","x-parser-schema-id":"\u003canonymous-schema-417>"},"underlyingPrice":{"type":"string","description":"Underlying index price","x-parser-schema-id":"\u003canonymous-schema-418>"},"breakEvenPrice":{"type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","x-parser-schema-id":"\u003canonymous-schema-419>"},"initialMargin":{"type":"string","description":"Initial margin (short positions; `0` for long)","x-parser-schema-id":"\u003canonymous-schema-420>"},"realizedPnl":{"type":"string","description":"Realized PnL","x-parser-schema-id":"\u003canonymous-schema-421>"},"unrealizedPnl":{"type":"string","description":"Unrealized PnL","x-parser-schema-id":"\u003canonymous-schema-422>"},"notionalValue":{"type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","x-parser-schema-id":"\u003canonymous-schema-423>"},"updatedAt":{"type":"integer","format":"int64","description":"Last update (ms since epoch)","x-parser-schema-id":"\u003canonymous-schema-424>"}},"required":["contract","side","optionType","qty","value","fees","entryPrice","markPrice","markIV","underlyingPrice","breakEvenPrice","initialMargin","realizedPnl","unrealizedPnl","notionalValue","updatedAt"],"x-parser-schema-id":"Position"},"x-parser-schema-id":"\u003canonymous-schema-408>"},"statusCode":{"type":"integer","description":"Always `200`.","x-parser-schema-id":"\u003canonymous-schema-425>"},"clientRequestId":{"type":"string","description":"Client-generated UUID for correlation","x-parser-schema-id":"\u003canonymous-schema-426>"},"nextPageToken":{"type":"string","description":"Cursor for the next page; absent on the last page, and absent entirely when you emit without `pageSize`\n","x-parser-schema-id":"\u003canonymous-schema-427>"}},"required":["positions","statusCode"],"x-parser-schema-id":"\u003canonymous-schema-407>"}},"required":["resultType","market","data"],"x-parser-schema-id":"\u003canonymous-schema-404>"},"title":"Positions Snapshot","description":"Response to `emitOptionsPositions`.","example":"{\n \"resultType\": \"optionsPositions\",\n \"market\": \"BTC-10JUL26-55000-C\",\n \"data\": {\n \"positions\": [\n {\n \"contract\": \"BTC-10JUL26-55000-C\",\n \"side\": \"long\",\n \"optionType\": \"C\",\n \"qty\": \"1\",\n \"value\": \"6948.86\",\n \"fees\": \"3.47443\",\n \"entryPrice\": \"6948.86\",\n \"markPrice\": \"7194.0717439\",\n \"markIV\": \"0.490087689370473\",\n \"underlyingPrice\": \"62142.5973392596\",\n \"breakEvenPrice\": \"61952.33443\",\n \"initialMargin\": \"0\",\n \"realizedPnl\": \"0\",\n \"unrealizedPnl\": \"245.2117439\",\n \"notionalValue\": \"7194.0717439\",\n \"updatedAt\": 1783079880460\n }\n ],\n \"statusCode\": 200,\n \"clientRequestId\": \"b8c56794-c7f8-467d-b331-be8c765a5378\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"optionsPositionsResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionsStream"}]},{"id":"optionsPositionsUpdate","title":"Options positions update","description":"Pushed whenever your positions change.","type":"send","messages":[{"id":"optionsPositionsDelta","contentType":"application/json","payload":[{"name":"Position Delta","description":"Pushed whenever your positions change; carries changed positions in the same shape as the snapshot. A delta has no `clientRequestId` — that is what distinguishes the live push from a snapshot response. A closed position arrives with `side` `flat` and `qty` `0`; this is the only message that tells you the position is gone.\n","type":"object","properties":[{"name":"resultType","type":"string","description":"Always `optionsPositionsDelta`.","required":true},{"name":"market","type":"string","description":"Contract name","required":true},{"name":"data","type":"object","required":true,"properties":[{"name":"positions","type":"array","description":"Changed positions","required":true,"properties":[{"name":"contract","type":"string","description":"Contract name","required":true},{"name":"side","type":"string","description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","enumValues":["long","short","flat"],"required":true},{"name":"optionType","type":"string","description":"Option type — `C` (call) or `P` (put), matching the contract name","enumValues":["C","P"],"required":true},{"name":"qty","type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","required":true},{"name":"value","type":"string","description":"Position value at entry, signed (negative for a short)\n","required":true},{"name":"fees","type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","required":true},{"name":"entryPrice","type":"string","description":"Average entry price","required":true},{"name":"markPrice","type":"string","description":"Current mark price","required":true},{"name":"markIV","type":"string","description":"Mark implied volatility","required":true},{"name":"underlyingPrice","type":"string","description":"Underlying index price","required":true},{"name":"breakEvenPrice","type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","required":true},{"name":"initialMargin","type":"string","description":"Initial margin (short positions; `0` for long)","required":true},{"name":"realizedPnl","type":"string","description":"Realized PnL","required":true},{"name":"unrealizedPnl","type":"string","description":"Unrealized PnL","required":true},{"name":"notionalValue","type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","required":true},{"name":"updatedAt","type":"integer","description":"Last update (ms since epoch)","required":true}]},{"name":"statusCode","type":"integer","description":"Always `200`.","required":true}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"resultType":{"type":"string","description":"Always `optionsPositionsDelta`.","x-parser-schema-id":"\u003canonymous-schema-429>"},"market":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-430>"},"data":{"type":"object","properties":{"positions":{"type":"array","description":"Changed positions","items":{"type":"object","properties":{"contract":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-409>"},"side":{"type":"string","enum":["long","short","flat"],"description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","x-parser-schema-id":"\u003canonymous-schema-410>"},"optionType":{"type":"string","enum":["C","P"],"description":"Option type — `C` (call) or `P` (put), matching the contract name","x-parser-schema-id":"\u003canonymous-schema-411>"},"qty":{"type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","x-parser-schema-id":"\u003canonymous-schema-412>"},"value":{"type":"string","description":"Position value at entry, signed (negative for a short)\n","x-parser-schema-id":"\u003canonymous-schema-413>"},"fees":{"type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","x-parser-schema-id":"\u003canonymous-schema-414>"},"entryPrice":{"type":"string","description":"Average entry price","x-parser-schema-id":"\u003canonymous-schema-415>"},"markPrice":{"type":"string","description":"Current mark price","x-parser-schema-id":"\u003canonymous-schema-416>"},"markIV":{"type":"string","description":"Mark implied volatility","x-parser-schema-id":"\u003canonymous-schema-417>"},"underlyingPrice":{"type":"string","description":"Underlying index price","x-parser-schema-id":"\u003canonymous-schema-418>"},"breakEvenPrice":{"type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","x-parser-schema-id":"\u003canonymous-schema-419>"},"initialMargin":{"type":"string","description":"Initial margin (short positions; `0` for long)","x-parser-schema-id":"\u003canonymous-schema-420>"},"realizedPnl":{"type":"string","description":"Realized PnL","x-parser-schema-id":"\u003canonymous-schema-421>"},"unrealizedPnl":{"type":"string","description":"Unrealized PnL","x-parser-schema-id":"\u003canonymous-schema-422>"},"notionalValue":{"type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","x-parser-schema-id":"\u003canonymous-schema-423>"},"updatedAt":{"type":"integer","format":"int64","description":"Last update (ms since epoch)","x-parser-schema-id":"\u003canonymous-schema-424>"}},"required":["contract","side","optionType","qty","value","fees","entryPrice","markPrice","markIV","underlyingPrice","breakEvenPrice","initialMargin","realizedPnl","unrealizedPnl","notionalValue","updatedAt"],"x-parser-schema-id":"Position"},"x-parser-schema-id":"\u003canonymous-schema-432>"},"statusCode":{"type":"integer","description":"Always `200`.","x-parser-schema-id":"\u003canonymous-schema-433>"}},"required":["positions","statusCode"],"x-parser-schema-id":"\u003canonymous-schema-431>"}},"required":["resultType","market","data"],"x-parser-schema-id":"\u003canonymous-schema-428>"},"title":"Position Delta","description":"Pushed whenever your positions change; carries changed positions in the same shape as the snapshot. A delta has no `clientRequestId` — that is what distinguishes the live push from a snapshot response. A closed position arrives with `side` `flat` and `qty` `0`; this is the only message that tells you the position is gone.\n","example":"{\n \"resultType\": \"optionsPositionsDelta\",\n \"market\": \"BTC-10JUL26-55000-C\",\n \"data\": {\n \"positions\": [\n {\n \"contract\": \"BTC-10JUL26-55000-C\",\n \"side\": \"long\",\n \"optionType\": \"C\",\n \"qty\": \"1\",\n \"value\": \"6948.86\",\n \"fees\": \"3.47443\",\n \"entryPrice\": \"6948.86\",\n \"markPrice\": \"7250.5\",\n \"markIV\": \"0.4915\",\n \"underlyingPrice\": \"62200.1\",\n \"breakEvenPrice\": \"61952.33443\",\n \"initialMargin\": \"0\",\n \"realizedPnl\": \"0\",\n \"unrealizedPnl\": \"301.64\",\n \"notionalValue\": \"7250.5\",\n \"updatedAt\": 1783351516417\n }\n ],\n \"statusCode\": 200\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"optionsPositionsDelta"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionsStream"}]}],"sendOperations":[{"id":"emitOptionsPositions","title":"Emit options positions","description":"Request a snapshot of your open positions. Requires the `optionsPositions` subscription, with a filter covering the request, for the response to reach you.","type":"receive","messages":[{"id":"emitOptionsPositionsRequest","contentType":"application/json","payload":[{"name":"Emit Options Positions","type":"object","properties":[{"name":"message","type":"string","description":"Always `emitOptionsPositions`.","required":true},{"name":"content","type":"object","required":false,"properties":[{"name":"clientRequestId","type":"string","description":"Client-generated UUID for correlation","required":false},{"name":"market","type":"string","description":"A contract name to filter, or `ALL` for every position. Defaults to `ALL`","required":false},{"name":"pageSize","type":"integer","description":"Page size, `1`–`200`. Omit it to receive every position in one message","required":false},{"name":"pageToken","type":"string","description":"The previous response's `nextPageToken`. Requires `pageSize`","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"message":{"type":"string","description":"Always `emitOptionsPositions`.","x-parser-schema-id":"\u003canonymous-schema-398>"},"content":{"type":"object","properties":{"clientRequestId":{"type":"string","format":"uuid","description":"Client-generated UUID for correlation","x-parser-schema-id":"\u003canonymous-schema-400>"},"market":{"type":"string","description":"A contract name to filter, or `ALL` for every position. Defaults to `ALL`","x-parser-schema-id":"\u003canonymous-schema-401>"},"pageSize":{"type":"integer","minimum":1,"maximum":200,"description":"Page size, `1`–`200`. Omit it to receive every position in one message","x-parser-schema-id":"\u003canonymous-schema-402>"},"pageToken":{"type":"string","description":"The previous response's `nextPageToken`. Requires `pageSize`","x-parser-schema-id":"\u003canonymous-schema-403>"}},"x-parser-schema-id":"\u003canonymous-schema-399>"}},"required":["message"],"x-parser-schema-id":"\u003canonymous-schema-397>"},"title":"Emit Options Positions","example":"{\n \"message\": \"emitOptionsPositions\",\n \"content\": {\n \"clientRequestId\": \"b8c56794-c7f8-467d-b331-be8c765a5378\",\n \"market\": \"BTC-10JUL26-55000-C\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"emitOptionsPositionsRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionsStream"}]}],"receiveOperations":[{"id":"optionsPositionsSnapshot","title":"Options positions snapshot","description":"Response to `emitOptionsPositions`.","type":"send","messages":[{"id":"optionsPositionsResponse","contentType":"application/json","payload":[{"name":"Positions Snapshot","description":"Response to `emitOptionsPositions`.","type":"object","properties":[{"name":"resultType","type":"string","description":"Always `optionsPositions`.","required":true},{"name":"market","type":"string","description":"Contract name, or `ALL`","required":true},{"name":"data","type":"object","required":true,"properties":[{"name":"positions","type":"array","description":"Your open positions","required":true,"properties":[{"name":"contract","type":"string","description":"Contract name","required":true},{"name":"side","type":"string","description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","enumValues":["long","short","flat"],"required":true},{"name":"optionType","type":"string","description":"Option type — `C` (call) or `P` (put), matching the contract name","enumValues":["C","P"],"required":true},{"name":"qty","type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","required":true},{"name":"value","type":"string","description":"Position value at entry, signed (negative for a short)\n","required":true},{"name":"fees","type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","required":true},{"name":"entryPrice","type":"string","description":"Average entry price","required":true},{"name":"markPrice","type":"string","description":"Current mark price","required":true},{"name":"markIV","type":"string","description":"Mark implied volatility","required":true},{"name":"underlyingPrice","type":"string","description":"Underlying index price","required":true},{"name":"breakEvenPrice","type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","required":true},{"name":"initialMargin","type":"string","description":"Initial margin (short positions; `0` for long)","required":true},{"name":"realizedPnl","type":"string","description":"Realized PnL","required":true},{"name":"unrealizedPnl","type":"string","description":"Unrealized PnL","required":true},{"name":"notionalValue","type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","required":true},{"name":"updatedAt","type":"integer","description":"Last update (ms since epoch)","required":true}]},{"name":"statusCode","type":"integer","description":"Always `200`.","required":true},{"name":"clientRequestId","type":"string","description":"Client-generated UUID for correlation","required":false},{"name":"nextPageToken","type":"string","description":"Cursor for the next page; absent on the last page, and absent entirely when you emit without `pageSize`\n","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"resultType":{"type":"string","description":"Always `optionsPositions`.","x-parser-schema-id":"\u003canonymous-schema-405>"},"market":{"type":"string","description":"Contract name, or `ALL`","x-parser-schema-id":"\u003canonymous-schema-406>"},"data":{"type":"object","properties":{"positions":{"type":"array","description":"Your open positions","items":{"type":"object","properties":{"contract":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-409>"},"side":{"type":"string","enum":["long","short","flat"],"description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","x-parser-schema-id":"\u003canonymous-schema-410>"},"optionType":{"type":"string","enum":["C","P"],"description":"Option type — `C` (call) or `P` (put), matching the contract name","x-parser-schema-id":"\u003canonymous-schema-411>"},"qty":{"type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","x-parser-schema-id":"\u003canonymous-schema-412>"},"value":{"type":"string","description":"Position value at entry, signed (negative for a short)\n","x-parser-schema-id":"\u003canonymous-schema-413>"},"fees":{"type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","x-parser-schema-id":"\u003canonymous-schema-414>"},"entryPrice":{"type":"string","description":"Average entry price","x-parser-schema-id":"\u003canonymous-schema-415>"},"markPrice":{"type":"string","description":"Current mark price","x-parser-schema-id":"\u003canonymous-schema-416>"},"markIV":{"type":"string","description":"Mark implied volatility","x-parser-schema-id":"\u003canonymous-schema-417>"},"underlyingPrice":{"type":"string","description":"Underlying index price","x-parser-schema-id":"\u003canonymous-schema-418>"},"breakEvenPrice":{"type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","x-parser-schema-id":"\u003canonymous-schema-419>"},"initialMargin":{"type":"string","description":"Initial margin (short positions; `0` for long)","x-parser-schema-id":"\u003canonymous-schema-420>"},"realizedPnl":{"type":"string","description":"Realized PnL","x-parser-schema-id":"\u003canonymous-schema-421>"},"unrealizedPnl":{"type":"string","description":"Unrealized PnL","x-parser-schema-id":"\u003canonymous-schema-422>"},"notionalValue":{"type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","x-parser-schema-id":"\u003canonymous-schema-423>"},"updatedAt":{"type":"integer","format":"int64","description":"Last update (ms since epoch)","x-parser-schema-id":"\u003canonymous-schema-424>"}},"required":["contract","side","optionType","qty","value","fees","entryPrice","markPrice","markIV","underlyingPrice","breakEvenPrice","initialMargin","realizedPnl","unrealizedPnl","notionalValue","updatedAt"],"x-parser-schema-id":"Position"},"x-parser-schema-id":"\u003canonymous-schema-408>"},"statusCode":{"type":"integer","description":"Always `200`.","x-parser-schema-id":"\u003canonymous-schema-425>"},"clientRequestId":{"type":"string","description":"Client-generated UUID for correlation","x-parser-schema-id":"\u003canonymous-schema-426>"},"nextPageToken":{"type":"string","description":"Cursor for the next page; absent on the last page, and absent entirely when you emit without `pageSize`\n","x-parser-schema-id":"\u003canonymous-schema-427>"}},"required":["positions","statusCode"],"x-parser-schema-id":"\u003canonymous-schema-407>"}},"required":["resultType","market","data"],"x-parser-schema-id":"\u003canonymous-schema-404>"},"title":"Positions Snapshot","description":"Response to `emitOptionsPositions`.","example":"{\n \"resultType\": \"optionsPositions\",\n \"market\": \"BTC-10JUL26-55000-C\",\n \"data\": {\n \"positions\": [\n {\n \"contract\": \"BTC-10JUL26-55000-C\",\n \"side\": \"long\",\n \"optionType\": \"C\",\n \"qty\": \"1\",\n \"value\": \"6948.86\",\n \"fees\": \"3.47443\",\n \"entryPrice\": \"6948.86\",\n \"markPrice\": \"7194.0717439\",\n \"markIV\": \"0.490087689370473\",\n \"underlyingPrice\": \"62142.5973392596\",\n \"breakEvenPrice\": \"61952.33443\",\n \"initialMargin\": \"0\",\n \"realizedPnl\": \"0\",\n \"unrealizedPnl\": \"245.2117439\",\n \"notionalValue\": \"7194.0717439\",\n \"updatedAt\": 1783079880460\n }\n ],\n \"statusCode\": 200,\n \"clientRequestId\": \"b8c56794-c7f8-467d-b331-be8c765a5378\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"optionsPositionsResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionsStream"}]},{"id":"optionsPositionsUpdate","title":"Options positions update","description":"Pushed whenever your positions change.","type":"send","messages":[{"id":"optionsPositionsDelta","contentType":"application/json","payload":[{"name":"Position Delta","description":"Pushed whenever your positions change; carries changed positions in the same shape as the snapshot. A delta has no `clientRequestId` — that is what distinguishes the live push from a snapshot response. A closed position arrives with `side` `flat` and `qty` `0`; this is the only message that tells you the position is gone.\n","type":"object","properties":[{"name":"resultType","type":"string","description":"Always `optionsPositionsDelta`.","required":true},{"name":"market","type":"string","description":"Contract name","required":true},{"name":"data","type":"object","required":true,"properties":[{"name":"positions","type":"array","description":"Changed positions","required":true,"properties":[{"name":"contract","type":"string","description":"Contract name","required":true},{"name":"side","type":"string","description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","enumValues":["long","short","flat"],"required":true},{"name":"optionType","type":"string","description":"Option type — `C` (call) or `P` (put), matching the contract name","enumValues":["C","P"],"required":true},{"name":"qty","type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","required":true},{"name":"value","type":"string","description":"Position value at entry, signed (negative for a short)\n","required":true},{"name":"fees","type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","required":true},{"name":"entryPrice","type":"string","description":"Average entry price","required":true},{"name":"markPrice","type":"string","description":"Current mark price","required":true},{"name":"markIV","type":"string","description":"Mark implied volatility","required":true},{"name":"underlyingPrice","type":"string","description":"Underlying index price","required":true},{"name":"breakEvenPrice","type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","required":true},{"name":"initialMargin","type":"string","description":"Initial margin (short positions; `0` for long)","required":true},{"name":"realizedPnl","type":"string","description":"Realized PnL","required":true},{"name":"unrealizedPnl","type":"string","description":"Unrealized PnL","required":true},{"name":"notionalValue","type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","required":true},{"name":"updatedAt","type":"integer","description":"Last update (ms since epoch)","required":true}]},{"name":"statusCode","type":"integer","description":"Always `200`.","required":true}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"resultType":{"type":"string","description":"Always `optionsPositionsDelta`.","x-parser-schema-id":"\u003canonymous-schema-429>"},"market":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-430>"},"data":{"type":"object","properties":{"positions":{"type":"array","description":"Changed positions","items":{"type":"object","properties":{"contract":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-409>"},"side":{"type":"string","enum":["long","short","flat"],"description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","x-parser-schema-id":"\u003canonymous-schema-410>"},"optionType":{"type":"string","enum":["C","P"],"description":"Option type — `C` (call) or `P` (put), matching the contract name","x-parser-schema-id":"\u003canonymous-schema-411>"},"qty":{"type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","x-parser-schema-id":"\u003canonymous-schema-412>"},"value":{"type":"string","description":"Position value at entry, signed (negative for a short)\n","x-parser-schema-id":"\u003canonymous-schema-413>"},"fees":{"type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","x-parser-schema-id":"\u003canonymous-schema-414>"},"entryPrice":{"type":"string","description":"Average entry price","x-parser-schema-id":"\u003canonymous-schema-415>"},"markPrice":{"type":"string","description":"Current mark price","x-parser-schema-id":"\u003canonymous-schema-416>"},"markIV":{"type":"string","description":"Mark implied volatility","x-parser-schema-id":"\u003canonymous-schema-417>"},"underlyingPrice":{"type":"string","description":"Underlying index price","x-parser-schema-id":"\u003canonymous-schema-418>"},"breakEvenPrice":{"type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","x-parser-schema-id":"\u003canonymous-schema-419>"},"initialMargin":{"type":"string","description":"Initial margin (short positions; `0` for long)","x-parser-schema-id":"\u003canonymous-schema-420>"},"realizedPnl":{"type":"string","description":"Realized PnL","x-parser-schema-id":"\u003canonymous-schema-421>"},"unrealizedPnl":{"type":"string","description":"Unrealized PnL","x-parser-schema-id":"\u003canonymous-schema-422>"},"notionalValue":{"type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","x-parser-schema-id":"\u003canonymous-schema-423>"},"updatedAt":{"type":"integer","format":"int64","description":"Last update (ms since epoch)","x-parser-schema-id":"\u003canonymous-schema-424>"}},"required":["contract","side","optionType","qty","value","fees","entryPrice","markPrice","markIV","underlyingPrice","breakEvenPrice","initialMargin","realizedPnl","unrealizedPnl","notionalValue","updatedAt"],"x-parser-schema-id":"Position"},"x-parser-schema-id":"\u003canonymous-schema-432>"},"statusCode":{"type":"integer","description":"Always `200`.","x-parser-schema-id":"\u003canonymous-schema-433>"}},"required":["positions","statusCode"],"x-parser-schema-id":"\u003canonymous-schema-431>"}},"required":["resultType","market","data"],"x-parser-schema-id":"\u003canonymous-schema-428>"},"title":"Position Delta","description":"Pushed whenever your positions change; carries changed positions in the same shape as the snapshot. A delta has no `clientRequestId` — that is what distinguishes the live push from a snapshot response. A closed position arrives with `side` `flat` and `qty` `0`; this is the only message that tells you the position is gone.\n","example":"{\n \"resultType\": \"optionsPositionsDelta\",\n \"market\": \"BTC-10JUL26-55000-C\",\n \"data\": {\n \"positions\": [\n {\n \"contract\": \"BTC-10JUL26-55000-C\",\n \"side\": \"long\",\n \"optionType\": \"C\",\n \"qty\": \"1\",\n \"value\": \"6948.86\",\n \"fees\": \"3.47443\",\n \"entryPrice\": \"6948.86\",\n \"markPrice\": \"7250.5\",\n \"markIV\": \"0.4915\",\n \"underlyingPrice\": \"62200.1\",\n \"breakEvenPrice\": \"61952.33443\",\n \"initialMargin\": \"0\",\n \"realizedPnl\": \"0\",\n \"unrealizedPnl\": \"301.64\",\n \"notionalValue\": \"7250.5\",\n \"updatedAt\": 1783351516417\n }\n ],\n \"statusCode\": 200\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"optionsPositionsDelta"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionsStream"}]}],"sendMessages":[{"id":"emitOptionsPositionsRequest","contentType":"application/json","payload":[{"name":"Emit Options Positions","type":"object","properties":[{"name":"message","type":"string","description":"Always `emitOptionsPositions`.","required":true},{"name":"content","type":"object","required":false,"properties":[{"name":"clientRequestId","type":"string","description":"Client-generated UUID for correlation","required":false},{"name":"market","type":"string","description":"A contract name to filter, or `ALL` for every position. Defaults to `ALL`","required":false},{"name":"pageSize","type":"integer","description":"Page size, `1`–`200`. Omit it to receive every position in one message","required":false},{"name":"pageToken","type":"string","description":"The previous response's `nextPageToken`. Requires `pageSize`","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"message":{"type":"string","description":"Always `emitOptionsPositions`.","x-parser-schema-id":"\u003canonymous-schema-398>"},"content":{"type":"object","properties":{"clientRequestId":{"type":"string","format":"uuid","description":"Client-generated UUID for correlation","x-parser-schema-id":"\u003canonymous-schema-400>"},"market":{"type":"string","description":"A contract name to filter, or `ALL` for every position. Defaults to `ALL`","x-parser-schema-id":"\u003canonymous-schema-401>"},"pageSize":{"type":"integer","minimum":1,"maximum":200,"description":"Page size, `1`–`200`. Omit it to receive every position in one message","x-parser-schema-id":"\u003canonymous-schema-402>"},"pageToken":{"type":"string","description":"The previous response's `nextPageToken`. Requires `pageSize`","x-parser-schema-id":"\u003canonymous-schema-403>"}},"x-parser-schema-id":"\u003canonymous-schema-399>"}},"required":["message"],"x-parser-schema-id":"\u003canonymous-schema-397>"},"title":"Emit Options Positions","example":"{\n \"message\": \"emitOptionsPositions\",\n \"content\": {\n \"clientRequestId\": \"b8c56794-c7f8-467d-b331-be8c765a5378\",\n \"market\": \"BTC-10JUL26-55000-C\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"emitOptionsPositionsRequest"}]}],"receiveMessages":[{"id":"optionsPositionsResponse","contentType":"application/json","payload":[{"name":"Positions Snapshot","description":"Response to `emitOptionsPositions`.","type":"object","properties":[{"name":"resultType","type":"string","description":"Always `optionsPositions`.","required":true},{"name":"market","type":"string","description":"Contract name, or `ALL`","required":true},{"name":"data","type":"object","required":true,"properties":[{"name":"positions","type":"array","description":"Your open positions","required":true,"properties":[{"name":"contract","type":"string","description":"Contract name","required":true},{"name":"side","type":"string","description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","enumValues":["long","short","flat"],"required":true},{"name":"optionType","type":"string","description":"Option type — `C` (call) or `P` (put), matching the contract name","enumValues":["C","P"],"required":true},{"name":"qty","type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","required":true},{"name":"value","type":"string","description":"Position value at entry, signed (negative for a short)\n","required":true},{"name":"fees","type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","required":true},{"name":"entryPrice","type":"string","description":"Average entry price","required":true},{"name":"markPrice","type":"string","description":"Current mark price","required":true},{"name":"markIV","type":"string","description":"Mark implied volatility","required":true},{"name":"underlyingPrice","type":"string","description":"Underlying index price","required":true},{"name":"breakEvenPrice","type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","required":true},{"name":"initialMargin","type":"string","description":"Initial margin (short positions; `0` for long)","required":true},{"name":"realizedPnl","type":"string","description":"Realized PnL","required":true},{"name":"unrealizedPnl","type":"string","description":"Unrealized PnL","required":true},{"name":"notionalValue","type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","required":true},{"name":"updatedAt","type":"integer","description":"Last update (ms since epoch)","required":true}]},{"name":"statusCode","type":"integer","description":"Always `200`.","required":true},{"name":"clientRequestId","type":"string","description":"Client-generated UUID for correlation","required":false},{"name":"nextPageToken","type":"string","description":"Cursor for the next page; absent on the last page, and absent entirely when you emit without `pageSize`\n","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"resultType":{"type":"string","description":"Always `optionsPositions`.","x-parser-schema-id":"\u003canonymous-schema-405>"},"market":{"type":"string","description":"Contract name, or `ALL`","x-parser-schema-id":"\u003canonymous-schema-406>"},"data":{"type":"object","properties":{"positions":{"type":"array","description":"Your open positions","items":{"type":"object","properties":{"contract":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-409>"},"side":{"type":"string","enum":["long","short","flat"],"description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","x-parser-schema-id":"\u003canonymous-schema-410>"},"optionType":{"type":"string","enum":["C","P"],"description":"Option type — `C` (call) or `P` (put), matching the contract name","x-parser-schema-id":"\u003canonymous-schema-411>"},"qty":{"type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","x-parser-schema-id":"\u003canonymous-schema-412>"},"value":{"type":"string","description":"Position value at entry, signed (negative for a short)\n","x-parser-schema-id":"\u003canonymous-schema-413>"},"fees":{"type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","x-parser-schema-id":"\u003canonymous-schema-414>"},"entryPrice":{"type":"string","description":"Average entry price","x-parser-schema-id":"\u003canonymous-schema-415>"},"markPrice":{"type":"string","description":"Current mark price","x-parser-schema-id":"\u003canonymous-schema-416>"},"markIV":{"type":"string","description":"Mark implied volatility","x-parser-schema-id":"\u003canonymous-schema-417>"},"underlyingPrice":{"type":"string","description":"Underlying index price","x-parser-schema-id":"\u003canonymous-schema-418>"},"breakEvenPrice":{"type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","x-parser-schema-id":"\u003canonymous-schema-419>"},"initialMargin":{"type":"string","description":"Initial margin (short positions; `0` for long)","x-parser-schema-id":"\u003canonymous-schema-420>"},"realizedPnl":{"type":"string","description":"Realized PnL","x-parser-schema-id":"\u003canonymous-schema-421>"},"unrealizedPnl":{"type":"string","description":"Unrealized PnL","x-parser-schema-id":"\u003canonymous-schema-422>"},"notionalValue":{"type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","x-parser-schema-id":"\u003canonymous-schema-423>"},"updatedAt":{"type":"integer","format":"int64","description":"Last update (ms since epoch)","x-parser-schema-id":"\u003canonymous-schema-424>"}},"required":["contract","side","optionType","qty","value","fees","entryPrice","markPrice","markIV","underlyingPrice","breakEvenPrice","initialMargin","realizedPnl","unrealizedPnl","notionalValue","updatedAt"],"x-parser-schema-id":"Position"},"x-parser-schema-id":"\u003canonymous-schema-408>"},"statusCode":{"type":"integer","description":"Always `200`.","x-parser-schema-id":"\u003canonymous-schema-425>"},"clientRequestId":{"type":"string","description":"Client-generated UUID for correlation","x-parser-schema-id":"\u003canonymous-schema-426>"},"nextPageToken":{"type":"string","description":"Cursor for the next page; absent on the last page, and absent entirely when you emit without `pageSize`\n","x-parser-schema-id":"\u003canonymous-schema-427>"}},"required":["positions","statusCode"],"x-parser-schema-id":"\u003canonymous-schema-407>"}},"required":["resultType","market","data"],"x-parser-schema-id":"\u003canonymous-schema-404>"},"title":"Positions Snapshot","description":"Response to `emitOptionsPositions`.","example":"{\n \"resultType\": \"optionsPositions\",\n \"market\": \"BTC-10JUL26-55000-C\",\n \"data\": {\n \"positions\": [\n {\n \"contract\": \"BTC-10JUL26-55000-C\",\n \"side\": \"long\",\n \"optionType\": \"C\",\n \"qty\": \"1\",\n \"value\": \"6948.86\",\n \"fees\": \"3.47443\",\n \"entryPrice\": \"6948.86\",\n \"markPrice\": \"7194.0717439\",\n \"markIV\": \"0.490087689370473\",\n \"underlyingPrice\": \"62142.5973392596\",\n \"breakEvenPrice\": \"61952.33443\",\n \"initialMargin\": \"0\",\n \"realizedPnl\": \"0\",\n \"unrealizedPnl\": \"245.2117439\",\n \"notionalValue\": \"7194.0717439\",\n \"updatedAt\": 1783079880460\n }\n ],\n \"statusCode\": 200,\n \"clientRequestId\": \"b8c56794-c7f8-467d-b331-be8c765a5378\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"optionsPositionsResponse"}]},{"id":"optionsPositionsDelta","contentType":"application/json","payload":[{"name":"Position Delta","description":"Pushed whenever your positions change; carries changed positions in the same shape as the snapshot. A delta has no `clientRequestId` — that is what distinguishes the live push from a snapshot response. A closed position arrives with `side` `flat` and `qty` `0`; this is the only message that tells you the position is gone.\n","type":"object","properties":[{"name":"resultType","type":"string","description":"Always `optionsPositionsDelta`.","required":true},{"name":"market","type":"string","description":"Contract name","required":true},{"name":"data","type":"object","required":true,"properties":[{"name":"positions","type":"array","description":"Changed positions","required":true,"properties":[{"name":"contract","type":"string","description":"Contract name","required":true},{"name":"side","type":"string","description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","enumValues":["long","short","flat"],"required":true},{"name":"optionType","type":"string","description":"Option type — `C` (call) or `P` (put), matching the contract name","enumValues":["C","P"],"required":true},{"name":"qty","type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","required":true},{"name":"value","type":"string","description":"Position value at entry, signed (negative for a short)\n","required":true},{"name":"fees","type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","required":true},{"name":"entryPrice","type":"string","description":"Average entry price","required":true},{"name":"markPrice","type":"string","description":"Current mark price","required":true},{"name":"markIV","type":"string","description":"Mark implied volatility","required":true},{"name":"underlyingPrice","type":"string","description":"Underlying index price","required":true},{"name":"breakEvenPrice","type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","required":true},{"name":"initialMargin","type":"string","description":"Initial margin (short positions; `0` for long)","required":true},{"name":"realizedPnl","type":"string","description":"Realized PnL","required":true},{"name":"unrealizedPnl","type":"string","description":"Unrealized PnL","required":true},{"name":"notionalValue","type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","required":true},{"name":"updatedAt","type":"integer","description":"Last update (ms since epoch)","required":true}]},{"name":"statusCode","type":"integer","description":"Always `200`.","required":true}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","properties":{"resultType":{"type":"string","description":"Always `optionsPositionsDelta`.","x-parser-schema-id":"\u003canonymous-schema-429>"},"market":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-430>"},"data":{"type":"object","properties":{"positions":{"type":"array","description":"Changed positions","items":{"type":"object","properties":{"contract":{"type":"string","description":"Contract name","x-parser-schema-id":"\u003canonymous-schema-409>"},"side":{"type":"string","enum":["long","short","flat"],"description":"Position side. `flat` appears only on deltas, when a position closes — remove the position from your book on receiving it; the snapshot omits closed positions entirely\n","x-parser-schema-id":"\u003canonymous-schema-410>"},"optionType":{"type":"string","enum":["C","P"],"description":"Option type — `C` (call) or `P` (put), matching the contract name","x-parser-schema-id":"\u003canonymous-schema-411>"},"qty":{"type":"string","description":"Signed position quantity — negative for a short. `side` carries the same direction\n","x-parser-schema-id":"\u003canonymous-schema-412>"},"value":{"type":"string","description":"Position value at entry, signed (negative for a short)\n","x-parser-schema-id":"\u003canonymous-schema-413>"},"fees":{"type":"string","description":"Fees actually charged to open the current position. Reducing the position reduces `fees` in the same proportion, so it always covers only the contracts still held; `0` once the position closes\n","x-parser-schema-id":"\u003canonymous-schema-414>"},"entryPrice":{"type":"string","description":"Average entry price","x-parser-schema-id":"\u003canonymous-schema-415>"},"markPrice":{"type":"string","description":"Current mark price","x-parser-schema-id":"\u003canonymous-schema-416>"},"markIV":{"type":"string","description":"Mark implied volatility","x-parser-schema-id":"\u003canonymous-schema-417>"},"underlyingPrice":{"type":"string","description":"Underlying index price","x-parser-schema-id":"\u003canonymous-schema-418>"},"breakEvenPrice":{"type":"string","description":"Break-even price at expiry, net of premium and opening fees per contract","x-parser-schema-id":"\u003canonymous-schema-419>"},"initialMargin":{"type":"string","description":"Initial margin (short positions; `0` for long)","x-parser-schema-id":"\u003canonymous-schema-420>"},"realizedPnl":{"type":"string","description":"Realized PnL","x-parser-schema-id":"\u003canonymous-schema-421>"},"unrealizedPnl":{"type":"string","description":"Unrealized PnL","x-parser-schema-id":"\u003canonymous-schema-422>"},"notionalValue":{"type":"string","description":"Notional value of the position, signed (negative for short positions); `0` when the mark price is unavailable","x-parser-schema-id":"\u003canonymous-schema-423>"},"updatedAt":{"type":"integer","format":"int64","description":"Last update (ms since epoch)","x-parser-schema-id":"\u003canonymous-schema-424>"}},"required":["contract","side","optionType","qty","value","fees","entryPrice","markPrice","markIV","underlyingPrice","breakEvenPrice","initialMargin","realizedPnl","unrealizedPnl","notionalValue","updatedAt"],"x-parser-schema-id":"Position"},"x-parser-schema-id":"\u003canonymous-schema-432>"},"statusCode":{"type":"integer","description":"Always `200`.","x-parser-schema-id":"\u003canonymous-schema-433>"}},"required":["positions","statusCode"],"x-parser-schema-id":"\u003canonymous-schema-431>"}},"required":["resultType","market","data"],"x-parser-schema-id":"\u003canonymous-schema-428>"},"title":"Position Delta","description":"Pushed whenever your positions change; carries changed positions in the same shape as the snapshot. A delta has no `clientRequestId` — that is what distinguishes the live push from a snapshot response. A closed position arrives with `side` `flat` and `qty` `0`; this is the only message that tells you the position is gone.\n","example":"{\n \"resultType\": \"optionsPositionsDelta\",\n \"market\": \"BTC-10JUL26-55000-C\",\n \"data\": {\n \"positions\": [\n {\n \"contract\": \"BTC-10JUL26-55000-C\",\n \"side\": \"long\",\n \"optionType\": \"C\",\n \"qty\": \"1\",\n \"value\": \"6948.86\",\n \"fees\": \"3.47443\",\n \"entryPrice\": \"6948.86\",\n \"markPrice\": \"7250.5\",\n \"markIV\": \"0.4915\",\n \"underlyingPrice\": \"62200.1\",\n \"breakEvenPrice\": \"61952.33443\",\n \"initialMargin\": \"0\",\n \"realizedPnl\": \"0\",\n \"unrealizedPnl\": \"301.64\",\n \"notionalValue\": \"7250.5\",\n \"updatedAt\": 1783351516417\n }\n ],\n \"statusCode\": 200\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"optionsPositionsDelta"}]}],"extensions":[{"id":"x-parser-unique-object-id","value":"positionsStream"}],"securitySchemes":[{"id":"wsAuth","name":"Sec-WebSocket-Protocol","type":"httpApiKey","description":"Supply as `authorization#\u003cJWT>` during the WebSocket handshake.","in":"header","extensions":[]}]},"channelId":"positionsStream","metadata":{"id":14492,"subdomain":"railsxyz","eTag":"\"244631ceec07313cfd5355116da7dc6d\"","originalFileLocation":"latest/options/asyncapi/options-ws.yaml","uuid":"0362a111-21b4-40ed-9e54-ac220b0cd014","source":"LOCAL_FILE","createdAt":"2026-07-15T20:47:04.725Z","updatedAt":"2026-10-23T15:25:27.408Z","deletedAt":null,"retiredAt":null,"retiredByDeploymentHistoryId":null}},"subdomain":"railsxyz","siteName":"Rails Trading Developer API Documentation","title":"Positions Stream - Rails Trading Developer API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-02T20:41:02.453Z","originalFileLocation":"latest/options/websocket-api/positions-stream.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=\"Open positions with mark price, margin, and PnL.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Rails Trading Developer API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Positions Stream - Rails Trading Developer API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Open positions with mark price, margin, and PnL.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rails Trading Developer API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://railsxyz.mintlify.site/_mintlify/api/og/v2?division=WebSocket+API+Reference\u0026amp;title=Positions+Stream\u0026amp;description=Open+positions+with+mark+price%2C+margin%2C+and+PnL.\u0026amp;theme=328cc55faa8e33363fe01ff9\u0026amp;signature=c502bbfaabb2ae0f4e39e9e14cf55d99f9108a5651ea1cc5c884ad3ff601aa19\">\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=\"Positions Stream - Rails Trading Developer API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Open positions with mark price, margin, and PnL.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://railsxyz.mintlify.site/_mintlify/api/og/v2?division=WebSocket+API+Reference\u0026amp;title=Positions+Stream\u0026amp;description=Open+positions+with+mark+price%2C+margin%2C+and+PnL.\u0026amp;theme=328cc55faa8e33363fe01ff9\u0026amp;signature=c502bbfaabb2ae0f4e39e9e14cf55d99f9108a5651ea1cc5c884ad3ff601aa19\">\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/railsxyz/uzRYRjCG6Wh2I4zS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rails Trading Developer API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/latest/options/websocket-api/positions-stream.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.rails.xyz/#organization\",\"name\":\"Rails Trading Developer API Documentation\",\"url\":\"https://docs.rails.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/railsxyz/XTasO28fw_2bd6Tp/logo/light.svg?fit=max\u0026auto=format\u0026n=XTasO28fw_2bd6Tp\u0026q=85\u0026s=562d1517f28bb695fb280b18dd4310a4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.rails.xyz#website\",\"name\":\"Rails Trading Developer API Documentation\",\"url\":\"https://docs.rails.xyz\",\"publisher\":{\"@id\":\"https://docs.rails.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream#webpage\",\"url\":\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream\",\"name\":\"Positions Stream\",\"description\":\"Open positions with mark price, margin, and PnL.\",\"dateModified\":\"2026-10-02T20:41:02.453Z\",\"isPartOf\":{\"@id\":\"https://docs.rails.xyz#website\"},\"breadcrumb\":{\"@id\":\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"WebSocket API Reference\",\"item\":\"https://docs.rails.xyz/latest/options/websocket-api/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Positions Stream\",\"item\":\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream#apireference\",\"headline\":\"Positions Stream\",\"name\":\"Positions Stream\",\"description\":\"Open positions with mark price, margin, and PnL.\",\"url\":\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream\",\"mainEntityOfPage\":{\"@id\":\"https://docs.rails.xyz/latest/options/websocket-api/positions-stream#webpage\"},\"dateModified\":\"2026-10-02T20:41:02.453Z\",\"publisher\":{\"@id\":\"https://docs.rails.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.rails.xyz#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Rails Trading Developer API Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Rails Trading Developer API Documentation","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":""}]},{"tab":"Get Started","icon":"rocket","pages":[{"title":"Get Started","href":"/latest/introduction"}]},{"tab":"Perpetuals","icon":"chart-line","pages":[{"title":"Perpetuals","href":"/latest/perps/guides/overview"}]},{"tab":"Options","icon":"layer-group","groups":[{"group":"Guides","pages":[{"title":"Overview","href":"/latest/options/guides/overview"},{"title":"Instruments \u0026 Symbols","href":"/latest/options/guides/instruments-and-symbols"},{"title":"Market Data","href":"/latest/options/guides/market-data"},{"title":"Pricing \u0026 Greeks","href":"/latest/options/guides/pricing-and-greeks"},{"title":"Order Lifecycle","href":"/latest/options/guides/order-lifecycle"},{"title":"Positions \u0026 Account","href":"/latest/options/guides/positions-and-account"},{"title":"Margin \u0026 Liquidation","href":"/latest/options/guides/margin-and-liquidation"},{"title":"Settlement \u0026 Expiry","href":"/latest/options/guides/settlement-and-expiry"},{"title":"Rate Limits","href":"/latest/options/guides/rate-limits"},{"title":"Error Codes","href":"/latest/options/guides/error-codes"},{"title":"FAQs","href":"/latest/options/guides/faqs"}]},{"group":"Formulas","pages":[{"title":"Pricing \u0026 Greeks","href":"/latest/options/formulas/pricing-and-greeks"},{"title":"Margin \u0026 Fees","href":"/latest/options/formulas/margin-and-fees"},{"title":"Position Metrics","href":"/latest/options/formulas/position-metrics"},{"title":"Account Equity \u0026 Balances","href":"/latest/options/formulas/account-balance"},{"title":"Settlement","href":"/latest/options/formulas/settlement"}]},{"group":"Go SDK","pages":[{"title":"Quickstart","href":"/latest/options/go-sdk/quickstart"},{"title":"Orders","href":"/latest/options/go-sdk/orders"},{"title":"Streams \u0026 Account","href":"/latest/options/go-sdk/streams-and-account"}]},{"group":"WebSocket API Reference","pages":[{"title":"Overview","href":"/latest/options/websocket-api/overview"},{"title":"Common Requests","asyncapi":"latest/options/asyncapi/options-ws.yaml commonRequests","href":"/latest/options/websocket-api/common-requests"},{"title":"Order Management Stream","asyncapi":"latest/options/asyncapi/options-ws.yaml orderManagementStream","href":"/latest/options/websocket-api/order-management-stream"},{"title":"Contracts Stream","asyncapi":"latest/options/asyncapi/options-ws.yaml contractsStream","href":"/latest/options/websocket-api/contracts-stream"},{"title":"Quotes Stream","asyncapi":"latest/options/asyncapi/options-ws.yaml quotesStream","href":"/latest/options/websocket-api/quotes-stream"},{"title":"Order Book Stream","asyncapi":"latest/options/asyncapi/options-ws.yaml publicOrderBookStream","href":"/latest/options/websocket-api/order-book-stream"},{"title":"Public Trades Stream","description":"Real-time public trade executions for a contract.","asyncapi":"latest/options/asyncapi/options-ws.yaml publicTradesStream","href":"/latest/options/websocket-api/public-trades-stream"},{"title":"Positions Stream","asyncapi":"latest/options/asyncapi/options-ws.yaml positionsStream","href":"/latest/options/websocket-api/positions-stream"},{"title":"Open Orders Stream","description":"Your open orders and incremental updates.","asyncapi":"latest/options/asyncapi/options-ws.yaml openOrdersStream","href":"/latest/options/websocket-api/open-orders-stream"},{"title":"Recent Orders Stream","asyncapi":"latest/options/asyncapi/options-ws.yaml recentOrdersStream","href":"/latest/options/websocket-api/recent-orders-stream"},{"title":"Account Summary Stream","asyncapi":"latest/options/asyncapi/options-ws.yaml accountSummaryStream","href":"/latest/options/websocket-api/account-summary-stream"},{"title":"Settlements Stream","asyncapi":"latest/options/asyncapi/options-ws.yaml settlementsStream","href":"/latest/options/websocket-api/settlements-stream"}]},{"group":"HTTP API Reference","pages":[{"group":"Market Data","pages":[{"title":"Get Expirations","openapi":"GET /v1/contracts/markets/{market}/expirations","href":"/latest/options/rest-api/get-expirations"},{"title":"Get Contracts","openapi":"GET /v1/contracts/markets/{market}/expirations/{expiry}/contracts","href":"/latest/options/rest-api/get-contracts"}]},{"group":"Orders","pages":[{"title":"Create Order","openapi":"POST /v1/matching/orders/create","href":"/latest/options/rest-api/create-order"},{"title":"Modify Order","openapi":"POST /v1/matching/orders/modify","href":"/latest/options/rest-api/modify-order"},{"title":"Cancel Order","openapi":"POST /v1/matching/orders/cancel","href":"/latest/options/rest-api/cancel-order"},{"title":"Cancel All Orders","openapi":"POST /v1/matching/orders/cancel-all","href":"/latest/options/rest-api/cancel-all-orders"},{"title":"Get Open Orders","openapi":"GET /v1/matching/orders/open","href":"/latest/options/rest-api/get-open-orders"},{"title":"Get Order Status","openapi":"GET /v1/matching/orders/{orderId}","href":"/latest/options/rest-api/get-order-status"}]},{"group":"User Account","pages":[{"title":"Get Account Summary","openapi":"GET /v1/account/summary","href":"/latest/options/rest-api/get-account-summary"},{"title":"Get Positions","openapi":"GET /v1/account/positions","href":"/latest/options/rest-api/get-account-positions"},{"title":"Get Recent Orders","openapi":"GET /v1/account/orders","href":"/latest/options/rest-api/get-account-orders"},{"title":"Get Account Deposits","openapi":"GET /v1/account/deposits","href":"/latest/options/rest-api/get-account-deposits"},{"title":"Get Account Withdrawals","openapi":"GET /v1/account/withdrawals","href":"/latest/options/rest-api/get-account-withdrawals"}]}]}]}]},"basePath":"","title":"Positions Stream - Rails Trading Developer API Documentation","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["3b021dca80","a4b48b4bee","a9bb46feb3"],"chunks":["MessageExamples-MyiaavaP.js","CodeSnippet-Bm5RU7m1.js","Page-DhoE8Dke.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","getApiPlaygroundDisplay-BB9vkXtE.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}