The format for markets requires:
id
:string
remote identifier used by the exchangebase
:string
- base symbol for the marketquote
:string
- quote symbol fro the markettype
:string
- type of market (spot/futures/option/swap)
{
id: "BTCUSDT"
base: "BTC"
quote: "USDT",
type: "spot"
}
You can load markets in several ways:
- Load the markets from the exchanges REST API and parse them into the format required by CCXWS
- Load markets from your own database into the format required by CCXWS
- Use
CCXT
to load markets
Ensure you are using the correct market format.
This is a complex question and varies by each exchange. The two basic methods are snapshots
and updates
. A snapshot
provides an order book at a particular point in time and includes bids
and asks up to a certain depth (for example 10, 50, or 100 asks and bids).
An update
usually starts with a snapshot
and then provides incremental updates to the order book.
These updates include insertions, updates, and deletions. Usually with update streams, the point provided
includes the absolute volume not the delta. This means you can replace a price point with the new size
provided in the stream. Typically deletions have zero size for the price point, indicating you can
remove the price point.
Some exchanges also include sequence identifiers to help you identify when you may have missed a message. In the event that you miss a message, you should reconnect the stream.
Yes! We are working on prototype order books and have implemented them for several exchanges.
These can be found in src/orderbooks
folder. Once we have finalized some of the data structures
and patterns, we will be implementing full support for other exchanges.
This depends on the exchange. Some exchanges will provide periodic ticker updates including top of book updates others will only update the ticker with each tick of the market.
Yes, we would like to add common functionality for for private feeds.