litch
Parser for ITCH 5.0, inspired by itchy
but oriented toward live message handling.
WARNING: Work-in-progress
This crate should be presumed experimental and non-functional until integration testing has been completed. If you are willing and able to assist with integration testing, please leave a response under this issue.
Use
- Add
litchto your Rust project (v2024or more recent):
- Create a UDP socket and connect to the TotalView-ITCH broadcast port.
When you receive data, parse it into an
ItchMessageenum.
use UdpSocket;
use ItchMessage;
let socket = bind.unwrap;
let mut buf = ;
// TODO: Connect to TotalView-ITCH feed
let = socket.recv_from.unwrap;
let msg = parse.unwrap;
- Use
matchto extract message contents. All messages havemetadataand abodywhich contains variant-specific data.
use *;
use *;
match msg
- The message metadata (
ItchMetadata) can be accessed without matching.
let meta = msg.metadata;
let _time: NaiveTime = meta.timestamp;
let _locate: u16 = meta.stock_locate;
let _num: u16 = meta.tracking_number;
Development
Development history and current tasks are tracked in TODO.md.
Developer resources:
Contributions are welcome! Submit issues and pull requests to this repository.