Probe public market discovery and order books at both venues
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
mod probes;
|
||||
use anyhow::{ensure, Result};
|
||||
use reqwest::blocking::Client;
|
||||
use std::time::Duration;
|
||||
fn main() -> Result<()> {
|
||||
let client = Client::builder()
|
||||
.connect_timeout(Duration::from_secs(5))
|
||||
.timeout(Duration::from_secs(15))
|
||||
.user_agent("eventbook-readonly-probe/0.1")
|
||||
.build()?;
|
||||
let mut ok = true;
|
||||
for (name, result) in [
|
||||
("polymarket", probes::polymarket(&client)),
|
||||
("kalshi", probes::kalshi(&client)),
|
||||
] {
|
||||
match result {
|
||||
Ok(id) => println!("{name}: public catalog and orderbook OK ({id})"),
|
||||
Err(e) => {
|
||||
ok = false;
|
||||
eprintln!("{name}: {e:#}");
|
||||
}
|
||||
}
|
||||
}
|
||||
ensure!(ok, "one or more venues failed");
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user