This repository has been archived on 2026-11-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
orderbook-collector/Cargo.toml
T
pascal 1a5bbcd602 feat!: a generic core, and Kalshi through it
The orchestrator, the connection loop and the book thread's shell move to
src/core/, generic over an Exchange and its loss rule (ADR 0004).
Polymarket runs through it unchanged. Kalshi joins: a signed handshake
(KALSHI_KEY_ID_FILE, KALSHI_PRIVATE_KEY_FILE), a reconnect on a skipped
sequence number, first one wins by clock and rank, and its market listing
with markets tracked from three hours before they open.

Breaking: the exchange is now the first argument,
`engineering-challenge <polymarket|kalshi|kalshi-demo> [OUTPUT]`.
2026-11-11 20:54:17 +00:00

35 lines
1.1 KiB
TOML

[package]
name = "engineering-challenge"
version = "0.1.0"
edition = "2024"
build = "src/util/build.rs"
# `cargo run` runs the collector, not `src/bin/reconcile.rs`.
default-run = "engineering-challenge"
[dependencies]
anyhow = "1"
# Kalshi's handshake signature.
base64 = "0.23"
chrono = "0.4"
crossbeam = "0.8.4"
# `termination`: SIGTERM and SIGHUP stop the collector like SIGINT.
ctrlc = { version = "3", features = ["termination"] }
# Not used directly: tungstenite leaves rustls's crypto provider to the app, and
# rustls panics at runtime unless exactly one (here ring) is enabled.
# Signs Kalshi's handshake (Ed25519); already rustls's crypto provider.
ring = "0.17"
rustls = { version = "0.23", default-features = false, features = ["ring"] }
# Reads the PEM of Kalshi's key.
rustls-pki-types = { version = "1", features = ["std"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha1 = "0.11"
tungstenite = { version = "0.30", features = ["rustls-tls-webpki-roots"] }
ureq = "3"
[build-dependencies]
ergo-sbe = "=0.1.16"
indexmap = { version = "2", features = ["serde"] }
serde = { version = "1", features = ["derive"] }
serde_yaml_ng = "0.9"