FerroFeed
Getting started
Configure FerroFeed and emit normalized market events.
FerroFeed is a runtime engine. It loads a configuration file, connects venue
adapters, normalizes provider payloads into MarketEvent, and writes
EmittedEvent records to one or more sinks.
Minimal configuration
[runtime]
ui = "none"
[[venues]]
id = "binance-btcusdt"
exchange = "binance"
symbols = ["BTCUSDT"]
channels = ["trades", "book"]
[[sinks]]
type = "stdout"
format = "json"Run the feed with that configuration:
RUST_LOG=info ferro-feed --config ./ferro-feed.tomlEvent boundary
The normalized boundary is EmittedEvent: a venue id plus a MarketEvent
payload. The event kind carries one of the domain records such as Trade,
BookUpdate, BookSnapshot, Quote, FundingRate, OhlcvBar, or
ConnectionStatus.
use ferro_feed::model::{EmittedEvent, EventKind};
fn route(event: EmittedEvent) {
match event.event.kind {
EventKind::Trade(trade) => {
println!("trade {} {}", trade.price, trade.qty);
}
EventKind::BookUpdate(update) => {
println!("book levels {}", update.levels.len());
}
EventKind::Status(status) => {
println!("connection {:?}", status.state);
}
_ => {}
}
}Next
- Use the API reference for connector, sink, and model details.
- Use the Redis sink example when downstream
consumers need replayable
md:v1stream keys.