Skip to main content

Quote Stream

WSProductionwss://ws.btse.com/ws/otcTestnetwss://testws.btse.io/ws/otc

Subscribe to continuous OTC price quotes. Prices are pushed as market conditions change. Requires WebSocket authentication.

To accept a quote, use the buyQuoteId or sellQuoteId from the stream with the Accept Quote REST endpoint.

REST vs WebSocket β€” when to use which:

  • REST POST /public-api/otc/v1/quotes β€” request a single quote with a 5-second TTL. This is the standard one-shot RFQ workflow.
  • WebSocket quote stream (this channel) β€” subscribe to a continuous price feed for high-frequency consumers. Independent of the REST RFQ.

Subscribe payload differs from spot/futures. OTC uses op: quote with a top-level symbol (and optional side, quantity); it does not use the spot/futures {op: "subscribe", args: [...]} form. Sending a spot/futures-style payload is silently acked with {event: "subscribe", channel: []} and produces no data.

// βœ… OTC subscribe
{ "op": "quote", "symbol": "BTC-USD", "quantity": { "quantity": 1, "currency": "BTC" } }

// ❌ Spot/futures style β€” does NOT work for OTC
{ "op": "subscribe", "args": ["quote"] }

Operations:

  • quote: subscribe to quote stream
  • unsubscribe-quote: unsubscribe from a specific quote stream
  • unsubscribe-quote-all: unsubscribe from all quote streams

Request Parameters​

NameTypeRequiredDescription
opStringYesSubscribe operation
symbolStringYesMarket symbol (from getMarket)
sideStringNobuy Β· sell (case sensitive). Both sides returned when omitted
clOrderIdStringNoCustom client order ID
quantityObjectYes

Response Content​

NameTypeRequiredDescription
topicStringNoAlways quote
buyQuoteIdStringNoQuote ID for buy side. null if not subscribed to buy or not authenticated
sellQuoteIdStringNoQuote ID for sell side. null if not subscribed to sell or not authenticated
clOrderIdStringNoClient order ID
buyQuantityDoubleNoBuy quantity. null if not subscribed to buy side
buyUnitPriceDoubleNoUnit buy price. null if not subscribed to buy side
buyTotalAmountDoubleNoTotal buy amount. null if not subscribed to buy side
sellQuantityDoubleNoSell quantity. null if not subscribed to sell side
sellUnitPriceDoubleNoUnit sell price. null if not subscribed to sell side
sellTotalAmountDoubleNoTotal sell amount. null if not subscribed to sell side
statusStringNoResponse status (null on normal updates)
reasonStringNoError reason if present
example

Request

{
"op": "quote",
"symbol": "BTC-USD",
"side": "buy",
"clOrderId": "ClientOrder1",
"quantity": {
"quantity": 1,
"currency": "BTC"
}
}

Request

{
"op": "unsubscribe-quote",
"symbol": "BTC-USD",
"clOrderId": "ClientOrder1",
"quantity": {
"quantity": 1,
"currency": "BTC"
}
}

Request

{
"op": "unsubscribe-quote-all"
}

Response

{
"topic": "quote",
"buyQuoteId": "015f05ba-1d55-46d7-94d9-214229414ae7",
"sellQuoteId": "0683a41a-a2ad-467b-99b3-241f3ab0cec4",
"clOrderId": null,
"buyQuantity": 10,
"buyUnitPrice": 47865.580838,
"buyTotalAmount": 478655.80838,
"sellQuantity": 10,
"sellUnitPrice": 47649.40351972,
"sellTotalAmount": 476494.0352,
"status": null,
"reason": null
}