The structure of the URL is:
- Each price subscription is of the format orderBook: e.g. orderBook:BTCUSD
- Multiple subscriptions can be created on one connection by using a comma separated list of subscriptions e.g.
Below shows an example subscription for BTC/USD and LTC/USD on a single connection:
The publication frequency and depth are set by OSL and are currently set to
2updates per second at a maximum depth of
50levels per side.
If subscription is submitted for an instrument that does not exist the subscription will be rejected with HTTP code 404, if multiple instruments are subscribed to all subscriptions are rejected if one of the instrument does not exist.
All messages are published in JSON format. Each message contains a field called action which determines how the message should be processed by the client. A message may contain multiple price data elements that always contain a price, a side and conditionally a size.
The combination of price and side is guaranteed unique and in a naive implementation of unordered books this pair could be used as the key to a hash based map.