The websocket API v2 support both JSON and Protobuf (binary) encoding. The protobuf encoding is more efficient and faster than JSON encoding.
| Environment | Protocol | URL |
|---|---|---|
| Production | JSON | wss://ws.onyxhub.co/stream/v2 |
| Production | Protobuf | wss://ws.onyxhub.co/stream/v2/binary |
| UAT | JSON | wss://ws.uat.onyxhub.co/stream/v2 |
| UAT | Protobuf | wss://ws.uat.onyxhub.co/stream/v2/binary |
Install the library via pip:
pip install onyx-otcTo install the library with command line support
pip install onyx-otc[cli]Install the library with command line support and run the client:
onyx --helpStream tickers for a list of product symbols.
onyx stream -t ebob -t brtStream tradable quotes for a list of contract symbols.
onyx stream -r brtm25@ice -r ebobm25@iceThe binary endpoints uses protobuf encoding and the definitions are available in the protos/onyx_otc/v2 directory.