{"openapi":"3.0.3","info":{"title":"BitGo WebSocket API","version":"1.0.0"},"servers":[{"url":"/","description":"Default server"}],"tags":[{"name":"Trade WebSocket","x-displayName":"Trade WebSocket","description":"Real-time WebSocket feeds for order books and trade order status updates."}],"paths":{"/api/prime/trading/v1/ws (level2)":{"get":{"summary":"Level2 Order Book","description":"Establish a WebSocket connection to get real-time updates for order books. Subscribe to a live feed of all outstanding buy and sell orders on the market for specific coins and tokens. Send messages when specific market conditions occur.","operationId":"trade.websocket.level2","x-internal":false,"tags":["Trade WebSocket"],"parameters":[{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"},"description":"Bearer token for authorization"}],"requestBody":{"description":"Event subscription details for Order Books","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WsOrderBooksRequest"}}}},"responses":{"101":{"description":"Switching Protocols. Once connected, the server may send:\n- `WsOrderBooksResponse` — level2 order book snapshot/updates\n- `WsSubscriptionResponse` — confirmation after every subscribe/unsubscribe request\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WsOrderBooksResponse"},{"$ref":"#/components/schemas/WsSubscriptionResponse"}]},"examples":{"level2SnapshotPriceAndSize":{"summary":"Level2 snapshot — [price, size] per level","description":"Order book snapshot when `includeCumulative` is false or omitted on the subscription.","value":{"channel":"level2","type":"snapshot","product":"TBTC-TUSD*","time":"2020-01-01T09:35:26.465Z","bids":[["7001.10","1.5084"]],"asks":[["7002.55","2.7524"]]}},"level2SnapshotWithCumulative":{"summary":"Level2 snapshot — [price, size, cumulativeSize] per level","description":"Order book snapshot when `includeCumulative` is true on the subscription.","value":{"channel":"level2","type":"snapshot","product":"TBTC-TUSD*","time":"2020-01-01T09:35:26.465Z","bids":[["7001.10","1.5084","1.5084"],["7000.50","0.8000","2.3084"]],"asks":[["7002.55","2.7524","2.7524"],["7003.00","1.2000","3.9524"]]}}}}}},"403":{"$ref":"#/components/responses/ForbiddenError3"}}}},"/api/prime/trading/v1/ws (orders)":{"get":{"summary":"Orders","description":"Establish a WebSocket connection to get real-time updates for trade orders. Subscribe to live status updates for your trade orders, including individual fills for an order. Send messages when statuses update.","operationId":"trade.websocket.orders","x-internal":false,"tags":["Trade WebSocket"],"parameters":[{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"},"description":"Bearer token for authorization"}],"requestBody":{"description":"Event subscription details for Trade Orders","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WsTradeOrdersRequest"}}}},"responses":{"101":{"description":"Switching Protocols. Once connected, the server may send:\n- `WsTradeOrdersResponse` — order events and subscription confirmations\n- `WsSubscriptionResponse` — confirmation after every subscribe/unsubscribe request\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WsTradeOrdersResponse"},{"$ref":"#/components/schemas/WsSubscriptionResponse"}]}}}},"403":{"$ref":"#/components/responses/ForbiddenError3"}}}}},"components":{"callbacks":{},"headers":{},"links":{},"requestBodies":{},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GeneralError"},{"$ref":"#/components/schemas/ValidationError"}]},"example":{"code":"BadRequest","message":"Bad Request","status":400}}}},"BadRequestError":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"}}}},"BadRequestError1":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"},"example":{"error":"Bad Request","errorName":"BadRequest","reqId":"some-id"}}}},"Conflict":{"description":"Conflict - The request conflicts with the current state of the resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"},"example":{"code":"Conflict","message":"A pending change already exists for this policy rule","status":409}}}},"ConflictError":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"},"example":{"error":"Conflicting clientID","errorName":"Conflict","reqId":"some-id"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"},"example":{"code":"AccessDenied","message":"License not added for enterprise","status":403}}}},"ForbiddenError":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"}}}},"ForbiddenError1":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"},"examples":{"forbidden":{"summary":"Insufficient permissions","value":{"error":"Forbidden, reqId=unk-nqo97l23l2ofpvgkbb8z","errorName":"backend:common:forbidden","reqId":"unk-nqo97l23l2ofpvgkbb8z"}}}}}},"ForbiddenError2":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"},"example":{"error":"Staking license not added for enterprise","errorName":"AccessDenied","reqId":"some-id"}}}},"ForbiddenError3":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WsError"}}}},"InternalServerError":{"description":"Server Error - Transient error please try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"}}}},"InternalServerError1":{"description":"Server Error - Transient error please try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"},"example":{"error":"Database is down","errorName":"Internal_Server_Error","reqId":"some-id"}}}},"MalformedJSONError":{"description":"Unprocessable Entity - JSON payload is improperly formatted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"},"examples":{"malformedJSON":{"summary":"JSON payload is improperly formatted","value":{"error":"backend:common:malformedJSON","errorName":"backend:common:malformedJSON","reqId":"unk-nqo97l23l2ofpvgkbb8z"}}}}}},"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"},"example":{"code":"NotFound","message":"Touchpoint not found","status":404}}}},"NotFoundError":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"}}}},"NotFoundError1":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"},"example":{"error":"Wallet not found","errorName":"NotFound","reqId":"some-id"}}}},"RateLimitError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"},"examples":{"rateLimitExceeded":{"summary":"Too many API requests","value":{"error":"backend:common:rateLimitExceeded","errorName":"backend:common:rateLimitExceeded","reqId":"unk-nqo97l23l2ofpvgkbb8z"}}}}}},"ServerError":{"description":"Server Error - Transient error please try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"},"example":{"code":"Internal_Server_Error","message":"Database is down","status":500}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralError"},"example":{"code":"Unauthorized","message":"Unauthorized","status":401}}}},"UnauthorizedError":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"}}}},"UnauthorizedError1":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"},"examples":{"unauthorized":{"summary":"Unauthorized access","value":{"error":"Unauthorized","errorName":"Error","reqId":"unk-nqo97l23l2ofpvgkbb8z"}}}}}},"UnauthorizedError2":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingError"},"example":{"error":"Unauthorized","errorName":"Unauthorized","reqId":"some-id"}}}},"internalServerError1":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"},"examples":{"internalServerError":{"summary":"Generic server error - Reach out to support for more information","value":{"error":"backend:common:internalServerError","errorName":"backend:common:internalServerError","reqId":"unk-nqo97l23l2ofpvgkbb8z"}}}}}}},"schemas":{"Error1":{"required":["error","errorName","reqId"],"type":"object","properties":{"error":{"type":"string"},"errorName":{"type":"string"},"reqId":{"type":"string"},"context":{"$ref":"#/components/schemas/ErrorContext"}},"example":{"error":"invalid permission","errorName":"backend:common:forbidden","reqId":"unk-nqo97l23l2ofpvgkbb8z"}},"ErrorContext":{"type":"object","description":"Optional structured metadata for REST validation failures.\nThe schema is fixed for client contract stability.\n","required":["errorName"],"properties":{"errorName":{"type":"string","description":"Same value as the top-level errorName."},"field":{"type":"string","description":"Request field associated with the validation failure."},"message":{"type":"string","description":"Human-readable field-level validation message."}}},"GeneralError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"}}},"StakingError":{"title":"Staking Error","type":"object","properties":{"error":{"type":"string"},"errorName":{"type":"string"},"reqId":{"type":"string"},"context":{"type":"object"}}},"ValidationError":{"allOf":[{"$ref":"#/components/schemas/GeneralError"},{"type":"object","properties":{"failedValidations":{"type":"object"}}}]},"WsAccountId":{"type":"string","description":"The ID of the account"},"WsClientOrderId":{"type":"string","description":"Custom order ID provided by the client. This must be a unique ID for each individual order and cannot be the same across multiple requests.\nCan be used to ensure idempotency of order requests.\n","maxLength":256},"WsError":{"type":"object","required":["error","errorName","reqId"],"properties":{"error":{"type":"string"},"errorName":{"type":"string"},"reqId":{"type":"string"}}},"WsFillUpdated":{"title":"Fill Updated","allOf":[{"$ref":"#/components/schemas/WsTradeBaseOrder"}],"example":{"channel":"orders","time":"2025-12-08T16:41:03.30491Z","creationDate":"2025-12-08T16:41:02.802558Z","scheduledDate":null,"lastFillDate":"2025-12-08T16:41:03.419104Z","completionDate":null,"settleDate":null,"accountId":"6598421ec862bac27d0d4f7d827fe202","orderId":"4f9aacc5-d8aa-4fe4-bb6d-109eee0b7270","clientOrderId":"my-order-1","product":"BTC-USD","fundingType":"funded","status":"open","execType":"F","type":"market","side":"buy","quantity":"0.0068","quantityCurrency":"BTC","cumulativeQuantity":"0.00342566","cumulativeQuoteQuantity":"310","leavesQuantity":"0.0068","leavesQuoteQuantity":null,"averagePrice":"90493.51","tradeId":"5606d256-818f-4e55-9cf8-4b237ddd0c85","fillQuantity":"0.00342566","fillPrice":"90493.51"}},"WsFundingType":{"type":"string","enum":["margin","funded"],"description":"The funding type of the order.\n- Funded orders will be placed using the Go account balance.\n- Margin orders will be placed using the margin account balances.\nSee our [Trade Guide](/docs/trade-overview) for more details on each funding type.\n","default":"funded"},"WsOrderBooksRequest":{"title":"Order Books","required":["type","channel","accountId","productId"],"type":"object","properties":{"type":{"type":"string","description":"The event type (e.g. \"subscribe\" or \"unsubscribe\")"},"channel":{"type":"string","description":"The subscription channel (e.g. \"level2\" for order books)"},"accountId":{"$ref":"#/components/schemas/WsAccountId"},"productId":{"type":"string","description":"The ID of product. (e.g. \"TBTC-TUSD*\")"},"includeCumulative":{"type":"boolean","description":"Include cumulative size in each price level. When `true`, each level is `[price, size, cumulativeSize]` instead of `[price, size]`.\n`cumulativeSize` is the running total of `size` from the top of that side through the level.\n","default":false}},"example":{"type":"subscribe","channel":"level2","accountId":"f230fdebfa084ffebc7e00515f54603f","productId":"TBTC-TUSD*"}},"WsOrderBooksResponse":{"title":"Order Books Response","type":"object","properties":{"channel":{"type":"string","description":"The channel name (e.g. \"level2\")."},"type":{"type":"string","description":"The type of the response (e.g. \"snapshot\")."},"product":{"type":"string","description":"The product name (e.g. \"TBTC-TUSD*\")."},"time":{"type":"string","format":"date-time","description":"The timestamp of the snapshot."},"bids":{"type":"array","description":"An array of bid levels `[price, size]` or `[price, size, cumulativeSize]` when `includeCumulative` is true.\n`cumulativeSize` is the running total of `size` from the top of that side through the level.\n","items":{"type":"array","items":{"type":"string"}}},"asks":{"type":"array","description":"An array of ask levels `[price, size]` or `[price, size, cumulativeSize]` when `includeCumulative` is true.\n`cumulativeSize` is the running total of `size` from the top of that side through the level.\n","items":{"type":"array","items":{"type":"string"}}}},"example":{"channel":"level2","type":"snapshot","product":"TBTC-TUSD*","time":"2020-01-01T09:35:26.465Z","bids":[["7001.10","1.5084"]],"asks":[["7002.55","2.7524"]]}},"WsOrderCanceled":{"title":"Order Canceled","allOf":[{"$ref":"#/components/schemas/WsTradeBaseOrder"}],"example":{"channel":"orders","time":"2025-12-05T00:03:29.878861Z","creationDate":"2025-12-05T00:03:28.501965Z","scheduledDate":null,"lastFillDate":null,"completionDate":null,"settleDate":null,"accountId":"6598421ec862bac27d0d4f7d827fe202","orderId":"8857abd9-a88b-4059-a66c-9e45bfb58699","clientOrderId":"my-order-1","product":"BTC-USD","fundingType":"funded","status":"canceled","execType":"4","type":"market","side":"buy","quantity":"0.0068","quantityCurrency":"BTC","cumulativeQuantity":"0","cumulativeQuoteQuantity":"0","leavesQuantity":"0.0068","leavesQuoteQuantity":null,"averagePrice":"0","tradeId":"","fillQuantity":"","fillPrice":""}},"WsOrderCompleted":{"title":"Order Completed","allOf":[{"$ref":"#/components/schemas/WsTradeBaseOrder"}],"example":{"channel":"orders","time":"2025-12-05T00:03:29.878861Z","creationDate":"2025-12-05T00:03:28.501965Z","scheduledDate":null,"lastFillDate":"2025-12-05T00:03:29.091521Z","completionDate":"2025-12-05T00:03:29.878861Z","settleDate":null,"accountId":"6598421ec862bac27d0d4f7d827fe202","orderId":"8857abd9-a88b-4059-a66c-9e45bfb58699","clientOrderId":"my-order-1","product":"BTC-USD","fundingType":"funded","status":"completed","execType":"I","type":"market","side":"buy","quantity":"0.0068","quantityCurrency":"BTC","cumulativeQuantity":"0.0068","cumulativeQuoteQuantity":"615.38","leavesQuantity":"0","leavesQuoteQuantity":null,"averagePrice":"90497.05","tradeId":"","fillQuantity":"","fillPrice":""}},"WsOrderCreated":{"title":"Order Created","allOf":[{"$ref":"#/components/schemas/WsTradeBaseOrder"},{"type":"object"}],"example":{"channel":"orders","time":"2025-12-08T16:41:02.802558Z","creationDate":"2025-12-05T21:31:37.907912Z","scheduledDate":null,"lastFillDate":null,"completionDate":null,"settleDate":null,"accountId":"f230fdebfa084ffebc7e00515f54603f","orderId":"14db12f5-4d3d-4fd8-8ced-062aa81bb4bc","clientOrderId":"my-order-1","product":"BTC-USD","fundingType":"funded","status":"pending_open","execType":"A","type":"market","side":"buy","quantity":"0.0068","quantityCurrency":"BTC","cumulativeQuantity":"0.00110034","cumulativeQuoteQuantity":"0","leavesQuantity":"0.0068","leavesQuoteQuantity":null,"averagePrice":"0","tradeId":"","fillQuantity":"","fillPrice":""}},"WsOrderError":{"title":"Order Error","allOf":[{"$ref":"#/components/schemas/WsTradeBaseOrder"}],"example":{"channel":"orders","time":"2019-04-25T01:02:03.045678Z","accountId":"f230fdebfa084ffebc7e00515f54603f","orderId":"14db12f5-4d3d-4fd8-8ced-062aa81bb4bc","product":"BTC-USD","fundingType":"funded","status":"error","execType":"8","type":"market","side":"buy","quantity":"0.0068","quantityCurrency":"BTC","cumulativeQuantity":"0.00359973","cumulativeQuoteQuantity":"325.53","leavesQuantity":"0.00320027","leavesQuoteQuantity":null,"averagePrice":"90431.78","tradeId":"","fillQuantity":"","fillPrice":""}},"WsOrderStatus":{"type":"string","enum":["pending_open","open","completed","pending_cancel","canceled","error","scheduled"]},"WsOrderType":{"type":"string","enum":["market","twap","limit","steady_pace","stop"],"description":"The type of order to be placed. See our [Trade Guide](/docs/trade-overview) for more details on each order type."},"WsScheduledDate":{"type":"string","format":"date-time","description":"Date to schedule the order. If not provided, the order will be placed immediately."},"WsSide":{"type":"string","enum":["buy","sell"]},"WsSubscriptionResponse":{"title":"Subscription Response","description":"Sent by the server after every subscribe or unsubscribe request to confirm the outcome.\nClients should handle this message type to detect whether a subscription was accepted,\nalready active, or released.\n","type":"object","required":["type","channel","status"],"properties":{"type":{"type":"string","description":"Always \"subscription_response\".","enum":["subscription_response"]},"channel":{"type":"string","description":"The channel the subscription applies to (\"orders\" or \"level2\").","enum":["orders","level2"]},"status":{"type":"string","description":"Outcome of the subscribe/unsubscribe request:\n- `subscribed` — subscription was accepted and is now active.\n- `already_subscribed` — (orders channel only) a subscription for this accountId was already active; no duplicate was created. For the level2 channel, duplicate subscribe requests return an error instead, because `includeCumulative` is fixed for the lifetime of a subscription and cannot be changed without unsubscribing first.\n- `unsubscribed` — subscription was successfully removed.\n","enum":["subscribed","already_subscribed","unsubscribed"]},"accountId":{"$ref":"#/components/schemas/WsAccountId"},"productId":{"type":"string","description":"The product ID, present for level2 subscriptions.","example":"TBTC-TUSD*"},"session_id":{"type":"string","description":"The session ID for this WebSocket connection."}},"example":{"type":"subscription_response","channel":"orders","status":"subscribed","accountId":"f230fdebfa084ffebc7e00515f54603f"}},"WsTradeBaseOrder":{"type":"object","properties":{"channel":{"type":"string","description":"The channel you are subscribed to.","example":"orders"},"time":{"type":"string","format":"date-time"},"creationDate":{"type":"string","format":"date-time"},"completionDate":{"type":"string","format":"date-time"},"settleDate":{"type":"string","format":"date-time"},"scheduledDate":{"$ref":"#/components/schemas/WsScheduledDate"},"lastFillDate":{"type":"string","format":"date-time"},"accountId":{"$ref":"#/components/schemas/WsAccountId"},"clientOrderId":{"$ref":"#/components/schemas/WsClientOrderId"},"orderId":{"type":"string","description":"The ID of the order.","example":"14db12f5-4d3d-4fd8-8ced-062aa81bb4bc"},"product":{"type":"string","description":"Product name.","example":"BTC-USD"},"fundingType":{"$ref":"#/components/schemas/WsFundingType"},"status":{"$ref":"#/components/schemas/WsOrderStatus"},"execType":{"type":"string","description":"The type of update, using FIX 4.4 ExecType (tag 150) values.\nUse this field to distinguish order status updates from fill events.\n\n- `F` (Trade) — a fill occurred; check `tradeId`, `fillQuantity`, `fillPrice` for fill details\n- `0` (New) — order accepted by the exchange\n- `A` (Pending New) — order submitted, awaiting acceptance\n- `6` (Pending Cancel) — cancel request sent\n- `4` (Canceled) — order canceled\n- `8` (Rejected) — order rejected or internal failure\n- `I` (Order Status) — terminal status summary (e.g. completed)\n","example":"F"},"type":{"$ref":"#/components/schemas/WsOrderType"},"side":{"$ref":"#/components/schemas/WsSide"},"quantity":{"type":"string","format":"decimal","description":"The specified quantity.","example":25.07},"quantityCurrency":{"type":"string","description":"The specified quantity currency.","example":"USD"},"cumulativeQuantity":{"type":"string","format":"decimal","description":"The total base quantity filled for the order.","example":0.0123},"cumulativeQuoteQuantity":{"type":"string","format":"decimal","description":"The total quote quantity filled for the order.","example":49.99},"leavesQuantity":{"type":"string","format":"decimal","description":"For orders created with base currency, this field is set to the remaining unfilled base quantity.\n\n- Only one of leavesQuantity or leavesQuoteQuantity will be set.\n- This field is set to null for orders created with quote currency.\n","example":0.0068},"leavesQuoteQuantity":{"type":"string","format":"decimal","description":"For orders created with quote currency, this field is set to the remaining unfilled quote quantity.\n\n- Only one of leavesQuantity or leavesQuoteQuantity will be set.\n- This field is set to null for orders created with base currency.\n","example":23.12},"averagePrice":{"type":"string","format":"decimal","description":"The average price for the order's fills."},"tradeId":{"type":"string","description":"The ID of the trade.","example":"14db12f5-4d3d-4fd8-8ced-062aa81bb4bc"},"fillQuantity":{"type":"string","format":"decimal","description":"The quantity of the fill for the trade.","example":0.5},"fillPrice":{"type":"string","format":"decimal","description":"The price of the fill for the trade.","example":7090.1},"source":{"type":"string","description":"The originating channel for the order.\n- `api_fix` — order placed via FIX 4.4 session\n- `api_rest` — order placed via REST API\n","example":"api_fix"},"triggerPrice":{"type":"string","format":"decimal","nullable":true,"description":"Stop/trigger price for stop and stop-limit orders. Null for other order types.","example":"80000.00"},"limitPrice":{"type":"string","format":"decimal","nullable":true,"description":"Limit price for limit, TWAP-with-limit, and SteadyPace-with-limit orders. Null when not set.","example":"85000.00"},"timeInForce":{"type":"string","nullable":true,"description":"Time-in-force (`1` GTC, `3` IOC, `4` FOK, `6` GTD). Null when not set.\n","example":"1"},"duration":{"type":"integer","nullable":true,"description":"Order duration in seconds for TWAP and SteadyPace orders. Null for other order types.","example":300},"twapInterval":{"type":"integer","nullable":true,"description":"TWAP slice interval in minutes when `isTimeSliced` is true.\nNull for non-TWAP orders and when not time-sliced.\n","example":5},"isTimeSliced":{"type":"boolean","nullable":true,"description":"TWAP time-slicing flag. Null for non-TWAP orders.\nWhen true, use `twapInterval`; when false, `boundsControl` may be set instead.\n","example":true},"boundsControl":{"type":"string","nullable":true,"description":"TWAP bounds control (`narrow`, `standard`, `wide`) for non-time-sliced TWAP orders.\nNull for time-sliced TWAP and non-TWAP orders.\n","example":"standard"},"interval":{"type":"integer","nullable":true,"description":"SteadyPace interval length. Null for non-SteadyPace orders.","example":60},"intervalUnit":{"type":"string","nullable":true,"description":"SteadyPace interval unit (`second`, `minute`, `hour`). Null for non-SteadyPace orders.\n","example":"second"},"subOrderSize":{"type":"string","format":"decimal","nullable":true,"description":"SteadyPace sub-order size. Null for non-SteadyPace orders.","example":"2"},"variance":{"type":"string","format":"decimal","nullable":true,"description":"Optional SteadyPace sub-order size variance (0–1). Null for non-SteadyPace orders.\n","example":"0.1"}}},"WsTradeOrdersRequest":{"title":"Trade Orders","description":"Subscribe or unsubscribe to order events for a specific account.\n\nMultiple subscriptions are supported on a single connection — send separate subscribe\nmessages for each accountId. Each subscribe/unsubscribe triggers a `subscription_response`\nmessage confirming the outcome.\n\n**Behavior changes (previously silent, now explicit):**\n- Subscribing to an already-subscribed accountId returns status `already_subscribed` instead of being silently ignored.\n- Unsubscribing from an accountId that is not currently subscribed returns an error message instead of being silently ignored.\n","required":["type","channel","accountId"],"type":"object","properties":{"type":{"type":"string","description":"The event type (\"subscribe\" or \"unsubscribe\")","enum":["subscribe","unsubscribe"]},"channel":{"type":"string","description":"The subscription channel (\"orders\" for trade orders)","enum":["orders"]},"accountId":{"$ref":"#/components/schemas/WsAccountId"}},"example":{"type":"subscribe","channel":"orders","accountId":"f230fdebfa084ffebc7e00515f54603f"}},"WsTradeOrdersResponse":{"title":"Trade Orders Response","oneOf":[{"$ref":"#/components/schemas/WsOrderCreated"},{"$ref":"#/components/schemas/WsFillUpdated"},{"$ref":"#/components/schemas/WsOrderCompleted"},{"$ref":"#/components/schemas/WsOrderCanceled"},{"$ref":"#/components/schemas/WsOrderError"}]}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"BitGo access token"}}},"x-tagGroups":[{"name":"API reference","tags":["Trade WebSocket"]}]}