Canadian Bitcoin Index streaming api
The Streaming API allows developers to integrate real-time index, trade and order book information into their applications.
Connecting to the Streaming API
To connect to the Streaming API, form a HTTP request and consume the resulting stream for as long as is practical. The CBIX servers will hold the connection open indefinitely (barring a server-side error, excessive client-side lag, network hiccups or routine server maintenance). If the server returns an unexpected response code, clients should a wait few seconds before trying again.
The Streaming API currently does not require any authentication and the connection endpoint is https://streaming.cbix.ca
The body of a streaming API response consists of a series of newline-delimited messages, where "newline" is considered to be \r\n and "message" is a JSON encoded data structure or a blank line.
Index Streaming API (/index)
The Index Streaming API provides the latest index values, volume data and change information.
Subscribing to the /index endpoint at https://streaming.cbix.ca/index will return an Index message object of the format below with all dates in ISO-8601 format.
Trade Streaming API (/trades)
The Trade Streaming API returns all trades from all supported exchanges.
Subscribing to the /trades endpoint at https://streaming.cbix.ca/trades will return a Trade message object of the format below with all dates in ISO-8601 format.
Order Book Streaming API (/orderbook)
The Order Book Streaming API returns the top 100 bid/asks from all supported exchanges for use in calculating and displaying price depth and determining order movements.
Subscribing to the /orderbook endpoint at https://streaming.cbix.ca/orderbook will return an Order Book message object of the format below (for brevity only two bids and asks are shown).